bug修复

This commit is contained in:
caozehui
2025-04-09 19:30:00 +08:00
parent 9938306884
commit ce74ec4db7
2 changed files with 333 additions and 324 deletions

View File

@@ -25,7 +25,9 @@
<span class="spanStyle">源输出为</span><br/> <span class="spanStyle">源输出为</span><br/>
<span class="spanStyle" v-if="active > 0">{{ big_V_Download }}</span><br/> <span class="spanStyle" v-if="active > 0">{{ big_V_Download }}</span><br/>
<span class="spanStyle" v-if="active > 0">{{ big_I_Download }}</span> <span class="spanStyle" v-if="active > 0">{{ big_I_Download }}</span>
<el-icon v-if="active === 1 " class="loading-box"><el-icon-loading /></el-icon> <el-icon v-if="active === 1 " class="loading-box">
<el-icon-loading/>
</el-icon>
</template> </template>
</el-step> </el-step>
<el-step> <el-step>
@@ -34,7 +36,9 @@
<span class="spanStyle">源输出为</span><br/> <span class="spanStyle">源输出为</span><br/>
<span class="spanStyle" v-if="active > 1">{{ small_V_Download }}</span><br/> <span class="spanStyle" v-if="active > 1">{{ small_V_Download }}</span><br/>
<span class="spanStyle" v-if="active > 1">{{ small_I_Download }}</span> <span class="spanStyle" v-if="active > 1">{{ small_I_Download }}</span>
<el-icon v-if="active === 2" class="loading-box"><el-icon-loading /></el-icon> <el-icon v-if="active === 2" class="loading-box">
<el-icon-loading/>
</el-icon>
</template> </template>
</el-step> </el-step>
<el-step> <el-step>
@@ -43,7 +47,9 @@
<span class="spanStyle">源输出为</span><br/> <span class="spanStyle">源输出为</span><br/>
<span class="spanStyle" v-if="active > 2">{{ big_V_Adjust }}</span><br/> <span class="spanStyle" v-if="active > 2">{{ big_V_Adjust }}</span><br/>
<span class="spanStyle" v-if="active > 2">{{ big_I_Adjust }}</span> <span class="spanStyle" v-if="active > 2">{{ big_I_Adjust }}</span>
<el-icon v-if="active === 3" class="loading-box"><el-icon-loading /></el-icon> <el-icon v-if="active === 3" class="loading-box">
<el-icon-loading/>
</el-icon>
</template> </template>
</el-step> </el-step>
<el-step> <el-step>
@@ -52,7 +58,9 @@
<span class="spanStyle">源输出为</span><br/> <span class="spanStyle">源输出为</span><br/>
<span class="spanStyle" v-if="active > 3">{{ small_V_Adjust }}</span><br/> <span class="spanStyle" v-if="active > 3">{{ small_V_Adjust }}</span><br/>
<span class="spanStyle" v-if="active > 3">{{ small_I_Adjust }}</span> <span class="spanStyle" v-if="active > 3">{{ small_I_Adjust }}</span>
<el-icon v-if="active === 4" class="loading-box"><el-icon-loading /></el-icon> <el-icon v-if="active === 4" class="loading-box">
<el-icon-loading/>
</el-icon>
</template> </template>
</el-step> </el-step>
<el-step title="结束"/> <el-step title="结束"/>
@@ -90,14 +98,13 @@
</template> </template>
<script lang="tsx" setup name="channelsTest"> <script lang="tsx" setup name="channelsTest">
import {type Device} from '@/api/device/interface/device'; import {type Device} from '@/api/device/interface/device';
import { SuccessFilled, Failed, Message, MessageBox } from '@element-plus/icons-vue' import {Failed} from '@element-plus/icons-vue'
import {type Ref, ref, toRef, watch} from 'vue' import {type Ref, ref, toRef, watch} from 'vue'
import {dialogBig} from '@/utils/elementBind' import {dialogBig} from '@/utils/elementBind'
import { ElMessage, ElMessageBox, TabsPaneContext } from 'element-plus'; import {ElMessageBox} from 'element-plus';
import {getCoefficientCheck} from '@/api/home/channelsTest/index' import {getCoefficientCheck} from '@/api/home/channelsTest/index'
import type {ChannelsTest} from '@/api/home/interface/channelsTest'; import type {ChannelsTest} from '@/api/home/interface/channelsTest';
import type {Plan} from '@/api/plan/interface'; import type {Plan} from '@/api/plan/interface';
import { fa } from 'element-plus/es/locale';
import {useUserStore} from "@/stores/modules/user"; import {useUserStore} from "@/stores/modules/user";
@@ -300,37 +307,42 @@ watch(webMsgSend,function (newValue,oldValue){
case 'Coefficient_Check': case 'Coefficient_Check':
console.log("Coefficient_Checkactive", active.value); console.log("Coefficient_Checkactive", active.value);
switch (newValue.operateCode) { switch (newValue.operateCode) {
case 'big_end'://大电压,电流下装 case 'big_start'://大电压,电流下装
active.value++;
big_V_Download.value = 'Ua=Ub=Uc=' + newValue.data.devVolt + 'V'; big_V_Download.value = 'Ua=Ub=Uc=' + newValue.data.devVolt + 'V';
big_I_Download.value = 'Ia=Ib=Ic=' + newValue.data.devCurr + 'A'; big_I_Download.value = 'Ia=Ib=Ic=' + newValue.data.devCurr + 'A';
break;
case 'big_end'://大电压,电流下装
active.value++;
tableLoading('small', '系数下装') tableLoading('small', '系数下装')
break; break;
} }
switch (newValue.operateCode) { switch (newValue.operateCode) {
case 'small_end'://小电压,电流下装 case 'small_start'://小电压,电流下装
active.value++;
small_V_Download.value = 'Ua=Ub=Uc=' + newValue.data.devVolt + 'V'; small_V_Download.value = 'Ua=Ub=Uc=' + newValue.data.devVolt + 'V';
small_I_Download.value = 'Ia=Ib=Ic=' + newValue.data.devCurr + 'A'; small_I_Download.value = 'Ia=Ib=Ic=' + newValue.data.devCurr + 'A';
break;
case 'small_end'://小电压,电流下装
active.value++;
tableLoading('big', '系数校准') tableLoading('big', '系数校准')
break; break;
} }
switch (newValue.operateCode) { switch (newValue.operateCode) {
case 'big_comp_end'://大电压,电流校准 case 'big_comp_start'://大电压,电流校准
active.value++;
big_V_Adjust.value = 'Ua=Ub=Uc=' + newValue.data.devVolt + 'V'; big_V_Adjust.value = 'Ua=Ub=Uc=' + newValue.data.devVolt + 'V';
big_I_Adjust.value = 'Ia=Ib=Ic=' + newValue.data.devCurr + 'A'; big_I_Adjust.value = 'Ia=Ib=Ic=' + newValue.data.devCurr + 'A';
break;
case 'big_comp_end'://大电压,电流校准
active.value++;
tableLoading('small', '系数校准') tableLoading('small', '系数校准')
break; break;
} }
switch (newValue.operateCode) { switch (newValue.operateCode) {
case 'small_comp_end'://小电压,电流校准 case 'small_comp_start'://小电压,电流校准
active.value++;
small_V_Adjust.value = 'Ua=Ub=Uc=' + newValue.data.devVolt + 'V'; small_V_Adjust.value = 'Ua=Ub=Uc=' + newValue.data.devVolt + 'V';
small_I_Adjust.value = 'Ia=Ib=Ic=' + newValue.data.devCurr + 'A'; small_I_Adjust.value = 'Ia=Ib=Ic=' + newValue.data.devCurr + 'A';
break;
case 'small_comp_end'://小电压,电流校准
active.value++;
active.value++; active.value++;
for (let i = 0; i < name.value.length; i++) { for (let i = 0; i < name.value.length; i++) {
@@ -752,8 +764,7 @@ const getTableDataForChannel = (index: number): any[] => {
watch(activeIndex, function (newValue, oldValue) { watch(activeIndex, function (newValue, oldValue) {
if(activeIndex.value === 1) if (activeIndex.value === 1) {
{
outputDsc.value = "电压误差为±0.1Un% 电流误差为±0.5%"; outputDsc.value = "电压误差为±0.1Un% 电流误差为±0.5%";
// 当前源输出为Ua=Ub=Uc=57.74V Ia=Ib=Ic=1A" // 当前源输出为Ua=Ub=Uc=57.74V Ia=Ib=Ic=1A"
} }
@@ -906,6 +917,7 @@ const initializeTableData = (templates: ChannelsTest.CoefficientVO[], index: num
justify-content: space-between; justify-content: space-between;
margin-bottom: 10px; margin-bottom: 10px;
} }
.custom-tabs-label .el-icon { .custom-tabs-label .el-icon {
vertical-align: middle; vertical-align: middle;
} }
@@ -922,6 +934,7 @@ const initializeTableData = (templates: ChannelsTest.CoefficientVO[], index: num
.el-tabs--border-card { .el-tabs--border-card {
height: 470px; height: 470px;
} }
/* .el-icon svg { /* .el-icon svg {
color: #ff7171; color: #ff7171;
} */ } */
@@ -929,6 +942,7 @@ const initializeTableData = (templates: ChannelsTest.CoefficientVO[], index: num
.icon-style { .icon-style {
color: #ff7171; color: #ff7171;
} }
.container { .container {
display: flex; display: flex;
} }

View File

@@ -344,12 +344,7 @@ const sendPause = () => {
console.log('发起暂停请求') console.log('发起暂停请求')
TestStatus.value = 'paused_ing' TestStatus.value = 'paused_ing'
pauseTest().then(res => { pauseTest()
Object.assign(webMsgSend.value, {
requestId: 'preStopTest',
operateCode: 'stop'
})
})
// setTimeout(() => { // setTimeout(() => {
// Object.assign(webMsgSend.value, { // Object.assign(webMsgSend.value, {
// requestId: 'preStopTest', // requestId: 'preStopTest',