修改检测脚本页面
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user