Browse Source

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

28169 1 year ago
parent
commit
638dce5f9d

File diff suppressed because it is too large
+ 307 - 1333
package-lock.json


+ 9 - 0
src/api/his/his_export.js View File

7
     params: params
7
     params: params
8
   })
8
   })
9
 }
9
 }
10
+
11
+export function handleData10318(params) {
12
+  return request({
13
+    url: '/handleData10318',
14
+    method: 'get',
15
+    params: params
16
+  })
17
+}
18
+

+ 9 - 0
src/api/schedule.js View File

269
     params: params
269
     params: params
270
   })
270
   })
271
 }
271
 }
272
+
273
+
274
+export function CancelScheduleTwo(id) {
275
+  return request({
276
+    url: '/api/schedule/delete_two?id=' + id,
277
+    method: 'Delete'
278
+  })
279
+}
280
+

+ 16 - 0
src/api/schedule_template/sch_template.js View File

166
   })
166
   })
167
 }
167
 }
168
 
168
 
169
+export function CoverSch(params) {
170
+  return request({
171
+    url: '/api/sch/coversch',
172
+    method: 'get',
173
+    params: params,
174
+  })
175
+}
176
+
177
+export function ExchangeSch(params) {
178
+  return request({
179
+    url: '/api/sch/exchange',
180
+    method: 'get',
181
+    params: params,
182
+  })
183
+}
184
+
169
 
185
 
170
 
186
 

+ 5 - 1
src/xt_pages/hospitalStation/invoicePrint.vue View File

28
           :paramsObj="invoiceParams"
28
           :paramsObj="invoiceParams"
29
         ></printTwo>
29
         ></printTwo>
30
         <printThree
30
         <printThree
31
-          v-if="org_id == 10265 || org_id == 4 || org_id == 9675 || org_id == 0"
31
+          v-if="org_id == 10265 || org_id == 4 || org_id == 9675 "
32
           :paramsObj="invoiceParams"
32
           :paramsObj="invoiceParams"
33
         ></printThree>
33
         ></printThree>
34
+<!--        <print-night v-if="org_id == 10210 || org_id == 0"-->
35
+<!--                  :paramsObj="invoiceParams"></print-night>-->
34
       </div>
36
       </div>
35
     </div>
37
     </div>
36
   </div>
38
   </div>
40
 import printOne from "./invoiceTemplate/printOne";
42
 import printOne from "./invoiceTemplate/printOne";
41
 import printTwo from "./invoiceTemplate/printTwo";
43
 import printTwo from "./invoiceTemplate/printTwo";
42
 import printThree from "./invoiceTemplate/printThree";
44
 import printThree from "./invoiceTemplate/printThree";
45
+// import PrintNight from "./invoiceTemplate/printNight";
43
 export default {
46
 export default {
44
   name: "invoicePrint",
47
   name: "invoicePrint",
45
   components: {
48
   components: {
49
+    PrintNight,
46
     printOne,
50
     printOne,
47
     printTwo,
51
     printTwo,
48
     printThree,
52
     printThree,

+ 1 - 1
src/xt_pages/outpatientDoctorStation/print.vue View File

18
 9675:测试
18
 9675:测试
19
  -->
19
  -->
20
     <div class="dialysisPage" style="padding-top: 40px">
20
     <div class="dialysisPage" style="padding-top: 40px">
21
-      <div v-if="org_id != 10138 && org_id != 10278 && org_id != 10243 && org_id != 0">
21
+      <div v-if="org_id != 10138 && org_id != 10278 && org_id != 10243">
22
 
22
 
23
         <printOne v-if="org_id != 10088 && org_id != 10215" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
23
         <printOne v-if="org_id != 10088 && org_id != 10215" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
24
 
24
 

+ 2 - 2
src/xt_pages/workforce/appointment.vue View File

3038
     }
3038
     }
3039
     let newNum = 0
3039
     let newNum = 0
3040
     for (let i = 0; i < this.weekList.length; i++) {
3040
     for (let i = 0; i < this.weekList.length; i++) {
3041
-      if (this.weekNum + i +2 <= 53) {
3042
-        let num = this.weekNum + i +1
3041
+      if (this.weekNum + i + 2 <= 53) {
3042
+        let num = this.weekNum + i + 2
3043
         let str = this.weekList[i][0] + '~' + this.weekList[i][6] + '(' + num + ')'
3043
         let str = this.weekList[i][0] + '~' + this.weekList[i][6] + '(' + num + ')'
3044
         this.typeOptions.push({value: i, label: str})
3044
         this.typeOptions.push({value: i, label: str})
3045
         let stt = this.weekList[i][0] + "~" + this.weekList[i][6]
3045
         let stt = this.weekList[i][0] + "~" + this.weekList[i][6]

+ 0 - 9
src/xt_pages/workforce/components/ScheduleItem.vue View File

1
 <template>
1
 <template>
2
     <div >
2
     <div >
3
-        <el-tooltip placement="right" :disabled="scheduleDetail.patient.length>0?false:true" >
4
-            <div slot="content">
5
-                {{scheduleDetail.patient}}
6
-                <br/>
7
-                <span v-if="scheduleDetail.mode_name.length>0">({{scheduleDetail.mode_name}})</span>
8
-              <span >{{scheduleDetail.dialysis_machine_name}}</span>
9
-
10
-            </div>
11
             <div>
3
             <div>
12
                 <span :class='modeColor(scheduleDetail.mode_name)'>{{scheduleDetail.patient}}</span><br/>
4
                 <span :class='modeColor(scheduleDetail.mode_name)'>{{scheduleDetail.patient}}</span><br/>
13
                 <span v-if="scheduleDetail.mode_name.length>0" :class='modeColor(scheduleDetail.mode_name)'>({{scheduleDetail.mode_name}})</span>
5
                 <span v-if="scheduleDetail.mode_name.length>0" :class='modeColor(scheduleDetail.mode_name)'>({{scheduleDetail.mode_name}})</span>
14
               <span >{{scheduleDetail.dialysis_machine_name}}</span>
6
               <span >{{scheduleDetail.dialysis_machine_name}}</span>
15
 
7
 
16
             </div>
8
             </div>
17
-        </el-tooltip>
18
     </div>
9
     </div>
19
 </template>
10
 </template>
20
 
11
 

File diff suppressed because it is too large
+ 467 - 190
src/xt_pages/workforce/components/editTableData.vue


+ 127 - 64
src/xt_pages/workforce/components/tableData.vue View File

102
         </el-table-column>
102
         </el-table-column>
103
         <el-table-column label="班次" width="80">
103
         <el-table-column label="班次" width="80">
104
           <template slot-scope="scope">
104
           <template slot-scope="scope">
105
-            {{ getSchedulesType(scope.row.schedule_type) }}
105
+            {{ getSchedulesType(scope.row.schedule_type,scope.row) }}
106
           </template>
106
           </template>
107
         </el-table-column>
107
         </el-table-column>
108
         <el-table-column label="机号" width="80">
108
         <el-table-column label="机号" width="80">
196
       <el-table-column
196
       <el-table-column
197
         prop="area"
197
         prop="area"
198
         label="分区"
198
         label="分区"
199
-        width="80"
199
+        width="50"
200
         align="center"
200
         align="center"
201
         fixed
201
         fixed
202
       ></el-table-column>
202
       ></el-table-column>
203
       <el-table-column
203
       <el-table-column
204
         prop="cut"
204
         prop="cut"
205
         label="机号"
205
         label="机号"
206
-        width="80"
206
+        width="100"
207
         align="center"
207
         align="center"
208
         fixed
208
         fixed
209
       ></el-table-column>
209
       ></el-table-column>
651
               @change="changePartition"
651
               @change="changePartition"
652
             >
652
             >
653
               <el-option
653
               <el-option
654
-                v-for="(item, index) in zone_names"
654
+                v-for="(item, index) in zones"
655
                 :key="index"
655
                 :key="index"
656
-                :label="item"
657
-                :value="item"
656
+                :label="item.name"
657
+                :value="item.id"
658
               >
658
               >
659
               </el-option>
659
               </el-option>
660
             </el-select>
660
             </el-select>
704
   getWeekPanelsOne,
704
   getWeekPanelsOne,
705
   getAllZones,
705
   getAllZones,
706
 } from "@/api/schedule";
706
 } from "@/api/schedule";
707
+import {
708
+  getSmartDevices
709
+} from "@/api/schedule_template/sch_template";
710
+
707
 import ScheduleItem from "./ScheduleItem";
711
 import ScheduleItem from "./ScheduleItem";
708
 const weekOptions = ['周一','周二','周三','周四','周五','周六','周日'];
712
 const weekOptions = ['周一','周二','周三','周四','周五','周六','周日'];
709
 let rowNumber = 0;
713
 let rowNumber = 0;
1841
       this.currentData.partition_type = row.zone_type;
1845
       this.currentData.partition_type = row.zone_type;
1842
 
1846
 
1843
 
1847
 
1848
+
1844
       if (row[column.property].schedule_id > 0) {
1849
       if (row[column.property].schedule_id > 0) {
1845
         this.currentData.mode_id = row[column.property].mode_id;
1850
         this.currentData.mode_id = row[column.property].mode_id;
1846
         this.currentData.id = row[column.property].schedule_id;
1851
         this.currentData.id = row[column.property].schedule_id;
1879
               ].zone_id;
1884
               ].zone_id;
1880
             }
1885
             }
1881
           }
1886
           }
