test_user 1 year ago
parent
commit
b47789e2a4

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


+ 1 - 1
package.json View File

56
     "jszip": "3.1.5",
56
     "jszip": "3.1.5",
57
     "mockjs": "1.0.1-beta3",
57
     "mockjs": "1.0.1-beta3",
58
     "moment": "^2.24.0",
58
     "moment": "^2.24.0",
59
-    "node-sass": "^7.0.1",
59
+    "node-sass": "4.14.1",
60
     "normalize.css": "7.0.0",
60
     "normalize.css": "7.0.0",
61
     "nprogress": "0.2.0",
61
     "nprogress": "0.2.0",
62
     "print-js": "^1.0.50",
62
     "print-js": "^1.0.50",

+ 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
+

+ 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,

+ 147 - 3
src/xt_pages/outpatientCharges/summary.vue View File

109
           </el-button
109
           </el-button
110
           >
110
           >
111
           <el-button v-if="$store.getters.xt_user.org_id == 10106 || $store.getters.xt_user.org_id == 0" size="small" type="primary" @click="export_detail_ten">报表下载2</el-button>
111
           <el-button v-if="$store.getters.xt_user.org_id == 10106 || $store.getters.xt_user.org_id == 0" size="small" type="primary" @click="export_detail_ten">报表下载2</el-button>
112
+          <el-button v-if="$store.getters.xt_user.org_id == 10318 || $store.getters.xt_user.org_id == 0" size="small" type="primary" @click="export_detail_ten_two">报表下载3</el-button>
112
 
113
 
113
           <!--          <el-button size="small" type="primary" @click="export_detail_two"-->
114
           <!--          <el-button size="small" type="primary" @click="export_detail_two"-->
114
           <!--          >报表下载2-->
115
           <!--          >报表下载2-->
118
           <!--                    <el-button size="small" type="primary" @click="export_detail_three">报表下载2</el-button>-->
119
           <!--                    <el-button size="small" type="primary" @click="export_detail_three">报表下载2</el-button>-->
119
           <!--          <el-button size="small" type="primary" @click="export_detail_four">报表下载3</el-button>-->
120
           <!--          <el-button size="small" type="primary" @click="export_detail_four">报表下载3</el-button>-->
120
           <!--          <el-button size="small" type="primary" @click="export_detail_five">报表下载3</el-button>-->
121
           <!--          <el-button size="small" type="primary" @click="export_detail_five">报表下载3</el-button>-->
121
-          <!--          <el-button size="small" type="primary" @click="export_detail_six">报表下载9</el-button>-->
122
+<!--                    <el-button size="small" type="primary" @click="export_detail_six">报表下载9</el-button>-->
122
           <!--          <el-button size="small" type="primary" @click="export_detail_seven">报表下载4</el-button>-->
123
           <!--          <el-button size="small" type="primary" @click="export_detail_seven">报表下载4</el-button>-->
123
 
124
 
124
 
125
 
355
 
356
 
356
 import {getHisDataFive, getHisDataSix, getHisDataThree, getHisDataTwo,getAllOrders} from "../../api/his/his";
357
 import {getHisDataFive, getHisDataSix, getHisDataThree, getHisDataTwo,getAllOrders} from "../../api/his/his";
357
 
358
 
358
-import {handleData10106} from "../../api/his/his_export";
359
+import {handleData10106,handleData10318} from "../../api/his/his_export";
359
 
360
 
360
 export default {
361
 export default {
361
   name: "OutpatientChargesSummary",
362
   name: "OutpatientChargesSummary",
1220
           var tarList = []
1221
           var tarList = []
1221
           for (let i = 0; i < list.length; i++) {
1222
           for (let i = 0; i < list.length; i++) {
1222
             let obj = {
1223
             let obj = {
1223
-              "周期": "2022年第季度",
1224
+              "周期": "2022年第季度",
1224
               "类别": "门诊",
1225
               "类别": "门诊",
1225
               "医保目录编码": list[i].code,
1226
               "医保目录编码": list[i].code,
1226
               "医保目录名称": list[i].name,
1227
               "医保目录名称": list[i].name,
1631
       });
1632
       });
1632
 
1633
 
1633
     },
1634
     },
