From ef02d3471f0a1dc75555d307344bd8411323db15 Mon Sep 17 00:00:00 2001 From: wuqing_b Date: Wed, 25 Mar 2020 13:26:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E6=B5=8B=E6=AC=A1=E6=95=B0=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=96=B0=E5=A2=9E=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/feature/diseaseInfoServer.ts | 10 ++ .../DiseaseInfoNucleic/DiseaseList.vue | 95 ++++++++++++++++++- 2 files changed, 100 insertions(+), 5 deletions(-) diff --git a/src/api/feature/diseaseInfoServer.ts b/src/api/feature/diseaseInfoServer.ts index 171a79f..f4662c3 100644 --- a/src/api/feature/diseaseInfoServer.ts +++ b/src/api/feature/diseaseInfoServer.ts @@ -264,4 +264,14 @@ export class DiseaseInfoServer { const url = `infection/nucleic/detection/detail?id=${id}`; return this.rSerivce.serverObj.get(url); } + // 获取检查次数类型下拉列表 + public getTimesTypeList() { + const url = `infection/nucleic/detection/compareFlagList`; + return this.rSerivce.serverObj.get(url); + } + // 获取检查次数下拉列表 + public getDetectionNumList() { + const url = `infection/nucleic/detection/detectionNumList`; + return this.rSerivce.serverObj.get(url); + } } diff --git a/src/components/feature/DiseaseInfoNucleic/DiseaseList.vue b/src/components/feature/DiseaseInfoNucleic/DiseaseList.vue index 3502c84..c8065ce 100644 --- a/src/components/feature/DiseaseInfoNucleic/DiseaseList.vue +++ b/src/components/feature/DiseaseInfoNucleic/DiseaseList.vue @@ -116,15 +116,41 @@ - + + + + + + @@ -306,7 +332,7 @@ export default class DiseasDeList extends Vue { // 查询条件 private queryInfo: any = { - detectionNum: '', + // detectionNum: '', detectionResult: '0', idNo: '', isolationType: '0', @@ -314,6 +340,8 @@ export default class DiseasDeList extends Vue { sendSampleTime: '', size: 10, suffererName: '', + compareFlag: '0', + detectionNum: 'all', }; // 总条数 @@ -331,6 +359,12 @@ export default class DiseasDeList extends Vue { // 查询节流阀 private queryTimer: any = null; + // 查询次数类型 + private timesTypeList: any = []; + + // 次数可选 + private detectionNumDefaultList: any = []; + private detectionNumList: any = [{ name: '全部', code: 'all' }]; // 时间组件配置 // 禁用明天开始的日期 private pickerOptions: object = (() => { @@ -346,6 +380,8 @@ export default class DiseasDeList extends Vue { this.getList(); this.getIsolationTypeList(); this.getDetectionResultTypeList(); + this.getTimesTypeList(); + this.getDetectionNumList(); } // 获取发热门诊疫情人员列表 @@ -431,6 +467,51 @@ export default class DiseasDeList extends Vue { this.getList(); }, 300); } + // 获取检查次数类型下拉列表 + private async getTimesTypeList() { + const res = await diseaseInfoServer.getTimesTypeList(); + if (res.status !== 200) { + return; + } + this.timesTypeList = res.data.data; + } + // 获取检查次数下拉列表 + private async getDetectionNumList() { + const res = await diseaseInfoServer.getDetectionNumList(); + if (res.status !== 200) { + return; + } + this.detectionNumDefaultList = res.data.data; + this.detectionNumList = JSON.parse( + JSON.stringify(this.detectionNumDefaultList), + ); + } + // 修改次数类型 + private timesTypeChange() { + if (this.queryInfo.compareFlag !== '0') { + this.detectionNumList = this.detectionNumList.filter( + (item: any) => item.code !== 'all', + ); + if ( + this.queryInfo.detectionNum === 'all' && + this.queryInfo.compareFlag === '2' + ) { + this.queryInfo.detectionNum = this.detectionNumList[0].code; + } else if ( + this.queryInfo.detectionNum === 'all' && + this.queryInfo.compareFlag === '1' + ) { + this.queryInfo.detectionNum = this.detectionNumList[ + this.detectionNumList.length - 1 + ].code; + } + } else { + this.detectionNumList = JSON.parse( + JSON.stringify(this.detectionNumDefaultList), + ); + } + this.query(); + } private detectionInput(from?: string) { this.queryInfo.detectionNum = Number(this.queryInfo.detectionNum).toFixed( @@ -449,13 +530,17 @@ export default class DiseasDeList extends Vue { // 重置 private reset() { this.queryInfo.suffererName = ''; - this.queryInfo.detectionNum = ''; + this.queryInfo.detectionNum = 'all'; this.queryInfo.detectionResult = '0'; this.queryInfo.isolationType = '0'; this.queryInfo.idNo = ''; this.queryInfo.sendSampleTime = ''; + this.queryInfo.compareFlag = '0'; this.queryDate = []; this.queryInfo.page = 1; + this.detectionNumList = JSON.parse( + JSON.stringify(this.detectionNumDefaultList), + ); this.getList(); } -- Gitee