| | |
| | | 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"> |
| | |
| | | </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"> |
| | |
| | | </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> |
| | |
| | | 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}$/); |
| | |
| | | } |
| | | }; |
| | | return { |
| | | showPackagese: false, |
| | | // 部门名称 |
| | | deptName: undefined, |
| | | // 遮罩层 |
| | | loading: true, |
| | | hospList: [], |
| | | parentNameList: [], |
| | | total: 0, |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 表格树数据 |
| | |
| | | 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() { |
| | |
| | | }); |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | |
| | | 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) => { |
| | |
| | | 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; |
| | |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .scrollable-container { |
| | | width: 200px; /* 设置容器的宽度 */ |
| | | height: 629px; /* 设置容器的高度 */ |
| | | overflow: auto; /* 允许内容溢出时显示滚动条 */ |
| | | border: 1px solid #ccc; /* 可选:添加边框以更好地显示容器 */ |
| | | position: relative; /* 可选:使容器内的绝对定位元素能够正确显示 */ |
| | | } |
| | | |
| | | .content { |
| | | width: 600px; /* 设置内容的宽度,以触发水平滚动条 */ |
| | | height: 1000px; /* 设置内容的高度,以触发垂直滚动条 */ |
| | | } |
| | | </style> |