1635
+    export_detail_ten_two(){
1636
+      let params = {
1637
+        start_time:this.start_time,
1638
+        end_time:this.end_time
1639
+      };
1640
+      handleData10318(params).then((response) => {
1641
+        if (response.data.state == 0) {
1642
+          this.$message.error(response.data.msg);
1643
+          return false;
1644
+        } else {
1645
+          let list = [];
1646
+          for (let i = 0; i < response.data.data.order.length; i++) {
1647
+            let order = response.data.data.order[i];
1648
+
1649
+
1650
+            let obj = {
1651
+              姓名: order.patient.name,
1652
+              身份证: order.patient.id_card_no,
1653
+              西药费:0,
1654
+              化验费:0,
1655
+              检查费:0,
1656
+              治疗费:0,
1657
+              材料费:0,
1658
+              中成药费:0,
1659
+              备注: "就诊日期:" + this.getTimes(order.settle_accounts_date) + " 医保报销: "+order.fund_pay_sumamt + " 现金:"+order.psn_cash_pay,
1660
+            }
1661
+            let xiyaoPrice = 0
1662
+            let huaYanPrice = 0
1663
+            let jianChaPrice = 0
1664
+            let zhiLiaoPrice = 0
1665
+            let cailiaoPrice = 0
1666
+            let zhongchengyaoPrice = 0
1667
+
1668
+              for (let b = 0; b < order.info.length; b++) {
1669
+                if(order.info[b].med_chrgitm_type ==  '09'){
1670
+                  xiyaoPrice = xiyaoPrice + order.info[b].det_item_fee_sumamt
1671
+                }
1672
+                if(order.info[b].med_chrgitm_type ==  '04'){
1673
+                  huaYanPrice = huaYanPrice + order.info[b].det_item_fee_sumamt
1674
+                }
1675
+                if(order.info[b].med_chrgitm_type ==  '03'){
1676
+                  jianChaPrice = jianChaPrice + order.info[b].det_item_fee_sumamt
1677
+                }
1678
+                if(order.info[b].med_chrgitm_type ==  '05'){
1679
+                  zhiLiaoPrice = zhiLiaoPrice + order.info[b].det_item_fee_sumamt
1680
+                }
1681
+                if(order.info[b].med_chrgitm_type ==  '08'){
1682
+                  cailiaoPrice = cailiaoPrice + order.info[b].det_item_fee_sumamt
1683
+                }
1684
+                if(order.info[b].med_chrgitm_type ==  '11'){
1685
+                  zhongchengyaoPrice = zhongchengyaoPrice + order.info[b].det_item_fee_sumamt
1686
+                }
1687
+              }
1688
+            obj.西药费 = xiyaoPrice
1689
+            obj.化验费 = huaYanPrice
1690
+            obj.检查费 = jianChaPrice
1691
+            obj.治疗费 = zhiLiaoPrice
1692
+            obj.材料费 = cailiaoPrice
1693
+            obj.中成药费 = zhongchengyaoPrice
1694
+
1695
+
1696
+            list.push(obj)
1697
+          }
1698
+
1699
+          import("@/vendor/Export2Excel").then((excel) => {
1700
+            const tHeader = [
1701
+              "姓名",
1702
+              "身份证",
1703
+              "西药费",
1704
+              "化验费",
1705
+              "检查费",
1706
+              "治疗费",
1707
+              "材料费",
1708
+              "中成药费",
1709
+              "备注",
1710
+            ];
1711
+            const filterVal = [
1712
+              "姓名",
1713
+              "身份证",
1714
+              "西药费",
1715
+              "化验费",
1716
+              "检查费",
1717
+              "治疗费",
1718
+              "材料费",
1719
+              "中成药费",
1720
+              "备注",
1721
+            ];
1722
+            const data = this.formatJson(filterVal, list);
1723
+            excel.export_json_to_excel({
1724
+              header: tHeader,
1725
+              data,
1726
+              filename: "消费明细",
1727
+            });
1728
+          });
1729
+
1730
+
1731
+        }
1732
+      });
1634
 
1733
 
1734
+
1735
+    },
1635
     GetGoodName(id) {
1736
     GetGoodName(id) {
1636
       switch (id) {
1737
       switch (id) {
1637
         case 254:
1738
         case 254:
1817
               }
1918
               }
1818
             }
1919
             }
