From 00212ed8e808fc7b76c04389224e65f27f074fb2 Mon Sep 17 00:00:00 2001 From: su1124 <1583764726@qq.com> Date: 星期五, 26 四月 2024 15:30:04 +0800 Subject: [PATCH] su --- src/views/system/tijian/index.vue | 31 ++++++++++++++++++++++++++----- 1 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue index 54b3a21..126ab39 100644 --- a/src/views/system/tijian/index.vue +++ b/src/views/system/tijian/index.vue @@ -221,7 +221,7 @@ <el-dialog title="閫夋嫨濂楅" :visible.sync="taocan" width="50%" height="700px"> <el-tabs type="border-card" style="height: 560px; margin: 0 10px; width: 100%" @tab-click="handleClick"> <el-tab-pane label="濂楅"> - <el-form :model="queryParam" ref="queryForm" size="small" :inline="true" v-show="showSearch" + <el-form :model="queryParam" ref="queryForm" size="small" :inline="true" v-if="showSearch" label-width="auto"> <el-form-item label="濂楅鍚嶇О" prop="pacName"> <el-input v-model="queryParam.pacName" placeholder="璇疯緭鍏ュ椁愬悕绉�" clearable @keyup.enter.native="handle" /> @@ -335,14 +335,14 @@ </el-col> <el-col :span="11"> <div class="grid-content bg-purple"> - <div style="text-align: center; margin-bottom: 10px"> + <div style="text-align: center; margin-bottom: 10px;margin-top: 10px"> 宸查�夐」鐩垪琛� </div> <el-table :data="DataList" border style="width: 100%" - height="250" + height="400" :span-method="objectSpanMethod" > <el-table-column prop="propinName" label="妫�鏌ラ」鐩�"> </el-table-column> @@ -376,7 +376,7 @@ <el-collapse v-model="activeName" accordion v-if="list1"> <div> <el-collapse-item title="璇烽�夋嫨椤圭洰"> - <el-table :data="DataList" border style="width: 100%"> + <el-table :data="DataList" border style="width: 100%" height="400" :span-method="objectSpanMethod"> <el-table-column prop="proName" label="椤圭洰" @@ -1975,7 +1975,28 @@ } }); }, - + // // 榛樿鎺ュ彈鍥涗釜鍊� { 褰撳墠琛岀殑鍊�, 褰撳墠鍒楃殑鍊�, 琛岀殑涓嬫爣, 鍒楃殑涓嬫爣 } + objectSpanMethod({ row, column, rowIndex, columnIndex }) { + console.log(row, column, rowIndex, columnIndex) + let fields = ["propinName"]; + let cellValue = row[column.property]; + if (cellValue && fields.includes(column.property)) { + let prevRow = this.DataList[rowIndex - 1]; + let nextRow = this.DataList[rowIndex + 1]; + if (prevRow && prevRow[column.property] === cellValue) { + return { rowspan: 0, colspan: 0 }; + } else { + let countRowspan = 1; + while (nextRow && nextRow[column.property] === cellValue) { + nextRow = this.DataList[++countRowspan + rowIndex]; + } + if (countRowspan > 1) { + return { rowspan: countRowspan, colspan: 1 }; + } + } + } + }, + // 椤圭洰鎻愪氦 submit() { -- Gitblit v1.8.0