소스 검색

Merge branch '2022-10-17_vue_schedule_branch' of http://git.shengws.com/csx/Vue_New into 20220812

XMLWAN 2 년 전
부모
커밋
37f6b46315

+ 34 - 0
src/api/schedule_template/sch_template.js 파일 보기

125
     data: params
125
     data: params
126
   })
126
   })
127
 }
127
 }
128
+
129
+
130
+
131
+
132
+export function updateEditSchedules(obj,delObj) {
133
+  var params = {
134
+    edit_schs: obj,
135
+    del_schs: delObj,
136
+
137
+  }
138
+  return request({
139
+    url: '/api/schedule/update_schtemplate',
140
+    method: 'post',
141
+    params: params,
142
+  })
143
+}
144
+
145
+
146
+export function getSmartSchByPatient(patient_id) {
147
+  console.log("patinet_id")
148
+  console.log(patient_id)
149
+
150
+  var params = {
151
+    "patient_id": patient_id,
152
+
153
+  }
154
+  return request({
155
+    url: '/api/smartsch/get',
156
+    method: 'get',
157
+    params: params,
158
+  })
159
+}
160
+
161
+

+ 136 - 136
src/xt_pages/dialysis/details/consumable/dialysisGood.vue 파일 보기

44
       </div>
44
       </div>
45
       <div>
45
       <div>
46
         <el-button size="small" icon="el-icon-printer" @click="toSett" type="primary" v-if="his_config.is_open == 1">设置</el-button>
46
         <el-button size="small" icon="el-icon-printer" @click="toSett" type="primary" v-if="his_config.is_open == 1">设置</el-button>
47
-        <el-button size="small" icon="el-icon-printer" @click="toClick" type="primary">脚本</el-button>
47
+<!--        <el-button size="small" icon="el-icon-printer" @click="toClick" type="primary">脚本</el-button>-->
48
         <el-button size="small" icon="el-icon-printer" @click="toPrint" type="primary">打印</el-button>
48
         <el-button size="small" icon="el-icon-printer" @click="toPrint" type="primary">打印</el-button>
49
         <el-button size="small"  @click="exportListOne" type="primary" v-if="his_config.is_open == 1">导出</el-button>
49
         <el-button size="small"  @click="exportListOne" type="primary" v-if="his_config.is_open == 1">导出</el-button>
50
         <el-button size="small" @click="exportList" type="primary" v-if="his_config.is_open != 1">导出</el-button>
50
         <el-button size="small" @click="exportList" type="primary" v-if="his_config.is_open != 1">导出</el-button>
52
         <el-button size="small" type="primary" v-if="his_config.is_open == 1" @click="toStatistics">统计表</el-button>
52
         <el-button size="small" type="primary" v-if="his_config.is_open == 1" @click="toStatistics">统计表</el-button>
53
       </div>
53
       </div>
54
     </div>
54
     </div>
55
-   
55
+
56
     <div v-if="his_config.is_open != 1">
56
     <div v-if="his_config.is_open != 1">
57
       <el-table
57
       <el-table
58
         @selection-change="handleSelectionChange"
58
         @selection-change="handleSelectionChange"
84
             {{scope.row.patient.name}}
84
             {{scope.row.patient.name}}
85
            </template>
85
            </template>
86
         </el-table-column>
86
         </el-table-column>
87
-       
87
+
88
         <el-table-column  align="center"  width="55" label="透析号">
88
         <el-table-column  align="center"  width="55" label="透析号">
89
            <template slot-scope="scope">
89
            <template slot-scope="scope">
90
             {{scope.row.patient.dialysis_no}}
90
             {{scope.row.patient.dialysis_no}}
91
            </template>
91
            </template>
92
         </el-table-column>
92
         </el-table-column>
93
-        
93
+
94
         <el-table-column
94
         <el-table-column
95
           align="center"
95
           align="center"
96
           prop="name"
96
           prop="name"
157
             {{scope.row.patient.name}}
157
             {{scope.row.patient.name}}
158
            </template>
158
            </template>
159
         </el-table-column>
159
         </el-table-column>
160
-       
160
+
161
         <el-table-column  align="center"  width="55" label="透析号">
161
         <el-table-column  align="center"  width="55" label="透析号">
162
            <template slot-scope="scope">
162
            <template slot-scope="scope">
163
             {{scope.row.patient.dialysis_no}}
163
             {{scope.row.patient.dialysis_no}}
164
            </template>
164
            </template>
165
         </el-table-column>
165
         </el-table-column>
166
-        
166
+
167
         <el-table-column
167
         <el-table-column
168
           align="center"
168
           align="center"
169
           prop="name"
169
           prop="name"
177
 
177
 
178
         </el-table-column>
178
         </el-table-column>
179
 
179
 
180
-      
180
+
181
 
181
 
182
       </el-table>
182
       </el-table>
183
 
183
 
195
       </el-pagination>
195
       </el-pagination>
196
     </div>
196
     </div>
197
 
197
 
198
-    
198
+
199
     <el-dialog
199
     <el-dialog
200
       title="耗材统计表"
200
       title="耗材统计表"
201
       :visible.sync="startDialogVisible"
201
       :visible.sync="startDialogVisible"
223
 
223
 
224
          <el-button size="small" icon="el-icon-printer"  @click="toPrintOne" type="primary">打印</el-button>
224
          <el-button size="small" icon="el-icon-printer"  @click="toPrintOne" type="primary">打印</el-button>
225
          <el-button size="small"  @click="toExportListOne" type="primary">导出</el-button>
225
          <el-button size="small"  @click="toExportListOne" type="primary">导出</el-button>
226
-        </div> 
226
+        </div>
227
        <el-table
227
        <el-table
228
         :data="tableList"
228
         :data="tableList"
229
         border
229
         border
248
              {{scope.row.specification_name}}
248
              {{scope.row.specification_name}}
249
            </template>
249
            </template>
250
         </el-table-column>
250
         </el-table-column>
251
-       
251
+
252
         <el-table-column  align="center"   label="数量">
252
         <el-table-column  align="center"   label="数量">
253
            <template slot-scope="scope">
253
            <template slot-scope="scope">
254
              {{scope.row.count}}
254
              {{scope.row.count}}
255
            </template>
255
            </template>
256
         </el-table-column>
256
         </el-table-column>
257
-        
258
-     
257
+
258
+
259
 
259
 
260
       </el-table>
260
       </el-table>
261
       </span>
261
       </span>
272
       width="60%">
272
       width="60%">
273
       <span>
273
       <span>
274
         <div v-for="(item,index) in goodTypeList" :key="index">
274
         <div v-for="(item,index) in goodTypeList" :key="index">
275
-          <span v-if="index == 0"><el-checkbox v-model="checkedOne" >{{item.type_name}}</el-checkbox></span> 
276
-          <span v-if="index == 1"><el-checkbox v-model="checkedTwo" >{{item.type_name}}</el-checkbox></span> 
277
-          <span v-if="index == 2"><el-checkbox v-model="checkedThree" >{{item.type_name}}</el-checkbox></span> 
278
-          <span v-if="index == 3"><el-checkbox v-model="checkedFour" >{{item.type_name}}</el-checkbox></span> 
279
-          <span v-if="index == 4"><el-checkbox v-model="checkedFive" >{{item.type_name}}</el-checkbox></span> 
280
-          <span v-if="index == 5"><el-checkbox v-model="checkedSix" >{{item.type_name}}</el-checkbox></span> 
281
-          <span v-if="index == 6"><el-checkbox v-model="checkedSeven" >{{item.type_name}}</el-checkbox></span> 
282
-          <span v-if="index == 7"><el-checkbox v-model="checkedEnight" >{{item.type_name}}</el-checkbox></span> 
283
-          <span v-if="index == 8"><el-checkbox v-model="checkedNight" >{{item.type_name}}</el-checkbox></span> 
284
-          <span v-if="index == 9"><el-checkbox v-model="checkedTen" >{{item.type_name}}</el-checkbox></span> 
285
-          <span v-if="index == 10"><el-checkbox v-model="checkedEleven">{{item.type_name}}</el-checkbox></span> 
275
+          <span v-if="index == 0"><el-checkbox v-model="checkedOne" >{{item.type_name}}</el-checkbox></span>
276
+          <span v-if="index == 1"><el-checkbox v-model="checkedTwo" >{{item.type_name}}</el-checkbox></span>
277
+          <span v-if="index == 2"><el-checkbox v-model="checkedThree" >{{item.type_name}}</el-checkbox></span>
278
+          <span v-if="index == 3"><el-checkbox v-model="checkedFour" >{{item.type_name}}</el-checkbox></span>
279
+          <span v-if="index == 4"><el-checkbox v-model="checkedFive" >{{item.type_name}}</el-checkbox></span>
280
+          <span v-if="index == 5"><el-checkbox v-model="checkedSix" >{{item.type_name}}</el-checkbox></span>
281
+          <span v-if="index == 6"><el-checkbox v-model="checkedSeven" >{{item.type_name}}</el-checkbox></span>
282
+          <span v-if="index == 7"><el-checkbox v-model="checkedEnight" >{{item.type_name}}</el-checkbox></span>
283
+          <span v-if="index == 8"><el-checkbox v-model="checkedNight" >{{item.type_name}}</el-checkbox></span>
284
+          <span v-if="index == 9"><el-checkbox v-model="checkedTen" >{{item.type_name}}</el-checkbox></span>
285
+          <span v-if="index == 10"><el-checkbox v-model="checkedEleven">{{item.type_name}}</el-checkbox></span>
286
           <span v-if="index == 11"><el-checkbox v-model="checkedTwenty">{{item.type_name}}</el-checkbox></span>
286
           <span v-if="index == 11"><el-checkbox v-model="checkedTwenty">{{item.type_name}}</el-checkbox></span>
287
-          <span v-if="index == 12"><el-checkbox v-model="checkedTwentyOne">{{item.type_name}}</el-checkbox></span> 
288
-          <span v-if="index == 13"><el-checkbox v-model="checkedTwentyTwo">{{item.type_name}}</el-checkbox></span> 
289
-          <span v-if="index == 14"><el-checkbox v-model="checkedTwentyThree">{{item.type_name}}</el-checkbox></span> 
290
-          <span v-if="index == 15"><el-checkbox v-model="checkedTwentyFour">{{item.type_name}}</el-checkbox></span> 
291
-          <span v-if="index == 16"><el-checkbox v-model="checkedTwentyFive">{{item.type_name}}</el-checkbox></span> 
292
-          <span v-if="index == 17"><el-checkbox v-model="checkedTwentySix">{{item.type_name}}</el-checkbox></span> 
287
+          <span v-if="index == 12"><el-checkbox v-model="checkedTwentyOne">{{item.type_name}}</el-checkbox></span>
288
+          <span v-if="index == 13"><el-checkbox v-model="checkedTwentyTwo">{{item.type_name}}</el-checkbox></span>
289
+          <span v-if="index == 14"><el-checkbox v-model="checkedTwentyThree">{{item.type_name}}</el-checkbox></span>
290
+          <span v-if="index == 15"><el-checkbox v-model="checkedTwentyFour">{{item.type_name}}</el-checkbox></span>
291
+          <span v-if="index == 16"><el-checkbox v-model="checkedTwentyFive">{{item.type_name}}</el-checkbox></span>
292
+          <span v-if="index == 17"><el-checkbox v-model="checkedTwentySix">{{item.type_name}}</el-checkbox></span>
293
           <span v-if="index == 18"><el-checkbox v-model="checkedTwentySeven">{{item.type_name}}</el-checkbox></span>
293
           <span v-if="index == 18"><el-checkbox v-model="checkedTwentySeven">{{item.type_name}}</el-checkbox></span>
294
-          <span v-if="index == 19"><el-checkbox v-model="checkedTwentyEight">{{item.type_name}}</el-checkbox></span> 
295
-          <span v-if="index == 20"><el-checkbox v-model="checkedTwentyNight">{{item.type_name}}</el-checkbox></span>   
294
+          <span v-if="index == 19"><el-checkbox v-model="checkedTwentyEight">{{item.type_name}}</el-checkbox></span>
295
+          <span v-if="index == 20"><el-checkbox v-model="checkedTwentyNight">{{item.type_name}}</el-checkbox></span>
296
         </div>
296
         </div>
297
-        
297
+
298
       </span>
298
       </span>
299
       <span slot="footer" class="dialog-footer">
299
       <span slot="footer" class="dialog-footer">
300
         <el-button @click="startDialogVisibleOne = false">取 消</el-button>
300
         <el-button @click="startDialogVisibleOne = false">取 消</el-button>
330
            </el-select>
330
            </el-select>
331
            <el-button size="small" icon="el-icon-printer" @click="toHisPrint" type="primary">打印</el-button>
331
            <el-button size="small" icon="el-icon-printer" @click="toHisPrint" type="primary">打印</el-button>
332
            <el-button size="small"  @click="toExportListTwo" type="primary">导出</el-button>
332
            <el-button size="small"  @click="toExportListTwo" type="primary">导出</el-button>
333
-        </div> 
333
+        </div>
334
        <el-table
334
        <el-table
335
         :data="tableList"
335
         :data="tableList"
336
         border
336
         border
355
              {{scope.row.specification_name}}
355
              {{scope.row.specification_name}}
356
            </template>
356
            </template>
357
         </el-table-column>
357
         </el-table-column>
358
-       
358
+
359
         <el-table-column  align="center"   label="数量">
359
         <el-table-column  align="center"   label="数量">
360
            <template slot-scope="scope">
360
            <template slot-scope="scope">
361
              {{scope.row.count}}
361
              {{scope.row.count}}
362
            </template>
362
            </template>
363
         </el-table-column>
363
         </el-table-column>
364
-        
365
-     
364
+
365
+
366
 
366
 
367
       </el-table>
367
       </el-table>
368
       </span>
368
       </span>
383
   import { getDataConfig } from '@/utils/data'
383
   import { getDataConfig } from '@/utils/data'
384
   export default {
384
   export default {
385
     components: {
385
     components: {
386
-      
386
+
387
     },
387
     },
388
     data() {
388
     data() {
389
       return {
389
       return {
494
       this.query.page = 1
494
       this.query.page = 1
495
       this.query.ids = this.ids
495
       this.query.ids = this.ids
496
       this.getAllZone()
496
       this.getAllZone()
497
-      this.dialysate_formulation =  getDataConfig(  
497
+      this.dialysate_formulation =  getDataConfig(
498
             'hemodialysis',
498
             'hemodialysis',
499
             'dialysate_formulation'
499
             'dialysate_formulation'
500
       )
500
       )
512
       this.getlist()
512
       this.getlist()
513
     },
513
     },
514
     methods: {
514
     methods: {
515
-    
515
+
516
       exportList(){
516
       exportList(){
517
         import('@/vendor/Export2Excel').then(excel => {
517
         import('@/vendor/Export2Excel').then(excel => {
518
-         
518
+
519
          var arr= []
519
          var arr= []
520
-        
520
+
521
          arr.push('序号')
521
          arr.push('序号')
522
          arr.push('透析机号')
522
          arr.push('透析机号')
523
          arr.push('姓名')
523
          arr.push('姓名')
524
          arr.push('透析号')
524
          arr.push('透析号')
525
-       
525
+
526
         //  console.log("list23322323232",this.rowList)
526
         //  console.log("list23322323232",this.rowList)
527
          if(this.rowList!=null && this.rowList.length > 0){
527
          if(this.rowList!=null && this.rowList.length > 0){
528
            for(let i=0;i<this.rowList.length;i++){
528
            for(let i=0;i<this.rowList.length;i++){
529
              arr.push(this.rowList[i].filed_name_cn)
529
              arr.push(this.rowList[i].filed_name_cn)
530
            }
530
            }
531
          }
531
          }
532
-        
532
+
533
          arr.push("备注")
533
          arr.push("备注")
534
         //  console.log("arr",arr)
534
         //  console.log("arr",arr)
535
 
535
 
540
         //  console.log("arrTwo",arrTwo)
540
         //  console.log("arrTwo",arrTwo)
541
          const tHeader = arr
541
          const tHeader = arr
542
         const filterVal = arrTwo
542
         const filterVal = arrTwo
543
-        
543
+
544
         if(this.list!=null && this.list.length > 0){
544
         if(this.list!=null && this.list.length > 0){
545
           for(let i=0;i<this.list.length;i++){
545
           for(let i=0;i<this.list.length;i++){
546
             this.list[i].name0 = i+1
546
             this.list[i].name0 = i+1
553
                 this.list[i]['name'+(this.rowList.length+4)] = this.list[i].dialysis_solution.remark
553
                 this.list[i]['name'+(this.rowList.length+4)] = this.list[i].dialysis_solution.remark
554
               }
554
               }
555
             }
555
             }
556
-         
556
+
557
           }
557
           }
558
         }
558
         }
559
         // console.log("list32232232323wi",this.list)
559
         // console.log("list32232232323wi",this.list)
564
            filename: '透析耗材查询'
564
            filename: '透析耗材查询'
565
          })
565
          })
566
           this.downloadLoading = false
566
           this.downloadLoading = false
567
-        }) 
567
+        })
568
       },
568
       },
