From 29b5ffe318b8ab32865ebebedd865ea2aa3f6c7e Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期三, 06 九月 2023 17:45:31 +0800 Subject: [PATCH] 供应商列表相关bug修复及样式调整 --- src/components/makepager/TableCommonView.vue | 41 +++++++++++++++++++++++++++++++---------- 1 files changed, 31 insertions(+), 10 deletions(-) diff --git a/src/components/makepager/TableCommonView.vue b/src/components/makepager/TableCommonView.vue index ac0e306..be81c3c 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> @@ -122,6 +127,13 @@ totalName: "鏈〉鎬昏" } } + }, + // 閫変腑鐨勬牱寮� + selectClassRow: { + type: Object, + default: () => { + return {} + } } }, data() { @@ -130,10 +142,6 @@ computed: {}, mounted() {}, methods: { - tableRowClick(row) { - console.log(row) - this.$emit("tableRowClick", row) - }, handleReserve(row) { return row._id ? row._id : row.id }, @@ -267,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) } } } @@ -278,6 +298,7 @@ // margin-top: 20px; margin-right: 10px; // margin-bottom: 40px; + height: 100%; .blue { width: 70px; text-align: center; @@ -311,8 +332,8 @@ } } ::v-deep { - .el-table__footer-wrapper { - tbody td.el-table__cell{ + .el-table__footer-wrapper { + tbody td.el-table__cell { background-color: #fff; font-weight: bold; } -- Gitblit v1.8.0