瀏覽代碼

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

28169 1 年之前
父節點
當前提交
638dce5f9d

文件差異過大導致無法顯示
+ 307 - 1333
package-lock.json


+ 9 - 0
src/api/his/his_export.js 查看文件

@@ -7,3 +7,12 @@ export function handleData10106(params) {
7 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 查看文件

@@ -269,3 +269,12 @@ export function getSolutionSchedule(params) {
269 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 查看文件

@@ -166,5 +166,21 @@ export function getTemplateSmartDevices(params) {
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 查看文件

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

+ 1 - 1
src/xt_pages/outpatientDoctorStation/print.vue 查看文件

@@ -18,7 +18,7 @@
18 18
 9675:测试
19 19
  -->
20 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 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 查看文件

@@ -3038,8 +3038,8 @@ export default {
3038 3038
     }
3039 3039
     let newNum = 0
3040 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 3043
         let str = this.weekList[i][0] + '~' + this.weekList[i][6] + '(' + num + ')'
3044 3044
         this.typeOptions.push({value: i, label: str})
3045 3045
         let stt = this.weekList[i][0] + "~" + this.weekList[i][6]

+ 0 - 9
src/xt_pages/workforce/components/ScheduleItem.vue 查看文件

@@ -1,20 +1,11 @@
1 1
 <template>
2 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 3
             <div>
12 4
                 <span :class='modeColor(scheduleDetail.mode_name)'>{{scheduleDetail.patient}}</span><br/>
13 5
                 <span v-if="scheduleDetail.mode_name.length>0" :class='modeColor(scheduleDetail.mode_name)'>({{scheduleDetail.mode_name}})</span>
14 6
               <span >{{scheduleDetail.dialysis_machine_name}}</span>
15 7
 
16 8
             </div>
17
-        </el-tooltip>
18 9
     </div>
19 10
 </template>
20 11
 

文件差異過大導致無法顯示
+ 467 - 190
src/xt_pages/workforce/components/editTableData.vue


+ 127 - 64
src/xt_pages/workforce/components/tableData.vue 查看文件

@@ -102,7 +102,7 @@
102 102
         </el-table-column>
103 103
         <el-table-column label="班次" width="80">
104 104
           <template slot-scope="scope">
105
-            {{ getSchedulesType(scope.row.schedule_type) }}
105
+            {{ getSchedulesType(scope.row.schedule_type,scope.row) }}
106 106
           </template>
107 107
         </el-table-column>
108 108
         <el-table-column label="机号" width="80">
@@ -196,14 +196,14 @@
196 196
       <el-table-column
197 197
         prop="area"
198 198
         label="分区"
199
-        width="80"
199
+        width="50"
200 200
         align="center"
201 201
         fixed
202 202
       ></el-table-column>
203 203
       <el-table-column
204 204
         prop="cut"
205 205
         label="机号"
206
-        width="80"
206
+        width="100"
207 207
         align="center"
208 208
         fixed
209 209
       ></el-table-column>
@@ -651,10 +651,10 @@
651 651
               @change="changePartition"
652 652
             >
653 653
               <el-option
654
-                v-for="(item, index) in zone_names"
654
+                v-for="(item, index) in zones"
655 655
                 :key="index"
656
-                :label="item"
657
-                :value="item"
656
+                :label="item.name"
657
+                :value="item.id"
658 658
               >
659 659
               </el-option>
660 660
             </el-select>
@@ -704,6 +704,10 @@ import {
704 704
   getWeekPanelsOne,
705 705
   getAllZones,
706 706
 } from "@/api/schedule";
707
+import {
708
+  getSmartDevices
709
+} from "@/api/schedule_template/sch_template";
710
+
707 711
 import ScheduleItem from "./ScheduleItem";
708 712
 const weekOptions = ['周一','周二','周三','周四','周五','周六','周日'];
709 713
 let rowNumber = 0;
@@ -1841,6 +1845,7 @@ export default {
1841 1845
       this.currentData.partition_type = row.zone_type;
1842 1846
 
1843 1847
 
1848
+
1844 1849
       if (row[column.property].schedule_id > 0) {
1845 1850
         this.currentData.mode_id = row[column.property].mode_id;
1846 1851
         this.currentData.id = row[column.property].schedule_id;
@@ -1879,7 +1884,7 @@ export default {
1879 1884
               ].zone_id;
1880 1885
             }
1881 1886
           }
1882
-
1887
+          this.changeSchedule.partition_id = this.zone_name
1883 1888
           this.changeSchedule.change_action = "change_device";
1884 1889
           this.changeScheduleActon(formName);
1885 1890
 
@@ -2026,61 +2031,94 @@ export default {
2026 2031
     },
2027 2032
 
2028 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 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 2123
     submitTiaoX() {
2086 2124
       // if (this.tiaoZhengType==1) {
@@ -2455,6 +2493,34 @@ export default {
2455 2493
       this.currentData.contagions = row.patient_contagions;
2456 2494
 
2457 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 2524
       this.changeSchedule = {
2459 2525
         mode_id: row.mode_id,
2460 2526
         schedule_type: row.schedule_type,
@@ -2463,10 +2529,6 @@ export default {
2463 2529
         schedule_week: row.schedule_week,
2464 2530
         partition_type: ""
2465 2531
       };
2466
-      this.currentData.schedule_date = uParseTime(
2467
-        row.schedule_date,
2468
-        "{y}-{m}-{d}"
2469
-      );
2470 2532
 
2471 2533
       if (typeof this.partitions[row.partition_id].jihaos !== "undefined") {
2472 2534
         this.jihaos = this.partitions[row.partition_id].jihaos;
@@ -2508,7 +2570,7 @@ export default {
2508 2570
 
2509 2571
       return week + "(" + uParseTime(row.schedule_date, "{y}-{m}-{d}") + ")";
2510 2572
     },
2511
-    getSchedulesType: function(type) {
2573
+    getSchedulesType: function(type,row) {
2512 2574
       let type_name = "";
2513 2575
       switch (type) {
2514 2576
         case 1:
@@ -2522,6 +2584,7 @@ export default {
2522 2584
           type_name = "晚上";
2523 2585
           break;
2524 2586
       }
2587
+
2525 2588
       return type_name;
2526 2589
     },
2527 2590
     changeMode: function(index, row) {

+ 58 - 14
src/xt_pages/workforce/components/template_table.vue 查看文件

@@ -923,8 +923,10 @@ import {
923 923
   getTemplateScheduleSearchResult,
924 924
   updateSchedules,
925 925
   updateEditSchedules,
926
-  getTemplateSmartDevices
926
+  getTemplateSmartDevices,
927
+  getSmartDevices
927 928
 } from "@/api/schedule_template/sch_template";
929
+
928 930
 import TemplateTableItem from "./template_table_item";
929 931
 import ScheduleSelectorDialog from "./template_schedule_selector_dialog";
930 932
 import { PostSearchSmartSchTemplatePatient } from "../../../api/schedule_template/sch_template";
@@ -1583,9 +1585,8 @@ export default {
1583 1585
           }
1584 1586
 
1585 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 1590
         } else {
1590 1591
         }
1591 1592
       });
@@ -1646,6 +1647,7 @@ export default {
1646 1647
     batchSetSch() {
1647 1648
       this.smartSaveLoading = true;
1648 1649
       var tempData = [];
1650
+      // var delData = [];
1649 1651
       for (let b = 0; b < this.editableTabs.length; b++) {
1650 1652
         for (let c = 0; c < this.editableTabs[b].tableWeekArrage.length; c++) {
1651 1653
           let obj = {
@@ -1665,6 +1667,35 @@ export default {
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 1699
       for (let i = 0; i < tempData.length; i++) {
1669 1700
         if (tempData[i].jihao_id == "" || tempData[i].zone_id == "") {
1670 1701
           this.$message.error("分区或者床位不能空");
@@ -1673,13 +1704,12 @@ export default {
1673 1704
           return;
1674 1705
         }
1675 1706
       }
1676
-
1677 1707
       this.isEdit = true
1708
+      console.log("saveData")
1709
+      console.log(tempData)
1678 1710
       this.$emit("saveData", tempData);
1679 1711
     },changeJihao(){
1680
-
1681 1712
       this.$forceUpdate()
1682
-
1683 1713
     },
1684 1714
     changeSch(row) {
1685 1715
 
@@ -1928,7 +1958,21 @@ export default {
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 1976
     handleSelect(val) {
1933 1977
       for (let i = 0; i < this.editableTabs.length; i++) {
1934 1978
         this.editableTabs[i].tableWeekArrage = [];
@@ -2008,9 +2052,8 @@ export default {
2008 2052
           }
2009 2053
 
2010 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 2057
         } else {
2015 2058
         }
2016 2059
       });
@@ -2134,11 +2177,11 @@ export default {
2134 2177
       this.cur_info.patient_name = row.name;
2135 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 2183
     dragendTwo(event) {
2141
-      console.log("dragend", event);
2184
+      console.log("dragend");
2142 2185
     },
2143 2186
     drag(e, day, index, name) {
2144 2187
       //开始
@@ -2667,7 +2710,7 @@ export default {
2667 2710
         if (device_number.id == device_number_id) {
2668 2711
           var item = device_number[weekday + "_" + time_type];
2669 2712
           item.pid = 0;
2670
-          item.name = "";
2713
+          item.name = "";saveOrEdditTempData
2671 2714
           item.treat_mode_id = 0;
2672 2715
           item.treat_mode = "";
2673 2716
         }
@@ -2899,6 +2942,7 @@ export default {
2899 2942
     saveActionThree: function (val) {
2900 2943
       updateEditSchedules(
2901 2944
         JSON.stringify(val),
2945
+        JSON.stringify([]),
2902 2946
       ).then((rs) => {
2903 2947
         var resp = rs.data;
2904 2948
         if (resp.state == 1) {

+ 13 - 12
src/xt_pages/workforce/schedulePrint.vue 查看文件

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

+ 62 - 60
src/xt_pages/workforce/scheduleTablePrint.vue 查看文件

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

+ 9 - 7
src/xt_pages/workforce/scheduleTablePrintOne.vue 查看文件

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

+ 6 - 5
src/xt_pages/workforce/scheduleTablePrintTwo.vue 查看文件

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

+ 26 - 17
src/xt_pages/workforce/schedule_print.vue 查看文件

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

+ 1 - 3
src/xt_pages/workforce/template.vue 查看文件

@@ -3193,9 +3193,7 @@ export default {
3193 3193
       for(let i = 0; i < val.length; i++){
3194 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 3198
     getWeekPanels(val) {
3201 3199
       getWeekPanels(1,val).then(response => {