优化检测脚本页面
录入检测脚本
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
v-if="row.show"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
:disabled="disabled"
|
||||
:disabled="row.disabled || disabled"
|
||||
>
|
||||
<template #active-action>
|
||||
<span>√</span>
|
||||
@@ -39,7 +39,7 @@
|
||||
v-if="row.show"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
:disabled="disabled"
|
||||
:disabled="row.disabled || disabled"
|
||||
>
|
||||
<template #active-action>
|
||||
<span>√</span>
|
||||
@@ -71,11 +71,17 @@ const props = defineProps({
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
options: {
|
||||
type: Array,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
const tableData = ref<any[]>([])
|
||||
const info = async () => {
|
||||
let checkData: any = []
|
||||
let title = props.options.filter((i: any) => i.value == props.activeName)[0]
|
||||
|
||||
await checkDataList({
|
||||
scriptId: props.formContent.id,
|
||||
scriptType: props.activeName
|
||||
@@ -111,6 +117,7 @@ const info = async () => {
|
||||
id: k.id,
|
||||
pid: item.id,
|
||||
name: k.name,
|
||||
pname: item.name,
|
||||
dataType: item.name == '闪变' ? 'avg' : item.name == '暂态' ? 'avg' : 'real',
|
||||
show: true,
|
||||
errorFlag: childrenList[0].errorFlag,
|
||||
@@ -121,6 +128,8 @@ const info = async () => {
|
||||
id: k.id,
|
||||
pid: item.id,
|
||||
name: k.name,
|
||||
disabled: false,
|
||||
pname: item.name,
|
||||
dataType: item.name == '闪变' ? 'avg' : item.name == '暂态' ? 'avg' : 'real',
|
||||
show: true,
|
||||
errorFlag: 0,
|
||||
@@ -128,7 +137,22 @@ const info = async () => {
|
||||
})
|
||||
}
|
||||
})
|
||||
// 默认够选通讯脚本
|
||||
if (item.name == title.label.replace(/准确度|检测/g, '')) {
|
||||
if (item.name == '暂态') {
|
||||
tableData.value[i].children.forEach((k: any) => {
|
||||
k.disabled = true
|
||||
k.enable = 1
|
||||
k.errorFlag = 1
|
||||
})
|
||||
} else {
|
||||
tableData.value[i].children[0].disabled = true
|
||||
tableData.value[i].children[0].enable = 1
|
||||
tableData.value[i].children[0].errorFlag = 1
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
console.log('🚀 ~ item.children.forEach ~ tableData.value:', tableData.value)
|
||||
}
|
||||
const getData = () => {
|
||||
|
||||
Reference in New Issue
Block a user