From cb1f69717eed3b6a61b6c61a8934bac752782b2d Mon Sep 17 00:00:00 2001 From: wwl <xchao828@163.com> Date: 星期三, 05 三月 2025 17:00:38 +0800 Subject: [PATCH] 1 --- src/views/hosp/rules/index.vue | 64 +++++++++++++++++++++++++------- 1 files changed, 50 insertions(+), 14 deletions(-) diff --git a/src/views/hosp/rules/index.vue b/src/views/hosp/rules/index.vue index 8241d2b..01e4716 100644 --- a/src/views/hosp/rules/index.vue +++ b/src/views/hosp/rules/index.vue @@ -13,7 +13,22 @@ style="margin-bottom: 20px" /> </div> - <el-scrollbar style="height: 629px; width: 100%"> + <div class="scrollable-container"> + <div class="content"> + <el-tree + :data="deptOptions" + :props="defaultProps" + :expand-on-click-node="false" + :filter-node-method="filterNode" + ref="tree" + node-key="id" + :default-expanded-keys="treeId" + highlight-current + @node-click="handleNodeClick" + /> + </div> + </div> + <!-- <el-scrollbar style="height: 629px; width: 100%"> <div class="head-container"> <el-tree :data="deptOptions" @@ -27,7 +42,7 @@ @node-click="handleNodeClick" /> </div> - </el-scrollbar> + </el-scrollbar> --> <!-- <div class="head-tree"> <el-tree ref="tree" @@ -255,6 +270,7 @@ label="瑙勫垯鑼冨洿+" align="center" prop="ruleGt" + width="90" :show-overflow-tooltip="true" /> <el-table-column @@ -335,7 +351,7 @@ :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" - @pagination="getList" + @pagination="getListByXmId" /> </div> </div> @@ -349,7 +365,7 @@ :visible.sync="open" width="1000px" append-to-body - :before-close="handleClose" + :close-on-click-modal="false" > <el-form ref="form" @@ -572,9 +588,9 @@ :visible.sync="dialogTableVisible" width="80%" :close-on-click-modal="false" + @close="clearForm" > <div class="app-container"> - <!-- <el-row :gutter="24"> --> <el-form :model="form" ref="queryForm" @@ -664,7 +680,7 @@ :visible.sync="openOne" width="1000px" append-to-body - :before-close="handleClose" + :close-on-click-modal="false" > <el-form ref="form" @@ -933,16 +949,15 @@ queryParam: { page: 1, pageSize: 10, - bt: '', // 鏍囬 - nr: '', // 寤鸿鍐呭 + bt: "", // 鏍囬 + nr: "", // 寤鸿鍐呭 }, querycharge: { pageNum: 1, pageSize: 10, }, // 琛ㄥ崟鍙傛暟 - form: { - }, + form: {}, // 琛ㄥ崟鏍¢獙 rules: { deleted: [ @@ -994,9 +1009,7 @@ this.getList(); }, - methods: { - handleClose(done) { // this.cancel(); /* this.$confirm("纭鍏抽棴锛�") @@ -1008,8 +1021,13 @@ handlecharge() { this.querycharge.pageNum = 1; - this.getlistJynr(); + }, + + // 娓呯┖琛ㄥ崟鏁版嵁 + clearForm() { + this.queryParam.bt = ""; // 娓呯┖鏍囬 + this.queryParam.nr = ""; // 娓呯┖寤鸿鍐呭 }, getDetailed() { @@ -1079,6 +1097,8 @@ 1; }); this.rulesList = response.rows; + console.log(this.rulesList,999); + this.total = response.total; this.loading = false; }); @@ -1093,7 +1113,8 @@ // 绛涢�夎妭鐐� filterNode(value, data) { if (!value) return true; - return data.label.indexOf(value) !== -1; + // return data.label.indexOf(value) !== -1; + return data.label && typeof data.label === "string" && data.label.indexOf(value) !== -1; }, // 鍙栨秷鎸夐挳 cancel() { @@ -1279,6 +1300,21 @@ .pag1 { width: 30%; } + +.scrollable-container { + width: 260px; /* 璁剧疆瀹瑰櫒鐨勫搴� */ + height: 629px; /* 璁剧疆瀹瑰櫒鐨勯珮搴� */ + overflow: auto; /* 鍏佽鍐呭婧㈠嚭鏃舵樉绀烘粴鍔ㄦ潯 */ + border: 1px solid #ccc; /* 鍙�夛細娣诲姞杈规浠ユ洿濂藉湴鏄剧ず瀹瑰櫒 */ + position: relative; /* 鍙�夛細浣垮鍣ㄥ唴鐨勭粷瀵瑰畾浣嶅厓绱犺兘澶熸纭樉绀� */ +} + +.content { + width: 1000px; /* 璁剧疆鍐呭鐨勫搴︼紝浠ヨЕ鍙戞按骞虫粴鍔ㄦ潯 */ + height: 1000px; /* 璁剧疆鍐呭鐨勯珮搴︼紝浠ヨЕ鍙戝瀭鐩存粴鍔ㄦ潯 */ +} + + /* .guding { position: fixed; top: 20px; -- Gitblit v1.8.0