方案测试项bug修改
This commit is contained in:
@@ -81,7 +81,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, watch, defineProps, defineEmits, inject, onMounted } from 'vue'
|
||||
import { getSchemeTree } from '@/api/cs-device-boot/planData'
|
||||
import { getSchemeTree, getTestRecordInfo } from '@/api/cs-device-boot/planData'
|
||||
import { useConfig } from '@/stores/config'
|
||||
import useCurrentInstance from '@/utils/useCurrentInstance'
|
||||
import { ElTree } from 'element-plus'
|
||||
@@ -188,16 +188,24 @@ const add = (node: any, data: any) => {
|
||||
}
|
||||
/** 编辑树节点 */
|
||||
const edit = async (node: Node, data: any) => {
|
||||
console.log(data, '????????????')
|
||||
planId.value = data.id
|
||||
//修改方案
|
||||
if (data.children) {
|
||||
await handleOpen(1, planId.value)
|
||||
}
|
||||
//修改测试项
|
||||
else {
|
||||
monitorId.value = data.id
|
||||
await handleOpen(3, planId.value)
|
||||
}
|
||||
await getTestRecordInfo(planId.value)
|
||||
.then(res => {
|
||||
console.log(res, '++++++++++++++++++++195========>')
|
||||
//修改方案
|
||||
if (data.children) {
|
||||
dialogRef.value.details(res.data)
|
||||
handleOpen(1, planId.value)
|
||||
}
|
||||
//修改测试项
|
||||
else {
|
||||
monitorId.value = data.id
|
||||
dialogRef.value.details(res.data.records[0])
|
||||
handleOpen(3, planId.value)
|
||||
}
|
||||
})
|
||||
.catch(e => {})
|
||||
}
|
||||
/** 删除树节点 */
|
||||
const del = (node: Node, data: any) => {
|
||||
|
||||
Reference in New Issue
Block a user