添加关闭

master
fanluyan 2 years ago
parent 714d1e8472
commit 94c09ee072

@ -22,7 +22,7 @@
</el-dropdown> </el-dropdown>
</div> </div>
</div> </div>
<password-dialog ref="passwordref" ></password-dialog> <password-dialog ref="passwordref"></password-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -35,7 +35,7 @@ export default {
}, },
data() { data() {
return { return {
userName: localStorage.getItem('userName') userName: localStorage.getItem("userName"),
}; };
}, },
methods: { methods: {
@ -46,10 +46,14 @@ export default {
console.log(command); console.log(command);
break; break;
case "changePwd": // case "changePwd": //
this.$refs.passwordref.display() this.$refs.passwordref.display();
break; break;
case "loginout": //退 case "loginout": //退
this.$message.success("退出成功"); this.$message({
showClose: true,
message: "退出成功",
type: "success",
});
this.$store.commit("REMOVE_INFO"); this.$store.commit("REMOVE_INFO");
this.$router.push("/login"); this.$router.push("/login");
break; break;

@ -109,7 +109,12 @@ export default {
this.$store.commit("SET_TOKEN", res.data.sessionId); //tokenvuex this.$store.commit("SET_TOKEN", res.data.sessionId); //tokenvuex
this.$store.commit("SET_USERINFO", res.data); //vuex this.$store.commit("SET_USERINFO", res.data); //vuex
this.$router.push("/realTimeMonitor"); this.$router.push("/realTimeMonitor");
this.$message.success("登录成功");
this.$message({
showClose: true,
message: "登录成功",
type: "success",
});
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
} }

@ -156,10 +156,18 @@ export default {
deleteChannelapi({ list: deleteArr }).then((res) => { deleteChannelapi({ list: deleteArr }).then((res) => {
this.deviceList(); // this.deviceList(); //
}); });
this.$message({ type: "success", message: "删除成功!" }); this.$message({
showClose: true,
type: "success",
message: "删除成功!",
});
}) })
.catch(() => { .catch(() => {
this.$message({ type: "info", message: "已取消删除" }); this.$message({
showClose: true,
type: "info",
message: "已取消删除",
});
}); });
}, },
// //

@ -193,10 +193,18 @@ export default {
deleteScheduleRulel({ list: deleteArr }).then((res) => { deleteScheduleRulel({ list: deleteArr }).then((res) => {
this.deviceList(); // this.deviceList(); //
}); });
this.$message({ type: "success", message: "删除成功!" }); this.$message({
showClose: true,
type: "success",
message: "删除成功!",
});
}) })
.catch(() => { .catch(() => {
this.$message({ type: "info", message: "已取消删除" }); this.$message({
showClose: true,
type: "info",
message: "已取消删除",
});
}); });
}, },
// //

@ -324,6 +324,7 @@ export default {
this.$message({ this.$message({
type: "success", type: "success",
message: "绘制保存成功", message: "绘制保存成功",
showClose: true,
}); });
}) })
.catch((err) => {}); .catch((err) => {});

@ -335,15 +335,24 @@ export default {
resetTerminalApi({ cmId: data.cmdid }) resetTerminalApi({ cmId: data.cmdid })
.then((res) => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.$message({ message: "装置已复位", type: "success" }); this.$message({
showClose: true,
message: "装置已复位",
type: "success",
});
} else { } else {
this.$message({ message: res.msg, type: "error" }); this.$message({
showClose: true,
message: res.msg,
type: "error",
});
} }
}) })
.catch((err) => {}); .catch((err) => {});
}) })
.catch(() => { .catch(() => {
this.$message({ this.$message({
showClose: true,
type: "info", type: "info",
message: "已取消删除", message: "已取消删除",
}); });
@ -386,6 +395,7 @@ export default {
this.$message({ this.$message({
message: "成功开启GPS", message: "成功开启GPS",
type: "success", type: "success",
showClose: true,
}); });
} }
}) })
@ -454,12 +464,14 @@ export default {
this.$message({ this.$message({
type: "success", type: "success",
message: "删除成功!", message: "删除成功!",
showClose: true,
}); });
}) })
.catch(() => { .catch(() => {
this.$message({ this.$message({
type: "info", type: "info",
message: "已取消删除", message: "已取消删除",
showClose: true,
}); });
}); });
}, },

@ -173,10 +173,18 @@ export default {
deleteLineJoggle({ list: deleteArr }).then((res) => { deleteLineJoggle({ list: deleteArr }).then((res) => {
this.lineList(); // this.lineList(); //
}); });
this.$message({ type: "success", message: "删除成功!" }); this.$message({
showClose: true,
type: "success",
message: "删除成功!",
});
}) })
.catch(() => { .catch(() => {
this.$message({ type: "info", message: "已取消删除" }); this.$message({
showClose: true,
type: "info",
message: "已取消删除",
});
}); });
}, },
// //

