From 8b0b3b6270aaf5122033c91387c3742f632e0168 Mon Sep 17 00:00:00 2001 From: wuqing_b Date: Wed, 18 Mar 2020 12:23:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A0=B8=E9=85=B8=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E6=95=B0=E6=8D=AE=E5=AF=B9=E6=AF=94=E6=8C=89=E9=92=AE?= =?UTF-8?q?=20=E6=8F=90=E7=A4=BA=E8=AF=AD=E9=95=BF=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=B6=88=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/feature/diseaseInfoServer.ts | 5 + .../feature/DataCompare/DataCompare.vue | 201 ++++++++++++------ src/views/PatientPortrayal.vue | 12 +- 3 files changed, 150 insertions(+), 68 deletions(-) diff --git a/src/api/feature/diseaseInfoServer.ts b/src/api/feature/diseaseInfoServer.ts index 196a7b9..171a79f 100644 --- a/src/api/feature/diseaseInfoServer.ts +++ b/src/api/feature/diseaseInfoServer.ts @@ -227,6 +227,11 @@ export class DiseaseInfoServer { const url = `infection/trace/generate/fever/${date}`; return this.rSerivce.serverObj.post(url); } + // 核酸检测对比 + public updateNucleicDetection() { + const url = `infection/nucleic/detection/detectionNumUpdate`; + return this.rSerivce.serverObj.post(url); + } // 更新患者位置 public updatePatientLocation(date: any) { const url = `infection/adress/latest/list?prevDate=${date}`; diff --git a/src/components/feature/DataCompare/DataCompare.vue b/src/components/feature/DataCompare/DataCompare.vue index c9a22f2..dfa8dd6 100644 --- a/src/components/feature/DataCompare/DataCompare.vue +++ b/src/components/feature/DataCompare/DataCompare.vue @@ -3,63 +3,83 @@ 选择日期: - + - - + 疫情网数据对比 - + 隔离点数据对比 - + - - + {{ epidemicResult }} + + + {{ quarantineResult }} + + + + + 方舱医院数据对比 - - + 定点医院数据对比 - + - - + {{ FCdataResult }} + + + {{ pointDataResult }} + + + + + 发热门数据对比 - + + 核酸检测数据对比 + + + + + {{ feverResult }} + + + {{ nucleicResult }} + + + + - + + + {{ patientLocationResult }} + + @@ -80,134 +104,183 @@ import { diseaseInfoServer } from '@/api/installServer'; name: 'DiseaseList', }) export default class DiseasDeList extends Vue { + // 操作结果 + private epidemicResult: string = '暂未比对'; + private nucleicResult: string = '暂未比对'; + private quarantineResult: string = '暂未比对'; + private pointDataResult: string = '暂未比对'; + private feverResult: string = '暂未比对'; + private FCdataResult: string = '暂未比对'; + private patientLocationResult: string = '暂未更新'; + // 选择的时间 默认前一天 private date: any = ''; // 禁用明天开始的日期 - private pickerOptions: object = (() => { -   return { -     disabledDate: (time: any) => { -       return this.$moment(time).isAfter( -         this.$moment(), -          'day', -       ); -     }, -   }; - })(); + private pickerOptions: object = (() => { + return { + disabledDate: (time: any) => { + return this.$moment(time).isAfter(this.$moment(), 'day'); + }, + }; + })(); private created() { - this.date =  this.$moment(this.$moment().subtract(1, 'days')).format('YYYY-MM-DD'); + this.date = this.$moment(this.$moment().subtract(1, 'days')).format( + 'YYYY-MM-DD', + ); } -// private refreshTabList() { -// console.log(this.date) -// } + // private refreshTabList() { + // console.log(this.date) + // } // 隔离点数据对比 private quarantineDataCompare(date: any) { diseaseInfoServer.dataCompare(date).then((res: any) => { try { if (res.data.code === '200') { + this.quarantineResult = '隔离点数据对比成功'; this.$message.success(res.data.msg); } else { + this.quarantineResult = '隔离点数据对比失败'; this.$message.error(res.data.msg); } } catch (error) { + this.quarantineResult = '隔离点数据对比失败'; this.$message('系统异常'); } }); } - // 疫情网数据对比 + // 疫情网数据对比 private epidemicDataCompare() { diseaseInfoServer.dataCompareCDC().then((res: any) => { try { if (res.data.code === '200') { + this.epidemicResult = '疫情网数据对比成功'; this.$message.success(res.data.msg); } else { + this.epidemicResult = '疫情网数据对比失败'; this.$message.error(res.data.msg); } } catch (error) { + this.epidemicResult = '疫情网数据对比失败'; this.$message('系统异常'); } }); } - // 方舱医院数据对比 + // 方舱医院数据对比 private dataCompareFC(date: any) { diseaseInfoServer.dataCompareFC(date).then((res: any) => { try { if (res.data.code === '200') { + this.FCdataResult = '方舱医院数据对比成功'; this.$message.success(res.data.msg); } else { + this.FCdataResult = '方舱医院数据对比失败'; this.$message.error(res.data.msg); } } catch (error) { + this.FCdataResult = '方舱医院数据对比失败'; this.$message('系统异常'); } }); } - // 定点医院数据对比 + // 定点医院数据对比 private dataComparePoint(date: any) { diseaseInfoServer.dataComparePoint(date).then((res: any) => { try { if (res.data.code === '200') { + this.pointDataResult = '定点医院数据对比成功'; this.$message.success(res.data.msg); } else { + this.pointDataResult = '定点医院数据对比失败'; this.$message.error(res.data.msg); } } catch (error) { + this.pointDataResult = '定点医院数据对比成功失败'; this.$message('系统异常'); } }); } - // 发热门诊数据对比 + // 发热门诊数据对比 private dataCompareFever(date: any) { diseaseInfoServer.dataCompareFever(date).then((res: any) => { try { if (res.data.code === '200') { + this.feverResult = '发热门诊数据对比成功'; this.$message.success(res.data.msg); } else { + this.feverResult = '发热门诊数据对比失败'; this.$message.error(res.data.msg); } } catch (error) { + this.feverResult = '发热门诊数据对比失败'; this.$message('系统异常'); } }); } - // 更新患者位置 + // 更新患者位置 private updatePatientLocation(date: any) { diseaseInfoServer.updatePatientLocation(date).then((res: any) => { try { - if (res.data.code === '200') { - this.$message.success(res.data.msg); + if (res.data.status === 200) { + this.patientLocationResult = '患者位置更新成功'; + this.$message.success(res.data.data); } else { - this.$message.error(res.data.msg); + this.patientLocationResult = '患者位置更新失败'; + this.$message.error(res.data.data); } } catch (error) { + this.patientLocationResult = '患者位置更新失败'; this.$message('系统异常'); } }); } + // 核酸检测数据对比 updateNucleicDetection + private updateNucleicDetection() { + diseaseInfoServer.updateNucleicDetection().then((res: any) => { + try { + if (res.status === 200) { + this.nucleicResult = '核酸检测数据对比成功'; + } else { + this.nucleicResult = '核酸检测数据对比失败'; + } + } catch (error) { + this.nucleicResult = '核酸检测数据对比失败'; + this.$message('系统异常'); + } + }); + } + // 切换日期后重置提示语 + private resetTips() { + this.epidemicResult = '暂未比对'; + this.quarantineResult = '暂未比对'; + this.pointDataResult = '暂未比对'; + this.feverResult = '暂未比对'; + this.FCdataResult = '暂未比对'; + this.patientLocationResult = '暂未更新'; + } } - diff --git a/src/views/PatientPortrayal.vue b/src/views/PatientPortrayal.vue index 42c8a03..d63f811 100644 --- a/src/views/PatientPortrayal.vue +++ b/src/views/PatientPortrayal.vue @@ -122,7 +122,9 @@
病患位置: - {{ sufferData.location || '-' }} + {{ + sufferData.location || '-' + }}
感染人数: @@ -727,11 +729,15 @@ export default class LayoutHome extends Vue { float: left; } &:nth-child(2) { + width: 190px; float: left; font-size: 16px; color: #23ddfd; line-height: 32px; margin-left: 20px; + overflow: hidden; //超出的文本隐藏 + text-overflow: ellipsis; //溢出用省略号显示 + white-space: nowrap; //溢出不换行 } &:nth-child(3) { font-size: 16px; @@ -748,11 +754,9 @@ export default class LayoutHome extends Vue { margin-left: 15px; width: 50px; } - &:nth-child(2).suffer-type { - color: #23ddfd; - } &:nth-child(2).close-contact { font-size: 18px; + width: 30px; } } } -- Gitee