From 3a1a63d17e21cb9c26e4515e49e9ff75f59f52a0 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期三, 06 九月 2023 17:51:57 +0800
Subject: [PATCH] 产品管理样式修改

---
 src/components/makepager/TableCommonView.vue |   53 +++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 43 insertions(+), 10 deletions(-)

diff --git a/src/components/makepager/TableCommonView.vue b/src/components/makepager/TableCommonView.vue
index bb3f2c3..ad1f787 100644
--- a/src/components/makepager/TableCommonView.vue
+++ b/src/components/makepager/TableCommonView.vue
@@ -6,12 +6,17 @@
       :data="tableList.tableInfomation"
       tooltip-effect="dark"
       style="width: 100%"
+      :height="'calc(100% - 0px)'"
+      :max-height="tableList.maxHeight"
       :lazy="tableList.lazy"
-      :show-summary="showSummary.show"
-      :summary-method="getSummaries"
-      :span-method="arraySpanMethod"
       @selection-change="handleSelectionChange"
-      :header-cell-style="{ background: '#ECF4FF', color: '#666' }"
+      :header-cell-style="{ background: '#f1f3f8', color: '#000009' }"
+      :highlight-current-row="tableList.highlight"
+      :row-class-name="tableRowClassName"
+      @row-click="tableRowClick"
+      :row-key="tableList.key"
+      :default-expand-all="tableList.isDefaultExpandAll"
+      :tree-props="{ children: 'child', hasChildren: 'hasChildren' }"
     >
       <el-table-column v-if="tableList.selectBox" type="selection" width="40"> </el-table-column>
       <el-table-column v-if="tableList.selectIndex" type="index" label="搴忓彿" width="50"> </el-table-column>
@@ -33,7 +38,7 @@
               ? "--"
               : dateFormat("YYYY-mm-dd HH:MM:SS", scope.row[item.prop])
           }}</span>
-          <span v-else-if="item.isClick && scope.row[item.prop]" class="sel-name" @click="selNameClick(scope.row)">{{
+          <span v-else-if="item.isClick && scope.row[item.prop]" class="sel-name" @click="selCommonClick(scope.row)">{{
             scope.row[item.prop]
           }}</span>
           <span v-else-if="item.isFirst">{{ scope.row[item.prop] ? "鏄�" : "鍚�" }}</span>
@@ -119,8 +124,15 @@
           show: false,
           sumProp: [],
           mergeNumber: 1,
-          totalName:'鏈〉鎬昏'
+          totalName: "鏈〉鎬昏"
         }
+      }
+    },
+    // 閫変腑鐨勬牱寮�
+    selectClassRow: {
+      type: Object,
+      default: () => {
+        return {}
       }
     }
   },
@@ -128,6 +140,7 @@
     return {}
   },
   computed: {},
+  mounted() {},
   methods: {
     handleReserve(row) {
       return row._id ? row._id : row.id
@@ -262,6 +275,18 @@
     // 鍏叡璇︽儏
     selCommonClick(row) {
       this.$emit("selCommonClick", row)
+    },
+    // 鍗曢�夎鐩稿叧
+    tableRowClassName({ row }) {
+      if (Object.keys(this.selectClassRow).length > 0) {
+        if (row.id == this.selectClassRow.id) {
+          return "onSelect"
+        }
+      }
+      this.$emit("tableRowClassName", row)
+    },
+    tableRowClick(row) {
+      this.$emit("tableRowClick", row)
     }
   }
 }
@@ -271,8 +296,9 @@
 <style lang="scss" scoped>
 .table-view {
   // margin-top: 20px;
-  margin-right: 10px;
+  // margin-right: 10px;
   // margin-bottom: 40px;
+  height: 100%;
   .blue {
     width: 70px;
     text-align: center;
@@ -306,9 +332,16 @@
   }
 }
 ::v-deep {
-  .el-table__footer-wrapper tbody td.el-table__cell {
-    background-color: #fff;
-    text-align: right;
+  .el-table__footer-wrapper {
+    tbody td.el-table__cell {
+      background-color: #fff;
+      font-weight: bold;
+    }
+    // .cell{
+    //     &:nth-last-child(3){
+    //       text-align:right;
+    //     }
+    //   }
   }
 }
 </style>

--
Gitblit v1.8.0