diff --git a/frontend/src/views/machine/testScript/components/scriptForm.ts b/frontend/src/views/machine/testScript/components/scriptForm.ts index 5af44d1..7274eac 100644 --- a/frontend/src/views/machine/testScript/components/scriptForm.ts +++ b/frontend/src/views/machine/testScript/components/scriptForm.ts @@ -1,4 +1,4 @@ -import { log } from 'console' + let scriptForm: any = { subType: '', //tabcode diff --git a/frontend/src/views/machine/testScript/components/setValueTable.vue b/frontend/src/views/machine/testScript/components/setValueTable.vue index ee42e1a..d351766 100644 --- a/frontend/src/views/machine/testScript/components/setValueTable.vue +++ b/frontend/src/views/machine/testScript/components/setValueTable.vue @@ -132,6 +132,7 @@ const form = ref({ // 打开弹窗,可能是新增,也可能是编辑 const open = async (row: any, copyRowList: any) => { + let treeData: any = [] await getDictTreeByCode({ name: '', @@ -157,6 +158,7 @@ const open = async (row: any, copyRowList: any) => { } }) }) + let form = handleHarmData(JSON.parse(JSON.stringify(props.form))) let retryCompute = isEqual(form, copyRowList) await scriptDtlsCheckDataList({ diff --git a/frontend/src/views/machine/testScript/components/testProjectPopup.vue b/frontend/src/views/machine/testScript/components/testProjectPopup.vue index 3178f78..bd98766 100644 --- a/frontend/src/views/machine/testScript/components/testProjectPopup.vue +++ b/frontend/src/views/machine/testScript/components/testProjectPopup.vue @@ -578,6 +578,7 @@ const open = (sign: string, row: any) => { handleRowClick({ name: 'L1', sort: 0 }, { label: '相别' }) dictStore.getDictData('Script_Value_Type') + console.log('🚀 ~ open ~ tabChildren.value:', tabChildren.value) } // 判断后台没有谐波,简谐波值 用于回显 diff --git a/frontend/src/views/machine/testScript/components/testScriptDetail.vue b/frontend/src/views/machine/testScript/components/testScriptDetail.vue index dc3ec37..e6f3d26 100644 --- a/frontend/src/views/machine/testScript/components/testScriptDetail.vue +++ b/frontend/src/views/machine/testScript/components/testScriptDetail.vue @@ -187,7 +187,10 @@ v-if="showDialog" /> - + @@ -337,6 +340,8 @@ const inquireTable = () => { tableData.value = res.data } }) + + } // 打开 drawer(新增、编辑) const openDialog = (titleType: string, row: Partial = {}) => { @@ -376,8 +381,24 @@ const copyRow = async (row: any) => { }) } // 查看 -const view = (row: any) => { - viewRowRef.value?.open(row) +const view = (row: Partial = {}) => { + + getCommunication() + //当前点击的一级tab + const parentTabName = communicationList.value.find(t => t.id === activeName.value)?.name || '未找到对应名称'; + //当前点击的二级tab + const childrenTabName = ref('') + tabData.value.forEach((item: any) => { + if (item.value == activeName.value) { + item.children.forEach((k: any) => { + if (k.value == childActiveName.value) { + childrenTabName.value = k.label + } + }) + } + }) + console.log(tabData.value) + viewRowRef.value?.open(row,communicationList.value,parentTabName,childrenTabName.value) } // 删除 const deleteRow = async (row: any) => { diff --git a/frontend/src/views/machine/testScript/components/viewRow.vue b/frontend/src/views/machine/testScript/components/viewRow.vue index c94d7e1..c2ccaea 100644 --- a/frontend/src/views/machine/testScript/components/viewRow.vue +++ b/frontend/src/views/machine/testScript/components/viewRow.vue @@ -1,5 +1,5 @@