yangys
2025-11-04 1ca3f1a1b91ddd07e1d69e046c7a4b62fa6634c4
src/views/mdc/realtime-status/index.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-04-09 22:11:21
 * @LastEditors: 李喆(开发组) lzhe@yxqiche.com
 * @LastEditTime: 2025-05-22 15:38:20
 * @LastEditTime: 2025-05-28 13:45:33
 * @FilePath: /cps-web/src/views/mdc/realtime-status/index.vue
 实时看板
-->
@@ -212,6 +212,7 @@
         this.gettimestatus();
      },
      next() {
         if ((this.current * this.line) < this.total / this.column) {
            this.current = Number(this.current) + 1;
            this.gettimestatus();
@@ -292,6 +293,7 @@
                        if (eventData.data.DeviceStatus) {
                           var time = moment(eventData.data.DeviceStatus.t).format('YYYY-MM-DD HH:mm:ss');
                           var preT = moment(eventData.data.DeviceStatus.preT).format('YYYY-MM-DD HH:mm:ss');
                           //console.log('time='+time+",preT="+preT);
                           var diffTime = that.changeTime(time,preT);  //转换成差值(时分秒)
                           var diffTime = diffTime;
                           item.time = diffTime;
@@ -324,8 +326,12 @@
                           } else {
                              if(eventData.data[item1.key]) {
                                 if(item1.key == "Alarm") {
                                    var vJson = JSON.parse(eventData.data[item1.key].v);
                                    item1.code = JSON.stringify(vJson[0]);
                                    try {
                                      var vJson = JSON.parse(eventData.data[item1.key].v);
                                      item1.code = JSON.stringify(vJson[0]);
                                    } catch (e) {
                                      item1.code = eventData.data[item1.key].v;
                                    }
                                 }else {
                                    item1.code = eventData.data[item1.key].v;
                                 }