修改部门管理
This commit is contained in:
@@ -154,6 +154,7 @@
|
|||||||
deleteBatch: "/sys/user/deleteUserInDepartBatch",
|
deleteBatch: "/sys/user/deleteUserInDepartBatch",
|
||||||
},
|
},
|
||||||
loading:false,
|
loading:false,
|
||||||
|
dataSource:[],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -162,9 +163,10 @@
|
|||||||
methods: {
|
methods: {
|
||||||
searchReset() {
|
searchReset() {
|
||||||
this.queryParam = {}
|
this.queryParam = {}
|
||||||
this.loadData(1);
|
this.loadDataIndex(1);
|
||||||
},
|
},
|
||||||
loadData(arg) {
|
loadData(){},
|
||||||
|
loadDataIndex(arg) {
|
||||||
if (!this.url.list) {
|
if (!this.url.list) {
|
||||||
this.$message.error(this.$t('setURLListAttribute'))
|
this.$message.error(this.$t('setURLListAttribute'))
|
||||||
return
|
return
|
||||||
@@ -180,8 +182,10 @@
|
|||||||
getAction(this.url.list, params).then((res) => {
|
getAction(this.url.list, params).then((res) => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
if (res.success && res.result) {
|
if (res.success && res.result) {
|
||||||
this.dataSource = res.result.records;
|
this.dataSource = res.result.records || [];
|
||||||
this.ipagination.total = res.result.total;
|
this.ipagination.total = res.result.total;
|
||||||
|
}else{
|
||||||
|
this.dataSource = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -213,7 +217,7 @@
|
|||||||
deleteAction(that.url.deleteBatch, {depId: that.currentDeptId, userIds: ids}).then((res) => {
|
deleteAction(that.url.deleteBatch, {depId: that.currentDeptId, userIds: ids}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.$message.success(this.$t('SuccessfullyDeleted'));
|
that.$message.success(this.$t('SuccessfullyDeleted'));
|
||||||
that.loadData();
|
that.loadDataIndex();
|
||||||
that.onClearSelected();
|
that.onClearSelected();
|
||||||
} else {
|
} else {
|
||||||
that.$message.warning(res.message);
|
that.$message.warning(res.message);
|
||||||
@@ -245,7 +249,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
that.loadData();
|
that.loadDataIndex();
|
||||||
} else {
|
} else {
|
||||||
that.$message.warning(res.message);
|
that.$message.warning(res.message);
|
||||||
}
|
}
|
||||||
@@ -254,7 +258,7 @@
|
|||||||
open(record) {
|
open(record) {
|
||||||
this.currentDeptId = record.id;
|
this.currentDeptId = record.id;
|
||||||
this.currentDept = record;
|
this.currentDept = record;
|
||||||
this.loadData(1);
|
this.loadDataIndex(1);
|
||||||
},
|
},
|
||||||
clearList() {
|
clearList() {
|
||||||
this.currentDeptId = '';
|
this.currentDeptId = '';
|
||||||
@@ -305,7 +309,7 @@
|
|||||||
postAction(this.url.edit, params).then((res) => {
|
postAction(this.url.edit, params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message);
|
this.$message.success(res.message);
|
||||||
this.loadData();
|
this.loadDataIndex();
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message);
|
this.$message.warning(res.message);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user