1882
-
1887
+          this.changeSchedule.partition_id = this.zone_name
1883
           this.changeSchedule.change_action = "change_device";
1888
           this.changeSchedule.change_action = "change_device";
1884
           this.changeScheduleActon(formName);
1889
           this.changeScheduleActon(formName);
1885
 
1890
 
2026
     },
2031
     },
2027
 
2032
 
2028
     changePartition(value) {
2033
     changePartition(value) {
2029
-      this.current_devices = this.zone_device_map[value];
2030
-      this.device_id = this.current_devices[0].id;
2034
+      let params = {
2035
+        zone_id:  value,
2036
+        sch_type: this.currentData.schedule_type,
2037
+        schedule_date:  this.currentData.schedule_date,
2038
+        patient_id: this.currentData.patient_id,
2039
+      };
2040
+      //进行网络请求,获取空排班机位
2041
+      getSmartDevices(params).then((response) => {
2042
+        if (response.data.state == 0) {
2043
+          return false;
2044
+        } else {
2045
+          var devices = response.data.data.devices;
2046
+          this.current_devices = [];
2047
+          this.current_devices = devices;
2048
+          this.device_id = devices[0].id
2049
+        }
2050
+      });
2031
     },
2051
     },
2032
     changeScheduleType(schedule_type) {
2052
     changeScheduleType(schedule_type) {
2033
-      const params = {
2034
-        type: schedule_type,
2035
-        date: this.currentData.schedule_date
2053
+      this.currentData.schedule_type = schedule_type
2054
+      let params = {
2055
+        zone_id:  this.currentData.partition_id,
2056
+        sch_type: schedule_type,
2057
+        schedule_date:  this.currentData.schedule_date,
2058
+        patient_id: this.currentData.patient_id,
2036
       };
2059
       };
2037
-      getUrgentScheduleInitData(params)
2038
-        .then(rs => {
2039
-          if (rs.data.state == 1) {
2040
-            this.origin_schedules = rs.data.data.schedules;
2041
-            this.origin_device_numbers = rs.data.data.device_numbers;
2042
-
2043
-            var zone_device_map = {};
2044
-            for (
2045
-              let index = 0;
2046
-              index < this.origin_device_numbers.length;
2047
-              index++
2048
-            ) {
2049
-              const device_number = this.origin_device_numbers[index];
2050
-              if (
2051
-                zone_device_map[device_number.zone_name] == null ||
2052
-                zone_device_map[device_number.zone_name] == undefined
2053
-              ) {
2054
-                zone_device_map[device_number.zone_name] = [];
2055
-              }
2056
-              zone_device_map[device_number.zone_name].push(device_number);
2057
-            }
2058
-            this.zone_device_map = zone_device_map;
2059
-
2060
-            this.zone_names = Object.keys(this.zone_device_map);
2061
-            // console.log('8989898989898989',this.zone_names)
2062
-
2063
-            // console.log(this.current_devices);
2064
-
2065
-            if (this.zone_names.length > 0) {
2066
-              this.zone_name = this.zone_names[0];
2067
-              this.current_devices = this.zone_device_map[this.zone_name];
2068
-              this.device_id = this.current_devices[0].id;
2069
-            }
2070
-
2071
-
2072
-            this.zone_device_options = [
2073
-              { values: this.zone_names },
2074
-              // { values: this.getDeviceNumberNames(this.current_devices) },
2075
-              { values: this.current_devices }
2076
-            ];
2077
-
2078
-          } else {
2079
-          }
2080
-        })
2081
-        .catch(err => {
2082
-          this.loading = false;
2083
-        });
2060
+      //进行网络请求,获取空排班机位
2061
+      getSmartDevices(params).then((response) => {
2062
+        if (response.data.state == 0) {
2063
+          return false;
2064
+        } else {
2065
+          var devices = response.data.data.devices;
2066
+          this.current_devices = [];
2067
+          this.current_devices = devices;
2068
+          this.device_id = ""
2069
+        }
2070
+      });
2071
+      // const params = {
2072
+      //   type: schedule_type,
2073
+      //   date: this.currentData.schedule_date
2074
+      // };
2075
+      // getUrgentScheduleInitData(params)
2076
+      //   .then(rs => {
2077
+      //     if (rs.data.state == 1) {
2078
+      //       this.origin_schedules = rs.data.data.schedules;
2079
+      //       this.origin_device_numbers = rs.data.data.device_numbers;
2080
+      //
2081
+      //       var zone_device_map = {};
2082
+      //       for (
2083
+      //         let index = 0;
2084
+      //         index < this.origin_device_numbers.length;
2085
+      //         index++
2086
+      //       ) {
2087
+      //         const device_number = this.origin_device_numbers[index];
2088
+      //         if (
2089
+      //           zone_device_map[device_number.zone_name] == null ||
2090
+      //           zone_device_map[device_number.zone_name] == undefined
2091
+      //         ) {
2092
+      //           zone_device_map[device_number.zone_name] = [];
2093
+      //         }
2094
+      //         zone_device_map[device_number.zone_name].push(device_number);
2095
+      //       }
2096
+      //       this.zone_device_map = zone_device_map;
2097
+      //
2098
+      //       this.zone_names = Object.keys(this.zone_device_map);
2099
+      //       // console.log('8989898989898989',this.zone_names)
2100
+      //
2101
+      //       // console.log(this.current_devices);
2102
+      //
2103
+      //       if (this.zone_names.length > 0) {
2104
+      //         this.zone_name = this.zone_names[0];
2105
+      //         this.current_devices = this.zone_device_map[this.zone_name];
2106
+      //         this.device_id = this.current_devices[0].id;
2107
+      //       }
2108
+      //
2109
+      //
2110
+      //       this.zone_device_options = [
2111
+      //         { values: this.zone_names },
2112
+      //         // { values: this.getDeviceNumberNames(this.current_devices) },
2113
+      //         { values: this.current_devices }
2114
+      //       ];
2115
+      //
2116
+      //     } else {
2117
+      //     }
2118
+      //   })
2119
+      //   .catch(err => {
2120
+      //     this.loading = false;
2121
+      //   });
2084
     },
2122
     },