@ -160,10 +160,18 @@ export default {
delTowerApi({ list: deleteArr }).then((res) => { delTowerApi({ list: deleteArr }).then((res) => {
this.deviceList(); // this.deviceList(); //
}); });
this.$message({ type: "success", message: "删除成功!" }); this.$message({
showClose: true,
type: "success",
message: "删除成功!",
});
}) })
.catch(() => { .catch(() => {
this.$message({ type: "info", message: "已取消删除" }); this.$message({
showClose: true,
type: "info",
message: "已取消删除",
});
}); });
}, },
// //

@ -294,6 +294,7 @@ export default {
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
this.$message({ this.$message({
showClose: true,
message: "时间表查询无响应,请稍后再试!", message: "时间表查询无响应,请稍后再试!",
type: "warning", type: "warning",
}); });

@ -493,11 +493,13 @@ export default {
if (res.code == 200) { if (res.code == 200) {
if (val == 1) { if (val == 1) {
this.$message({ this.$message({
showClose: true,
message: "声光报警开启成功", message: "声光报警开启成功",
type: "success", type: "success",
}); });
} else { } else {
this.$message({ this.$message({
showClose: true,
message: "声光报警关闭成功", message: "声光报警关闭成功",
type: "success", type: "success",
}); });
@ -506,6 +508,7 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.$message({ this.$message({
showClose: true,
message: "声光报警操作失败", message: "声光报警操作失败",
type: "error", type: "error",
}); });
@ -524,6 +527,7 @@ export default {
}, },
handleShowErr() { handleShowErr() {
this.$message({ this.$message({
showClose: true,
message: "该功能暂未开发,敬请期待", message: "该功能暂未开发,敬请期待",
type: "warning", type: "warning",
}); });
@ -541,6 +545,7 @@ export default {
}) })
.then((res) => { .then((res) => {
this.$message({ this.$message({
showClose: true,
message: "手动拍照请求成功!", message: "手动拍照请求成功!",
type: "success", type: "success",
}); });
@ -570,6 +575,7 @@ export default {
}) })
.then((res) => { .then((res) => {
this.$message({ this.$message({
showClose: true,
message: "手动拍视频请求成功!", message: "手动拍视频请求成功!",
type: "success", type: "success",
}); });
@ -642,6 +648,7 @@ export default {
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
this.$message({ this.$message({
showClose: true,
message: "装置暂无响应,请稍后再试!", message: "装置暂无响应,请稍后再试!",
type: "warning", type: "warning",
}); });

@ -20,20 +20,38 @@
> >
<!-- <el-table-column type="index" width="55"> </el-table-column> <!-- <el-table-column type="index" width="55"> </el-table-column>
<el-table-column type="selection" width="55"> </el-table-column> --> <el-table-column type="selection" width="55"> </el-table-column> -->
<el-table-column label="用户名" show-overflow-tooltip prop="userName" ></el-table-column> <el-table-column
<el-table-column label="角色" show-overflow-tooltip prop="role" > label="用户名"
<template slot-scope="scope">{{ scope.row.role == 1 ? '管理员' : '用户' }}</template> show-overflow-tooltip
prop="userName"
></el-table-column>
<el-table-column label="角色" show-overflow-tooltip prop="role">
<template slot-scope="scope">{{
scope.row.role == 1 ? "管理员" : "用户"
}}</template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" show-overflow-tooltip prop="createTime" > <el-table-column
<template slot-scope="scope">{{ $moment(scope.row.createTime).format("yy-MM-DD HH:mm:ss") }}</template> label="创建时间"
show-overflow-tooltip
prop="createTime"
>
<template slot-scope="scope">{{
$moment(scope.row.createTime).format("yy-MM-DD HH:mm:ss")
}}</template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" label="操作" width="200"> <el-table-column fixed="right" label="操作" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@click.native.stop="handleResive(scope.row)" @click.native.stop="handleResive(scope.row)"
type="text" type="text"
>修改</el-button> >修改</el-button
<el-button type="text" class="deleteText" @click.native.stop="handleDelete(scope.row)" >删除</el-button> >
<el-button
type="text"
class="deleteText"
@click.native.stop="handleDelete(scope.row)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -61,7 +79,7 @@ import { getUserList, delUserApi } from "@/utils/api/index";
export default { export default {
components: { components: {
addUser addUser,
}, },
data() { data() {
return { return {
@ -130,7 +148,11 @@ export default {
}); });
}) })
.catch(() => { .catch(() => {
this.$message({ type: "info", message: "已取消删除" }); this.$message({
showClose: true,
type: "info",
message: "已取消删除",
});
}); });
}, },
// //

Loading…
Cancel
Save