diff --git a/src/components/common/Sidebar.vue b/src/components/common/Sidebar.vue index 36e2e95..cd36e91 100644 --- a/src/components/common/Sidebar.vue +++ b/src/components/common/Sidebar.vue @@ -69,11 +69,11 @@ export default { index: "/pictureRotation", title: "图片轮巡", }, - // { - // icon: "el-icon-bell", - // index: "photoAlarm", - // title: "告警处理", - // }, + { + icon: "el-icon-bell", + index: "photoAlarm", + title: "告警处理", + }, { icon: "el-icon-search", @@ -129,6 +129,73 @@ export default { ], }, ], + items2: [ + // { + // icon: "el-icon-s-home", + // index: "stritl", + // title: "首页", + // }, + { + icon: "el-icon-camera", + index: "/realTimeMonitor", + title: "实时监控", + }, + + { + icon: "el-icon-film", + index: "/pictureRotation", + title: "图片轮巡", + }, + // { + // icon: "el-icon-bell", + // index: "photoAlarm", + // title: "告警处理", + // }, + + { + icon: "el-icon-search", + index: "/realTimeSearch", + title: "历史图片", + }, + { + icon: "el-icon-files", + index: "/property", + title: "资产管理", + subs: [ + { + index: "/lineInformation", + title: "线路信息管理", + }, + { + index: "/towerInformation", + title: "杆塔信息管理", + }, + + { + index: "/cameraChannel", + title: "通道管理", + }, + { + index: "/photographicDevice", + title: "拍照装置管理", + }, + { + index: "/devicePhotoSchedule", + title: "拍照时间表设置", + }, + // { + // index: "/deviceUpgrade", + // title: "装置升级", + // }, + // { + // icon: "el-icon-picture-outline", + // index: "imageSettings", + // title: "图像采集参数设置", + // }, + ], + }, + ], + role: "", }; }, watch: { @@ -143,6 +210,16 @@ export default { }, created() { this.setCurrentRoute(); + this.role = localStorage.getItem("role"); + console.log("用户管理"); + console.log(this.role); + + if (this.role == 1) { + this.items = this.items; + } else { + this.items = this.items2; + } + console.log(this.items); }, }; diff --git a/src/main.js b/src/main.js index e635630..d0b018c 100644 --- a/src/main.js +++ b/src/main.js @@ -50,7 +50,7 @@ Viewer.setDefaults({ //使用钩子函数对路由进行权限跳转 router.beforeEach((to, from, next) => { document.title = `${to.meta.title} | 视频监控可视化平台`; - const role = localStorage.getItem("userName"); + const role = localStorage.getItem("role"); const token = localStorage.getItem("token"); console.log(role, token); if (!token && to.path !== "/login") { diff --git a/src/store/index.js b/src/store/index.js index 44e56ff..55102b3 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -8,15 +8,17 @@ export default new Vuex.Store({ //用户登录token 存储 token: "", userName: "", - userid:'', + userid: "", channelid: "", termid: "", + role: "", }, getters: { channelid: (state) => state.channelid, token: (state) => state.token, userName: (state) => state.userName, + role: (state) => state.role, }, mutations: { //保存通道id @@ -39,9 +41,11 @@ export default new Vuex.Store({ }, SET_USERINFO(state, val) { state.userName = val.userName; - state.userid = val.id + state.userid = val.id; + state.role = val.role; localStorage.setItem("userName", state.userName); localStorage.setItem("userid", state.userid); + localStorage.setItem("role", state.role); }, //退出清除locastorge REMOVE_INFO(state) { diff --git a/src/views/Login.vue b/src/views/Login.vue index 8b5192b..1e77da2 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -70,8 +70,8 @@ export default { data: function () { return { userInfo: { - userName: "admin", - password: "123456", + userName: "", + password: "", //verificationCode: "", }, rules: { diff --git a/src/views/components/carouselChart.vue b/src/views/components/carouselChart.vue index 9e781ff..337038c 100644 --- a/src/views/components/carouselChart.vue +++ b/src/views/components/carouselChart.vue @@ -29,7 +29,7 @@ class="showPic" @click="closePic" > -
+
@@ -190,9 +190,10 @@ export default { canvas: null, ctx: null, imgpic: null, - color: "#FF0000", + color: "#00ff00", num: 5, showBigpic: false, + flagline: true, }; }, mounted() { @@ -230,6 +231,11 @@ export default { closePic() { this.showBigpic = false; }, + openline() { + this.flagline = true; + console.log("11111111111111111111111111", this.flagline); + this.drawline(); + }, drawline() { this.canvas = this.$refs.myCanvas; this.imgpic = this.$refs.picJpg; @@ -239,6 +245,11 @@ export default { this.canvas.height = this.imgpic.offsetHeight; //设置画布大小 this.ctx = this.canvas.getContext("2d"); console.log(this.localPoints); + if (this.flagline == true) { + this.localPoints = this.localPoints; + } else { + this.localPoints = []; + } console.log(this.ctx); this.ctx.beginPath(); //设置线条颜色,必须放在绘制之前 @@ -262,6 +273,7 @@ export default { //不显示绘制线 handelClear() { this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); + this.flagline = false; }, getphotoList() { this.fiveList = this.terminalPhoto.slice( diff --git a/src/views/devicePhotoSchedule/components/setdevice.vue b/src/views/devicePhotoSchedule/components/setdevice.vue index 71f975c..3cdd019 100644 --- a/src/views/devicePhotoSchedule/components/setdevice.vue +++ b/src/views/devicePhotoSchedule/components/setdevice.vue @@ -65,13 +65,14 @@ :max="9" >
- +
+ + 下发中 + +
{{ data.name }} @@ -146,6 +147,7 @@ export default { termzzid: [], flag: false, sureloading: false, + showtag: false, }; }, mounted() {}, @@ -218,6 +220,7 @@ export default { submitForm() { //console.log(this.termidArr); this.sureSum(); + this.showtag = true; }, //时间表 sureSum() { @@ -280,6 +283,7 @@ export default { this.timer = null; this.isShow = false; this.sureloading = false; + this.showtag = false; } else if (this.i > 9) { this.zzerror = true; this.i = 0; @@ -287,6 +291,7 @@ export default { clearInterval(this.timer); this.timer = null; this.isShow = false; + this.showtag = false; this.sureloading = false; } }) @@ -303,6 +308,7 @@ export default { clearTimeout(this.timer); this.timer = null; this.sureloading = false; + this.showtag = false; }, }, }; diff --git a/src/views/deviceUpgrade/index.vue b/src/views/deviceUpgrade/index.vue index 12ddabd..ed4648c 100644 --- a/src/views/deviceUpgrade/index.vue +++ b/src/views/deviceUpgrade/index.vue @@ -29,9 +29,9 @@ diff --git a/src/views/management/monitoringEquipment/photographicDevice/components/pictureTags.vue b/src/views/management/monitoringEquipment/photographicDevice/components/pictureTags.vue index 5b4ec4b..0d7c0b0 100644 --- a/src/views/management/monitoringEquipment/photographicDevice/components/pictureTags.vue +++ b/src/views/management/monitoringEquipment/photographicDevice/components/pictureTags.vue @@ -93,7 +93,7 @@ export default { ctx: null, imgpic: null, drawingSurfaceImageData: "", - color: "#FF0000", + color: "#00ff00", num: 5, flag: false, x: 0, diff --git a/src/views/realTimeMonitor/index.vue b/src/views/realTimeMonitor/index.vue index 41df415..b47bb46 100644 --- a/src/views/realTimeMonitor/index.vue +++ b/src/views/realTimeMonitor/index.vue @@ -93,35 +93,11 @@ > -

操作项

- - 主动拍照 @@ -149,12 +125,6 @@ - - 装置信息 @@ -545,7 +515,7 @@ export default { handleCommandLine(command) { switch (command) { case "open": //开启 - this.$refs.carouselpic.drawline(); + this.$refs.carouselpic.openline(); break; case "close": //关闭 this.$refs.carouselpic.handelClear();