From 7a755c62d164c27382f4e8fd15d5043cbd7adf4e Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Sat, 30 Mar 2024 22:03:42 +0800 Subject: [PATCH] doctor --- src/components/doctorCheck/CheckItemList.vue | 268 ++++++++---------- .../PatientRegisterEditGroupBatch.vue | 85 ++---- .../PatientRegisterEditItemBatch.vue | 13 +- .../patientRegister/PatientRegisterList.vue | 7 +- .../sumDoctorCheck/SumAsbItemStatus.vue | 2 +- .../sumDoctorCheck/SumDiagnosis.vue | 3 +- src/components/sumDoctorCheck/SumSug.vue | 2 +- src/store/index.js | 11 +- src/views/doctorCheck/sumDoctorCheck.vue | 32 +-- 9 files changed, 186 insertions(+), 237 deletions(-) diff --git a/src/components/doctorCheck/CheckItemList.vue b/src/components/doctorCheck/CheckItemList.vue index dc5ffc9..038f5ea 100644 --- a/src/components/doctorCheck/CheckItemList.vue +++ b/src/components/doctorCheck/CheckItemList.vue @@ -1,48 +1,23 @@ @@ -54,11 +29,11 @@ import { arrayExistObj, deepCopy } from '../../utlis/proFunc' export default { components: {}, - props:["isCheckPicture","registerCheckId"], + props: ["isCheckPicture", "registerCheckId"], data() { return { - resultStatus:[], //结果状态提示数据 - tipsNormal:{ + resultStatus: [], //结果状态提示数据 + tipsNormal: { displayName: "正常", dataInputPrompt: "正常", reportPrompt: "正常", @@ -67,21 +42,21 @@ export default { dataInputBackgroundColor: 16777215, dataInputFontColor: 0, }, //正常提示 - tipsError:{}, //错误提示 - tipsNegative:{}, //阴性提示 - tipsLowPositive:{}, //弱阳性提示 - tipsPositive:{}, //阳性提示 - tipsLow:{}, //偏低提示 - tipsHigh:{}, //偏高提示 - tipsSuperLow:{}, //超低提示 - tipsSuperHigh:{}, //超高提示 + tipsError: {}, //错误提示 + tipsNegative: {}, //阴性提示 + tipsLowPositive: {}, //弱阳性提示 + tipsPositive: {}, //阳性提示 + tipsLow: {}, //偏低提示 + tipsHigh: {}, //偏高提示 + tipsSuperLow: {}, //超低提示 + tipsSuperHigh: {}, //超高提示 restaurants: [], //结果模版 currentRow: -1, //当前操作的行 }; }, - created() {}, + created() { }, //挂载完成 mounted() { @@ -89,35 +64,35 @@ export default { }, computed: { - ...mapState(["window","dataTransOpts", "dict", "doctorCheck"]), + ...mapState(["window", "dataTransOpts", "dict", "doctorCheck"]), }, methods: { - dictInit(){ + dictInit() { //获取结果状态提示数据 - getapi('/api/app/result-status').then(res =>{ - if(res.code != -1){ + getapi('/api/app/result-status').then(res => { + if (res.code != -1) { this.resultStatus = res.data.items this.resultStatus.forEach(e => { - if(e.displayName.indexOf("正常") > -1){ - this.colorTrans(e,'tipsNormal') - }else if(e.displayName.indexOf("错误") > -1){ - this.colorTrans(e,'tipsError') - }else if(e.displayName.indexOf("阴性") > -1){ - this.colorTrans(e,'tipsNegative') - }else if(e.displayName.indexOf("弱阳性") > -1){ - this.colorTrans(e,'tipsLowPositive') - }else if(e.displayName.indexOf("阳性") > -1){ - this.colorTrans(e,'tipsPositive') - }else if(e.displayName.indexOf("偏低") > -1){ - this.colorTrans(e,'tipsLow') - }else if(e.displayName.indexOf("偏高") > -1){ - this.colorTrans(e,'tipsHigh') - }else if(e.displayName.indexOf("危急值下限") > -1){ - this.colorTrans(e,'tipsSuperLow') - }else if(e.displayName.indexOf("危急值上限") > -1){ - this.colorTrans(e,'tipsSuperHigh') + if (e.displayName.indexOf("正常") > -1) { + this.colorTrans(e, 'tipsNormal') + } else if (e.displayName.indexOf("错误") > -1) { + this.colorTrans(e, 'tipsError') + } else if (e.displayName.indexOf("阴性") > -1) { + this.colorTrans(e, 'tipsNegative') + } else if (e.displayName.indexOf("弱阳性") > -1) { + this.colorTrans(e, 'tipsLowPositive') + } else if (e.displayName.indexOf("阳性") > -1) { + this.colorTrans(e, 'tipsPositive') + } else if (e.displayName.indexOf("偏低") > -1) { + this.colorTrans(e, 'tipsLow') + } else if (e.displayName.indexOf("偏高") > -1) { + this.colorTrans(e, 'tipsHigh') + } else if (e.displayName.indexOf("危急值下限") > -1) { + this.colorTrans(e, 'tipsSuperLow') + } else if (e.displayName.indexOf("危急值上限") > -1) { + this.colorTrans(e, 'tipsSuperHigh') } }); } @@ -132,7 +107,7 @@ export default { // reportFontColor: 1070166, // dataInputBackgroundColor: 321313, // dataInputFontColor: 12991019, - colorTrans(dataColor,frontColor){ + colorTrans(dataColor, frontColor) { let tempColor = '000000' + Number(dataColor.dataInputBackgroundColor).toString(16) let backgroundColor = '#' + tempColor.substring(tempColor.length - 6) tempColor = '000000' + Number(dataColor.dataInputFontColor).toString(16) @@ -140,59 +115,59 @@ export default { this[frontColor] = Object.assign( {}, dataColor, - {backgroundColor,color} + { backgroundColor, color } ) - console.log(`this.${frontColor}`,this[frontColor]) + console.log(`this.${frontColor}`, this[frontColor]) }, // "referenceRangeValue": "15-55", // "referenceRangeTypeFlag": "1", // "criticalRangeValue": null, // "result" - madeTooltips(index){ + madeTooltips(index) { // let ts = confirm('提示') let checkItem = this.doctorCheck.checkItemList[index] let tooltips = 'tipsNormal' checkItem.class = tooltips - let referenceRangeTypeFlag = checkItem.referenceRangeTypeFlag||'0' //参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素 + let referenceRangeTypeFlag = checkItem.referenceRangeTypeFlag || '0' //参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素 // console.log('madeTooltips',index,referenceRangeTypeFlag) switch (referenceRangeTypeFlag) { case '3': // 1 是数字型,3 是性激素期 case '1': // console.log('1、3') - if(checkItem.result){ - let tempResult = checkItem.result.replaceAll('<','').replaceAll('>','').replaceAll('=','').replaceAll('≤','').replaceAll('≥','').replaceAll(' ','') - console.log('tempResult',isNaN(tempResult),tempResult) - if(isNaN(tempResult)) break; + if (checkItem.result) { + let tempResult = checkItem.result.replaceAll('<', '').replaceAll('>', '').replaceAll('=', '').replaceAll('≤', '').replaceAll('≥', '').replaceAll(' ', '') + console.log('tempResult', isNaN(tempResult), tempResult) + if (isNaN(tempResult)) break; let result = Number(tempResult) - - if(checkItem.referenceRangeValue){ + + if (checkItem.referenceRangeValue) { let criticalRangeValue = checkItem.criticalRangeValue - let valueArr = checkItem.referenceRangeValue.split('-') - if(valueArr.length == 1) valueArr.unshift(0) - + let valueArr = checkItem.referenceRangeValue.split('-') + if (valueArr.length == 1) valueArr.unshift(0) + // console.log('valueArr',checkItem.referenceRangeValue,valueArr) - if(criticalRangeValue){ + if (criticalRangeValue) { let criticalArr = criticalRangeValue.split('-') - if(criticalArr.length == 1) criticalArr.unshift(0) + if (criticalArr.length == 1) criticalArr.unshift(0) // console.log('criticalArr',checkItem.criticalRangeValue,criticalArr) - if(result < Number(criticalArr[0])){ + if (result < Number(criticalArr[0])) { tooltips = 'tipsSuperLow' - }else if(result > Number(criticalArr[1])){ - tooltips = 'tipsSuperHigh' - }else if(result < Number(valueArr[0])){ + } else if (result > Number(criticalArr[1])) { + tooltips = 'tipsSuperHigh' + } else if (result < Number(valueArr[0])) { tooltips = 'tipsLow' - }else if(result > Number(valueArr[1])){ - tooltips = 'tipsHigh' + } else if (result > Number(valueArr[1])) { + tooltips = 'tipsHigh' } - }else{ - if(result < Number(valueArr[0])){ + } else { + if (result < Number(valueArr[0])) { tooltips = 'tipsLow' - }else if(result > Number(valueArr[1])){ + } else if (result > Number(valueArr[1])) { tooltips = 'tipsHigh' } } @@ -200,29 +175,29 @@ export default { //错误值校验 let errArr = [] - if(checkItem.inputCheck){ + if (checkItem.inputCheck) { errArr = checkItem.inputCheck.split('-') - if(errArr.length == 1) errArr.unshift(-1) - } - if(errArr && errArr.length > 1){ - if(result < Number(errArr[0]) || result > Number(errArr[1])){ + if (errArr.length == 1) errArr.unshift(-1) + } + if (errArr && errArr.length > 1) { + if (result < Number(errArr[0]) || result > Number(errArr[1])) { tooltips = 'tipsError' - console.log('checkItem',checkItem) + console.log('checkItem', checkItem) } } } break; case '2': - if(checkItem.result){ - if(checkItem.result.indexOf('阴性') > -1 || checkItem.result.indexOf('-') > -1){ + if (checkItem.result) { + if (checkItem.result.indexOf('阴性') > -1 || checkItem.result.indexOf('-') > -1) { tooltips = 'tipsNegative' - }else if(checkItem.result.indexOf('弱阳性') > -1 || checkItem.result.indexOf('±') > -1){ + } else if (checkItem.result.indexOf('弱阳性') > -1 || checkItem.result.indexOf('±') > -1) { tooltips = 'tipsLowPositive' - }else if(checkItem.result.indexOf('阳性') > -1 || checkItem.result.indexOf('+') > -1){ + } else if (checkItem.result.indexOf('阳性') > -1 || checkItem.result.indexOf('+') > -1) { tooltips = 'tipsPositive' } - } - break; + } + break; default: break; } @@ -236,12 +211,12 @@ export default { }, //项目列为计算函数 - computeFun(index){ + computeFun(index) { let checkItem = this.doctorCheck.checkItemList[index] - console.log('checkItem',checkItem) + console.log('checkItem', checkItem) let body = { - registerCheckId:checkItem.registerCheckId, - items:[] + registerCheckId: checkItem.registerCheckId, + items: [] } this.doctorCheck.checkItemList.forEach(e => { @@ -251,15 +226,15 @@ export default { }) }); let lfind = -1 - postapi('/api/app/diagnosisfunction/getcalculationfunctionresult',body).then(res => { - if(res.code != -1){ + postapi('/api/app/diagnosisfunction/getcalculationfunctionresult', body).then(res => { + if (res.code != -1) { // console.log('res.data',res.data) res.data.items.forEach(e => { - lfind = arrayExistObj(this.doctorCheck.checkItemList,"itemId",e.itemId) - if(lfind > -1){ - if(e.result != this.doctorCheck.checkItemList[lfind].result){ + lfind = arrayExistObj(this.doctorCheck.checkItemList, "itemId", e.itemId) + if (lfind > -1) { + if (e.result != this.doctorCheck.checkItemList[lfind].result) { this.doctorCheck.checkItemList[lfind].result = e.result - console.log('e',lfind,this.doctorCheck.checkItemList[lfind]) + console.log('e', lfind, this.doctorCheck.checkItemList[lfind]) this.madeTooltips(lfind) } } @@ -277,13 +252,11 @@ export default { //检查组合项目下所包含的明细项目 checkItemList(RegisterCheckId) { // this.doctorCheck.checkItem = null - if(!RegisterCheckId){ - this.doctorCheck.checkItemList = [] + if (!RegisterCheckId) { + this.doctorCheck.checkItemList = [] return } - console.log( - `/api/app/registercheckitem/getlistinregistercheckid?RegisterCheckId=${RegisterCheckId}` - ); + console.log(`/api/app/registercheckitem/getlistinregistercheckid?RegisterCheckId=${RegisterCheckId}`); getapi( `/api/app/registercheckitem/getlistinregistercheckid?RegisterCheckId=${RegisterCheckId}&PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}` ) @@ -291,7 +264,7 @@ export default { // console.log("checkItemList", res.data); if (res.code == 1) { this.doctorCheck.checkItemList = res.data; - this.doctorCheck.checkItemList.forEach((e,i) => { + this.doctorCheck.checkItemList.forEach((e, i) => { this.madeTooltips(i) }); this.enterToTab(); @@ -325,20 +298,20 @@ export default { }; }, handleSelect(item) { - console.log('item',item); + console.log('item', item); }, //回车替代tab键 enterToTab() { // console.log('enterToTab'); this.$nextTick(() => { - let inputs = document.querySelectorAll(["textarea","input"]); //用数组可以读取多个标签的元素 //.inline-input - + let inputs = document.querySelectorAll(["textarea", "input"]); //用数组可以读取多个标签的元素 //.inline-input + // 为每个输入框添加键盘事件监听器 - inputs.forEach((input,i) => { + inputs.forEach((input, i) => { // console.log('input',input); input.addEventListener('keydown', (event) => { - + // 如果按下的是回车键 // console.log('data-lineModeFlag',input.getAttribute('data-lineModeFlag')); @@ -355,17 +328,17 @@ export default { // console.log('inputs[i+1]',inputs[i+1]); // console.log('disabled',inputs[i+1].getAttribute('disabled')); // console.log('class',inputs[i+1].getAttribute('class')); - for(let j=i+1; j 600 ? (window.pageHeight - 250) : 350) + 'px'") */ ::v-deep .tipsNegative .el-textarea__inner { - background-color: v-bind("tipsNegative.backgroundColor") !important; + background-color: v-bind("tipsNegative.backgroundColor") !important; color: v-bind("tipsNegative.color") !important; } /*弱阳性 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */ ::v-deep .tipsLowPositive .el-textarea__inner { - background-color: v-bind("tipsLowPositive.backgroundColor") !important; + background-color: v-bind("tipsLowPositive.backgroundColor") !important; color: v-bind("tipsLowPositive.color") !important; } /*阳性 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */ ::v-deep .tipsPositive .el-textarea__inner { - background-color: v-bind("tipsPositive.backgroundColor") !important; + background-color: v-bind("tipsPositive.backgroundColor") !important; color: v-bind("tipsPositive.color") !important; } /*偏低 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */ ::v-deep .tipsLow .el-textarea__inner { - background-color: v-bind("tipsLow.backgroundColor") !important; + background-color: v-bind("tipsLow.backgroundColor") !important; color: v-bind("tipsLow.color") !important; } /*偏高 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */ ::v-deep .tipsHigh .el-textarea__inner { - background-color: v-bind("tipsHigh.backgroundColor") !important; + background-color: v-bind("tipsHigh.backgroundColor") !important; color: v-bind("tipsHigh.color") !important; } /*超低 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */ ::v-deep .tipsSuperLow .el-textarea__inner { - background-color: v-bind("tipsSuperLow.backgroundColor") !important; + background-color: v-bind("tipsSuperLow.backgroundColor") !important; color: v-bind("tipsSuperLow.color") !important; } /*偏高 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */ ::v-deep .tipsSuperHigh .el-textarea__inner { - background-color: v-bind("tipsSuperHigh.backgroundColor") !important; + background-color: v-bind("tipsSuperHigh.backgroundColor") !important; color: v-bind("tipsSuperHigh.color") !important; } - - diff --git a/src/components/patientRegister/PatientRegisterEditGroupBatch.vue b/src/components/patientRegister/PatientRegisterEditGroupBatch.vue index fcba391..991326b 100644 --- a/src/components/patientRegister/PatientRegisterEditGroupBatch.vue +++ b/src/components/patientRegister/PatientRegisterEditGroupBatch.vue @@ -1,61 +1,34 @@