1819
 
1920
 
1921
+            let insuplc_admdvs_name = ""
1922
+            if (order.his_patient.insuplc_admdvs == "440703"){
1923
+              insuplc_admdvs_name = "蓬江区"
1924
+
1925
+
1926
+            } else if (order.his_patient.insuplc_admdvs == "440704"){
1927
+
1928
+              insuplc_admdvs_name = "蓬江区"
1929
+
1930
+
1931
+            } else if (order.his_patient.insuplc_admdvs == "440705"){
1932
+
1933
+              insuplc_admdvs_name = "蓬江区"
1934
+
1935
+
1936
+            }else if (order.his_patient.insuplc_admdvs == "440781"){
1937
+
1938
+              insuplc_admdvs_name = "蓬江区"
1939
+
1940
+
1941
+            }else if (order.his_patient.insuplc_admdvs == "440783"){
1942
+
1943
+              insuplc_admdvs_name = "蓬江区"
1944
+
1945
+
1946
+            }else if (order.his_patient.insuplc_admdvs == "440784"){
1947
+
1948
+
1949
+
1950
+            }else if (order.his_patient.insuplc_admdvs == "440785"){
1951
+
1952
+
1953
+
1954
+            }else if (order.his_patient.insuplc_admdvs == "440799"){
1955
+
1956
+
1957
+
1958
+            }
1959
+
1960
+
1961
+
1820
             let obj = {
1962
             let obj = {
1821
               就诊号: order.mdtrt_id,
1963
               就诊号: order.mdtrt_id,
1822
               患者姓名: name,
1964
               患者姓名: name,
1823
               开处时间: time,
1965
               开处时间: time,
1824
               险种类型: insutypeName,
1966
               险种类型: insutypeName,
1967
+              参保所属医保区划: order.his_patient.insuplc_admdvs,
1968
+              属地名称: order.his_patient.insuplc_admdvs,
1825
               应收金额: order.medfee_sumamt,
1969
               应收金额: order.medfee_sumamt,
1826
               实收金额: order.medfee_sumamt,
1970
               实收金额: order.medfee_sumamt,
1827
               医保统筹金额: order.hifp_pay,
1971
               医保统筹金额: order.hifp_pay,

+ 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
 

+ 11 - 4
src/xt_pages/outpatientDoctorStation/template/printOne.vue View File

127
           <div style="text-align: center">(以下空白)</div>
127
           <div style="text-align: center">(以下空白)</div>
128
         </div>
128
         </div>
129
         <div class="doctorBox" v-if="org_id != 10188">
129
         <div class="doctorBox" v-if="org_id != 10188">
130
-          <p>
130
+          <p v-if="org_id == 10217 || org_id == 0">
131
             医师:
131
             医师:
132
-            <!-- {{ item.doctor ? item.doctor : "" }} -->
133
             <span
132
             <span
134
               style="width: 100px; display: inline-block"
133
               style="width: 100px; display: inline-block"
135
               v-if="item.creator == ''"
134
               v-if="item.creator == ''"
143
               {{ doc_name }}
142
               {{ doc_name }}
144
             </span>
143
             </span>
145
             <img
144
             <img
146
-              style="height: 30px"
145
+              style="height: 50px;"
147
               :src="setAdminUserES(item.creator,item.doctor)"
146
               :src="setAdminUserES(item.creator,item.doctor)"
148
               alt=""
147
               alt=""
149
               srcset=""
148
               srcset=""
150
-              v-else
149
+
151
             />
150
             />
152
           </p>
151
           </p>
152
+          <p v-else>
153
+            医师: {{ item.doctor ? item.doctor : "" }}
154
+          </p>
153
           <p>日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}</p>
155
           <p>日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}</p>
