liu
2026-09-02 2c162f32c0b9a0590a1cd671dd5a909321ea354b
fix(dv): 设备台账左侧设备类型树子类型不展示

tree.vue 查询先 handleTree 拼成嵌套数据,又配置了 treeConfig.transform,
导致 vxe 重新按 parentId 建树时子节点丢失,只剩父类型。
改为直接返回后端平铺列表,与设备类型管理列表页写法保持一致。

Co-Authored-By: Claude <noreply@anthropic.com>
已修改1个文件
11 ■■■■■ 文件已修改
src/views/mes/dv/machinery/type/components/tree.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/dv/machinery/type/components/tree.vue
@@ -5,7 +5,6 @@
import { ref } from 'vue';
import { CommonStatusEnum } from '@vben/constants';
import { handleTree } from '@vben/utils';
import { Card, Input } from 'ant-design-vue';
@@ -30,12 +29,10 @@
    proxyConfig: {
      ajax: {
        query: async () =>
          handleTree(
            await getMachineryTypeList({
              name: searchKeyword.value || undefined,
              status: CommonStatusEnum.ENABLE,
            }),
          ),
          await getMachineryTypeList({
            name: searchKeyword.value || undefined,
            status: CommonStatusEnum.ENABLE,
          }),
      },
    },
    rowConfig: {