569
       exportListOne(){
569
       exportListOne(){
570
         import('@/vendor/Export2Excel').then(excel => {
570
         import('@/vendor/Export2Excel').then(excel => {
571
-         
571
+
572
          var arr= []
572
          var arr= []
573
-        
573
+
574
          arr.push('序号')
574
          arr.push('序号')
575
          arr.push('透析机号')
575
          arr.push('透析机号')
576
          arr.push('姓名')
576
          arr.push('姓名')
577
          arr.push('透析号')
577
          arr.push('透析号')
578
-       
578
+
579
         //  console.log("list23322323232",this.typeList)
579
         //  console.log("list23322323232",this.typeList)
580
          if(this.typeList!=null && this.typeList.length > 0){
580
          if(this.typeList!=null && this.typeList.length > 0){
581
            for(let i=0;i<this.typeList.length;i++){
581
            for(let i=0;i<this.typeList.length;i++){
603
                 this.list[i]['name'+(j+4)] = this.getStr(this.list[i].typeList[j].id,this.list[i].projectList,this.list[i].patient_id)
603
                 this.list[i]['name'+(j+4)] = this.getStr(this.list[i].typeList[j].id,this.list[i].projectList,this.list[i].patient_id)
604
               }
604
               }
605
             }
605
             }
606
-         
606
+
607
           }
607
           }
608
         }
608
         }
609
 
609
 
610
         console.log("list32232232323wi",this.list)
610
         console.log("list32232232323wi",this.list)
611
-      
611
+
612
         const data = this.formatJson(filterVal, this.list)
612
         const data = this.formatJson(filterVal, this.list)
613
          excel.export_json_to_excel({
613
          excel.export_json_to_excel({
614
            header: tHeader,
614
            header: tHeader,
616
            filename: '透析耗材查询'
616
            filename: '透析耗材查询'
617
          })
617
          })
618
           this.downloadLoading = false
618
           this.downloadLoading = false
619
-        }) 
619
+        })
620
       },
620
       },
621
       formatJson(filterVal, jsonData) {
621
       formatJson(filterVal, jsonData) {
622
         return jsonData.map(v => filterVal.map(j => v[j]));
622
         return jsonData.map(v => filterVal.map(j => v[j]));
642
         getPatientDialysisSolutionGroupList(this.query).then(response=>{
642
         getPatientDialysisSolutionGroupList(this.query).then(response=>{
643
            if(response.data.state == 1){
643
            if(response.data.state == 1){
644
              var list = response.data.data.list
644
              var list = response.data.data.list
645
-             
645
+
646
              var total = response.data.data.total
646
              var total = response.data.data.total
647
              this.total = total
647
              this.total = total
648
              var goodType = response.data.data.goodType
648
              var goodType = response.data.data.goodType
672
                   list[i].typeList = []
672
                   list[i].typeList = []
673
                   list[i].typeList = this.typeList
673
                   list[i].typeList = this.typeList
674
                 }
674
                 }
675
-              
675
+
676
                  for(let i=0;i<list.length;i++){
676
                  for(let i=0;i<list.length;i++){
677
                    if(list[i].his_prescription_template.his_prescription_info!=null && list[i].his_prescription_template.his_prescription_info.length >0){
677
                    if(list[i].his_prescription_template.his_prescription_info!=null && list[i].his_prescription_template.his_prescription_info.length >0){
678
                     for(let j=0;j<list[i].his_prescription_template.his_prescription_info.length;j++){
678
                     for(let j=0;j<list[i].his_prescription_template.his_prescription_info.length;j++){
681
                      }
681
                      }
682
                    }
682
                    }
683
                    }
683
                    }
684
-                   
684
+
685
                  }
685
                  }
686
-                 this.list = list 
686
+                 this.list = list
687
                }
687
                }
688
              }
688
              }
689
            }
689
            }
784
                  list[i].dialyzer_perfusion_apparatus_arr = []
784
                  list[i].dialyzer_perfusion_apparatus_arr = []
785
                  list[i].dialysis_irrigation_arr = []
785
                  list[i].dialysis_irrigation_arr = []
786
                  list[i].puncture_needle_arr = []
786
                  list[i].puncture_needle_arr = []
787
-                
787
+
788
                  if(list[i].dialysis_solution.dialysis_dialyszers!=""){
788
                  if(list[i].dialysis_solution.dialysis_dialyszers!=""){
789
                    list[i].dialysis_dialyszers_arr = list[i].dialysis_solution.dialysis_dialyszers.split(",")
789
                    list[i].dialysis_dialyszers_arr = list[i].dialysis_solution.dialysis_dialyszers.split(",")
790
                  }
790
                  }
797
                  if(list[i].dialysis_solution.puncture_needle!="" ){
797
                  if(list[i].dialysis_solution.puncture_needle!="" ){
798
                     list[i].puncture_needle_arr = list[i].dialysis_solution.puncture_needle.split(",")
798
                     list[i].puncture_needle_arr = list[i].dialysis_solution.puncture_needle.split(",")
799
                  }
799
                  }
800
-                 kaliumCount += parseInt(list[i].dialysis_solution.kalium) 
800
+                 kaliumCount += parseInt(list[i].dialysis_solution.kalium)
801
                  sodiumCount += parseInt(list[i].dialysis_solution.sodium)
801
                  sodiumCount += parseInt(list[i].dialysis_solution.sodium)
802
                  calciumCount +=parseInt(list[i].dialysis_solution.calcium)
802
                  calciumCount +=parseInt(list[i].dialysis_solution.calcium)
803
                  glucoseCount += parseInt(list[i].dialysis_solution.glucose)
803
                  glucoseCount += parseInt(list[i].dialysis_solution.glucose)
804
-                  
804
+
805
                 if(list[i].dialysis_solution!=null &&list[i].dialysis_solution.kalium > 0){
805
                 if(list[i].dialysis_solution!=null &&list[i].dialysis_solution.kalium > 0){
806
                     list[i].dialysis_solution.specification = "钾" + list[i].dialysis_solution.kalium
806
                     list[i].dialysis_solution.specification = "钾" + list[i].dialysis_solution.kalium
807
                     kaliumArr.push(list[i].dialysis_solution)
807
                     kaliumArr.push(list[i].dialysis_solution)
821
                   list[i].dialysis_solution.specification_three = "葡萄糖" + list[i].dialysis_solution.amylaceum
821
                   list[i].dialysis_solution.specification_three = "葡萄糖" + list[i].dialysis_solution.amylaceum
822
                   glucoseArr.push(list[i].dialysis_solution)
822
                   glucoseArr.push(list[i].dialysis_solution)
823
                 }
823
                 }
824
-              
824
+
825
 
825
 
826
               }
826
               }
827
             }
827
             }
843
             })
843
             })
844
             let newArr = Object.values(dataInfo)
844
             let newArr = Object.values(dataInfo)
845
 
845
 
846
-          
846
+
847
             for(let i=0;i<kaliumArr.length;i++){
847
             for(let i=0;i<kaliumArr.length;i++){
848
               for(let j=0;j<newArr.length;j++){
848
               for(let j=0;j<newArr.length;j++){
849
                 if(kaliumArr[i].specification == newArr[j].specification){
849
                 if(kaliumArr[i].specification == newArr[j].specification){
855
             for(let i=0;i<newArr.length;i++){
855
             for(let i=0;i<newArr.length;i++){
856
                newArr[i].count = newArr[i].child.length
856
                newArr[i].count = newArr[i].child.length
857
             }
857
             }
858
-           
858
+
859
             console.log("newArr",newArr)
859
             console.log("newArr",newArr)
860
             for(let i=0;i<newArr.length;i++){
860
             for(let i=0;i<newArr.length;i++){
861
               this.tableList.push(newArr[i])
861
               this.tableList.push(newArr[i])
880
             })
880
             })
881
             let newArr = Object.values(dataInfo)
881
             let newArr = Object.values(dataInfo)
882
 
882
 
883
-          
883
+
884
             for(let i=0;i<sodiumArr.length;i++){
884
             for(let i=0;i<sodiumArr.length;i++){
885
               for(let j=0;j<newArr.length;j++){
885
               for(let j=0;j<newArr.length;j++){
886
                 if(sodiumArr[i].specification_one == newArr[j].specification_one){
886
                 if(sodiumArr[i].specification_one == newArr[j].specification_one){
891
 
891
 
892
             for(let i=0;i<newArr.length;i++){
892
             for(let i=0;i<newArr.length;i++){
893
              newArr[i].count += newArr[i].child.length
893
              newArr[i].count += newArr[i].child.length
894
-              
894
+
895
             }
895
             }
896
-           
896
+
897
             console.log("newArr",newArr)
897
             console.log("newArr",newArr)
898
             for(let i=0;i<newArr.length;i++){
898
             for(let i=0;i<newArr.length;i++){
899
               this.tableList.push(newArr[i])
899
               this.tableList.push(newArr[i])
900
             }
900
             }
901
            }
901
            }
902
 
902
 
903
-          
903
+
904
           if(calciumArr!=null && calciumArr.length > 0){
904
           if(calciumArr!=null && calciumArr.length > 0){
905
               let dataInfo = {}
905
               let dataInfo = {}
906
               calciumArr.forEach((item, index) => {
906
               calciumArr.forEach((item, index) => {
917
             })
917
             })
918
             let newArr = Object.values(dataInfo)
918
             let newArr = Object.values(dataInfo)
919
 
919
 
920
-          
920
+
921
             for(let i=0;i<calciumArr.length;i++){
921
             for(let i=0;i<calciumArr.length;i++){
922
               for(let j=0;j<newArr.length;j++){
922
               for(let j=0;j<newArr.length;j++){
923
                 if(calciumArr[i].specification_two == newArr[j].specification_two){
923
                 if(calciumArr[i].specification_two == newArr[j].specification_two){
928
 
928
 
929
             for(let i=0;i<newArr.length;i++){
929
             for(let i=0;i<newArr.length;i++){
930
               newArr[i].count = newArr[i].child.length
930
               newArr[i].count = newArr[i].child.length
931
-              
931
+
932
             }
932
             }
933
-           
933
+
934
             console.log("newArr",newArr)
934
             console.log("newArr",newArr)
935
             for(let i=0;i<newArr.length;i++){
935
             for(let i=0;i<newArr.length;i++){
936
               this.tableList.push(newArr[i])
936
               this.tableList.push(newArr[i])
938
            }
938
            }
939
 
939
 
940
 
940
 
941
-                
941
+
942
           if(glucoseArr!=null && glucoseArr.length > 0){
942
           if(glucoseArr!=null && glucoseArr.length > 0){
943
               let dataInfo = {}
943
               let dataInfo = {}
944
               glucoseArr.forEach((item, index) => {
944
               glucoseArr.forEach((item, index) => {
955
             })
955
             })
956
             let newArr = Object.values(dataInfo)
956
             let newArr = Object.values(dataInfo)
957
 
957
 
958
-          
958
+
959
             for(let i=0;i<glucoseArr.length;i++){
959
             for(let i=0;i<glucoseArr.length;i++){
960
               for(let j=0;j<newArr.length;j++){
960
               for(let j=0;j<newArr.length;j++){
961
                 if(glucoseArr[i].specification_three == newArr[j].specification_three){
961
                 if(glucoseArr[i].specification_three == newArr[j].specification_three){
966
 
966
 
967
             for(let i=0;i<newArr.length;i++){
967
             for(let i=0;i<newArr.length;i++){
968
              newArr[i].count += newArr[i].child.length
968
              newArr[i].count += newArr[i].child.length
969
-              
969
+
970
             }
970
             }
971
-           
971
+
972
             console.log("newArr",newArr)
972
             console.log("newArr",newArr)
973
             for(let i=0;i<newArr.length;i++){
973
             for(let i=0;i<newArr.length;i++){
974
               this.tableList.push(newArr[i])
974
               this.tableList.push(newArr[i])
979
             var dialyzerPerfusionApparaArr = []
979
             var dialyzerPerfusionApparaArr = []
980
             var dialysisIrrigationArr = []
980
             var dialysisIrrigationArr = []
981
             var punctureNeedleArr = []
981
             var punctureNeedleArr = []
982
-            
983
-          
982
+
983
+
984
             for(let i=0;i<list.length;i++){
984
             for(let i=0;i<list.length;i++){
985
              for(let j=0;j<list[i].dialysis_dialyszers_arr.length;j++){
985
              for(let j=0;j<list[i].dialysis_dialyszers_arr.length;j++){
986
-             
987
-               dialysisDialyszersArr.push(list[i].dialysis_dialyszers_arr[j])  
986
+
987
+               dialysisDialyszersArr.push(list[i].dialysis_dialyszers_arr[j])
988
              }
988
              }
989
              for(let z=0;z<list[i].dialyzer_perfusion_apparatus_arr.length;z++){
989
              for(let z=0;z<list[i].dialyzer_perfusion_apparatus_arr.length;z++){
990
               dialyzerPerfusionApparaArr.push(list[i].dialyzer_perfusion_apparatus_arr[z])
990
               dialyzerPerfusionApparaArr.push(list[i].dialyzer_perfusion_apparatus_arr[z])
993
               dialysisIrrigationArr.push(list[i].dialysis_irrigation_arr[y])
993
               dialysisIrrigationArr.push(list[i].dialysis_irrigation_arr[y])
994
              }
994
              }
995
              for(let h=0;h<list[i].puncture_needle_arr.length;h++){
995
              for(let h=0;h<list[i].puncture_needle_arr.length;h++){
996
-               punctureNeedleArr.push(list[i].puncture_needle_arr[h])   
996
+               punctureNeedleArr.push(list[i].puncture_needle_arr[h])
997
              }
997
              }
998
             }
998
             }
999
            let obj = {}
999
            let obj = {}
1016
               a.specification_name = i
1016
               a.specification_name = i
1017
               Arr.push(a);
1017
               Arr.push(a);
1018
             }
1018
             }
1019
-          
1019
+
1020
            for(let i=0;i<dialyzerPerfusionApparaArr.length;i++){
1020
            for(let i=0;i<dialyzerPerfusionApparaArr.length;i++){
1021
             if(objOne[dialyzerPerfusionApparaArr[i]]){
1021
             if(objOne[dialyzerPerfusionApparaArr[i]]){
1022
                 objOne[dialyzerPerfusionApparaArr[i]] +=1
1022
                 objOne[dialyzerPerfusionApparaArr[i]] +=1
1023
              }else{
1023
              }else{
1024
               objOne[dialyzerPerfusionApparaArr[i]] = 1
1024
               objOne[dialyzerPerfusionApparaArr[i]] = 1
1025
-             }   
1025
+             }
1026
            }
1026
            }
1027
-           
1027
+
1028
            for (let i in objOne) {
1028
            for (let i in objOne) {
1029
               let a = {};
1029
               let a = {};
1030
               a[i] = objOne[i];
1030
               a[i] = objOne[i];
1039
               objTwo[dialysisIrrigationArr[i]] +=1
1039
               objTwo[dialysisIrrigationArr[i]] +=1
1040
              }else{
1040
              }else{
1041
               objTwo[dialysisIrrigationArr[i]] = 1
1041
               objTwo[dialysisIrrigationArr[i]] = 1
1042
-             }   
1042
+             }
1043
            }
1043
            }
1044
 
1044
 
1045
            for (let i in objTwo) {
1045
            for (let i in objTwo) {
1050
               a.specification_name = i
1050
               a.specification_name = i
1051
               Arr.push(a);
1051
               Arr.push(a);
1052
             }
1052
             }
1053
-            
1053
+
1054
           for(let i = 0 ; i < punctureNeedleArr.length; i++){
1054
           for(let i = 0 ; i < punctureNeedleArr.length; i++){
1055
             if(objThree[punctureNeedleArr[i]]){
1055
             if(objThree[punctureNeedleArr[i]]){
1056
                objThree[punctureNeedleArr[i]] +=1
1056
                objThree[punctureNeedleArr[i]] +=1
1066
               a.specification_name = i
1066
               a.specification_name = i
1067
               Arr.push(a);
1067
               Arr.push(a);
1068
             }
1068
             }
1069
-            
1070
-          
1069
+
1070
+
1071
 
1071
 
1072
 
1072
 
1073
           //  var objfive = {name:"钾(mmol/L)",specification_name:"2.0",count:""}
1073
           //  var objfive = {name:"钾(mmol/L)",specification_name:"2.0",count:""}
1074
           //  var objsix =  {name:"钠(mmol/L)",specification_name:"1.25",count:""}
1074
           //  var objsix =  {name:"钠(mmol/L)",specification_name:"1.25",count:""}
1075
           //  var objseven = {name:"钙(mmol/L)",specification_name:"1.5",count:""}
1075
           //  var objseven = {name:"钙(mmol/L)",specification_name:"1.5",count:""}
1076
           //  var objeight = {name:"葡萄糖(mmol/L)",specification_name:"无糖",count:""}
1076
           //  var objeight = {name:"葡萄糖(mmol/L)",specification_name:"无糖",count:""}
1077
-         
1078
-           
1077
+
1078
+
1079
             // objfive.count = kaliumCount
1079
             // objfive.count = kaliumCount
1080
             // objsix.count = sodiumCount
1080
             // objsix.count = sodiumCount
1081
             // objseven.count = calciumCount
1081
             // objseven.count = calciumCount
1082
             // objeight.count = glucoseCount
1082
             // objeight.count = glucoseCount
1083
-            
1083
+
1084
             // this.tableList.push(objfive)
1084
             // this.tableList.push(objfive)
1085
             // this.tableList.push(objsix)
1085
             // this.tableList.push(objsix)
1086
             // this.tableList.push(objseven)
1086
             // this.tableList.push(objseven)
1087
             // this.tableList.push(objeight)
1087
             // this.tableList.push(objeight)
1088
-           
1088
+
1089
             for(let i=0;i<Arr.length;i++){
1089
             for(let i=0;i<Arr.length;i++){
1090
               for(let j=0;j<this.rowList.length;j++){
1090
               for(let j=0;j<this.rowList.length;j++){
1091
                 if(Arr[i].name == this.rowList[j].filed_name_cn){
1091
                 if(Arr[i].name == this.rowList[j].filed_name_cn){
1093
                 }
1093
                 }
1094
               }
1094
               }
1095
             }
1095
             }
1096
-            
1096
+
1097
             console.log("tablistlist233323232",this.tableList)
1097
             console.log("tablistlist233323232",this.tableList)
1098
-           
1098
+
1099
           }
1099
           }
1100
        })
1100
        })
1101
-        
1101
+
1102
       },
1102
       },
1103
       toStatistics(){
1103
       toStatistics(){
1104
         this.tableList = []
1104
         this.tableList = []
1123
                 }
1123
                 }
1124
              }
1124
              }
1125
             //  console.log("projectList",projectList)
1125
             //  console.log("projectList",projectList)
1126
-             
1126
+
1127
              if(projectList!=null && projectList.length > 0){
1127
              if(projectList!=null && projectList.length > 0){
1128
                for(let i=0;i<projectList.length;i++){
1128
                for(let i=0;i<projectList.length;i++){
1129
                  projectList[i].good_id = 0
1129
                  projectList[i].good_id = 0
1130
                  projectList[i].good_id = projectList[i].good_info.id
1130
                  projectList[i].good_id = projectList[i].good_info.id
1131
                }
1131
                }
1132
              }
1132
              }
1133
-             
1133
+
1134
              let dataInfo = {}
1134
              let dataInfo = {}
1135
               projectList.forEach((item, index) => {
1135
               projectList.forEach((item, index) => {
1136
               let { good_id } = item
1136
               let { good_id } = item
1145
               }
1145
               }
1146
             })
1146
             })
1147
             let newArr = Object.values(dataInfo)
1147
             let newArr = Object.values(dataInfo)
1148
-          
1148
+
1149
             for(let i=0;i<projectList.length;i++){
1149
             for(let i=0;i<projectList.length;i++){
1150
               for(let j=0;j<newArr.length;j++){
1150
               for(let j=0;j<newArr.length;j++){
1151
                  if(projectList[i].good_id == newArr[j].good_id){
1151
                  if(projectList[i].good_id == newArr[j].good_id){
1153
                  }
1153
                  }
1154
               }
1154
               }
1155
             }
1155
             }
1156
-            
1156
+
1157
             for(let i=0;i<newArr.length;i++){
1157
             for(let i=0;i<newArr.length;i++){
1158
               for(let j=0;j<newArr[i].child.length;j++){
1158
               for(let j=0;j<newArr[i].child.length;j++){
1159
                  newArr[i].count += parseInt(newArr[i].child[j].count)
1159
                  newArr[i].count += parseInt(newArr[i].child[j].count)
1186
           }else{
1186
           }else{
1187
            return ""
1187
            return ""
1188
           }
1188
           }
1189
-          
1189
+
1190
         }
1190
         }
1191
         if(filed_name_cn == "目标超滤量"){
1191
         if(filed_name_cn == "目标超滤量"){
1192
 
1192
 
1250
          return val.special_medicine_other
1250
          return val.special_medicine_other
1251
         }
1251
         }
1252
         if(filed_name_cn == "置换液"){
1252
         if(filed_name_cn == "置换液"){
1253
-          return this.getDisplace(val.displace_liqui_part) 
1253
+          return this.getDisplace(val.displace_liqui_part)
1254
         }
1254
         }
1255
         if(filed_name_cn == "血管通路"){
1255
         if(filed_name_cn == "血管通路"){
1256
           return this.getBloodAccess(val.blood_access)
1256
           return this.getBloodAccess(val.blood_access)
1257
         }
1257
         }
1258
         if(filed_name_cn == "体液过多其他症状"){
1258
         if(filed_name_cn == "体液过多其他症状"){
1259
           return val.body_fluid_other
1259
           return val.body_fluid_other
1260
-        }  
1260
+        }
1261
         if(filed_name_cn == "透析时长"){
1261
         if(filed_name_cn == "透析时长"){
1262
           return   val.dialysis_duration_hour + "小时" + val.dialysis_duration_minute + "分钟"
1262
           return   val.dialysis_duration_hour + "小时" + val.dialysis_duration_minute + "分钟"
1263
         }
1263
         }
1488
       for(let i=0;i<this.displace_liqui_part_option.length;i++){
1488
       for(let i=0;i<this.displace_liqui_part_option.length;i++){
1489
         if(id == this.displace_liqui_part_option[i].id){
1489
         if(id == this.displace_liqui_part_option[i].id){
1490
            name = this.displace_liqui_part_option[i].name
1490
            name = this.displace_liqui_part_option[i].name
1491
-        } 
1491
+        }
1492
       }
1492
       }
1493
       return name
1493
       return name
1494
     },
1494
     },
1582
             if(i == 20 && this.goodTypeList[i].is_open == 1){
1582
             if(i == 20 && this.goodTypeList[i].is_open == 1){
1583
                this.checkedTwentyNight= true
1583
                this.checkedTwentyNight= true
1584
             }
1584
             }
1585
-           
1585
+
1586
           }
1586
           }
1587
           this.startDialogVisibleOne = true
1587
           this.startDialogVisibleOne = true
1588
         }
1588
         }
1589
-      }) 
1589
+      })
1590
     },
1590
     },
