From 5cbba170e270e6f1c99a91e27dbb7951a27d596a Mon Sep 17 00:00:00 2001
From: “linengliang” <vanSuperEnergy@163.com>
Date: 星期五, 24 十一月 2023 16:41:32 +0800
Subject: [PATCH] 故障报修验收

---
 src/views/mdc/base/modules/deviceLog/LogList.vue |   45 ++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 42 insertions(+), 3 deletions(-)

diff --git a/src/views/mdc/base/modules/deviceLog/LogList.vue b/src/views/mdc/base/modules/deviceLog/LogList.vue
index d58caea..440c9af 100644
--- a/src/views/mdc/base/modules/deviceLog/LogList.vue
+++ b/src/views/mdc/base/modules/deviceLog/LogList.vue
@@ -3,7 +3,7 @@
     <!-- table鍖哄煙-begin -->
     <div class="table_logList">
       <a-table ref="table" bordered size="middle" :rowKey="(record,index)=>{return index}" :columns="columns"
-               :dataSource="dataList" :pagination="ipagination" :loading="loadingequip"  @change="handleTableChange">
+               :dataSource="dataList" :pagination="ipagination" :loading="loadingequip"  @change="handleTableChange" :customRow="rowClick">
         <template slot="status" slot-scope="status">
           <div v-if="status == '3' || status ==  '23'" style="color: #00ee00;width: 100%; height: 100%;">杩愯</div>
           <div v-else-if="status == '1' || status == '2'" style="color: #ffea91;width: 100%; height: 100%;">寰呮満</div>
@@ -28,6 +28,7 @@
   import {
     JeecgListMixin
   } from '@/mixins/JeecgListMixin'
+  import moment from 'moment'
   export default {
     name: 'LogList',
     mixins: [JeecgListMixin],
@@ -101,7 +102,27 @@
                 const hour = parseInt(ss / 3600) < 10 ? '0' + parseInt(ss / 3600) : parseInt(ss / 3600)
                 const min = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60)
                 const sec = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60)
-                return hour + '鏃�' + min + '鍒�' + sec + '绉�'
+                if(min == '00') {
+                  if(sec == '00'){
+                    return hour + '灏忔椂'
+                  }else{
+                    return hour + '灏忔椂'+ sec + '绉�'
+                  }
+
+                }else{
+                  if(sec == '00') {
+                    return hour + '灏忔椂' + min + '鍒�'
+                  }else{
+                    return hour + '灏忔椂' + min + '鍒�' + sec + '绉�'
+                  }
+                }
+                // if(sec == '00'){
+                //   return hour + '灏忔椂' + min + '鍒�'
+                // }
+                // if(min == '00' && sec == '00'){
+                //   return hour + '灏忔椂'
+                // }
+                // return hour + '灏忔椂' + min + '鍒�' + sec + '绉�'
 
               }else if(60<ss && ss<3600){
                 const min1 = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60)
@@ -118,7 +139,7 @@
           {
             title: '绋嬪簭鍙�',
             align: 'center',
-            dataIndex: 'sequencenumber'
+            dataIndex: 'sequenceNumber'
           }
         ]
       }
@@ -134,6 +155,24 @@
         this.ipagination = pagination;
         // this.loadData();
       },
+      /**
+       * 缁欒澶囨棩蹇楄〃鏍间腑鐨勮娣诲姞鐐瑰嚮浜嬩欢
+       * @param record 鐐瑰嚮鐨勫綋鍓嶈鏁版嵁
+       * @returns {{on: {click: on.click}}} 娣诲姞浜嬩欢瀵硅薄
+       */
+      rowClick(record){
+        return {
+          on:{
+            click:()=>{
+              const timeObj={
+                start:moment(record.startTime),
+                end:moment(record.endTime)
+              }
+              this.$bus.$emit('tableRowRecord',timeObj)
+            }
+          }
+        }
+      }
     },
     created() {
     }

--
Gitblit v1.9.3