2085
     submitTiaoX() {
2123
     submitTiaoX() {
2086
       // if (this.tiaoZhengType==1) {
2124
       // if (this.tiaoZhengType==1) {
2455
       this.currentData.contagions = row.patient_contagions;
2493
       this.currentData.contagions = row.patient_contagions;
2456
 
2494
 
2457
       this.currentData.id = row.id;
2495
       this.currentData.id = row.id;
2496
+      this.currentData.schedule_date = uParseTime(
2497
+        row.schedule_date,
2498
+        "{y}-{m}-{d}"
2499
+      );
2500
+
2501
+
2502
+      this.zone_name = row.partition_id;
2503
+      this.device_id = row.bed_id;
2504
+      // this.current_devices = this.partitions[row.partition_id].jihaos
2505
+
2506
+      let params = {
2507
+        zone_id:  row.partition_id,
2508
+        sch_type: row.schedule_type,
2509
+        schedule_date:  this.currentData.schedule_date,
2510
+        patient_id: this.currentData.patient_id,
2511
+      };
2512
+      //进行网络请求,获取空排班机位
2513
+      getSmartDevices(params).then((response) => {
2514
+        if (response.data.state == 0) {
2515
+          return false;
2516
+        } else {
2517
+          var devices = response.data.data.devices;
2518
+          this.current_devices = [];
2519
+          this.current_devices = devices;
2520
+          this.device_id = devices[0].id
2521
+        }
2522
+      });
2523
+
2458
       this.changeSchedule = {
2524
       this.changeSchedule = {
2459
         mode_id: row.mode_id,
2525
         mode_id: row.mode_id,
2460
         schedule_type: row.schedule_type,
2526
         schedule_type: row.schedule_type,
2463
         schedule_week: row.schedule_week,
2529
         schedule_week: row.schedule_week,
2464
         partition_type: ""
2530
         partition_type: ""
2465
       };
2531
       };
2466
-      this.currentData.schedule_date = uParseTime(
2467
-        row.schedule_date,
2468
-        "{y}-{m}-{d}"
2469
-      );
2470
 
2532
 
2471
       if (typeof this.partitions[row.partition_id].jihaos !== "undefined") {
2533
       if (typeof this.partitions[row.partition_id].jihaos !== "undefined") {
2472
         this.jihaos = this.partitions[row.partition_id].jihaos;
2534
         this.jihaos = this.partitions[row.partition_id].jihaos;
2508
 
2570
 
2509
       return week + "(" + uParseTime(row.schedule_date, "{y}-{m}-{d}") + ")";
2571
       return week + "(" + uParseTime(row.schedule_date, "{y}-{m}-{d}") + ")";
2510
     },
2572
     },
2511
-    getSchedulesType: function(type) {
2573
+    getSchedulesType: function(type,row) {
2512
       let type_name = "";
2574
       let type_name = "";
2513
       switch (type) {
2575
       switch (type) {
2514
         case 1:
2576
         case 1:
2522
           type_name = "晚上";
2584
           type_name = "晚上";
2523
           break;
2585
           break;
2524
       }
2586
       }
2587
+
2525
       return type_name;
2588
       return type_name;
2526
     },
2589
     },
2527
     changeMode: function(index, row) {
2590
     changeMode: function(index, row) {

+ 58 - 14
src/xt_pages/workforce/components/template_table.vue View File

923
   getTemplateScheduleSearchResult,
923
   getTemplateScheduleSearchResult,
924
   updateSchedules,
924
   updateSchedules,
925
   updateEditSchedules,
925
   updateEditSchedules,
926
-  getTemplateSmartDevices
926
+  getTemplateSmartDevices,
927
+  getSmartDevices
927
 } from "@/api/schedule_template/sch_template";
928
 } from "@/api/schedule_template/sch_template";
929
+
928
 import TemplateTableItem from "./template_table_item";
930
 import TemplateTableItem from "./template_table_item";
929
 import ScheduleSelectorDialog from "./template_schedule_selector_dialog";
931
 import ScheduleSelectorDialog from "./template_schedule_selector_dialog";
930
 import { PostSearchSmartSchTemplatePatient } from "../../../api/schedule_template/sch_template";
932
 import { PostSearchSmartSchTemplatePatient } from "../../../api/schedule_template/sch_template";
1583
           }
1585
           }
1584
 
1586
 
1585
           this.editableTabs = data;
1587
           this.editableTabs = data;
1586
-          this.current_patient_data = data;
1587
-          this.current_all_schtemplate = this.editableTabs;
1588
-          this.current_all_schtemplate = this.deepClone(this.current_all_schtemplate)
1588
+          this.current_patient_data = this.deepClone(data);
1589
+          this.current_all_schtemplate = data
1589
         } else {
1590
         } else {
1590
         }
1591
         }
1591
       });
1592
       });
1646
     batchSetSch() {
1647
     batchSetSch() {
1647
       this.smartSaveLoading = true;
1648
       this.smartSaveLoading = true;
1648
       var tempData = [];
1649
       var tempData = [];
1650
+      // var delData = [];
1649
       for (let b = 0; b < this.editableTabs.length; b++) {
1651
       for (let b = 0; b < this.editableTabs.length; b++) {
1650
         for (let c = 0; c < this.editableTabs[b].tableWeekArrage.length; c++) {
1652
         for (let c = 0; c < this.editableTabs[b].tableWeekArrage.length; c++) {
1651
           let obj = {
1653
           let obj = {
1665
         }
1667
         }
1666
       }
1668
       }
1667
 
1669
 
1670
+      // for (let b = 0; b < this.current_patient_data.length; b++) {
1671
+      //   for (let c = 0; c < this.current_patient_data[b].tableWeekArrage.length; c++) {
1672
+      //     let obj = {
1673
+      //       time_type: this.current_patient_data[b].tableWeekArrage[c].time_type,
1674
+      //       jihao_id: this.current_patient_data[b].tableWeekArrage[c].device_number_id,
1675
+      //       schedule_week: this.getWeekByzhongwen(
1676
+      //         this.current_patient_data[b].tableWeekArrage[c].week
1677
+      //       ),
1678
+      //       mode_id: this.current_patient_data[b].tableWeekArrage[c].treat_mode,
1679
+      //       sch_id: this.current_patient_data[b].tableWeekArrage[c].id,
1680
+      //       zone_id: this.current_patient_data[b].tableWeekArrage[c].zone_id,
1681
+      //       t_id: this.current_patient_data[b].name,
1682
+      //       title:this.current_patient_data[b].title,
1683
+      //       patient_id: this.cur_smart_patient_id,
1684
+      //     };
1685
+      //     delData.push(obj);
1686
+      //   }
1687
+      // }
1688
+      // console.log(tempData)
1689
+      // console.log(delData)
1690
+
1691
+      // for (let i = 0; i < delData.length; i++) {
1692
+      //   for (let  b = 0; b < tempData.length; b++) {
1693
+      //     if(delData[i].sch_id == tempData[b].sch_id){
1694
+      //       delData.splice(i,1)
1695
+      //     }
1696
+      //   }
1697
+      // }
1698
+
1668
       for (let i = 0; i < tempData.length; i++) {
1699
       for (let i = 0; i < tempData.length; i++) {
1669
         if (tempData[i].jihao_id == "" || tempData[i].zone_id == "") {
1700
         if (tempData[i].jihao_id == "" || tempData[i].zone_id == "") {
1670
           this.$message.error("分区或者床位不能空");
1701
           this.$message.error("分区或者床位不能空");
1673
           return;
1704
           return;
1674
         }
1705
         }
1675
       }
1706
       }
1676
-
1677
       this.isEdit = true
1707
       this.isEdit = true
1708
+      console.log("saveData")
1709
+      console.log(tempData)
1678
       this.$emit("saveData", tempData);
1710
       this.$emit("saveData", tempData);
1679
     },changeJihao(){
1711
     },changeJihao(){
1680
-
1681
       this.$forceUpdate()
1712
       this.$forceUpdate()
1682
-
1683
     },
1713
     },
1684
     changeSch(row) {
1714
     changeSch(row) {
1685
 
1715
 
1928
 
1958
 
1929
       }
1959
       }
1930
 
1960
 
1961
+    },    deepClone(source) {
1962
+      if (!source && typeof source !== 'object') {
1963
+        throw new Error('error arguments', 'shallowClone')
1964
+      }
1965
+      const targetObj = source.constructor === Array ? [] : {}
1966
+      Object.keys(source).forEach((keys) => {
1967
+        if (source[keys] && typeof source[keys] === 'object') {
1968
+          targetObj[keys] = this.deepClone(source[keys])
1969
+        } else {
1970
+          targetObj[keys] = source[keys]
1971
+        }
1972
+      })
1973
+      return targetObj
1931
     },
1974
     },
