feat: 切换设备后如果只有一个通道自动切到单通道;如果没有配置plc也要展示骨架屏
1个文件已修改
16 ■■■■■ 已修改文件
src/views/visualization.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/visualization.vue
@@ -1289,7 +1289,12 @@
          }
          this.getProcessModelList();
          this.getStartArr()
          if(this.ChannelAmount===1){
            this.cutClick(1)
          }else{
          this.cutClick(val?val:1)
          }
          if(info=='new'){
            return true;
          }
@@ -1300,6 +1305,11 @@
                  this.getProgressInfo();
                }, 3000);
              }
        }else{
          const allChannels = [0,1];
          allChannels.forEach(channel => this.TasksCopy.push(this.newTaskPlaceholder(channel)))
          this.TasksCopy.sort((a,b)=>a.Channel - b.Channel)
          this.cutClick(1)
        }
        // if (res.code != 200 || this.TasksCopy.length == 0) {
        //   this.getcountdown();
@@ -1311,6 +1321,12 @@
        //   }
        // }
      },err=>{
        console.error(err)
        const allChannels = [0,1];
        allChannels.forEach(channel => this.TasksCopy.push(this.newTaskPlaceholder(channel)))
        this.TasksCopy.sort((a,b)=>a.Channel - b.Channel)
        this.cutClick(1)
      });
      // this.TasksCopy.push(this.object)
      // this.TasksCopy.push(this.object)