1591
-    saveHisDialysis(){ 
1591
+    saveHisDialysis(){
1592
       var index = 0
1592
       var index = 0
1593
       var arr = []
1593
       var arr = []
1594
       if(this.checkedOne == true){
1594
       if(this.checkedOne == true){
1601
          arr.push(this.goodTypeList[i].id)
1601
          arr.push(this.goodTypeList[i].id)
1602
         }
1602
         }
1603
       }
1603
       }
1604
-      
1604
+
1605
      var index_one = 0
1605
      var index_one = 0
1606
      if(this.checkedTwo == true){
1606
      if(this.checkedTwo == true){
1607
         index_one = 1
1607
         index_one = 1
1613
          arr.push(this.goodTypeList[i].id)
1613
          arr.push(this.goodTypeList[i].id)
1614
         }
1614
         }
1615
       }
1615
       }
1616
-   
1616
+
1617
     var index_two = 0
1617
     var index_two = 0
1618
     if(this.checkedThree == true){
1618
     if(this.checkedThree == true){
1619
         index_two = 2
1619
         index_two = 2
1625
          arr.push(this.goodTypeList[i].id)
1625
          arr.push(this.goodTypeList[i].id)
1626
         }
1626
         }
1627
       }
1627
       }
1628
-    
1628
+
1629
     var index_three = 0
1629
     var index_three = 0
1630
      if(this.checkedFour == true){
1630
      if(this.checkedFour == true){
1631
         index_three = 3
1631
         index_three = 3
1637
          arr.push(this.goodTypeList[i].id)
1637
          arr.push(this.goodTypeList[i].id)
1638
         }
1638
         }
1639
       }
1639
       }
1640
-     
1640
+
1641
      var index_four = 0
1641
      var index_four = 0
1642
       if(this.checkedFive == true){
1642
       if(this.checkedFive == true){
1643
         index_four = 4
1643
         index_four = 4
1649
          arr.push(this.goodTypeList[i].id)
1649
          arr.push(this.goodTypeList[i].id)
1650
         }
1650
         }
1651
       }
1651
       }
1652
-      
1652
+
1653
       var index_five = 0
1653
       var index_five = 0
1654
       if(this.checkedSix == true){
1654
       if(this.checkedSix == true){
1655
         index_five = 5
1655
         index_five = 5
1661
          arr.push(this.goodTypeList[i].id)
1661
          arr.push(this.goodTypeList[i].id)
1662
         }
1662
         }
1663
       }
1663
       }
1664
-     
1664
+
1665
      var index_six = 0
1665
      var index_six = 0
1666
      if(this.checkedSeven == true){
1666
      if(this.checkedSeven == true){
1667
         index_six = 6
1667
         index_six = 6
1673
          arr.push(this.goodTypeList[i].id)
1673
          arr.push(this.goodTypeList[i].id)
1674
         }
1674
         }
1675
       }
1675
       }
1676
-     
1676
+
1677
      var index_seven = 0
1677
      var index_seven = 0
1678
       if(this.checkedEnight == true){
1678
       if(this.checkedEnight == true){
1679
         index_seven = 7
1679
         index_seven = 7
1698
          arr.push(this.goodTypeList[i].id)
1698
          arr.push(this.goodTypeList[i].id)
1699
         }
1699
         }
1700
       }
1700
       }
1701
-   
1701
+
1702
    var index_night = 0
1702
    var index_night = 0
1703
     if(this.checkedTen == true){
1703
     if(this.checkedTen == true){
1704
         index_night = 9
1704
         index_night = 9
1710
          arr.push(this.goodTypeList[i].id)
1710
          arr.push(this.goodTypeList[i].id)
1711
         }
1711
         }
1712
       }
1712
       }
1713
-     
1713
+
1714
      var index_ten = 0
1714
      var index_ten = 0
1715
      if(this.checkedEleven == true){
1715
      if(this.checkedEleven == true){
1716
         index_ten = 10
1716
         index_ten = 10
1722
          arr.push(this.goodTypeList[i].id)
1722
          arr.push(this.goodTypeList[i].id)
1723
         }
1723
         }
1724
       }
1724
       }
1725
-     
1725
+
1726
      var index_eleven =0
1726
      var index_eleven =0
1727
      if(this.checkedTwenty == true){
1727
      if(this.checkedTwenty == true){
1728
         index_eleven = 11
1728
         index_eleven = 11
1746
          arr.push(this.goodTypeList[i].id)
1746
          arr.push(this.goodTypeList[i].id)
1747
         }
1747
         }
1748
       }
1748
       }
1749
-    
1749
+
1750
     var index_twenty_two = 0
1750
     var index_twenty_two = 0
1751
      if(this.checkedTwentyTwo == true){
1751
      if(this.checkedTwentyTwo == true){
1752
         index_twenty_two = 13
1752
         index_twenty_two = 13
1758
          arr.push(this.goodTypeList[i].id)
1758
          arr.push(this.goodTypeList[i].id)
1759
         }
1759
         }
1760
       }
1760
       }
1761
-    
1761
+
1762
      var index_twenty_three = 0
1762
      var index_twenty_three = 0
1763
      if(this.checkedTwentyThree == true){
1763
      if(this.checkedTwentyThree == true){
1764
         index_twenty_three = 14
1764
         index_twenty_three = 14
1770
          arr.push(this.goodTypeList[i].id)
1770
          arr.push(this.goodTypeList[i].id)
1771
         }
1771
         }
1772
       }
1772
       }
1773
-     
1773
+
1774
      var index_twenty_four = 0
1774
      var index_twenty_four = 0
1775
       if(this.checkedTwentyFour == true){
1775
       if(this.checkedTwentyFour == true){
1776
         index_twenty_four = 15
1776
         index_twenty_four = 15
1782
          arr.push(this.goodTypeList[i].id)
1782
          arr.push(this.goodTypeList[i].id)
1783
         }
1783
         }
1784
       }
1784
       }
1785
-     
1785
+
1786
      var index_twenty_five = 0
1786
      var index_twenty_five = 0
1787
      if(this.checkedTwentyFive == true){
1787
      if(this.checkedTwentyFive == true){
1788
         index_twenty_five = 16
1788
         index_twenty_five = 16
1794
          arr.push(this.goodTypeList[i].id)
1794
          arr.push(this.goodTypeList[i].id)
1795
         }
1795
         }
1796
       }
1796
       }
1797
-     
1797
+
1798
      var index_twenty_six = 0
1798
      var index_twenty_six = 0
1799
      if(this.checkedTwentySix == true){
1799
      if(this.checkedTwentySix == true){
1800
         index_twenty_six = 17
1800
         index_twenty_six = 17
1818
          arr.push(this.goodTypeList[i].id)
1818
          arr.push(this.goodTypeList[i].id)
1819
         }
1819
         }
1820
       }
1820
       }
1821
-     
1821
+
1822
      var index_twenty_eight = 0
1822
      var index_twenty_eight = 0
1823
      if(this.checkedTwentyEight == true){
1823
      if(this.checkedTwentyEight == true){
1824
         index_twenty_eight = 19
1824
         index_twenty_eight = 19
1830
          arr.push(this.goodTypeList[i].id)
1830
          arr.push(this.goodTypeList[i].id)
1831
         }
1831
         }
1832
       }
1832
       }
1833
-     
1833
+
1834
      var index_twenty_night =0
1834
      var index_twenty_night =0
1835
      if(this.checkedTwentyNight == true){
1835
      if(this.checkedTwentyNight == true){
1836
         index_twenty_night = 20
1836
         index_twenty_night = 20
1855
            this.getlist()
1855
            this.getlist()
1856
         }
1856
         }
1857
       })
1857
       })
1858
-    
1858
+
1859
     },
1859
     },
1860
     getTypeName(val,patient_id){
1860
     getTypeName(val,patient_id){
1861
-   
1861
+
1862
     var str = ""
1862
     var str = ""
1863
     var arrNew = []
1863
     var arrNew = []
1864
      if(val.project!=null){
1864
      if(val.project!=null){
1867
         if(val.project!=null){
1867
         if(val.project!=null){
1868
         for(let i=0;i<val.project.length;i++){
1868
         for(let i=0;i<val.project.length;i++){
1869
             arr.push(val.project[i])
1869
             arr.push(val.project[i])
1870
-         }  
1870
+         }
1871
          for(let i=0;i<arr.length;i++){
1871
          for(let i=0;i<arr.length;i++){
1872
            arr[i].good_type_id = 0
1872
            arr[i].good_type_id = 0
1873
            arr[i].good_type_id = arr[i].good_info.good_type_id
1873
            arr[i].good_type_id = arr[i].good_info.good_type_id
1894
             }
1894
             }
1895
            }
1895
            }
1896
          }
1896
          }
1897
-       
1897
+
1898
          if(newArr!=null && newArr.length > 0){
1898
          if(newArr!=null && newArr.length > 0){
1899
           for(let i=0;i<newArr.length;i++){
1899
           for(let i=0;i<newArr.length;i++){
1900
            for(let j=0;j<newArr[i].child.length;j++){
1900
            for(let j=0;j<newArr[i].child.length;j++){
1902
            }
1902
            }
1903
           }
1903
           }
1904
          }
1904
          }
1905
-         
1905
+
1906
           if(newArr!=null && newArr.length >0){
1906
           if(newArr!=null && newArr.length >0){
1907
             for(let i=0;i<newArr.length;i++){
1907
             for(let i=0;i<newArr.length;i++){
1908
               arrNew.push(newArr[i])
1908
               arrNew.push(newArr[i])
1909
             }
1909
             }
1910
           }
1910
           }
1911
-      
1911
+
1912
         }
1912
         }
1913
       }
1913
       }
1914
-     
1914
+
1915
       return arrNew
1915
       return arrNew
1916
-     
1916
+
1917
      }
1917
      }
1918
-   
1918
+
1919
     },
1919
     },
1920
     getStr(good_type_id,arrNew,patient_id){
1920
     getStr(good_type_id,arrNew,patient_id){
1921
       // console.log("ARR233323",arrNew)
1921
       // console.log("ARR233323",arrNew)
1932
           }
1932
           }
1933
         }
1933
         }
1934
       }
1934
       }
1935
-      
1935
+
1936
        let dataInfo = {}
1936
        let dataInfo = {}
1937
        if(arr!=null && arr.length > 0){
1937
        if(arr!=null && arr.length > 0){
1938
         arr.forEach((item, index) => {
1938
         arr.forEach((item, index) => {
1955
               }
1955
               }
1956
             }
1956
             }
1957
           }
1957
           }
1958
-            
1958
+
1959
           if(newArr!=null && newArr.length > 0){
1959
           if(newArr!=null && newArr.length > 0){
1960
             for(let j=0;j<newArr.length;j++){
1960
             for(let j=0;j<newArr.length;j++){
1961
               for(let z=0;z<newArr[j].child.length;z++){
1961
               for(let z=0;z<newArr[j].child.length;z++){
1967
             }
1967
             }
1968
           }
1968
           }
1969
        }
1969
        }
1970
-    
1970
+
1971
       return str
1971
       return str
1972
     },
1972
     },
1973
     toPrint(){
1973
     toPrint(){
1981
     },
1981
     },
