From a98aa4517e7244024f4647b2789b152948439f22 Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期三, 12 三月 2025 14:03:56 +0800 Subject: [PATCH] gundongtiao --- src/views/system/dept/index.vue | 85 ++++++++++++++++++++++++++++++------------ 1 files changed, 61 insertions(+), 24 deletions(-) diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 9e0298b..4cd7fde 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -12,18 +12,20 @@ style="margin-bottom: 15px" /> </div> - <div class="head-container"> - <el-tree - :data="deptOption" - :props="defaultProps" - :expand-on-click-node="false" - :filter-node-method="filterNode" - ref="tree" - node-key="id" - default-expand-all - highlight-current - @node-click="handleNodeClick" - /> + <div class="scrollable-container"> + <div class="content"> + <el-tree + :data="deptOption" + :props="defaultProps" + :expand-on-click-node="false" + :filter-node-method="filterNode" + ref="tree" + node-key="id" + default-expand-all + highlight-current + @node-click="handleNodeClick" + /> + </div> </div> </el-col> <el-col :span="20" :xs="24"> @@ -322,7 +324,11 @@ </el-input> </el-form-item> <el-form-item label="his绉戝鍚�" prop="hisksmc"> - <el-input v-model="form.hisksmc" placeholder="his绉戝鍚�" style="width: 202px;"> + <el-input + v-model="form.hisksmc" + placeholder="his绉戝鍚�" + style="width: 202px" + > </el-input> </el-form-item> <!-- <el-form-item label="閲嶇偣绉戝" prop="deptFcusTypeCode"> @@ -362,10 +368,16 @@ </el-form> <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> <el-button @click="cancel">鍙� 娑�</el-button> + <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> </div> - <Packagese ref="aaa" @add="handleChanges" /> + <!-- 鍦ㄧ埗缁勪欢涓� --> + <Packagese + ref="aaa" + :visible="showPackagese" + @add="handleChanges" + :selectedId="form.hisksid" + /> </el-dialog> </div> </template> @@ -389,7 +401,7 @@ export default { name: "Dept", dicts: ["sys_normal_disable", "dict_user_orgtype", "dict_dept_type"], - components: { Treeselect,Packagese }, + components: { Treeselect, Packagese }, data() { let checkPhoneNum = (rule, value, callback) => { let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/); @@ -402,12 +414,14 @@ } }; return { + showPackagese: false, // 閮ㄩ棬鍚嶇О deptName: undefined, // 閬僵灞� loading: true, hospList: [], parentNameList: [], + total: 0, // 鏄剧ず鎼滅储鏉′欢 showSearch: true, // 琛ㄦ牸鏍戞暟鎹� @@ -500,18 +514,27 @@ this.getDeptTree(); }, methods: { - handlePacCode(data) { - // 澶勭悊pacCode鐨勯�昏緫 - console.log('Received pacCode:', data); -}, handleQuerys() { + this.showPackagese = true; + if (this.form.hisksid) { + this.$refs.aaa.list = [ + { + pacCode: this.form.hisksid, + pacName: this.form.hisksmc, + }, + ]; + } + this.$refs.aaa.open = true; this.$refs.aaa.getAllList(); this.$refs.aaa.title = "鏁版嵁瀛楀吀"; }, handleChanges(param1) { - this.form.lisXmbm = param1[0].pacCode; - this.form.lisXmmc = param1[0].pacName; + this.form = { + ...this.form, + hisksid: param1[0].pacCode, + hisksmc: param1[0].pacName, + }; }, /** 鏌ヨ閮ㄩ棬鍒楄〃 */ getList() { @@ -658,14 +681,15 @@ }); }, /** 淇敼鎸夐挳鎿嶄綔 */ + handleUpdate(row) { - // console.log(11111) // this.reset(); this.form = row; this.form.parentId = this.form.parentId.toString(); if (this.form.parentId == 0) { this.deptOption.push({ id: 0, label: "涓荤被鐩�" }); } + this.open = true; this.title = "绉戝淇℃伅缁存姢 "; // getDept(row.deptId).then((response) => { @@ -691,7 +715,6 @@ if (valid) { if (this.form.deptId != undefined) { if (this.form.hospId) { - // console.log(this.form); updateDept(this.form).then((response) => { this.$modal.msgSuccess("淇敼鎴愬姛"); this.open = false; @@ -732,3 +755,17 @@ }; </script> +<style scoped> +.scrollable-container { + width: 200px; /* 璁剧疆瀹瑰櫒鐨勫搴� */ + height: 629px; /* 璁剧疆瀹瑰櫒鐨勯珮搴� */ + overflow: auto; /* 鍏佽鍐呭婧㈠嚭鏃舵樉绀烘粴鍔ㄦ潯 */ + border: 1px solid #ccc; /* 鍙�夛細娣诲姞杈规浠ユ洿濂藉湴鏄剧ず瀹瑰櫒 */ + position: relative; /* 鍙�夛細浣垮鍣ㄥ唴鐨勭粷瀵瑰畾浣嶅厓绱犺兘澶熸纭樉绀� */ +} + +.content { + width: 600px; /* 璁剧疆鍐呭鐨勫搴︼紝浠ヨЕ鍙戞按骞虫粴鍔ㄦ潯 */ + height: 1000px; /* 璁剧疆鍐呭鐨勯珮搴︼紝浠ヨЕ鍙戝瀭鐩存粴鍔ㄦ潯 */ +} +</style> \ No newline at end of file -- Gitblit v1.8.0