2 Commits de657a640b ... 3f05d9e536

Author SHA1 Message Date
  wenb 3f05d9e536 1 1 year ago
  wenb fbfdb6bcee 控制板修改 1 year ago
1 changed files with 17 additions and 3 deletions
  1. 17 3
      web/三相/src/views/sbwh/kzbsj/index.vue

+ 17 - 3
web/三相/src/views/sbwh/kzbsj/index.vue

@@ -15,8 +15,8 @@
 
     </el-form>
     <el-card style="min-height: 700px ;border-radius: 15px">
-    <el-table max-height="700" ref="multipleTable"  :data="channelList"  @selection-change="handleSelectionChange"  :header-cell-style="{ background:'#FFFFFF',color:'#000000'}">
-      <el-table-column type="selection" width="55" align="center" />
+    <el-table max-height="700" ref="multipleTable"  :data="channelList"  :row-key="rowKey" @selection-change="handleSelectionChange"  :header-cell-style="{ background:'#FFFFFF',color:'#000000'}">
+      <el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
       <el-table-column align="center" :label="this.$t('sbmc')" prop="productName"  />
       <el-table-column align="center" label="产品ID"   prop="productId"  />
       <el-table-column align="center" :label="this.$t('kzbh')" prop="productNumber"  />
@@ -161,9 +161,23 @@
       console.log(window.location.origin)
       this.usertoken= this.$store.state.user.usertoken;
     //  this.queryProductList();
-      this.handleQuery();
+     // this.handleQuery();
+    this.dataRefreh();
     },
     methods: {
+      rowKey (row) {
+        return row.productId;
+      },
+      dataRefreh(){
+        // 计时器为空,操作
+        setInterval(() => {
+          var  resultData=[{"productVersion":"V0.0.41","productId":"2024245-1","productChNumber":"33","productNumber":1,"upgradeDate":"2024.09.24","productName":"PDU","status":Math.random() < 0.5 ? 0 : 1},
+            {"productVersion":"V0.0.42","productId":"2024245-2","productChNumber":"33","productNumber":2,"upgradeDate":"2024.09.24","productName":"PDU","status":"4"},
+            {"productVersion":"V0.0.40","productId":"2024245-3","productChNumber":"33","productNumber":3,"upgradeDate":"2024.09.24","productName":"PDU","status":"1"}];
+        this.channelList = resultData;
+        console.log("执行成功")
+      }, 1000);
+      },
       //推送通道状态
       onSocketMessageToUpgrade(recvMessage) {
         if (recvMessage.success) {