| | |
| | | <span class="setBtn" @click="goSet">设置</span> |
| | | </span> |
| | | </div> |
| | | <ul class="status-view-box"> |
| | | <ul class="status-view-box" v-if="station == '状态视图'"> |
| | | <li v-for="(item,index) in devicestatus" @click="searchstatus(item,index)" :class="{'active': item.active}"> |
| | | <el-icon :style="{'color': item.color}"> |
| | | <component :is='item.icon'></component> |
| | |
| | | <span class="view-box-num">{{item.deviceNum}}</span> |
| | | </li> |
| | | </ul> |
| | | <el-radio-group v-model="stationlabel" @change="changestationlabel" v-if="station == '标签视图'" style="margin-top:8px;"> |
| | | <el-radio-button v-for="item in stationlabelList" :label="item.groupName" :value="item.groupId" /> |
| | | </el-radio-group> |
| | | <div class="status-content-cardBox"> |
| | | <div class="status-prev" @click="prev"> |
| | | <el-icon><ArrowLeft /></el-icon> |
| | |
| | | devicestatus: [], |
| | | timestatus: [], |
| | | station: "状态视图", |
| | | stationlabel: "", |
| | | stationlabelList: [], |
| | | current: "1", |
| | | total: 0, |
| | | deviceStatus: [], |
| | |
| | | }, |
| | | mounted() { |
| | | this.getdevicestatus(); //获取顶部title |
| | | this.getstationlabelList(); //获取标签视图下的list |
| | | }, |
| | | methods: { |
| | | changestationlabel(name) { |
| | | this.stationlabel = name; |
| | | this.stationlabelList.forEach(item=> { |
| | | if(item.groupName == name) { |
| | | this.workStationGroupIdList = [item.groupId]; |
| | | } |
| | | }) |
| | | this.gettimestatus(); //查询列表 |
| | | }, |
| | | getstationlabelList() { |
| | | this.$HTTP.get("/api/blade-cps/group/get-mdc-group").then(res=> { |
| | | if(res.code == 200) { |
| | | this.stationlabelList = res.data; |
| | | this.stationlabel = res.data[0].groupName; |
| | | } |
| | | }) |
| | | }, |
| | | changestatus(name) { |
| | | console.log(name) |
| | | this.station = name; |
| | | if(this.station == '状态视图') { |
| | | this.workStationGroupIdList = []; |
| | | }else { |
| | | this.stationlabel = this.stationlabelList[0].groupName; |
| | | this.workStationGroupIdList = [this.stationlabelList[0].groupId]; |
| | | } |
| | | this.gettimestatus(); //查询列表 |
| | | }, |
| | | showvisible(item) { |
| | | if(item.properties == null) { |
| | |
| | | this.titleMap = "实时数据(" + item.code + ")"; |
| | | this.visibleList = visibleList; |
| | | this.visible = true; |
| | | console.log(this.visibleList) |
| | | }, |
| | | searchstatus(item,index) { |
| | | console.log(item) |
| | | this.devicestatus.forEach(item=> { |
| | | item.active = false; |
| | | }) |