修改部门管理

This commit is contained in:
qq787203167
2022-03-04 14:50:16 +08:00
parent 7aad4be6dd
commit 14f52b64c8
@@ -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);
}