|
|
|
|
@ -7,7 +7,7 @@ |
|
|
|
|
</div> |
|
|
|
|
<div class="week_text"> |
|
|
|
|
<div class="week_txt" v-for="item in weekArr" :key="item" @click="changeDate(item)" |
|
|
|
|
:class="[(new Date(item).getTime() <= new Date(yesterDay).getTime() ? 'week_none' : ''), item == selectDate ? 'today_week' : '', numData.find(item1 => item1.date == item) ? numData.find(item1 => item1.date == item).isNum == 1 ? 'isnum' : 'none' : '']"> |
|
|
|
|
:class="[(Date.parse(new Date(item)) <= Date.parse(new Date(yesterDay)) ? 'week_none' : ''), item == selectDate ? 'today_week' : '', numData.find(item1 => item1.date == item) ? numData.find(item1 => item1.date == item).isNum == 1 ? 'isnum' : 'none' : '']"> |
|
|
|
|
<div class="top_info"></div> |
|
|
|
|
{{ item.slice(-2) }} |
|
|
|
|
<div class="bottom_info" |
|
|
|
|
@ -115,21 +115,17 @@ export default { |
|
|
|
|
mounted() { |
|
|
|
|
this.hospitalId = this.$route.query.id; |
|
|
|
|
var WeekFirstDay = new Date(new Date() - (new Date().getDay() - 1) * 86400000); |
|
|
|
|
this.today = new Date().getDate(); |
|
|
|
|
this.today = new Date().getDate() < 10 ? '0' + new Date().getDate() : new Date().getDate(); |
|
|
|
|
this.isToday = this.today; |
|
|
|
|
let year = new Date().getFullYear(); |
|
|
|
|
let month = new Date().getMonth() + 1 < 10 ? '0' + (new Date().getMonth() + 1) : new Date().getMonth() + 1 |
|
|
|
|
let month1 = new Date().getMonth() + 2 < 10 ? '0' + (new Date().getMonth() + 2) : new Date().getMonth() + 2; |
|
|
|
|
let day = new Date().getDate() < 10 ? '0' + parseInt(new Date().getDate() - 1) : new Date().getDate() - 1 |
|
|
|
|
let lastDay = new Date(new Date().getFullYear(), new Date().getMonth() + 2, 0).getDate(); |
|
|
|
|
this.yesterDay = year + '-' + month + '-' + day |
|
|
|
|
let day1 = year + '-' + month + '-' + this.today |
|
|
|
|
// console.log(this.yesterDay) |
|
|
|
|
this.selectDate = year + '-' + month + '-' + (this.today < 10 ? '0' + this.today : this.today); |
|
|
|
|
// for (var i = WeekFirstDay.getDate(); i <= parseInt(WeekFirstDay.getDate()) + 6; i++) { |
|
|
|
|
// i = i < 10 ? '0' + i : i |
|
|
|
|
// this.weekArr.push(year + '-' + month + '-' + i) |
|
|
|
|
// } |
|
|
|
|
let month = new Date().getMonth() + 1 < 10 ? '0' + (new Date().getMonth() + 1) : new Date().getMonth() + 1; //当前月份 |
|
|
|
|
let month1 = parseInt(month) + 1 < 10 ? '0' + (parseInt(month) + 1) : parseInt(month) + 1; //当前月份的下一月份 |
|
|
|
|
console.log(month1) |
|
|
|
|
let now = new Date(); |
|
|
|
|
this.yesterDay = dateFormat(new Date(now.setDate(now.getDate() - 1)),'yyyy/MM/dd') ; |
|
|
|
|
|
|
|
|
|
let day1 = year + '-' + month + '-' + this.today; |
|
|
|
|
this.selectDate = year + '/' + month + '/' + this.today; |
|
|
|
|
this.weekArr = this.getWeekTime(day1) |
|
|
|
|
var todayWeek = new Date().getDay(); |
|
|
|
|
this.weekData.map((item, index) => { |
|
|
|
|
@ -138,7 +134,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.startTime = year + '-' + month + '-' + this.today; |
|
|
|
|
this.endTime = year + '-' + month1 + '-' + lastDay; |
|
|
|
|
this.endTime = this.getLastDay(year,month1); |
|
|
|
|
this.getDays() |
|
|
|
|
this.querySystemTime(); |
|
|
|
|
|
|
|
|
|
@ -180,7 +176,7 @@ export default { |
|
|
|
|
for (let key in this.dayArr) { |
|
|
|
|
this.dayArr[key].map(item => { |
|
|
|
|
this.numData.push({ |
|
|
|
|
date: item.date, |
|
|
|
|
date: item.date.replace(/-/g, '/'), |
|
|
|
|
isNum: item.enableApm |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
@ -206,7 +202,7 @@ export default { |
|
|
|
|
for (let key in this.dayArr) { |
|
|
|
|
this.dayArr[key].map(item => { |
|
|
|
|
this.numData.push({ |
|
|
|
|
date: item.date, |
|
|
|
|
date: item.date.replace(/-/g, '/'), |
|
|
|
|
isNum: item.enableApm |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
@ -233,6 +229,7 @@ export default { |
|
|
|
|
apmDay: this.selectDate, |
|
|
|
|
cupCardNo: this.Base64.encode(this.cupCardNo) |
|
|
|
|
} |
|
|
|
|
val.apmDay = val.apmDay.replace(/\//g, '-') |
|
|
|
|
vaildInterfacefn("cgstjyyxuwxt", "qdsgajjtjczdhqfhlb", JSON.stringify(val), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway) |
|
|
|
|
.then((value) => { |
|
|
|
|
this.$toast.clear(); |
|
|
|
|
@ -251,12 +248,14 @@ export default { |
|
|
|
|
this.$toast.clear(); |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
let val = { |
|
|
|
|
createDept: this.hospitalId, |
|
|
|
|
apmDay: this.selectDate, |
|
|
|
|
cupCardNo: this.Base64.encode(this.cupCardNo) |
|
|
|
|
} |
|
|
|
|
val.apmDay = val.apmDay.replace(/\//g, '-') |
|
|
|
|
queryList( |
|
|
|
|
{ |
|
|
|
|
createDept: this.hospitalId, |
|
|
|
|
apmDay: this.selectDate, |
|
|
|
|
cupCardNo: this.Base64.encode(this.cupCardNo) |
|
|
|
|
} |
|
|
|
|
val |
|
|
|
|
).then(res => { |
|
|
|
|
this.$toast.clear(); |
|
|
|
|
if (res.code == 200) { |
|
|
|
|
@ -274,6 +273,19 @@ export default { |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 获得某月的最后一天 |
|
|
|
|
getLastDay(year,month) { |
|
|
|
|
var new_year = year; //取当前的年份 |
|
|
|
|
var new_month = month ;//取下一个月的第一天,方便计算(最后一天不固定) |
|
|
|
|
new_month = new_month++ |
|
|
|
|
if(month>12) { |
|
|
|
|
new_month -=12; //月份减 |
|
|
|
|
new_year++; //年份增 |
|
|
|
|
} |
|
|
|
|
new_month = new_month < 10 ? '0' + new_month : new_month |
|
|
|
|
var new_date = new Date(new_year,new_month,1); //取当年当月中的第一天 |
|
|
|
|
return new_year + '-' + new_month + '-' + (new Date(new_date.getTime()-1000*60*60*24)).getDate();//获取当月最后一天日期 |
|
|
|
|
}, |
|
|
|
|
formatter(day) { |
|
|
|
|
/* |
|
|
|
|
这里的参数包含以下属性 |
|
|
|
|
@ -325,7 +337,7 @@ export default { |
|
|
|
|
// let month = new Date().getMonth() < 10 ? '0' + parseInt(new Date().getMonth() + 1) : new Date().getMonth() + 1 |
|
|
|
|
this.examData = []; |
|
|
|
|
this.selectDate = item; |
|
|
|
|
// console.log(this.selectDate) |
|
|
|
|
console.log(this.selectDate) |
|
|
|
|
this.getList() |
|
|
|
|
this.isToday = item |
|
|
|
|
}, |
|
|
|
|
@ -367,7 +379,7 @@ export default { |
|
|
|
|
let year = date.getFullYear(); |
|
|
|
|
let month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 |
|
|
|
|
let day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() |
|
|
|
|
let text = year + '-' + month + '-' + day |
|
|
|
|
let text = year + '/' + month + '/' + day |
|
|
|
|
this.selectDate = text; |
|
|
|
|
this.getList() |
|
|
|
|
}, |
|
|
|
|
@ -375,7 +387,7 @@ export default { |
|
|
|
|
let year = date.getFullYear(); |
|
|
|
|
let month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 |
|
|
|
|
let day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() |
|
|
|
|
let text = year + '-' + month + '-' + day |
|
|
|
|
let text = year + '/' + month + '/' + day |
|
|
|
|
this.selectDate = text; |
|
|
|
|
this.getList() |
|
|
|
|
|
|
|
|
|
@ -406,7 +418,7 @@ export default { |
|
|
|
|
let d = date.getDate() |
|
|
|
|
d < 10 ? d = "0" + d : d |
|
|
|
|
// let datetime = y + '-' + m + '-' + d |
|
|
|
|
let datetime = y + '-' + m + '-' + d |
|
|
|
|
let datetime = y + '/' + m + '/' + d |
|
|
|
|
dates.push(datetime) |
|
|
|
|
} |
|
|
|
|
return dates |
|
|
|
|
|