lrf402788946 4 年之前
父节点
当前提交
fe273e91fd
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      app/service/system/dictionary.js

+ 5 - 0
app/service/system/dictionary.js

@@ -56,6 +56,11 @@ class DictionaryService extends CrudService {
     if (dicList && dicList.length > 0) {
       list = await this.toFindChildren(dicList);
     }
+    const { categroy } = condition;
+    if (categroy) {
+      list = _.head(list);
+      list = _.get(list, 'children', []);
+    }
     return list;
   }