1975
+
1932
     handleSelect(val) {
1976
     handleSelect(val) {
1933
       for (let i = 0; i < this.editableTabs.length; i++) {
1977
       for (let i = 0; i < this.editableTabs.length; i++) {
1934
         this.editableTabs[i].tableWeekArrage = [];
1978
         this.editableTabs[i].tableWeekArrage = [];
2008
           }
2052
           }
2009
 
2053
 
2010
           this.editableTabs = data;
2054
           this.editableTabs = data;
2011
-          this.current_patient_data = data;
2012
-          this.current_all_schtemplate = this.editableTabs;
2013
-          this.current_all_schtemplate = this.deepClone(this.current_all_schtemplate)
2055
+          this.current_patient_data = this.deepClone(data);
2056
+          this.current_all_schtemplate = data
2014
         } else {
2057
         } else {
2015
         }
2058
         }
2016
       });
2059
       });
2134
       this.cur_info.patient_name = row.name;
2177
       this.cur_info.patient_name = row.name;
2135
       this.cur_info.patient_id = row.id;
2178
       this.cur_info.patient_id = row.id;
2136
     },
2179
     },
2137
-    dragstartTwo(event, item) {
2138
-      console.log("start的索引", item.moveIndex);
2180
+    dragstartTwo(event) {
2181
+      console.log("start的索引");
2139
     },
2182
     },
2140
     dragendTwo(event) {
2183
     dragendTwo(event) {
2141
-      console.log("dragend", event);
2184
+      console.log("dragend");
2142
     },
2185
     },
2143
     drag(e, day, index, name) {
2186
     drag(e, day, index, name) {
2144
       //开始
2187
       //开始
2667
         if (device_number.id == device_number_id) {
2710
         if (device_number.id == device_number_id) {
2668
           var item = device_number[weekday + "_" + time_type];
2711
           var item = device_number[weekday + "_" + time_type];
2669
           item.pid = 0;
2712
           item.pid = 0;
2670
-          item.name = "";
2713
+          item.name = "";saveOrEdditTempData
2671
           item.treat_mode_id = 0;
2714
           item.treat_mode_id = 0;
2672
           item.treat_mode = "";
2715
           item.treat_mode = "";
2673
         }
2716
         }
2899
     saveActionThree: function (val) {
2942
     saveActionThree: function (val) {
2900
       updateEditSchedules(
2943
       updateEditSchedules(
2901
         JSON.stringify(val),
2944
         JSON.stringify(val),
2945
+        JSON.stringify([]),
2902
       ).then((rs) => {
2946
       ).then((rs) => {
2903
         var resp = rs.data;
2947
         var resp = rs.data;
2904
         if (resp.state == 1) {
2948
         if (resp.state == 1) {

+ 13 - 12
src/xt_pages/workforce/schedulePrint.vue View File

8
        <label class="title"> <span class="name">日期查询</span> : </label>
8
        <label class="title"> <span class="name">日期查询</span> : </label>
9
        <el-date-picker
9
        <el-date-picker
10
         @change="changeTime"
10
         @change="changeTime"
11
-        format="yyyy-MM-dd" 
11
+        format="yyyy-MM-dd"
12
         value-format="yyyy-MM-dd"
12
         value-format="yyyy-MM-dd"
13
         v-model="listQuery.schedule_date"
13
         v-model="listQuery.schedule_date"
14
         type="date"
14
         type="date"
62
             size="small"
62
             size="small"
63
             @click="searchPatientAction"
63
             @click="searchPatientAction"
64
           >搜索</el-button>
64
           >搜索</el-button>
65
+        <el-button style="float:right;" type="primary" @click="printAction">打印</el-button>
65
 
66
 
66
-        <el-button type="primary" size="small" style="margin-right" @click="toPrint">打印</el-button>
67
+<!--        <el-button type="primary" size="small" style="margin-right" @click="toPrint">打印</el-button>-->
67
       </div>
68
       </div>
68
 
69
 
69
       <el-table
70
       <el-table
76
         :data="tableData"
77
         :data="tableData"
77
         style="width: 100%"
78
         style="width: 100%"
78
       >
79
       >
79
-    
80
+
80
      <el-table-column label="排班日期" align="center" width="120">
81
      <el-table-column label="排班日期" align="center" width="120">
81
         <template slot-scope="scope">
82
         <template slot-scope="scope">
82
           {{getTimeOne(scope.row.schedule_date)}}
83
           {{getTimeOne(scope.row.schedule_date)}}
88
           <span style="color: #579ef8;width:100%;display:block;">{{ scope.row.name }}</span>
89
           <span style="color: #579ef8;width:100%;display:block;">{{ scope.row.name }}</span>
89
         </template>
90
         </template>
90
        </el-table-column>
91
        </el-table-column>
91
-      
92
+
92
        <el-table-column label="透析模式" align="center" width="100">
93
        <el-table-column label="透析模式" align="center" width="100">
93
-       
94
+
94
           <template slot-scope="scope">
95
           <template slot-scope="scope">
95
             <span v-if="scope.row.mode_id == 1">HD</span>
96
             <span v-if="scope.row.mode_id == 1">HD</span>
96
             <span v-if="scope.row.mode_id == 2">HDF</span>
97
             <span v-if="scope.row.mode_id == 2">HDF</span>
115
             <span v-if="scope.row.mode_id == 21">HD+</span>
116
             <span v-if="scope.row.mode_id == 21">HD+</span>
116
             <span v-if="scope.row.mode_id == 22">血浆胆红素吸附+HDF</span>
117
             <span v-if="scope.row.mode_id == 22">血浆胆红素吸附+HDF</span>
117
             <span v-if="scope.row.mode_id == 23">血浆胆红素吸附</span>
118
             <span v-if="scope.row.mode_id == 23">血浆胆红素吸附</span>
118
-            <span v-if="scope.row.mode_id == 24">I-HDF</span> 
119
+            <span v-if="scope.row.mode_id == 24">I-HDF</span>
119
             <span v-if="scope.row.mode_id == 25">HD高通</span>
120
             <span v-if="scope.row.mode_id == 25">HD高通</span>
120
             <span v-if="scope.row.mode_id == 26">CVVH</span>
121
             <span v-if="scope.row.mode_id == 26">CVVH</span>
121
             <span v-if="scope.row.mode_id == 27">CVVHD</span>
122
             <span v-if="scope.row.mode_id == 27">CVVHD</span>
139
         <el-table-column  label="分区" align="center">
140
         <el-table-column  label="分区" align="center">
140
            <template slot-scope="scope">
141
            <template slot-scope="scope">
141
             <span>
142
             <span>
142
-               {{getZoneName(scope.row.partition_id)}} 
143
+               {{getZoneName(scope.row.partition_id)}}
143
             </span>
144
             </span>
144
           </template>
145
           </template>
145
         </el-table-column>
146
         </el-table-column>
146
         <el-table-column  label="机号" align="center">
147
         <el-table-column  label="机号" align="center">
147
          <template slot-scope="scope">
148
          <template slot-scope="scope">
148
             <span>
149
             <span>
149
-               {{getNumberName(scope.row.bed_id)}} 
150
+               {{getNumberName(scope.row.bed_id)}}
150
             </span>
151
             </span>
151
           </template>
152
           </template>
152
         </el-table-column>
153
         </el-table-column>
153
-       
154
+
154
       </el-table>
155
       </el-table>
155
 
156
 
156
       <el-pagination
157
       <el-pagination
273
            this.tableData = list
274
            this.tableData = list
274
            this.total = response.data.data.total
275
            this.total = response.data.data.total
275
          }
276
          }
276
-      
277
+
277
       });
278
       });
278
     },
279
     },
279
     getValue: function(val) {
280
     getValue: function(val) {
299
     },
300
     },
300
     changeSearchMode: function() {
301
     changeSearchMode: function() {
301
      this.getlist();
302
      this.getlist();
302
-      
303
+
303
     },
304
     },
304
     searchPatientAction: function() {
305
     searchPatientAction: function() {
305
       this.listQuery.page = 1
306
       this.listQuery.page = 1
335
             name = this.partitionArr[i].name
336
             name = this.partitionArr[i].name
336
           }
337
           }
337
         }
338
         }
