1
lzhe
2024-04-21 8089d636a09c0e6a56b16db3aeb2d4aeb929030a
1
已修改1个文件
36 ■■■■ 文件已修改
src/views/mdc/realtime-status/index.vue 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/realtime-status/index.vue
@@ -17,7 +17,7 @@
                <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>
@@ -26,6 +26,9 @@
                  <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>
@@ -95,6 +98,8 @@
                devicestatus: [],
                timestatus: [],
                station: "状态视图",
                stationlabel: "",
                stationlabelList: [],
                current: "1",
                total: 0,
                deviceStatus: [],
@@ -103,10 +108,35 @@
        },
        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) {
@@ -130,10 +160,8 @@
                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;
                })