检测通道数量微调
This commit is contained in:
@@ -108,30 +108,30 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-else>
|
<!-- <template v-else>-->
|
||||||
<el-table-column v-for="(item,index1) in deviceList" :key="item.deviceId" :label="item.deviceName" :min-width="110" align="center">
|
<!-- <el-table-column v-for="(item,index1) in deviceList" :key="item.deviceId" :label="item.deviceName" :min-width="110" align="center">-->
|
||||||
<template #default="{row}">
|
<!-- <template #default="{row}">-->
|
||||||
<el-tooltip
|
<!-- <el-tooltip-->
|
||||||
:content="row.devices[index1].chnResult[0].color===CheckData.ButtonColorEnum.INFO ? '暂无数据' : '点击查看详情'"
|
<!-- :content="row.devices[index1].chnResult[0].color===CheckData.ButtonColorEnum.INFO ? '暂无数据' : '点击查看详情'"-->
|
||||||
placement="top">
|
<!-- placement="top">-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
:disabled="row.devices[index1].chnResult[0].color===CheckData.ButtonColorEnum.INFO || row.devices[index1].chnResult[0].color===CheckData.ButtonColorEnum.LOADING"
|
<!-- :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"
|
<!-- :color="row.devices[index1].chnResult[0].color"-->
|
||||||
size="small"
|
<!-- size="small"-->
|
||||||
@click="handleClick(item,-1,row.scriptType)"
|
<!-- @click="handleClick(item,-1,row.scriptType)"-->
|
||||||
>
|
<!-- >-->
|
||||||
<el-icon v-if="row.devices[index1].chnResult[0].icon==='Loading'" class="loading-box"
|
<!-- <el-icon v-if="row.devices[index1].chnResult[0].icon==='Loading'" class="loading-box"-->
|
||||||
style="color: #fff">
|
<!-- style="color: #fff">-->
|
||||||
<component :is="Loading"/>
|
<!-- <component :is="Loading"/>-->
|
||||||
</el-icon>
|
<!-- </el-icon>-->
|
||||||
<el-icon v-else style="color: #fff">
|
<!-- <el-icon v-else style="color: #fff">-->
|
||||||
<component :is="row.devices[index1].chnResult[0].icon"/>
|
<!-- <component :is="row.devices[index1].chnResult[0].icon"/>-->
|
||||||
</el-icon>
|
<!-- </el-icon>-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
</el-tooltip>
|
<!-- </el-tooltip>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
@@ -269,40 +269,41 @@ const checkResultView: ComputedRef<CheckData.ScriptChnViewItem[]> = computed(()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
let tempChnResult: CheckData.ChnCheckResultEnum = device.chnResult[0]
|
|
||||||
if (device.chnResult.some(item => item == CheckData.ChnCheckResultEnum.ERRORDATA)) {
|
|
||||||
tempChnResult = CheckData.ChnCheckResultEnum.ERRORDATA
|
|
||||||
}
|
|
||||||
if (device.chnResult.some(item => item == CheckData.ChnCheckResultEnum.FAIL)) {
|
|
||||||
tempChnResult = CheckData.ChnCheckResultEnum.FAIL
|
|
||||||
}
|
|
||||||
if (device.chnResult.some(item => item == CheckData.ChnCheckResultEnum.TIMEOUT)) {
|
|
||||||
tempChnResult = CheckData.ChnCheckResultEnum.TIMEOUT
|
|
||||||
}
|
|
||||||
switch (tempChnResult) {
|
|
||||||
case CheckData.ChnCheckResultEnum.UNKNOWN:
|
|
||||||
tempChnBtnResult.push({color: CheckData.ButtonColorEnum.INFO, icon: 'Minus'})
|
|
||||||
break;
|
|
||||||
case CheckData.ChnCheckResultEnum.LOADING:
|
|
||||||
tempChnBtnResult.push({color: CheckData.ButtonColorEnum.LOADING, icon: 'Loading'})
|
|
||||||
break;
|
|
||||||
case CheckData.ChnCheckResultEnum.SUCCESS:
|
|
||||||
tempChnBtnResult.push({color: CheckData.ButtonColorEnum.SUCCESS, icon: 'CircleCheckFilled'})
|
|
||||||
break;
|
|
||||||
case CheckData.ChnCheckResultEnum.FAIL:
|
|
||||||
tempChnBtnResult.push({color: CheckData.ButtonColorEnum.DANGER, icon: 'Close'})
|
|
||||||
break;
|
|
||||||
case CheckData.ChnCheckResultEnum.TIMEOUT:
|
|
||||||
tempChnBtnResult.push({color: CheckData.ButtonColorEnum.WARNING, icon: 'Link'})
|
|
||||||
break;
|
|
||||||
case CheckData.ChnCheckResultEnum.ERRORDATA:
|
|
||||||
tempChnBtnResult.push({color: CheckData.ButtonColorEnum.WARNING, icon: 'WarnTriangleFilled'})
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// else {
|
||||||
|
// let tempChnResult: CheckData.ChnCheckResultEnum = device.chnResult[0]
|
||||||
|
// if (device.chnResult.some(item => item == CheckData.ChnCheckResultEnum.ERRORDATA)) {
|
||||||
|
// tempChnResult = CheckData.ChnCheckResultEnum.ERRORDATA
|
||||||
|
// }
|
||||||
|
// if (device.chnResult.some(item => item == CheckData.ChnCheckResultEnum.FAIL)) {
|
||||||
|
// tempChnResult = CheckData.ChnCheckResultEnum.FAIL
|
||||||
|
// }
|
||||||
|
// if (device.chnResult.some(item => item == CheckData.ChnCheckResultEnum.TIMEOUT)) {
|
||||||
|
// tempChnResult = CheckData.ChnCheckResultEnum.TIMEOUT
|
||||||
|
// }
|
||||||
|
// switch (tempChnResult) {
|
||||||
|
// case CheckData.ChnCheckResultEnum.UNKNOWN:
|
||||||
|
// tempChnBtnResult.push({color: CheckData.ButtonColorEnum.INFO, icon: 'Minus'})
|
||||||
|
// break;
|
||||||
|
// case CheckData.ChnCheckResultEnum.LOADING:
|
||||||
|
// tempChnBtnResult.push({color: CheckData.ButtonColorEnum.LOADING, icon: 'Loading'})
|
||||||
|
// break;
|
||||||
|
// case CheckData.ChnCheckResultEnum.SUCCESS:
|
||||||
|
// tempChnBtnResult.push({color: CheckData.ButtonColorEnum.SUCCESS, icon: 'CircleCheckFilled'})
|
||||||
|
// break;
|
||||||
|
// case CheckData.ChnCheckResultEnum.FAIL:
|
||||||
|
// tempChnBtnResult.push({color: CheckData.ButtonColorEnum.DANGER, icon: 'Close'})
|
||||||
|
// break;
|
||||||
|
// case CheckData.ChnCheckResultEnum.TIMEOUT:
|
||||||
|
// tempChnBtnResult.push({color: CheckData.ButtonColorEnum.WARNING, icon: 'Link'})
|
||||||
|
// break;
|
||||||
|
// case CheckData.ChnCheckResultEnum.ERRORDATA:
|
||||||
|
// tempChnBtnResult.push({color: CheckData.ButtonColorEnum.WARNING, icon: 'WarnTriangleFilled'})
|
||||||
|
// break;
|
||||||
|
// default:
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
temp.devices.push({
|
temp.devices.push({
|
||||||
deviceId: device.deviceId,
|
deviceId: device.deviceId,
|
||||||
|
|||||||
Reference in New Issue
Block a user