2213980799@qq.com 1 vuosi sitten
vanhempi
commit
8440aab43d

+ 1 - 1
src/views/enterpriseModel/dept/components/org-edit.vue

@@ -520,7 +520,7 @@
         this.responsibleName = data.map((item) => item.name).toString();
       },
       addOpen() {
-        this.$refs.addUserRef.open();
+        this.$refs.addUserRef.open(true);
       },
       clearManagerFirst() {
         this.managerFirst = {};

+ 1 - 1
src/views/system/organization/components/org-edit.vue

@@ -364,7 +364,7 @@ export default {
       );
     },
     addOpen() {
-      this.$refs.addUserRef.open();
+      this.$refs.addUserRef.open(true);
     },
     clearManagerFirst() {
       this.managerFirst = {};

+ 12 - 6
src/views/system/user/components/add.vue

@@ -53,7 +53,7 @@ import OrgUserSearch from '@/views/system/organization/components/org-user-searc
 
 import { listOrganizations } from '@/api/system/organization';
 export default {
-  components:{
+  components: {
     OrgUserSearch
   },
   data() {
@@ -61,6 +61,7 @@ export default {
       data: [],
       show: false,
       organizationId: '',
+      isHasAccount: false,
       // 表格列配置
       columns: [
         {
@@ -119,7 +120,7 @@ export default {
           this.data = this.$util.toTreeData({
             data: _list,
             idField: 'id',
-            parentIdField: 'parentId',
+            parentIdField: 'parentId'
           });
 
           this.$nextTick(() => {
@@ -130,20 +131,25 @@ export default {
           // this.$message.error(e.message);
         });
     },
-    async open() {
+    async open(isHasAccount) {
+      if (isHasAccount) {
+        this.isHasAccount = isHasAccount;
+      }
       this.query();
       this.show = true;
     },
     /* 表格数据源 */
     async datasource({ page, limit, where, order }) {
+      console.log(this.isHasAccount)
+      if (!this.isHasAccount) {
+        where['hasAccount'] = 0;
+      }
       let data = await getUserPage({
         ...where,
         ...order,
         pageNum: page,
         size: limit,
-        groupId: this.organizationId,
-        hasAccount:0
-
+        groupId: this.organizationId
       });
 
       return data;