1982
     toExportListOne(){
1982
     toExportListOne(){
1983
       import('@/vendor/Export2Excel').then(excel => {
1983
       import('@/vendor/Export2Excel').then(excel => {
1984
-         
1984
+
1985
         if(this.tableList!=null && this.tableList.length > 0){
1985
         if(this.tableList!=null && this.tableList.length > 0){
1986
            for(let i=0;i<this.tableList.length;i++){
1986
            for(let i=0;i<this.tableList.length;i++){
1987
              this.tableList[i].index = i+1
1987
              this.tableList[i].index = i+1
1997
            filename: '透析耗材统计'
1997
            filename: '透析耗材统计'
1998
          })
1998
          })
1999
           this.downloadLoading = false
1999
           this.downloadLoading = false
2000
-        }) 
2000
+        })
2001
     },
2001
     },
2002
     toExportListTwo(){
2002
     toExportListTwo(){
2003
-      import('@/vendor/Export2Excel').then(excel => { 
2003
+      import('@/vendor/Export2Excel').then(excel => {
2004
         if(this.tableList!=null && this.tableList.length > 0){
2004
         if(this.tableList!=null && this.tableList.length > 0){
2005
            for(let i=0;i<this.tableList.length;i++){
2005
            for(let i=0;i<this.tableList.length;i++){
2006
              this.tableList[i].index = i+1
2006
              this.tableList[i].index = i+1
2016
            filename: '透析耗材统计'
2016
            filename: '透析耗材统计'
2017
          })
2017
          })
2018
           this.downloadLoading = false
2018
           this.downloadLoading = false
2019
-        })  
2019
+        })
2020
     },
2020
     },
2021
     handleSelectionChange(val){
2021
     handleSelectionChange(val){
2022
       var arr = []
2022
       var arr = []

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 504 - 488
src/xt_pages/dialysis/doctorAdvicePrint.vue


+ 4 - 5
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue 파일 보기

180
                               <div>
180
                               <div>
181
 
181
 
182
                                 <el-button
182
                                 <el-button
183
-                                    v-if="(hisPatientInfo.id_card_type == 4 && hisPatientInfo.balance_accounts_type != 2 && hisPatientInfo.id > 0 &&  items.prescriptions[0].order.id == 0 && org_id != 10340)"
183
+                                    v-if="(hisPatientInfo.id_card_type == 4 && hisPatientInfo.balance_accounts_type != 2 && hisPatientInfo.id > 0  && org_id != 10340)"
184
                                     size="small"
184
                                     size="small"
185
                                     @click="open(50,items.med_type,items.prescriptions[0].order,items.prescriptions)"
185
                                     @click="open(50,items.med_type,items.prescriptions[0].order,items.prescriptions)"
186
                                     type="primary"
186
                                     type="primary"
203
                                 </el-button>
203
                                 </el-button>
204
                                 <!--<div>{{ items.curPrescriptions.order.order_status}}</div>-->
204
                                 <!--<div>{{ items.curPrescriptions.order.order_status}}</div>-->
205
                                 <!--<div>{{ items.prescriptions[0].order.order_status}}</div>-->
205
                                 <!--<div>{{ items.prescriptions[0].order.order_status}}</div>-->
206
-
207
-
208
                                 <el-button v-loading="loadingtwo"
206
                                 <el-button v-loading="loadingtwo"
209
                                            v-if="((hisPatientInfo.id > 0 && items.curPrescriptions.order.id == 0) || items.curPrescriptions.order.order_status == 1 ||  items.curPrescriptions.order.order_status == 3) && org_id != 10340"
207
                                            v-if="((hisPatientInfo.id > 0 && items.curPrescriptions.order.id == 0) || items.curPrescriptions.order.order_status == 1 ||  items.curPrescriptions.order.order_status == 3) && org_id != 10340"
210
                                            size="small"
208
                                            size="small"
2980
         }
2978
         }
2981
 
2979
 
2982
         if (this.hisPatientInfo.id_card_type == 1) {
2980
         if (this.hisPatientInfo.id_card_type == 1) {
2983
-          if (this.hisPatientInfo.balance_accounts_type != 2 && this.$store.getters.xt_user.org_id != 10088 && this.$store.getters.xt_user.org_id != 10106 && this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217 && this.$store.getters.xt_user.org_id != 10191) {
2981
+          if (this.hisPatientInfo.balance_accounts_type != 2 && this.$store.getters.xt_user.org_id != 10088 && this.$store.getters.xt_user.org_id != 10106 && this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217 && this.$store.getters.xt_user.org_id != 10191 && this.$store.getters.xt_user.org_id !=  10318) {
2984
             this.pwdFormVisible = true
2982
             this.pwdFormVisible = true
2985
             this.pwd = ''
2983
             this.pwd = ''
2986
           } else {
2984
           } else {
2992
 
2990
 
2993
           }
2991
           }
2994
         } else {
2992
         } else {
2995
-          if (this.activeName == 'first') {/////////////////////////押金shows
2993
+          if (this.activeName == 'first') {
2994
+            //押金shows
2996
             this.$refs.charge.show(this.getTotalFour(prescriptions), this.currentOrder,this.patientInfo.id)
2995
             this.$refs.charge.show(this.getTotalFour(prescriptions), this.currentOrder,this.patientInfo.id)
2997
           } else {
2996
           } else {
2998
             this.$refs.charge.show(this.getTotalFour(prescriptions), this.currentOrder,this.patientInfo.id)
2997
             this.$refs.charge.show(this.getTotalFour(prescriptions), this.currentOrder,this.patientInfo.id)

+ 7 - 7
src/xt_pages/outpatientCharges/statementPrint.vue 파일 보기

55
          :balanceAccounts="balanceAccounts"
55
          :balanceAccounts="balanceAccounts"
56
      >
56
      >
57
      </printSeven>
57
      </printSeven>
58
-
59
-      <printOne :info="info" v-if="org_id != 9990 &&
60
-          org_id != 10138 &&
61
-          org_id != 9504 &&
62
-          org_id != 10028 &&
63
-          org_id != 4 &&
64
-          org_id != 10278 && org_id != 10191 && org_id != 10387"></printOne>
58
+   <printOne :info="info" v-else></printOne>
59
+<!--      <printOne :info="info" v-if="org_id != 9990 &&-->
60
+<!--          org_id != 10138 &&-->
61
+<!--          org_id != 9504 &&-->
62
+<!--          org_id != 10028 &&-->
63
+<!--          org_id != 4 &&-->
64
+<!--          org_id != 10278 && org_id != 10191 && org_id != 10387"></printOne>-->
65
       <!-- 测试医保环境下表格样式放开以下这条 -->
65
       <!-- 测试医保环境下表格样式放开以下这条 -->
66
       <!-- <testVue :info="info" v-else></testVue> -->
66
       <!-- <testVue :info="info" v-else></testVue> -->
67
     </div>
67
     </div>

+ 3 - 0
src/xt_pages/stock/drugs/components/purchaseNewDrugQuery.vue 파일 보기

1129
         totalthree +=arr3[i].count
1129
         totalthree +=arr3[i].count
1130
       }
1130
       }
1131
     }
1131
     }
1132
+    console.log("totalone2332323",totalone)
1133
+    console.log("totaltwo",totaltwo)
1134
+    console.log("totalthr3eee",totalthree)
1132
     total = totalone + totaltwo - totalthree
1135
     total = totalone + totaltwo - totalthree
1133
     if (total < min_number) {
1136
     if (total < min_number) {
1134
       min_str = total + min_unit;
1137
       min_str = total + min_unit;

+ 14 - 3
src/xt_pages/stock/stockOutOrder.vue 파일 보기

270
             </template>
270
             </template>
271
           </el-table-column>
271
           </el-table-column>
272
 
272
 
273
-          <el-table-column label="仓库名称" align="center">
273
+          <!-- <el-table-column label="仓库名称" align="center">
274
             <template slot-scope="scope">
274
             <template slot-scope="scope">
275
               {{ getHouseName(scope.row.storehouse_id) }}
275
               {{ getHouseName(scope.row.storehouse_id) }}
276
             </template>
276
             </template>
277
-          </el-table-column>
277
+          </el-table-column> -->
278
           <!-- <el-table-column label="剩余库存" align="center" v-if="is_sys== 0">
278
           <!-- <el-table-column label="剩余库存" align="center" v-if="is_sys== 0">
279
             <template slot-scope="scope">
279
             <template slot-scope="scope">
280
               <span>{{scope.row.stock_count}}</span>
280
               <span>{{scope.row.stock_count}}</span>
281
             </template>
281
             </template>
282
           </el-table-column> -->
282
           </el-table-column> -->
283
+
284
+          <el-table-column label="出库数量" align="center">
285
+            <template slot-scope="scope">
286
+               <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
287
+                  <td style="border-right: none; border-inline-end: none;text-align: center">
288
+                      {{ getHouseName(item.storehouse_id) }}
289
+                  </td>
290
+               </tr>
291
+             
292
+            </template>
293
+          </el-table-column>
283
        
294
        
284
           <el-table-column label="出库数量" align="center">
295
           <el-table-column label="出库数量" align="center">
285
             <template slot-scope="scope">
296
             <template slot-scope="scope">
2343
     },
2354
     },
2344
     // 合并单元格样式
2355
     // 合并单元格样式
2345
     cellStyle({ row, column, rowIndex, columnIndex }) {
2356
     cellStyle({ row, column, rowIndex, columnIndex }) {
2346
-      let arr = [4,5,6,7,8,9,10,11,12,13];
2357
+      let arr = [3,4,5,6,7,8,9,10,11,12,13];
2347
       if (arr.indexOf(columnIndex) > -1) {
2358
       if (arr.indexOf(columnIndex) > -1) {
2348
         return "spanClass";
2359
         return "spanClass";
2349
       }
2360
       }

+ 9 - 290
src/xt_pages/workforce/appointment.vue 파일 보기

356
           }
356
           }
357
       )
357
       )
358
 
358
 
359
-    },getWeekPanelsTwo() {
360
-      // this.scheduleZoneRow = []
361
-      // this.scheduleZone = []
362
-      getWeekPanels(1, this.partition_id).then(response => {
363
-        if (response.data.state == 0) {
364
-          return false
365
-        }
366
-        var partitions = response.data.data.partitions
367
-        // console.log("分区",partitions)
368
-        this.theWeek.thisWeek = response.data.data.theWeek
369
-        this.theWeek.lastWeek = response.data.data.theLastWeek
370
-        this.theWeek.nextWeek = response.data.data.theNextWeek
371
-        this.theWeek.nextTwoWeek = response.data.data.theNextSecWeek
372
-        // 在控制变量改变的时候进行 强制渲染更新
373
-        let childrenRefs = this.$refs.elTabs.$children
374
-        this.$nextTick(() => {
375
-          childrenRefs.forEach(child => child.$forceUpdate())
376
-        })
377
-
378
-        var that = this
379
-
380
-        if (partitions.length > 0) {
381
-          let arrSort = []
382
-          partitions.forEach((item) => {
383
-            let num = Math.max.apply(Math, item.jihaos.map(function (o) {
384
-              return o.sort
385
-            }))
386
-            item.sort = num
387
-            arrSort.push(item)
388
-          })
389
-          arrSort.sort(this.compare('sort'))
390
-          partitions = arrSort
391
-          partitions.forEach(function (partition) {
392
-            if (partition.jihaos.length == 0) {
393
-              return false
394
-            }
395
-            that.scheduleZoneRow.push(partition.jihaos.length)
396
-            that.partitions[partition.id] = partition
397
-            partition.jihaos.forEach(function (jihao) {
398
-              var thisPa = {
399
-                area: partition.name,
400
-                zone_id: partition.id,
401
-                zone_type: partition.type,
402
-                cut: jihao.number,
403
-                jihao_id: jihao.id,
404
-                Mon_M: {
405
-                  schedule_id: 0,
406
-                  mode_id: 0,
407
-                  mode_name: '',
408
-                  dialysis_machine_name:"",
409
-                  patient_id: 0,
410
-                  patient: '',
411
-                  zone_id:partition.id,
412
-                  jihao_id: jihao.id,
413
-                },
414
-                Mon_A: {
415
-                  schedule_id: 0,
416
-                  mode_id: 0,
417
-                  mode_name: '',
418
-                  dialysis_machine_name:"",
419
-
420
-                  patient_id: 0,
421
-                  patient: '',
422
-                  zone_id:partition.id,
423
-                  jihao_id: jihao.id,
424
-                },
425
-                Mon_N: {
426
-                  schedule_id: 0,
427
-                  mode_id: 0,
428
-                  mode_name: '',
429
-                  patient_id: 0,
430
-                  dialysis_machine_name:"",
431
-
432
-                  patient: '',
433
-                  zone_id:partition.id,
434
-                  jihao_id: jihao.id,
435
-                },
436
-                Tue_M: {
437
-                  schedule_id: 0,
438
-                  mode_id: 0,
439
-                  mode_name: '',
440
-                  dialysis_machine_name:"",
441
-
442
-                  patient_id: 0,
443
-                  patient: '',
444
-                  zone_id:partition.id,
445
-                  jihao_id: jihao.id,
446
-                },
447
-                Tue_A: {
448
-                  schedule_id: 0,
449
-                  mode_id: 0,
450
-                  mode_name: '',
451
-                  dialysis_machine_name:"",
452
-
453
-                  patient_id: 0,
454
-                  patient: '',
455
-                  zone_id:partition.id,
456
-                  jihao_id: jihao.id,
457
-                },
458
-                Tue_N: {
459
-                  schedule_id: 0,
460
-                  mode_id: 0,
461
-                  mode_name: '',
462
-                  patient_id: 0,
463
-                  dialysis_machine_name:"",
464
-
465
-                  patient: '',
466
-                  zone_id:partition.id,
467
-                  jihao_id: jihao.id,
468
-                },
469
-                Wed_M: {
470
-                  schedule_id: 0,
471
-                  mode_id: 0,
472
-                  mode_name: '',
473
-                  patient_id: 0,
474
-                  dialysis_machine_name:"",
475
-
476
-                  patient: '',
477
-                  zone_id:partition.id,
478
-                  jihao_id: jihao.id,
479
-                },
480
-                Wed_A: {
481
-                  schedule_id: 0,
482
-                  mode_id: 0,
483
-                  mode_name: '',
484
-                  patient_id: 0,
485
-                  dialysis_machine_name:"",
486
-
487
-                  patient: '',
488
-                  zone_id:partition.id,
489
-                  jihao_id: jihao.id,
490
-                },
491
-                Wed_N: {
492
-                  schedule_id: 0,
493
-                  mode_id: 0,
494
-                  mode_name: '',
495
-                  patient_id: 0,
496
-                  dialysis_machine_name:"",
497
-
498
-                  patient: '',
499
-                  zone_id:partition.id,
500
-                  jihao_id: jihao.id,
501
-                },
502
-                Thurs_M: {
503
-                  schedule_id: 0,
504
-                  mode_id: 0,
505
-                  mode_name: '',
506
-                  patient_id: 0,
507
-                  dialysis_machine_name:"",
508
-
509
-                  patient: '',
510
-                  zone_id:partition.id,
511
-                  jihao_id: jihao.id,
512
-                },
513
-                Thurs_A: {
514
-                  schedule_id: 0,
515
-                  mode_id: 0,
516
-                  mode_name: '',
517
-                  patient_id: 0,
518
-                  dialysis_machine_name:"",
519
-
520
-                  patient: '',
521
-                  zone_id:partition.id,
522
-                  jihao_id: jihao.id,
523
-                },
524
-                Thurs_N: {
525
-                  schedule_id: 0,
526
-                  mode_id: 0,
527
-                  mode_name: '',
528
-                  patient_id: 0,
529
-                  dialysis_machine_name:"",
530
-
531
-                  patient: '',
532
-                  zone_id:partition.id,
533
-                  jihao_id: jihao.id,
534
-                },
535
-                Fri_M: {
536
-                  schedule_id: 0,
537
-                  mode_id: 0,
538
-                  mode_name: '',
539
-                  dialysis_machine_name:"",
540
-
541
-                  patient_id: 0,
542
-                  patient: '',
543
-                  zone_id:partition.id,
544
-                  jihao_id: jihao.id,
545
-                },
546
-                Fri_A: {
547
-                  schedule_id: 0,
548
-                  mode_id: 0,
549
-                  mode_name: '',
550
-                  dialysis_machine_name:"",
551
-
552
-                  patient_id: 0,
553
-                  patient: '',
554
-                  zone_id:partition.id,
555
-                  jihao_id: jihao.id,
556
-                },
557
-                Fri_N: {
558
-                  schedule_id: 0,
559
-                  mode_id: 0,
560
-                  mode_name: '',
561
-                  patient_id: 0,
562
-                  dialysis_machine_name:"",
563
-
564
-                  patient: '',
565
-                  zone_id:partition.id,
566
-                  jihao_id: jihao.id,
567
-                },
568
-                Sat_M: {
569
-                  schedule_id: 0,
570
-                  mode_id: 0,
571
-                  mode_name: '',
572
-                  patient_id: 0,
573
-                  dialysis_machine_name:"",
574
-
575
-                  patient: '',
576
-                  zone_id:partition.id,
577
-                  jihao_id: jihao.id,
578
-                },
579
-                Sat_A: {
580
-                  schedule_id: 0,
581
-                  mode_id: 0,
582
-                  mode_name: '',
583
-                  dialysis_machine_name:"",
584
-
585
-                  patient_id: 0,
586
-                  patient: '',
587
-                  zone_id:partition.id,
588
-                  jihao_id: jihao.id,
589
-                },
590
-                Sat_N: {
591
-                  schedule_id: 0,
592
-                  mode_id: 0,
593
-                  mode_name: '',
594
-                  patient_id: 0,
595
-                  dialysis_machine_name:"",
596
-
597
-                  patient: '',
598
-                  zone_id:partition.id,
599
-                  jihao_id: jihao.id,
600
-                },
601
-                Sun_A: {
602
-                  schedule_id: 0,
603
-                  mode_id: 0,
604
-                  mode_name: '',
605
-                  patient_id: 0,
606
-                  dialysis_machine_name:"",
607
-
608
-                  patient: '',
609
-                  zone_id:partition.id,
610
-                  jihao_id: jihao.id,
611
-                },
612
-                Sun_N: {
613
-                  schedule_id: 0,
614
-                  mode_id: 0,
615
-                  mode_name: '',
616
-                  dialysis_machine_name:"",
617
-
618
-                  patient_id: 0,
619
-                  patient: '',
620
-                  zone_id:partition.id,
621
-                  jihao_id: jihao.id,
622
-                },
623
-                Sun_M: {
624
-                  schedule_id: 0,
625
-                  mode_id: 0,
626
-                  mode_name: '',
627
-                  dialysis_machine_name:"",
628
-
629
-                  patient_id: 0,
630
-                  patient: '',
631
-                  zone_id:partition.id,
632
-                  jihao_id: jihao.id,
633
-                },
634
-                total: 0
635
-              }
636
-              that.scheduleZone.push(thisPa)
637
-            })
638
-
639
-          })
640
-        }
641
-        this.export_file_step_two()
642
-      })
643
     },