338
-       
339
+
339
 
340
 
340
         return name
341
         return name
341
       },
342
       },

+ 62 - 60
src/xt_pages/workforce/scheduleTablePrint.vue View File

1
 <template>
1
 <template>
2
     <div>
2
     <div>
3
-        <el-button type="primary" @click="printAction">打印</el-button>
3
+      <el-button style="float:right;" type="primary" @click="printAction">打印</el-button>
4
+
5
+<!--      <el-button type="primary" @click="printAction">打印</el-button>-->
4
         <table id="scheduleTable" class="scheduleTable" border="1" cellspacing="0">
6
         <table id="scheduleTable" class="scheduleTable" border="1" cellspacing="0">
5
             <tr>
7
             <tr>
6
                 <td rowspan="2">分区</td>
8
                 <td rowspan="2">分区</td>
90
                         <div v-if="item.Wed_A.mode_name != 'HD'">{{ item.Wed_A.mode_name }}</div>
92
                         <div v-if="item.Wed_A.mode_name != 'HD'">{{ item.Wed_A.mode_name }}</div>
91
                     </span>
93
                     </span>
92
                 </td>
94
                 </td>
93
-                <td style="min-width:50px;"> 
95
+                <td style="min-width:50px;">
94
                     <span v-if="item.Wed_N.patient_id">
96
                     <span v-if="item.Wed_N.patient_id">
95
                         <div>{{ item.Wed_N.patient }}</div>
97
                         <div>{{ item.Wed_N.patient }}</div>
96
                         <div v-if="item.Wed_N.mode_name != 'HD'">{{ item.Wed_N.mode_name }}</div>
98
                         <div v-if="item.Wed_N.mode_name != 'HD'">{{ item.Wed_N.mode_name }}</div>
212
     created(){
214
     created(){
213
         this.getAllZones()
215
         this.getAllZones()
214
         this.modeOptions = this.$store.getters.treatment_mode;
216
         this.modeOptions = this.$store.getters.treatment_mode;
215
-        this.partition_id = this.$route.query.partition_id   
217
+        this.partition_id = this.$route.query.partition_id
216
         var newList = []
218
         var newList = []
217
         var arr =  this.$route.query.week_date
219
         var arr =  this.$route.query.week_date
218
-      
220
+
219
         if(arr!=""){
221
         if(arr!=""){
220
           var newArr = arr.split(",")
222
           var newArr = arr.split(",")
221
-         
223
+
222
           if(newArr!=null&&newArr.length > 0){
224
           if(newArr!=null&&newArr.length > 0){
223
              for(let i=0;i<newArr.length;i++){
225
              for(let i=0;i<newArr.length;i++){
224
                if(newArr[i] == "周一"){
226
                if(newArr[i] == "周一"){
246
 
248
 
247
             this.week_date = newList.join(",")
249
             this.week_date = newList.join(",")
248
           }
250
           }
249
-        
251
+
250
         }else{
252
         }else{
251
              newList = [1,2,3,4,5,6,7]
253
              newList = [1,2,3,4,5,6,7]
252
-            
254
+
253
             this.week_date = newList.join(",")
255
             this.week_date = newList.join(",")
254
-            
256
+
255
         }
257
         }
256
-        
258
+
257
     },
259
     },
258
     methods:{
260
     methods:{
259
          getAllZones(){
261
          getAllZones(){
265
                 }
267
                 }
266
                 this.zones.push(...zones)
268
                 this.zones.push(...zones)
267
                 var strArr =  this.zoneIdList.join(",")
269
                 var strArr =  this.zoneIdList.join(",")
268
-                
270
+
269
                 this.strArr = strArr
271
                 this.strArr = strArr
270
                 this.getWeekPanels()
272
                 this.getWeekPanels()
271
                 //统计患者排班数量
273
                 //统计患者排班数量
285
                     str = partionStr
287
                     str = partionStr
286
                 }
288
                 }
287
 
289
 
288
-            
290
+
289
             getWeekPanelsOne(1,str).then(response => {
291
             getWeekPanelsOne(1,str).then(response => {
290
                 if (response.data.state == 0) {
292
                 if (response.data.state == 0) {
291
                     return false
293
                     return false
508
                     var theSchedules = response.data.data.schdules;
510
                     var theSchedules = response.data.data.schdules;
509
                     var that = this;
511
                     var that = this;
510
                     that.scheduleZone.forEach(function(zone, index) {
512
                     that.scheduleZone.forEach(function(zone, index) {
511
-                        
513
+
512
                         that.scheduleZone[index].Mon_M = {
514
                         that.scheduleZone[index].Mon_M = {
513
                             mode_id: 0,
515
                             mode_id: 0,
514
                             mode_name: "",
516
                             mode_name: "",
636
                             patient: ""
638
                             patient: ""
637
                         };
639
                         };
638
                         that.scheduleZone[index].total = 0;
640
                         that.scheduleZone[index].total = 0;
639
-                        
641
+
640
                         if (response.data.data.schdules.length > 0) {
642
                         if (response.data.data.schdules.length > 0) {
641
                             theSchedules.forEach(function(schedule, sindex) {
643
                             theSchedules.forEach(function(schedule, sindex) {
642
 
644
 
664
                                             : that.modeOptions[schedule.mode_id].name
666
                                             : that.modeOptions[schedule.mode_id].name
665
                                         };
667
                                         };
666
                                         that.scheduleZone[index].total += 1;
668
                                         that.scheduleZone[index].total += 1;
667
-                                        
669
+
668
                                     }
670
                                     }
669
-                                    
671
+
670
                                 }
672
                                 }
671
-                                
673
+
672
                             });
674
                             });
673
                         }
675
                         }
674
-                       
676
+
675
                     });
677
                     });
676
                     var newArr= [{"area":"总数","cut":0,"Fri_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Fri_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Fri_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Mon_A":{mode_id:0,mode_name:"",patient:"",patient_id:"1"},"Mon_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Mon_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"jihao_id":"","total":"","zone_id":"","zone_type":"","sort":""}]
678
                     var newArr= [{"area":"总数","cut":0,"Fri_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Fri_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Fri_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Mon_A":{mode_id:0,mode_name:"",patient:"",patient_id:"1"},"Mon_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Mon_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"jihao_id":"","total":"","zone_id":"","zone_type":"","sort":""}]
677
-                     
678
-                     
679
+
680
+
679
                      for(let i=0;i<newArr.length;i++){
681
                      for(let i=0;i<newArr.length;i++){
680
                        for(let j=0;j<this.scheduleCountList.length;j++){
682
                        for(let j=0;j<this.scheduleCountList.length;j++){
681
                             newArr[i].cut = this.total
683
                             newArr[i].cut = this.total
682
                          //礼拜一上午
684
                          //礼拜一上午
683
                           if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 1){
685
                           if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 1){
684
-                            
686
+
685
                               newArr[i].Mon_M.patient = this.scheduleCountList[j].Count
687
                               newArr[i].Mon_M.patient = this.scheduleCountList[j].Count
686
-                          } 
688
+                          }
687
                         //礼拜一下午
689
                         //礼拜一下午
688
                          if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 2){
690
                          if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 2){
689
-                           
691
+
690
                               newArr[i].Mon_A.patient = this.scheduleCountList[j].Count
692
                               newArr[i].Mon_A.patient = this.scheduleCountList[j].Count
691
-                          } 
693
+                          }
692
 
694
 
693
                          //礼拜一晚上
695
                          //礼拜一晚上
694
                          if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 3){
696
                          if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 3){
695
-                            
697
+
696
                               newArr[i].Mon_N.patient = this.scheduleCountList[j].Count
698
                               newArr[i].Mon_N.patient = this.scheduleCountList[j].Count
697
-                          } 
698
-                         
699
+                          }
700
+
699
                         //礼拜二上午
701
                         //礼拜二上午
700
                          if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 1){
702
                          if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 1){
701
-                            
703
+
702
                               newArr[i].Tue_M.patient = this.scheduleCountList[j].Count
704
                               newArr[i].Tue_M.patient = this.scheduleCountList[j].Count
703
-                          } 
705
+                          }
704
                          //礼拜二下午
706
                          //礼拜二下午
705
                          if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 2){
707
                          if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 2){
706
-                            
708
+
707
                               newArr[i].Tue_A.patient = this.scheduleCountList[j].Count
709
                               newArr[i].Tue_A.patient = this.scheduleCountList[j].Count
708
-                          } 
709
-                        
710
+                          }
711
+
710
                          //礼拜二晚上
712
                          //礼拜二晚上
711
                          if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 3){
713
                          if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 3){
712
-                            
714
+
713
                               newArr[i].Tue_N.patient = this.scheduleCountList[j].Count
715
                               newArr[i].Tue_N.patient = this.scheduleCountList[j].Count
714
-                          } 
716
+                          }
715
 
