From d35b7ec80104ad8e9a052559580697e4469dbd7d Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Mon, 18 Sep 2023 14:00:58 +0800 Subject: [PATCH] query seo --- .../patientRegister/MergeAsbitem.vue | 4 +- .../patientRegister/PatientRegisterList.vue | 24 +++++--- .../PatientRegisterRecoverList.vue | 20 ++++++- .../PatientRegisterRefuseList.vue | 20 ++++++- .../PatientRegisterSignList.vue | 20 ++++++- .../patientRegister/patientRegisterQuery.vue | 58 +++++++------------ .../report/PatientRegisterQueryNobtn.vue | 5 +- src/store/index.js | 4 +- src/views/charge/charge.vue | 44 ++++++++++---- 9 files changed, 128 insertions(+), 71 deletions(-) diff --git a/src/components/patientRegister/MergeAsbitem.vue b/src/components/patientRegister/MergeAsbitem.vue index 5c97990..fa7ae36 100644 --- a/src/components/patientRegister/MergeAsbitem.vue +++ b/src/components/patientRegister/MergeAsbitem.vue @@ -191,7 +191,7 @@ export default { } else { this.tableData = []; this.tableDataAll.forEach(e => { - if (itemTypeIdsChild.indexOf(e.itemTypeId) < 0) { + if (itemTypeIdsChild.indexOf(e.itemTypeId) > -1 ) { this.tableData.push(e); } }); @@ -234,7 +234,7 @@ export default { this.getFinalSelected(); this.finalSelected.forEach(e => { - if(itemTypes.indexOf(e.itemTypeName) < 0) itemTypes.push(e.itemTypeName); + if(itemTypes.indexOf(e.itemTypeId) < 0) itemTypes.push(e.itemTypeId); registerAsbitemIds.push(e.registerAsbitemId); }); diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index 8631dea..f00b9f9 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -586,12 +586,7 @@ export default { //查询 async query() { this.patientRegister.prList = []; - const loading = this.$loading({ - lock: true, - text: 'Loading', - spinner: 'el-icon-loading', - background: 'rgba(0, 0, 0, 0.7)' - }); + let body = {} @@ -611,9 +606,13 @@ export default { if (this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag //StartDate EndDate - if (this.patientRegister.query.dateRange) { - body.startDate = moment(new Date(this.patientRegister.query.dateRange[0])).format("yyyy-MM-DD") - body.endDate = moment(new Date(this.patientRegister.query.dateRange[1])).format("yyyy-MM-DD") + if (this.patientRegister.query.startDate && this.patientRegister.query.endDate) { + body.startDate = moment(this.patientRegister.query.startDate).format("yyyy-MM-DD") + body.endDate = moment(this.patientRegister.query.endDate).format("yyyy-MM-DD") + if(body.startDate > body.endDate){ + this.$message.warning("起始日期不能大于截止日期,数据校验不通过!") + return + } } @@ -625,6 +624,13 @@ export default { console.log('/api/app/patientregister/getlistinfilter', body) + + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); postapi('/api/app/patientregister/getlistinfilter', body) .then((res) => { if (res.code != -1) { diff --git a/src/components/patientRegister/PatientRegisterRecoverList.vue b/src/components/patientRegister/PatientRegisterRecoverList.vue index 9744d5e..96b5150 100644 --- a/src/components/patientRegister/PatientRegisterRecoverList.vue +++ b/src/components/patientRegister/PatientRegisterRecoverList.vue @@ -251,9 +251,13 @@ export default { if (this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag //StartDate EndDate - if (this.patientRegister.query.dateRange) { - body.startDate = moment(new Date(this.patientRegister.query.dateRange[0])).format("yyyy-MM-DD") - body.endDate = moment(new Date(this.patientRegister.query.dateRange[1])).format("yyyy-MM-DD") + if (this.patientRegister.query.startDate && this.patientRegister.query.endDate) { + body.startDate = moment(this.patientRegister.query.startDate).format("yyyy-MM-DD") + body.endDate = moment(this.patientRegister.query.endDate).format("yyyy-MM-DD") + if(body.startDate > body.endDate){ + this.$message.warning("起始日期不能大于截止日期,数据校验不通过!") + return + } } @@ -265,11 +269,21 @@ export default { console.log('/api/app/patientregister/getlistinfilter', body) + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); postapi('/api/app/patientregister/getlistinfilter', body) .then((res) => { if(res.code != - 1){ this.dataList = res.data.items; } + loading.close(); + }) + .catch((err) => { + loading.close(); }); }, }, diff --git a/src/components/patientRegister/PatientRegisterRefuseList.vue b/src/components/patientRegister/PatientRegisterRefuseList.vue index be93b18..aa63d9f 100644 --- a/src/components/patientRegister/PatientRegisterRefuseList.vue +++ b/src/components/patientRegister/PatientRegisterRefuseList.vue @@ -374,9 +374,13 @@ export default { if (this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag //StartDate EndDate - if (this.patientRegister.query.dateRange) { - body.startDate = moment(new Date(this.patientRegister.query.dateRange[0])).format("yyyy-MM-DD") - body.endDate = moment(new Date(this.patientRegister.query.dateRange[1])).format("yyyy-MM-DD") + if (this.patientRegister.query.startDate && this.patientRegister.query.endDate) { + body.startDate = moment(this.patientRegister.query.startDate).format("yyyy-MM-DD") + body.endDate = moment(this.patientRegister.query.endDate).format("yyyy-MM-DD") + if(body.startDate > body.endDate){ + this.$message.warning("起始日期不能大于截止日期,数据校验不通过!") + return + } } @@ -388,11 +392,21 @@ export default { console.log('/api/app/patientregister/getlistinfilter', body) + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); postapi('/api/app/patientregister/getlistinfilter', body) .then((res) => { if(res.code != - 1){ this.dataList = res.data.items; } + loading.close(); + }) + .catch((err) => { + loading.close(); }); }, }, diff --git a/src/components/patientRegister/PatientRegisterSignList.vue b/src/components/patientRegister/PatientRegisterSignList.vue index 020c5d9..db1d3f2 100644 --- a/src/components/patientRegister/PatientRegisterSignList.vue +++ b/src/components/patientRegister/PatientRegisterSignList.vue @@ -256,9 +256,13 @@ export default { if (this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag //StartDate EndDate - if (this.patientRegister.query.dateRange) { - body.startDate = moment(new Date(this.patientRegister.query.dateRange[0])).format("yyyy-MM-DD") - body.endDate = moment(new Date(this.patientRegister.query.dateRange[1])).format("yyyy-MM-DD") + if (this.patientRegister.query.startDate && this.patientRegister.query.endDate) { + body.startDate = moment(this.patientRegister.query.startDate).format("yyyy-MM-DD") + body.endDate = moment(this.patientRegister.query.endDate).format("yyyy-MM-DD") + if(body.startDate > body.endDate){ + this.$message.warning("起始日期不能大于截止日期,数据校验不通过!") + return + } } @@ -270,11 +274,21 @@ export default { console.log('/api/app/patientregister/getlistinfilter', body) + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); postapi('/api/app/patientregister/getlistinfilter', body) .then((res) => { if(res.code != - 1){ this.dataList = res.data.items; } + loading.close(); + }) + .catch((err) => { + loading.close(); }); }, }, diff --git a/src/components/patientRegister/patientRegisterQuery.vue b/src/components/patientRegister/patientRegisterQuery.vue index 1f521c1..3afe9d7 100644 --- a/src/components/patientRegister/patientRegisterQuery.vue +++ b/src/components/patientRegister/patientRegisterQuery.vue @@ -5,10 +5,9 @@