Przeglądaj źródła

Merge branch '20230223_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20230223_pc_vue_new_branch

28169 1 rok temu
rodzic
commit
66195bb816
1 zmienionych plików z 44 dodań i 42 usunięć
  1. 44 42
      src/xt_pages/dialysis/details/index.vue

+ 44 - 42
src/xt_pages/dialysis/details/index.vue Wyświetl plik

@@ -17,13 +17,13 @@
17 17
           type="primary"
18 18
           @click="next"
19 19
           >下一位</el-button
20
-        >   
20
+        >
21 21
 
22 22
         <el-button
23 23
           size="small"
24 24
           type="primary"
25 25
           @click="history_click"
26
-          
26
+
27 27
           >透析历史</el-button>
28 28
 
29 29
         <el-button
@@ -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,21 +1197,20 @@
1199 1197
       width="50%"
1200 1198
       >
1201 1199
       <div>
1202
-        <!-- <div >
1200
+         <div >
1203 1201
           透析频率:
1204 1202
           <div class="touxipl"></div>
1205
-        </div> -->
1203
+        </div>
1206 1204
         <div style="margin: 20px 0;">
1207 1205
           <div style="border-left: 2px solid #409eff;color: #409eff;padding: 0 10px;">
1208 1206
             <span>已排详情</span>
1209 1207
           </div>
1210 1208
           <div @click="viewDayWork">
1211
-            <el-calendar v-model="time_value">  
1212
-              
1209
+            <el-calendar v-model="time_value">
1213 1210
                 <template
1214 1211
                   slot="dateCell"
1215
-                  slot-scope="{date, data}">
1216
-                    <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;" >
1217 1214
                       {{ data.day.split('-').slice(2).join('-') }}<br/>
1218 1215
                       <span v-for="(item,index) in orderList" :key="index" style="background: red;color: white;text-align: center;">
1219 1216
                         <span v-if="data.day == item.order_date">
@@ -1225,7 +1222,6 @@
1225 1222
                       </span>
1226 1223
                     </p>
1227 1224
               </template>
1228
-            
1229 1225
             </el-calendar>
1230 1226
           </div>
1231 1227
         </div>
@@ -1266,7 +1262,6 @@ import print from 'print-js'
1266 1262
 import { uParseTime } from '@/utils/tools'
1267 1263
 import Calendar from 'vue-calendar-component'
1268 1264
 import data from '../../../store/modules/data'
