From e0eb378045eb18117fcf0a1eac6dad57ce6f743b Mon Sep 17 00:00:00 2001
From: wangqi <magical1908@outlook.com>
Date: 星期三, 31 三月 2021 16:55:58 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/develop' into develop

---
 src/components/table/components/WasteWater.vue |   91 +++++++++++++++++++++++++++------------------
 1 files changed, 55 insertions(+), 36 deletions(-)

diff --git a/src/components/table/components/WasteWater.vue b/src/components/table/components/WasteWater.vue
index 346934f..3291fb1 100644
--- a/src/components/table/components/WasteWater.vue
+++ b/src/components/table/components/WasteWater.vue
@@ -1,33 +1,29 @@
 <template>
    <div class="waste-water">
-<!--       <el-row>-->
-<!--           <el-col>-->
            <el-table
                    class="tableBox"
                    :data="tableData"
-                   :cell-style="rowClass"
+                   style="width: 100%"
                    :header-cell-style="tableHeaderColor"
+                   :cell-style="rowClass"
+                   @cell-click="handle"
            >
                <el-table-column
                        width="30px"
                         label=""
                >
-                 <template >
-                 <el-popover :value= "show"
+                 <template slot-scope="{row,$index}">
+<!--                   <i class="el-icon-caret-right" v-if="$index ===1"></i>-->
+                 <el-popover
                          placement="bottom"
-                         width="200"
                          trigger="click"
+                         :disabled="!isShowIcon"
                              popper-class="popovers"
                         >
-                   <ChemicalWastewater @isshow= "show=false"></ChemicalWastewater>
-                   <i class="el-icon-caret-right"  slot="reference" v-if="!isShowIcon"  ></i>
-                   <i class="el-icon-caret-bottom" slot="reference" v-else-if="isShowIcon"></i>
-<!--                       <i class="el-icon-caret-bottom" v-else-if="isShowIcon&&scope.row.index===1"></i>-->
-<!--                       <i v-if="isShowIcon" class="el-icon-caret-bottom" slot="reference" @click="isbtn"></i>-->
-<!--                   <i v-else class="el-icon-caret-right" slot="reference" @click="isbtn"></i>-->
-                     </el-popover>
-<!--                       <i class="el-icon-caret-right" v-if="!isShowIcon"></i>-->
-<!--                       <i class="el-icon-caret-bottom" v-else-if="isShowIcon&&scope.row.index===1"></i>-->
+                   <ChemicalWastewater v-show="$index ===1"></ChemicalWastewater>
+                   <i class="el-icon-caret-right" :class="{active: isActive === $index}" slot="reference" @click="doIcon($index)"></i>
+<!--                   <i class="el-icon-caret-bottom"   slot="reference" v-else @click="doIcon($index)"></i>-->
+                 </el-popover>
                    </template>
                </el-table-column>
                <el-table-column
@@ -44,7 +40,7 @@
                    <div v-else-if="scope.row.UserName==='澶╂触鐭冲寲'" style="color: #00ffff">{{scope.row.UserName}}</div>
                    <div v-else >{{scope.row.UserName}}</div>
                  </template>
-               </el-table-column>v-
+               </el-table-column>
                <el-table-column
                        prop="WasteWaters"
                        label="澶栨帓搴熸按閲忥紙m鲁锛�"
@@ -85,8 +81,10 @@
                            placement="bottom-end"
                            width="200"
                            trigger="click"
+                                   popper-class="popovers"
+                           title="XXX1鏄庣粏琛�"
                        >
-                         <ChemicalWastewater></ChemicalWastewater>
+                         <refinery></refinery>
                          <u slot="reference" style="color: #00ffff">{{row.normal}}</u>
                          <!--                       <i class="el-icon-caret-bottom" v-else-if="isShowIcon&&scope.row.index===1"></i>-->
                          <!--                       <i v-if="isShowIcon" class="el-icon-caret-bottom" slot="reference" @click="isbtn"></i>-->
@@ -113,6 +111,19 @@
                            prop="deficiency"
                            label="缂哄け"
                            width="60px">
+                     <template slot-scope="{row,$index}">
+                       <u v-if="$index!=1" >{{row.deficiency}}</u>
+                       <el-popover v-else
+                                   placement="bottom-end"
+                                   width="200"
+                                   trigger="click"
+                                   title="澶╂触鐭冲寲鐩戞祴鐐圭己澶辨姤璀︽槑缁�"
+                                   popper-class="popovers"
+                       >
+                         <MissingAlarm></MissingAlarm>
+                         <u slot="reference" style="color: #00ffff">{{row.deficiency}}</u>
+                       </el-popover>
+                     </template>
                    </el-table-column>
                </el-table-column>
            </el-table>
@@ -124,14 +135,18 @@
 
 <script>
 import ChemicalWastewater from './componented/ChemicalWastewater'
+import Refinery from '@components/table/components/componented/refinery'
+import MissingAlarm from '@components/table/components/componented/MissingAlarm'
 export default {
   name: 'WasteWater',
   components: {
+    MissingAlarm,
+    Refinery,
     ChemicalWastewater
   },
   data () {
     return {
-      show: false,
+      isActive: '',
       isShowIcon: false,
       tableData: [{
         UserName: '闆嗗洟鍚嶇О',
@@ -192,34 +207,38 @@
     rowClass  () {
       return 'text-align: center;background-color: rgba(26, 73, 81, 0.901960784313726);color:#fff;width:64px'
     },
-    // cellClick (row, column, cell, event) {
-    //   console.log(row.index)
-    //   if (row.index === 1) {
-    //     this.isShowIcon = !this.isShowIcon
-    //   }
-    //   // console.log(column)
-    //   // console.log(cell)
-    //   // console.log(event)
-    // },
-    // isbtn () {
-    //     this.isShowIcon = !this.isShowIcon
-    //   // this.isShowIcon = !this.isShowIcon
-    //   // console.log(1)
-    // },
-    tableCellClassName ({ row, column, rowIndex, columnIndex }) {
-      row.index = rowIndex
-      column.index = columnIndex
+    // 鑾峰彇鐐瑰嚮鐨勮〃鏍�
+    handle (row, column, event, cell) {
+      console.log(row.UserName)
+    },
+    doIcon (index) {
+      if (index !== 1) {
+        this.isShowIcon = false
+        this.isActive = ''
+        return
+      }
+      this.isShowIcon = !this.isShowIcon
+      if (index === this.isActive) {
+        this.isActive = ''
+        return
+      }
+      this.isActive = index
     }
   }
 }
 </script>
 
-<style >
+<style scoped>
 .popovers{
   width: auto !important;
+  background-color: gray !important;
 }
 .popovers.el-popover{
 padding:0;
 }
+.active {
+  /*color: red;*/
+  transform:rotate(90deg);
+}
 
 </style>

--
Gitblit v1.8.0