359
     },
644
     getWeekPanels() {
360
     getWeekPanels() {
645
       // this.scheduleZoneRow = []
361
       // this.scheduleZoneRow = []
921
               that.scheduleZone.push(thisPa)
637
               that.scheduleZone.push(thisPa)
922
             })
638
             })
923
           })
639
           })
640
+
924
         }
641
         }
642
+        console.log("111111111")
643
+        console.log(that.scheduleZone)
925
       })
644
       })
926
     },changeSch(val){
645
     },changeSch(val){
927
       console.log(this.partitions)
646
       console.log(this.partitions)
3085
 
2804
 
3086
     changePartition(val) {
2805
     changePartition(val) {
3087
       this.partition_id = val
2806
       this.partition_id = val
3088
-      this.getThreeWeekList()
3089
-      this.getWeekPanels()
3090
-    },
2807
+      // this.getThreeWeekList()
2808
+      // this.getWeekPanels()
2809
+   },
3091
 
2810
 
3092
     changeSchedule(val) {
2811
     changeSchedule(val) {
3093
-      this.schedule_type = val
2812
+      this.schedule_type = vald
3094
       this.getThreeWeekList()
2813
       this.getThreeWeekList()
3095
       this.getWeekPanels()
2814
       this.getWeekPanels()
3096
     },
2815
     },
3307
     }
3026
     }
3308
     let newNum = 0
3027
     let newNum = 0
3309
     for (let i = 0; i < this.weekList.length; i++) {
3028
     for (let i = 0; i < this.weekList.length; i++) {
3310
-      if (this.weekNum + i + 1 <= 53) {
3311
-        let num = this.weekNum + i
3029
+      if (this.weekNum + i +2 <= 53) {
3030
+        let num = this.weekNum + i +1
3312
         let str = this.weekList[i][0] + '~' + this.weekList[i][6] + '(' + num + ')'
3031
         let str = this.weekList[i][0] + '~' + this.weekList[i][6] + '(' + num + ')'
3313
         this.typeOptions.push({value: i, label: str})
3032
         this.typeOptions.push({value: i, label: str})
3314
         let stt = this.weekList[i][0] + "~" + this.weekList[i][6]
3033
         let stt = this.weekList[i][0] + "~" + this.weekList[i][6]

+ 291 - 165
src/xt_pages/workforce/components/editTableData.vue 파일 보기

1633
             :label="item.title"
1633
             :label="item.title"
1634
             :name="item.name"
1634
             :name="item.name"
1635
         >
1635
         >
1636
-          <el-table border :data="item.tableWeekArrage" style="width: 100%">
1636
+          <el-table v-loading="dataloading" border :data="item.tableWeekArrage" style="width: 100%">
1637
             <!-- 自定义表结构 -->
1637
             <!-- 自定义表结构 -->
1638
             <el-table-column
1638
             <el-table-column
1639
                 label="星期"
1639
                 label="星期"
1824
 import {
1824
 import {
1825
   PostSearchSmartSchPatient,
1825
   PostSearchSmartSchPatient,
1826
   getSmartDevices,
1826
   getSmartDevices,
1827
+  getSmartSchByPatient
1827
 } from "@/api/schedule_template/sch_template";
1828
 } from "@/api/schedule_template/sch_template";
1828
 
1829
 
1829
 import {
1830
 import {
1903
 
1904
 
1904
   data() {
1905
   data() {
1905
     return {
1906
     return {
1907
+      dataloading:false,
1908
+      current_patient_data:[],
1906
       week_zhongwens: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
1909
       week_zhongwens: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
1907
       week_type: "",
1910
       week_type: "",
1908
       saveloading: false,
1911
       saveloading: false,
1919
           title: "本周",
1922
           title: "本周",
1920
           name: "1",
1923
           name: "1",
1921
           tableWeekArrage: [],
1924
           tableWeekArrage: [],
1925
+          weeks:[],
1922
         },
1926
         },
1923
         {
1927
         {
1924
           checkedWeek: [],
1928
           checkedWeek: [],
1925
           title: "下周",
1929
           title: "下周",
1926
           name: "2",
1930
           name: "2",
1927
           tableWeekArrage: [],
1931
           tableWeekArrage: [],
1932
+          weeks:[],
1933
+
1928
         },
1934
         },
1929
         {
1935
         {
1930
           checkedWeek: [],
1936
           checkedWeek: [],
1931
           title: "下下周",
1937
           title: "下下周",
1932
           name: "3",
1938
           name: "3",
1933
           tableWeekArrage: [],
1939
           tableWeekArrage: [],
1940
+          weeks:[],
1941
+
1934
         },
1942
         },
1935
       ],
1943
       ],
1936
 
1944
 
2344
       this.smart_keyword = "";
2352
       this.smart_keyword = "";
2345
     },
2353
     },
2346
     batchSetSch() {
2354
     batchSetSch() {
2347
-      var tempData = [];
2355
+      var saveOrEditTempData = [];
2356
+      var delTempData = [];
2357
+
2348
       var day = new Date().getDay();
2358
       var day = new Date().getDay();
2349
       if (day == 0) {
2359
       if (day == 0) {
2350
         day = 7;
2360
         day = 7;
2372
             week_type: "1",
2382
             week_type: "1",
2373
             week_name: this.editableTabs[0].tableWeekArrage[b].week,
2383
             week_name: this.editableTabs[0].tableWeekArrage[b].week,
2374
           };
2384
           };
2375
-          tempData.push(obj);
2385
+          saveOrEditTempData.push(obj);
2376
         }
2386
         }
2377
       }
2387
       }
2378
       for (let b = 0; b < this.editableTabs[1].tableWeekArrage.length; b++) {
2388
       for (let b = 0; b < this.editableTabs[1].tableWeekArrage.length; b++) {
2389
           week_type: "2",
2399
           week_type: "2",
2390
           week_name: this.editableTabs[1].tableWeekArrage[b].week,
2400
           week_name: this.editableTabs[1].tableWeekArrage[b].week,
2391
         };
2401
         };
2392
-        tempData.push(obj);
2402
+        saveOrEditTempData.push(obj);
2393
       }
2403
       }
2394
-
2395
       for (let b = 0; b < this.editableTabs[2].tableWeekArrage.length; b++) {
2404
       for (let b = 0; b < this.editableTabs[2].tableWeekArrage.length; b++) {
2396
         let obj = {
2405
         let obj = {
2397
           schedule_date: this.editableTabs[2].tableWeekArrage[b].schedule_date,
2406
           schedule_date: this.editableTabs[2].tableWeekArrage[b].schedule_date,
2406
           week_type: "3",
2415
           week_type: "3",
2407
           week_name: this.editableTabs[2].tableWeekArrage[b].week,
2416
           week_name: this.editableTabs[2].tableWeekArrage[b].week,
2408
         };
2417
         };
2409
-        tempData.push(obj);
2418
+        saveOrEditTempData.push(obj);
2410
       }
2419
       }
2411
 
2420
 
2412
-      for (let i = 0; i < tempData.length; i++) {
2413
-        if (tempData[i].bed_id == "" || tempData[i].zone_id == "") {
2421
+      //原始数据,用来与智能排版的数据进行比对,查出有排班记录,取消勾选的数据,作为删除的数据,提交给后端
2422
+
2423
+      for (let b = 0; b < this.current_patient_data[0].tableWeekArrage.length; b++) {
2424
+        //只有大于等于今天的数据才能保存和没有上机的
2425
+        if (
2426
+          this.getWeekByzhongwen(
2427
+            this.current_patient_data[0].tableWeekArrage[b].week
2428
+          ) >= day &&
2429
+          this.current_patient_data[0].tableWeekArrage[b].is_edit
2430
+        ) {
2431
+          let obj = {
2432
+            schedule_date:
2433
+            this.current_patient_data[0].tableWeekArrage[b].schedule_date,
2434
+            schedule_type: this.current_patient_data[0].tableWeekArrage[b].sch_type,
2435
+            bed_id: this.current_patient_data[0].tableWeekArrage[b].jihao_id,
2436
+            schedule_week: this.getWeekByzhongwen(
2437
+              this.current_patient_data[0].tableWeekArrage[b].week
2438
+            ),
2439
+            mode_id: this.current_patient_data[0].tableWeekArrage[b].mode_id,
2440
+            sch_id: this.current_patient_data[0].tableWeekArrage[b].sch_id,
2441
+            zone_id: this.current_patient_data[0].tableWeekArrage[b].zone_id,
2442
+            week_type: "1",
2443
+            week_name: this.current_patient_data[0].tableWeekArrage[b].week,
2444
+          };
2445
+          delTempData.push(obj);
2446
+        }
2447
+      }
2448
+      for (let b = 0; b < this.current_patient_data[1].tableWeekArrage.length; b++) {
2449
+        let obj = {
2450
+          schedule_date: this.current_patient_data[1].tableWeekArrage[b].schedule_date,
2451
+          schedule_type: this.current_patient_data[1].tableWeekArrage[b].sch_type,
2452
+          bed_id: this.current_patient_data[1].tableWeekArrage[b].jihao_id,
2453
+          schedule_week: this.getWeekByzhongwen(
2454
+            this.current_patient_data[1].tableWeekArrage[b].week
2455
+          ),
2456
+          mode_id: this.current_patient_data[1].tableWeekArrage[b].mode_id,
2457
+          sch_id: this.current_patient_data[1].tableWeekArrage[b].sch_id,
2458
+          zone_id: this.current_patient_data[1].tableWeekArrage[b].zone_id,
2459
+          week_type: "2",
2460
+          week_name: this.current_patient_data[1].tableWeekArrage[b].week,
2461
+        };
2462
+        delTempData.push(obj);
2463
+      }
2464
+      for (let b = 0; b < this.current_patient_data[2].tableWeekArrage.length; b++) {
2465
+        let obj = {
2466
+          schedule_date: this.current_patient_data[2].tableWeekArrage[b].schedule_date,
2467
+          schedule_type: this.current_patient_data[2].tableWeekArrage[b].sch_type,
2468
+          bed_id: this.current_patient_data[2].tableWeekArrage[b].jihao_id,
2469
+          schedule_week: this.getWeekByzhongwen(
2470
+            this.current_patient_data[2].tableWeekArrage[b].week
2471
+          ),
2472
+          mode_id: this.current_patient_data[2].tableWeekArrage[b].mode_id,
2473
+          sch_id: this.current_patient_data[2].tableWeekArrage[b].sch_id,
2474
+          zone_id: this.current_patient_data[2].tableWeekArrage[b].zone_id,
2475
+          week_type: "3",
2476
+          week_name: this.current_patient_data[2].tableWeekArrage[b].week,
2477
+        };
2478
+        delTempData.push(obj);
2479
+      }
2480
+
2481
+
2482
+
2483
+      for (let i = 0; i < saveOrEditTempData.length; i++) {
2484
+        if (saveOrEditTempData[i].bed_id == "" || saveOrEditTempData[i].zone_id == "") {
2414
           this.$message.error("分区或者床位不能空");
2485
           this.$message.error("分区或者床位不能空");
2415
           return;
2486
           return;
2416
         }
2487
         }
2417
       }
2488
       }
