修改检测脚本页面
This commit is contained in:
25
frontend/src/views/machine/testScript/components/tree.vue
Normal file
25
frontend/src/views/machine/testScript/components/tree.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<el-tree node-key="id" default-expand-all :data="dataTree" :props="defaultProps" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { getTreeData } from '@/api/check/test'
|
||||
import { CheckData } from '@/api/check/interface'
|
||||
const dataTree = ref<CheckData.TreeItem[]>([])
|
||||
const defaultProps = {
|
||||
children: 'children',
|
||||
label: 'scriptTypeName',
|
||||
pid: 'pid'
|
||||
}
|
||||
const open = () => {
|
||||
getTreeData({
|
||||
scriptId: 'a303b2224845fcc6f60198b8ca23dca9'
|
||||
}).then(res => {
|
||||
dataTree.value = res.data
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
open()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
Reference in New Issue
Block a user