|
|
|
|
@ -6,10 +6,11 @@ |
|
|
|
|
<div class="week_num" v-for="item in weekData" :key="item">{{item}}</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="week_text"> |
|
|
|
|
<div class="week_txt" v-for="item in weekArr" :key="item" @click="changeDate(item)" :class="[(item < today ? 'week_none' : ''),item == isToday ? 'today_week' : '',numData.find(item1 => item1.date.slice(-2) == (item < 0 ? '0' + item : item)) ? numData.find(item1 => item1.date.slice(-2) == (item < 0 ? '0' + item : item)).isNum == 0 ? 'isnum' : 'none' : '']"> |
|
|
|
|
<div class="week_txt" v-for="item in weekArr" :key="item" @click="changeDate(item)" :class="[(item < today ? 'week_none' : ''),item == selectDate.slice(-2) ? 'today_week' : '',numData.find(item1 => item1.date.slice(-2) == (item < 0 ? '0' + item : item)) ? numData.find(item1 => item1.date.slice(-2) == (item < 0 ? '0' + item : item)).isNum == 0 ? 'isnum' : 'none' : '']"> |
|
|
|
|
<div class="top_info"></div> |
|
|
|
|
{{item}} |
|
|
|
|
<div class="bottom_info" v-text="numData.find(item1 => item1.date.slice(-2) == (item < 0 ? '0' + item : item)) ? numData.find(item1 => item1.date.slice(-2) == (item < 0 ? '0' + item : item)).isNum == 0 ? '有号' :'无号' : ''"></div> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
@ -21,7 +22,7 @@ |
|
|
|
|
ref="calendar" |
|
|
|
|
first-day-of-week="1" |
|
|
|
|
v-model="show" |
|
|
|
|
@confirm="onConfirm" |
|
|
|
|
@confirm="onConfirm" |
|
|
|
|
:poppable="false" |
|
|
|
|
:show-mark="false" |
|
|
|
|
:show-title="false" |
|
|
|
|
@ -30,6 +31,7 @@ |
|
|
|
|
:min-date="minDate" |
|
|
|
|
:max-date="maxDate" |
|
|
|
|
:formatter="formatter" |
|
|
|
|
:default-date="new Date(selectDate)" |
|
|
|
|
/> |
|
|
|
|
</van-swipe-item> |
|
|
|
|
<van-swipe-item> |
|
|
|
|
@ -46,6 +48,8 @@ |
|
|
|
|
:show-confirm="false" |
|
|
|
|
:min-date="minDate1" |
|
|
|
|
:max-date="maxDate1" |
|
|
|
|
:formatter="formatter1" |
|
|
|
|
:default-date="new Date(selectDate)" |
|
|
|
|
/> |
|
|
|
|
</van-swipe-item> |
|
|
|
|
</van-swipe> |
|
|
|
|
@ -59,19 +63,19 @@ |
|
|
|
|
<div class="exam_box" v-for="item in examData" :key="item.name"> |
|
|
|
|
<div class="exam_top"> |
|
|
|
|
<div class="top_left"> |
|
|
|
|
<div class="name_txt">{{item.name}}</div> |
|
|
|
|
<div class="name_txt">{{item.project}}</div> |
|
|
|
|
<div class="posi_txt"> |
|
|
|
|
<img style="width:0.24rem;height:0.24rem" src="~@/assets/image/posi.png" alt=""> |
|
|
|
|
<div style="color: #999;font-size: 0.24rem;">{{item.position}}</div> |
|
|
|
|
<div style="color: #999;font-size: 0.24rem;">{{item.cuAddr}}</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="top_right"><div style="font-size:0.3rem;color:#333">{{item.residue}}</div><div style="font-size:0.22rem;color:rgba(51, 51, 51,0.5)">/{{item.total}}</div> |
|
|
|
|
<div class="top_right"><div style="font-size:0.3rem;color:#333">{{item.totalApmNum}}</div><div style="font-size:0.22rem;color:rgba(51, 51, 51,0.5)">/{{item.totalNum}}</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="exam_bottom"> |
|
|
|
|
<div class="exam_txt" v-for="item1 in item.examArr" :key="item1.time" @click="clickExam(item,item1)" :class="[(item1.num == 0 ? 'isAct' : ''),(item1.isSelect ? 'active' : '')]"> |
|
|
|
|
<div class="txt" style="font-size:0.22rem;color:#666;"><span style="font-size:0.24rem;color:#666">{{item1.moment}}</span> {{item1.time}}</div> |
|
|
|
|
<div style="font-size:0.24rem;color:#333333;">剩余:{{item1.num}}</div> |
|
|
|
|
<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' : '')]"> |
|
|
|
|
<div class="txt" style="font-size:0.22rem;color:#666;"><span style="font-size:0.24rem;color:#666">{{item1.period}}</span> {{item1.timeFrame}}</div> |
|
|
|
|
<div style="font-size:0.24rem;color:#333333;">剩余:{{item1.residueNum}}</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
@ -98,27 +102,26 @@ export default { |
|
|
|
|
maxDate: new Date(new Date().getFullYear(), new Date().getMonth(), new Date(new Date().getFullYear(),new Date().getMonth() + 1,0).getDate()), |
|
|
|
|
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:[{date:'2023-02-09',isNum:1},{date:'2023-02-11',isNum:0}, |
|
|
|
|
{date:'2023-02-15',isNum:1},{date:'2023-02-17',isNum:1},{date:'2023-02-20',isNum:0}], |
|
|
|
|
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}, |
|
|
|
|
]} |
|
|
|
|
// {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}, |
|
|
|
|
// ]} |
|
|
|
|
], |
|
|
|
|
selectArr:[], |
|
|
|
|
selectDate:'', |
|
|
|
|
@ -127,7 +130,8 @@ export default { |
|
|
|
|
hospitalId:'', |
|
|
|
|
startTime:'', |
|
|
|
|
endTime:'', |
|
|
|
|
cupCardNo:'' |
|
|
|
|
cupCardNo:'', |
|
|
|
|
dayArr:[] |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
@ -153,7 +157,7 @@ export default { |
|
|
|
|
}) |
|
|
|
|
this.startTime = year + '-' + month + '-' + this.today; |
|
|
|
|
this.endTime = year + '-' + month1 + '-' + lastDay; |
|
|
|
|
// this.getDays() |
|
|
|
|
this.getDays() |
|
|
|
|
this.cupCardNo = JSON.parse(sessionStorage.getItem('userInfo')).papersnumber; |
|
|
|
|
this.getList() |
|
|
|
|
}, |
|
|
|
|
@ -166,25 +170,136 @@ export default { |
|
|
|
|
endTime:this.endTime |
|
|
|
|
} |
|
|
|
|
).then(res =>{ |
|
|
|
|
console.log(res) |
|
|
|
|
this.numData = [] |
|
|
|
|
if(JSON.stringify(res.data) === '{}'){ |
|
|
|
|
this.dayArr = []; |
|
|
|
|
this.numData = this.dayArr |
|
|
|
|
}else{ |
|
|
|
|
this.dayArr = res.data; |
|
|
|
|
for(let key in this.dayArr){ |
|
|
|
|
console.log(key) |
|
|
|
|
console.log(this.dayArr[key]) |
|
|
|
|
this.dayArr[key].map(item =>{ |
|
|
|
|
this.numData.push({ |
|
|
|
|
date:item, |
|
|
|
|
isNum:0 |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
getList(){ |
|
|
|
|
queryList( |
|
|
|
|
{ |
|
|
|
|
createDept:this.hospitalId, |
|
|
|
|
apmDay:this.selectDate, |
|
|
|
|
apmDay: this.selectDate, |
|
|
|
|
cupCardNo:this.cupCardNo |
|
|
|
|
} |
|
|
|
|
).then(res =>{ |
|
|
|
|
console.log('列表===>',res ) |
|
|
|
|
}) |
|
|
|
|
this.examData.map(item =>{ |
|
|
|
|
item.examArr.map(item1 =>{ |
|
|
|
|
item1.isSelect = false |
|
|
|
|
if(res.data.length == 0){ |
|
|
|
|
this.examData = [ |
|
|
|
|
{ |
|
|
|
|
project:'单眼视力',cuAddr:'三楼眼科',apmDay: "2023-03-12", |
|
|
|
|
totalNum : 10, totalApmNum: 0, |
|
|
|
|
detailList: [ |
|
|
|
|
{ |
|
|
|
|
period:"上午", |
|
|
|
|
timeFrame: "9:00-9:30", |
|
|
|
|
numberNum: 5, |
|
|
|
|
apmNum: 0, |
|
|
|
|
residueNum: 0, |
|
|
|
|
enableApm: 0 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
period:"上午", |
|
|
|
|
timeFrame: "9:30-10:00", |
|
|
|
|
numberNum: 5, |
|
|
|
|
apmNum: 0, |
|
|
|
|
residueNum: 0, // 剩余号数 |
|
|
|
|
enableApm: 0 // 是否可预约 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
period:"上午", |
|
|
|
|
timeFrame: "10:30-11:00", |
|
|
|
|
numberNum: 5, |
|
|
|
|
apmNum: 0, |
|
|
|
|
residueNum: 0, // 剩余号数 |
|
|
|
|
enableApm: 0 // 是否可预约 |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
project:'听力',cuAddr:'三楼眼科',apmDay: "2023-03-12", |
|
|
|
|
totalNum : 10, totalApmNum: 0, |
|
|
|
|
detailList: [ |
|
|
|
|
{ |
|
|
|
|
period:"上午", |
|
|
|
|
timeFrame: "9:00-9:30", |
|
|
|
|
numberNum: 5, |
|
|
|
|
apmNum: 0, |
|
|
|
|
residueNum: 0, |
|
|
|
|
enableApm: 0 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
period:"上午", |
|
|
|
|
timeFrame: "9:30-10:00", |
|
|
|
|
numberNum: 5, |
|
|
|
|
apmNum: 0, |
|
|
|
|
residueNum: 0, // 剩余号数 |
|
|
|
|
enableApm: 0 // 是否可预约 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
period:"上午", |
|
|
|
|
timeFrame: "10:30-11:00", |
|
|
|
|
numberNum: 5, |
|
|
|
|
apmNum: 0, |
|
|
|
|
residueNum: 0, // 剩余号数 |
|
|
|
|
enableApm: 0 // 是否可预约 |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
project:'四肢',cuAddr:'三楼眼科',apmDay: "2023-03-12", |
|
|
|
|
totalNum : 10, totalApmNum: 0, |
|
|
|
|
detailList: [ |
|
|
|
|
{ |
|
|
|
|
period:"上午", |
|
|
|
|
timeFrame: "9:00-9:30", |
|
|
|
|
numberNum: 5, |
|
|
|
|
apmNum: 0, |
|
|
|
|
residueNum: 0, |
|
|
|
|
enableApm: 0 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
period:"上午", |
|
|
|
|
timeFrame: "9:30-10:00", |
|
|
|
|
numberNum: 5, |
|
|
|
|
apmNum: 0, |
|
|
|
|
residueNum: 0, // 剩余号数 |
|
|
|
|
enableApm: 0 // 是否可预约 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
period:"上午", |
|
|
|
|
timeFrame: "10:30-11:00", |
|
|
|
|
numberNum: 5, |
|
|
|
|
apmNum: 0, |
|
|
|
|
residueNum: 0, // 剩余号数 |
|
|
|
|
enableApm: 0 // 是否可预约 |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
]; |
|
|
|
|
}else{ |
|
|
|
|
this.examData = res.data; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
this.examData.map(item =>{ |
|
|
|
|
item.detailList.map(item1 =>{ |
|
|
|
|
item1.isSelect = false |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
console.log(this.examData) |
|
|
|
|
}, |
|
|
|
|
formatter(day){ |
|
|
|
|
/* |
|
|
|
|
@ -196,15 +311,19 @@ export default { |
|
|
|
|
|
|
|
|
|
我们只需要修改type值为 disabled 即可 |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
if(day.date.getDate() < new Date().getDate()){ |
|
|
|
|
day.type = 'disabled' |
|
|
|
|
}else{ |
|
|
|
|
let month = day.date.getMonth() < 10 ? '0' + parseInt(day.date.getMonth() + 1) : day.date.getMonth() + 1; |
|
|
|
|
this.numData.forEach(item =>{ |
|
|
|
|
if(day.date.getDate() == item.date.slice(-2)){ |
|
|
|
|
item.isNum == 0 ? day.bottomInfo = '有号' : day.bottomInfo = '无号' |
|
|
|
|
item.isNum == 0 ? day.className = 'num1' : day.className = 'num2' |
|
|
|
|
|
|
|
|
|
if(month == item.date.substr(5,2)){ |
|
|
|
|
if(day.date.getDate() == item.date.slice(-2)){ |
|
|
|
|
item.isNum == 0 ? day.bottomInfo = '有号' : day.bottomInfo = '无号' |
|
|
|
|
item.isNum == 0 ? day.className = 'num1' : day.className = 'num2' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
// if(day.date.getDate() == new Date().getDate()){ |
|
|
|
|
@ -214,22 +333,42 @@ export default { |
|
|
|
|
// } |
|
|
|
|
return day |
|
|
|
|
}, |
|
|
|
|
formatter1(day){ |
|
|
|
|
let month = day.date.getMonth() < 10 ? '0' + parseInt(day.date.getMonth() + 1) : day.date.getMonth() + 1; |
|
|
|
|
this.numData.forEach(item =>{ |
|
|
|
|
if(month == item.date.substr(5,2)){ |
|
|
|
|
if(day.date.getDate() == item.date.slice(-2)){ |
|
|
|
|
item.isNum == 0 ? day.bottomInfo = '有号' : day.bottomInfo = '无号' |
|
|
|
|
item.isNum == 0 ? day.className = 'num1' : day.className = 'num2' |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
day.topInfo = ` ` |
|
|
|
|
return day |
|
|
|
|
}, |
|
|
|
|
changeDate(item){ |
|
|
|
|
console.log(item) |
|
|
|
|
let year = new Date().getFullYear() |
|
|
|
|
let month = new Date().getMonth() < 10 ? '0' + parseInt(new Date().getMonth() + 1) : new Date().getMonth() + 1 |
|
|
|
|
this.selectDate = year + '-' + month + '-' + item; |
|
|
|
|
this.getList() |
|
|
|
|
this.isToday = item |
|
|
|
|
}, |
|
|
|
|
isShow(){ |
|
|
|
|
console.log(111) |
|
|
|
|
this.isCal = !this.isCal |
|
|
|
|
this.isCal = !this.isCal |
|
|
|
|
console.log(this.selectDate) |
|
|
|
|
}, |
|
|
|
|
clickExam(val,val1){ |
|
|
|
|
console.log(val,val1) |
|
|
|
|
this.selectArr = [] |
|
|
|
|
let arr = JSON.parse(JSON.stringify(this.examData)) |
|
|
|
|
console.log(arr) |
|
|
|
|
arr.find(item =>{ |
|
|
|
|
if(item.name == val.name){ |
|
|
|
|
console.log(item) |
|
|
|
|
item.examArr.find(item1 =>{ |
|
|
|
|
if(item1.time == val1.time){ |
|
|
|
|
console.log('item ===>',item) |
|
|
|
|
if(item.project == val.project){ |
|
|
|
|
item.detailList.find(item1 =>{ |
|
|
|
|
if(item1.timeFrame == val1.timeFrame){ |
|
|
|
|
item1.isSelect = true |
|
|
|
|
}else{ |
|
|
|
|
item1.isSelect = false |
|
|
|
|
@ -239,12 +378,12 @@ export default { |
|
|
|
|
}) |
|
|
|
|
this.examData = arr |
|
|
|
|
this.examData.map(item =>{ |
|
|
|
|
item.examArr.map(item1 =>{ |
|
|
|
|
item.detailList.map(item1 =>{ |
|
|
|
|
if(item1.isSelect){ |
|
|
|
|
this.selectArr.push({ |
|
|
|
|
name:item.name, |
|
|
|
|
posi:item.position, |
|
|
|
|
time:item1.moment + ' ' + item1.time, |
|
|
|
|
name:item.project, |
|
|
|
|
posi:item.cuAddr, |
|
|
|
|
time:item1.period + ' ' + item1.timeFrame, |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
@ -255,15 +394,20 @@ export default { |
|
|
|
|
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 val = this.numData.find(item => item.date == text) |
|
|
|
|
console.log(val) |
|
|
|
|
if(val){ |
|
|
|
|
this.selectDate = val.date |
|
|
|
|
}else{ |
|
|
|
|
// this.$toast('异常') |
|
|
|
|
} |
|
|
|
|
console.log(text) |
|
|
|
|
this.selectDate = text; |
|
|
|
|
this.getList() |
|
|
|
|
}, |
|
|
|
|
onConfirm1(date){ |
|
|
|
|
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 |
|
|
|
|
console.log(text) |
|
|
|
|
this.selectDate = text; |
|
|
|
|
this.getList() |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
onConfirm1(){}, |
|
|
|
|
handleExam(){ |
|
|
|
|
console.log(this.selectArr,this.selectDate) |
|
|
|
|
this.$router.push({ |
|
|
|
|
@ -439,12 +583,12 @@ export default { |
|
|
|
|
.exam_bottom{ |
|
|
|
|
width: 93%; |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: space-between; |
|
|
|
|
justify-content: flex-start; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
flex-wrap: wrap; |
|
|
|
|
|
|
|
|
|
.exam_txt{ |
|
|
|
|
width: 2.2rem; |
|
|
|
|
width: 32%; |
|
|
|
|
height: 1rem; |
|
|
|
|
background: #F6F6F6; |
|
|
|
|
border: 1px solid #1677FF; |
|
|
|
|
@ -454,7 +598,8 @@ export default { |
|
|
|
|
justify-content: space-around; |
|
|
|
|
align-items: center; |
|
|
|
|
font-size: 0.22rem; |
|
|
|
|
margin-bottom: 0.2rem; |
|
|
|
|
margin: 0 0.025rem 0.2rem; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.isAct{ |
|
|
|
|
|