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

权限管理fixed

parent 87d45eb5
......@@ -85,14 +85,22 @@ export default {
})
.then(({ data }) => {
// console.log(data);
if (data.success == 1) {
this.$message({
message: `已删除${this.deleteItem.department_name}.`,
type: "success",
});
this.deleteItem = null;
this.initDatas(this.tempFilter);
} else {
this.$message({
message: `删除${this.deleteItem.department_name}失败`,
type: "warning",
});
}
})
.catch((error) => {
console.log(error);
this.$message({
message: `删除${this.deleteItem.department_name}失败`,
type: "warning",
......
......@@ -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}`
)
.then((response) => {
console.log(response);
// console.log(response);
let data = response.data.data;
this.listTotal = response.data.total;
this.datas = data;
var _this = this
setTimeout(()=>{
var _this = this;
setTimeout(() => {
this.header_arr = [
{
prop: "user_name",
label: "账号",
minWidth: "25%",
align: "left",
type: "button",
callback(item) {
_this.$router.push(`/authority/users/detail/${item.user_id}`);
},
},
{
prop: "system_name",
......@@ -178,7 +182,7 @@ export default {
minWidth: "25%",
align: "center",
getText(item) {
return _this.admin_arr[item.is_admin||0];
return _this.admin_arr[item.is_admin || 0];
},
},
{
......@@ -201,9 +205,11 @@ export default {
],
},
];
});
})
})
.catch((response) => {});
.catch((error) => {
console.log(error);
});
},
adelete(val) {
this.tipsOptions = {
......@@ -213,7 +219,7 @@ export default {
btnCancelText: "",
position: "",
};
this.tipsOptions.message = "是否删除该数据";
this.tipsOptions.message = "是否移除该用户?";
this.tipsOptions.confirmSubmit = () => {
console.log("deleteItem - " + JSON.stringify(val));
this.delete_data(val);
......@@ -226,11 +232,26 @@ export default {
.post(`/apaas/backmgt/user/delete`, {
id: [val.user_id],
})
.then((response) => {
console.log(response);
this.get_list()
.then(({ data }) => {
if (data.success == 1) {
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