2489
+      console.log(saveOrEditTempData)
2490
+      console.log(delTempData)
2491
+
2492
+
2493
+      if (saveOrEditTempData.length > 0 ) {
2494
+        // console.log("111111")
2495
+
2496
+        // for(let i = 0; i < delTempData.length; i++){
2497
+        //   for(let b = 0; b < saveOrEditTempData.length; b++){
2498
+        //     console.log(delTempData[i].sch_id)
2499
+        //     console.log(saveOrEditTempData[b].sch_id)
2500
+        //
2501
+        //     if(delTempData[i].sch_id == saveOrEditTempData[b].sch_id){
2502
+        //         console.log("被删元素"+delTempData[i])
2503
+        //         delTempData.splice(i,1)
2504
+        //       }
2505
+        //   }
2506
+        // }
2418
 
2507
 
2419
-      if (tempData.length > 0) {
2420
         let obj = {
2508
         let obj = {
2421
-          smart_schs: tempData,
2509
+          smart_schs: saveOrEditTempData,
2510
+          del_schs:[],
2422
         };
2511
         };
2423
-        console.log(obj);
2424
         this.saveloading = true;
2512
         this.saveloading = true;
2425
         BatchSmartSch(obj, this.cur_smart_patient_id).then((response) => {
2513
         BatchSmartSch(obj, this.cur_smart_patient_id).then((response) => {
2426
           if (response.data.state == 1) {
2514
           if (response.data.state == 1) {
2489
       return "";
2577
       return "";
2490
     },
2578
     },
2491
     handleSelect(val) {
2579
     handleSelect(val) {
2492
-      this.editableTabsValue = "1";
2493
-
2494
-      this.editableTabs[0].tableWeekArrage = [];
2495
-      this.editableTabs[1].tableWeekArrage = [];
2496
-      this.editableTabs[2].tableWeekArrage = [];
2580
+      this.dataloading = true
2581
+      getSmartSchByPatient(val.id).then((response) => {
2582
+        this.dataloading = false
2583
+        var sch = response.data.data.sch
2584
+        this.editableTabsValue = "1";
2585
+        this.editableTabs[0].tableWeekArrage = [];
2586
+        this.editableTabs[1].tableWeekArrage = [];
2587
+        this.editableTabs[2].tableWeekArrage = [];
2588
+        this.editableTabs[0].checkedWeek = [];
2589
+        this.editableTabs[1].checkedWeek = [];
2590
+        this.editableTabs[2].checkedWeek = [];
2497
 
2591
 
2498
-      this.editableTabs[0].checkedWeek = [];
2499
-      this.editableTabs[1].checkedWeek = [];
2500
-      this.editableTabs[2].checkedWeek = [];
2592
+        var tempDate = new Date();
2593
+        var day = tempDate.getDay();
2594
+        console.log(day);
2595
+        if (day == 0) {
2596
+          day = 7;
2597
+        }
2598
+        console.log(val);
2599
+        this.smart_keyword = val.name;
2600
+        this.cur_smart_patient_id = val.id;
2601
+        this.cur_smart_patient_name = val.name;
2602
+        this.cur_smart_patient_no = val.dialysis_no;
2603
+        //过滤出当前患者所有排班信息,填充对应的数据到智能排班列表
2604
+        //根据患者的排班日期判断属于本周还是下周还是下下周
2605
+        for (let i = 0; i < sch.length; i++) {
2606
+          var week_type = this.getWeekType(
2607
+            this.getTime(sch[i].schedule_date, "{y}-{m}-{d}")
2608
+          );
2501
 
2609
 
2502
-      var tempDate = new Date();
2503
-      var day = tempDate.getDay();
2504
-      console.log(day);
2505
-      if (day == 0) {
2506
-        day = 7;
2507
-      }
2508
-      console.log(val);
2509
-      this.smart_keyword = val.name;
2510
-      this.cur_smart_patient_id = val.id;
2511
-      this.cur_smart_patient_name = val.name;
2512
-      this.cur_smart_patient_no = val.dialysis_no;
2513
-      //过滤出当前患者所有排班信息,填充对应的数据到智能排班列表
2514
-      //根据患者的排班日期判断属于本周还是下周还是下下周
2515
-      for (let i = 0; i < val.sch.length; i++) {
2516
-        var week_type = this.getWeekType(
2517
-            this.getTime(val.sch[i].schedule_date, "{y}-{m}-{d}")
2518
-        );
2519
-
2520
-        switch (week_type) {
2521
-          case "1":
2522
-            var obj = {
2523
-              mode_id: val.sch[i].mode_id,
2524
-              sch_type: val.sch[i].schedule_type,
2525
-              zone_id: val.sch[i].partition_id,
2526
-              jihao_id: val.sch[i].bed_id,
2527
-              is_edit: false,
2528
-              week: this.getWeek(val.sch[i].schedule_week),
2529
-              jihaos: this.partitionsProp[val.sch[i].partition_id].jihaos,
2530
-              schedule_date: this.getDate(val.sch[i].schedule_week),
2531
-              sch_id: val.sch[i].id,
2532
-            };
2533
-            let is_edit = true;
2534
-            console.log("val.sch[i].order.id");
2535
-            console.log(val.sch[i].order.id);
2536
-            console.log("val.sch[i].order.id");
2610
+          switch (week_type) {
2611
+            case "1":
2612
+              var obj = {
2613
+                mode_id: sch[i].mode_id,
2614
+                sch_type: sch[i].schedule_type,
2615
+                zone_id:  sch[i].partition_id,
2616
+                jihao_id:sch[i].bed_id,
2617
+                is_edit: false,
2618
+                week: this.getWeek(sch[i].schedule_week),
2619
+                jihaos: this.partitionsProp[sch[i].partition_id].jihaos,
2620
+                schedule_date: this.getDate(sch[i].schedule_week),
2621
+                sch_id: sch[i].id,
2622
+              };
2623
+              let is_edit = true;
2624
+              console.log("val.sch[i].order.id");
2625
+              console.log(sch[i].order.id);
2626
+              console.log("val.sch[i].order.id");
2537
 
2627
 
2538
-            if (val.sch[i].schedule_week < day || val.sch[i].order.id > 0) {
2539
-              is_edit = false;
2540
-            } else {
2541
-              is_edit = true;
2542
-            }
2543
-            obj.is_edit = is_edit;
2628
+              if (sch[i].schedule_week < day || sch[i].order.id > 0) {
2629
+                is_edit = false;
2630
+              } else {
2631
+                is_edit = true;
2632
+              }
2633
+              obj.is_edit = is_edit;
2544
 
2634
 
2545
-            for (let b = 0; b < this.weeks.length; b++) {
2546
-              console.log(val.sch[i].schedule_week);
2547
-              console.log(this.weeks[b].week_type);
2548
-              if (val.sch[i].schedule_week == this.weeks[b].week_type) {
2549
-                if (
2635
+              for (let b = 0; b < this.weeks.length; b++) {
2636
+                console.log(sch[i].schedule_week);
2637
+                console.log(this.weeks[b].week_type);
2638
+                if (sch[i].schedule_week == this.weeks[b].week_type) {
2639
+                  if (
2550
                     this.weeks[b].week_type >= day ||
2640
                     this.weeks[b].week_type >= day ||
2551
-                    val.sch[i].order.id == 0
2552
-                ) {
2553
-                  this.weeks[b].is_edit = true;
2554
-                } else {
2555
-                  this.weeks[b].is_edit = false;
2641
+                    sch[i].order.id == 0
2642
+                  ) {
2643
+                    this.weeks[b].is_edit = true;
2644
+                  } else {
2645
+                    this.weeks[b].is_edit = false;
2646
+                  }
2647
+                  this.editableTabs[0].checkedWeek.push(this.weeks[b]);
2556
                 }
2648
                 }
2557
-                this.editableTabs[0].checkedWeek.push(this.weeks[b]);
2649
+
2650
+
2651
+
2558
               }
2652
               }
2559
-            }
2560
 
2653
 
2561
-            this.editableTabs[0].tableWeekArrage.push(obj);
2562
-            break;
2563
-          case "2":
2564
-            var obj2 = {
2565
-              mode_id: val.sch[i].mode_id,
2566
-              sch_type: val.sch[i].schedule_type,
2567
-              zone_id: val.sch[i].partition_id,
2568
-              jihao_id: val.sch[i].bed_id,
2569
-              is_edit: false,
2570
-              week: this.getWeek(val.sch[i].schedule_week),
2571
-              jihaos: this.partitionsProp[val.sch[i].partition_id].jihaos,
2572
-              schedule_date: this.getDate(val.sch[i].schedule_week + 7),
2573
-              sch_id: val.sch[i].id,
2574
-            };
2575
-            let is_edit2 = true;
2576
-            obj2.is_edit = is_edit2;
2654
+              this.editableTabs[0].tableWeekArrage.push(obj);
2655
+              break;
2656
+            case "2":
2657
+              var obj2 = {
2658
+                mode_id: sch[i].mode_id,
2659
+                sch_type: sch[i].schedule_type,
2660
+                zone_id: sch[i].partition_id,
2661
+                jihao_id: sch[i].bed_id,
2662
+                is_edit: false,
2663
+                week: this.getWeek(sch[i].schedule_week),
2664
+                jihaos: this.partitionsProp[sch[i].partition_id].jihaos,
2665
+                schedule_date: this.getDate(sch[i].schedule_week + 7),
2666
+                sch_id: sch[i].id,
2667
+              };
2668
+              let is_edit2 = true;
2669
+              obj2.is_edit = is_edit2;
2670
+
2671
+              // let checkObj2={
2672
+              //   name:this.getWeek(val.sch[i].schedule_week),
2673
+              //   week_type:val.sch[i].schedule_week,
2674
+              //   is_edit:is_edit2
2675
+              // }
2577
 
2676
 
2578
-            // let checkObj2={
2579
-            //   name:this.getWeek(val.sch[i].schedule_week),
2580
-            //   week_type:val.sch[i].schedule_week,
2581
-            //   is_edit:is_edit2
2582
-            // }
2677
+              // this.editableTabs[1].checkedWeek.push(checkObj2)
2678
+
2679
+              for (let b = 0; b < this.weeks.length; b++) {
2680
+                if (sch[i].schedule_week == this.weeks[b].week_type) {
2681
+                  // this.weeks[b].is_edit = true;
2682
+                  this.editableTabs[1].checkedWeek.push(this.weeks[b]);
2683
+                }
2583
 
2684
 
2584
-            // this.editableTabs[1].checkedWeek.push(checkObj2)
2585
 
2685
 
2586
-            for (let b = 0; b < this.weeks.length; b++) {
2587
-              if (val.sch[i].schedule_week == this.weeks[b].week_type) {
2588
-                this.weeks[b].is_edit = true;
2589
-                this.editableTabs[1].checkedWeek.push(this.weeks[b]);
2590
               }
2686
               }
2591
-            }
2592
 
2687
 
2593
-            this.editableTabs[1].tableWeekArrage.push(obj2);
2594
-            break;
2595
-
2596
-          case "3":
2597
-            let obj3 = {
2598
-              mode_id: val.sch[i].mode_id,
2599
-              sch_type: val.sch[i].schedule_type,
2600
-              zone_id: val.sch[i].partition_id,
2601
-              jihao_id: val.sch[i].bed_id,
2602
-              is_edit: false,
2603
-              week: this.getWeek(val.sch[i].schedule_week),
2604
-              jihaos: this.partitionsProp[val.sch[i].partition_id].jihaos,
2605
-              schedule_date: this.getDate(val.sch[i].schedule_week + 14),
2606
-              sch_id: val.sch[i].id,
2607
-            };
2608
-            let is_edit3 = true;
2609
-            obj3.is_edit = is_edit3;
2610
-            for (let b = 0; b < this.weeks.length; b++) {
2611
-              if (val.sch[i].schedule_week == this.weeks[b].week_type) {
2612
-                this.weeks[b].is_edit = true;
2613
-                this.editableTabs[2].checkedWeek.push(this.weeks[b]);
2688
+              this.editableTabs[1].tableWeekArrage.push(obj2);
2689
+              break;
2690
+
2691
+            case "3":
2692
+              let obj3 = {
2693
+                mode_id: sch[i].mode_id,
2694
+                sch_type: sch[i].schedule_type,
2695
+                zone_id: sch[i].partition_id,
2696
+                jihao_id: sch[i].bed_id,
2697
+                is_edit: false,
2698
+                week: this.getWeek(sch[i].schedule_week),
2699
+                jihaos: this.partitionsProp[sch[i].partition_id].jihaos,
2700
+                schedule_date: this.getDate(sch[i].schedule_week + 14),
2701
+                sch_id: sch[i].id,
2702
+              };
2703
+              let is_edit3 = true;
2704
+              obj3.is_edit = is_edit3;
2705
+              for (let b = 0; b < this.weeks.length; b++) {
2706
+                if (sch[i].schedule_week == this.weeks[b].week_type) {
2707
+                  // this.weeks[b].is_edit = true;
2708
+                  this.editableTabs[2].checkedWeek.push(this.weeks[b]);
2709
+
2710
+                }
2711
+
2712
+
2614
               }
2713
               }
2615
-            }
2616
 
2714
 
2617
-            this.editableTabs[2].tableWeekArrage.push(obj3);
2618
-            break;
2715
+              this.editableTabs[2].tableWeekArrage.push(obj3);
2716
+              break;
2717
+          }
2718
+        }
2719
+        if(this.editableTabsValue == "1") {
2720
+          var tempDate = new Date();
2721
+          var day = tempDate.getDay();
2722
+          if (day == 0) {
2723
+            day = 7;
2724
+          }
2725
+          for (let i = 0; i < this.weeks.length; i++) {
2726
+            if (this.weeks[i].week_type < day) {
2727
+              this.weeks[i].is_edit = false;
2728
+            }
2729
+          }
2619
         }
2730
         }
2620
-      }
2621
 
2731
 
2622
-      this.current_all_sch = this.editableTabs;
2732
+        this.current_patient_data = this.editableTabs
2733
+
2734
+        this.current_all_sch = this.editableTabs;
2735
+
2736
+      });
2737
+
2738
+
2623
     },
2739
     },
2624
     getDate(week_type) {
2740
     getDate(week_type) {
2625
       console.log(week_type);
2741
       console.log(week_type);
2741
       }
2857
       }
2742
     },
2858
     },
2743
     showSmartDialog() {
2859
     showSmartDialog() {
2860
+      this.dataloading = true
2744
       this.editableTabsValue = "1";
2861
       this.editableTabsValue = "1";
2745
       for (let i = 0; i < this.patientList.length; i++) {
2862
       for (let i = 0; i < this.patientList.length; i++) {
2746
         if (this.patientList[i].id == this.cur_info.patient_id) {
2863
         if (this.patientList[i].id == this.cur_info.patient_id) {
2779
           return false;
2896
           return false;
2780
         }
2897
         }
2781
         var schedules = response.data.data.schedules;
2898
         var schedules = response.data.data.schedules;
2899
+        this.dataloading = false
2782
         this.current_all_sch[0].tableWeekArrage = [];
2900
         this.current_all_sch[0].tableWeekArrage = [];
2783
         this.current_all_sch[1].tableWeekArrage = [];
2901
         this.current_all_sch[1].tableWeekArrage = [];
2784
         this.current_all_sch[2].tableWeekArrage = [];
2902
         this.current_all_sch[2].tableWeekArrage = [];
2793
         if (day == 0) {
2911
         if (day == 0) {
2794
           day = 7;
2912
           day = 7;
2795
         }
2913
         }
2796
-        console.log(day);
2797
 
2914
 
2798
         for (let i = 0; i < schedules.length; i++) {
2915
         for (let i = 0; i < schedules.length; i++) {
2916
+
2917
+
2799
           var week_type = this.getWeekType(
2918
           var week_type = this.getWeekType(
2800
               this.getTime(schedules[i].schedule_date, "{y}-{m}-{d}")
2919
               this.getTime(schedules[i].schedule_date, "{y}-{m}-{d}")
2801
           ).toString();
2920
           ).toString();
2826
               }
2945
               }
2827
               obj.is_edit = is_edit;
2946
               obj.is_edit = is_edit;
2828
 
2947
 
2948
+
2829
               for (let b = 0; b < this.weeks.length; b++) {
2949
               for (let b = 0; b < this.weeks.length; b++) {
2830
-                console.log(schedules[i].schedule_week);
2831
-                console.log(this.weeks[b].week_type);
2832
                 if (schedules[i].schedule_week == this.weeks[b].week_type) {
2950
                 if (schedules[i].schedule_week == this.weeks[b].week_type) {
2833
                   if (
2951
                   if (
2834
-                      this.weeks[b].week_type >= day ||
2952
+                      this.weeks[b].week_type >= day &&
2835
                       schedules[i].order.id == 0
2953
                       schedules[i].order.id == 0
2836
                   ) {
2954
                   ) {
2955
+                    console.log( "this.weeks[b].week_type")
2956
+                    console.log( this.weeks[b].week_type )
2837
                     this.weeks[b].is_edit = true;
2957
                     this.weeks[b].is_edit = true;
2838
                   } else {
2958
                   } else {
2839
                     this.weeks[b].is_edit = false;
2959
                     this.weeks[b].is_edit = false;
2840
                   }
2960
                   }
2961
+
2841
                   this.editableTabs[0].checkedWeek.push(this.weeks[b]);
2962
                   this.editableTabs[0].checkedWeek.push(this.weeks[b]);
2842
                 }
2963
                 }
2843
               }
2964
               }
2860
 
2981
 
2861
               for (let b = 0; b < this.weeks.length; b++) {
2982
               for (let b = 0; b < this.weeks.length; b++) {
2862
                 if (schedules[i].schedule_week == this.weeks[b].week_type) {
2983
                 if (schedules[i].schedule_week == this.weeks[b].week_type) {
2863
-                  this.weeks[b].is_edit = true;
2984
+                  // this.weeks[b].is_edit = true;
2864
                   this.editableTabs[1].checkedWeek.push(this.weeks[b]);
2985
                   this.editableTabs[1].checkedWeek.push(this.weeks[b]);
2865
                 }
2986
                 }
2866
               }
2987
               }
2882
               };
3003
               };
2883
               for (let b = 0; b < this.weeks.length; b++) {
3004
               for (let b = 0; b < this.weeks.length; b++) {
2884
                 if (schedules[i].schedule_week == this.weeks[b].week_type) {
3005
                 if (schedules[i].schedule_week == this.weeks[b].week_type) {
2885
-                  this.weeks[b].is_edit = true;
3006
+                  // this.weeks[b].is_edit = true;
2886
                   this.editableTabs[2].checkedWeek.push(this.weeks[b]);
3007
                   this.editableTabs[2].checkedWeek.push(this.weeks[b]);
2887
                 }
3008
                 }
2888
               }
3009
               }
2894
         }
3015
         }
2895
       });
3016
       });
2896
 
3017
 
2897
-      for (let i = 0; i < this.weeks.length; i++) {
3018
+      if(this.editableTabsValue == "1") {
2898
         var tempDate = new Date();
3019
         var tempDate = new Date();
2899
         var day = tempDate.getDay();
3020
         var day = tempDate.getDay();
2900
         if (day == 0) {
3021
         if (day == 0) {
2901
           day = 7;
3022
           day = 7;
2902
         }
3023
         }
2903
-        if (this.weeks[i].week_type >= day) {
2904
-          this.weeks[i].is_edit = true;
2905
-        } else {
2906
-          this.weeks[i].is_edit = false;
3024
+        for (let i = 0; i < this.weeks.length; i++) {
3025
+          if (this.weeks[i].week_type < day) {
3026
+            this.weeks[i].is_edit = false;
3027
+          }
2907
         }
3028
         }
2908
       }
3029
       }
2909
-      console.log("weeks");
2910
-      console.log(this.weeks);
2911
 
3030
 
2912
-      this.smartVisible = true;
2913
 
3031
 
2914
-      var now = new Date();
2915
-      var day = now.getDay();
2916
-      switch (day) {
2917
-        case 0:
2918
-          break;
2919
-        case 1:
2920
-          break;
2921
-        case 2:
2922
-          break;
2923
-        case 3:
2924
-          break;
2925
-        case 4:
2926
-          break;
2927
-        case 5:
2928
-          break;
2929
-        case 6:
2930
-          break;
3032
+      for (let i = 0; i < this.editableTabs.length; i++) {
3033
+        for(let b = 0; b < this.editableTabs[i].tableWeekArrage.length;b++){
3034
+          data[i]["week_type"] = this.getWeekByzhongwen(data[i].week);
3035
+
3036
+
3037
+
3038
+        }
2931
       }
3039
       }
2932
-      // this.current_all_sch = this.editableTabs
3040
+
3041
+      data.sort(function (a, b) {
3042
+        return a.week_type - b.week_type;
3043
+      });
3044
+
3045
+
3046
+
3047
+      this.current_patient_data = data
3048
+      this.smartVisible = true;
2933
       this.current_all_sch = data;
3049
       this.current_all_sch = data;
2934
     },
3050
     },
3051
+
2935
     select_week(val) {
3052
     select_week(val) {
2936
-      // this.current_all_sch = this.editableTabs
2937
-      console.log(this.current_all_sch);
3053
+      // for(this)
3054
+
3055
+
3056
+      this.current_all_sch = this.editableTabs
3057
+      // for(let i = 0; i < this.editableTabs[0].tableWeekArrage.length; i++){
3058
+      //
3059
+      //
3060
+      // }
3061
+
3062
+
3063
+
3064
+
2938
 
3065
 
2939
       var sch = [];
3066
       var sch = [];
2940
       for (let i = 0; i < this.current_all_sch.length; i++) {
3067
       for (let i = 0; i < this.current_all_sch.length; i++) {
2942
           sch = this.current_all_sch[i];
3069
           sch = this.current_all_sch[i];
2943
         }
3070
         }
2944
       }
3071
       }