1269
-import patient from '../../../router/modules/patient'
1270 1265
 export default {
1271 1266
   name: 'index',
1272 1267
   components: {
@@ -1414,15 +1409,14 @@ export default {
1414 1409
       norefresh:true,
1415 1410
       historyclick:false,
1416 1411
       time_value:new Date(),
1417
-      
1412
+
1418 1413
       start_time:moment().startOf('months').format('YYYY-MM-DD'),
1419 1414
       end_time:moment().endOf('months').format('YYYY-MM-DD'),
1420
-      start_time_one:"",
1421 1415
       orderList:[]
1422 1416
     }
1423 1417
   },
1424 1418
   created() {
1425
-    
1419
+
1426 1420
    this.blood_access_part_opera = getDataConfig('hemodialysis', 'vascular_access_desc')
1427 1421
    this.org_id = this.$store.getters.xt_user.org.id,
1428 1422
    this.printDate = moment().format("YYYY-MM-DD HH:mm:ss")
@@ -1627,7 +1621,7 @@ export default {
1627 1621
     // this.getmonth(this.time_value)
1628 1622
     // this.handlePick(this.time_value)
1629 1623
   },
1630
- 
1624
+
1631 1625
   beforeDestroy(){
1632 1626
 
1633 1627
     let unObj = {
@@ -2105,7 +2099,7 @@ export default {
2105 2099
       }
2106 2100
     },
2107 2101
     requestDialysisSchedules: function() {
2108
-     
2102
+
2109 2103
       var ymd = parseTime(this.selected_date, '{y}-{m}-{d}')
2110 2104
       getDialysisSchedules(ymd).then(rs => {
2111 2105
         var resp = rs.data
@@ -2945,16 +2939,16 @@ export default {
2945 2939
            this.historyclick =true
2946 2940
            if(list!=null && list.length>0){
2947 2941
              for(let i=0;i<list.length;i++){
2948
-              
2942
+
2949 2943
                list[i].order_date =""
2950 2944
                if(this.org_id ==9538 || this.org_id ==10101||this.org_id ==10353){
2951
-                  list[i].order_date = this.getOrderTime(list[i].dialysis_date) 
2945
+                  list[i].order_date = this.getOrderTime(list[i].dialysis_date)
2952 2946
                   list[i].schedual_type_name= list[i].schedual_type
2953 2947
                }else{
2954
-                 list[i].order_date = this.getOrderTime(list[i].schedule_date) 
2948
+                 list[i].order_date = this.getOrderTime(list[i].schedule_date)
2955 2949
                  list[i].schedual_type_name= list[i].schedule_type
2956 2950
                }
2957
-              
2951
+
2958 2952
              }
2959 2953
            }
2960 2954
            console.log("list------",list)
@@ -2967,7 +2961,6 @@ export default {
2967 2961
     getmonth(val){
2968 2962
       // const months= new Date(val).getMonth()
2969 2963
       // let startTime =  moment().month(months).startOf('month').format('YYYY-MM-DD')
2970
-      
2971 2964
       // //   //某月最后一天
2972 2965
       // let endTime = moment().month(months).endOf('month').format('YYYY-MM-DD')
2973 2966
       // this.startTime = startTime
@@ -2975,6 +2968,7 @@ export default {
2975 2968
       // console.log('time_value333333',this.startTime,this.endTime);
2976 2969
     },
2977 2970
     getOrderTime(val){
2971
+      // console.log('77778888',val,this.dialysis_date=uParseTime(val, "{y}-{m}-{d}"));
2978 2972
       if (val < 0) {
2979 2973
         return "";
2980 2974
       }
@@ -2985,23 +2979,35 @@ export default {
2985 2979
       }
2986 2980
     },
2987 2981
     viewDayWork(val){
2988
-      console.log("val33333333333333",val)
2989
-      console.log("开始时间",)
2990
-      var patient_id = this.$route.query.patient_id
2991
-      var start_time = this.timestamp(moment(this.time_value).format('YYYY-MM-DD'))
2992
-      console.log("patienet_id",patient_id)
2993
-      console.log("start_Time",start_time)
2994
-      this.$router.push({
2995
-        path: "/dialysis/details",
2996
-        query: { patient_id:patient_id , date: start_time}
2997
-      });
2998
-      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
+      }
2999 3005
     },
3000 3006
     timestamp(start_time) {
3001 3007
       // 使用 Date 对象和它的 getTime 方法将日期字符串转换为时间戳
3002 3008
       return new Date(start_time).getTime()/1000 - 28800;
3003 3009
     }
3004
-  
3010
+
3005 3011
   },
3006 3012
   watch:{
3007 3013
     time_value:{
@@ -3009,15 +3015,11 @@ export default {
3009 3015
         console.log("newValue----------",newValue)
3010 3016
         // this.initData()
3011 3017
         this.time_value = newValue
3012
-        this.getmonth(this.time_value)
3018
+        // this.getmonth(this.time_value)
3013 3019
         console.log('yyyyyyyyyyy',moment(this.time_value).format('YYYY-MM-DD'),moment(oldValue).format('YYYY-MM-DD'))
3014
-        this.start_time = ""
3015
-        this.start_time = moment(this.time_value).format('YYYY-MM-DD')
3016
-        this.start_time_one = moment(this.time_value).format('YYYY-MM-DD')
3017 3020
 
3018
-        this.end_time= ""
3021
+        this.start_time = moment(this.time_value).format('YYYY-MM-DD')
3019 3022
         this.end_time =   moment(oldValue).format('YYYY-MM-DD')
3020
-
3021 3023
       }
3022 3024
     }
3023 3025
   }
@@ -3197,10 +3199,10 @@ export default {
3197 3199
       }
3198 3200
     }
3199 3201
     .el-dialog__body{
3200
-      padding: 15px 10px 
3202
+      padding: 15px 10px
3201 3203
     }
3202 3204
   }
3203
-  
3205
+
3204 3206
 }
3205 3207
 .Calendar{
3206 3208
     color: #000 !important;