|
@@ -1207,11 +1207,10 @@
|
1207
|
1207
|
</div>
|
1208
|
1208
|
<div @click="viewDayWork">
|
1209
|
1209
|
<el-calendar v-model="time_value">
|
1210
|
|
-
|
1211
|
1210
|
<template
|
1212
|
1211
|
slot="dateCell"
|
1213
|
|
- slot-scope="{date, data}">
|
1214
|
|
- <p :class="data.isSelected ? 'is-selected' : ''" style="text-align: center;">
|
|
1212
|
+ slot-scope="{date, data}" >
|
|
1213
|
+ <p :class="data.isSelected ? 'is-selected' : ''" style="text-align: center;" >
|
1215
|
1214
|
{{ data.day.split('-').slice(2).join('-') }}<br/>
|
1216
|
1215
|
<span v-for="(item,index) in orderList" :key="index" style="background: red;color: white;text-align: center;">
|
1217
|
1216
|
<span v-if="data.day == item.order_date">
|
|
@@ -2962,7 +2961,6 @@ export default {
|
2962
|
2961
|
getmonth(val){
|
2963
|
2962
|
// const months= new Date(val).getMonth()
|
2964
|
2963
|
// let startTime = moment().month(months).startOf('month').format('YYYY-MM-DD')
|
2965
|
|
-
|
2966
|
2964
|
// // //某月最后一天
|
2967
|
2965
|
// let endTime = moment().month(months).endOf('month').format('YYYY-MM-DD')
|
2968
|
2966
|
// this.startTime = startTime
|
|
@@ -2970,6 +2968,7 @@ export default {
|
2970
|
2968
|
// console.log('time_value333333',this.startTime,this.endTime);
|
2971
|
2969
|
},
|
2972
|
2970
|
getOrderTime(val){
|
|
2971
|
+ // console.log('77778888',val,this.dialysis_date=uParseTime(val, "{y}-{m}-{d}"));
|
2973
|
2972
|
if (val < 0) {
|
2974
|
2973
|
return "";
|
2975
|
2974
|
}
|
|
@@ -2980,14 +2979,29 @@ export default {
|
2980
|
2979
|
}
|
2981
|
2980
|
},
|
2982
|
2981
|
viewDayWork(val){
|
2983
|
|
- console.log("val33333333333333",val)
|
2984
|
|
- var patient_id = this.$route.query.patient_id
|
2985
|
|
- var start_time = this.timestamp(this.start_time)
|
2986
|
|
- this.$router.push({
|
2987
|
|
- path: "/dialysis/details",
|
2988
|
|
- query: { patient_id:patient_id , date: start_time}
|
2989
|
|
- });
|
2990
|
|
- this.history_click = false
|
|
2982
|
+ const len = (val.target.innerText).split(' ')
|
|
2983
|
+ console.log("val33333333333333444",len)
|
|
2984
|
+ if(val.target.innerText == '下个月'){
|
|
2985
|
+ this.time_value()
|
|
2986
|
+ }else if(val.target.innerText == '上个月'){
|
|
2987
|
+ this.time_value()
|
|
2988
|
+ }else if(val.target.innerText =='今天'){
|
|
2989
|
+ this.time_value()
|
|
2990
|
+ }else{
|
|
2991
|
+ // console.log('4444',this.orderList);
|
|
2992
|
+ if(len.length>1){
|
|
2993
|
+ var patient_id = this.$route.query.patient_id
|
|
2994
|
+ var start_time = this.timestamp(this.start_time)
|
|
2995
|
+ this.$router.push({
|
|
2996
|
+ path: "/dialysis/details",
|
|
2997
|
+ query: { patient_id:patient_id , date: start_time}
|
|
2998
|
+ });
|
|
2999
|
+ this.history_click = false
|
|
3000
|
+ }else{
|
|
3001
|
+ this.time_value()
|
|
3002
|
+ }
|
|
3003
|
+
|
|
3004
|
+ }
|
2991
|
3005
|
},
|
2992
|
3006
|
timestamp(start_time) {
|
2993
|
3007
|
// 使用 Date 对象和它的 getTime 方法将日期字符串转换为时间戳
|
|
@@ -3001,12 +3015,11 @@ export default {
|
3001
|
3015
|
console.log("newValue----------",newValue)
|
3002
|
3016
|
// this.initData()
|
3003
|
3017
|
this.time_value = newValue
|
3004
|
|
- this.getmonth(this.time_value)
|
|
3018
|
+ // this.getmonth(this.time_value)
|
3005
|
3019
|
console.log('yyyyyyyyyyy',moment(this.time_value).format('YYYY-MM-DD'),moment(oldValue).format('YYYY-MM-DD'))
|
3006
|
3020
|
|
3007
|
3021
|
this.start_time = moment(this.time_value).format('YYYY-MM-DD')
|
3008
|
3022
|
this.end_time = moment(oldValue).format('YYYY-MM-DD')
|
3009
|
|
-
|
3010
|
3023
|
}
|
3011
|
3024
|
}
|
3012
|
3025
|
}
|