role1.0
fanluyan 1 year ago
parent d96eb977eb
commit a642779d14

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

@ -222,9 +222,7 @@ export default {
//
handleDelete(data) {
let deleteArr = [];
deleteArr.push({
id: data.id,
});
deleteArr.push(data.id);
this.$confirm("确定要删除记录吗,同时删除关联关系?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -232,7 +230,22 @@ export default {
})
.then(() => {
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({
duration: 1500,

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

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

Loading…
Cancel
Save