Files
pqs-9100_client/frontend/src/views/machine/testScript/components/tree.vue

26 lines
644 B
Vue
Raw Normal View History

2025-02-13 16:15:26 +08:00
<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>