Browse Source

批量打印

XMLWAN 4 years ago
parent
commit
30dcd4c6f3

+ 1 - 1
src/xt_pages/dialysis/components/consumables.vue View File

@@ -42,7 +42,7 @@
42 42
         </div>
43 43
       </div>
44 44
       <div>
45
-        <el-button size="small" icon="el-icon-printer" @click="exportList" type="primary">导出</el-button>
45
+        <!-- <el-button size="small" icon="el-icon-printer" @click="exportList" type="primary">导出</el-button> -->
46 46
         <el-button size="small" type="primary" @click="statistics">统计表</el-button>
47 47
       </div>
48 48
     </div>

+ 416 - 0
src/xt_pages/workforce/components/nextTableWeeks.vue View File

@@ -0,0 +1,416 @@
1
+<template>
2
+  <div>
3
+    <div class="cell clearfix" style="float: right">
4
+      <el-button
5
+        style="float: right"
6
+        size="small"
7
+        icon="el-icon-printer"
8
+        @click="printAction()"
9
+        type="primary"
10
+        >打印
11
+      </el-button>
12
+    </div>
13
+
14
+    <div class="cell clearfix">
15
+      <label class="title"> <span class="name">时间</span> : </label>
16
+      <div class="time">
17
+        <ul class>
18
+          <li
19
+            :class="item.id == week_type ? 'active' : ''"
20
+            @click="selectWeekType(item.id)"
21
+            v-for="item in weekArr"
22
+            :key="item.id"
23
+          >
24
+            {{ item.name }}
25
+          </li>
26
+        </ul>
27
+      </div>
28
+      
29
+      <div  class="title"><span class="name">班 次</span> :</div>
30
+      <div class="time">
31
+        <ul class>
32
+          <li
33
+            :class="item.id == week_time ? 'active' : ''"
34
+            @click="selectWeekTime(item.id)"
35
+            v-for="item in weekTimes"
36
+            :key="item.id"
37
+          >
38
+            {{ item.name }}
39
+          </li>
40
+        </ul>
41
+      </div>
42
+    </div>
43
+    <el-table
44
+      :row-style="{ color: '#303133' }"
45
+      :data="scheduleData"
46
+      border
47
+      :header-cell-style="{
48
+        backgroundColor: 'rgb(245, 247, 250)',
49
+        color: '#606266'
50
+      }"
51
+      style="width: 100%"
52
+    >
53
+      <el-table-column label="姓名" min-width="100" align="center">
54
+        <template slot-scope="scope">
55
+          {{ scope.row.patient }}
56
+        </template>
57
+      </el-table-column>
58
+      <el-table-column label="分区" min-width="70" align="center">
59
+        <template slot-scope="scope">
60
+          {{ scope.row.zone.name }}
61
+        </template>
62
+      </el-table-column>
63
+      <el-table-column label="班次" min-width="70" align="center">
64
+        <template slot-scope="scope">
65
+          {{ getSchedulesType(scope.row.schedule_type) }}
66
+        </template>
67
+      </el-table-column>
68
+      <el-table-column label="机号" min-width="70" align="center">
69
+        <template slot-scope="scope">
70
+          {{ scope.row.number.number }}
71
+        </template>
72
+      </el-table-column>
73
+      <el-table-column label="透析模式" min-width="100" align="center">
74
+        <template slot-scope="scope">
75
+          {{
76
+            scope.row.mode_id && modeOptions[scope.row.mode_id]
77
+              ? modeOptions[scope.row.mode_id].name
78
+              : ""
79
+          }}
80
+        </template>
81
+      </el-table-column>
82
+      <el-table-column label="透析器" min-width="100" align="center">
83
+        <template slot-scope="scope">
84
+          {{ scope.row.prescription.dialyzer_perfusion_apparatus }}
85
+        </template>
86
+      </el-table-column>
87
+      <el-table-column label="抗凝剂" min-width="100" align="center">
88
+        <template slot-scope="scope">
89
+          <span v-if="scope.row.prescription.anticoagulant === 1">无肝素</span>
90
+          <span v-if="scope.row.prescription.anticoagulant === 2"
91
+            >普通肝素</span
92
+          >
93
+          <span v-if="scope.row.prescription.anticoagulant === 3"
94
+            >低分子肝素</span
95
+          >
96
+          <span v-if="scope.row.prescription.anticoagulant === 4"
97
+            >阿加曲班</span
98
+          >
99
+          <span v-if="scope.row.prescription.anticoagulant === 5"
100
+            >枸橼酸钠</span
101
+          >
102
+          <span v-if="scope.row.prescription.anticoagulant === 6"
103
+            >低分子肝素钙</span
104
+          >
105
+          <span v-if="scope.row.prescription.anticoagulant === 7"
106
+            >低分子肝素钠</span
107
+          >
108
+        </template>
109
+      </el-table-column>
110
+      <el-table-column label="总量" min-width="100" align="center">
111
+        <template slot-scope="scope">
112
+          <span v-if="scope.row.prescription.anticoagulant == 1">{{
113
+            scope.row.prescription.anticoagulant_zongliang
114
+              ? scope.row.prescription.anticoagulant_zongliang + "mg"
115
+              : ""
116
+          }}</span>
117
+          <span v-if="scope.row.prescription.anticoagulant == 2">{{
118
+            scope.row.prescription.anticoagulant_zongliang
119
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
120
+              : ""
121
+          }}</span>
122
+          <span v-if="scope.row.prescription.anticoagulant == 3">{{
123
+            scope.row.prescription.anticoagulant_zongliang
124
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
125
+              : ""
126
+          }}</span>
127
+          <span v-if="scope.row.prescription.anticoagulant == 4">{{
128
+            scope.row.prescription.anticoagulant_zongliang
129
+              ? scope.row.prescription.anticoagulant_zongliang + "mg"
130
+              : ""
131
+          }}</span>
132
+          <span v-if="scope.row.prescription.anticoagulant == 5">{{
133
+            scope.row.prescription.anticoagulant_zongliang
134
+              ? scope.row.prescription.anticoagulant_zongliang + "mg"
135
+              : ""
136
+          }}</span>
137
+          <span v-if="scope.row.prescription.anticoagulant == 6">{{
138
+            scope.row.prescription.anticoagulant_zongliang
139
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
140
+              : ""
141
+          }}</span>
142
+          <span v-if="scope.row.prescription.anticoagulant == 7">{{
143
+            scope.row.prescription.anticoagulant_zongliang
144
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
145
+              : ""
146
+          }}</span>
147
+        </template>
148
+      </el-table-column>
149
+
150
+      <el-table-column label="长期医嘱" min-width="440" align="center">
151
+        <template slot-scope="scope">
152
+          <span style="white-space: pre">{{
153
+            getAdvice(scope.row.doctor_advice)
154
+          }}</span>
155
+        </template>
156
+      </el-table-column>
157
+    </el-table>
158
+  </div>
159
+</template>
160
+
161
+<script>
162
+import { getNextScheduleWeekDay } from "@/api/schedule";
163
+import WeekItem from "./WeekItem";
164
+const moment = require('moment')
165
+export default {
166
+  name: "tableWeeks",
167
+  props: {
168
+    weekTime: {
169
+      type: String,
170
+      default: "thisWeek"
171
+    }
172
+  },
173
+
174
+  data() {
175
+    return {
176
+      weekArr: [
177
+        { id: 1, name: "周一" },
178
+        { id: 2, name: "周二" },
179
+        { id: 3, name: "周三" },
180
+        { id: 4, name: "周四" },
181
+        { id: 5, name: "周五" },
182
+        { id: 6, name: "周六" },
183
+        { id: 7, name: "周日" }
184
+      ],
185
+      anticoagulants_confit: null,
186
+
187
+      week_type: "1",
188
+      week_time:0,
189
+      weekTimes:[
190
+        {id:0,name:"全部"},
191
+        {id:1,name:"上午"},
192
+        {id:2,name:"下午"},
193
+        {id:3,name:"晚上"},
194
+      ],
195
+      weekTitle: ["", "", "", "", "", "", ""],
196
+      weekData: {
197
+        Monday: [],
198
+        Tuesday: [],
199
+        Wednesday: [],
200
+        Thursday: [],
201
+        Friday: [],
202
+        Saturday: [],
203
+        Sunday: []
204
+      },
205
+      scheduleData: [],
206
+      modeOptions: null
207
+    };
208
+  },
209
+  watch: {
210
+  
211
+    weekTime: function() {
212
+      
213
+      var theType = this.weekType(this.weekTime);
214
+      this.getSchedules(theType);
215
+    }
216
+  },
217
+
218
+  methods: {
219
+    printAction() {
220
+      this.$router.push({
221
+        path: "/schedule/remind/print/next?week_type=" + this.week_type+"&week_time="+this.week_time
222
+      });
223
+    },
224
+    getNextScheduleWeekDay() {
225
+        const params = {
226
+          start_time:moment().week(moment().week() + 1).startOf('week').unix(),
227
+          end_time:moment().week(moment().week() + 1).endOf('week').unix(),
228
+          week_type:this.week_type,
229
+          week_time:this.week_time,
230
+        }
231
+      
232
+      getNextScheduleWeekDay(params).then(response => {
233
+        this.scheduleData = [];
234
+        if (response.data.state == 1) {
235
+          this.scheduleData = response.data.data.schedule;
236
+          console.log("下周数据",response.data.data.schedule)
237
+         
238
+        } else {
239
+          this.$message.error("网络错误");
240
+          return false;
241
+        }
242
+      });
243
+    },
244
+
245
+    weekType(weekTime) {
246
+      var theType = 2;
247
+      switch (weekTime) {
248
+        case "lastWeek":
249
+          theType = 1;
250
+          break;
251
+        case "thisWeek":
252
+          theType = 2;
253
+          break;
254
+        case "nextWeek":
255
+          theType = 3;
256
+          break;
257
+        case "nextTwoWeek":
258
+          theType = 4;
259
+          break;
260
+        default:
261
+          theType = 2;
262
+          break;
263
+      }
264
+      return theType;
265
+    },
266
+    weekPath(week) {
267
+      var weekArr = {
268
+        1: "Monday",
269
+        2: "Tuesday",
270
+        3: "Wednesday",
271
+        4: "Thursday",
272
+        5: "Friday",
273
+        6: "Saturday",
274
+        7: "Sunday"
275
+      };
276
+      if (typeof weekArr[week] == "undefined") {
277
+        return "";
278
+      }
279
+      return weekArr[week];
280
+    },
281
+    selectWeekType(type) {
282
+      this.week_type = type;
283
+      // let params = {
284
+      //   week_type: this.week_type
285
+      // };
286
+      this.getNextScheduleWeekDay();
287
+    },
288
+    selectWeekTime(type){
289
+       this.week_time = type
290
+       this.getNextScheduleWeekDay()
291
+    },
292
+
293
+    getSchedulesType: function(type) {
294
+      let type_name = "";
295
+      switch (type) {
296
+        case 1:
297
+          type_name = "上午";
298
+          break;
299
+        case 2:
300
+          type_name = "下午";
301
+          break;
302
+        case 3:
303
+          type_name = "晚上";
304
+          break;
305
+      }
306
+      return type_name;
307
+    },
308
+    getAdvice: function(doctor_advice) {
309
+      if (doctor_advice != null) {
310
+        let name = "";
311
+        for (let i = 0; i < doctor_advice.length; i++) {
312
+          let prescribing_number = "";
313
+          let single_dose = "";
314
+          let drug_spec = "";
315
+
316
+          if (doctor_advice[i].prescribing_number > 0) {
317
+            prescribing_number =
318
+              doctor_advice[i].prescribing_number +
319
+              doctor_advice[i].prescribing_number_unit;
320
+          }
321
+          if (doctor_advice[i].single_dose > 0) {
322
+            single_dose =
323
+              " 单次用量 " +
324
+              doctor_advice[i].single_dose +
325
+              doctor_advice[i].single_dose_unit;
326
+          }
327
+
328
+          if (doctor_advice[i].drug_spec > 0) {
329
+            drug_spec =
330
+              doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit;
331
+          }
332
+
333
+          name =
334
+            name +
335
+            doctor_advice[i].advice_name +
336
+            " " +
337
+            drug_spec +
338
+            " " +
339
+            prescribing_number +
340
+            " " +
341
+            single_dose +
342
+            " " +
343
+            doctor_advice[i].delivery_way +
344
+            " " +
345
+            doctor_advice[i].execution_frequency +
346
+            " " +
347
+            doctor_advice[i].remark +
348
+            "\n";
349
+
350
+          if (doctor_advice[i].child.length > 0) {
351
+            for (let a = 0; a < doctor_advice[i].child.length; a++) {
352
+              if (doctor_advice[i].child[a].prescribing_number > 0) {
353
+                doctor_advice[i].child[a]["presc"] =
354
+                  doctor_advice[i].child[a].prescribing_number +
355
+                  doctor_advice[i].child[a].prescribing_number_unit;
356
+              } else {
357
+                doctor_advice[i].child[a]["presc"] = "";
358
+              }
359
+
360
+              if (doctor_advice[i].child[a].single_dose > 0) {
361
+                doctor_advice[i].child[a]["single"] =
362
+                  " " +
363
+                  " 单次用量 " +
364
+                  " " +
365
+                  doctor_advice[i].child[a].single_dose +
366
+                  doctor_advice[i].child[a].single_dose_unit;
367
+              } else {
368
+                doctor_advice[i].child[a]["single"] = "";
369
+              }
370
+
371
+              name =
372
+                name +
373
+                "▲" +
374
+                doctor_advice[i].child[a].advice_name +
375
+                "" +
376
+                doctor_advice[i].child[a].advice_desc +
377
+                doctor_advice[i].child[a].drug_spec_unit +
378
+                doctor_advice[i].child[a].presc +
379
+                doctor_advice[i].child[a].single +
380
+                "\n";
381
+            }
382
+          }
383
+        }
384
+        return name;
385
+      }
386
+    }
387
+  },
388
+  components: {
389
+    WeekItem
390
+  },
391
+  created() {
392
+    this.modeOptions = this.$store.getters.treatment_mode;
393
+    this.anticoagulants_confit = this.$store.getters.anticoagulants_confit;
394
+    console.log("抗凝机", this.anticoagulants_confit);
395
+    this.week_type = new Date().getDay();
396
+    if (this.week_type == 0) {
397
+      this.week_type = 7;
398
+    }
399
+    this.getNextScheduleWeekDay();
400
+  }
401
+};
402
+</script>
403
+
404
+<style rel="stylesheet/css" lang="scss">
405
+.el-table td,
406
+.el-table th.is-leaf,
407
+.el-table--border,
408
+.el-table--group {
409
+  border-color: #d0d3da;
410
+}
411
+.el-table--border::after,
412
+.el-table--group::after,
413
+.el-table::before {
414
+  background-color: #d0d3da;
415
+}
416
+</style>

