From e5e271ee7a729b0e916b40abb8754a588ebe0415 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Tue, 23 Apr 2024 20:26:25 +0800 Subject: [PATCH] doctor --- src/components/doctorCheck/ButtonList.vue | 2 +- src/components/doctorCheck/CheckPicture.vue | 14 +- .../doctorCheck/RegisterCheckEdit.vue | 55 +- src/components/patientRegister/PatientLis.vue | 31 +- .../patientRegister/PatientRegisterEdit.vue | 2 +- .../PatientRegisterForChoose.vue | 45 +- .../patientRegister/patientRegisterQuery.vue | 146 +++--- src/components/sumDoctorCheck/ButtonList.vue | 37 +- src/components/sumDoctorCheck/SumSug.vue | 485 +++++++++++------- src/router/index.js | 3 +- src/views/doctorCheck/doctorCheck.vue | 13 +- src/views/doctorCheck/sumDoctorCheck.vue | 8 +- 12 files changed, 503 insertions(+), 338 deletions(-) diff --git a/src/components/doctorCheck/ButtonList.vue b/src/components/doctorCheck/ButtonList.vue index 9cb6e03..d0aa1af 100644 --- a/src/components/doctorCheck/ButtonList.vue +++ b/src/components/doctorCheck/ButtonList.vue @@ -560,7 +560,7 @@ export default { //总检 toSumDoctorCheck() { this.dataTransOpts.tableS.patient_register = Object.assign({}, this.doctorCheck.prBase) - this.$router.push({ path: "/sumDoctorCheck" }); + this.$router.push({ path: "/sumDoctorCheck", query: { patient_register: this.dataTransOpts.tableS.patient_register} }); }, }, diff --git a/src/components/doctorCheck/CheckPicture.vue b/src/components/doctorCheck/CheckPicture.vue index f58ac0d..41c5ccd 100644 --- a/src/components/doctorCheck/CheckPicture.vue +++ b/src/components/doctorCheck/CheckPicture.vue @@ -154,15 +154,11 @@ export default { getapi( `/api/app/registercheckpicture/getregistercheckpictureinregistercheckid?RegisterCheckId=${registerCheckId}` ).then((res) => { - if (res.code != -1) { - res.data.forEach((e) => { - this.checkPictures.push( - Object.assign( - { isPrintTrans: e.isPrint == "Y" ? true : false }, - e - ) - ); - }); + if (res.code > -1) { + this.checkPictures = res.data + this.checkPictures.forEach(e => { + e.isPrintTrans = e.isPrint == "Y" ? true : false + }); } }); }, diff --git a/src/components/doctorCheck/RegisterCheckEdit.vue b/src/components/doctorCheck/RegisterCheckEdit.vue index 529f2dc..698e2a8 100644 --- a/src/components/doctorCheck/RegisterCheckEdit.vue +++ b/src/components/doctorCheck/RegisterCheckEdit.vue @@ -1,41 +1,34 @@ diff --git a/src/components/sumDoctorCheck/ButtonList.vue b/src/components/sumDoctorCheck/ButtonList.vue index 8d0cf4a..6ba06c5 100644 --- a/src/components/sumDoctorCheck/ButtonList.vue +++ b/src/components/sumDoctorCheck/ButtonList.vue @@ -11,30 +11,36 @@ :disabled="sumBtnDisabled('save')">保存
- 修改 + 修改
- 取消总检 + 取消总检
审核
- 取消审核 -
+ 取消审核 +
- 体检报告 + 体检报告
- 复查 + 复查
- 干预措施 + 干预措施
@@ -101,7 +107,7 @@ export default { computed: { ...mapState(["window", "dict", "dataTransOpts", "patientRegister", "doctorCheck", "sumDoctorCheck"]), - + }, methods: { @@ -121,7 +127,7 @@ export default { toDoctorCheck() { // this.doctorCheck.prBase = Object.assign({},this.dataTransOpts.tableS.patient_register) // this.patientRegister.photo = this.doctorCheck.prBase.photo - this.$router.push({ path: "/doctorCheck" }); + this.$router.push({ path: "/doctorCheck", query: { patient_register: this.dataTransOpts.tableS.patient_register} }); }, // 按钮可用 @@ -145,7 +151,7 @@ export default { if (patientRegister.completeFlag && patientRegister.completeFlag == '3' && patientRegister.isAudit != 'Y') ret = false break; case 'unAudit': - case 'reCheck': + case 'reCheck': case 'report': if (patientRegister.completeFlag && patientRegister.completeFlag == '3' && patientRegister.isAudit && patientRegister.isAudit == 'Y') ret = false break; @@ -170,9 +176,9 @@ export default { // this.saveSuggestion(); let body = { patientRegisterId: this.dataTransOpts.tableS.patient_register.id, - summaryDoctorId: this.dataTransOpts.tableS.patient_register.summaryDoctorId||null, + summaryDoctorId: this.dataTransOpts.tableS.patient_register.summaryDoctorId || null, summaryDate: this.dataTransOpts.tableS.patient_register.summaryDate, - medicalConclusionId:this.dataTransOpts.tableS.patient_register.medicalConclusionId||null, + medicalConclusionId: this.dataTransOpts.tableS.patient_register.medicalConclusionId || null, sumSummarys: this.sumDoctorCheck.summaryList, sumSuggestions: this.sumDoctorCheck.suggestionList } @@ -330,11 +336,11 @@ export default { .catch(err => { this.$message.warning(err); }); - + }, - + //复查 reCheck() { @@ -459,5 +465,4 @@ export default { margin-top: 10px; margin-left: 10px; text-align: center; -} - \ No newline at end of file +} \ No newline at end of file diff --git a/src/components/sumDoctorCheck/SumSug.vue b/src/components/sumDoctorCheck/SumSug.vue index 23b61cc..64f6a8b 100644 --- a/src/components/sumDoctorCheck/SumSug.vue +++ b/src/components/sumDoctorCheck/SumSug.vue @@ -1,181 +1,215 @@ @@ -197,6 +231,19 @@ export default { suggestionCurRow: 0, //当前操作建议的行 diagnosises: [], // 诊断 collapse: false, // 折叠/展开全部建议 + + dialogWinSymbols: false, + selection: { // 光标位置 + start: 0, end: 0 + }, + symbols: [], //特殊符号 + curResult: "", // 当前输入框内容 + + dbclObj: { // 输入特殊符号前,双击的对象 + index: -1, + colName: '', // + subIndex: -1, + } }; }, @@ -245,11 +292,19 @@ export default { // }, // 获取诊断数据 dictInit() { + // 获取诊断 postapi('/api/app/diagnosis/getlistinsuggestion', {}).then(res => { if (res.code > -1) { this.diagnosises = res.data } }) + + //获取结果状态提示数据 + postapi('/api/app/CommonChar/GetCommonCharList', {}).then(res => { + if (res.code >= 0) { + this.symbols = res.data + } + }) }, //增加建议 @@ -291,16 +346,16 @@ export default { // 单个折叠展开建议 btnCollapseAll() { this.collapse = !this.collapse - this.sumDoctorCheck.suggestionList.forEach((e,index) => { + this.sumDoctorCheck.suggestionList.forEach((e, index) => { e.collapse = this.collapse - this.$set(this.sumDoctorCheck.suggestionList,index,e) + this.$set(this.sumDoctorCheck.suggestionList, index, e) }); }, // 单个折叠展开建议 - btnCollapse(data,index,row) { - row.collapse=!row.collapse - this.$set(data,index,row) + btnCollapse(data, index, row) { + row.collapse = !row.collapse + this.$set(data, index, row) // this.sumDoctorCheck.suggestionList[index]['collapse'] = !this.sumDoctorCheck.suggestionList[index]['collapse'] this.$nextTick(() => { this.$refs['tableSuggestion'].doLayout() @@ -328,7 +383,7 @@ export default { distinguishCancelAndClose: true, confirmButtonText: '重新生成总检信息', cancelButtonText: '获取上次总检信息', - showClose:false + showClose: false }) isGetExistData = 'N' } catch (error) { @@ -449,7 +504,7 @@ export default { // '人员已锁定,不可执行此操作' if (patientRegister.isLock && patientRegister.isLock == 'Y') return ret - if(btnType && btnType == 'collapse') ret = false + if (btnType && btnType == 'collapse') ret = false if (patientRegister.completeFlag && patientRegister.completeFlag != '3') ret = false @@ -640,6 +695,71 @@ export default { }); }, + // 打开特殊符号输入 + openSymbols(index, colName, subIndex) { + if (this.dataTransOpts.tableS.patient_register.completeFlag == '3') return + this.dbclObj = { index, colName, subIndex } + switch (colName) { + case 'suggestionTitle': + this.curResult = this.sumDoctorCheck.suggestionList[index][colName] + break; + default: + this.curResult = this.sumDoctorCheck.suggestionList[index][colName][subIndex]['suggestionContent'] + break; + } + this.dialogWinSymbols = true + this.watchSelection() + }, + + // 光标位置插入特殊符号 + insertSymbols(symbols) { + let result = this.curResult || '' + if (result) { + result = result.substring(0, this.selection.start) + symbols + result.substring(this.selection.end) + } else { + result = symbols + } + this.curResult = result + this.selection.start++ + this.selection.end++ + }, + // 获取光标位置的函数 + getCaretPosition() { + let input = document.getElementById('resultBox'); + this.selection.start = input.selectionStart; + this.selection.end = input.selectionEnd; + // console.log('selection',this.selection) + }, + + watchSelection() { + this.$nextTick(() => { + let that = this + let resultBox = document.getElementById('resultBox'); //用数组可以读取多个标签的元素 //.inline-input + // 绑定键盘事件到文本框 + resultBox.addEventListener('click', function (event) { + // 获取光标位置 + that.getCaretPosition() + }) + + resultBox.addEventListener('input', function (event) { + // 获取光标位置 + that.getCaretPosition() + }) + }) + }, + + btnOkResult() { + switch (this.dbclObj.colName) { + case 'suggestionTitle': + this.sumDoctorCheck.suggestionList[this.dbclObj.index][this.dbclObj.colName] = this.curResult + break; + default: + this.sumDoctorCheck.suggestionList[this.dbclObj.index][this.dbclObj.colName][this.dbclObj.subIndex]['suggestionContent'] = this.curResult + break; + } + this.dialogWinSymbols = false + }, + findEl(fEl, nodeName) { let el = null for (let i = 0; i < fEl.children.length; i++) { @@ -779,14 +899,17 @@ export default { ::v-deep .el-table__empty-text { line-height: 22px; } + ::v-deep .el-tag { - color: black; - padding: 0 5px; - font-size: 14px; + color: black; + padding: 0 5px; + font-size: 14px; } + ::v-deep .el-table__empty-block { - min-height: 22px; + min-height: 22px; } + ::v-deep .el-input__inner { min-height: 23px; height: 23px; diff --git a/src/router/index.js b/src/router/index.js index 476586c..7b2b66b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,5 +1,6 @@ import Vue from "vue"; import VueRouter from "vue-router"; +import vuex from "vuex" // import HomeView from "../views/HomeView.vue"; import login from "@/views/login/Login.vue"; @@ -373,7 +374,7 @@ const routes = [{ path: "/doctorCheck", name: "体检医生诊台", component: () => - import ("../views/doctorCheck/doctorCheck.vue"), + import ("../views/doctorCheck/doctorCheck.vue") }, { path: "/sumDoctorCheck", diff --git a/src/views/doctorCheck/doctorCheck.vue b/src/views/doctorCheck/doctorCheck.vue index 02f82c6..03fac22 100644 --- a/src/views/doctorCheck/doctorCheck.vue +++ b/src/views/doctorCheck/doctorCheck.vue @@ -92,6 +92,13 @@ export default { }, created() { + // console.log("this.$route.query", this.$route.query) + if(this.$route.query.patient_register){ + this.dataTransOpts.tableS.patient_register = this.$route.query.patient_register + }else{ + this.dataTransOpts.tableS.patient_register = { id: '', patientRegisterNo: ''} + } + if (this.$peisAPI) { // this.$message.info("此功能,需要在壳客户端才可运行!"); // console.log('this.$peisAPI',this.$peisAPI) @@ -277,7 +284,7 @@ export default { //' 请选择体检人员' if (!patientRegister.id) return ret - + if (btnFlagName == 'btnCheckHistory' || btnFlagName == 'btnReport') return false @@ -308,7 +315,7 @@ export default { case 'btnExpPic': // 导图(图片上传) case 'btnSavePic': // 图片保存 case 'btnDelImage': // 图片删除 - console.log('btnFlagName RegisterCheckEdit',btnFlagName,RegisterCheckEdit.completeFlag) + // console.log('btnFlagName RegisterCheckEdit', btnFlagName, RegisterCheckEdit.completeFlag) if (RegisterCheckEdit.completeFlag && RegisterCheckEdit.completeFlag == '0') ret = false break; case 'audit': @@ -318,7 +325,7 @@ export default { if (RegisterCheckEdit.completeFlag && RegisterCheckEdit.completeFlag != '0' && RegisterCheckEdit.isAudit && RegisterCheckEdit.isAudit != 'N') ret = false break; case 'btnCheckHistory': - case 'btnReport': + case 'btnReport': default: ret = false break; diff --git a/src/views/doctorCheck/sumDoctorCheck.vue b/src/views/doctorCheck/sumDoctorCheck.vue index 9a027e1..7100d5e 100644 --- a/src/views/doctorCheck/sumDoctorCheck.vue +++ b/src/views/doctorCheck/sumDoctorCheck.vue @@ -88,7 +88,13 @@ export default { }; }, - created() { }, + created() { + if(this.$route.query.patient_register){ + this.dataTransOpts.tableS.patient_register = this.$route.query.patient_register + }else{ + this.dataTransOpts.tableS.patient_register = { id: '', patientRegisterNo: ''} + } + }, //挂载完成 mounted() {