修改检测脚本页面

This commit is contained in:
GGJ
2025-02-17 16:44:02 +08:00
parent 5c012c2bc9
commit 92b9a82f21
8 changed files with 289 additions and 151 deletions

View File

@@ -1,5 +1,5 @@
<template>
<el-tree node-key="id" default-expand-all :data="dataTree" :props="defaultProps">
<el-tree node-key="id" default-expand-all :data="dataTree" :props="defaultProps" style="width: 100%">
<template #default="{ node, data }">
<el-tooltip effect="dark" :content="data.scriptTypeName" placement="top" :hide-after="0">
<div class="custom-tree-node">
@@ -13,6 +13,12 @@
import { ref, reactive } from 'vue'
import { getTreeData } from '@/api/check/test'
import { CheckData } from '@/api/check/interface'
const props = defineProps({
scriptId: {
type: String,
required: true
}
})
const dataTree = ref<CheckData.TreeItem[]>([])
const defaultProps = {
children: 'children',
@@ -21,7 +27,7 @@ const defaultProps = {
}
const open = () => {
getTreeData({
scriptId: 'a303b2224845fcc6f60198b8ca23dca9'
scriptId: props.scriptId
}).then(res => {
dataTree.value = res.data
})