diff --git a/frontend/src/api/device/testScript/index.ts b/frontend/src/api/device/testScript/index.ts index dcb6831..396773c 100644 --- a/frontend/src/api/device/testScript/index.ts +++ b/frontend/src/api/device/testScript/index.ts @@ -46,3 +46,7 @@ export const updateDtls = (params: any) => { export const scriptDtlsCheckDataList = (params: any) => { return http.post(`/pqScript/scriptDtlsCheckDataList`, params) } +// 通讯脚本回显 +export const checkDataList = (params: any) => { + return http.post(`/pqScript/checkDataList`, params) +} diff --git a/frontend/src/views/machine/testScript/components/communication.vue b/frontend/src/views/machine/testScript/components/communication.vue index f6913c8..d62c87c 100644 --- a/frontend/src/views/machine/testScript/components/communication.vue +++ b/frontend/src/views/machine/testScript/components/communication.vue @@ -16,7 +16,7 @@ - + √ @@ -28,7 +28,7 @@ - + √ @@ -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([]) -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 || [] }) diff --git a/frontend/src/views/machine/testScript/components/scriptForm.ts b/frontend/src/views/machine/testScript/components/scriptForm.ts index ee64094..51b4fa1 100644 --- a/frontend/src/views/machine/testScript/components/scriptForm.ts +++ b/frontend/src/views/machine/testScript/components/scriptForm.ts @@ -26,10 +26,10 @@ let scriptForm: any = { } ], //间谐波 flickerData: { - fchagValue: 0, //电压变动幅度 - fchagFre: 0, //波动频度 - waveFluType: 0, //波动类型 - waveType: 0, //波类型 + fchagValue: '', //变动量 + fchagFre: '', //波动频度 + waveType: 'CPM', // 波动类型 + waveFluType: 'SQU', //波类型 fdutyCycle: 50 //占空比 }, //闪变 dipData: { @@ -55,10 +55,10 @@ let scriptForm: any = { } ], //间谐波 flickerData: { - fchagValue: 0, //电压变动幅度 - fchagFre: 0, //波动频度 - waveFluType: 0, //波动类型 - waveType: 0, //波类型 + fchagValue: '', //变动量 + fchagFre: '', //波动频度 + waveType: 'CMP', // 波动类型 + waveFluType: 'SQU', //波类型 fdutyCycle: 50 //占空比 }, //闪变 dipData: { @@ -84,10 +84,10 @@ let scriptForm: any = { } ], //间谐波 flickerData: { - fchagValue: 0, //电压变动幅度 - fchagFre: 0, //波动频度 - waveFluType: 0, //波动类型 - waveType: 0, //波类型 + fchagValue: '', //变动量 + fchagFre: '', //波动频度 + waveType: 'CMP', // 波动类型 + waveFluType: 'SQU', //波类型 fdutyCycle: 50 //占空比 }, //闪变 dipData: { @@ -113,10 +113,10 @@ let scriptForm: any = { } ], //间谐波 flickerData: { - fchagValue: 0, //电压变动幅度 - fchagFre: 0, //波动频度 - waveFluType: 0, //波动类型 - waveType: 0, //波类型 + fchagValue: '', //变动量 + fchagFre: '', //波动频度 + waveType: 'CMP', // 波动类型 + waveFluType: 'SQU', //波类型 fdutyCycle: 50 //占空比 }, //闪变 dipData: { @@ -142,10 +142,10 @@ let scriptForm: any = { } ], //间谐波 flickerData: { - fchagValue: 0, //电压变动幅度 - fchagFre: 0, //波动频度 - waveFluType: 0, //波动类型 - waveType: 0, //波类型 + fchagValue: '', //变动量 + fchagFre: '', //波动频度 + waveType: 'CMP', // 波动类型 + waveFluType: 'SQU', //波类型 fdutyCycle: 50 //占空比 }, //闪变 dipData: { @@ -171,10 +171,10 @@ let scriptForm: any = { } ], //间谐波 flickerData: { - fchagValue: 0, //电压变动幅度 - fchagFre: 0, //波动频度 - waveFluType: 0, //波动类型 - waveType: 0, //波类型 + fchagValue: '', //变动量 + fchagFre: '', //波动频度 + waveType: 'CMP', // 波动类型 + waveFluType: 'SQU', //波类型 fdutyCycle: 50 //占空比 }, //闪变 dipData: { diff --git a/frontend/src/views/machine/testScript/components/setValueTable.vue b/frontend/src/views/machine/testScript/components/setValueTable.vue index 5576043..b8b32ea 100644 --- a/frontend/src/views/machine/testScript/components/setValueTable.vue +++ b/frontend/src/views/machine/testScript/components/setValueTable.vue @@ -1,9 +1,32 @@ import { ref } from "vue" - - - + + + + + + + + + + 编辑 + + + + + - + 新增 - + - - + --> - 取 消 + 取 消 保存 @@ -87,8 +108,6 @@ import { ref } from "vue" - - diff --git a/frontend/src/views/machine/testScript/components/testProjectPopup.vue b/frontend/src/views/machine/testScript/components/testProjectPopup.vue index dd85859..7454f8b 100644 --- a/frontend/src/views/machine/testScript/components/testProjectPopup.vue +++ b/frontend/src/views/machine/testScript/components/testProjectPopup.vue @@ -135,7 +135,7 @@ - + @@ -144,6 +144,13 @@ +