|
|
|
|
@ -61,7 +61,7 @@ |
|
|
|
|
<div class="exam_bottom"> |
|
|
|
|
<div class="exam_txt" v-for="item1 in item.detailList" :key="item1.time" |
|
|
|
|
@click="clickExam(item, item1)" |
|
|
|
|
:class="[(item1.residueNum == 0 ? 'isAct' : ''), (item1.isSelect ? 'active' : ''), Date.parse(new Date(item.apmDay.substring(0, 10) + ' ' + item1.timeFrame.split('-')[1] + ':00')) < Date.parse(new Date(systemTime)) ? 'isAct' : '']"> |
|
|
|
|
:class="[(item1.residueNum == 0 ? 'isAct' : ''), (item1.isSelect ? 'active' : ''), Date.parse(new Date(calcTime(item.apmDay.substring(0, 10),item1))) < Date.parse(new Date(systemTime)) ? 'isAct' : '']"> |
|
|
|
|
<div class="txt" style="font-size:0.22rem;color:#666;"><span |
|
|
|
|
style="font-size:0.24rem;color:#666">{{ item1.period }}</span> {{ item1.timeFrame }} |
|
|
|
|
</div> |
|
|
|
|
@ -80,6 +80,7 @@ |
|
|
|
|
<script> |
|
|
|
|
import { queryDays, queryList } from "@/api/examination"; |
|
|
|
|
import { getSystemTime, } from "@/api/hospital"; |
|
|
|
|
import { dateFormat } from "@/utils/date"; |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
@ -94,26 +95,7 @@ export default { |
|
|
|
|
minDate1: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 1), |
|
|
|
|
maxDate1: new Date(new Date().getFullYear(), new Date().getMonth() + 1, new Date(new Date().getFullYear(), new Date().getMonth() + 2, 0).getDate()), |
|
|
|
|
numData: [], |
|
|
|
|
examData: [ |
|
|
|
|
// {name:'单眼视力',position:'门诊楼3楼眼科门诊',total:20,residue:15,examArr:[ |
|
|
|
|
// {moment:'上午',time:'8:00-8:30',num:2}, |
|
|
|
|
// {moment:'上午',time:'8:30-9:00',num:0}, |
|
|
|
|
// {moment:'上午',time:'9:00-9:30',num:1}, |
|
|
|
|
// {moment:'上午',time:'9:30-10:00',num:1}, |
|
|
|
|
// ]}, |
|
|
|
|
// {name:'肢体',position:'门诊楼3楼',total:20,residue:15,examArr:[ |
|
|
|
|
// {moment:'上午',time:'8:00-8:30',num:2}, |
|
|
|
|
// {moment:'上午',time:'8:30-9:00',num:0}, |
|
|
|
|
// {moment:'上午',time:'9:00-9:30',num:1}, |
|
|
|
|
// {moment:'上午',time:'9:30-10:00',num:1}, |
|
|
|
|
// ]}, |
|
|
|
|
// {name:'听力',position:'门诊楼3楼听力门诊',total:20,residue:15,examArr:[ |
|
|
|
|
// {moment:'上午',time:'8:00-8:30',num:2}, |
|
|
|
|
// {moment:'上午',time:'8:30-9:00',num:0}, |
|
|
|
|
// {moment:'上午',time:'9:00-9:30',num:1}, |
|
|
|
|
// {moment:'上午',time:'9:30-10:00',num:1}, |
|
|
|
|
// ]} |
|
|
|
|
], |
|
|
|
|
examData: [], |
|
|
|
|
selectArr: [], |
|
|
|
|
selectDate: '', |
|
|
|
|
today: '', |
|
|
|
|
@ -123,7 +105,8 @@ export default { |
|
|
|
|
endTime: '', |
|
|
|
|
cupCardNo: '', |
|
|
|
|
dayArr: [], |
|
|
|
|
yesterDay: '' |
|
|
|
|
yesterDay: '', |
|
|
|
|
systemTime: dateFormat(new Date(), 'yyyy-MM-dd') |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
@ -159,6 +142,12 @@ export default { |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
//上午下午日期转换 |
|
|
|
|
calcTime(apmDay, item) { |
|
|
|
|
let lattime = apmDay.replace(/-/gi,'/') + ' ' + (item.period == '下午' ? 12 + parseInt(item.timeFrame.split('-')[1].split(':')[0]) : item.timeFrame.split('-')[1].split(':')[0]) + ':' + item.timeFrame.split('-')[1].split(':')[1] + ':00'; |
|
|
|
|
console.log('lattime22', lattime , this.systemTime); |
|
|
|
|
return lattime; |
|
|
|
|
}, |
|
|
|
|
querySystemTime() { |
|
|
|
|
if (this.GlobalConfig.appMode) { |
|
|
|
|
vaildInterfacefn("cgstjyyxuwxt", "qdsgajjtjczhqxtsj", JSON.stringify({}), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway) |
|
|
|
|
@ -247,21 +236,7 @@ export default { |
|
|
|
|
this.$toast.clear(); |
|
|
|
|
let retData = JSON.parse(value) |
|
|
|
|
console.log(retData.data) |
|
|
|
|
if (retData.data.length == 0) { |
|
|
|
|
this.examData = retData.data |
|
|
|
|
// lightAppJssdk.notification.alert({ |
|
|
|
|
// message: "当前时间无体检项目", |
|
|
|
|
// title: "提示",//可传空 |
|
|
|
|
// buttonName: "收到", |
|
|
|
|
// success: (data) => { |
|
|
|
|
|
|
|
|
|
// // console.log(this.examData) |
|
|
|
|
// }, |
|
|
|
|
// fail: data => { //错误返回 |
|
|
|
|
// // this.$toast.clear(); |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
} else { |
|
|
|
|
if(retData.code == 200) { |
|
|
|
|
this.examData = retData.data; |
|
|
|
|
this.examData.map(item => { |
|
|
|
|
item.detailList.map(item1 => { |
|
|
|
|
@ -270,7 +245,6 @@ export default { |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
console.log('data ===>', this.examData) |
|
|
|
|
}, err => { |
|
|
|
|
this.$toast.clear(); |
|
|
|
|
}) |
|
|
|
|
@ -283,9 +257,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
).then(res => { |
|
|
|
|
this.$toast.clear(); |
|
|
|
|
if (res.data.length == 0) { |
|
|
|
|
this.examData = res.data; |
|
|
|
|
} else { |
|
|
|
|
if (res.code == 200) { |
|
|
|
|
this.examData = res.data; |
|
|
|
|
this.examData.map(item => { |
|
|
|
|
item.detailList.map(item1 => { |
|
|
|
|
@ -349,6 +321,7 @@ export default { |
|
|
|
|
changeDate(item) { |
|
|
|
|
// let year = new Date().getFullYear() |
|
|
|
|
// 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) |
|
|
|
|
this.getList() |
|
|
|
|
|