2945
-      console.log(sch);
2946
 
3072
 
2947
       let data = [];
3073
       let data = [];
2948
 
3074
 
2957
             obj = sch.tableWeekArrage[b];
3083
             obj = sch.tableWeekArrage[b];
2958
           }
3084
           }
2959
         }
3085
         }
2960
-        console.log("日志");
2961
 
3086
 
2962
-        console.log(is_new);
2963
-        console.log(obj);
2964
 
3087
 
2965
         let keyIndex = "";
3088
         let keyIndex = "";
2966
         for (var key in this.partitionsProp) {
3089
         for (var key in this.partitionsProp) {
3023
           this.editableTabs[i].tableWeekArrage = data;
3146
           this.editableTabs[i].tableWeekArrage = data;
3024
         }
3147
         }
3025
       }
3148
       }
3026
-      //
3149
+
3150
+      this.current_all_sch = this.editableTabs
3151
+
3027
     },
3152
     },
3028
     patientClick(row) {
3153
     patientClick(row) {
3029
       console.log(row);
3154
       console.log(row);
3425
             });
3550
             });
3426
           });
3551
           });
3427
         }
3552
         }
3553
+
3428
         this.scheduleZone.sort(this.compare("sort"));
3554
         this.scheduleZone.sort(this.compare("sort"));
3429
       });
3555
       });
3430
     },
3556
     },
4730
       this.$emit("event1", val);
4856
       this.$emit("event1", val);
4731
       this.partition_id = val;
4857
       this.partition_id = val;
4732
       this.getWeekPanels();
4858
       this.getWeekPanels();
4733
-      this.getSchedules();
4859
+      // this.getSchedules();
4734
     },
4860
     },
