检测脚本详情查看

This commit is contained in:
sjl
2025-03-04 09:35:41 +08:00
parent afd2d467f3
commit ec9f270d04
5 changed files with 216 additions and 19 deletions

View File

@@ -187,7 +187,10 @@
v-if="showDialog"
/>
<!-- 查看 -->
<viewRow ref="viewRowRef" />
<viewRow ref="viewRowRef"
:activeName="activeName"
:formContent="props.formContent"
/>
</div>
</template>
@@ -337,6 +340,8 @@ const inquireTable = () => {
tableData.value = res.data
}
})
}
// 打开 drawer(新增、编辑)
const openDialog = (titleType: string, row: Partial<TestScript.ResTestScript> = {}) => {
@@ -376,8 +381,24 @@ const copyRow = async (row: any) => {
})
}
// 查看
const view = (row: any) => {
viewRowRef.value?.open(row)
const view = (row: Partial<TestScript.ResTestScript> = {}) => {
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) => {