Browse Source

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend into dev

ysy 1 năm trước cách đây
mục cha
commit
73b0489904

+ 4 - 3
src/views/system/organization/components/org-user-edit.vue

@@ -149,7 +149,7 @@ export default {
     const defaultForm = {
       id: null,
       deptIds: [],
-      deptName:'' ,
+      deptName: '',
 
       groupId: null,
       groupName: null,
@@ -299,9 +299,10 @@ export default {
     updateVisible(value) {
       this.$emit('update:visible', value);
     },
-    handleChange(){
+    handleChange() {
       let arr = Array.from(this.$refs.deptRef.getCheckedNodes())
-      this.form.deptName = arr.map(i => i.label).join('/')
+      this.form.deptName = arr.map(i => i.label).join('/') || ''
+      this.form.deptIds = this.form.deptIds || []
     },
     checkedKeys(value) {
       this.getLabelName(this.institutionList, i => {

+ 2 - 2
src/views/system/organization/index.vue

@@ -113,7 +113,7 @@ export default {
       listOrganizations()
         .then((list) => {
           let _list = list.filter((i) => i.name != '超级管理员')
-          let _institutionList = _list.filter((i) => [10, 20].includes(i.type));
+          // let _institutionList = _list.filter((i) => [10, 20].includes(i.type));
           console.log(this.institutionList);
           this.loading = false;
           this.data = this.$util.toTreeData({
@@ -122,7 +122,7 @@ export default {
             parentIdField: 'parentId'
           });
           this.institutionList = this.$util.toTreeData({
-            data: _institutionList,
+            data: _list,
             idField: 'id',
             parentIdField: 'parentId'
           });