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/hosp/order/index.vue | 102 +++++++++++++++++++++++++++------------------------ 1 files changed, 54 insertions(+), 48 deletions(-) diff --git a/src/views/hosp/order/index.vue b/src/views/hosp/order/index.vue index 94af7c0..88b2a51 100644 --- a/src/views/hosp/order/index.vue +++ b/src/views/hosp/order/index.vue @@ -412,7 +412,7 @@ <el-dialog :title="title" :visible.sync="Projectopen" - width="1500px" + width="1100px" style="height: 860px" append-to-body > @@ -426,7 +426,7 @@ <el-input placeholder="杈撳叆鍏抽敭瀛楄繘琛岃繃婊�" v-model="filterText"> </el-input> <div class="tab3"> - <div class="outside1"> + <el-tree class="filter-tree" v-loading="loading" @@ -434,23 +434,22 @@ :props="defaultProps" show-checkbox node-key="proId" - @check-change="handleCurrentChecked" + @check="handleCurrentChecked" :default-checked-keys="checkedkey" :filter-node-method="filterNode" ref="tree" > </el-tree> - </div> + </div> </el-col> - <el-col :span="4"> + <el-col :span="5"> <div style="text-align: center; margin-bottom: 10px; margin-top: 10px" > - 椤圭洰鍒楄〃 + 鏄庣粏椤圭洰鍒楄〃 </div> <div class="tab3"> - <div class="outside1"> <el-tree class="filter-tree" v-loading="loading" @@ -463,33 +462,24 @@ :default-checked-keys="checkedListkey" > </el-tree> - </div> </div> </el-col> - <el-col :span="12"> + <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> - <div - style=" - padding: 0px 6px; - border: 1px solid #e6ebf5; - max-height: 420px; - overflow: auto; - " - > <el-table :data="DataList" border style="width: 100%" - height="250" + height="400" :span-method="objectSpanMethod" > - <el-table-column prop="propinName" label="鐖堕」"> + <el-table-column prop="propinName" label="妫�鏌ラ」鐩�" > </el-table-column> - <el-table-column prop="proName" label="椤圭洰" width="180"> + <el-table-column prop="proName" label="鏄庣粏椤圭洰" width="260px"> </el-table-column> - <el-table-column prop="proPrice" label="鍘熶环"> + <el-table-column prop="proPrice" label="鍘熶环" width="56px"> </el-table-column> <el-table-column @@ -497,7 +487,7 @@ align="center" fixed="right" class-name="small-padding fixed-width" - width="80px" + width="50px" > <template slot-scope="scope"> <el-button @@ -505,7 +495,8 @@ type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" - >鍒犻櫎</el-button + title="鍒犻櫎" + ></el-button > </template> </el-table-column> @@ -522,7 +513,6 @@ </el-collapse-item> </div> </el-collapse> - </div> <template> <el-form :model="form"> <el-form-item label="浣撴绫诲瀷" prop="tjType"> @@ -593,7 +583,7 @@ <el-dialog :title="title" :visible.sync="Projectopen1" - width="1500px" + width="1100px" style="height: 860px" append-to-body > @@ -607,7 +597,7 @@ <el-input placeholder="杈撳叆鍏抽敭瀛楄繘琛岃繃婊�" v-model="filterText"> </el-input> <div class="tab3"> - <div class="outside1"> + <el-tree class="filter-tree" v-loading="loading" @@ -621,14 +611,14 @@ ref="tree" > </el-tree> - </div> + </div> </el-col> - <el-col :span="4"> + <el-col :span="5"> <div style="text-align: center; margin-bottom: 10px; margin-top: 10px" > - 椤圭洰鍒楄〃 + 鏄庣粏椤圭洰鍒楄〃 </div> <div class="tab3"> <div class="outside1"> @@ -647,30 +637,23 @@ </div> </div> </el-col> - <el-col :span="12"> + <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> - <div - style=" - padding: 0px 6px; - border: 1px solid #e6ebf5; - max-height: 420px; - overflow: auto; - " - > + <el-table :data="DataList" border style="width: 100%" - height="250" + height="400" :span-method="objectSpanMethod" > - <el-table-column prop="propinName" label="妫�鏌ラ」鐩�"> + <el-table-column prop="propinName" label="妫�鏌ラ」鐩�" > </el-table-column> - <el-table-column prop="proName" label="鏄庣粏椤圭洰" width="180"> + <el-table-column prop="proName" label="鏄庣粏椤圭洰" width="260px"> </el-table-column> - <el-table-column prop="proPrice" label="鍘熶环"> + <el-table-column prop="proPrice" label="鍘熶环" width="56px"> </el-table-column> <el-table-column @@ -678,7 +661,7 @@ align="center" fixed="right" class-name="small-padding fixed-width" - width="80px" + width="50px" > <template slot-scope="scope"> <el-button @@ -694,7 +677,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="椤圭洰" width="180"> </el-table-column> <el-table-column prop="ordPrice" label="鍘熶环"> @@ -703,7 +686,7 @@ </el-collapse-item> </div> </el-collapse> - </div> + <template> <el-form :model="form"> <el-form-item label="浣撴绫诲瀷" prop="tjType"> @@ -1382,6 +1365,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 }; + } + } + } + }, + // 鏀惰垂鎸夐挳 submitPrice() { this.proIds = []; @@ -1552,7 +1557,7 @@ // } .outside { - width: 700px; + width: 500px; display: flex; margin-top: 8px; } @@ -1560,6 +1565,7 @@ .tab3 { max-height: 500px; overflow-y: auto; + border: 1px solid #d9d9d9; } .outside1 { -- Gitblit v1.8.0