From a18827ec92984fd2c9b87d71b2e3947d194ed7cd Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Wed, 25 Sep 2024 11:36:00 +0800 Subject: [PATCH] pacslook --- src/assets/css/global.css | 4 + src/components/common/LocalConfig.vue | 15 +- src/components/doctorCheck/PacsDcmList.vue | 197 ++++++++++++++------- 3 files changed, 150 insertions(+), 66 deletions(-) diff --git a/src/assets/css/global.css b/src/assets/css/global.css index b847969..f942eff 100644 --- a/src/assets/css/global.css +++ b/src/assets/css/global.css @@ -179,4 +179,8 @@ a { .el-button.is-plain:hover { border-color: #c6e2ff; background-color: #0046FB; +} + +.el-checkbox__label { + padding-left: 2px; } \ No newline at end of file diff --git a/src/components/common/LocalConfig.vue b/src/components/common/LocalConfig.vue index 8294264..edef333 100644 --- a/src/components/common/LocalConfig.vue +++ b/src/components/common/LocalConfig.vue @@ -83,11 +83,19 @@ - + + + + + + + + @@ -160,7 +168,7 @@ export default { }, doctorCheck: { // 医生诊台 isCheckPicture: false, // 是否显示检查图片 - + pacsType:'image', isQueue: 'N', //启用分诊排队 queueRoom: '', //默认分诊房间 queueItemTypeIds: [], // 检查类别 @@ -169,7 +177,8 @@ export default { }, LocalConfigInit: {}, localDict: { - room: [], // 分诊排队房间 + room: [], // 分诊排队房间 + pacsTypes:[{label:'dcm',value:'dcm'},{label:'图片',value:'image'}] } }; }, diff --git a/src/components/doctorCheck/PacsDcmList.vue b/src/components/doctorCheck/PacsDcmList.vue index 7f8bea1..f6b17d9 100644 --- a/src/components/doctorCheck/PacsDcmList.vue +++ b/src/components/doctorCheck/PacsDcmList.vue @@ -4,7 +4,13 @@ 体检 /pacs看图
-
+
+ +
+
@@ -24,7 +30,7 @@ style="font-size: 20px;height:32px;min-width:30px; padding: 5px;z-index: 2;" size="small">
+ :height="tableHeight" :row-style="{ height: '28px' }" ref="pacsList"> @@ -83,6 +89,7 @@ :disabled="dataTransOpts.tableS.patient_register.completeFlag == '3'">选择描述 保存结果 + 自动下一条
@@ -125,8 +132,10 @@ export default { maxResultCount: 1000, skipCount: 0 }, + autoNext: 'Y', // 保存后自动下一条 doctorCheckEdit: {}, pacsList: [], + curPacs: {}, checkRequestNo: '', dialogDcm: false, iframeSrc: '', @@ -138,6 +147,8 @@ export default { result: '', summary: '' }, + pacsType: 'dcm', // image/dcm + checkPictures: [], }; }, @@ -146,7 +157,9 @@ export default { let userPriv = window.sessionStorage.getItem('userPriv') if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName)) this.sysConfig = JSON.parse(window.sessionStorage.getItem('sysConfig')) - // console.log('this.sysConfig checkPictures', this.sysConfig) + let LocalConfig = JSON.parse(window.localStorage.getItem("LocalConfig") || null) + if (LocalConfig && LocalConfig.doctorCheck && LocalConfig.doctorCheck.pacsType) this.pacsType = LocalConfig.doctorCheck.pacsType + // console.log('this.pacsType', this.pacsType,) }, //挂载完成 @@ -177,6 +190,38 @@ export default { methods: { checkPagePriv, moment, + // 生成 图片预览列表 + previewSrcList(oriList, curImag) { + let srcList = [] + let image = curImag.pictureFilename.indexOf('http') > -1 + ? curImag.pictureFilename + : (this.sysConfig.pacsApi || this.sysConfig.apiurl) + curImag.pictureFilename; + srcList.push(image) + let lfind = arrayExistObj(oriList, 'id', curImag.id) + if (lfind > -1) { + for (let i = lfind + 1; i < oriList.length; i++) { + let e = oriList[i]; + image = this.imageFilePlus(e.pictureFilename) + srcList.push(image) + } + for (let index = 0; index < lfind; index++) { + let e = oriList[index]; + image = this.imageFilePlus(e.pictureFilename) + srcList.push(image) + } + } + return srcList + }, + + // 图片文件补全路径 + imageFilePlus(fileName) { + if (fileName.indexOf('base64') > -1 || fileName.indexOf('http') > -1) { + return fileName + } else { + return (this.sysConfig.pacsApi || this.sysConfig.apiurl) + fileName + } + }, + btnQuery() { let body = Object.assign({}, this.query) if (!body.checkRequestNo) delete body.checkRequestNo @@ -187,16 +232,23 @@ export default { } postapi('/api/app/PacsBusiness/GetPatientRegisterPacsCheck', body) .then(res => { - if (res.code > -1) this.pacsList = res.data.items + if (res.code > -1) { + res.data.items.forEach((e, i) => { + e.seq = i // 增加序号 + }); + this.pacsList = res.data.items + } }) }, rowClick(row) { + this.curPacs = row this.onQueryByPacsNo(row.checkRequestNo) }, // 浏览Dcm文件 btnBrowseDcm() { + // console.log('this.doctorCheck', this.doctorCheck.RegisterCheckEdit) this.checkRequestNo = this.doctorCheck.RegisterCheckEdit.checkRequestNo this.pacsParams.result = this.doctorCheck.checkItemList[0].result @@ -227,6 +279,10 @@ export default { // 确定描述与结论 btnOkBigtext() { // console.log('this.pacsParams', this.pacsParams) + if (!this.pacsParams.result || !this.pacsParams.summary) { + this.$message.warning({ showClose: true, message: '请填写检查结果与结论' }) + return + } this.doctorCheck.checkItemList[0].result = this.pacsParams.result this.doctorCheck.checkSummaryList = [{ id: Math.random(), @@ -236,70 +292,80 @@ export default { }] this.save() + .then(() => { + if (this.autoNext == 'Y') { + let lfind = arrayExistObj(this.pacsList, 'seq', this.curPacs.seq) + if (lfind > -1 && this.pacsList.length - 1 > lfind) { + this.rowClick(this.pacsList[lfind + 1]) + this.$refs['pacsList'].setCurrentRow(this.pacsList[lfind + 1]); + } + } + }) + .catch(err => { + console.log(err) + this.$message.error({ showClose: true, message: err }) + }) }, //保存数据 - save() { - - let checkDate = this.doctorCheck.RegisterCheckEdit.checkDate || new Date(); - checkDate = moment(new Date(checkDate)).format('yyyy-MM-DD HH:mm:ss'); //yyyy-MM-DD HH:mm:ss - let checkDoctorId = this.doctorCheck.RegisterCheckEdit.checkDoctorId || null; - let registerCheckId = this.doctorCheck.RegisterCheckEdit.id - // 明细 - let registerCheckItems = [] - this.doctorCheck.checkItemList.forEach(e => { - registerCheckItems.push({ - itemId: e.itemId, - result: e.result, - checkDoctorName: checkDoctorId, + save() { + return new Promise((resolve, reject) => { + let checkDate = this.doctorCheck.RegisterCheckEdit.checkDate || new Date(); + checkDate = moment(new Date(checkDate)).format('yyyy-MM-DD HH:mm:ss'); //yyyy-MM-DD HH:mm:ss + let checkDoctorId = this.doctorCheck.RegisterCheckEdit.checkDoctorId || null; + let registerCheckId = this.doctorCheck.RegisterCheckEdit.id + // 明细 + let registerCheckItems = [] + this.doctorCheck.checkItemList.forEach(e => { + registerCheckItems.push({ + itemId: e.itemId, + result: e.result, + checkDoctorName: checkDoctorId, + checkDate, + }) + }); + // 小结 + let summarys = [] + this.doctorCheck.checkSummaryList.forEach(item => { + summarys.push({ + summary: item.summary, + summaryFlag: item.summaryFlag, + }) + }); + // 建议 + let suggestions = [] + this.doctorCheck.checkSuggestionList.forEach(item => { + suggestions.push({ + suggestion: item.suggestion + }) + }); + + let body = { + registerCheckId, + checkDoctorId, checkDate, - }) - }); - // 小结 - let summarys = [] - this.doctorCheck.checkSummaryList.forEach(item => { - summarys.push({ - summary: item.summary, - summaryFlag: item.summaryFlag, - }) - }); - // 建议 - let suggestions = [] - this.doctorCheck.checkSuggestionList.forEach(item => { - suggestions.push({ - suggestion: item.suggestion - }) - }); - - let body = { - registerCheckId, - checkDoctorId, - checkDate, - registerCheckItems, - summarys, - suggestions - } - - - if (summarys.length == 0) { - this.$message.warning({ showClose: true, message: '请生成小结!' }) - return - } - - postapi('/api/app/registercheck/UpdateCheckResult', body) - .then(res => { - if (res.code > -1) { - this.doctorCheck.RegisterCheckEdit.completeFlag = '1'; - //更新组合项目列表记录状态 - let lfind = arrayExistObj(this.doctorCheck.RegisterCheckList, 'id', body.registerCheckId) - if (lfind > -1) this.doctorCheck.RegisterCheckList[lfind].completeFlag = '1' - - console.log('操作成功') - } else { - this.$message.error({ showClose: true, message: res.message }) - } - }) + registerCheckItems, + summarys, + suggestions + } + if (summarys.length == 0) reject('请填写结论!') + + postapi('/api/app/registercheck/UpdateCheckResult', body) + .then(res => { + if (res.code > -1) { + this.doctorCheck.RegisterCheckEdit.completeFlag = '1'; + //更新组合项目列表记录状态 + let lfind = arrayExistObj(this.doctorCheck.RegisterCheckList, 'id', body.registerCheckId) + if (lfind > -1) this.doctorCheck.RegisterCheckList[lfind].completeFlag = '1' + + resolve(res) + } else { + reject(res.message) + } + }) + .catch(err => reject(err)) + }) }, @@ -373,6 +439,11 @@ export default { padding: 1px 1px; } +.spanClass { + font-size: 14px; + padding: 6px 2px 0 0; +} + .btnClass { margin: 2px 2px 0; height: 26px;