From 14f52b64c8d473af51e28baa969c5a79d80527fc Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Fri, 4 Mar 2022 14:50:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E9=97=A8=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/system/modules/DeptUserInfo.vue | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/jero-web/src/views/system/modules/DeptUserInfo.vue b/jero-web/src/views/system/modules/DeptUserInfo.vue index 5fe935b5e..4b8a46f6b 100644 --- a/jero-web/src/views/system/modules/DeptUserInfo.vue +++ b/jero-web/src/views/system/modules/DeptUserInfo.vue @@ -154,6 +154,7 @@ deleteBatch: "/sys/user/deleteUserInDepartBatch", }, loading:false, + dataSource:[], } }, created() { @@ -162,9 +163,10 @@ methods: { searchReset() { this.queryParam = {} - this.loadData(1); + this.loadDataIndex(1); }, - loadData(arg) { + loadData(){}, + loadDataIndex(arg) { if (!this.url.list) { this.$message.error(this.$t('setURLListAttribute')) return @@ -180,8 +182,10 @@ getAction(this.url.list, params).then((res) => { this.loading = false if (res.success && res.result) { - this.dataSource = res.result.records; + this.dataSource = res.result.records || []; this.ipagination.total = res.result.total; + }else{ + this.dataSource = [] } }) }, @@ -213,7 +217,7 @@ deleteAction(that.url.deleteBatch, {depId: that.currentDeptId, userIds: ids}).then((res) => { if (res.success) { that.$message.success(this.$t('SuccessfullyDeleted')); - that.loadData(); + that.loadDataIndex(); that.onClearSelected(); } else { that.$message.warning(res.message); @@ -245,7 +249,7 @@ } } } - that.loadData(); + that.loadDataIndex(); } else { that.$message.warning(res.message); } @@ -254,7 +258,7 @@ open(record) { this.currentDeptId = record.id; this.currentDept = record; - this.loadData(1); + this.loadDataIndex(1); }, clearList() { this.currentDeptId = ''; @@ -305,7 +309,7 @@ postAction(this.url.edit, params).then((res) => { if (res.success) { this.$message.success(res.message); - this.loadData(); + this.loadDataIndex(); } else { this.$message.warning(res.message); }