154
         </div>
156
         </div>
155
         <div class="doctorBox" v-else>
157
         <div class="doctorBox" v-else>
234
   methods: {
236
   methods: {
235
     // 电子签名
237
     // 电子签名
236
     setAdminUserES(id,name) {
238
     setAdminUserES(id,name) {
239
+      console.log(id)
240
+      console.log(name)
241
+      console.log(this.operatorMaps)
242
+
243
+
237
       if (id == 0) {
244
       if (id == 0) {
238
         return "";
245
         return "";
239
       }
246
       }

+ 16 - 10
src/xt_pages/outpatientRecord/outpatientRecord.vue View File

50
                         {{scope.row.homel__address}}
50
                         {{scope.row.homel__address}}
51
                     </template>
51
                     </template>
52
                 </el-table-column>
52
                 </el-table-column>
53
-              <el-table-column align="center" prop="name" width="160" label="鉴定定点医药机构编码">
54
-                <template slot-scope="scope">
55
-                  <el-input v-model="hospital_code"></el-input>
56
-                </template>
57
-              </el-table-column>
58
-                <el-table-column align="center" prop="name" width="160" label="鉴定定点医药机构">
59
-                    <template slot-scope="scope">
60
-                       <el-input v-model="hospital_name"></el-input>
61
-                    </template>
62
-                </el-table-column>
53
+<!--              <el-table-column align="center" prop="name" width="160" label="鉴定定点医药机构编码">-->
54
+<!--                <template slot-scope="scope">-->
55
+<!--                  <el-input v-model="hospital_code"></el-input>-->
56
+<!--                </template>-->
57
+<!--              </el-table-column>-->
58
+<!--                <el-table-column align="center" prop="name" width="160" label="鉴定定点医药机构">-->
59
+<!--                    <template slot-scope="scope">-->
60
+<!--                       <el-input v-model="hospital_name"></el-input>-->
61
+<!--                    </template>-->
62
+<!--                </el-table-column>-->
63
                 <el-table-column align="center" prop="name" label="医生">
63
                 <el-table-column align="center" prop="name" label="医生">
64
                     <template slot-scope="scope">
64
                     <template slot-scope="scope">
65
                         <el-select v-model="scope.row.record.doctor_id" placeholder="请选择"
65
                         <el-select v-model="scope.row.record.doctor_id" placeholder="请选择"
148
                         </el-select>
148
                         </el-select>
149
                     </el-form-item>
149
                     </el-form-item>
150
 
150
 
151
+                  <el-form-item label="鉴定医院名称" >
152
+                    <el-input v-model="hospital_name"></el-input>-->
153
+                  </el-form-item>
154
+                  <el-form-item label="鉴定医院机构编码" >
155
+                    <el-input v-model="hospital_code"></el-input>-->
156
+                  </el-form-item>
151
                   <el-form-item label="医院鉴定日期" >
157
                   <el-form-item label="医院鉴定日期" >
152
                     <el-date-picker
158
                     <el-date-picker
153
                         v-model="check_date"
159
                         v-model="check_date"

+ 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]

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


+ 125 - 62
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">
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) {

+ 60 - 15
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
       });
1593
 
1594
 
1594
       this.smartVisible = true;
1595
       this.smartVisible = true;
1595
     },
1596
     },
1596
-    SetSmartSch(tempData) {
1597
-        this.saveActionThree(tempData);
1597
+    SetSmartSch(tempData,delData) {
1598
+        this.saveActionThree(tempData,delData);
1598
     },
1599
     },
