| | |
| | | label: 'group_name', |
| | | children: 'children', |
| | | }" |
| | | defaultExpandAll |
| | | :treedata="listTreeData" |
| | | title-name="分组列表" |
| | | :show-more-operate="false" |
| | |
| | | import mittBus from '/@/utils/mitt'; |
| | | import { useCompRef } from '/@/utils/types'; |
| | | import { convertFileSize, convertListToTree } from '/@/utils/util'; |
| | | import { OptClassificationMap, classificationEnum } from '/@/views/types/metrics'; |
| | | const state = reactive({ |
| | | tableParams: { |
| | | PageIndex: 1, |
| | |
| | | const listData = ref([]); |
| | | const currentListID = computed(() => currentNode.value?.group_id); |
| | | const currentNode = ref(null); |
| | | |
| | | const listTreeData = computed(() => { |
| | | const result = convertListToTree(listData.value, { |
| | | const byParentData = convertListToTree(listData.value, { |
| | | ID: 'group_id', |
| | | ParentID: 'p_group_id', |
| | | Children: 'children', |
| | | }); |
| | | const result = []; |
| | | byParentData.forEach((item) => { |
| | | if (item.group_type == OptClassificationMap[classificationEnum.Knowledge]) { |
| | | result.push(item); |
| | | } |
| | | }); |
| | | return result; |
| | | }); |
| | | |