From b4d7464561373d936443d23f8c186527f52c5d97 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Thu, 17 Apr 2025 17:28:03 +0800 Subject: [PATCH] follow --- src/components/follow/FollowList.vue | 1067 ++++--------------------- src/components/follow/FollowQuery.vue | 59 +- src/store/index.js | 3 +- 3 files changed, 220 insertions(+), 909 deletions(-) diff --git a/src/components/follow/FollowList.vue b/src/components/follow/FollowList.vue index b92fa07..a7963ee 100644 --- a/src/components/follow/FollowList.vue +++ b/src/components/follow/FollowList.vue @@ -2,26 +2,13 @@
-
+
- + @@ -29,22 +16,66 @@ - + + + + + - + - --> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -76,29 +107,25 @@
{{ dddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}
- - - - - + + + + + + + + + + + +
-
-
-
@@ -161,6 +188,7 @@ export default { endPoint: -1, // 多选终点 -1 表示未选择 tableData: [], //表格数据 + tableData2: [], //表格数据 (用于综合导出) tableDataCurrentRow: {}, // 当前被选中的行 multipleSelection: [], //选中的数据列表 @@ -407,274 +435,8 @@ export default { setData(this, item, v); }, - // 打印指引单(isPreview) - async guidePrint(ReportCode, isPreview) { - if (!this.$peisAPI) { - this.$message.info({ - showClose: true, - message: "此功能,需要在壳客户端才可运行!", - }); - return; - } - let token = window.sessionStorage.getItem("token"); - let user = window.sessionStorage.getItem("user"); - let toOutShell = { - ReportCode, - token, - isBuildImage: "N", - IsUploadPdf: "N", - preViewCanPrint: "N", - Parameters: [ - { Name: "printer", Value: user }, - { Name: "hisLog", Value: "pic/hisLog.jpg" }, - { Name: "pageFooter", Value: "pic/peisQrCode.jpg" }, - ], - }; - let lfind = -1; - - //选中(取消勾选)start ------------------------- - // this.multipleSelection = [] - // this.tableData.forEach(e => { - // if (e.choosed) { - // this.multipleSelection.push(deepCopy(e)) - // } - // }) - //选中(取消勾选) end  ------------------------- - - if (this.multipleSelection.length < 1) { - this.$message.info({ - showClose: true, - message: "请勾选要打印指引单的人员记录!", - }); - return; - } - - if (isPreview) { - /* - //this.multipleSelection.forEach((item,index) =>{ - postapi( - `/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[0].id}` - ) - .then((res) => { - if (res.code != -1) { - toOutShell.ReportTable = res.data; - // console.log( - "JSON.stringify(toOutShell)", - JSON.stringify(toOutShell) - ); - return this.$peisAPI.printPre(JSON.stringify(toOutShell)); - } - }) - .then(res => { - // console.log('this.$peisAPI.printPre', res) - if (JSON.parse(res).code < 0) { - this.$message.warning(JSON.parse(res).message); - } - }) - .catch((err) => { - // console.log('打印指引单', err) - this.$message.warning({ showClose: true, message: err }); - }); - */ - toOutShell.BusinessCode = this.multipleSelection[0].id; - if (this.multipleSelection[0].completeFlag == "0") { - this.$message.warning({ - showClose: true, - message: "预登记人员,不可执行此操作!", - }); - return; - } - - this.$peisAPI - .printPre(JSON.stringify(toOutShell)) - .then((res) => { - if (JSON.parse(res).code < 0) { - this.$message.warning({ - showClose: true, - message: JSON.parse(res).message, - }); - } - }) - .catch((err) => { - // console.log('打印指引单', err) - this.$message.warning({ showClose: true, message: `${err}` }); - }); - } else { - this.elProgress.display = true; - this.elProgress.percentage = 0; - - for (let i = 0; i < this.multipleSelection.length; i++) { - try { - let patientregisterId = this.multipleSelection[i].id; - if (this.multipleSelection[i].completeFlag == "0") { - this.$message.warning({ - showClose: true, - message: `${this.multipleSelection[i].patientName} 为预登记人员,不可打印指引单`, - }); - continue; - } - toOutShell.BusinessCode = patientregisterId; - let resPeisAPI = await this.$peisAPI.print( - JSON.stringify(toOutShell) - ); - if (JSON.parse(resPeisAPI).code < 0) continue; - let resPrintTimes = await postapi( - "/api/app/patientregister/updatepatientregisterguideprinttimesmany", - [patientregisterId] - ); - if (resPrintTimes.code == -1) continue; - lfind = arrayExistObj(this.tableData, "id", patientregisterId); - if (lfind > -1) { - if (this.tableData[lfind].guidePrintTimes) { - this.tableData[lfind].guidePrintTimes = - Number(this.tableData[lfind].guidePrintTimes) + 1; - } else { - this.tableData[lfind].guidePrintTimes = 1; - } - } - } catch (error) { - // console.log('打印指引单', error) - this.$message.warning({ showClose: true, message: `${error}` }); - } - - this.elProgress.percentage = Math.floor( - ((i + 1) * 100) / this.multipleSelection.length - ); - } - this.elProgress.display = false; - } - }, - - // 指引单新打印方式,promise - guidePrintPromise(ReportCode, isPreview, row) { - return new Promise((resolve, reject) => { - if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!"); - - let token = window.sessionStorage.getItem("token"); - let user = window.sessionStorage.getItem("user"); - let toOutShell = { - ReportCode, - token, - isBuildImage: "N", - IsUploadPdf: "N", - preViewCanPrint: "N", - Parameters: [ - { Name: "printer", Value: user }, - { Name: "hisLog", Value: "pic/hisLog.jpg" }, - { Name: "pageFooter", Value: "pic/peisQrCode.jpg" }, - ], - }; - - if (!row.completeFlag || row.completeFlag == "0") - reject("预登记人员,不可执行此操作!"); - toOutShell.BusinessCode = row.id; - console.log(JSON.stringify(toOutShell)); - if (isPreview) { - this.$peisAPI - .printPre(JSON.stringify(toOutShell)) - .then((res) => { - let lres = JSON.parse(res); - if (lres.code > -1) { - resolve(lres); - } else { - reject(lres.message); - } - }) - .catch((err) => { - reject(err); - }); - } else { - this.$peisAPI - .print(JSON.stringify(toOutShell)) - .then((res) => { - let lres = JSON.parse(res); - if (lres.code > -1) { - return postapi( - "/api/app/patientregister/updatepatientregisterguideprinttimesmany", - [row.id] - ); - } else { - reject(lres.message); - } - }) - .then((res) => { - if (res && res.code > -1) { - let lfind = arrayExistObj(this.tableData, "id", row.id); - if (lfind > -1) { - if (this.tableData[lfind].guidePrintTimes) { - this.tableData[lfind].guidePrintTimes = - Number(this.tableData[lfind].guidePrintTimes) + 1; - } else { - this.tableData[lfind].guidePrintTimes = 1; - } - } - } - resolve(res); - }) - .catch((err) => { - reject(err); - }); - } - }); - }, - - printGuideLisPacs(row) { - return new Promise((resolve, reject) => { - this.guidePrintPromise("0008", false, row) - .then((res) => { - return this.lisPrint(row, "0002", false); - }) - .then((res) => { - return this.pacsPrint(row, "0004", false); - }) - .then((res) => { - resolve(res); - }) - .catch((err) => { - reject(err); - }); - }); - }, - - async printPromise() { - if (this.multipleSelection.length < 1) { - this.$message.info({ - showClose: true, - message: "请勾选要打印人员检验检查条码的记录!", - }); - return; - } - - this.elProgress.display = true; - this.elProgress.percentage = 0; - - for (let i = 0; i < this.multipleSelection.length; i++) { - let row = this.multipleSelection[i]; - try { - await this.printGuideLisPacs(row); - } catch (error) { - console.log("printPromise", error); - } - - this.elProgress.percentage = Math.floor( - ((i + 1) * 100) / this.multipleSelection.length - ); - } - this.elProgress.display = false; - }, handleSelectionChange(rows) { - //this.multipleSelection = rows; - //// console.log('this.multipleSelection',this.multipleSelection) - // rows.forEach((item) => { - // item.highLightBg = "selected"; - // }); - // // 取消全选 - // if (!rows.length) { - // this.tableData.forEach((item) => { - // item.highLightBg = ""; - // }); - // } this.multipleSelection = rows; }, @@ -689,60 +451,7 @@ export default { //点击体检次数行 rowClick(row) { - // 按住了shift键 - // if (this.window.shift) { - // //清除所有选择 - // this.tableData.forEach((e, index) => { - // e.choosed = false; - // e.index = index; - // }); - - // if (this.startPoint == -1) { - // this.tableData[row.index].choosed = true; - // this.startPoint = row.index; - // } else { - // if (this.startPoint > row.index) { - // for (let i = row.index; i <= this.startPoint; i++) { - // this.tableData[i].choosed = true; - // } - // } else if (this.startPoint <= row.index) { - // for (let i = this.startPoint; i <= row.index; i++) { - // this.tableData[i].choosed = true; - // } - // } - // } - // } else if (this.window.ctrl) { // 按住了ctrl 键 - // this.tableData[row.index].choosed = true; - // if (this.startPoint == -1) { - // this.startPoint = row.index; - // } - // } else { - // // 未按住了ctrl 、shift 键 - // //清除所有选择 - // // console.log("清除所有选择"); - // this.tableData.forEach((e, index) => { - // e.choosed = false; - // e.index = index; - // }); - // // console.log(this.tableData, row.index); - // // console.log(this.tableData[row.index].choosed); - - // this.tableData[row.index].choosed = true; - // this.startPoint = row.index; - // } - - //选中了多个点编辑时,排序最前的作为当前选中的 - // console.log('row.index <= this.startPoint', row.index, this.startPoint) - // let lfind = -1 - // for (let i = 0; i < this.tableData.length; i++) { - // if (this.tableData[i].choosed) { - // lfind = i - // break - // } - // } - // if (lfind > -1) { - // 弹出编辑框,只有在编辑框显示时,才去触发获取数据 this.dataTransOpts.tableS.patient_register = deepCopy(row); this.tableDataCurrentRow = deepCopy(row); this.dataTransOpts.refresh.register_check_asbitem.M++; //触发所选组合项目刷新 @@ -801,8 +510,8 @@ export default { e.dateType == "summaryDate" ? "3" : e.dateType == "medicalStartDate" - ? "2" - : "1"); + ? "2" + : "1"); }); } } @@ -834,9 +543,18 @@ export default { if (this.patientRegister.query.isPhoneComplete) body.isPhoneComplete = this.patientRegister.query.isPhoneComplete; - if (this.patientRegister.query.diagnosisLevelId.length>0) + + if (this.patientRegister.query.diagnosisLevelId.length > 0) body.diagnosisLevelIds = this.patientRegister.query.diagnosisLevelId; + // 电话随访日期 + if (this.patientRegister.query.startDate && this.patientRegister.query.endDate) { + body.phoneFollowUpStartDate = this.patientRegister.query.startDate + body.phoneFollowUpEndDate = this.patientRegister.query.endDate + } + + + // 以下是精确查找的 if (this.patientRegister.query.idCardNo) body = { idNo: this.patientRegister.query.idCardNo, @@ -865,39 +583,41 @@ export default { body ).then((res) => { if (res.code > -1) { - let that = this; - for (let i = 0; i < res.data.length; i++) { - for (let k = 0; k < res.data[i].phoneFollowUpDetail.length; k++) { - that.columnData.push("第" + [k + 1] + "次" + "随访内容"); - that.columnData.push("第" + [k + 1] + "次" + "回复内容"); - that.columnData.push("第" + [k + 1] + "次" + "随访日期"); - that.columnData.push("第" + [k + 1] + "次" + "随访完成"); - this.$set( - res.data[i], - "第" + [k + 1] + "次" + "随访内容", - res.data[i].phoneFollowUpDetail[k].followUpContent - ); - this.$set( - res.data[i], - "第" + [k + 1] + "次" + "回复内容", - res.data[i].phoneFollowUpDetail[k].replyContent - ); - this.$set( - res.data[i], - "第" + [k + 1] + "次" + "随访日期", - moment( - res.data[i].phoneFollowUpDetail[k].planFollowDate - ).format("yyyy-MM-DD") - ); - this.$set( - res.data[i], - "第" + [k + 1] + "次" + "随访完成", - res.data[i].phoneFollowUpDetail[k].isComplete - ); - } - } - that.columnData = Array.from(new Set(that.columnData)); + // let that = this; + // for (let i = 0; i < res.data.length; i++) { + // for (let k = 0; k < res.data[i].phoneFollowUpWithPatientRegisterDetail.length; k++) { + // that.columnData.push("第" + [k + 1] + "次" + "随访内容"); + // that.columnData.push("第" + [k + 1] + "次" + "回复内容"); + // that.columnData.push("第" + [k + 1] + "次" + "随访日期"); + // that.columnData.push("第" + [k + 1] + "次" + "随访完成"); + // this.$set( + // res.data[i], + // "第" + [k + 1] + "次" + "随访内容", + // res.data[i].phoneFollowUpDetail[k].followUpContent + // ); + // this.$set( + // res.data[i], + // "第" + [k + 1] + "次" + "回复内容", + // res.data[i].phoneFollowUpDetail[k].replyContent + // ); + // this.$set( + // res.data[i], + // "第" + [k + 1] + "次" + "随访日期", + // moment( + // res.data[i].phoneFollowUpDetail[k].planFollowDate + // ).format("yyyy-MM-DD") + // ); + // this.$set( + // res.data[i], + // "第" + [k + 1] + "次" + "随访完成", + // res.data[i].phoneFollowUpDetail[k].isComplete + // ); + // } + // } + // that.columnData = Array.from(new Set(that.columnData)); + this.tableData = res.data; + this.makeFollowInfo(); //如果 有选中 记录,则刷新其对应的组合项目 if (this.dataTransOpts.tableS.patient_register.patientRegisterId) { this.dataTransOpts.refresh.register_check_asbitem.M++; @@ -915,14 +635,14 @@ export default { // // console.log('scrollTop',this.dom.scrollTop,'clientHeight',this.dom.clientHeight,'scrollHeight',this.dom.scrollHeight); if ( this.dom.scrollTop + this.dom.clientHeight + 20 > - this.dom.scrollHeight && + this.dom.scrollHeight && !this.lazyLoading ) { // 获取到的不是全部数据 当滚动到底部 // console.log('scrollTop', this.dom.scrollTop, 'clientHeight', this.dom.clientHeight, 'scrollHeight', this.dom.scrollHeight); if ( (Number(this.loadOpts.skipCount) + 1) * - Number(this.loadOpts.maxResultCount) >= + Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount) ) { this.lazyLoading = false; @@ -936,507 +656,49 @@ export default { }); }, - btnUpBaseInfo() { - let body = { - patientRegisterId: this.upBaseInfo.patientRegisterId, - // "patientName": "string", - // "mobileTelephone": "string", - // "idNo": "string" - }; - body[this.upBaseInfo.colName] = this.upBaseInfo.value; - - postapi( - "/api/app/PatientRegister/UpdatePatientRegisterBaseInfoByPatientRegisterId", - body - ).then((res) => { - if (res.code > -1) { - this.close_dialogWin_upBaseInfo(); - } - }); - }, - // 修改基本信息 - fnUpBaseInfo(row, baseInfoType) { - this.dataTransOpts.tableS.patient_register.id = row.id; - this.upBaseInfo.visble = true; - this.upBaseInfo.patientRegisterId = row.id; - this.upBaseInfo.colName = baseInfoType; - switch (baseInfoType) { - case "idNo": - this.upBaseInfo.label = "新身份证号"; - break; - case "mobileTelephone": - this.upBaseInfo.label = "新手机号"; - break; - default: - this.upBaseInfo.label = "新姓名"; - break; - } - this.upBaseInfo.value = row[baseInfoType]; - }, - - // 分诊排队 - fnQueue(row) { - this.queueParams = { - patientRegisterId: row.id, - }; - this.dialogWin.queue = true; - this.dataTransOpts.plus.queue++; - }, - - //右击菜单 - onCellRightClick(row, column) { - this.rClickRow = { ...row }; //右击的行记录 - this.rClickColumn = { ...column }; //右击的列(预留) - // console.log(row, column.property); - }, - onContextmenu(event) { - //// console.log('onContextmenu',event); - if (!this.rClickRow) return false; - let row = { ...this.rClickRow }; - let items = []; //菜单项 - - if ( - checkPagePriv(this.pagePriv.privs, "修改姓名") && - row.completeFlag != "0" - ) - items.push({ - label: "修改姓名", - onClick: () => { - this.fnUpBaseInfo(row, "patientName"); - }, - }); - if ( - checkPagePriv(this.pagePriv.privs, "修改手机号") && - row.completeFlag != "0" - ) - items.push({ - label: "修改手机号", - onClick: () => { - this.fnUpBaseInfo(row, "mobileTelephone"); - }, - }); - if ( - checkPagePriv(this.pagePriv.privs, "修改身份证号") && - row.completeFlag != "0" - ) - items.push({ - label: "修改身份证号", - onClick: () => { - this.fnUpBaseInfo(row, "idNo"); - }, - }); - if ( - checkPagePriv(this.pagePriv.privs, "分诊排队") && - row.completeFlag != "0" - ) - items.push({ - label: "分诊排队", - onClick: () => { - this.fnQueue(row); - }, - }); - if ( - checkPagePriv(this.pagePriv.privs, "发送检验申请") && - row.completeFlag != "0" - ) - items.push({ - label: "发送检验申请", - onClick: () => { - this.lisRequest(row); - }, - }); - if ( - checkPagePriv(this.pagePriv.privs, "预览人员条码") && - row.completeFlag != "0" - ) - items.push({ - label: "预览人员条码", - onClick: () => { - this.guidePrintPromise("0008", true, row); - }, - }); - if ( - checkPagePriv(this.pagePriv.privs, "预览检验条码") && - row.completeFlag != "0" - ) - items.push({ - label: "预览检验条码", - onClick: () => { - this.lisPrint(row, "0002", true); - }, - }); - if ( - checkPagePriv(this.pagePriv.privs, "打印检验条码") && - row.completeFlag != "0" - ) - items.push({ - label: "打印检验条码", - onClick: () => { - this.lisPrint(row, "0002", false); - }, - }); - if ( - checkPagePriv(this.pagePriv.privs, "预览Pacs条码") && - row.completeFlag != "0" - ) - items.push({ - label: "预览Pacs条码", - onClick: () => { - this.pacsPrint(row, "0004", true); - }, - }); - if ( - checkPagePriv(this.pagePriv.privs, "打印Pacs条码") && - row.completeFlag != "0" - ) - items.push({ - label: "打印Pacs条码", - onClick: () => { - this.pacsPrint(row, "0004", false); - }, - }); - if ( - checkPagePriv(this.pagePriv.privs, "导入检查结果") && - row.completeFlag != "0" - ) - items.push({ - label: "导入检查结果", - onClick: () => { - this.importResult("pacs", row); - }, - }); - if ( - checkPagePriv(this.pagePriv.privs, "导入检验结果") && - row.completeFlag != "0" - ) - items.push({ - label: "导入检验结果", - onClick: () => { - this.importResult("lis", row); - }, - }); - if ( - checkPagePriv(this.pagePriv.privs, "批量更新组合项目明细") && - this.multipleSelection.length > 0 - ) - items.push({ - label: "批量更新组合项目明细", - onClick: () => { - this.btnItemBatch(); - }, - }); - if ( - checkPagePriv(this.pagePriv.privs, "调整检查项目医生") && - this.multipleSelection.length > 0 - ) - items.push({ - label: "调整检查项目医生", - onClick: () => { - this.dataTransOpts.plus.PatientRegisterEditDoctorBatch++; //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理 - this.dialogWin.PatientRegisterEditDoctorBatch = true; - }, - }); - items.push({ label: "----------------" }); - this.$contextmenu({ - items, - event, - //x: event.clientX, - //y: event.clientY, - customClass: "custom-class", - zIndex: 3, - minWidth: 80, - }); - - this.rClickRow = null; - return false; - }, - - //批量更新分组按钮 - btnGroupBatch() { - let customerOrgId = this.patientRegister.query.customerOrgId; - if (!customerOrgId) { - this.$message.warning({ showClose: true, message: "请选择单位" }); - return; - } - //取消勾选,换成选择的方式 start - // this.multipleSelection = []; - // this.tableData.forEach((e) => { - // if (e.choosed) this.multipleSelection.push(e); - // }); - //取消勾选,换成选择的方式 end - - if (this.multipleSelection.length < 1) { - this.$message.info({ - showClose: true, - message: "请选择要操作的记录!", - }); - return; - } - this.dataTransOpts.plus.PatientRegisterEditGroupBatch++; - this.dialogWin.PatientRegisterEditGroupBatch = true; - }, - - //批量更新组合项目 - btnAsbBatch() { - let customerOrgId = this.patientRegister.query.customerOrgId; - if (!customerOrgId) { - this.$message.warning({ showClose: true, message: "请选择单位" }); - return; - } - //取消勾选,换成选择的方式 start - // this.multipleSelection = []; - // this.tableData.forEach((e) => { - // if (e.choosed) this.multipleSelection.push(e); - // }); - //取消勾选,换成选择的方式 end - - if (this.multipleSelection.length < 1) { - this.$message.warning({ - showClose: true, - message: "请选择要操作的记录", - }); - return; - } - - this.dataTransOpts.plus.PatientRegisterEditItemBatch++; //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理 - this.dialogWin.PatientRegisterEditItemBatch = true; - }, - - //批量更新组合项目 - async btnItemBatch() { - if (this.multipleSelection.length < 1) { - this.$message.warning({ - showClose: true, - message: "请选择要操作的记录", - }); - return; - } - - this.elProgress.display = true; - this.elProgress.percentage = 0; - - for (let i = 0; i < this.multipleSelection.length; i++) { - let patientRegisterId = this.multipleSelection[i].id; - try { - await postapi("/api/app/RegisterCheckItem/SyncRegisterCheckItem", { - patientRegisterId, - }); - } catch (error) { - console.log("printPromise", error); - } - - this.elProgress.percentage = Math.floor( - ((i + 1) * 100) / this.multipleSelection.length - ); - } - this.elProgress.display = false; - }, - - //检验申请 - async lisRequest(row) { - let isPrintLisRequest = false; - let res = null; - if (row.completeFlag == "0") { - this.$message.info({ - showClose: true, - message: "预登记人员,不可执行此操作!", - }); - return; - } - - try { - res = await postapi( - `/api/app/lisrequest/setlisrequest?PatientRegisterId=${row.id}` - ); - // console.log(`/ api / app / lisrequest / setlisrequest ? PatientRegisterId = ${ prId }`,res); - } catch (error) { - return; - } - if (res.code > -1) { - isPrintLisRequest = true; - } - - //重复申请,重打 - if (res.code == -1 && res.message.indexOf("已申请") > -1) { - isPrintLisRequest = true; - } - - if (!isPrintLisRequest) return; - - try { - await this.$confirm("是否打印检验申请单?", "提示", { - confirmButtonText: "是", - cancelButtonText: "否", - type: "info", - showClose: false, - closeOnClickModal: false, - closeOnPressEscape: false, - }); - } catch (error) { - return; - } - //打印检验申请单 - this.lisPrint(row, "0003", false); - }, - - //检验条码打印 改造成 promise - lisPrint(row, ReportCode, isPreview) { - return new Promise((resolve, reject) => { - if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!"); - if (!row.completeFlag || row.completeFlag == "0") - reject("预登记人员,不可执行此操作!"); - - let token = window.sessionStorage.getItem("token"); - let user = window.sessionStorage.getItem("user"); - let toOutShell = { - ReportCode, - token, - IsMoreLabel: "Y", - isBuildImage: "N", - IsUploadPdf: "N", - preViewCanPrint: "N", - Parameters: [ - { Name: "printer", Value: user }, - { Name: "hisLog", Value: "pic/hisLog.jpg" }, - ], - BusinessCode: row.id, - }; - console.log("this.$peisAPI.toOutShell", toOutShell); - if (isPreview) { - this.$peisAPI - .printPre(JSON.stringify(toOutShell)) - .then((res) => { - console.log("this.$peisAPI.printPre", res); - let lres = JSON.parse(res); - if (lres.code > -1) { - resolve(lres); - } else { - reject(lres.message); - } - }) - .catch((err) => { - reject(err); - }); - } else { - this.$peisAPI - .print(JSON.stringify(toOutShell)) - .then((res) => { - console.log("this.$peisAPI.print", res); - let lres = JSON.parse(res); - if (lres.code < 0) { - reject(lres.message); - } else { - return postapi("/api/app/lisrequest/updatelisrequestisprint", { - operateType: 1, - patientRegisterId: row.id, - }); - } - }) - .then((res) => { - if (res && res.code < 0) { - reject(res.message); - } else { - resolve(res); - } - }) - .catch((err) => { - reject(err); - }); - } - }); - }, - - //pacs条码打印 - pacsPrint(row, ReportCode, isPreview) { - return new Promise((resolve, reject) => { - if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!"); - if (!row.completeFlag || row.completeFlag == "0") - reject("预登记人员,不可执行此操作!"); - - let token = window.sessionStorage.getItem("token"); - let user = window.sessionStorage.getItem("user"); - let toOutShell = { - ReportCode, - token, - IsMoreLabel: "Y", - isBuildImage: "N", - IsUploadPdf: "N", - preViewCanPrint: "N", - Parameters: [ - { Name: "printer", Value: user }, - { Name: "hisLog", Value: "pic/hisLog.jpg" }, - ], - BusinessCode: row.id, - }; - console.log("this.$peisAPI.print", toOutShell); - if (isPreview) { - this.$peisAPI - .printPre(JSON.stringify(toOutShell)) - .then((res) => { - console.log("this.$peisAPI.printPre", res); - let lres = JSON.parse(res); - if (lres.code > -1) { - resolve(lres); - } else { - reject(lres.message); + // 生成综合导出的数据 + makeFollowInfo() { + // + // + // + // + // + + // + // + // + + this.tableData2 = [] + this.tableData.forEach(e => { + if (e.phoneFollowUpWithPatientRegisterDetail.length == 0 && e.smsSendDetail.length == 0) { + this.tableData2.push(Object.assign({}, e)) + } else if (e.phoneFollowUpWithPatientRegisterDetail.length < e.smsSendDetail.length) { + e.smsSendDetail.forEach((e2, i2) => { + let phone = {}, sms = {} + sms = { SmsFlag: e2.isComplete, SmsDate: e2.planSendDate, SmsContent: e2.content } + if (i2 < e.phoneFollowUpWithPatientRegisterDetail.length) { + phone = { + PhoneFlag: e.phoneFollowUpWithPatientRegisterDetail[i2].isComplete, + PhoneDate: e.phoneFollowUpWithPatientRegisterDetail[i2].planFollowDate, + PhoneFollower: e.phoneFollowUpWithPatientRegisterDetail[i2].lastModifierName, + PhoneContent: e.phoneFollowUpWithPatientRegisterDetail[i2].followUpContent, + PhoneReply: e.phoneFollowUpWithPatientRegisterDetail[i2].replyContent } - }) - .catch((err) => { - reject(err); - }); + } + this.tableData2.push(Object.assign({}, e, phone, sms)) + }); } else { - this.$peisAPI - .print(JSON.stringify(toOutShell)) - .then((res) => { - console.log("this.$peisAPI.print", res); - let lres = JSON.parse(res); - if (lres.code > -1) { - resolve(lres); - } else { - reject(lres.message); - } - }) - .catch((err) => { - reject(err); - }); + e.phoneFollowUpWithPatientRegisterDetail.forEach((e1, i1) => { + let phone = {}, sms = {} + phone = { PhoneFlag: e1.isComplete, PhoneDate: e1.planFollowDate, PhoneFollower: e1.lastModifierName, PhoneContent: e1.followUpContent, PhoneReply: e1.replyContent } + if (i1 < e.smsSendDetail.length) { + sms = { SmsFlag: e.smsSendDetail[i1].isComplete, SmsDate: e.smsSendDetail[i1].planSendDate, SmsContent: e.smsSendDetail[i1].content } + } + this.tableData2.push(Object.assign({}, e, phone, sms)) + }); } }); - }, - // 导入检查检验结果 - importResult(checkType, row) { - let url = "/api/app/ImportLisResult/ImportResultByPatientRegisterId"; - switch (checkType) { - case "pacs": - url = "/api/app/ImportPacsResult/ImportResultByPatientRegisterId"; - postapi(url, { patientRegisterId: row.id }) - .then((res) => { - if (res.code > -1) { - return postapi( - "/api/app/ImportElectrocardiogramResult/ImportElectrocardiogramResultByPatientRegisterId", - { patientRegisterId: row.id } - ); - } - }) - .then((res) => { - if (res && res.code > -1) { - this.$message.success({ - showClose: true, - message: "导入成功!", - }); - this.rowClick(row); - } - }); - break; - default: - postapi(url, { patientRegisterId: row.id }).then((res) => { - if (res.code > -1) { - this.$message.success({ showClose: true, message: "导入成功!" }); - this.rowClick(row); - } - }); - break; - } }, //通用导出 @@ -1509,10 +771,16 @@ export default { }); }); }, + handleExport() { - exportToExcel("#phoneFollowUp", "随访列表", false); + exportToExcel("#phoneFollowUp", "危急人员列表", false); this.window.export = false; }, + handleExport2() { + exportToExcel("#phoneFollowUp2", "危急人员及随访信息", false); + this.window.export2 = false; + }, + }, //监听事件 @@ -1545,7 +813,14 @@ export default { } }, }, - + "window.export2": { + // immediate:true, + handler(newVal, oldVal) { + if (newVal) { + this.handleExport2(); + } + }, + }, //新增后,触发赋值 // "patientRegister.patientRegisterRd.id"(newVal, oldVal) { // if (newVal != oldVal) { diff --git a/src/components/follow/FollowQuery.vue b/src/components/follow/FollowQuery.vue index 6b7fd77..97b3009 100644 --- a/src/components/follow/FollowQuery.vue +++ b/src/components/follow/FollowQuery.vue @@ -1,7 +1,7 @@