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); }