lrf402788946 4 years ago
parent
commit
fe273e91fd
1 changed files with 5 additions and 0 deletions
  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;
   }