From 575a75a0519e53ceec6bb5d31f682124596c3bae Mon Sep 17 00:00:00 2001
From: zenglf <18502938215@163.com>
Date: 星期二, 24 十月 2023 10:57:34 +0800
Subject: [PATCH] Merge branch 'master' of http://117.34.109.166:18448/r/vue_mdc_430 into develop

---
 src/views/mdc/base/modules/deviceLog/LogInfo.vue |  115 +++++++++++++++++++++++++++++----------------------------
 1 files changed, 59 insertions(+), 56 deletions(-)

diff --git a/src/views/mdc/base/modules/deviceLog/LogInfo.vue b/src/views/mdc/base/modules/deviceLog/LogInfo.vue
index 3bdc973..b3140ad 100644
--- a/src/views/mdc/base/modules/deviceLog/LogInfo.vue
+++ b/src/views/mdc/base/modules/deviceLog/LogInfo.vue
@@ -16,7 +16,8 @@
           </a-col>
           <a-col :md="6" :sm="6">
             <a-form-item label="鏃ユ湡">
-              <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" @change="dataChange" format='YYYY-MM-DD'/>
+              <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" @change="dataChange"
+                             format='YYYY-MM-DD'/>
             </a-form-item>
           </a-col>
           <a-col :md="3" :sm="3">
@@ -60,9 +61,9 @@
                             <span v-if="item.status == 23"
                                   :style='{display: "inline-block",width:item.dateProportion,  height: "100%", background: "#19FE01",position:"absolute",bottom:"0"}'></span>
                           </div>
-                          <div  v-if="item.status == 22" style="z-index: 999;"
-                                :style='{display: "inline-block",left:item.left,width:item.dateProportion,  height: "100%",position:"absolute"}'
-                                v-for="item in waring">
+                          <div v-if="item.status == 22" style="z-index: 999;"
+                               :style='{display: "inline-block",left:item.left,width:item.dateProportion,  height: "100%",position:"absolute"}'
+                               v-for="item in waring">
                             <span
                               :style='{display: "inline-block",width:"100%", left:0, height: "68%", background: "#FD0008",position:"absolute",bottom:"0"}'></span>
                           </div>
@@ -150,7 +151,8 @@
         </a-tabs>
       </div>
     </div>
-    <work-chart-model ref="workChartModel"></work-chart-model>
+    <work-chart-model ref="workChartModel" :collectTime="this.queryParams.collectTime"
+                      :equipment="this.equipment"></work-chart-model>
     <work-history-model ref="workHistoryModel"></work-history-model>
   </div>
 </template>
