pull/142/head
parent
912b5821c1
commit
a291cac6a0
|
@ -50,8 +50,28 @@
|
|||
|
||||
</el-collapse>
|
||||
</div>
|
||||
<!-- 管理的左侧 -->
|
||||
<div class="left collapse" v-else>
|
||||
管理
|
||||
<el-collapse v-model="activeNames">
|
||||
<template v-for="item, index in leftList1">
|
||||
<el-collapse-item :name="index + 1" :key="index" v-if="!item.isRouter">
|
||||
<template slot="title" class="collapse-title">
|
||||
<div class="img"><img :src="item.img" alt=""></div> {{ item.name }}
|
||||
</template>
|
||||
<ul class="table-ul">
|
||||
<li class="table-li" @click="toRouter2(item1)"
|
||||
:class="routerNow == item1.router? 'active' : ''"
|
||||
v-for="item1, index1 in item.list" :key="index1">{{ item1.deviceTypeName }}
|
||||
</li>
|
||||
</ul>
|
||||
</el-collapse-item>
|
||||
<div @click="toRouter2(item)" :class="routerNow == item.router ? 'active' : ''" class="no-list"
|
||||
v-else>
|
||||
<div class="img"><img :src="item.img" alt=""></div>{{ item.name }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</el-collapse>
|
||||
</div>
|
||||
<div class="right">
|
||||
<router-view v-if="!loading"></router-view>
|
||||
|
@ -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
|
||||
|
|
|
@ -1,19 +1,23 @@
|
|||
<template>
|
||||
<div class="manage-index">
|
||||
管理
|
||||
</div>
|
||||
</template>
|
||||
<div class="manage-index">
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data(){
|
||||
return {}
|
||||
},
|
||||
mounted(){},
|
||||
methods:{},
|
||||
|
||||
}
|
||||
</script>
|
||||
export default {
|
||||
// 当控制器整体页面关闭时 清楚控制器数据
|
||||
beforeDestroy() {
|
||||
var store = this.$store.state;
|
||||
// store.ControlData = null;
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
</style>
|
||||
|
||||
</style>
|
||||
|
|
@ -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);
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue