微调
This commit is contained in:
@@ -54,10 +54,10 @@
|
||||
:content="row.devices[index1].chnResult[index2].color===CheckData.ButtonColorEnum.INFO ? '暂无数据' : '点击查看详情'"
|
||||
placement="top">
|
||||
<el-button
|
||||
:disabled="row.devices[index1].chnResult[index2].color==CheckData.ButtonColorEnum.INFO"
|
||||
:disabled="row.devices[index1].chnResult[index2].color===CheckData.ButtonColorEnum.INFO || row.devices[index1].chnResult[index2].color===CheckData.ButtonColorEnum.LOADING"
|
||||
:color="row.devices[index1].chnResult[index2].color"
|
||||
size="small"
|
||||
@click="handleClick(row.scriptId,item.deviceId,chnItem)"
|
||||
@click="handleClick(item.deviceId,chnItem+'',row.scriptId)"
|
||||
style="align-self: center;"
|
||||
>
|
||||
<el-icon v-if="row.devices[index1].chnResult[index2].icon==='Loading'" class="loading-box"
|
||||
@@ -83,10 +83,10 @@
|
||||
:content="row.devices[index1].chnResult[0].color===CheckData.ButtonColorEnum.INFO ? '暂无数据' : '点击查看详情'"
|
||||
placement="top">
|
||||
<el-button
|
||||
:disabled="row.devices[index1].chnResult[0].color===CheckData.ButtonColorEnum.INFO"
|
||||
:disabled="row.devices[index1].chnResult[0].color===CheckData.ButtonColorEnum.INFO || row.devices[index1].chnResult[0].color===CheckData.ButtonColorEnum.LOADING"
|
||||
:color="row.devices[index1].chnResult[0].color"
|
||||
size="small"
|
||||
@click="handleClick(row.scriptId,item.deviceId,-1)"
|
||||
@click="handleClick(item.deviceId,'-1',row.scriptId)"
|
||||
>
|
||||
<el-icon v-if="row.devices[index1].chnResult[0].icon==='Loading'" class="loading-box"
|
||||
style="color: #fff">
|
||||
@@ -127,18 +127,7 @@
|
||||
<dataCheckSingleChannelSingleTestPopup ref="dataCheckSingleChannelSingleTestPopupRef"/>
|
||||
</template>
|
||||
<script lang="tsx" setup name="test">
|
||||
import {
|
||||
Check,
|
||||
InfoFilled,
|
||||
Refresh,
|
||||
VideoPause,
|
||||
Minus,
|
||||
Close,
|
||||
CircleCheckFilled,
|
||||
WarnTriangleFilled,
|
||||
Loading,
|
||||
Link
|
||||
} from '@element-plus/icons-vue'
|
||||
import {Check, InfoFilled, Loading, Refresh, VideoPause} from '@element-plus/icons-vue'
|
||||
import resultPopup from './resultPopup.vue'
|
||||
import dataCheckSingleChannelSingleTestPopup from './dataCheckSingleChannelSingleTestPopup.vue'
|
||||
import {reactive, ref, watch} from "vue";
|
||||
@@ -290,7 +279,7 @@ const checkResultView = computed(() => {
|
||||
|
||||
watch(testStatus, function (newValue, oldValue) {
|
||||
if (newValue == 'start') {
|
||||
startTimer() // todo 可移除
|
||||
//startTimer() // todo 可移除
|
||||
emit('update:testStatus', 'process')
|
||||
}
|
||||
if (newValue == 'paused' && oldValue == 'process') {
|
||||
@@ -305,6 +294,9 @@ watch(testStatus, function (newValue, oldValue) {
|
||||
watch(webMsgSend, function (newValue, oldValue) {
|
||||
if (activeIndex <= checkTotal) {
|
||||
switch (newValue.requestId) {
|
||||
case 'PreTest_Success':
|
||||
ElMessage.success('预检成功!')
|
||||
break;
|
||||
case 'PreTest_Fail':
|
||||
ElMessageBox.alert('预检测失败,请检查设备连接情况', '预检测失败', {
|
||||
confirmButtonText: '确定',
|
||||
@@ -786,35 +778,6 @@ const getCheckResult = (scriptId: string) => {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// devices = deviceList.map(item => {
|
||||
//
|
||||
// let tempChnResult: CheckData.ChnCheckResultEnum[] = []
|
||||
// for (let i = 0; i < item.chnNum; i++) {
|
||||
// tempChnResult.push(CheckData.ChnCheckResultEnum.SUCCESS)
|
||||
// }
|
||||
//
|
||||
// let randomNum = getRandomInt(item.chnNum * 2)
|
||||
// if (activeIndex >= 2 && activeIndex <= 8) {
|
||||
// if (randomNum % 3 === 0) {
|
||||
// let a = getRandomInt(2) === 1 ? CheckData.ChnCheckResultEnum.ERRORDATA : CheckData.ChnCheckResultEnum.UNCONNECTED
|
||||
// tempChnResult.splice(tempChnResult.length - 1 - item.chnNum, item.chnNum, CheckData.ChnCheckResultEnum.ERRORDATA)
|
||||
// }else{
|
||||
// if (randomNum < item.chnNum) {
|
||||
// tempChnResult[randomNum] = (randomNum % 2) + 1
|
||||
//
|
||||
// errorCheckItem.push(scriptId)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return {
|
||||
// deviceId: item.deviceId,
|
||||
// deviceName: item.deviceName,
|
||||
// chnResult: tempChnResult,
|
||||
// }
|
||||
// })
|
||||
|
||||
let tempScriptChnItem: CheckData.ScriptChnItem = {
|
||||
scriptId,
|
||||
devices,
|
||||
@@ -850,7 +813,7 @@ const handlePauseOrContinue = () => {
|
||||
};
|
||||
|
||||
// 点击查看(设备)通道检测详情。参数1:设备信息,参数2:通道号,-1:代表查看全部通道
|
||||
const handleClick = (scriptType: string, deviceId: any, chnNum: number) => {
|
||||
const handleClick = (deviceId: string, chnNum: string, scriptType: string) => {
|
||||
dataCheckSingleChannelSingleTestPopupRef.value?.open(deviceId, chnNum, scriptType);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user