717
 
716
                          //礼拜三上午
718
                          //礼拜三上午
717
                          if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 1){
719
                          if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 1){
718
-                            
720
+
719
                               newArr[i].Wed_M.patient = this.scheduleCountList[j].Count
721
                               newArr[i].Wed_M.patient = this.scheduleCountList[j].Count
720
-                          } 
722
+                          }
721
 
723
 
722
                          //礼拜三下午
724
                          //礼拜三下午
723
                          if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
725
                          if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
724
-                            
726
+
725
                               newArr[i].Wed_A.patient = this.scheduleCountList[j].Count
727
                               newArr[i].Wed_A.patient = this.scheduleCountList[j].Count
726
                           }
728
                           }
727
 
729
 
728
                          //礼拜三晚上
730
                          //礼拜三晚上
729
                          if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 3){
731
                          if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 3){
730
-                            
732
+
731
                               newArr[i].Wed_N.patient = this.scheduleCountList[j].Count
733
                               newArr[i].Wed_N.patient = this.scheduleCountList[j].Count
732
                           }
734
                           }
733
 
735
 
735
 
737
 
736
                         //礼拜四上午
738
                         //礼拜四上午
737
                          if(this.scheduleCountList[j].schedule_week == 4 && this.scheduleCountList[j].schedule_type == 1){
739
                          if(this.scheduleCountList[j].schedule_week == 4 && this.scheduleCountList[j].schedule_type == 1){
738
-                            
740
+
739
                               newArr[i].Thurs_M.patient = this.scheduleCountList[j].Count
741
                               newArr[i].Thurs_M.patient = this.scheduleCountList[j].Count
740
-                          } 
742
+                          }
741
 
743
 
742
                          //礼拜四下午
744
                          //礼拜四下午
743
                          if(this.scheduleCountList[j].schedule_week == 4 && this.scheduleCountList[j].schedule_type == 2){
745
                          if(this.scheduleCountList[j].schedule_week == 4 && this.scheduleCountList[j].schedule_type == 2){
744
-                            
746
+
745
                               newArr[i].Thurs_A.patient = this.scheduleCountList[j].Count
747
                               newArr[i].Thurs_A.patient = this.scheduleCountList[j].Count
746
                           }
748
                           }
747
 
749
 
748
                          //礼拜四晚上
750
                          //礼拜四晚上
749
                          if(this.scheduleCountList[j].schedule_week == 4 && this.scheduleCountList[j].schedule_type == 3){
751
                          if(this.scheduleCountList[j].schedule_week == 4 && this.scheduleCountList[j].schedule_type == 3){
750
-                            
752
+
751
                               newArr[i].Thurs_N.patient = this.scheduleCountList[j].Count
753
                               newArr[i].Thurs_N.patient = this.scheduleCountList[j].Count
752
                           }
754
                           }
753
 
755
 
754
 
756
 
755
                         //礼拜五上午
757
                         //礼拜五上午
756
                          if(this.scheduleCountList[j].schedule_week == 5 && this.scheduleCountList[j].schedule_type == 1){
758
                          if(this.scheduleCountList[j].schedule_week == 5 && this.scheduleCountList[j].schedule_type == 1){
757
-                            
759
+
758
                               newArr[i].Fri_M.patient = this.scheduleCountList[j].Count
760
                               newArr[i].Fri_M.patient = this.scheduleCountList[j].Count
759
-                          } 
761
+                          }
760
 
762
 
761
                          //礼拜五下午
763
                          //礼拜五下午
762
                          if(this.scheduleCountList[j].schedule_week == 5 && this.scheduleCountList[j].schedule_type == 2){
764
                          if(this.scheduleCountList[j].schedule_week == 5 && this.scheduleCountList[j].schedule_type == 2){
763
-                            
765
+
764
                               newArr[i].Fri_A.patient = this.scheduleCountList[j].Count
766
                               newArr[i].Fri_A.patient = this.scheduleCountList[j].Count
765
                           }
767
                           }
766
 
768
 
767
                          //礼拜五晚上
769
                          //礼拜五晚上
768
                          if(this.scheduleCountList[j].schedule_week == 5 && this.scheduleCountList[j].schedule_type == 3){
770
                          if(this.scheduleCountList[j].schedule_week == 5 && this.scheduleCountList[j].schedule_type == 3){
769
-                            
771
+
770
                               newArr[i].Fri_N.patient = this.scheduleCountList[j].Count
772
                               newArr[i].Fri_N.patient = this.scheduleCountList[j].Count
771
                           }
773
                           }
772
 
774
 
773
 
775
 
774
                         //礼拜六上午
776
                         //礼拜六上午
775
                          if(this.scheduleCountList[j].schedule_week == 6 && this.scheduleCountList[j].schedule_type == 1){
777
                          if(this.scheduleCountList[j].schedule_week == 6 && this.scheduleCountList[j].schedule_type == 1){
776
-                            
778
+
777
                               newArr[i].Sat_M.patient = this.scheduleCountList[j].Count
779
                               newArr[i].Sat_M.patient = this.scheduleCountList[j].Count
778
-                          } 
780
+                          }
779
 