+ 348 - 0
src/xt_pages/workforce/next_remind_print.vue View File

@@ -0,0 +1,348 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+      <el-row style="float:right;">
6
+        <el-col :span="24">
7
+          <el-button
8
+            size="small"
9
+            icon="el-icon-printer"
10
+            type="primary"
11
+            @click="printAction"
12
+            >打印</el-button
13
+          >
14
+        </el-col>
15
+      </el-row>
16
+    </div>
17
+    <div class="app-container" style="background-color: white;">
18
+      <div id="print_content">
19
+        <div class="print_main_content">
20
+          <div class="order_title_panl">
21
+            <span class="main_title">{{day}}排班提醒({{ currentDate }})</span>
22
+          </div>
23
+          <div class="table_panel">
24
+            <table class="table">
25
+              <thead>
26
+                <tr>
27
+                  <!-- <td :width="td_1_width">姓名</td>
28
+                  <td :width="td_1_width">分区</td>
29
+                  <td :width="td_1_width">班次</td>
30
+                  <td :width="td_1_width">机号</td>
31
+                  <td :width="td_1_width">透析模式</td>
32
+                  <td :width="td_2_width">透析器</td>
33
+                  <td :width="td_2_width">抗凝剂</td>
34
+                  <td :width="td_2_width">低分子肝素</td>
35
+                  <td :width="td_4_width">长期医嘱</td> -->
36
+                  <td width="100">姓名</td>
37
+                  <td width="70">分区</td>
38
+                  <td width="70">班次</td>
39
+                  <td width="70">机号</td>
40
+                  <td width="120">透析模式</td>
41
+                  <td width="100">透析器</td>
42
+                  <td width="120">抗凝剂</td>
43
+                  <td width="100">总量</td>
44
+                  <td width="300">长期医嘱</td>
45
+                </tr>
46
+              </thead>
47
+              <tbody>
48
+              <tr v-for="(main_collection, index) in scheduleData" :key="index">
49
+                <td :width="td_1_width">{{ main_collection.patient}}</td>
50
+                <td :width="td_1_width">{{ main_collection.zone.name }}</td>
51
+                <td :width="td_1_width">
52
+                  {{getSchedulesType(main_collection.schedule_type)}}
53
+                </td>
54
+                <td :width="td_1_width">
55
+                  {{main_collection.number.number}}
56
+
57
+                </td>
58
+                <td :width="td_1_width">
59
+                  {{modeOptions[main_collection.mode_id].name}}
60
+                </td>
61
+                <td :width="td_1_width">
62
+                  {{main_collection.prescription.dialyzer_perfusion_apparatus}}
63
+
64
+
65
+                </td>
66
+                <td :width="td_1_width">
67
+                  {{ main_collection.prescription.anticoagulant ? anticoagulants_confit[main_collection.prescription.anticoagulant].name : ''}}
68
+
69
+                </td>
70
+                <td :width="td_1_width">
71
+                  <span v-if="main_collection.prescription.anticoagulant == 1">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
72
+                  <span v-if="main_collection.prescription.anticoagulant == 2">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
73
+                  <span v-if="main_collection.prescription.anticoagulant == 3">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
74
+                  <span v-if="main_collection.prescription.anticoagulant == 4">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
75
+                  <span v-if="main_collection.prescription.anticoagulant == 5">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
76
+                  <span v-if="main_collection.prescription.anticoagulant == 6">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
77
+                  <span v-if="main_collection.prescription.anticoagulant == 7">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
78
+                </td>
79
+                <td :width="td_4_width" style="text-align:left" >
80
+                  <span style="white-space: pre">{{getAdvice(main_collection.doctor_advice)}}</span>
81
+                </td>
82
+              </tr>
83
+              </tbody>
84
+            </table>
85
+          </div>
86
+        </div>
87
+      </div>
88
+    </div>
89
+  </div>
90
+</template>
91
+
92
+<script>
93
+  import { getNextScheduleWeekDay } from '@/api/schedule'
94
+  import { parseTime } from '@/utils'
95
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
96
+  import print from 'print-js'
97
+  const moment = require('moment') 
98
+  export default {
99
+    name: 'SchedulePrint',
100
+    data() {
101
+      return {
102
+        crumbs: [
103
+          { path: false, name: '排班提醒' },
104
+          { path: false, name: '排班提醒打印' }
105
+        ],
106
+        scheduleData:[],
107
+        week_type: 0,
108
+        day:'',
109
+        td_1_width: '10%',
110
+        td_2_width: '10%',
111
+        td_3_width: '25%',
112
+        td_4_width: '45%',
113
+        modeOptions: null,
114
+        anticoagulants_confit:null,
115
+        currentDate:'',
116
+        start_time:moment().week(moment().week() + 1).startOf('week').unix(),
117
+        end_time:moment().week(moment().week() + 1).endOf('week').unix(),
118
+      }
119
+    },
120
+    components: {
121
+      BreadCrumb
122
+    },
123
+    created() {
124
+     this.currentDate = this.getCurrentDate()
125
+      this.modeOptions = this.$store.getters.treatment_mode
126
+      this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
127
+      this.week_type = this.$route.query.week_type
128
+      this.week_time  = this.$route.query.week_time
129
+      
130
+      const params = {
131
+          week_type:this.week_type,
132
+          week_time:this.week_time,
133
+          start_time:this.start_time,
134
+          end_time:this.end_time,
135
+        }
136
+      console.log("打印下周",params)
137
+      getNextScheduleWeekDay(params).then(rs => {
138
+        var resp = rs.data
139
+        console.log(resp)
140
+        if (resp.state == 1) {
141
+          this.scheduleData = resp.data.schedule
142
+        } else {
143
+          this.$message.error(resp.msg)
144
+        }
145
+      }).catch(err => {
146
+        this.$message.error(err)
147
+      })
148
+    },
149
+    methods: {
150
+      getAdvice:function(doctor_advice) {
151
+        if (doctor_advice != null) {
152
+
153
+        let name = ""
154
+        for (let i = 0; i< doctor_advice.length; i++) {
155
+
156
+          let prescribing_number = ''
157
+          let single_dose = ''
158
+          let drug_spec = ''
159
+
160
+          if (doctor_advice[i].prescribing_number > 0) {
161
+            prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
162
+          }
163
+          if (doctor_advice[i].single_dose > 0) {
164
+            single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
165
+          }
166
+
167
+          if (doctor_advice[i].drug_spec > 0) {
168
+            drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
169
+          }
170
+
171
+          name = name + doctor_advice[i].advice_name + " " + drug_spec + " " + prescribing_number + " " + single_dose + " " + doctor_advice[i].delivery_way + " " + doctor_advice[i].execution_frequency + " " + doctor_advice[i].remark + "\n"
172
+
173
+          if (doctor_advice[i].child.length > 0) {
174
+
175
+            for (let a = 0; a < doctor_advice[i].child.length; a++) {
176
+
177
+              if (doctor_advice[i].child[a].prescribing_number > 0) {
178
+                doctor_advice[i].child[a]['presc'] = doctor_advice[i].child[a].prescribing_number + doctor_advice[i].child[a].prescribing_number_unit
179
+              } else {
180
+                doctor_advice[i].child[a]['presc'] = ''
181
+              }
182
+
183
+              if (doctor_advice[i].child[a].single_dose > 0) {
184
+                doctor_advice[i].child[a]['single'] = " " + ' 单次用量 ' + " " + doctor_advice[i].child[a].single_dose + doctor_advice[i].child[a].single_dose_unit
185
+              } else {
186
+                doctor_advice[i].child[a]['single'] = ''
187
+              }
188
+
189
+              name = name + "▲" + doctor_advice[i].child[a].advice_name + ""
190
+                + doctor_advice[i].child[a].advice_desc
191
+                + doctor_advice[i].child[a].drug_spec_unit
192
+                + doctor_advice[i].child[a].presc
193
+                + doctor_advice[i].child[a].single + "\n"
194
+            }
195
+
196
+          }
197
+        }
198
+          return name
199
+
200
+
201
+        }
202
+
203
+      },
204
+      printAction: function() {
205
+        const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
206
+
207
+        printJS({
208
+          printable: 'print_content',
209
+          type: 'html',
210
+          documentTitle: '  ',
211
+          style: style,
212
+          scanStyles: false
213
+        })
214
+      }, getSchedulesType: function(type) {
215
+        let type_name = ''
216
+        switch (type) {
217
+          case 1:
218
+            type_name = '上午'
219
+            break
220
+          case 2:
221
+            type_name = '下午'
222
+            break
223
+          case 3:
224
+            type_name = '晚上'
225
+            break
226
+        }
227
+        return type_name
228
+      },
229
+      getCurrentDate: function () {
230
+        console.log(this.$route.query.week_type)
231
+        var myDate = new Date();
232
+        var year = myDate.getFullYear(); //年
233
+        var month = myDate.getMonth() + 1; //月
234
+        var day = myDate.getDate() + 7; //日
235
+        var newday = myDate.getDay();
236
+        var days = parseInt(this.$route.query.week_type);
237
+        var dayNum = parseInt(this.$route.query.week_type);
238
+        switch(days) {
239
+          case 1:
240
+            days = '星期一';
241
+            break;
242
+          case 2:
243
+            days = '星期二';
244
+            break;
245
+          case 3:
246
+            days = '星期三';
247
+            break;
248
+          case 4:
249
+            days = '星期四';
250
+            break;
251
+          case 5:
252
+            days = '星期五';
253
+            break;
254
+          case 6:
255
+            days = '星期六';
256
+            break;
257
+          case 7:
258
+            days = '星期日';
259
+            break;
260
+        }
261
+        if(newday > dayNum){
262
+          let lastDay = day - (newday - dayNum)
263
+          console.log("lastDay1",lastDay)
264
+          var str = year + "年" + month + "月" + lastDay + "日  " + days;
265
+          return str;
266
+        }else if(newday < dayNum){
267
+          let lastDay = day + (dayNum - newday)
268
+          console.log("lastDay2",lastDay)
269
+          var str = year + "年" + month + "月" + lastDay + "日  " + days;
270
+          return str;
271
+        }else{
272
+          var str = year + "年" + month + "月" + day + "日  " + days;
273
+          return str;
274
+        }
275
+        
276
+        
277
+      }
278
+    }
279
+  }
280
+</script>
281
+
282
+<style rel="stylesheet/scss" lang="scss" scoped>
283
+.print_main_content {
284
+  background-color: white;
285
+  max-width: 1500px;
286
+  margin: 0 auto;
287
+  padding: 0 0 20px 0;
288
+
289
+  .order_title_panl {
290
+    text-align: center;
291
+
292
+    .main_title {
293
+      font-size: 18px;
294
+      line-height: 40px;
295
+      font-weight: 500;
296
+    }
297
+  }
298
+  .table_panel {
299
+    .table {
300
+      width: 100%;
301
+      border: 1px solid;
302
+      border-collapse: collapse;
303
+      padding: 2px;
304
+
305
+      thead {
306
+        tr {
307
+          td {
308
+            border: 1px solid;
309
+            text-align: center;
310
+            font-size: 20px;
311
+            padding: 15px 5px;
312
+          }
313
+        }
314
+      }
315
+      tbody {
316
+        tr {
317
+          td {
318
+            border: 1px solid;
319
+            text-align: center;
320
+            font-size: 18px;
321
+            padding: 10px 5px;
322
+
323
+            .proj {
324
+              padding: 5px 0;
325
+              text-align: left;
326
+
327
+              .proj_title {
328
+                font-size: 16px;
329
+                font-weight: 500;
330
+                line-height: 25px;
331
+              }
332
+
333
+              .proj_item {
334
+                font-size: 15px;
335
+                line-height: 20px;
336
+
337
+                .zone_name {
338
+                  font-weight: 500;
339
+                }
340
+              }
341
+            }
342
+          }
343
+        }
344
+      }
345
+    }
346
+  }
347
+}
348
+</style>