1599
     check(tempData) {
1600
     check(tempData) {
1600
       let isJiXu = true;
1601
       let isJiXu = true;
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
+
1699
+      console.log(delData)
1668
       for (let i = 0; i < tempData.length; i++) {
1700
       for (let i = 0; i < tempData.length; i++) {
1669
         if (tempData[i].jihao_id == "" || tempData[i].zone_id == "") {
1701
         if (tempData[i].jihao_id == "" || tempData[i].zone_id == "") {
1670
           this.$message.error("分区或者床位不能空");
1702
           this.$message.error("分区或者床位不能空");
1673
           return;
1705
           return;
1674
         }
1706
         }
1675
       }
1707
       }
1676
-
1677
       this.isEdit = true
1708
       this.isEdit = true
1678
-      this.$emit("saveData", tempData);
1709
+      this.$emit("saveData", tempData,delData);
1679
     },changeJihao(){
1710
     },changeJihao(){
1680
 
1711
 
1681
       this.$forceUpdate()
1712
       this.$forceUpdate()
1928
 
1959
 
1929
       }
1960
       }
1930
 
1961
 
1962
+    },    deepClone(source) {
1963
+      if (!source && typeof source !== 'object') {
1964
+        throw new Error('error arguments', 'shallowClone')
1965
+      }
1966
+      const targetObj = source.constructor === Array ? [] : {}
1967
+      Object.keys(source).forEach((keys) => {
1968
+        if (source[keys] && typeof source[keys] === 'object') {
1969
+          targetObj[keys] = this.deepClone(source[keys])
1970
+        } else {
1971
+          targetObj[keys] = source[keys]
1972
+        }
1973
+      })
1974
+      return targetObj
1931
     },
1975
     },
1976
+
1932
     handleSelect(val) {
1977
     handleSelect(val) {
1933
       for (let i = 0; i < this.editableTabs.length; i++) {
1978
       for (let i = 0; i < this.editableTabs.length; i++) {
1934
         this.editableTabs[i].tableWeekArrage = [];
1979
         this.editableTabs[i].tableWeekArrage = [];
2008
           }
2053
           }
2009
 
2054
 
2010
           this.editableTabs = data;
2055
           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)
2056
+          this.current_patient_data = this.deepClone(data);
2057
+          this.current_all_schtemplate = data
2014
         } else {
2058
         } else {
2015
         }
2059
         }
2016
       });
2060
       });
2134
       this.cur_info.patient_name = row.name;
2178
       this.cur_info.patient_name = row.name;
2135
       this.cur_info.patient_id = row.id;
2179
       this.cur_info.patient_id = row.id;
2136
     },
2180
     },
2137
-    dragstartTwo(event, item) {
2138
-      console.log("start的索引", item.moveIndex);
2181
+    dragstartTwo(event) {
2182
+      console.log("start的索引");
2139
     },
2183
     },
2140
     dragendTwo(event) {
2184
     dragendTwo(event) {
2141
-      console.log("dragend", event);
2185
+      console.log("dragend");
2142
     },
2186
     },
2143
     drag(e, day, index, name) {
2187
     drag(e, day, index, name) {
2144
       //开始
2188
       //开始
2896
         });
2940
         });
2897
       }
2941
       }
2898
     },
2942
     },
2899
-    saveActionThree: function (val) {
2943
+    saveActionThree: function (val,delData) {
2900
       updateEditSchedules(
2944
       updateEditSchedules(
2901
         JSON.stringify(val),
2945
         JSON.stringify(val),
2946
+        JSON.stringify(delData),
2902
       ).then((rs) => {
2947
       ).then((rs) => {
2903
         var resp = rs.data;
2948
         var resp = rs.data;
2904
         if (resp.state == 1) {
2949
         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)

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

3188
       })
3188
       })
3189
 
3189
 
3190
 
3190
 
3191
-    },saveData(val){
3191
+    },saveData(val,del_data){
3192
       var tempDataOne = []
3192
       var tempDataOne = []
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){
3196
       if(tempDataOne.length > 0){
3197
-        this.$refs.table.SetSmartSch(tempDataOne)
3197
+        this.$refs.table.SetSmartSch(tempDataOne,del_data)
3198
       }
3198
       }
3199
     },
3199
     },
3200
     getWeekPanels(val) {
3200
     getWeekPanels(val) {