联调检测脚本
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<el-table-column prop="name" label="指标" show-overflow-tooltip width="180px" />
|
||||
<el-table-column align="center" label="参与误差比较">
|
||||
<template #default="{ row }">
|
||||
<el-switch v-model="row.compare" v-if="row.show">
|
||||
<el-switch v-model="row.errorFlag" v-if="row.show" :active-value="1" :inactive-value="0">
|
||||
<template #active-action>
|
||||
<span>√</span>
|
||||
</template>
|
||||
@@ -28,7 +28,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="是否启用">
|
||||
<template #default="{ row }">
|
||||
<el-switch v-model="row.enable" v-if="row.show">
|
||||
<el-switch v-model="row.enable" v-if="row.show" :active-value="1" :inactive-value="0">
|
||||
<template #active-action>
|
||||
<span>√</span>
|
||||
</template>
|
||||
@@ -45,20 +45,17 @@
|
||||
import { ref, reactive } from 'vue'
|
||||
import type { Dict } from '@/api/system/dictionary/interface'
|
||||
import { getDictTreeByCode } from '@/api/system/dictionary/dictTree'
|
||||
interface TabOption {
|
||||
label: string
|
||||
name: string
|
||||
children?: TabOption[]
|
||||
}
|
||||
import { checkDataList } from '@/api/device/testScript'
|
||||
|
||||
const props = defineProps({
|
||||
options: {
|
||||
type: Array ,
|
||||
activeName: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
const tableData = ref<any[]>([])
|
||||
onMounted(async () => {
|
||||
let data = await getDictTreeByCode({
|
||||
const info = async () => {
|
||||
let { data } = await getDictTreeByCode({
|
||||
name: '',
|
||||
id: '',
|
||||
pid: '',
|
||||
@@ -67,7 +64,7 @@ onMounted(async () => {
|
||||
sort: 0
|
||||
})
|
||||
|
||||
data.data[0].children.forEach((item: any, i: number) => {
|
||||
data[0].children.forEach((item: any, i: number) => {
|
||||
tableData.value.push({
|
||||
id: item.id,
|
||||
name: item.name,
|
||||
@@ -77,13 +74,18 @@ onMounted(async () => {
|
||||
item.children.forEach((k: any) => {
|
||||
tableData.value[i].children.push({
|
||||
id: k.id,
|
||||
pid: item.id,
|
||||
name: k.name,
|
||||
dataType: 'real',
|
||||
show: true,
|
||||
compare: false,
|
||||
enable: false
|
||||
errorFlag: 0,
|
||||
enable: 0
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
info()
|
||||
|
||||
// tableData.value = data.data[0].children || []
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user