781
 
780
                          //礼拜六下午
782
                          //礼拜六下午
781
                          if(this.scheduleCountList[j].schedule_week == 6 && this.scheduleCountList[j].schedule_type == 2){
783
                          if(this.scheduleCountList[j].schedule_week == 6 && this.scheduleCountList[j].schedule_type == 2){
782
-                            
784
+
783
                               newArr[i].Sat_A.patient = this.scheduleCountList[j].Count
785
                               newArr[i].Sat_A.patient = this.scheduleCountList[j].Count
784
                           }
786
                           }
785
 
787
 
786
                          //礼拜六晚上
788
                          //礼拜六晚上
787
                          if(this.scheduleCountList[j].schedule_week == 6 && this.scheduleCountList[j].schedule_type == 3){
789
                          if(this.scheduleCountList[j].schedule_week == 6 && this.scheduleCountList[j].schedule_type == 3){
788
-                            
790
+
789
                               newArr[i].Sat_N.patient = this.scheduleCountList[j].Count
791
                               newArr[i].Sat_N.patient = this.scheduleCountList[j].Count
790
                           }
792
                           }
791
-                         
793
+
792
 
794
 
793
                           //礼拜日上午
795
                           //礼拜日上午
794
                          if(this.scheduleCountList[j].schedule_week == 7 && this.scheduleCountList[j].schedule_type == 1){
796
                          if(this.scheduleCountList[j].schedule_week == 7 && this.scheduleCountList[j].schedule_type == 1){
795
-                            
797
+
796
                               newArr[i].Sun_M.patient = this.scheduleCountList[j].Count
798
                               newArr[i].Sun_M.patient = this.scheduleCountList[j].Count
797
-                          } 
799
+                          }
798
 
800
 
799
                          //礼拜日下午
801
                          //礼拜日下午
800
                          if(this.scheduleCountList[j].schedule_week == 7 && this.scheduleCountList[j].schedule_type == 2){
802
                          if(this.scheduleCountList[j].schedule_week == 7 && this.scheduleCountList[j].schedule_type == 2){
801
-                            
803
+
802
                               newArr[i].Sun_A.patient = this.scheduleCountList[j].Count
804
                               newArr[i].Sun_A.patient = this.scheduleCountList[j].Count
803
                           }
805
                           }
804
 
806
 
805
                          //礼拜日晚上
807
                          //礼拜日晚上
806
                          if(this.scheduleCountList[j].schedule_week == 7 && this.scheduleCountList[j].schedule_type == 3){
808
                          if(this.scheduleCountList[j].schedule_week == 7 && this.scheduleCountList[j].schedule_type == 3){
807
-                            
809
+
808
                               newArr[i].Sun_N.patient = this.scheduleCountList[j].Count
810
                               newArr[i].Sun_N.patient = this.scheduleCountList[j].Count
809
                           }
811
                           }
810
 
812
 
812
                        }
814
                        }
813
                      }
815
                      }
814
                     console.log("newArr222222222",newArr)
816
                     console.log("newArr222222222",newArr)
815
-                    
817
+
816
                     that.scheduleZone.push(...newArr)
818
                     that.scheduleZone.push(...newArr)
817
-                   
819
+
818
                     for(let i=0;i<that.scheduleZone.length;i++){
820
                     for(let i=0;i<that.scheduleZone.length;i++){
819
                       if(that.scheduleZone[i].area == "总数"){
821
                       if(that.scheduleZone[i].area == "总数"){
820
                          that.scheduleZone[i].sort = 999999
822
                          that.scheduleZone[i].sort = 999999
822
                     }
824
                     }
823
                     that.scheduleZone.sort(this.compare('sort'))
825
                     that.scheduleZone.sort(this.compare('sort'))
824
                     console.log('总数据77777777777',that.scheduleZone)
826
                     console.log('总数据77777777777',that.scheduleZone)
825
-                    
827
+
826
                 } else {
828
                 } else {
827
                     this.$message.error("网络错误");
829
                     this.$message.error("网络错误");
828
                     return false;
830
                     return false;
892
                if(response.data.state == 1){
894
                if(response.data.state == 1){
893
                   var list = response.data.data.list
895
                   var list = response.data.data.list
894
                   console.log("list22222",list)
896
                   console.log("list22222",list)
895
-                  
897
+
896
                   this.scheduleCountList = list
898
                   this.scheduleCountList = list
897
                   var total = response.data.data.total
899
                   var total = response.data.data.total
898
                   console.log("totalw222",total)
900
                   console.log("totalw222",total)
899
                   this.total = total
901
                   this.total = total
900
                }
902
                }
901
-           }) 
903
+           })
902
         },
904
         },
