From cdc8b25e1c9296e7c3314de0f0baf5738fe08874 Mon Sep 17 00:00:00 2001 From: jinna Date: Fri, 17 Feb 2023 18:23:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B0=83=E7=94=A8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/examination.vue | 104 ++++++++++++++++++++------------------ 1 file changed, 54 insertions(+), 50 deletions(-) diff --git a/src/views/examination.vue b/src/views/examination.vue index 732717e..23c3411 100644 --- a/src/views/examination.vue +++ b/src/views/examination.vue @@ -169,12 +169,45 @@ export default { }, methods: { querySystemTime() { - getSystemTime().then(res => { - this.systemTime = res.data; - }) + if (this.GlobalConfig.appMode) { + vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczhqxtsj", JSON.stringify({}), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway) + .then((value) => { + let retData = JSON.parse(value); + // console.log('retData ===>',retData) + this.systemTime = retData.data + }) + }else{ + getSystemTime().then(res => { + this.systemTime = res.data; + }) + } + }, getDays(){ - queryDays( + if (this.GlobalConfig.appMode) { + let val = { + createDept:this.hospitalId, + startTime:this.startTime, + endTime:this.endTime + } + vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczdhqyfhrq", JSON.stringify(val), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway) + .then((value) => { + let retData = JSON.parse(value); + // console.log("ret ===>",retData ) + this.dayArr = retData.data; + console.log(this.dayArr) + for(let key in this.dayArr){ + this.dayArr[key].map(item =>{ + this.numData.push({ + date:item.date, + isNum:item.enableApm + }) + }) + } + }) + + }else{ + queryDays( { createDept:this.hospitalId, startTime:this.startTime, @@ -198,12 +231,27 @@ export default { } } }) + } + }, getList(){ this.$toast.loading({ message:'加载中', duration: 0, }) + if (this.GlobalConfig.appMode) { + console.log('接口') + let val = { + createDept:this.hospitalId, + apmDay: this.selectDate, + cupCardNo:this.cupCardNo + } + vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczdhqfhlb", JSON.stringify(val), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway) + .then((value) => { + console.log('val===>',value) + this.$toast.clear(); + }) + }else{ queryList( { createDept:this.hospitalId, @@ -217,52 +265,7 @@ export default { title: "提示",//可传空 buttonName: "收到", success: (data) => { - if(JSON.parse(data).buttonIndex == 1){ - this.examData = [ - { - project:'单眼视力',cuAddr:'', - totalNum : 0, totalApmNum: 0, - apmDay: new Date().getFullYear() + '-' + new Date().getMonth() < 10 ? '0' + parseInt(new Date().getMonth() + 1) : new Date().getMonth() + '-' + new Date().getDate(), - detailList: [] - }, - { - project:'听力',cuAddr:'', - totalNum : 0, totalApmNum: 0, - apmDay: new Date().getFullYear() + '-' + new Date().getMonth() < 10 ? '0' + parseInt(new Date().getMonth() + 1) : new Date().getMonth() + '-' + new Date().getDate(), - detailList: [] - }, - { - project:'四肢',cuAddr:'', - totalNum : 0, totalApmNum: 0, - apmDay: new Date().getFullYear() + '-' + new Date().getMonth() < 10 ? '0' + parseInt(new Date().getMonth() + 1) : new Date().getMonth() + '-' + new Date().getDate(), - detailList: [ - ] - } - ]; - this.examData.map(item =>{ - item.detailList.push( - {period:"上午",timeFrame: "08:00-08:30",numberNum: 5,apmNum: 0, - residueNum: 0,enableApm: 0 - }, - {period:"上午",timeFrame: "08:30-09:00",numberNum: 5,apmNum: 0, - residueNum: 0,enableApm: 0 - },{period:"上午",timeFrame: "09:00-09:30",numberNum: 5,apmNum: 0, - residueNum: 0,enableApm: 0 - },{period:"上午",timeFrame: "09:30-10:00",numberNum: 5,apmNum: 0, - residueNum: 0,enableApm: 0 - },{period:"下午",timeFrame: "01:00-01:30",numberNum: 5,apmNum: 0, - residueNum: 0,enableApm: 0 - },{period:"下午",timeFrame: "01:30-02:00",numberNum: 5,apmNum: 0, - residueNum: 0,enableApm: 0 - },{period:"下午",timeFrame: "02:00-02:30",numberNum: 5,apmNum: 0, - residueNum: 0,enableApm: 0 - },{period:"下午",timeFrame: "02:30-03:00",numberNum: 5,apmNum: 0, - residueNum: 0,enableApm: 0 - }, - ) - }) - this.$toast.clear(); - } + this.$toast.clear(); // console.log(this.examData) }, fail: function (data) { //错误返回 @@ -280,6 +283,7 @@ export default { }) }) }) + } }, formatter(day){ /*