diff --git a/src/components/follow/FollowCriticalCheck.vue b/src/components/follow/FollowCriticalCheck.vue index 4c6579b..611f1b1 100644 --- a/src/components/follow/FollowCriticalCheck.vue +++ b/src/components/follow/FollowCriticalCheck.vue @@ -7,74 +7,50 @@ - + - - - + size="small" @clear="clear"> + + + - + - + - + - + - + - - + + + @@ -82,39 +58,22 @@ - + - + - + - + @@ -170,19 +129,19 @@ export default { startPoint: -1, // 多选起点 -1 表示选择 endPoint: -1, // 多选终点 -1 表示未选择 tableData: { - criticalRangeValue: "", //危急值范围 - isCriticalValue: "Y", //危急值标志 - criticalValueContent: "", // 危急值 - criticalValueCreatorName:"", - criticalValueCreationTime:"", - isCriticalValueAudit:"", - isReview:"N", - isFollowUp:"N", - followUpCreatorName:"", - followUpCreationTime:"", - criticalRangeValue:"", - diagnosisLevelId:null - }, + criticalRangeValue: "", //危急值范围 + isCriticalValue: "Y", //危急值标志 + criticalValueContent: "", // 危急值 + criticalValueCreatorName: "", + criticalValueCreationTime: "", + isCriticalValueAudit: "", + isReview: "N", + isFollowUp: "N", + followUpCreatorName: "", + followUpCreationTime: "", + criticalRangeValue: "", + diagnosisLevelId: null + }, tableDataCurrentRow: {}, // 当前被选中的行 multipleSelection: [], //选中的数据列表 @@ -286,25 +245,25 @@ export default { this.loadOptsInit = Object.assign({}, this.loadOpts) getapi("/api/app/diagnosis-level/in-filter").then((res) => { - if (res.code > -1) { - this.dict.diagnosisLevel = res.data; - } - }); - if(this.doctorCheck.combinationCriticalValue){ - getapi(`/api/app/registercheck/getregistercheck?id=${this.doctorCheck.RegisterCheckId}`) + if (res.code > -1) { + this.dict.diagnosisLevel = res.data; + } + }); + if (this.doctorCheck.combinationCriticalValue) { + getapi(`/api/app/registercheck/getregistercheck?id=${this.doctorCheck.RegisterCheckId}`) .then(res => { - if(res.code>-1){ - this.tableData=res.data + if (res.code > -1) { + this.tableData = res.data } }) - }else{ - postapi("/api/app/RegisterCheckItem/GetRegisterCheckItem",{ - registerCheckId:this.doctorCheck.RegisterCheckId, - itemId:this.doctorCheck.singleDetailedProject.itemId + } else { + postapi("/api/app/RegisterCheckItem/GetRegisterCheckItem", { + registerCheckId: this.doctorCheck.RegisterCheckId, + itemId: this.doctorCheck.singleDetailedProject.itemId }) .then(res => { - if(res.code>-1){ - this.tableData=res.data + if (res.code > -1) { + this.tableData = res.data } }) // this.tableData=this.doctorCheck.singleDetailedProject @@ -686,45 +645,53 @@ export default { this.dataTransOpts.refresh.register_check_asbitem.M++ //触发所选组合项目刷新 // } }, - clear(){ - this.tableData.diagnosisLevelId=null + clear() { + this.tableData.diagnosisLevelId = null }, // 导入企业(青藏公司)数据 btnImportOrgData() { - if(this.doctorCheck.combinationCriticalValue){ - postapi('/api/app/RegisterCheck/UpdateRegisterCheckCritical',{ - registerCheckId:this.doctorCheck.RegisterCheckId, - isCriticalValue:this.tableData.isCriticalValue, - isFollowUp:this.tableData.isFollowUp, - criticalValueContent:this.tableData.criticalValueContent, - isCriticalValueAudit:this.tableData.isCriticalValueAudit, - isReview:this.tableData.isReview, - diagnosisLevelId:this.tableData.diagnosisLevelId - }).then(res => { - this.doctorCheck.RegisterCheckEdit.isCriticalValue=this.tableData.isCriticalValue + let criticalValueContent = this.tableData.criticalValueContent + if (criticalValueContent) { + let tempName = (this.tableData.itemName || this.tableData.asbitemName) + '异常' + if (!criticalValueContent.includes(tempName)) { + criticalValueContent = tempName + ' ' + criticalValueContent + } + } + + if (this.doctorCheck.combinationCriticalValue) { + postapi('/api/app/RegisterCheck/UpdateRegisterCheckCritical', { + registerCheckId: this.doctorCheck.RegisterCheckId, + isCriticalValue: this.tableData.isCriticalValue, + isFollowUp: this.tableData.isFollowUp, + criticalValueContent, + isCriticalValueAudit: this.tableData.isCriticalValueAudit, + isReview: this.tableData.isReview, + diagnosisLevelId: this.tableData.diagnosisLevelId + }).then(res => { + this.doctorCheck.RegisterCheckEdit.isCriticalValue = this.tableData.isCriticalValue this.dialogWin.FollowCriticalCheck = false - this.tableData=this.$options.data.tableData + this.tableData = this.$options.data.tableData }) - }else{ - postapi('/api/app/RegisterCheckItem/UpdateRegisterCheckItemCritical',{ - registerCheckId:this.tableData.registerCheckId, - isCriticalValue:this.tableData.isCriticalValue, - isFollowUp:this.tableData.isFollowUp, - criticalValueContent:this.tableData.criticalValueContent, - isCriticalValueAudit:this.tableData.isCriticalValueAudit, - isReview:this.tableData.isReview, - itemId:this.tableData.itemId, - diagnosisLevelId:this.tableData.diagnosisLevelId - }).then(res => { - for(let i=0;i { + for (let i = 0; i < this.doctorCheck.checkItemList.length; i++) { + console.log(this.doctorCheck.checkItemList[i]) + if (this.doctorCheck.checkItemList[i].itemId == this.tableData.itemId) { + this.doctorCheck.checkItemList[i].isCriticalValue = this.tableData.isCriticalValue + break; + } } - } this.dialogWin.FollowCriticalCheck = false - this.tableData=this.$options.data.tableData + this.tableData = this.$options.data.tableData }) } },