903
         compare (property) {
905
         compare (property) {
904
             return function (a, b) {
906
             return function (a, b) {
917
     text-align: center;
919
     text-align: center;
918
     padding: 5px;
920
     padding: 5px;
919
 }
921
 }
920
-</style>
922
+</style>

+ 9 - 7
src/xt_pages/workforce/scheduleTablePrintOne.vue View File

1
 <template>
1
 <template>
2
     <div>
2
     <div>
3
-        <el-button type="primary" @click="printAction">打印</el-button>
3
+      <el-button style="float:right;" type="primary" @click="printAction">打印</el-button>
4
+
5
+<!--      <el-button type="primary" @click="printAction">打印</el-button>-->
4
         <table id="scheduleTable" class="scheduleTable" border="1" cellspacing="0">
6
         <table id="scheduleTable" class="scheduleTable" border="1" cellspacing="0">
5
             <tr>
7
             <tr>
6
                 <td rowspan="2">分区</td>
8
                 <td rowspan="2">分区</td>
239
         this.partition_id = this.$route.query.partition_id
241
         this.partition_id = this.$route.query.partition_id
240
         var newList = []
242
         var newList = []
241
         var arr =  this.$route.query.week_date
243
         var arr =  this.$route.query.week_date
242
-      
244
+
243
         if(arr!=""){
245
         if(arr!=""){
244
           var newArr = arr.split(",")
246
           var newArr = arr.split(",")
245
-         
247
+
246
           if(newArr!=null&&newArr.length > 0){
248
           if(newArr!=null&&newArr.length > 0){
247
              for(let i=0;i<newArr.length;i++){
249
              for(let i=0;i<newArr.length;i++){
248
                if(newArr[i] == "周一"){
250
                if(newArr[i] == "周一"){
270
 
272
 
271
             this.week_date = newList.join(",")
273
             this.week_date = newList.join(",")
272
           }
274
           }
273
-        
275
+
274
         }else{
276
         }else{
275
              newList = [1,2,3,4,5,6,7]
277
              newList = [1,2,3,4,5,6,7]
276
-            
278
+
277
             this.week_date = newList.join(",")
279
             this.week_date = newList.join(",")
278
-            
280
+
279
         }
281
         }
280
         // this.getSolutionSchedule()
282
         // this.getSolutionSchedule()
281
     },
283
     },
595
             getSchedulesTwo(params).then(response => {
597
             getSchedulesTwo(params).then(response => {
596
                 if (response.data.state == 1) {
598
                 if (response.data.state == 1) {
597
                     this.weekTitle = response.data.data.weekTitle;
599
                     this.weekTitle = response.data.data.weekTitle;
598
-                   
600
+
599
                     this.weekDays = response.data.data.days;
601
                     this.weekDays = response.data.data.days;
600
                     this.toDay = response.data.data.today;
602
                     this.toDay = response.data.data.today;
601
                     var theSchedules = response.data.data.schdules;
603
                     var theSchedules = response.data.data.schdules;

+ 6 - 5
src/xt_pages/workforce/scheduleTablePrintTwo.vue View File

1
 <template>
1
 <template>
2
     <div>
2
     <div>
3
-        <el-button type="primary" @click="printAction">打印</el-button>
3
+
4
+        <el-button style="float:right;" type="primary" @click="printAction">打印</el-button>
4
         <table id="scheduleTable" class="scheduleTable" border="1" cellspacing="0">
5
         <table id="scheduleTable" class="scheduleTable" border="1" cellspacing="0">
5
             <tr>
6
             <tr>
6
                 <td rowspan="2">分区</td>
7
                 <td rowspan="2">分区</td>
247
         this.partition_id = this.$route.query.partition_id
248
         this.partition_id = this.$route.query.partition_id
248
         var newList = []
249
         var newList = []
249
         var arr =  this.$route.query.week_date
250
         var arr =  this.$route.query.week_date
250
-      
251
+
251
         if(arr!=""){
252
         if(arr!=""){
252
           var newArr = arr.split(",")
253
           var newArr = arr.split(",")
253
-         
254
+
254
           if(newArr!=null&&newArr.length > 0){
255
           if(newArr!=null&&newArr.length > 0){
255
              for(let i=0;i<newArr.length;i++){
256
              for(let i=0;i<newArr.length;i++){
256
                if(newArr[i] == "周一"){
257
                if(newArr[i] == "周一"){
285
 
286
 
286
             this.week_date = newList.join(",")
287
             this.week_date = newList.join(",")
287
           }
288
           }
288
-        
289
+
289
         }else{
290
         }else{
290
              newList = [1,2,3,4,5,6,7]
291
              newList = [1,2,3,4,5,6,7]
291
             this.first_day = 1
292
             this.first_day = 1
296
             this.six_day = 6
297
             this.six_day = 6
297
             this.seven_day = 7
298
             this.seven_day = 7
298
             this.week_date = newList.join(",")
299
             this.week_date = newList.join(",")
299
-            
300
+
300
         }
301
         }
301
         // this.getSolutionSchedule()
302
         // this.getSolutionSchedule()
302
     },
303
     },

+ 26 - 17
src/xt_pages/workforce/schedule_print.vue View File

276
 
276
 
277
           this.total = resp.data.total
277
           this.total = resp.data.total
278
           var schedules = resp.data.schedules
278
           var schedules = resp.data.schedules
279
-          console.log("scheudle_date",schedules)
279
+          console.log(schedules)
280
+
280
           for (let index = 0; index < schedules.length; index++) {
281
           for (let index = 0; index < schedules.length; index++) {
281
-            const schedule = schedules[index]
282
-            if (schedule.patient == null || schedule.zone == null) {
283
-              continue
284
-            }
282
+            console.log(index)
285
 
283
 
284
+            const schedule = schedules[index]
285
+            // if (schedule.patient == null || schedule.zone == null) {
286
+            //   continue
287
+            // }
288
+            console.log("schedule")
289
+            console.log(schedule)
286
             var weekday = schedule.schedule_week
290
             var weekday = schedule.schedule_week
287
             var time_type = schedule.schedule_type
291
             var time_type = schedule.schedule_type
288
-
292
+            console.log(weekday)
289
             var main_collection = this.schedules[weekday - 1]
293
             var main_collection = this.schedules[weekday - 1]
294
+            console.log(main_collection)
290
 
295
 
291
             var time_type_schedules
296
             var time_type_schedules
292
-            var other_time_type_schedules
293
 
297
 
294
             if (time_type == 1) {
298
             if (time_type == 1) {
295
               time_type_schedules = main_collection.all.am
299
               time_type_schedules = main_collection.all.am
299
               time_type_schedules = main_collection.all.evening
303
               time_type_schedules = main_collection.all.evening
300
             }
304
             }
301
 
305
 
302
-
303
             var zone_schedules = time_type_schedules[schedule.zone.name] ? time_type_schedules[schedule.zone.name] : []
306
             var zone_schedules = time_type_schedules[schedule.zone.name] ? time_type_schedules[schedule.zone.name] : []
304
-
305
             zone_schedules.push(schedule)
307
             zone_schedules.push(schedule)
308
+            console.log("zone_schedules")
309
+
310
+            console.log(zone_schedules)
306
 
311
 
307
             time_type_schedules[schedule.zone.name] = zone_schedules
312
             time_type_schedules[schedule.zone.name] = zone_schedules
313
+            // console.log(time_type_schedules)
314
+            console.log("1111111")
308
 
315
 
309
 
316
 
310
             if (schedule.mode.id == 2) { // HDF
317
             if (schedule.mode.id == 2) { // HDF
311
               main_collection.hdf.push(schedule)
318
               main_collection.hdf.push(schedule)
312
 
319
 
313
-
314
             } else if (schedule.mode.id == 3) { // HD+HF
320
             } else if (schedule.mode.id == 3) { // HD+HF
321
+
315
               main_collection.hd_hp.push(schedule)
322
               main_collection.hd_hp.push(schedule)
316
             }
323
             }
317
-         
318
-           console.log("scheudle_date",main_collection)
324
+
319
           }
325
           }
320
 
326
 
321
 
327
 
325
       }).catch(err => {
331
       }).catch(err => {
326
         this.$message.error(err)
332
         this.$message.error(err)
327
       })
333
       })
334
+      console.log("1111111")
335
+      console.log("this.schedules")
336
+      console.log(this.schedules)
328
     },
337
     },
329
     methods: {
338
     methods: {
330
       getPatientNum(week,type){
339
       getPatientNum(week,type){
355
         var names = []
364
         var names = []
356
         for (let index = 0; index < schedules.length; index++) {
365
         for (let index = 0; index < schedules.length; index++) {
357
           const schedule = schedules[index]
366
           const schedule = schedules[index]
358
-          console.log(schedule)
367
+          // console.log(schedule)
359
 
368
 
360
           names.push(schedule.patient.name)
369
           names.push(schedule.patient.name)
361
         }
370
         }
364
           obj[next] ? '' : obj[next] = true && cur.push(next)
373
           obj[next] ? '' : obj[next] = true && cur.push(next)
365
           return cur
374
           return cur
366
         }, []) // 设置cur默认类型为数组,并且初始值为空的数组
375
         }, []) // 设置cur默认类型为数组,并且初始值为空的数组
367
-        console.log('names',names)
376
+        // console.log('names',names)
368
         return names.join('、')
377
         return names.join('、')
369
       },
378
       },
370
       patient_other_names: function(schedules) {
379
       patient_other_names: function(schedules) {
375
         var names = []
384
         var names = []
376
         for (let index = 0; index < schedules.length; index++) {
385
         for (let index = 0; index < schedules.length; index++) {
377
           const schedule = schedules[index]
386
           const schedule = schedules[index]
378
-          console.log(schedule)
379
-
380
-          names.push(schedule.patient.name)
387
+          // console.log(schedule)
388
+          //
389
+          // names.push(schedule.patient.name)
381
 
390
 
382
           if(schedule.schedule_type == 1){
391
           if(schedule.schedule_type == 1){
383
             am.push(schedule.patient.name)
392
             am.push(schedule.patient.name)

+ 1 - 3
src/xt_pages/workforce/template.vue View File

3193
       for(let i = 0; i < val.length; i++){
3193
       for(let i = 0; i < val.length; i++){
3194
           tempDataOne.push(val[i])
3194
           tempDataOne.push(val[i])
3195
       }
3195
       }
3196
-      if(tempDataOne.length > 0){
3197
-        this.$refs.table.SetSmartSch(tempDataOne)
3198
-      }
3196
+      this.$refs.table.SetSmartSch(tempDataOne)
3199
     },
3197
     },
3200
     getWeekPanels(val) {
3198
     getWeekPanels(val) {
3201
       getWeekPanels(1,val).then(response => {
3199
       getWeekPanels(1,val).then(response => {