@@ -176,17 +178,17 @@
     props: { equement: {} },
     data() {
       return {
-        readOnly:true,
+        readOnly: true,
         defaultId: '',
         defaultName: '',
         middleTime: '',
-        queryParam:{},
+        queryParam: {},
         queryParams: {
-          collectTime:undefined,
+          collectTime: undefined
         },
-        loadingstayus:false,
-        loadingrunStatus:false,
-        loadingwarnStatus:false,
+        loadingstayus: false,
+        loadingrunStatus: false,
+        loadingwarnStatus: false,
         normal: [],
         waring: [],
         normalList: [],
@@ -200,7 +202,7 @@
           getEquipmentByPid: '/mdc/mdcEquipment/getEquipmentByPid',
           list: '/mdc/mdcEquipmentRunningSection/logList'
         },
-        ProStartId:''
+        ProStartId: ''
       }
     },
     methods: {
@@ -223,27 +225,27 @@
       tabChange(val) {
         this.activeKey = val
       },
-      disabledDate(current){
+      disabledDate(current) {
         //Can not slect days before today and today
-        return current && current > moment().subtract('days', 0);
+        return current && current > moment().subtract('days', 0)
       },
       queryChart() {
         // this.normal = []
         // this.waring = []
-        this.loadingstayus = true;
-        this.loadingrunStatus = true;
+        this.loadingstayus = true
+        this.loadingrunStatus = true
         this.loadingwarnStatus = true
         getAction(this.url.list, this.queryParams).then((res) => {
           this.normalList = []
           this.waringList = []
           this.runList = []
-          this.loadingstayus = false;
-          this.loadingrunStatus = false;
+          this.loadingstayus = false
+          this.loadingrunStatus = false
           this.loadingwarnStatus = false
           this.normal = []
           this.waring = []
           if (res.success) {
-            if(res.result != null){
+            if (res.result != null) {
               for (let i = 0; i < res.result.length; i++) {
                 this.normalList.push(res.result[i])
                 if ('22' == res.result[i].status) {
@@ -253,11 +255,11 @@
                   res.result[i].left = leftTmp / 86400 * 100 + '%'
                   this.waring.push(res.result[i])
 
-                }else if('3' == res.result[i].status){
+                } else if ('3' == res.result[i].status) {
                   this.runList.push(res.result[i])
                   res.result[i].dateProportion = res.result[i].duration / 86400 * 100 + '%'
                   this.normal.push(res.result[i])
-                }else{
+                } else {
                   res.result[i].dateProportion = res.result[i].duration / 86400 * 100 + '%'
                   this.normal.push(res.result[i])
                   // console.log(this.normal)
@@ -324,23 +326,23 @@
       },
       searchQuery() {
         // console.log(this.queryParams.collectTime)
-        if(this.queryParams.collectTime != undefined){
+        if (this.queryParams.collectTime != undefined) {
           this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD')
-          if(!this.queryParams.equipmentId||!this.queryParams.equipmentName){
+          if (!this.queryParams.equipmentId || !this.queryParams.equipmentName) {
             this.$notification.warning({
-              message:'娑堟伅',
-              description:"璇烽�夋嫨璁惧"
-            });
+              message: '娑堟伅',
+              description: '璇烽�夋嫨璁惧'
+            })
             return false
           }
           this.queryChart()
-        }else{
+        } else {
           // this.$message.warning("璇烽�夋嫨鏃堕棿")
           console.log('瑙﹀彂鎻愮ず')
           this.$notification.warning({
-            message:'娑堟伅',
-            description:"璇烽�夋嫨鏃堕棿"
-          });
+            message: '娑堟伅',
+            description: '璇烽�夋嫨鏃堕棿'
+          })
         }
         // this.queryList()
       },
@@ -354,28 +356,29 @@
         // this.onClearSelected()
       },
       openWorkChart() {
-        if(!this.equipment.equipmentId){
+        if (!this.equipment.equipmentId) {
           // this.$message.warning("璇烽�夋嫨璁惧杩涜鏌ヨ")
           this.$notification.warning({
-            message:'娑堟伅',
-            description:"璇烽�夋嫨璁惧杩涜鏌ヨ"
-          });
-        }else{
+            message: '娑堟伅',
+            description: '璇烽�夋嫨璁惧杩涜鏌ヨ'
+          })
+        } else {
+          // 鍒ゆ柇鏄惁鐐瑰嚮璁惧鏃ュ織琛ㄦ牸琛岀殑鏁版嵁锛屾鏃朵负鐐瑰嚮琛ㄦ牸鏁版嵁涓篺alse
+          this.$refs.workChartModel.isClicklogListRow = false
           this.$refs.workChartModel.add(this.equipment)
           this.$refs.workChartModel.title = '宸ヤ綔鏇茬嚎'
         }
-
       },
       openHistoryChart() {
         // console.log(this.equipment);
-        if(!this.equipment.equipmentId){
+        if (!this.equipment.equipmentId) {
           // this.$message.warning("璇烽�夋嫨璁惧杩涜鏌ヨ")
           this.$notification.warning({
-            message:'娑堟伅',
-            description:"璇烽�夋嫨璁惧杩涜鏌ヨ"
-          });
+            message: '娑堟伅',
+            description: '璇烽�夋嫨璁惧杩涜鏌ヨ'
+          })
           // console.log(1111)
-        } else{
+        } else {
           this.$refs.workHistoryModel.add(this.equipment)
           this.$refs.workHistoryModel.title = '鍘嗗彶鏃ュ織'
         }
@@ -386,13 +389,13 @@
         this.searchQuery()
       },
       dataAfter() {
-        if((this.queryParams.collectTime).format('YYYY-MM-DD') ==  moment().format('YYYY-MM-DD')){
+        if ((this.queryParams.collectTime).format('YYYY-MM-DD') == moment().format('YYYY-MM-DD')) {
           // this.$message.warning("璇烽�夋嫨浠婂ぉ浠ュ強浠婂ぉ涔嬪墠鐨勬棩鏈燂紒锛�")
           this.$notification.warning({
-            message:'娑堟伅',
-            description:'璇烽�夋嫨浠婂ぉ浠ュ強浠婂ぉ涔嬪墠鐨勬棩鏈燂紒锛�'
-          });
-        }else{
+            message: '娑堟伅',
+            description: '璇烽�夋嫨浠婂ぉ浠ュ強浠婂ぉ涔嬪墠鐨勬棩鏈燂紒锛�'
+          })
+        } else {
           this.queryParams.collectTime = moment(this.queryParams.collectTime.add(1, 'd'), 'YYYY-MM-DD')
           this.searchQuery()
         }
@@ -413,16 +416,16 @@
               this.equipment = {}
               // _this.$message.warning('璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒')
               _this.$notification.warning({
-                message:'娑堟伅',
-                description:'璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒'
-              });
+                message: '娑堟伅',
+                description: '璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒'
+              })
             }
-          }else{
+          } else {
             // this.$message.warning(res.message)
             _this.$notification.warning({
-              message:'娑堟伅',
-              description:res.message
-            });
+              message: '娑堟伅',
+              description: res.message
+            })
 
           }
         })
@@ -431,13 +434,12 @@
     created() {
       this.queryParams.collectTime = moment()
       this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD')
-      this.initEquipment();
+      this.initEquipment()
       // this.queryTreeData();
     },
     watch: {
       equement(val) {
         console.log('閫氳繃watch瑙﹀彂')
-
         if (val && val.equipmentId) {
           this.$set(this.queryParams, 'equipmentName', val.equipmentName)
           this.$set(this.queryParams, 'equipmentId', val.equipmentId)
@@ -492,7 +494,8 @@
   #mdcLogShow > div {
     flex: 1;
   }
+
   /*.mdcLogShowOne{*/
-    /*position: absolute;*/
+  /*position: absolute;*/
   /*}*/
 </style>

--
Gitblit v1.9.3