diff --git a/src/views/index.vue b/src/views/index.vue index 7983740..acc9088 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -50,8 +50,28 @@ +
- 管理 + + + +
@@ -79,7 +99,8 @@ export default { { name: '数据分析', router: 'dataAnalysis', index: 1, routerList: ['dataAnalysis'], img: require('../assets/image/header-img4.png') }, // { name: '设备菜单', router: '', routerList: [], img: require('../assets/image/header-img5.png') }, //systemManage systemManage - { name: '管理', router: 'manage', routerList: ['manage'], img: require('../assets/image/header-img6.png') }, + // manage + { name: '管理', router: '', routerList: ['manage'], img: require('../assets/image/header-img6.png') }, { name: '大数据', router: 'largeScreen', routerList: ['largeScreen'], img: require('../assets/image/header-img8.png') } ], @@ -92,7 +113,23 @@ export default { { name: '施肥机', routerList: ['formula', 'dataAnalysis', 'historyData', 'irrigateSet', 'videoMonitoring','imageData', 'PIDSet', 'systemSet', 'upload', 'sensorSet', 'realTime', 'history', 'dataAnalysis'], img: require('../assets/image/left-img2.png'), list: [] }, { name: '生态气象站', routerList: ['realTime', 'historyData', 'exitSettings', 'skylight', 'control', 'systemSet-con','imageData', 'fan', 'upload-con', 'sensorSet-con', 'synthesis-con', 'alarmSettings', 'waterPump', 'geothermalFan', 'uptake', 'downtake', 'rollByRoll', 'snowRemoval', "targetTemperature", "targetHumidity", "targetCo2", "sunroofControl", "outsizeSunshade", "insizeSunshade", "wetFan", "LED", 'electromagneticControl', "coercionMist", "circulationCan", "internalInsulation", "forceOutput", "intrinsicParameter", "parameterSet"], img: require('../assets/image/left-img3.png'), list: [] }, ], - + leftList1: [ + { name: '管理', img: require('../assets/image/index-icon.png'), list: [], router: 'manage', isRouter: true, }, + { name: '用户管理', routerList: [''], img: require('../assets/image/left-img0.png'), list: [ + {deviceTypeName:'控制器设备状态值设置',router:'',index:0}, + {deviceTypeName:'控制器设备设定值设置',router:'',index:1}, + {deviceTypeName:'设备信息管理',router:'',index:2}, + {deviceTypeName:'设备绑定气象站数据',router:'',index:3}, + {deviceTypeName:'大数据设备信息',router:'',index:4}, + {deviceTypeName:'手机控制模块信息',router:'',index:5}, + ] }, + { name: '管理员管理', routerList: [''], img: require('../assets/image/left-img0.png'), list: [ + {deviceTypeName:'用户信息管理',router:'',index:6}, + {deviceTypeName:'设备管理',router:'',index:7}, + {deviceTypeName:'摄像头信息管理',router:'',index:8}, + ] }, + ], + activeNames: [], routerNow: 'realTime', deviceName: 1, routerIndex: 1, @@ -443,6 +480,11 @@ export default { this.$message('当前页面正在努力开发中'); } }, + toRouter2(item){ + if (item.router != this.routerNow && !item.http) { + this.$router.push({ name: item.router }) + } + }, getTime() { this.time = getnowtime() const that = this diff --git a/src/views/manage/index.vue b/src/views/manage/index.vue index 1badf8b..0f51ef4 100644 --- a/src/views/manage/index.vue +++ b/src/views/manage/index.vue @@ -1,19 +1,23 @@ +
+ +
+ +export default { + // 当控制器整体页面关闭时 清楚控制器数据 + beforeDestroy() { + var store = this.$store.state; + // store.ControlData = null; + }, + data() { + return {}; + }, + mounted() {}, + methods: {}, +}; + + - - \ No newline at end of file diff --git a/src/views/page/videoMonitoring.vue b/src/views/page/videoMonitoring.vue index f8e5cb9..b7b0ae5 100644 --- a/src/views/page/videoMonitoring.vue +++ b/src/views/page/videoMonitoring.vue @@ -98,6 +98,26 @@ export default { that.dataInit(); + }, 0); + }, + '$store.state.equipmentIndex'(newVal, oldVal) { + const that = this; + const store = this.$store.state + this.indexs = newVal; + this.deviceTypeName = store.equipmentList[this.indexs - 1].deviceTypeName + this.deviceName = store.equipmentList[this.indexs - 1].deviceName + this.deviceState = store.equipmentList[this.indexs - 1].deviceState + clearInterval(this.statusInterval) && this.statusInterval + setTimeout(() => { + + if (this.player) { + this.player.stop() + that.player.destroy() + that.player = null + } + that.dataInit(); + + }, 0); }, },