4735
     changeSchedule_type(val) {
4861
     changeSchedule_type(val) {
4736
       this.$emit("event2", val);
4862
       this.$emit("event2", val);

+ 21 - 9
src/xt_pages/workforce/components/setup_template_dialog.vue 파일 보기

23
         >
23
         >
24
         </el-date-picker>
24
         </el-date-picker>
25
       </el-form-item>
25
       </el-form-item>
26
+
27
+      <el-form-item label="模板生成起始周" v-if="template_mode.original_week">
28
+       <label>{{ template_mode.original_week?'第'+template_mode.original_week+'周':""}}</label>
29
+      </el-form-item>
30
+
26
     </el-form>
31
     </el-form>
27
     <div slot="footer" class="dialog-footer">
32
     <div slot="footer" class="dialog-footer">
28
       <el-button @click="hide">取 消</el-button>
33
       <el-button @click="hide">取 消</el-button>
43
       pickerOptions0: {
48
       pickerOptions0: {
44
         'firstDayOfWeek': 1,
49
         'firstDayOfWeek': 1,
45
         disabledDate(time) {
50
         disabledDate(time) {
46
-          var nowDate = new Date();
47
-          var nowYear = nowDate.getFullYear();
48
-          var nowMonth = nowDate.getMonth() + 1;
49
-          var nowDay = nowDate.getDate()+7;
51
+
52
+          let weekFirstDay = new Date(new Date() - (new Date().getDay() - 1) * 86400000)
53
+          let firstMonth = Number(weekFirstDay.getMonth()) + 1
54
+
55
+          if (firstMonth < 10) {
56
+            firstMonth = '0' + firstMonth
57
+          }
58
+          let weekFirstDays = weekFirstDay.getDate() + 7;
59
+          if (weekFirstDays < 10) {
60
+            weekFirstDays = '0' + weekFirstDays;
61
+          }
62
+
50
           let time_temp =
63
           let time_temp =
51
-              nowYear +
52
-              "-" +
53
-              (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
54
-              "-" +
55
-              (nowDay < 10 ? "0" + nowDay : nowDay);
64
+            weekFirstDay.getFullYear() + '-' + firstMonth + '-' + weekFirstDays
56
 
65
 
57
           time_temp = time_temp.replace(/-/g,'/'); // 将-替换成/,因为下面这个构造函数只支持/分隔的日期字符串
66
           time_temp = time_temp.replace(/-/g,'/'); // 将-替换成/,因为下面这个构造函数只支持/分隔的日期字符串
58
 
67
 
113
     },
122
     },
114
     show() {
123
     show() {
115
       this.clear()
124
       this.clear()
125
+      this.form.week_time = this.template_mode.origin_mode
116
       this.visible = true
126
       this.visible = true
117
     },
127
     },
118
     hide() {
128
     hide() {
162
         var resp = rs.data
172
         var resp = rs.data
163
         if (resp.state == 1) {
173
         if (resp.state == 1) {
164
           this.template_mode.mode = this.form.mode
174
           this.template_mode.mode = this.form.mode
175
+          this.template_mode.original_week = this.form.week_time
176
+
165
           this.hide()
177
           this.hide()
166
           this.$emit('chenge_mode', this.form.mode)
178
           this.$emit('chenge_mode', this.form.mode)
167
         } else {
179
         } else {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1080 - 708
src/xt_pages/workforce/components/template_table.vue


+ 3 - 3
src/xt_pages/workforce/components/template_table_three.vue 파일 보기

1658
 
1658
 
1659
     },
1659
     },
1660
     setEditData(patients,template,device_numbers) {
1660
     setEditData(patients,template,device_numbers) {
1661
+      this.device_numbers = []
1662
+      this.template = []
1661
       this.patientList = patients
1663
       this.patientList = patients
1662
       this.template = template
1664
       this.template = template
1663
       this.all_patients = patients
1665
       this.all_patients = patients
1664
-
1665
       this.cur_info.patient_name = this.patientList[0].name
1666
       this.cur_info.patient_name = this.patientList[0].name
1666
       this.cur_info.mode_name = this.modes[0].name
1667
       this.cur_info.mode_name = this.modes[0].name
1667
       this.cur_info.patient_id = this.patientList[0].id
1668
       this.cur_info.patient_id = this.patientList[0].id
1668
       this.cur_info.mode_id = this.modes[0].id
1669
       this.cur_info.mode_id = this.modes[0].id
1669
       this.$refs.patient_table.setCurrentRow(this.patientList[0])
1670
       this.$refs.patient_table.setCurrentRow(this.patientList[0])
1670
       this.$refs.mode_table.setCurrentRow(this.modes[0])
1671
       this.$refs.mode_table.setCurrentRow(this.modes[0])
1671
-
1672
-
1672
+      this.device_numbers = device_numbers
1673
 
1673
 
1674
     },search_two: function () {
1674
     },search_two: function () {
1675
       if (this.keywords.length == 0) {
1675
       if (this.keywords.length == 0) {

+ 17 - 3
src/xt_pages/workforce/remind_print_setting_one.vue 파일 보기

495
         //   str = zone.join(",")
495
         //   str = zone.join(",")
496
         // }
496
         // }
497
         var now_time = parseInt(this.week_type) * 86400 + this.start_time
497
         var now_time = parseInt(this.week_type) * 86400 + this.start_time
498
+
499
+       let weekOfDay = parseInt(moment().format('E'))
500
+        let next_monday = moment().add((7 - weekOfDay) + 1, 'days').format('YYYY-MM-DD');
501
+        console.log("卡 is h2323233232",this.toStamp(next_monday))
502
+        let next_sunday = moment().add((7 - weekOfDay) + 7, 'days').format('YYYY-MM-DD')
503
+        console.log("下周日",this.toStamp(next_sunday))
504
+
505
+      
506
+
498
         const params = {
507
         const params = {
499
-          start_time: moment().week(moment().week() + 1).startOf('week').unix(),
500
-          end_time: moment().week(moment().week() + 1).endOf('week').unix(),
508
+          start_time: this.toStamp(next_monday),
509
+          end_time: this.toStamp(next_sunday),
501
           week_type: this.week_type,
510
           week_type: this.week_type,
502
           week_time: this.week_time,
511
           week_time: this.week_time,
503
           zone: this.zone,
512
           zone: this.zone,
700
           }
709
           }
701
         }
710
         }
702
         return name
711
         return name
703
-      }
712
+      },
713
+      toStamp(date) {
714
+        const myDate = new Date(date).getTime()/1000 - 28800
715
+        // const stmapEg = Date.parse(myDate) / 1000
716
+       return myDate
717
+      },
704
 
718
 
705
     }
719
     }
706
   }
720
   }

+ 111 - 113
src/xt_pages/workforce/template.vue 파일 보기

118
 <!--          <template-table :editable="false" :device_numbers="device_numbers" :template="this_week_schedules" :is_editing="false"-->
118
 <!--          <template-table :editable="false" :device_numbers="device_numbers" :template="this_week_schedules" :is_editing="false"-->
119
 <!--                          :patients="patients" :data="data"></template-table>-->
119
 <!--                          :patients="patients" :data="data"></template-table>-->
120
 <!--        </el-tab-pane>-->
120
 <!--        </el-tab-pane>-->
121
-        <el-tab-pane name="first" :disabled="template_mode.mode == 0">
122
-          <span slot="label"> 一周模版 {{first_template.week?first_template.week+'周':""}}
123
-          </span>
124
-          <template-table  ref="table"  :is_editing="is_editing" :editable="true" :device_numbers="device_numbers" :template="first_template"
125
-                          :modes="modes"  :patients="patients" @cancel_sch="refresh" :data="data"  :template_mode="template_mode"  @cur_info="cur_info" @saveData="saveData" @event1="changeZone" @saveSuccessTwo="refresh"></template-table>
126
-
121
+        <el-tab-pane name="first" :disabled="template_mode.mode == 0" :label=" first_template.week?'一周模版'+ first_template.week+'周':'一周模版'">
122
+<!--          <span slot="label">-->
123
+<!--          </span>-->
127
 
124
 
128
         </el-tab-pane>
125
         </el-tab-pane>
129
 
126
 
130
-        <el-tab-pane name="second" :disabled="template_mode.mode != 2 && template_mode.mode != 3 && template_mode.mode  != 4">
131
-          <span slot="label">二周模版 {{  second_template.week?second_template.week+'周':""}}
132
-
133
-           </span>
134
-          <template-table-two  ref="table_two"  :is_editing="is_editing" :editable="true" :device_numbers="device_numbers" :template="second_template"
135
-                          :modes="modes"  :patients="patients" @cancel_sch="refresh" :data="data"  :template_mode="template_mode"  @cur_info="cur_info" @saveData="saveData"  @saveSuccessTwo="refresh"></template-table-two>
127
+        <el-tab-pane :label="  second_template.week?'二周模版' + second_template.week+'周':'二周模版'" name="second" :disabled="template_mode.mode != 2 && template_mode.mode != 3 && template_mode.mode  != 4">
128
+<!--          <template-table   ref="table_two"  :is_editing="is_editing" :editable="true" :device_numbers="device_numbers" :template="first_template"-->
129
+<!--                           :modes="modes"  :patients="patients" @cancel_sch="refresh" :data="data"  :template_mode="template_mode"  @cur_info="cur_info" @saveData="saveData" @event1="changeZone" @saveSuccessTwo="refresh"></template-table>-->
136
 
130
 
137
         </el-tab-pane>
131
         </el-tab-pane>
138
 
132
 
139
 
133
 
140
 
134
 
141
-        <el-tab-pane name="third" :disabled="template_mode.mode != 3 && template_mode.mode  != 4">
142
-          <span slot="label">三周模版{{ third_template.week?third_template.week+'周':" "}}
135
+        <el-tab-pane :label="  third_template.week? '三周模版' + third_template.week+'周':'三周模版'" name="third" :disabled="template_mode.mode != 3 && template_mode.mode  != 4">
136
+<!--          <span slot="label">三周模版{{ third_template.week?third_template.week+'周':" "}}-->
143
 <!--             <span v-if="schedule.execute_times%2==0">(下一周)</span>-->
137
 <!--             <span v-if="schedule.execute_times%2==0">(下一周)</span>-->
144
 <!--             <span v-if="schedule.execute_times%2!=0">(本周)</span>-->
138
 <!--             <span v-if="schedule.execute_times%2!=0">(本周)</span>-->
145
 <!--                  <span v-if="schedule.execute_times%4==0">(本周)</span>-->
139
 <!--                  <span v-if="schedule.execute_times%4==0">(本周)</span>-->
146
 <!--             <span v-if="schedule.execute_times%4==1">(下一周)</span>-->
140
 <!--             <span v-if="schedule.execute_times%4==1">(下一周)</span>-->
147
 <!--            <span v-if="schedule.execute_times%4==2">(下二周)</span>-->
141
 <!--            <span v-if="schedule.execute_times%4==2">(下二周)</span>-->
148
 <!--             <span v-if="schedule.execute_times%4==3">(下三周)</span>-->
142
 <!--             <span v-if="schedule.execute_times%4==3">(下三周)</span>-->
149
-           </span>
150
-          <template-table-three   ref="table_three" :editable="true" :device_numbers="device_numbers" :template="third_template" :is_editing="is_editing"
151
-                          :modes="modes"    :patients="patients" :data="data" @cancel_sch="refresh"  :template_mode="template_mode" @cur_info="cur_info" @saveData="saveData"  @saveSuccessTwo="refresh" ></template-table-three>
152
-
143
+<!--           </span>-->
144
+<!--          <template-table  ref="table_three"  :is_editing="is_editing" :editable="true" :device_numbers="device_numbers" :template="first_template"-->
145
+<!--                           :modes="modes"  :patients="patients" @cancel_sch="refresh" :data="data"  :template_mode="template_mode"  @cur_info="cur_info" @saveData="saveData" @event1="changeZone" @saveSuccessTwo="refresh"></template-table>-->
153
         </el-tab-pane>
146
         </el-tab-pane>
154
 
147
 
155
-      <el-tab-pane name="four" :disabled="template_mode.mode  != 4 ">
156
-          <span slot="label"> 四周模版 {{ four_template.week?four_template.week+'周':""}}
148
+      <el-tab-pane :label="four_template.week?'四周模版'+four_template.week+'周':'四周模版'" name="four" :disabled="template_mode.mode  != 4 ">
149
+<!--          <span slot="label"> 四周模版 {{ four_template.week?four_template.week+'周':""}}-->
157
 <!--             <span v-if="schedule.execute_times%2==0">(下一周)</span>-->
150
 <!--             <span v-if="schedule.execute_times%2==0">(下一周)</span>-->
158
 <!--             <span v-if="schedule.execute_times%2!=0">(本周)</span>-->
151
 <!--             <span v-if="schedule.execute_times%2!=0">(本周)</span>-->
159
 <!--            <span v-if="schedule.execute_times%4==0">(本周)</span>-->
152
 <!--            <span v-if="schedule.execute_times%4==0">(本周)</span>-->
160
 <!--             <span v-if="schedule.execute_times%4==1">(下一周)</span>-->
153
 <!--             <span v-if="schedule.execute_times%4==1">(下一周)</span>-->
161
 <!--            <span v-if="schedule.execute_times%4==2">(下二周)</span>-->
154
 <!--            <span v-if="schedule.execute_times%4==2">(下二周)</span>-->
162
 <!--             <span v-if="schedule.execute_times%4==3">(下三周)</span>-->
155
 <!--             <span v-if="schedule.execute_times%4==3">(下三周)</span>-->
163
-           </span>
164
-          <template-table-four   ref="table_four" :editable="true" :device_numbers="device_numbers" :template="four_template" :is_editing="is_editing"
165
-                      :modes="modes"    :patients="patients" :data="data" @cancel_sch="refresh"  :template_mode="template_mode" @saveSuccess="refresh" @cur_info="cur_info" @saveData="saveData"   @saveSuccessTwo="refresh"></template-table-four>
156
+<!--           </span>-->
157
+<!--        <template-table   ref="table_four"  :is_editing="is_editing" :editable="true" :device_numbers="device_numbers" :template="first_template"-->
158
+<!--                         :modes="modes"  :patients="patients" @cancel_sch="refresh" :data="data"  :template_mode="template_mode"  @cur_info="cur_info" @saveData="saveData" @event1="changeZone" @saveSuccessTwo="refresh"></template-table>-->
166
 
159
 
167
         </el-tab-pane>
160
         </el-tab-pane>
168
 
161
 
162
+
163
+<!--        <template-table-two   v-show="activeName =='second'"  ref="table_two"  :is_editing="is_editing" :editable="true" :device_numbers="device_numbers" :template="second_template"-->
164
+<!--                             :modes="modes"  :patients="patients" @cancel_sch="refresh" :data="data"  :template_mode="template_mode"  @cur_info="cur_info" @saveData="saveData"  @saveSuccessTwo="refresh"></template-table-two>-->
165
+<!--        <template-table-three  v-show="activeName =='third'"  ref="table_three" :editable="true" :device_numbers="device_numbers" :template="third_template" :is_editing="is_editing"-->
166
+<!--                                :modes="modes"    :patients="patients" :data="data" @cancel_sch="refresh"  :template_mode="template_mode" @cur_info="cur_info" @saveData="saveData"  @saveSuccessTwo="refresh" ></template-table-three>-->
167
+<!--        <template-table-four  v-show="activeName =='four'" ref="table_four" :editable="true" :device_numbers="device_numbers" :template="four_template" :is_editing="is_editing"-->
168
+<!--                               :modes="modes"    :patients="patients" :data="data" @cancel_sch="refresh"  :template_mode="template_mode" @saveSuccess="refresh" @cur_info="cur_info" @saveData="saveData"   @saveSuccessTwo="refresh"></template-table-four>-->
169
+
170
+
169
       </el-tabs>
171
       </el-tabs>
172
+      <template-table  v-loading="dataloading"  ref="table"  :is_editing="is_editing" :editable="true" :device_numbers="device_numbers" :template="template"
173
+                        :modes="modes"  :patients="patients" @cancel_sch="refresh" :data="data"  :template_mode="template_mode"  @cur_info="cur_info" @saveData="saveData" @event1="changeZone" @saveSuccessTwo="refresh" @setTemplate="setTemplate" @changeLoading="changeLoading"></template-table>
170
 
174
 
171
 
175
 
172
 <!--      <template-table  ref="table" :editable="true" :device_numbers="device_numbers" :template="tar_template" :is_editing="is_editing"-->
176
 <!--      <template-table  ref="table" :editable="true" :device_numbers="device_numbers" :template="tar_template" :is_editing="is_editing"-->
178
 
182
 
179
 
183
 
180
 
184
 
181
-      <set-up-template-dialog ref="setup_dialog" :template_mode="template_mode" :origin_mode="origin_mode"
182
-                              @chenge_mode="didChangeTemplateMode"></set-up-template-dialog>
183
     </div>
185
     </div>
184
 
186
 
187
+    <set-up-template-dialog ref="setup_dialog" :template_mode="template_mode" :origin_mode="origin_mode"
188
+                            @chenge_mode="didChangeTemplateMode"></set-up-template-dialog>
185
     <el-dialog title="同步排班" width="600px" :visible.sync="newVisible">
189
     <el-dialog title="同步排班" width="600px" :visible.sync="newVisible">
186
       <el-form :model="form" ref="form" label-width="90px" :rules="rules">
190
       <el-form :model="form" ref="form" label-width="90px" :rules="rules">
187
         <el-form-item label="同步模板:" v-if="template_mode.mode == 1">
191
         <el-form-item label="同步模板:" v-if="template_mode.mode == 1">
260
   },
264
   },
261
   data: function () {
265
   data: function () {
262
     return {
266
     return {
267
+      dataloading:true,
263
       is_editing:true,
268
       is_editing:true,
264
       editable:false,
269
       editable:false,
265
       data:[],
270
       data:[],
326
       newVisible: false,
331
       newVisible: false,
327
       weekList: [],
332
       weekList: [],
328
       currentFirstDate1: '',
333
       currentFirstDate1: '',
329
-      rules: {
330
-        copyWeek: [{required: true, message: "请选择复制时间段", trigger: "blur"}],
331
-      },
332
       weekNum: '',
334
       weekNum: '',
333
       weekDayArr: [],
335
       weekDayArr: [],
334
       todayDate: '',
336
       todayDate: '',
425
 
427
 
426
         }
428
         }
427
 
429
 
428
-
429
-
430
         var patients = resp.data.patients
430
         var patients = resp.data.patients
431
-        // var schedules = resp.data.schedules
432
-
433
         this.template_mode = mode
431
         this.template_mode = mode
434
         this.origin_mode = mode.mode
432
         this.origin_mode = mode.mode
435
         this.device_numbers = device_numbers
433
         this.device_numbers = device_numbers
436
         this.patients = patients
434
         this.patients = patients
437
-
438
-
439
-
440
-        this.$refs.table.setEditData(this.patients,this.first_template,this.device_numbers)
441
-        this.$refs.table_two.setEditData(this.patients,this.second_template,this.device_numbers)
442
-        this.$refs.table_three.setEditData(this.patients,this.third_template,this.device_numbers)
443
-        this.$refs.table_four.setEditData(this.patients,this.four_template,this.device_numbers)
444
-
435
+        this.tar_template = this.first_template
436
+        this.$refs.table.setEditData(this.patients,this.first_template,this.device_numbers,this.templates,  this.activeName)
445
 
437
 
446
         var fakeTemplateItems = []
438
         var fakeTemplateItems = []
447
-        // for (let index = 0; index < schedules.length; index++) {
448
-        //   const schedule = schedules[index]
449
-        //   var item = {}
450
-        //   this.$set(item, 'id', schedule.id)
451
-        //   this.$set(item, 'template_id', 0)
452
-        //   this.$set(item, 'device_number_id', schedule.bed_id)
453
-        //   this.$set(item, 'treat_mode', schedule.mode_id)
454
-        //   this.$set(item, 'weekday', schedule.schedule_week)
455
-        //   this.$set(item, 'time_type', schedule.schedule_type)
456
-        //   var patient = {}
457
-        //   this.$set(patient, 'id', schedule.patient_id)
458
-        //   this.$set(patient, 'name', schedule.patient)
459
-        //   this.$set(item, 'patient', patient)
460
-        //
461
-        //   fakeTemplateItems.push(item)
462
-        // }
439
+
463
         this.this_week_schedules.items = fakeTemplateItems
440
         this.this_week_schedules.items = fakeTemplateItems
464
 
441
 
465
       } else {
442
       } else {
470
 
447
 
471
   },
448
   },
472
   methods: {
449
   methods: {
450
+    changeLoading(){
451
+      this.dataloading = false
452
+    },
453
+    setTemplate(items){
454
+      if(this.template_mode.mode == 1){
455
+        this.first_template = items[0]
456
+      }else   if(this.template_mode.mode == 2){
457
+        this.first_template = items[0]
458
+        this.second_template = items[1]
459
+      }else   if(this.template_mode.mode == 3){
460
+        this.first_template = items[0]
461
+        this.second_template = items[1]
462
+        this.third_template = items[2]
463
+      }else   if(this.template_mode.mode == 4){
464
+        this.first_template = items[0]
465
+        this.second_template = items[1]
466
+        this.third_template = items[2]
467
+        this.four_template = items[3]
468
+      }
469
+    },
473
     handleClick(val){
470
     handleClick(val){
471
+      this.dataloading = true
474
       if(this.activeName == "first"){
472
       if(this.activeName == "first"){
475
         this.activeName = "first"
473
         this.activeName = "first"
476
-        this.$refs.table.setEditData(this.patients,this.first_template,this.device_numbers)
474
+        // this.tar_template = this.first_template
475
+
476
+        this.$refs.table.setEditData(this.patients,this.first_template,this.device_numbers,this.templates,  this.activeName)
477
       }else if(this.activeName == "second"){
477
       }else if(this.activeName == "second"){
478
         this.activeName = "second"
478
         this.activeName = "second"
479
-        this.$refs.table_two.setEditData(this.patients,this.second_template,this.device_numbers)
479
+        // this.tar_template = this.second_template
480
+
481
+        this.$refs.table.setEditData(this.patients,this.second_template,this.device_numbers,this.templates,  this.activeName)
480
       }else if(this.activeName == "third"){
482
       }else if(this.activeName == "third"){
481
         this.activeName = "third"
483
         this.activeName = "third"
482
-        this.$refs.table_three.setEditData(this.patients,this.third_template,this.device_numbers)
484
+        // this.tar_template = this.third_template
485
+
486
+        this.$refs.table.setEditData(this.patients,this.third_template,this.device_numbers,this.templates,  this.activeName)
483
       }else {
487
       }else {
484
         this.activeName = "four"
488
         this.activeName = "four"
485
-        this.$refs.table_four.setEditData(this.patients, this.four_template,this.device_numbers)
489
+        // this.tar_template = this.four_template
490
+
491
+        this.$refs.table.setEditData(this.patients, this.four_template,this.device_numbers,this.templates,  this.activeName)
486
       }
492
       }
487
 
493
 
488
     },
494
     },
558
           var mode = resp.data.template_mode
564
           var mode = resp.data.template_mode
559
           var device_numbers = resp.data.device_numbers
565
           var device_numbers = resp.data.device_numbers
560
           var templates = resp.data.templates
566
           var templates = resp.data.templates
561
-
567
+          this.templates = templates
562
           if(templates.length > 0){
568
           if(templates.length > 0){
563
             this.firstWeekData = templates[0].items
569
             this.firstWeekData = templates[0].items
564
             this.first_template = templates[0]
570
             this.first_template = templates[0]
1456
       if (!is_system_zone || !is_device_number) {
1462
       if (!is_system_zone || !is_device_number) {
1457
         console.log("123123123123")
1463
         console.log("123123123123")
1458
         this.dialogVisible = true
1464
         this.dialogVisible = true
1459
-        return
1465
+
1460
       } else {
1466
       } else {
1461
 
1467
 
1462
 
1468
 
1463
         if (is_exist_repeat) {
1469
         if (is_exist_repeat) {
1464
           this.isExistRepeatVisible = true
1470
           this.isExistRepeatVisible = true
1465
-          return
1471
+
1466
         } else {
1472
         } else {
1467
 
1473
 
1468
           this.$alert('您提交的排班信息已上传成功,系统正在执行导入,请稍候点击当前页面右上角“下载日志”查看导入结果', '上传成功', {
1474
           this.$alert('您提交的排班信息已上传成功,系统正在执行导入,请稍候点击当前页面右上角“下载日志”查看导入结果', '上传成功', {
1475
           let params = {
1481
           let params = {
1476
             schedule: datas
1482
             schedule: datas
1477
           }
1483
           }
1478
-          console.log("datas")
1479
-          console.log(datas)
1484
+
1480
           //今天的时间
1485
           //今天的时间
1481
           var day2 = new Date()
1486
           var day2 = new Date()
1482
           day2.setTime(day2.getTime())
1487
           day2.setTime(day2.getTime())
1487
             if (response.data.state == 0) {
1492
             if (response.data.state == 0) {
1488
               return false
1493
               return false
1489
             }
1494
             }
1490
-            this.getWeekPanels("")
1495
+            this.$message.success("导入成功")
1496
+            // this.getWeekPanels("")
1491
             this.getInitData()
1497
             this.getInitData()
1492
 
1498
 
1493
           })
1499
           })
1516
 
1522
 
1517
           this.first_template = templates[0]
1523
           this.first_template = templates[0]
1518
           this.second_template = templates[1]
1524
           this.second_template = templates[1]
1519
-
1525
+          this.templates = templates
1520
           this.third_template = templates[2]
1526
           this.third_template = templates[2]
1521
           this.four_template = templates[3]
1527
           this.four_template = templates[3]
1528
+          if(this.activeName == "first"){
1529
+            this.$refs.table.setEditData(this.patients,this.first_template,this.device_numbers,this.templates,  this.activeName)
1530
+
1531
+
1532
+          }else if(this.activeName == "second"){
1533
+
1534
+            this.$refs.table.setEditData(this.patients,this.second_template,this.device_numbers,this.templates,  this.activeName)
1535
+
1536
+
1537
+          }else if(this.activeName == "third"){
1538
+
1539
+            this.$refs.table.setEditData(this.patients,this.third_template,this.device_numbers,this.templates,  this.activeName)
1540
+
1541
+
1542
+          }else if(this.activeName == "four"){
1543
+
1544
+            this.$refs.table.setEditData(this.patients,this.four_template,this.device_numbers,this.templates,  this.activeName)
1545
+
1546
+
1547
+          }
1548
+
1522
 
1549
 
1523
           // var fakeTemplateItems = []
1550
           // var fakeTemplateItems = []
1524
           // for (let index = 0; index < schedules.length; index++) {
1551
           // for (let index = 0; index < schedules.length; index++) {
3130
 
3157
 
3131
 
3158
 
3132
 
3159
 
3133
-          this.$refs.table.setEditData(this.patients,this.first_template,this.device_numbers)
3134
-          this.$refs.table_two.setEditData(this.patients,this.second_template,this.device_numbers)
3135
-          this.$refs.table_three.setEditData(this.patients,this.third_template,this.device_numbers)
3136
-          this.$refs.table_four.setEditData(this.patients,this.four_template,this.device_numbers)
3160
+          this.$refs.table.setEditData(this.patients,this.first_template,this.device_numbers,this.templates,this.activeName)
3161
+          // this.$refs.table_two.setEditData(this.patients,this.second_template,this.device_numbers)
3162
+          // this.$refs.table_three.setEditData(this.patients,this.third_template,this.device_numbers)
3163
+          // this.$refs.table_four.setEditData(this.patients,this.four_template,this.device_numbers)
3137
 
3164
 
3138
 
3165
 
3139
           var fakeTemplateItems = []
3166
           var fakeTemplateItems = []
3163
 
3190
 
3164
     },saveData(val){
3191
     },saveData(val){
3165
       var tempDataOne = []
3192
       var tempDataOne = []
3166
-      var tempDataTwo = []
3167
-      var tempDataThree = []
3168
-      var tempDataFour = []
3193
+      // var tempDataTwo = []
3194
+      // var tempDataThree = []
3195
+      // var tempDataFour = []
3169
       for(let i = 0; i < val.length; i++){
3196
       for(let i = 0; i < val.length; i++){
3170
-        if(val[i].t_id == this.first_template.id){
3171
           tempDataOne.push(val[i])
3197
           tempDataOne.push(val[i])
3172
-        }
3173
-        if(val[i].t_id == this.second_template.id){
3174
-          tempDataTwo.push(val[i])
3175
-        }
3176
-        if(val[i].t_id == this.third_template.id){
3177
-          tempDataThree.push(val[i])
3178
-        }
3179
-        if(val[i].t_id == this.four_template.id){
3180
-          tempDataFour.push(val[i])
3181
-        }
3182
       }
3198
       }
3183
 
3199
 
3184
       if(tempDataOne.length > 0){
3200
       if(tempDataOne.length > 0){
3185
         this.$refs.table.SetSmartSch(tempDataOne)
3201
         this.$refs.table.SetSmartSch(tempDataOne)
3186
       }
3202
       }
3187
-      if(tempDataTwo.length > 0){
3188
-         this.$refs.table_two.SetSmartSch(tempDataTwo)
3189
-      }
3190
-      if(tempDataThree.length > 0){
3191
-         this.$refs.table_three.SetSmartSch(tempDataThree)
3192
-      }
3193
-      if(tempDataFour.length > 0){
3194
-        this.$refs.table_four.SetSmartSch(tempDataFour)
3195
-      }
3196
-
3197
-
3198
-
3199
-
3200
-
3201
 
3203
 
3202
 
3204
 
3203
       // this.first_template.items.push({device_number_id:652,id:0,patient_id:7007,template_id:421,time_type:2,treat_mode:2,weekday:4})
3205
       // this.first_template.items.push({device_number_id:652,id:0,patient_id:7007,template_id:421,time_type:2,treat_mode:2,weekday:4})
3385
           this.$refs.table.showSmartDialog()
3387
           this.$refs.table.showSmartDialog()
3386
         }else if(this.activeName == "second"){
3388
         }else if(this.activeName == "second"){
3387
           this.activeName = "second"
3389
           this.activeName = "second"
3388
-          this.$refs.table_two.showSmartDialog()
3390
+          this.$refs.table.showSmartDialog()
3389
         }else if(this.activeName == "third"){
3391
         }else if(this.activeName == "third"){
3390
           this.activeName = "third"
3392
           this.activeName = "third"
3391
-          this.$refs.table_three.showSmartDialog()
3393
+          this.$refs.table.showSmartDialog()
3392
         }else {
3394
         }else {
3393
           this.activeName = "four"
3395
           this.activeName = "four"
3394
-          this.$refs.table_four.showSmartDialog()
3396
+          this.$refs.table.showSmartDialog()
3395
         }
3397
         }
3396
       })
3398
       })
3397
 
3399
 
3398
     },saveClick:function (){
3400
     },saveClick:function (){
3399
       if(this.template_mode.mode == 0){
3401
       if(this.template_mode.mode == 0){
3400
-        this.$router.go(-1)
3402
+        // this.$router.go(-1)
3403
+        this.$router.back()
3404
+
3401
       }else{
3405
       }else{
3402
         this.$message.success("保存成功")
3406
         this.$message.success("保存成功")
3403
-
3404
-        // this.$refs.table.saveAction()
3405
-        // this.$refs.table_two.saveAction()
3406
-        // this.$refs.table_three.saveAction()
3407
-        // this.$refs.table_four.saveAction()
3408
-        // this.$router.go(-1)
3409
         this.$router.back()
3407
         this.$router.back()
3410
 
3408
 
3411
       }
3409
       }
3491
 
3489
 
3492
 
3490
 
3493
 
3491
 
3494
-            this.$refs.table.setEditData(this.patients,this.first_template,this.device_numbers)
3495
-            this.$refs.table_two.setEditData(this.patients,this.second_template,this.device_numbers)
3496
-            this.$refs.table_three.setEditData(this.patients,this.third_template,this.device_numbers)
3497
-            this.$refs.table_four.setEditData(this.patients,this.four_template,this.device_numbers)
3492
+            this.$refs.table.setEditData(this.patients,this.first_template,this.device_numbers,this.templates,  this.activeName)
3493
+            // this.$refs.table_two.setEditData(this.patients,this.second_template,this.device_numbers)
3494
+            // this.$refs.table_three.setEditData(this.patients,this.third_template,this.device_numbers)
3495
+            // this.$refs.table_four.setEditData(this.patients,this.four_template,this.device_numbers)
3498
 
3496
 
3499
 
3497
 
3500
             var fakeTemplateItems = []
3498
             var fakeTemplateItems = []