修改调用接口

main
jinna 3 years ago
parent 985dcddc71
commit cdc8b25e1c
  1. 104
      src/views/examination.vue

@ -169,12 +169,45 @@ export default {
}, },
methods: { methods: {
querySystemTime() { querySystemTime() {
getSystemTime().then(res => { if (this.GlobalConfig.appMode) {
this.systemTime = res.data; 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(){ 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, createDept:this.hospitalId,
startTime:this.startTime, startTime:this.startTime,
@ -198,12 +231,27 @@ export default {
} }
} }
}) })
}
}, },
getList(){ getList(){
this.$toast.loading({ this.$toast.loading({
message:'加载中', message:'加载中',
duration: 0, 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( queryList(
{ {
createDept:this.hospitalId, createDept:this.hospitalId,
@ -217,52 +265,7 @@ export default {
title: "提示",// title: "提示",//
buttonName: "收到", buttonName: "收到",
success: (data) => { success: (data) => {
if(JSON.parse(data).buttonIndex == 1){ this.$toast.clear();
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();
}
// console.log(this.examData) // console.log(this.examData)
}, },
fail: function (data) { // fail: function (data) { //
@ -280,6 +283,7 @@ export default {
}) })
}) })
}) })
}
}, },
formatter(day){ formatter(day){
/* /*

Loading…
Cancel
Save