src/components/Packagese/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/doctor/check/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/system/dept/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/components/Packagese/index.vue
@@ -50,6 +50,7 @@ > </el-form-item> </el-form> <el-table :data="dataList" ref="elTable" @@ -76,6 +77,7 @@ <el-table-column label="内容" align="center" prop="pacRemark" /> <el-table-column label="备注" align="center" prop="price" /> </el-table> <div class="pag"> <div class="pag1"> <pagination @@ -87,6 +89,7 @@ /> </div> </div> <span slot="footer" class="dialog-footer"> <el-button @click="open = false">取 消</el-button> <el-button type="primary" @click="handleOk">确 定</el-button> @@ -97,27 +100,21 @@ <script> import { getTjHyBgList } from "@/api/hosp/project"; export default { name: "Packagese", // props: { // pacCode: { // type: String, // } // }, props: { selectedId: { type: String, default: "", // 父组件传递的选中ID }, }, data() { return { open: false, openone: false, // 弹出层标题 title: "", dataList: [], // 遮罩层 loading: false, form: { desc: "", }, queryParams: { pid: "", pname: "", @@ -126,68 +123,101 @@ page: 1, pageSize: 10, }, total: 0, list: [], fList: {}, }; }, watch: { // 'row'(val, newVla) { // console.log(val,newVla) // this.fList = val // console.log(this.fList); // } // 监听父组件传递的 selectedId selectedId(newVal) { // 如果 selectedId 为空,清空所有选中的项 if (!newVal) { this.clearSelection(); } else { this.handleSelectionEcho(newVal); } }, mounted() { // this.getList() }, created() { // this.getList() }, methods: { // 获取数据 getAllList() { this.loading = true; this.openone = true; getTjHyBgList(this.queryParams).then((res) => { this.dataList = res.data.list; this.total = res.data.total; this.loading = false; // 在获取数据后回显选中项 this.handleSelectionEcho(this.selectedId); }); }, // getList() { // this.loading = true; // this.openone = false; // Packagestlist(this.queryParams).then((res) => { // this.dataList = res.rows; // this.loading = false; // }); // }, handleQuery() { this.getAllList(); // 根据 selectedId 查找对应的项并回显选择 handleSelectionEcho(selectedId) { if (this.dataList.length > 0 && selectedId) { const selectedItem = this.dataList.find( (item) => item.pacCode === selectedId ); if (selectedItem) { this.$nextTick(() => { this.$refs.elTable.clearSelection(); // 清除之前的选择 this.$refs.elTable.toggleRowSelection(selectedItem, true); // 选中对应项 this.list = [selectedItem]; // 设置选中的项 }); } } }, // 清空所有选中的项 clearSelection() { this.$nextTick(() => { this.$refs.elTable.clearSelection(); // 清空所有选中的项 this.list = []; // 清空选中的列表 }); }, // 处理选择变化 handleSelectionChange(selection) { if (selection.length > 1) { // 如果选择了多行,保留最后一行 this.$refs.elTable.clearSelection(); // 清空所有选择 this.$refs.elTable.toggleRowSelection(selection.pop()); // 设置选择项 this.$refs.elTable.toggleRowSelection(selection[selection.length - 1]); // 重新选择最后一项 } this.list = selection; console.log(this.list); // 获取最后选择的行 this.list = [selection[selection.length - 1]]; }, // 确定选择 handleOk() { this.open = false; this.queryParams = { pid: "", pname: "", pym: "", checktype: "deptdict", page: 1, pageSize: 10, }; if (this.list.length === 1) { if (this.list.length > 0) { const pac = [ { pacCode: this.list[0].pacCode, pacName: this.list[0].pacName } pacCode: this.list[this.list.length - 1].pacCode, pacName: this.list[this.list.length - 1].pacName, }, ]; this.$emit("add", pac); } else { this.$message.warning("请选择一个项目"); } }, // 触发查询 handleQuery() { this.getAllList(); }, }, }; @@ -201,7 +231,6 @@ } .pag1 { width: 30%; width: 60%; } </style> src/views/doctor/check/index.vue
@@ -518,6 +518,7 @@ border height="460px" style="width: 96%; margin: 10px 10px" :row-class-name="tableRowClassName" > <el-table-column prop="project.proName" @@ -547,6 +548,18 @@ ></el-input> </template> </el-table-column> <el-table-column prop="exceptionDesc" label="异常" width="80px" align="center" > <template slot-scope="scope"> <el-checkbox v-model="scope.row.exceptionDesc" ></el-checkbox> </template> </el-table-column> <el-table-column label="规则" width="55"> <template slot-scope="scope"> <el-button @@ -556,12 +569,20 @@ > </template> </el-table-column> <el-table-column prop="project.proMetering" label="单位"> <el-table-column prop="project.proMetering" label="单位" width="55" > <!-- <template slot-scope="scope"> {{ scope.row.standard.company }} </template> --> </el-table-column> <el-table-column prop="project.proScope" label="参考范围"> <el-table-column prop="project.proScope" label="参考范围" width="70" > </el-table-column> <el-table-column prop="conclusion" @@ -580,37 +601,23 @@ ></el-input> </template> </el-table-column> <el-table-column prop="exceptionDesc" label="是否异常" width="80px" align="center" > <template slot-scope="scope"> <el-checkbox v-model="scope.row.exceptionDesc" ></el-checkbox> </template> </el-table-column> <el-table-column prop="isReturn" label="是否复诊" width="80px" label="复诊" width="60px" align="center" > <template slot-scope="scope"> <el-checkbox v-model="scope.row.isReturn"></el-checkbox> </template> </el-table-column> <el-table-column prop="resultType" label="结果类型"> <template slot-scope="scope"> <dict-tag :options="dict.type.tj_result_type" :value="scope.row.resultType" /> </template> </el-table-column> <el-table-column prop="isPositive" label="重大阳性"> <el-table-column prop="isPositive" label="重大阳性" width="55" > <template slot-scope="scope"> <el-switch v-model="scope.row.isPositive" @@ -618,6 +625,16 @@ inactive-value="0" @change="checkboxchange(scope.row)" ></el-switch> </template> </el-table-column> <el-table-column prop="resultType" label="结果建议"> <template> <el-popover placement="top" trigger="click" width="400"> <div>建议议结果建议结果建议结建议建议议结果建议结果建议结建议建议议结果建议结果建议结建议建议议结果建议结果建议结建议建议议结果建议结果建议结建议</div> <div slot="reference" class="jianyi"> 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 的手法首发 </div> </el-popover> </template> </el-table-column> </el-table> @@ -807,11 +824,12 @@ border height="460px" style="width: 96%; margin: 10px 10px" :row-class-name="tableRowClassName" > <el-table-column prop="project.proName" label="检测项目" width="150" width="100" fixed="left" > <!-- <template slot-scope="scope"> @@ -821,7 +839,7 @@ <el-table-column prop="proResult" label="检测结果" width="200" width="150" > <template slot-scope="scope"> <el-input @@ -845,34 +863,18 @@ > </template> </el-table-column> <el-table-column prop="project.proMetering" label="单位"> <el-table-column prop="project.proMetering" label="单位" width="55"> <!-- <template slot-scope="scope"> {{ scope.row.standard.company }} </template> --> </el-table-column> <el-table-column prop="project.proScope" label="参考范围"> <el-table-column prop="project.proScope" label="参考范围" width="80"> </el-table-column> <el-table-column prop="conclusion" label="结果结论" width="200" > <template slot-scope="scope"> <el-input size="mini" type="textarea" autosize v-model="scope.row.conclusion" autocomplete="off" placeholder="请输入检测结果" disabled ></el-input> </template> </el-table-column> <el-table-column prop="exceptionDesc" label="是否异常" width="80px" label="异常" width="55px" align="center" > <template slot-scope="scope"> @@ -883,23 +885,16 @@ </el-table-column> <el-table-column prop="isReturn" label="是否复诊" width="80px" label="复诊" width="55px" align="center" > <template slot-scope="scope"> <el-checkbox v-model="scope.row.isReturn"></el-checkbox> </template> </el-table-column> <el-table-column prop="resultType" label="结果类型"> <template slot-scope="scope"> <dict-tag :options="dict.type.tj_result_type" :value="scope.row.resultType" /> </template> </el-table-column> <el-table-column prop="isPositive" label="重大阳性"> <el-table-column prop="isPositive" label="重大阳性" width="55"> <template slot-scope="scope"> <el-switch v-model="scope.row.isPositive" @@ -907,6 +902,16 @@ inactive-value="0" @change="checkboxchange(scope.row)" ></el-switch> </template> </el-table-column> <el-table-column prop="resultType" label="结果建议"> <template> <el-popover placement="top" trigger="click" width="400"> <div></div> <div slot="reference" class="jianyi"> </div> </el-popover> </template> </el-table-column> </el-table> @@ -1498,6 +1503,12 @@ }, methods: { tableRowClassName({ row }) { if (row.exceptionDesc) { return "warning-row"; } return ""; }, getbzlist() { getDeptAdvice(this.queryParam1).then((response) => { this.deptAdviceList = response.data.list; @@ -1729,11 +1740,11 @@ this.focusrow = datas; this.proResult = datas; var pattern3 = new RegExp("[0-9]+"); console.log(typeof this.proResult.proResult); if (pattern3.test(this.proResult)) { let data = { proId: this.focusrow.proId, cusId: this.tableAll.cusId, keyNum: this.proResult, tjNum: this.tableAll.tjNumber, keyNum: this.proResult.proResult, }; @@ -2891,4 +2902,18 @@ display: flex; justify-content: center; } .el-table__body tr:hover > td { background-color: transparent !important; /* 移除默认的 hover 效果 */ } .el-table .warning-row { background: #ffe6e6 !important; /* 轻微的红色背景 */ } .jianyi { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-overflow: ellipsis; cursor: pointer; /* 鼠标悬停时显示手型,提示可以点击 */ } </style> src/views/system/dept/index.vue
@@ -322,7 +322,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 +366,12 @@ </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> @@ -402,12 +408,14 @@ } }; return { showPackagese: false, // 部门名称 deptName: undefined, // 遮罩层 loading: true, hospList: [], parentNameList: [], total: 0, // 显示搜索条件 showSearch: true, // 表格树数据 @@ -500,18 +508,28 @@ 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 +676,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 +710,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;