From 3472e776001899505d7dd540a021d07be9c54cd5 Mon Sep 17 00:00:00 2001
From: wangqi <magical1908@outlook.com>
Date: 星期一, 15 三月 2021 19:56:09 +0800
Subject: [PATCH] tabs切换组件

---
 src/components/table/components/SolidWaste.vue |   40 ++++++++++++++++++++++++++++++----------
 1 files changed, 30 insertions(+), 10 deletions(-)

diff --git a/src/components/table/components/SolidWaste.vue b/src/components/table/components/SolidWaste.vue
index 14a9020..c90311a 100644
--- a/src/components/table/components/SolidWaste.vue
+++ b/src/components/table/components/SolidWaste.vue
@@ -5,6 +5,7 @@
                :data="tableData"
                :header-cell-style="tableHeaderColor"
                :cell-style="rowClass"
+               @cell-click="handle"
        >
            <el-table-column
                    width="30px"
@@ -24,11 +25,11 @@
                    prop="UserName"
                    label="浼佷笟鍚嶇О"
                    width="120px">
-           </el-table-column>
-           <el-table-column
-                   prop="WasteWaters"
-                   label="宸ヤ笟澶栨帓搴熸按閲忥紙m鲁锛�"
-                   width="200px">
+             <template slot-scope="scope">
+               <div v-if="scope.row.UserName==='闆嗗洟鍚嶇О'" style="color: #00ffff">{{scope.row.UserName}}</div>
+               <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>
            <el-table-column label="浜х敓閲� 锛堝惃锛�">
                <el-table-column
@@ -47,6 +48,18 @@
                        prop="normal"
                        label="姝e父"
                        width="100px">
+                 <template slot-scope="{row,$index}">
+                   <u v-if="$index!=1" >{{row.normal}}</u>
+                   <el-popover v-else
+                               placement="bottom-end"
+                               width="200"
+                               trigger="click"
+                               title="鐩戞祴鐐规帓鏀炬槑缁�"
+                   >
+                     <ChemicalWastewater></ChemicalWastewater>
+                     <u slot="reference" style="color: #00ffff">{{row.normal}}</u>
+                   </el-popover>
+                 </template>
                </el-table-column>
                <el-table-column
                        prop="warning"
@@ -59,17 +72,20 @@
 </template>
 
 <script>
+import ChemicalWastewater from '@components/table/components/componented/ChemicalWastewater'
 export default {
   name: 'SolidWaste',
+  components: {
+    ChemicalWastewater
+  },
   data () {
     return {
       tableData: [{
         UserName: '闆嗗洟鍚嶇О',
-        WasteWaters: '',
-        AddOutPut: '',
-        MonthOutPut: '',
-        normal: '',
-        warning: ''
+        AddOutPut: '580',
+        MonthOutPut: '250',
+        normal: '10',
+        warning: '9'
       }, {
         UserName: '澶╂触鐭冲寲',
         WasteWaters: '116.6',
@@ -100,6 +116,10 @@
     // 琛ㄥご鏍峰紡璁剧疆
     rowClass  () {
       return 'text-align: center;background-color: rgba(26, 73, 81, 0.901960784313726);color:#fff;width:64px'
+    },
+    // 鑾峰彇鐐瑰嚮鐨勮〃鏍�
+    handle (row, column, event, cell) {
+      console.log(row.UserName)
     }
   }
 }

--
Gitblit v1.8.0