Browse Source

refactor: update async component import in tree table and adjust parent ID property access in service implementation for consistency

PIG AI 1 week ago
parent
commit
4293a27e49
2 changed files with 2 additions and 2 deletions
  1. 1 1
      tree/树形ServiceImpl.java
  2. 1 1
      tree/树形表格.vue

+ 1 - 1
tree/树形ServiceImpl.java

@@ -67,7 +67,7 @@ public class ${ClassName}ServiceImpl extends ServiceImpl<${ClassName}Mapper, ${C
             TreeNode<${pk.attrType}> node = new TreeNode<>();
             node.setId(entity.$str.getProperty($pk.attrName)());
             node.setName(entity.$str.getProperty($nameField)());
-            node.$str.setProperty($parentField)(entity.$str.getProperty($parentField)() != null ? entity.$str.getProperty($parentField)() : 0L);
+            node.setParentId($parentField)(entity.$str.getProperty($parentField)() != null ? entity.$str.getProperty($parentField)() : 0L);
 
             // 扩展属性
             Map<String, Object> extra = new HashMap<>();

+ 1 - 1
tree/树形表格.vue

@@ -188,7 +188,7 @@ import { useDict } from '/@/hooks/dict';
 
 // ========== 组件声明 ==========
 // 异步加载表单弹窗组件
-const FormDialog = defineAsyncComponent(() => import('./树形表单.vue'));
+const FormDialog = defineAsyncComponent(() => import('./form.vue'));
 
 // ========== 字典数据 ==========
 #set($fieldDict=[])