Commit 56464e59 authored by 徐一鸣's avatar 徐一鸣

权限管理fixed

parent 87d45eb5
...@@ -85,14 +85,22 @@ export default { ...@@ -85,14 +85,22 @@ export default {
}) })
.then(({ data }) => { .then(({ data }) => {
// console.log(data); // console.log(data);
if (data.success == 1) {
this.$message({ this.$message({
message: `已删除${this.deleteItem.department_name}.`, message: `已删除${this.deleteItem.department_name}.`,
type: "success", type: "success",
}); });
this.deleteItem = null; this.deleteItem = null;
this.initDatas(this.tempFilter); this.initDatas(this.tempFilter);
} else {
this.$message({
message: `删除${this.deleteItem.department_name}失败`,
type: "warning",
});
}
}) })
.catch((error) => { .catch((error) => {
console.log(error);
this.$message({ this.$message({
message: `删除${this.deleteItem.department_name}失败`, message: `删除${this.deleteItem.department_name}失败`,
type: "warning", type: "warning",
......
...@@ -153,18 +153,22 @@ export default { ...@@ -153,18 +153,22 @@ export default {
`/apaas/backmgt/user/list?limit=${this.pageSize}&page=${this.currentPage}&department_id=${this.$route.params.id}&search=${this.input}` `/apaas/backmgt/user/list?limit=${this.pageSize}&page=${this.currentPage}&department_id=${this.$route.params.id}&search=${this.input}`
) )
.then((response) => { .then((response) => {
console.log(response); // console.log(response);
let data = response.data.data; let data = response.data.data;
this.listTotal = response.data.total; this.listTotal = response.data.total;
this.datas = data; this.datas = data;
var _this = this var _this = this;
setTimeout(()=>{ setTimeout(() => {
this.header_arr = [ this.header_arr = [
{ {
prop: "user_name", prop: "user_name",
label: "账号", label: "账号",
minWidth: "25%", minWidth: "25%",
align: "left", align: "left",
type: "button",
callback(item) {
_this.$router.push(`/authority/users/detail/${item.user_id}`);
},
}, },
{ {
prop: "system_name", prop: "system_name",
...@@ -178,7 +182,7 @@ export default { ...@@ -178,7 +182,7 @@ export default {
minWidth: "25%", minWidth: "25%",
align: "center", align: "center",
getText(item) { getText(item) {
return _this.admin_arr[item.is_admin||0]; return _this.admin_arr[item.is_admin || 0];
}, },
}, },
{ {
...@@ -201,9 +205,11 @@ export default { ...@@ -201,9 +205,11 @@ export default {
], ],
}, },
]; ];
});
}) })
}) .catch((error) => {
.catch((response) => {}); console.log(error);
});
}, },
adelete(val) { adelete(val) {
this.tipsOptions = { this.tipsOptions = {
...@@ -213,7 +219,7 @@ export default { ...@@ -213,7 +219,7 @@ export default {
btnCancelText: "", btnCancelText: "",
position: "", position: "",
}; };
this.tipsOptions.message = "是否删除该数据"; this.tipsOptions.message = "是否移除该用户?";
this.tipsOptions.confirmSubmit = () => { this.tipsOptions.confirmSubmit = () => {
console.log("deleteItem - " + JSON.stringify(val)); console.log("deleteItem - " + JSON.stringify(val));
this.delete_data(val); this.delete_data(val);
...@@ -226,11 +232,26 @@ export default { ...@@ -226,11 +232,26 @@ export default {
.post(`/apaas/backmgt/user/delete`, { .post(`/apaas/backmgt/user/delete`, {
id: [val.user_id], id: [val.user_id],
}) })
.then((response) => { .then(({ data }) => {
console.log(response); if (data.success == 1) {
this.get_list() this.$message({
message: `删除${val.user_name}成功`,
type: "success",
});
this.get_list();
} else {
this.$message({
message: `删除${val.user_name}失败`,
type: "warning",
});
}
}) })
.catch((response) => {}); .catch((error) => {
this.$message({
message: `删除${val.user_name}失败`,
type: "warning",
});
});
}, },
}, },
}; };
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment