role1.0
fanluyan 1 year ago
parent d96eb977eb
commit a642779d14

@ -310,7 +310,7 @@ export default {
this.items = this.items; this.items = this.items;
} else if (this.role == 1) { } else if (this.role == 1) {
this.items = this.items1; this.items = this.items1;
} else if (this.role == 2) { } else if (this.role !== 0 && this.role !== 1) {
this.items = this.items2; this.items = this.items2;
} else if (this.role == 4) { } else if (this.role == 4) {
this.items = this.hnjcitems; this.items = this.hnjcitems;

@ -222,9 +222,7 @@ export default {
// //
handleDelete(data) { handleDelete(data) {
let deleteArr = []; let deleteArr = [];
deleteArr.push({ deleteArr.push(data.id);
id: data.id,
});
this.$confirm("确定要删除记录吗,同时删除关联关系?", "提示", { this.$confirm("确定要删除记录吗,同时删除关联关系?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
@ -232,7 +230,22 @@ export default {
}) })
.then(() => { .then(() => {
deleteLineJoggle({ list: deleteArr }).then((res) => { deleteLineJoggle({ list: deleteArr }).then((res) => {
this.lineList(); // if (res.code == 200) {
this.$message({
duration: 1500,
showClose: true,
type: "success",
message: "删除成功!",
});
this.lineList(); //
} else {
this.$message({
duration: 1500,
showClose: true,
type: "error",
message: "删除失败!",
});
}
}); });
this.$message({ this.$message({
duration: 1500, duration: 1500,

@ -32,9 +32,12 @@
<template slot-scope="scope">{{ scope.row.roleName }}</template> <template slot-scope="scope">{{ scope.row.roleName }}</template>
</el-table-column> --> </el-table-column> -->
<el-table-column label="角色" show-overflow-tooltip prop="role"> <el-table-column label="角色" show-overflow-tooltip prop="role">
<template slot-scope="scope">{{ <template slot-scope="scope">
scope.row.role == 1 ? "管理员" : "用户" <span v-if="scope.row.role == 0"></span>
}}</template> <span v-else-if="scope.row.role == 1">管理员</span>
<span v-else-if="scope.row.role == 2">用户</span>
<span v-else>{{ scope.row.role }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="创建时间" label="创建时间"

@ -308,9 +308,8 @@ export default {
// //
handleDelete(data) { handleDelete(data) {
let deleteArr = []; let deleteArr = [];
deleteArr.push({ deleteArr.push(data.id);
id: data.id, console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaa", deleteArr);
});
this.$confirm("确定要删除记录吗,同时删除关联关系?", "提示", { this.$confirm("确定要删除记录吗,同时删除关联关系?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
@ -318,13 +317,22 @@ export default {
}) })
.then(() => { .then(() => {
delTowerApi({ list: deleteArr }).then((res) => { delTowerApi({ list: deleteArr }).then((res) => {
this.deviceList(); // if (res.code == 200) {
}); this.$message({
this.$message({ duration: 1500,
duration: 1500, showClose: true,
showClose: true, type: "success",
type: "success", message: "删除成功!",
message: "删除成功!", });
this.deviceList(); //
} else {
this.$message({
duration: 1500,
showClose: true,
type: "error",
message: "删除失败!",
});
}
}); });
}) })
.catch(() => { .catch(() => {

Loading…
Cancel
Save