|
@@ -17,14 +17,14 @@
|
17
|
17
|
type="primary"
|
18
|
18
|
@click="next"
|
19
|
19
|
>下一位</el-button
|
20
|
|
- >
|
|
20
|
+ >
|
21
|
21
|
|
22
|
|
- <!-- <el-button
|
|
22
|
+ <el-button
|
23
|
23
|
size="small"
|
24
|
24
|
type="primary"
|
25
|
25
|
@click="history_click"
|
26
|
|
-
|
27
|
|
- >透析历史</el-button> -->
|
|
26
|
+
|
|
27
|
+ >透析历史</el-button>
|
28
|
28
|
|
29
|
29
|
<el-button
|
30
|
30
|
size="small"
|
|
@@ -43,7 +43,6 @@
|
43
|
43
|
|
44
|
44
|
</div>
|
45
|
45
|
</div>
|
46
|
|
-
|
47
|
46
|
<div
|
48
|
47
|
class="loadingBox"
|
49
|
48
|
v-loading="loading"
|
|
@@ -1191,7 +1190,6 @@
|
1191
|
1190
|
|
1192
|
1191
|
</div>
|
1193
|
1192
|
</div>
|
1194
|
|
-
|
1195
|
1193
|
<!-- 透析历史 -->
|
1196
|
1194
|
<el-dialog class="history"
|
1197
|
1195
|
:title="'患者信息(姓名:'+patient.name+'、透析号:'+patient.dialysis_no +')' "
|
|
@@ -1199,7 +1197,7 @@
|
1199
|
1197
|
width="50%"
|
1200
|
1198
|
>
|
1201
|
1199
|
<div>
|
1202
|
|
- <div >
|
|
1200
|
+ <div >
|
1203
|
1201
|
透析频率:
|
1204
|
1202
|
<div class="touxipl"></div>
|
1205
|
1203
|
</div>
|
|
@@ -1207,20 +1205,22 @@
|
1207
|
1205
|
<div style="border-left: 2px solid #409eff;color: #409eff;padding: 0 10px;">
|
1208
|
1206
|
<span>已排详情</span>
|
1209
|
1207
|
</div>
|
1210
|
|
- <div>
|
1211
|
|
- <el-calendar v-model="time_value" >
|
1212
|
|
- <template
|
1213
|
|
- slot="dateCell"
|
1214
|
|
- slot-scope="{date, data}" @click="viewDayWork(data)">
|
1215
|
|
- <P v-if="data.day.split('-').slice(1).join('-')=='03-06'"
|
1216
|
|
- style="background: red;color: white;text-align: center;">
|
1217
|
|
- HD
|
1218
|
|
- </P>
|
1219
|
|
- <p :class="data.isSelected ? 'is-selected' : ''" style="text-align: center;">
|
1220
|
|
- {{ data.day.split('-').slice(2).join('-') }} {{ data.isSelected ? '✔️' : ''}}<br/>
|
1221
|
|
- <span v-if="data.day.split('-').slice(1).join('-')=='03-06'">上午 门诊</span>
|
1222
|
|
- </p>
|
1223
|
|
-
|
|
1208
|
+ <div @click="viewDayWork">
|
|
1209
|
+ <el-calendar v-model="time_value">
|
|
1210
|
+ <template
|
|
1211
|
+ slot="dateCell"
|
|
1212
|
+ slot-scope="{date, data}" >
|
|
1213
|
+ <p :class="data.isSelected ? 'is-selected' : ''" style="text-align: center;" >
|
|
1214
|
+ {{ data.day.split('-').slice(2).join('-') }}<br/>
|
|
1215
|
+ <span v-for="(item,index) in orderList" :key="index" style="background: red;color: white;text-align: center;">
|
|
1216
|
+ <span v-if="data.day == item.order_date">
|
|
1217
|
+ {{ getModeId(item.mode_id) }}
|
|
1218
|
+ <span v-if="item.schedual_type_name ==1">上午</span>
|
|
1219
|
+ <span v-if="item.schedual_type_name ==2">下午</span>
|
|
1220
|
+ <span v-if="item.schedual_type_name ==3">晚上</span>
|
|
1221
|
+ </span>
|
|
1222
|
+ </span>
|
|
1223
|
+ </p>
|
1224
|
1224
|
</template>
|
1225
|
1225
|
</el-calendar>
|
1226
|
1226
|
</div>
|
|
@@ -1261,6 +1261,7 @@ import BreadCrumb from '@/xt_pages/components/bread-crumb'
|
1261
|
1261
|
import print from 'print-js'
|
1262
|
1262
|
import { uParseTime } from '@/utils/tools'
|
1263
|
1263
|
import Calendar from 'vue-calendar-component'
|
|
1264
|
+import data from '../../../store/modules/data'
|
1264
|
1265
|
export default {
|
1265
|
1266
|
name: 'index',
|
1266
|
1267
|
components: {
|
|
@@ -1408,14 +1409,14 @@ export default {
|
1408
|
1409
|
norefresh:true,
|
1409
|
1410
|
historyclick:false,
|
1410
|
1411
|
time_value:new Date(),
|
1411
|
|
-
|
1412
|
|
- startTime:'',
|
1413
|
|
- endTime:'',
|
1414
|
|
-
|
|
1412
|
+
|
|
1413
|
+ start_time:moment().startOf('months').format('YYYY-MM-DD'),
|
|
1414
|
+ end_time:moment().endOf('months').format('YYYY-MM-DD'),
|
|
1415
|
+ orderList:[]
|
1415
|
1416
|
}
|
1416
|
1417
|
},
|
1417
|
1418
|
created() {
|
1418
|
|
-
|
|
1419
|
+
|
1419
|
1420
|
this.blood_access_part_opera = getDataConfig('hemodialysis', 'vascular_access_desc')
|
1420
|
1421
|
this.org_id = this.$store.getters.xt_user.org.id,
|
1421
|
1422
|
this.printDate = moment().format("YYYY-MM-DD HH:mm:ss")
|
|
@@ -1620,7 +1621,7 @@ export default {
|
1620
|
1621
|
// this.getmonth(this.time_value)
|
1621
|
1622
|
// this.handlePick(this.time_value)
|
1622
|
1623
|
},
|
1623
|
|
-
|
|
1624
|
+
|
1624
|
1625
|
beforeDestroy(){
|
1625
|
1626
|
|
1626
|
1627
|
let unObj = {
|
|
@@ -2098,7 +2099,7 @@ export default {
|
2098
|
2099
|
}
|
2099
|
2100
|
},
|
2100
|
2101
|
requestDialysisSchedules: function() {
|
2101
|
|
- console.log("时间人民站起来了呃")
|
|
2102
|
+
|
2102
|
2103
|
var ymd = parseTime(this.selected_date, '{y}-{m}-{d}')
|
2103
|
2104
|
getDialysisSchedules(ymd).then(rs => {
|
2104
|
2105
|
var resp = rs.data
|
|
@@ -2922,29 +2923,103 @@ export default {
|
2922
|
2923
|
},
|
2923
|
2924
|
// 透析历史
|
2924
|
2925
|
history_click(){
|
2925
|
|
- this.historyclick =true
|
|
2926
|
+ this.getPatientDialysisRecordList()
|
2926
|
2927
|
// this.getmonth(this.time_value2)
|
2927
|
2928
|
// console.log('time_value',moment(this.time_value2).format('YYYY-MM-DD'));
|
2928
|
2929
|
},
|
|
2930
|
+ getPatientDialysisRecordList(){
|
|
2931
|
+ var params= {
|
|
2932
|
+ patient_id:this.$route.query.patient_id,
|
|
2933
|
+ start_time:this.start_time,
|
|
2934
|
+ end_time:this.end_time,
|
|
2935
|
+ }
|
|
2936
|
+ getPatientDialysisRecordList(params).then(response=>{
|
|
2937
|
+ if(response.data.state == 1){
|
|
2938
|
+ var list = response.data.data.list
|
|
2939
|
+ this.historyclick =true
|
|
2940
|
+ if(list!=null && list.length>0){
|
|
2941
|
+ for(let i=0;i<list.length;i++){
|
|
2942
|
+
|
|
2943
|
+ list[i].order_date =""
|
|
2944
|
+ if(this.org_id ==9538 || this.org_id ==10101||this.org_id ==10353){
|
|
2945
|
+ list[i].order_date = this.getOrderTime(list[i].dialysis_date)
|
|
2946
|
+ list[i].schedual_type_name= list[i].schedual_type
|
|
2947
|
+ }else{
|
|
2948
|
+ list[i].order_date = this.getOrderTime(list[i].schedule_date)
|
|
2949
|
+ list[i].schedual_type_name= list[i].schedule_type
|
|
2950
|
+ }
|
|
2951
|
+
|
|
2952
|
+ }
|
|
2953
|
+ }
|
|
2954
|
+ console.log("list------",list)
|
|
2955
|
+ this.orderList = []
|
|
2956
|
+ this.orderList = list
|
|
2957
|
+ }
|
|
2958
|
+ })
|
|
2959
|
+ },
|
2929
|
2960
|
// 获取每个月的第一天和最后一天
|
2930
|
2961
|
getmonth(val){
|
2931
|
|
- const months= new Date(val).getMonth()
|
2932
|
|
- let startTime = moment().month(months).startOf('month').format('YYYY-MM-DD')
|
2933
|
|
-
|
2934
|
|
- // //某月最后一天
|
2935
|
|
- let endTime = moment().month(months).endOf('month').format('YYYY-MM-DD')
|
2936
|
|
- this.startTime = startTime
|
2937
|
|
- this.endTime = endTime
|
2938
|
|
- console.log('time_value333333',this.startTime,this.endTime);
|
|
2962
|
+ // const months= new Date(val).getMonth()
|
|
2963
|
+ // let startTime = moment().month(months).startOf('month').format('YYYY-MM-DD')
|
|
2964
|
+ // // //某月最后一天
|
|
2965
|
+ // let endTime = moment().month(months).endOf('month').format('YYYY-MM-DD')
|
|
2966
|
+ // this.startTime = startTime
|
|
2967
|
+ // this.endTime = endTime
|
|
2968
|
+ // console.log('time_value333333',this.startTime,this.endTime);
|
|
2969
|
+ },
|
|
2970
|
+ getOrderTime(val){
|
|
2971
|
+ // console.log('77778888',val,this.dialysis_date=uParseTime(val, "{y}-{m}-{d}"));
|
|
2972
|
+ if (val < 0) {
|
|
2973
|
+ return "";
|
|
2974
|
+ }
|
|
2975
|
+ if (val == "") {
|
|
2976
|
+ return "";
|
|
2977
|
+ } else {
|
|
2978
|
+ return uParseTime(val, "{y}-{m}-{d}");
|
|
2979
|
+ }
|
|
2980
|
+ },
|
|
2981
|
+ viewDayWork(val){
|
|
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
|
+ }
|
|
3005
|
+ },
|
|
3006
|
+ timestamp(start_time) {
|
|
3007
|
+ // 使用 Date 对象和它的 getTime 方法将日期字符串转换为时间戳
|
|
3008
|
+ return new Date(start_time).getTime()/1000 - 28800;
|
2939
|
3009
|
}
|
|
3010
|
+
|
2940
|
3011
|
},
|
2941
|
3012
|
watch:{
|
2942
|
3013
|
time_value:{
|
2943
|
3014
|
handler(newValue,oldValue){
|
|
3015
|
+ console.log("newValue----------",newValue)
|
2944
|
3016
|
// this.initData()
|
2945
|
3017
|
this.time_value = newValue
|
2946
|
|
- this.getmonth(this.time_value)
|
|
3018
|
+ // this.getmonth(this.time_value)
|
2947
|
3019
|
console.log('yyyyyyyyyyy',moment(this.time_value).format('YYYY-MM-DD'),moment(oldValue).format('YYYY-MM-DD'))
|
|
3020
|
+
|
|
3021
|
+ this.start_time = moment(this.time_value).format('YYYY-MM-DD')
|
|
3022
|
+ this.end_time = moment(oldValue).format('YYYY-MM-DD')
|
2948
|
3023
|
}
|
2949
|
3024
|
}
|
2950
|
3025
|
}
|
|
@@ -3124,10 +3199,10 @@ export default {
|
3124
|
3199
|
}
|
3125
|
3200
|
}
|
3126
|
3201
|
.el-dialog__body{
|
3127
|
|
- padding: 15px 10px
|
|
3202
|
+ padding: 15px 10px
|
3128
|
3203
|
}
|
3129
|
3204
|
}
|
3130
|
|
-
|
|
3205
|
+
|
3131
|
3206
|
}
|
3132
|
3207
|
.Calendar{
|
3133
|
3208
|
color: #000 !important;
|