Selaa lähdekoodia

Merge branch '20230223_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20230223_pc_vue_new_branch

28169 1 vuosi sitten
vanhempi
commit
a9dda59bdc
24 muutettua tiedostoa jossa 4269 lisäystä ja 174 poistoa
  1. 10 0
      src/api/his/his.js
  2. 9 0
      src/api/qcd.js
  3. 10 1
      src/router/modules/Dialysisanalysis.js
  4. 686 0
      src/xt_pages/Dialysisanalysis/platelets/all_ktv.vue
  5. 684 0
      src/xt_pages/Dialysisanalysis/platelets/all_urr.vue
  6. 28 10
      src/xt_pages/Dialysisanalysis/platelets/index.vue
  7. 643 0
      src/xt_pages/Dialysisanalysis/platelets/p_ktv.vue
  8. 647 0
      src/xt_pages/Dialysisanalysis/platelets/p_urr.vue
  9. 275 0
      src/xt_pages/Dialysisanalysis/summary/index.vue
  10. 50 16
      src/xt_pages/dialysis/batch_print/batch_print_order_sixtyseven.vue
  11. 10 10
      src/xt_pages/dialysis/dialysisPrintOrder.vue
  12. 50 49
      src/xt_pages/dialysis/template/DialysisPrintOrdersixtySeven.vue
  13. 10 3
      src/xt_pages/outpatientCharges/statementTemplate/privateChargePrint.vue
  14. 2 2
      src/xt_pages/outpatientCharges/summary.vue
  15. 128 10
      src/xt_pages/outpatientDoctorStation/batch_print_checkTemplate/printOne.vue
  16. 696 0
      src/xt_pages/outpatientDoctorStation/batch_print_checkTemplate/printTwo.vue
  17. 2 4
      src/xt_pages/outpatientDoctorStation/pastInquiries.vue
  18. 2 1
      src/xt_pages/outpatientDoctorStation/print.vue
  19. 20 25
      src/xt_pages/outpatientDoctorStation/template/prinSeven.vue
  20. 9 10
      src/xt_pages/outpatientDoctorStation/treatTemplate/printOne.vue
  21. 13 0
      src/xt_pages/outpatientTool/components/batchPrint.vue
  22. 33 0
      src/xt_pages/outpatientTool/components/detail.vue
  23. 206 26
      src/xt_pages/outpatientTool/components/settle.vue
  24. 46 7
      src/xt_pages/outpatientTool/labelPrint.vue

+ 10 - 0
src/api/his/his.js Näytä tiedosto

@@ -827,6 +827,16 @@ export function getMonthHisPatient(params){
827 827
 }
828 828
 
829 829
 
830
+export function changeOrderDesc(params){
831
+  return request({
832
+    url:"/api/changeorderdesc",
833
+    method:"get",
834
+    params:params
835
+  })
836
+}
837
+
838
+
839
+
830 840
 
831 841
 
832 842
 

+ 9 - 0
src/api/qcd.js Näytä tiedosto

@@ -135,6 +135,15 @@ export function GetAllQCStatistisData(params) {
135 135
 
136 136
 
137 137
 
138
+export function GetFiveInstatistisc(params) {
139
+  return request({
140
+    url: '/api/qc/patientinspectionstatistis/get',
141
+    method: 'get',
142
+    params: params
143
+  })
144
+}
145
+
146
+
138 147
 
139 148
 
140 149
 

+ 10 - 1
src/router/modules/Dialysisanalysis.js Näytä tiedosto

@@ -11,6 +11,15 @@ export default {
11 11
     icon: 'statistics'
12 12
   },
13 13
   children: [
14
+    {
15
+      path: '/Dialysisanalysis/qualitycontrol/summary',
16
+      component: () => import('@/xt_pages/Dialysisanalysis/summary/index'),
17
+      name: 'summary',
18
+      meta: {
19
+        title: '指标汇总',
20
+        noCache: true
21
+      }
22
+    },
14 23
     {
15 24
       path: '/Dialysisanalysis/qualitycontrol/thyroidGland',
16 25
       component: () => import('@/xt_pages/Dialysisanalysis/qualitycontrol/thyroidGland'),
@@ -67,7 +76,7 @@ export default {
67 76
       component: () => import('@/xt_pages/Dialysisanalysis/platelets/index'),
68 77
       name: 'thyroidGland',
69 78
       meta: {
70
-        title: '血小板',
79
+        title: 'KTV/URR',
71 80
         noCache: true
72 81
       }
73 82
     },{

+ 686 - 0
src/xt_pages/Dialysisanalysis/platelets/all_ktv.vue Näytä tiedosto

@@ -0,0 +1,686 @@
1
+<template>
2
+  <div>
3
+    <el-row :gutter="25">
4
+      <el-col :span="5">
5
+        <div class="block">
6
+          <span>查询时间:</span>
7
+          <el-select size="small" v-model="time_type" placeholder="请选择"
8
+                     style="width:150px;margin-left:10px;" @change="changeItem">
9
+            <el-option
10
+              v-for="item,index in times"
11
+              :key="index"
12
+              :label="item.label"
13
+              :value="item.value">
14
+            </el-option>
15
+          </el-select>
16
+        </div>
17
+      </el-col>
18
+      <el-col :span="8">
19
+        <div>
20
+          <el-date-picker
21
+            style="width: 200px"
22
+
23
+            v-model="start_time"
24
+            format="yyyy-MM-dd"
25
+            value-format="yyyy-MM-dd"
26
+            type="date"
27
+
28
+            placeholder="选择日期">
29
+          </el-date-picker>
30
+          <span>-</span>
31
+          <el-date-picker
32
+            style="width: 200px"
33
+            v-model="end_time"
34
+            format="yyyy-MM-dd"
35
+            value-format="yyyy-MM-dd"
36
+            type="date"
37
+            placeholder="选择日期">
38
+          </el-date-picker>
39
+        </div>
40
+      </el-col>
41
+      <el-col :span="3">
42
+        <el-button type="primary" @click="getData()">查询</el-button>
43
+      </el-col>
44
+    </el-row>
45
+    <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
46
+      <p class="chartTitle">统计图</p>
47
+    </div>
48
+    <div class="echart" id="mychart" :style={width:width,height:height}></div>
49
+    <div style="width: 80%;margin: auto;">
50
+      <el-table
51
+        :data="tableData"
52
+        border
53
+        :header-cell-style="{
54
+          backgroundColor: 'rgb(245, 247, 250)',
55
+          color: '#606266'
56
+        }"
57
+        style="width: 100%;">
58
+        <el-table-column
59
+          prop="name"
60
+          align="center"
61
+          label="KTV"
62
+
63
+        >
64
+        </el-table-column>
65
+        <el-table-column
66
+          prop="count"
67
+          align="center"
68
+          label="人数"
69
+        >
70
+        </el-table-column>
71
+        <el-table-column
72
+          prop="address"
73
+          align="center"
74
+          label="操作">
75
+          <template slot-scope="scope">
76
+            <el-button @click="handleClick(scope.row)" style="font-size:16px;"
77
+                       type="text">查看详情
78
+            </el-button>
79
+          </template>
80
+        </el-table-column>
81
+      </el-table>
82
+    </div>
83
+    <el-dialog
84
+      width="1000px" class="registerDialog" :visible.sync="detailVisibility"
85
+      :close-on-click-modal="isClose"
86
+      :close-on-press-escape="isClose"
87
+    >
88
+      <el-row :gutter="25">
89
+        <el-col :span="5">
90
+          <div class="block">
91
+            <span>查询时间:</span>
92
+            <el-select size="small" v-model="time_type_two" placeholder="请选择"
93
+                       style="width:100px;margin-left:5px;" @change="changeItemTwo">
94
+              <el-option
95
+                v-for="item,index in times"
96
+                :key="index"
97
+                :label="item.label"
98
+                :value="item.value">
99
+              </el-option>
100
+            </el-select>
101
+          </div>
102
+        </el-col>
103
+        <el-col :span="10">
104
+          <div>
105
+            <el-date-picker
106
+              style="width: 120px"
107
+              v-model="start_time_one"
108
+              format="yyyy-MM-dd"
109
+              value-format="yyyy-MM-dd"
110
+              type="date"
111
+
112
+              placeholder="选择日期">
113
+            </el-date-picker>
114
+            <span>-</span>
115
+            <el-date-picker
116
+              style="width: 120px"
117
+              v-model="end_time_one"
118
+              format="yyyy-MM-dd"
119
+              value-format="yyyy-MM-dd"
120
+              type="date"
121
+              placeholder="选择日期">
122
+            </el-date-picker>
123
+          </div>
124
+        </el-col>
125
+
126
+        <el-col :span="4">
127
+          <div>
128
+
129
+            <el-select size="small" v-model="statistics_type" placeholder="请选择"
130
+                       style="width:100px;margin-left:5px;">
131
+              <el-option
132
+                v-for="item,index in statistics_types"
133
+                :key="index"
134
+                :label="item.label"
135
+                :value="item.value">
136
+              </el-option>
137
+            </el-select>
138
+
139
+          </div>
140
+        </el-col>
141
+
142
+        <!--        <el-col :span="4">-->
143
+        <!--          <div>-->
144
+        <!--            <el-select size="small" v-model="sort_type" placeholder="请选择"-->
145
+        <!--                       style="width:100px;margin-left:5px;">-->
146
+        <!--              <el-option-->
147
+        <!--                v-for="item,index in sort_types"-->
148
+        <!--                :key="index"-->
149
+        <!--                :label="item.label"-->
150
+        <!--                :value="item.value">-->
151
+        <!--              </el-option>-->
152
+        <!--            </el-select>-->
153
+        <!--          </div>-->
154
+        <!--        </el-col>-->
155
+
156
+        <el-col :span="4">
157
+          <div >
158
+            <el-input v-model="keyword" placeholder="请输入患者姓名或透析号"></el-input>
159
+          </div>
160
+        </el-col>
161
+
162
+        <el-col :span="2">
163
+          <div>
164
+            <el-button @click="getDataTwo()">查询</el-button>
165
+          </div>
166
+        </el-col>
167
+
168
+        <el-col :span="2">
169
+          <div>
170
+            <el-button @click="exportAction()">导出</el-button>
171
+          </div>
172
+        </el-col>
173
+
174
+        <!--        <el-col :span="2">-->
175
+        <!--          <div>-->
176
+        <!--            <el-button @click="getDataTwo()">打印</el-button>-->
177
+        <!--          </div>-->
178
+        <!--        </el-col>-->
179
+
180
+
181
+
182
+
183
+
184
+      </el-row>
185
+
186
+      <el-table
187
+        :data="patientTableData"
188
+        border
189
+        ref="table"
190
+        max-height="500px"
191
+        style="width: 100%">
192
+        <el-table-column
193
+          prop="dialysis_no"
194
+          align="center"
195
+          label="透析号"
196
+        >
197
+        </el-table-column>
198
+        <el-table-column
199
+          prop="name"
200
+          label="患者姓名"
201
+        >
202
+        </el-table-column>
203
+        <el-table-column
204
+          prop="date"
205
+          label="检查日期"
206
+        >
207
+        </el-table-column>
208
+
209
+        <el-table-column
210
+          prop="inspect_value"
211
+          label="结果"
212
+        >
213
+        </el-table-column>
214
+
215
+      </el-table>
216
+
217
+      <div slot="footer" class="dialog-footer">
218
+        <el-button @click="detailVisibility = false">取消</el-button>
219
+        <el-button type="primary" @click="detailVisibility = false">确定</el-button>
220
+      </div>
221
+    </el-dialog>
222
+
223
+  </div>
224
+</template>
225
+<script>
226
+import * as echarts from 'echarts'
227
+import { GetAllQCStatistisData, GetQCStatistisData } from '../../../api/qcd'
228
+
229
+const moment = require('moment')
230
+
231
+export default {
232
+  props: {
233
+
234
+    width: {
235
+      type: String,
236
+      default: '100%'
237
+    },
238
+    height: {
239
+      type: String,
240
+      default: '400px'
241
+    }
242
+
243
+  },
244
+  data() {
245
+    return {
246
+      statistics_types:[
247
+        { value: 1, label: '不达标患者' },
248
+        { value: 2, label: '未检查患者' },
249
+        { value: 3, label: '达标患者' },
250
+      ],
251
+      sort_types:[
252
+        { value: 1, label: '时间' },
253
+        { value: 2, label: '患者' },
254
+      ],
255
+      detailVisibility:false,
256
+      isClose:true,
257
+      time_type: 1,
258
+      time_type_two:1,
259
+      times: [
260
+        { value: 1, label: '本月' },
261
+        { value: 2, label: '上月' },
262
+        { value: 3, label: '今年' },
263
+        { value: 4, label: '上一年' },
264
+        { value: 5, label: '第一季度' },
265
+        { value: 6, label: '第二季度' },
266
+        { value: 7, label: '第三季度' },
267
+        { value: 8, label: '第四季度' },
268
+        { value: 9, label: '自定义' }
269
+
270
+      ],
271
+      time_month: '',
272
+      start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
273
+      end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
274
+      start_time_one: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
275
+      end_time_one: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
276
+
277
+      input: '',
278
+      myChart: {},
279
+      pieData: [],
280
+      pieName: [],
281
+      reference:{},
282
+      // myChartStyle:{float: "right", width: "100%", height: "400px"},
283
+      tableData: [],
284
+      statistics_type:1,
285
+      sort_type:"",
286
+      keyword:"",
287
+      patientTableData:[],
288
+    }
289
+  },
290
+  mounted() {
291
+    this.getData()
292
+  },
293
+  methods: {
294
+    exportAction(){
295
+      let list = []
296
+      for (let i = 0; i < this.patientTableData.length; i++) {
297
+        let order = this.patientTableData[i]
298
+        let name = order.name
299
+        let value = order.inspect_value
300
+        let inspect_date = order.date
301
+
302
+        let obj = {
303
+          '姓名': name,
304
+          '数值': value,
305
+          '日期': inspect_date,
306
+        }
307
+        list.push(obj)
308
+      }
309
+      import('@/vendor/Export2Excel').then(excel => {
310
+        const tHeader = ['姓名', '数值', '日期']
311
+        const filterVal = ['姓名', '数值', '日期']
312
+        const data = this.formatJson(filterVal, list)
313
+        excel.export_json_to_excel1({
314
+          header: tHeader,
315
+          data,
316
+          filename: '明细',
317
+          ref: this.$refs['table'].$el
318
+        })
319
+      })
320
+    },
321
+
322
+    formatJson(filterVal, jsonData) {
323
+      return jsonData.map(v => filterVal.map(j => v[j]))
324
+    },
325
+    getDataTwo() {
326
+      if(this.start_time_one.length == 0){
327
+        this.$message.error("请选择开始时间")
328
+      }
329
+      if(this.end_time_one.length == 0){
330
+        this.$message.error("请选择结束时间")
331
+      }
332
+      let params = {
333
+        start_date: this.start_time_one,
334
+        end_date: this.end_time_one,
335
+        item_type:this.statistics_type,
336
+        order_type:this.sort_type,
337
+        keyword: this.keyword,
338
+        type:2,
339
+      }
340
+      this.patientTableData = []
341
+      GetAllQCStatistisData(params).then(response => {
342
+        if (response.data.state == 1) {
343
+          this.detailVisibility = true
344
+          this.patientTableData  =  this.patientTableData.concat(response.data.data.list)
345
+        } else {
346
+          this.$message.error(response.data.msg)
347
+        }
348
+      })
349
+
350
+    },
351
+    getData() {
352
+      if(this.start_time.length == 0){
353
+        this.$message.error("请选择开始时间")
354
+      }
355
+      if(this.end_time.length == 0){
356
+        this.$message.error("请选择结束时间")
357
+      }
358
+      let params = {
359
+        start_date: this.start_time,
360
+        end_date: this.end_time,
361
+        type:2,
362
+
363
+      }
364
+      this.pieData = []
365
+      this.tableData = []
366
+      GetQCStatistisData(params).then(response => {
367
+        if (response.data.state == 1) {
368
+          // this.reference = response.data.data.reference
369
+          // this.input = response.data.data.reference.range_min + "<=" + response.data.data.reference.item_name + "<=" + response.data.data.reference.range_max
370
+          let objone = {
371
+            value:  response.data.data.unusual_total ,
372
+            name: '不达标值患者',
373
+            count:response.data.data.unusual_total,
374
+          }
375
+          this.pieData.push(objone)
376
+          this.tableData.push(objone)
377
+
378
+          let objtwo = {
379
+            value:   response.data.data.normal_total,
380
+            name: '达标值患者',
381
+            count:response.data.data.normal_total,
382
+
383
+          }
384
+          this.pieData.push(objtwo)
385
+          this.tableData.push(objtwo)
386
+
387
+          let objthree = {
388
+            value: response.data.data.no_check_total ,
389
+            name: '未检查患者',
390
+            count:response.data.data.no_check_total,
391
+
392
+          }
393
+          this.pieData.push(objthree)
394
+          this.tableData.push(objthree)
395
+
396
+          let objfour = {
397
+            value: response.data.data.patient_count,
398
+            name: '合计',
399
+            count:response.data.data.patient_count,
400
+          }
401
+          this.tableData.push(objfour)
402
+          for (let i = 0; i < this.pieData.length; i++) {
403
+            this.pieName[i] = this.pieData[i].name
404
+          }
405
+          this.myChart = echarts.init(document.getElementById('mychart'))
406
+          window.addEventListener('resize', () => {
407
+            this.myChart.resize()
408
+          })
409
+          const option = {
410
+            legend: {
411
+              // 图例
412
+              data: this.pieName,
413
+              left: '10%',
414
+              top: '30%',
415
+              orient: 'vertical'
416
+            },
417
+            color: ['#F74587', '#32D79B', '#6590FF'],
418
+
419
+
420
+            title: {
421
+              // 设置饼图标题,位置设为顶部居中
422
+              //   text: "国内院士前五省份图示",
423
+              top: '0%',
424
+              left: 'center'
425
+            },
426
+            series: [
427
+              {
428
+                type: 'pie',
429
+                label: {
430
+                  normal : {
431
+                    formatter: '{b}:{c}: ({d}%)',
432
+                    textStyle : {
433
+                      fontWeight : 'normal',
434
+                      fontSize : 15,
435
+                      color : "black"
436
+                    }
437
+                  }
438
+                  // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})"
439
+                },
440
+                radius: '65%', //饼图半径
441
+                data: this.pieData,
442
+                itemStyle : {
443
+                  emphasis: {
444
+                    shadowBlur: 10,
445
+                    shadowOffsetX: 0,
446
+                    shadowColor: 'rgba(0, 0, 0, 0.5)'
447
+                  }
448
+                }
449
+              }
450
+            ]
451
+          }
452
+          //   console.log(this.seriesData);
453
+          const optionFree = {
454
+            series: [
455
+              {
456
+                data: this.seriesData,
457
+                type: 'line',
458
+                smooth: true
459
+              }
460
+            ]
461
+          }
462
+          this.myChart = echarts.init(document.getElementById('mychart'))
463
+          this.myChart.setOption(option)
464
+        } else {
465
+          this.$message.error(response.data.msg)
466
+        }
467
+      })
468
+
469
+    },
470
+    changeItem(val) {
471
+      const currentDate = new Date()
472
+      switch (val) {
473
+        case 1:
474
+
475
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
476
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
477
+
478
+          this.start_time = startOfMonth
479
+          this.end_time = endOfMonth
480
+          this.getData()
481
+
482
+          break
483
+        case 2:
484
+          // 上月的起始日期和结束日期
485
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
486
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
487
+
488
+          this.start_time = startOfLastMonth
489
+          this.end_time = endOfLastMonth
490
+          this.getData()
491
+
492
+          break
493
+        case 3:
494
+          // 今年的起始日期和结束日期
495
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
496
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
497
+
498
+          this.start_time = startOfYear
499
+          this.end_time = endOfYear
500
+          this.getData()
501
+
502
+          break
503
+        case 4:
504
+          // 上一年的起始日期和结束日期
505
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
506
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
507
+
508
+          this.start_time = startOfLastYear
509
+          this.end_time = endOfLastYear
510
+          this.getData()
511
+
512
+          break
513
+        case 5:
514
+          // 第一季度的起始日期和结束日期
515
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
516
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
517
+
518
+          this.start_time = startOfFirstQuarter
519
+          this.end_time = endOfFirstQuarter
520
+          this.getData()
521
+
522
+          break
523
+        case 6:
524
+          // 第二季度的起始日期和结束日期
525
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
526
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
527
+
528
+          this.start_time = startOfSecondQuarter
529
+          this.end_time = endOfSecondQuarter
530
+          this.getData()
531
+
532
+          break
533
+        case 7:
534
+          // 第三季度的起始日期和结束日期
535
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
536
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
537
+
538
+          this.start_time = startOfThirdQuarter
539
+          this.end_time = endOfThirdQuarter
540
+          this.getData()
541
+
542
+          break
543
+        case 8:
544
+          // 第四季度的起始日期和结束日期
545
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
546
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
547
+
548
+          this.start_time = startOfFourthQuarter
549
+          this.end_time = endOfFourthQuarter
550
+          this.getData()
551
+          break
552
+        case 9:
553
+          this.start_time = ''
554
+          this.end_time = ''
555
+          break
556
+      }
557
+    },
558
+    changeItemTwo(val) {
559
+      const currentDate = new Date()
560
+      switch (val) {
561
+        case 1:
562
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
563
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
564
+          this.start_time_one = startOfMonth
565
+          this.end_time_one = endOfMonth
566
+          // this.getDataTwo()
567
+          break
568
+        case 2:
569
+          // 上月的起始日期和结束日期
570
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
571
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
572
+          this.start_time_one = startOfLastMonth
573
+          this.end_time_one = endOfLastMonth
574
+          // this.getDataTwo()
575
+          break
576
+        case 3:
577
+          // 今年的起始日期和结束日期
578
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
579
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
580
+
581
+          this.start_time_one = startOfYear
582
+          this.end_time_one = endOfYear
583
+          // this.getDataTwo()
584
+
585
+          break
586
+        case 4:
587
+          // 上一年的起始日期和结束日期
588
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
589
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
590
+
591
+          this.start_time_one = startOfLastYear
592
+          this.end_time_one = endOfLastYear
593
+          // this.getDataTwo()
594
+
595
+          break
596
+        case 5:
597
+          // 第一季度的起始日期和结束日期
598
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
599
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
600
+          this.start_time_one = startOfFirstQuarter
601
+          this.end_time_one = endOfFirstQuarter
602
+          // this.getDataTwo()
603
+          break
604
+        case 6:
605
+          // 第二季度的起始日期和结束日期
606
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
607
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
608
+          this.start_time_one = startOfSecondQuarter
609
+          this.end_time_one = endOfSecondQuarter
610
+          // this.getDataTwo()
611
+          break
612
+        case 7:
613
+          // 第三季度的起始日期和结束日期
614
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
615
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
616
+
617
+          this.start_time_one = startOfThirdQuarter
618
+          this.end_time_one = endOfThirdQuarter
619
+          // this.getDataTwo()
620
+
621
+          break
622
+        case 8:
623
+          // 第四季度的起始日期和结束日期
624
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
625
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
626
+
627
+          this.start_time_one = startOfFourthQuarter
628
+          this.end_time_one = endOfFourthQuarter
629
+          // this.getDataTwo()
630
+          break
631
+        case 9:
632
+          this.start_time_one = ''
633
+          this.end_time_one = ''
634
+          break
635
+      }
636
+    },
637
+
638
+
639
+    getSummaries(param) {
640
+      const { columns, data } = param
641
+      const sums = []
642
+      columns.forEach((column, index) => {
643
+        if (index === 0) {
644
+          sums[index] = '总价'
645
+          return
646
+        }
647
+        const values = data.map(item => Number(item[column.property]))
648
+        if (!values.every(value => isNaN(value))) {
649
+          sums[index] = values.reduce((prev, curr) => {
650
+            const value = Number(curr)
651
+            if (!isNaN(value)) {
652
+              return prev + curr
653
+            } else {
654
+              return prev
655
+            }
656
+          }, 0)
657
+          sums[index] += ' 元'
658
+        } else {
659
+          sums[index] = 'N/A'
660
+        }
661
+      })
662
+
663
+      return sums
664
+    },
665
+    handleClick(row) {
666
+      console.log(row)
667
+      if(row.name == "不达标值患者"){
668
+        this.statistics_type = 1
669
+      }else if(row.name == "达标值患者"){
670
+        this.statistics_type = 3
671
+      }else {
672
+        this.statistics_type = 2
673
+      }
674
+      this.getDataTwo()
675
+    }
676
+  }
677
+
678
+}
679
+</script>
680
+<style lang="scss" scoped>
681
+.content_top {
682
+  display: flex;
683
+  justify-content: space-around;
684
+  color: #1e5feb;
685
+}
686
+</style>

+ 684 - 0
src/xt_pages/Dialysisanalysis/platelets/all_urr.vue Näytä tiedosto

@@ -0,0 +1,684 @@
1
+<template>
2
+  <div>
3
+    <el-row :gutter="25">
4
+      <el-col :span="5">
5
+        <div class="block">
6
+          <span>查询时间:</span>
7
+          <el-select size="small" v-model="time_type" placeholder="请选择"
8
+                     style="width:150px;margin-left:10px;" @change="changeItem">
9
+            <el-option
10
+              v-for="item,index in times"
11
+              :key="index"
12
+              :label="item.label"
13
+              :value="item.value">
14
+            </el-option>
15
+          </el-select>
16
+        </div>
17
+      </el-col>
18
+      <el-col :span="8">
19
+        <div>
20
+          <el-date-picker
21
+            style="width: 200px"
22
+
23
+            v-model="start_time"
24
+            format="yyyy-MM-dd"
25
+            value-format="yyyy-MM-dd"
26
+            type="date"
27
+
28
+            placeholder="选择日期">
29
+          </el-date-picker>
30
+          <span>-</span>
31
+          <el-date-picker
32
+            style="width: 200px"
33
+            v-model="end_time"
34
+            format="yyyy-MM-dd"
35
+            value-format="yyyy-MM-dd"
36
+            type="date"
37
+            placeholder="选择日期">
38
+          </el-date-picker>
39
+        </div>
40
+      </el-col>
41
+      <el-col :span="3">
42
+        <el-button type="primary" @click="getData()">查询</el-button>
43
+      </el-col>
44
+    </el-row>
45
+    <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
46
+      <p class="chartTitle">统计图</p>
47
+    </div>
48
+    <div class="echart" id="mychart" :style={width:width,height:height}></div>
49
+    <div style="width: 80%;margin: auto;">
50
+      <el-table
51
+        :data="tableData"
52
+        border
53
+        :header-cell-style="{
54
+          backgroundColor: 'rgb(245, 247, 250)',
55
+          color: '#606266'
56
+        }"
57
+        style="width: 100%;">
58
+        <el-table-column
59
+          prop="name"
60
+          align="center"
61
+          label="URR"
62
+
63
+        >
64
+        </el-table-column>
65
+        <el-table-column
66
+          prop="count"
67
+          align="center"
68
+          label="人数"
69
+        >
70
+        </el-table-column>
71
+        <el-table-column
72
+          prop="address"
73
+          align="center"
74
+          label="操作">
75
+          <template slot-scope="scope">
76
+            <el-button @click="handleClick(scope.row)" style="font-size:16px;"
77
+                       type="text">查看详情
78
+            </el-button>
79
+          </template>
80
+        </el-table-column>
81
+      </el-table>
82
+    </div>
83
+    <el-dialog
84
+      width="1000px" class="registerDialog" :visible.sync="detailVisibility"
85
+      :close-on-click-modal="isClose"
86
+      :close-on-press-escape="isClose"
87
+    >
88
+      <el-row :gutter="25">
89
+        <el-col :span="5">
90
+          <div class="block">
91
+            <span>查询时间:</span>
92
+            <el-select size="small" v-model="time_type_two" placeholder="请选择"
93
+                       style="width:100px;margin-left:5px;" @change="changeItemTwo">
94
+              <el-option
95
+                v-for="item,index in times"
96
+                :key="index"
97
+                :label="item.label"
98
+                :value="item.value">
99
+              </el-option>
100
+            </el-select>
101
+          </div>
102
+        </el-col>
103
+        <el-col :span="10">
104
+          <div>
105
+            <el-date-picker
106
+              style="width: 120px"
107
+              v-model="start_time_one"
108
+              format="yyyy-MM-dd"
109
+              value-format="yyyy-MM-dd"
110
+              type="date"
111
+
112
+              placeholder="选择日期">
113
+            </el-date-picker>
114
+            <span>-</span>
115
+            <el-date-picker
116
+              style="width: 120px"
117
+              v-model="end_time_one"
118
+              format="yyyy-MM-dd"
119
+              value-format="yyyy-MM-dd"
120
+              type="date"
121
+              placeholder="选择日期">
122
+            </el-date-picker>
123
+          </div>
124
+        </el-col>
125
+
126
+        <el-col :span="4">
127
+          <div>
128
+
129
+            <el-select size="small" v-model="statistics_type" placeholder="请选择"
130
+                       style="width:100px;margin-left:5px;">
131
+              <el-option
132
+                v-for="item,index in statistics_types"
133
+                :key="index"
134
+                :label="item.label"
135
+                :value="item.value">
136
+              </el-option>
137
+            </el-select>
138
+
139
+          </div>
140
+        </el-col>
141
+
142
+        <!--        <el-col :span="4">-->
143
+        <!--          <div>-->
144
+        <!--            <el-select size="small" v-model="sort_type" placeholder="请选择"-->
145
+        <!--                       style="width:100px;margin-left:5px;">-->
146
+        <!--              <el-option-->
147
+        <!--                v-for="item,index in sort_types"-->
148
+        <!--                :key="index"-->
149
+        <!--                :label="item.label"-->
150
+        <!--                :value="item.value">-->
151
+        <!--              </el-option>-->
152
+        <!--            </el-select>-->
153
+        <!--          </div>-->
154
+        <!--        </el-col>-->
155
+
156
+        <el-col :span="4">
157
+          <div >
158
+            <el-input v-model="keyword" placeholder="请输入患者姓名或透析号"></el-input>
159
+          </div>
160
+        </el-col>
161
+
162
+        <el-col :span="2">
163
+          <div>
164
+            <el-button @click="getDataTwo()">查询</el-button>
165
+          </div>
166
+        </el-col>
167
+
168
+        <el-col :span="2">
169
+          <div>
170
+            <el-button @click="exportAction()">导出</el-button>
171
+          </div>
172
+        </el-col>
173
+
174
+        <!--        <el-col :span="2">-->
175
+        <!--          <div>-->
176
+        <!--            <el-button @click="getDataTwo()">打印</el-button>-->
177
+        <!--          </div>-->
178
+        <!--        </el-col>-->
179
+
180
+
181
+
182
+
183
+
184
+      </el-row>
185
+
186
+      <el-table
187
+        :data="patientTableData"
188
+        border
189
+        ref="table"
190
+        max-height="500px"
191
+        style="width: 100%">
192
+        <el-table-column
193
+          prop="dialysis_no"
194
+          align="center"
195
+          label="透析号"
196
+        >
197
+        </el-table-column>
198
+        <el-table-column
199
+          prop="name"
200
+          label="患者姓名"
201
+        >
202
+        </el-table-column>
203
+        <el-table-column
204
+          prop="date"
205
+          label="检查日期"
206
+        >
207
+        </el-table-column>
208
+
209
+        <el-table-column
210
+          prop="inspect_value"
211
+          label="结果"
212
+        >
213
+        </el-table-column>
214
+
215
+      </el-table>
216
+
217
+      <div slot="footer" class="dialog-footer">
218
+        <el-button @click="detailVisibility = false">取消</el-button>
219
+        <el-button type="primary" @click="detailVisibility = false">确定</el-button>
220
+      </div>
221
+    </el-dialog>
222
+
223
+  </div>
224
+</template>
225
+<script>
226
+import * as echarts from 'echarts'
227
+import { GetAllQCStatistisData, GetQCStatistisData } from '../../../api/qcd'
228
+
229
+const moment = require('moment')
230
+
231
+export default {
232
+  props: {
233
+
234
+    width: {
235
+      type: String,
236
+      default: '100%'
237
+    },
238
+    height: {
239
+      type: String,
240
+      default: '400px'
241
+    }
242
+
243
+  },
244
+  data() {
245
+    return {
246
+      statistics_types:[
247
+        { value: 1, label: '不达标患者' },
248
+        { value: 2, label: '未检查患者' },
249
+        { value: 3, label: '达标患者' },
250
+      ],
251
+      sort_types:[
252
+        { value: 1, label: '时间' },
253
+        { value: 2, label: '患者' },
254
+      ],
255
+      detailVisibility:false,
256
+      isClose:true,
257
+      time_type: 1,
258
+      time_type_two:1,
259
+      times: [
260
+        { value: 1, label: '本月' },
261
+        { value: 2, label: '上月' },
262
+        { value: 3, label: '今年' },
263
+        { value: 4, label: '上一年' },
264
+        { value: 5, label: '第一季度' },
265
+        { value: 6, label: '第二季度' },
266
+        { value: 7, label: '第三季度' },
267
+        { value: 8, label: '第四季度' },
268
+        { value: 9, label: '自定义' }
269
+
270
+      ],
271
+      time_month: '',
272
+      start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
273
+      end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
274
+      start_time_one: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
275
+      end_time_one: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
276
+
277
+      input: '',
278
+      myChart: {},
279
+      pieData: [],
280
+      pieName: [],
281
+      reference:{},
282
+      // myChartStyle:{float: "right", width: "100%", height: "400px"},
283
+      tableData: [],
284
+      statistics_type:1,
285
+      sort_type:"",
286
+      keyword:"",
287
+      patientTableData:[],
288
+    }
289
+  },
290
+  mounted() {
291
+    this.getData()
292
+  },
293
+  methods: {
294
+    exportAction(){
295
+      let list = []
296
+      for (let i = 0; i < this.patientTableData.length; i++) {
297
+        let order = this.patientTableData[i]
298
+        let name = order.name
299
+        let value = order.inspect_value
300
+        let inspect_date = order.date
301
+
302
+        let obj = {
303
+          '姓名': name,
304
+          '数值': value,
305
+          '日期': inspect_date,
306
+        }
307
+        list.push(obj)
308
+      }
309
+      import('@/vendor/Export2Excel').then(excel => {
310
+        const tHeader = ['姓名', '数值', '日期']
311
+        const filterVal = ['姓名', '数值', '日期']
312
+        const data = this.formatJson(filterVal, list)
313
+        excel.export_json_to_excel1({
314
+          header: tHeader,
315
+          data,
316
+          filename: '明细',
317
+          ref: this.$refs['table'].$el
318
+        })
319
+      })
320
+    },
321
+
322
+    formatJson(filterVal, jsonData) {
323
+      return jsonData.map(v => filterVal.map(j => v[j]))
324
+    },
325
+    getDataTwo() {
326
+      if(this.start_time_one.length == 0){
327
+        this.$message.error("请选择开始时间")
328
+      }
329
+      if(this.end_time_one.length == 0){
330
+        this.$message.error("请选择结束时间")
331
+      }
332
+      let params = {
333
+        start_date: this.start_time_one,
334
+        end_date: this.end_time_one,
335
+        item_type:this.statistics_type,
336
+        order_type:this.sort_type,
337
+        keyword: this.keyword,
338
+        type:3,
339
+      }
340
+      this.patientTableData = []
341
+      GetAllQCStatistisData(params).then(response => {
342
+        if (response.data.state == 1) {
343
+          this.detailVisibility = true
344
+          this.patientTableData  =  this.patientTableData.concat(response.data.data.list)
345
+        } else {
346
+          this.$message.error(response.data.msg)
347
+        }
348
+      })
349
+
350
+    },
351
+    getData() {
352
+      if(this.start_time.length == 0){
353
+        this.$message.error("请选择开始时间")
354
+      }
355
+      if(this.end_time.length == 0){
356
+        this.$message.error("请选择结束时间")
357
+      }
358
+      let params = {
359
+        start_date: this.start_time,
360
+        end_date: this.end_time,
361
+        type:3,
362
+      }
363
+      this.pieData = []
364
+      this.tableData = []
365
+      console.log("~~~~~~~~~~")
366
+      GetQCStatistisData(params).then(response => {
367
+        if (response.data.state == 1) {
368
+          let objone = {
369
+            value:  response.data.data.unusual_total ,
370
+            name: '不达标值患者',
371
+            count:response.data.data.unusual_total,
372
+          }
373
+          this.pieData.push(objone)
374
+          this.tableData.push(objone)
375
+
376
+          let objtwo = {
377
+            value:   response.data.data.normal_total,
378
+            name: '达标值患者',
379
+            count:response.data.data.normal_total,
380
+
381
+          }
382
+          this.pieData.push(objtwo)
383
+          this.tableData.push(objtwo)
384
+
385
+          let objthree = {
386
+            value: response.data.data.no_check_total ,
387
+            name: '未检查患者',
388
+            count:response.data.data.no_check_total,
389
+
390
+          }
391
+          this.pieData.push(objthree)
392
+          this.tableData.push(objthree)
393
+
394
+          let objfour = {
395
+            value: response.data.data.patient_count,
396
+            name: '合计',
397
+            count:response.data.data.patient_count,
398
+          }
399
+          this.tableData.push(objfour)
400
+          for (let i = 0; i < this.pieData.length; i++) {
401
+            this.pieName[i] = this.pieData[i].name
402
+          }
403
+          this.myChart = echarts.init(document.getElementById('mychart'))
404
+          window.addEventListener('resize', () => {
405
+            this.myChart.resize()
406
+          })
407
+          const option = {
408
+            legend: {
409
+              // 图例
410
+              data: this.pieName,
411
+              left: '10%',
412
+              top: '30%',
413
+              orient: 'vertical'
414
+            },
415
+            color: ['#F74587', '#32D79B', '#6590FF'],
416
+
417
+
418
+            title: {
419
+              // 设置饼图标题,位置设为顶部居中
420
+              //   text: "国内院士前五省份图示",
421
+              top: '0%',
422
+              left: 'center'
423
+            },
424
+            series: [
425
+              {
426
+                type: 'pie',
427
+                label: {
428
+                  normal : {
429
+                    formatter: '{b}:{c}: ({d}%)',
430
+                    textStyle : {
431
+                      fontWeight : 'normal',
432
+                      fontSize : 15,
433
+                      color : "black"
434
+                    }
435
+                  }
436
+                  // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})"
437
+                },
438
+                radius: '65%', //饼图半径
439
+                data: this.pieData,
440
+                itemStyle : {
441
+                  emphasis: {
442
+                    shadowBlur: 10,
443
+                    shadowOffsetX: 0,
444
+                    shadowColor: 'rgba(0, 0, 0, 0.5)'
445
+                  }
446
+                }
447
+              }
448
+            ]
449
+          }
450
+          //   console.log(this.seriesData);
451
+          const optionFree = {
452
+            series: [
453
+              {
454
+                data: this.seriesData,
455
+                type: 'line',
456
+                smooth: true
457
+              }
458
+            ]
459
+          }
460
+          this.myChart = echarts.init(document.getElementById('mychart'))
461
+          this.myChart.setOption(option)
462
+        } else {
463
+          this.$message.error(response.data.msg)
464
+        }
465
+      })
466
+
467
+    },
468
+    changeItem(val) {
469
+      const currentDate = new Date()
470
+      switch (val) {
471
+        case 1:
472
+
473
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
474
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
475
+
476
+          this.start_time = startOfMonth
477
+          this.end_time = endOfMonth
478
+          this.getData()
479
+
480
+          break
481
+        case 2:
482
+          // 上月的起始日期和结束日期
483
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
484
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
485
+
486
+          this.start_time = startOfLastMonth
487
+          this.end_time = endOfLastMonth
488
+          this.getData()
489
+
490
+          break
491
+        case 3:
492
+          // 今年的起始日期和结束日期
493
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
494
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
495
+
496
+          this.start_time = startOfYear
497
+          this.end_time = endOfYear
498
+          this.getData()
499
+
500
+          break
501
+        case 4:
502
+          // 上一年的起始日期和结束日期
503
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
504
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
505
+
506
+          this.start_time = startOfLastYear
507
+          this.end_time = endOfLastYear
508
+          this.getData()
509
+
510
+          break
511
+        case 5:
512
+          // 第一季度的起始日期和结束日期
513
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
514
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
515
+
516
+          this.start_time = startOfFirstQuarter
517
+          this.end_time = endOfFirstQuarter
518
+          this.getData()
519
+
520
+          break
521
+        case 6:
522
+          // 第二季度的起始日期和结束日期
523
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
524
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
525
+
526
+          this.start_time = startOfSecondQuarter
527
+          this.end_time = endOfSecondQuarter
528
+          this.getData()
529
+
530
+          break
531
+        case 7:
532
+          // 第三季度的起始日期和结束日期
533
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
534
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
535
+
536
+          this.start_time = startOfThirdQuarter
537
+          this.end_time = endOfThirdQuarter
538
+          this.getData()
539
+
540
+          break
541
+        case 8:
542
+          // 第四季度的起始日期和结束日期
543
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
544
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
545
+
546
+          this.start_time = startOfFourthQuarter
547
+          this.end_time = endOfFourthQuarter
548
+          this.getData()
549
+          break
550
+        case 9:
551
+          this.start_time = ''
552
+          this.end_time = ''
553
+          break
554
+      }
555
+    },
556
+    changeItemTwo(val) {
557
+      const currentDate = new Date()
558
+      switch (val) {
559
+        case 1:
560
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
561
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
562
+          this.start_time_one = startOfMonth
563
+          this.end_time_one = endOfMonth
564
+          // this.getDataTwo()
565
+          break
566
+        case 2:
567
+          // 上月的起始日期和结束日期
568
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
569
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
570
+          this.start_time_one = startOfLastMonth
571
+          this.end_time_one = endOfLastMonth
572
+          // this.getDataTwo()
573
+          break
574
+        case 3:
575
+          // 今年的起始日期和结束日期
576
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
577
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
578
+
579
+          this.start_time_one = startOfYear
580
+          this.end_time_one = endOfYear
581
+          // this.getDataTwo()
582
+
583
+          break
584
+        case 4:
585
+          // 上一年的起始日期和结束日期
586
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
587
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
588
+
589
+          this.start_time_one = startOfLastYear
590
+          this.end_time_one = endOfLastYear
591
+          // this.getDataTwo()
592
+
593
+          break
594
+        case 5:
595
+          // 第一季度的起始日期和结束日期
596
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
597
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
598
+          this.start_time_one = startOfFirstQuarter
599
+          this.end_time_one = endOfFirstQuarter
600
+          // this.getDataTwo()
601
+          break
602
+        case 6:
603
+          // 第二季度的起始日期和结束日期
604
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
605
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
606
+          this.start_time_one = startOfSecondQuarter
607
+          this.end_time_one = endOfSecondQuarter
608
+          // this.getDataTwo()
609
+          break
610
+        case 7:
611
+          // 第三季度的起始日期和结束日期
612
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
613
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
614
+
615
+          this.start_time_one = startOfThirdQuarter
616
+          this.end_time_one = endOfThirdQuarter
617
+          // this.getDataTwo()
618
+
619
+          break
620
+        case 8:
621
+          // 第四季度的起始日期和结束日期
622
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
623
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
624
+
625
+          this.start_time_one = startOfFourthQuarter
626
+          this.end_time_one = endOfFourthQuarter
627
+          // this.getDataTwo()
628
+          break
629
+        case 9:
630
+          this.start_time_one = ''
631
+          this.end_time_one = ''
632
+          break
633
+      }
634
+    },
635
+
636
+
637
+    getSummaries(param) {
638
+      const { columns, data } = param
639
+      const sums = []
640
+      columns.forEach((column, index) => {
641
+        if (index === 0) {
642
+          sums[index] = '总价'
643
+          return
644
+        }
645
+        const values = data.map(item => Number(item[column.property]))
646
+        if (!values.every(value => isNaN(value))) {
647
+          sums[index] = values.reduce((prev, curr) => {
648
+            const value = Number(curr)
649
+            if (!isNaN(value)) {
650
+              return prev + curr
651
+            } else {
652
+              return prev
653
+            }
654
+          }, 0)
655
+          sums[index] += ' 元'
656
+        } else {
657
+          sums[index] = 'N/A'
658
+        }
659
+      })
660
+
661
+      return sums
662
+    },
663
+    handleClick(row) {
664
+      console.log(row)
665
+      if(row.name == "不达标值患者"){
666
+        this.statistics_type = 1
667
+      }else if(row.name == "达标值患者"){
668
+        this.statistics_type = 3
669
+      }else {
670
+        this.statistics_type = 2
671
+      }
672
+      this.getDataTwo()
673
+    }
674
+  }
675
+
676
+}
677
+</script>
678
+<style lang="scss" scoped>
679
+.content_top {
680
+  display: flex;
681
+  justify-content: space-around;
682
+  color: #1e5feb;
683
+}
684
+</style>

+ 28 - 10
src/xt_pages/Dialysisanalysis/platelets/index.vue Näytä tiedosto

@@ -7,35 +7,53 @@
7 7
       <div class="app-container">
8 8
         <div class="page_patientControlAnalysis">
9 9
             <el-tabs v-model="activeName" @tab-click="handleClick" >
10
-                <el-tab-pane label="统计全部" name="first">
10
+                <el-tab-pane label="统计全部(KTV)" name="first">
11 11
                   <keep-alive>
12
-                    <plateletsall v-if="activeName == 'first'"></plateletsall>
12
+                    <all_ktv v-if="activeName == 'first'"></all_ktv>
13 13
                   </keep-alive>
14 14
                 </el-tab-pane>
15
-                
16
-                <el-tab-pane label="统计个人" name="second">
15
+              <el-tab-pane label="统计全部(URR)" name="second">
16
+                <keep-alive>
17
+                  <all_urr v-if="activeName == 'second'"></all_urr>
18
+                </keep-alive>
19
+              </el-tab-pane>
20
+
21
+                <el-tab-pane label="统计个人(KTV)" name="third">
17 22
                   <keep-alive>
18
-                    <plateletsalone v-if="activeName == 'second'"></plateletsalone>
23
+                    <p_ktv v-if="activeName == 'third'"></p_ktv>
19 24
                   </keep-alive>
20 25
                 </el-tab-pane>
21
-            
26
+
27
+
28
+              <el-tab-pane label="统计个人(URR)" name="four">
29
+                <keep-alive>
30
+                  <p_urr v-if="activeName == 'four'"></p_urr>
31
+                </keep-alive>
32
+              </el-tab-pane>
33
+
22 34
             </el-tabs>
23 35
         </div>
24 36
       </div>
25 37
     </div>
26 38
   </template>
27
-  
39
+
28 40
 <script>
29 41
 import echarts from 'echarts'
30 42
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
31 43
 import plateletsall from './plateletsall'
32 44
 import plateletsalone from './plateletsalone.vue'
45
+import All_ktv from './all_ktv.vue'
46
+import All_urr from './all_urr.vue'
47
+import P_ktv from './p_ktv.vue'
48
+import P_urr from './p_urr.vue'
33 49
 export default {
34 50
     name:'thyroidGland',
35 51
     components: {
52
+      P_urr,
53
+      P_ktv,
54
+      All_urr,
55
+      All_ktv,
36 56
         BreadCrumb,
37
-        plateletsall,
38
-        plateletsalone
39 57
     },
40 58
     data() {
41 59
         return {
@@ -99,4 +117,4 @@ export default {
99 117
 // }
100 118
 
101 119
 // }
102
-</style>
120
+</style>

+ 643 - 0
src/xt_pages/Dialysisanalysis/platelets/p_ktv.vue Näytä tiedosto

@@ -0,0 +1,643 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="app-container">
4
+      <div class="page_process">
5
+        <new-nav activeName="process"></new-nav>
6
+        <div class="cell clearfix">
7
+          <el-form :inline="true">
8
+            <el-form-item label>
9
+              <el-autocomplete
10
+                class="checkSearch"
11
+                popper-class="my-autocomplete"
12
+                v-model="search_value"
13
+                :fetch-suggestions="querySearchAsync"
14
+                :trigger-on-focus="false"
15
+                placeholder="请输入病人名字"
16
+                @select="handleSelect"
17
+                style="width:160px;"
18
+              >
19
+                <i class="el-icon-search el-input__icon" slot="suffix"></i>
20
+                <template slot-scope="{ item }">
21
+                  <div class="name">{{ item.name }}</div>
22
+                </template>
23
+              </el-autocomplete>
24
+
25
+            </el-form-item>
26
+          </el-form>
27
+
28
+          <label class="title">
29
+            <span class="name">日期查询</span> :
30
+          </label>
31
+          <el-date-picker
32
+            v-model="query.start_time"
33
+            prefix-icon="el-icon-date"
34
+            @change="changeTime"
35
+            :editable="false"
36
+            style="width: 150px;"
37
+            type="date"
38
+            placeholder="选择日期时间"
39
+            align="right"
40
+            format="yyyy-MM-dd"
41
+            value-format="yyyy-MM-dd"
42
+          ></el-date-picker>
43
+          <span class>-</span>
44
+          <el-date-picker
45
+            v-model="query.end_time"
46
+            prefix-icon="el-icon-date"
47
+            @change="changeEndTime"
48
+            :editable="false"
49
+            style="width: 150px;"
50
+            type="date"
51
+            placeholder="选择日期时间"
52
+            align="right"
53
+            format="yyyy-MM-dd"
54
+            value-format="yyyy-MM-dd"
55
+          ></el-date-picker>
56
+
57
+          <el-button size="small" icon="el-icon-printer" @click="printAction" type="primary">打印
58
+          </el-button>
59
+          <el-button size="small" icon="el-icon-printer" @click="exportAction" type="primary">导出
60
+
61
+          </el-button>
62
+        </div>
63
+
64
+        <el-container>
65
+          <div style="width:160px">
66
+
67
+            <div class="tableTitle">患者列表</div>
68
+
69
+
70
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500"
71
+                      :row-style="{ color: '#303133' }"
72
+                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
73
+                      highlight-current-row
74
+                      @current-change="handleChange">
75
+              <el-table-column prop="dialysis_no" label="透析号" width="70" align="center">
76
+                <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
77
+              </el-table-column>
78
+              <el-table-column prop="name" label="姓名" width="90" align="center">
79
+                <template slot-scope="scope">{{ scope.row.name }}</template>
80
+              </el-table-column>
81
+            </el-table>
82
+          </div>
83
+          <div style="padding-left:10px;flex:1;width:0;">
84
+            <div class="tableTitle">指标趋势<span style="font-weight:normal">&nbsp;&nbsp;(当前患者: {{patient_name}})</span></div>
85
+            <div>
86
+              <line-chart :options="chart"></line-chart>
87
+              <!--              <line-chart :options="bar" v-if="query.statistics_type == 9 || query.statistics_type == 10"></line-chart>-->
88
+              <!--              <line-chart></line-chart>-->
89
+
90
+            </div>
91
+            <div class="tableTitle">统计表</div>
92
+            <div>
93
+              <el-table ref="table" :data="tableData" v-loading="loading" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
94
+                <el-table-column label="姓名" align="center">
95
+                  <template slot-scope="scope">
96
+                    {{scope.row.name}}
97
+                  </template>
98
+                </el-table-column>
99
+
100
+                <el-table-column width="100" label="检查日期" align="center">
101
+                  <template slot-scope="scope">
102
+                    {{getTime(scope.row.inspect_date)}}
103
+
104
+                  </template>
105
+                </el-table-column>
106
+
107
+                <el-table-column width="100" label="KTV" align="center">
108
+                  <template slot-scope="scope">
109
+                    {{scope.row.value}}
110
+                  </template>
111
+                </el-table-column>
112
+              </el-table>
113
+
114
+
115
+            </div>
116
+          </div>
117
+        </el-container>
118
+      </div>
119
+    </div>
120
+  </div>
121
+</template>
122
+
123
+
124
+<script>
125
+import echarts from 'echarts'
126
+import {  uParseTime } from '@/utils/tools'
127
+import { getCurrentOrgPatients } from '@/api/common/common'
128
+import {
129
+  GetDefaultPatient,
130
+} from '@/api/common/statistics'
131
+import { PostSearch } from '@/api/patient'
132
+import { getDataConfig } from '@/utils/data'
133
+import { GetPersonQCStatistisData } from '../../../api/qcd'
134
+import LineChart from '../../qcd/components/LineChart.vue'
135
+
136
+export default {
137
+  components: {
138
+    LineChart
139
+  },
140
+  data() {
141
+    return {
142
+      pickerOptions: {
143
+        disabledDate(time) {
144
+          let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear() - 1)).getTime() - 24 * 3600 * 1000
145
+          return time.getTime() > Date.now() || time.getTime() < threeMonths
146
+
147
+        }
148
+      },
149
+      patient_name:'',
150
+      percent:[],
151
+      patientsData: [],
152
+      tableData: [],
153
+      loading: false,
154
+      search_value: '',
155
+      total: 0,
156
+      query: {
157
+        patient_id: '',
158
+        statistics_type: 1,
159
+        start_time: '',
160
+        end_time: '',
161
+        limit: 10,
162
+        page: 1,
163
+        type:2,
164
+      },
165
+      crumbs: [
166
+        { path: false, name: '科室质控' },
167
+        { path: false, name: '指标评估统计' },
168
+        { path: false, name: '透析过程指标统计' }
169
+      ],
170
+      tableData1: [],
171
+      chart: {
172
+        title: {
173
+          text: 'ECharts 入门示例'
174
+        },
175
+        tooltip: {},
176
+        legend: {
177
+          data: [],
178
+          left: 0
179
+        },
180
+        xAxis: {
181
+          data: []
182
+        },
183
+        yAxis: {
184
+          axisLabel: {
185
+            formatter: '{value} %'
186
+          },
187
+          show: false
188
+        },
189
+        series: [
190
+          {
191
+            name: '',
192
+            type: 'line',
193
+            data: [],
194
+            barWidth: 30,
195
+            label: {
196
+              normal: {
197
+                show: true,
198
+                position: 'top',
199
+                formatter: (params) => {
200
+                  if(this.percent.length > 0){
201
+                    let str = ''
202
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
203
+                    return str
204
+                  }else{
205
+                    let str = ''
206
+                    str = params.data
207
+                    return str
208
+                  }
209
+                }
210
+              }
211
+            },
212
+            //配置样式
213
+            itemStyle: {
214
+              //通常情况下:
215
+
216
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
217
+              normal: {
218
+                color: function(params) {
219
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
220
+                  var colorList = [
221
+                    ['#A9E0F3', '#9FBDFC'],
222
+
223
+                    ['#FFD7C0', '#FF9994']
224
+                  ]
225
+
226
+                  var index = params.dataIndex
227
+                  if (params.dataIndex >= colorList.length) {
228
+                    index = params.dataIndex % colorList.length
229
+                  }
230
+
231
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
232
+                    { offset: 0, color: colorList[index][0] },
233
+                    // { offset: 0.5, color: colorList[index][1] },
234
+                    { offset: 1, color: colorList[index][1] }
235
+                  ])
236
+                },
237
+                lineStyle:{
238
+                  color:'#409eff' //改变折线颜色
239
+                },
240
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
241
+              },
242
+
243
+              //鼠标悬停时:
244
+              emphasis: {
245
+                shadowBlur: 10,
246
+                shadowOffsetX: 0,
247
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
248
+              }
249
+            }
250
+          }
251
+        ],
252
+        dataZoom: [
253
+          {
254
+            // Y轴固定,让内容滚动
255
+            type: 'slider',
256
+            show: false,
257
+            xAxisIndex: [0],
258
+            start: 1,
259
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
260
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
261
+          },
262
+          {
263
+            type: 'inside',
264
+            xAxisIndex: [0],
265
+            start: 1,
266
+            end: 20,
267
+            zoomLock: true // 锁定区域禁止缩放
268
+          }
269
+        ]
270
+      },
271
+      bar: {
272
+        title: {
273
+          text: 'ECharts 入门示例'
274
+        },
275
+        tooltip: {},
276
+        legend: {
277
+          data: [],
278
+          left: 0
279
+        },
280
+        xAxis: {
281
+          data: []
282
+        },
283
+        yAxis: {
284
+          axisLabel: {
285
+            formatter: '{value} %'
286
+          },
287
+          show: false
288
+        },
289
+        series: [
290
+          {
291
+            name: '',
292
+            type: 'bar',
293
+            data: [],
294
+            barWidth: 30,
295
+            label: {
296
+              normal: {
297
+                show: true,
298
+                position: 'top',
299
+                formatter: (params) => {
300
+                  if(this.percent.length > 0){
301
+                    let str = ''
302
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
303
+                    return str
304
+                  }else{
305
+                    let str = ''
306
+                    str = params.data
307
+                    return str
308
+                  }
309
+                }
310
+              }
311
+            },
312
+            //配置样式
313
+            itemStyle: {
314
+              //通常情况下:
315
+
316
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
317
+              normal: {
318
+                color: function(params) {
319
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
320
+                  var colorList = [
321
+                    ['#A9E0F3', '#9FBDFC'],
322
+                    ['#FFD7C0', '#FF9994']
323
+                  ]
324
+
325
+                  var index = params.dataIndex
326
+                  if (params.dataIndex >= colorList.length) {
327
+                    index = params.dataIndex % colorList.length
328
+                  }
329
+
330
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
331
+                    { offset: 0, color: colorList[index][0] },
332
+                    // { offset: 0.5, color: colorList[index][1] },
333
+                    { offset: 1, color: colorList[index][1] }
334
+                  ])
335
+                },
336
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
337
+              },
338
+
339
+              //鼠标悬停时:
340
+              emphasis: {
341
+                shadowBlur: 10,
342
+                shadowOffsetX: 0,
343
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
344
+              }
345
+            }
346
+          }
347
+        ]
348
+      }
349
+
350
+    }
351
+  },
352
+  methods: {
353
+    printAction(){
354
+      this.$router.push({
355
+        path: "/Dialysisanalysis/qualitycontrol/print?patient_id=" + this.query.patient_id+"&project_id="+this.query.project_id+"&item_id="+this.query.item_id+"&start_time="+this.query.start_time+"&end_time="+this.query.end_time
356
+      });
357
+
358
+    },exportAction(){
359
+      let list = []
360
+      for (let i = 0; i < this.tableData.length; i++) {
361
+        let order = this.tableData[i]
362
+        let name = order.name
363
+        let value = order.value
364
+        let inspect_date = order.inspect_date
365
+
366
+        let obj = {
367
+          '姓名': name,
368
+          '数值': value,
369
+          '日期': inspect_date,
370
+        }
371
+        list.push(obj)
372
+      }
373
+      import('@/vendor/Export2Excel').then(excel => {
374
+        const tHeader = ['姓名', '数值', '日期']
375
+        const filterVal = ['姓名', '数值', '日期']
376
+        const data = this.formatJson(filterVal, list)
377
+        excel.export_json_to_excel1({
378
+          header: tHeader,
379
+          data,
380
+          filename: '明细',
381
+          ref: this.$refs['table'].$el
382
+        })
383
+      })
384
+    },
385
+    changeProject(val) {
386
+      this.query.statistics_type = val
387
+      this.query.page = 1
388
+      this.GetPersonQCStatistisData(this.query)
389
+      this.GetInspectionCheckIndexTableData(this.query)
390
+
391
+    },
392
+    handleChange(val) {
393
+      this.query.patient_id = val.id
394
+      this.query.page = 1
395
+      this.patient_name = val.name
396
+      this.GetPersonQCStatistisData(this.query)
397
+      this.GetInspectionCheckIndexTableData(this.query)
398
+    },
399
+    handleSizeChange(limit) {
400
+      this.query.limit = limit
401
+      this.GetInspectionCheckIndexTableData(this.query)
402
+
403
+    },
404
+    handleCurrentChange(page) {
405
+      this.query.page = page
406
+      this.GetPersonQCStatistisData(this.query)
407
+    },formatJson(filterVal, jsonData) {
408
+      return jsonData.map(v => filterVal.map(j => v[j]))
409
+    },
410
+    changeTime(val) {
411
+      var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time)
412
+      if (time > 0) {
413
+        this.$message.error('结束时间不能小于开始时间')
414
+        this.query.start_time = ''
415
+      } else {
416
+        // this.getDialysisList()
417
+        this.query.page = 1
418
+        this.GetPersonQCStatistisData(this.query)
419
+        this.GetInspectionCheckIndexTableData(this.query)
420
+
421
+      }
422
+
423
+    },
424
+    changeEndTime(val) {
425
+      var time =
426
+        this.getTimestamp(val) - this.getTimestamp(this.query.start_time)
427
+      if (time < 0) {
428
+        this.$message.error('结束时间不能小于开始时间')
429
+        this.query.end_time = ''
430
+      } else {
431
+        this.query.page = 1
432
+        this.GetPersonQCStatistisData(this.query)
433
+        this.GetInspectionCheckIndexTableData(this.query)
434
+
435
+      }
436
+    },
437
+    getTimestamp(time) {
438
+      // 把时间日期转成时间戳
439
+      return new Date(time).getTime() / 1000
440
+    },
441
+    QueryOperaById: function(val) {
442
+      let vascular_access_desc_name = ''
443
+      let vascular_access_desc = getDataConfig(
444
+        'hemodialysis',
445
+        'vascular_access_desc'
446
+      )
447
+      for (let i = 0; i < vascular_access_desc.length; i++) {
448
+        if (vascular_access_desc[i].id == val) {
449
+          vascular_access_desc_name = vascular_access_desc[i].name
450
+        }
451
+      }
452
+
453
+      return vascular_access_desc_name
454
+    },
455
+    GetAnticoagulantById: function(val) {
456
+      let anticoagulan_name = ''
457
+      var anticoagulantsConfitTwo = this.$store.getters.anticoagulants_confit
458
+      let anticoagulant = anticoagulantsConfitTwo
459
+      for (let keys in anticoagulant) {
460
+        if (anticoagulant[keys].id == val) {
461
+          anticoagulan_name = anticoagulant[keys].name
462
+        }
463
+      }
464
+      return anticoagulan_name
465
+    },
466
+    getModeName(mode_id) {
467
+      return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name : ''
468
+    },  getTime(val) {
469
+      if(val == "" || val == undefined){
470
+        return ""
471
+      }else {
472
+        return uParseTime(val, '{y}-{m}-{d}')
473
+      }
474
+    },
475
+    GetInspectionCheckIndexTableData(params) {
476
+      this.loading = true
477
+      GetPersonQCStatistisData(params)
478
+        .then(rs => {
479
+          var resp = rs.data
480
+          console.log("resp=====",resp)
481
+          if (resp.state == 1) {
482
+            this.loading = false
483
+            this.tableData = []
484
+            for (let i = 0; i < resp.data.inspections.length; i++) {
485
+              let obj = {
486
+                name:resp.data.patient.name,
487
+                value:resp.data.inspections[i].inspect_value,
488
+                inspect_date:resp.data.inspections[i].inspect_date
489
+              }
490
+              this.tableData.push(obj)
491
+            }
492
+            this.total = resp.data.total
493
+
494
+          } else {
495
+            this.loading = false
496
+          }
497
+        })
498
+        .catch(error => {
499
+
500
+        })
501
+    },
502
+    GetPersonQCStatistisData(params) {
503
+      this.chart.xAxis.data = []
504
+      this.chart.series[0].data = []
505
+      this.bar.xAxis.data = []
506
+      this.bar.series[0].data = []
507
+      this.percent = []
508
+      GetPersonQCStatistisData(params)
509
+        .then(rs => {
510
+          var resp = rs.data
511
+          if (resp.state == 1) {
512
+            for (let i = 0; i < resp.data.inspections.length; i++) {
513
+              this.chart.xAxis.data.push(this.getTime(resp.data.inspections[i].inspect_date))
514
+              this.chart.series[0].data.push(resp.data.inspections[i].inspect_value)
515
+            }
516
+            this.getArrLength(this.chart.xAxis.data,1)
517
+          } else {
518
+
519
+          }
520
+        })
521
+        .catch(error => {
522
+        })
523
+    },
524
+    handleSelect(val) {
525
+      this.query.patient_id = val.id
526
+      this.query.page = 1
527
+      this.patient_name = val.name
528
+      for (let i = 0;i < this.patientsData.length; i++){
529
+        if (this.patientsData[i].id == val.id){
530
+          this.$refs.table.setCurrentRow(this.patientsData[i])
531
+        }
532
+      }
533
+
534
+
535
+    },
536
+    querySearchAsync(keyword, cb) {
537
+      let key = ''
538
+      if (keyword != undefined) {
539
+        key = keyword
540
+      }
541
+      let searchArray = []
542
+      PostSearch(key).then(response => {
543
+        if (response.data.state == 1) {
544
+          searchArray = response.data.data.patient
545
+          cb(searchArray)
546
+        } else {
547
+          cb([])
548
+        }
549
+      })
550
+    },
551
+    chooseWay(way) {
552
+      this.wayType = way
553
+    }, getCurrentOrgPatients() {
554
+      getCurrentOrgPatients().then(response => {
555
+        if (response.data.state == 1) {
556
+          var patients = response.data.data.patients
557
+          this.patientsData = patients
558
+          this.GetDefaultPatient()
559
+        }
560
+      })
561
+    }, GetDefaultPatient() {
562
+      GetDefaultPatient().then(response => {
563
+        if (response.data.state == 1) {
564
+          var patient = response.data.data.patient
565
+          for (let i = 0;i < this.patientsData.length; i++){
566
+            if (this.patientsData[i].id == patient.id){
567
+              this.patient_name = this.patientsData[i].name
568
+              this.$refs.table.setCurrentRow(this.patientsData[i])
569
+            }
570
+          }
571
+          this.query.patient_id = patient.id
572
+          this.GetPersonQCStatistisData(this.query)
573
+
574
+        }
575
+      })
576
+
577
+    },
578
+    getArrLength(result,type){
579
+      if(type == 1){
580
+        if(result.length > 10){
581
+          var dataZoom_end = (10/result.length)*100;
582
+          this.chart.dataZoom[0].end = dataZoom_end
583
+        }else{
584
+          var dataZoom_end = 100;
585
+          this.chart.dataZoom[0].end = dataZoom_end
586
+        }
587
+      }else if(type == 2){
588
+        if(result.length > 10){
589
+          var dataZoom_end = (10/result.length)*100;
590
+          this.bar.dataZoom[0].end = dataZoom_end
591
+        }else{
592
+          var dataZoom_end = 100;
593
+          this.bar.dataZoom[0].end = dataZoom_end
594
+        }
595
+      }
596
+
597
+    }
598
+  }, mounted() {
599
+    var date = new Date()
600
+    var year = date.getFullYear() //获取完整的年份(4位)
601
+    var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
602
+    var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
603
+    var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
604
+    this.query.patient_id = 0
605
+    this.query.end_time = year + '-' + month + '-' + day
606
+    this.query.start_time = year + '-' + last_month + '-' + day
607
+    this.query.project_id = 1
608
+    this.query.item_id = 166
609
+    this.getCurrentOrgPatients()
610
+
611
+    // this.GetPersonQCStatistisData()
612
+
613
+
614
+  }
615
+}
616
+</script>
617
+
618
+<style lang="scss" scoped>
619
+.tableTitle {
620
+  font-size: 16px;
621
+  color: #000;
622
+  font-weight: bold;
623
+  margin-bottom: 10px;
624
+}
625
+</style>
626
+<style lang="scss">
627
+.page_process {
628
+.el-tabs{
629
+  margin-bottom:0 !important;
630
+}
631
+.el-button--medium {
632
+  padding: 10px 8px;
633
+}
634
+
635
+.el-form-item {
636
+  margin-bottom: 0;
637
+}
638
+::-webkit-scrollbar{
639
+  height: 15px !important;
640
+}
641
+
642
+}
643
+</style>

+ 647 - 0
src/xt_pages/Dialysisanalysis/platelets/p_urr.vue Näytä tiedosto

@@ -0,0 +1,647 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="app-container">
4
+      <div class="page_process">
5
+        <new-nav activeName="process"></new-nav>
6
+        <div class="cell clearfix">
7
+          <el-form :inline="true">
8
+            <el-form-item label>
9
+              <el-autocomplete
10
+                class="checkSearch"
11
+                popper-class="my-autocomplete"
12
+                v-model="search_value"
13
+                :fetch-suggestions="querySearchAsync"
14
+                :trigger-on-focus="false"
15
+                placeholder="请输入病人名字"
16
+                @select="handleSelect"
17
+                style="width:160px;"
18
+              >
19
+                <i class="el-icon-search el-input__icon" slot="suffix"></i>
20
+                <template slot-scope="{ item }">
21
+                  <div class="name">{{ item.name }}</div>
22
+                </template>
23
+              </el-autocomplete>
24
+
25
+            </el-form-item>
26
+          </el-form>
27
+
28
+          <label class="title">
29
+            <span class="name">日期查询</span> :
30
+          </label>
31
+          <el-date-picker
32
+            v-model="query.start_time"
33
+            prefix-icon="el-icon-date"
34
+            @change="changeTime"
35
+            :editable="false"
36
+            style="width: 150px;"
37
+            type="date"
38
+            placeholder="选择日期时间"
39
+            align="right"
40
+            format="yyyy-MM-dd"
41
+            value-format="yyyy-MM-dd"
42
+          ></el-date-picker>
43
+          <span class>-</span>
44
+          <el-date-picker
45
+            v-model="query.end_time"
46
+            prefix-icon="el-icon-date"
47
+            @change="changeEndTime"
48
+            :editable="false"
49
+            style="width: 150px;"
50
+            type="date"
51
+            placeholder="选择日期时间"
52
+            align="right"
53
+            format="yyyy-MM-dd"
54
+            value-format="yyyy-MM-dd"
55
+          ></el-date-picker>
56
+
57
+          <el-button size="small" icon="el-icon-printer" @click="printAction" type="primary">打印
58
+          </el-button>
59
+          <el-button size="small" icon="el-icon-printer" @click="exportAction" type="primary">导出
60
+
61
+          </el-button>
62
+        </div>
63
+
64
+        <el-container>
65
+          <div style="width:160px">
66
+
67
+            <div class="tableTitle">患者列表</div>
68
+
69
+
70
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500"
71
+                      :row-style="{ color: '#303133' }"
72
+                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
73
+                      highlight-current-row
74
+                      @current-change="handleChange">
75
+              <el-table-column prop="dialysis_no" label="透析号" width="70" align="center">
76
+                <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
77
+              </el-table-column>
78
+              <el-table-column prop="name" label="姓名" width="90" align="center">
79
+                <template slot-scope="scope">{{ scope.row.name }}</template>
80
+              </el-table-column>
81
+            </el-table>
82
+          </div>
83
+          <div style="padding-left:10px;flex:1;width:0;">
84
+            <div class="tableTitle">指标趋势<span style="font-weight:normal">&nbsp;&nbsp;(当前患者: {{patient_name}})</span></div>
85
+            <div>
86
+              <line-chart :options="chart"></line-chart>
87
+              <!--              <line-chart :options="bar" v-if="query.statistics_type == 9 || query.statistics_type == 10"></line-chart>-->
88
+              <!--              <line-chart></line-chart>-->
89
+
90
+            </div>
91
+            <div class="tableTitle">统计表</div>
92
+            <div>
93
+              <el-table ref="table" :data="tableData" v-loading="loading" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
94
+                <el-table-column label="姓名" align="center">
95
+                  <template slot-scope="scope">
96
+                    {{scope.row.name}}
97
+                  </template>
98
+                </el-table-column>
99
+
100
+                <el-table-column width="100" label="检查日期" align="center">
101
+                  <template slot-scope="scope">
102
+                    {{getTime(scope.row.inspect_date)}}
103
+
104
+                  </template>
105
+                </el-table-column>
106
+
107
+                <el-table-column width="100" label="URR" align="center">
108
+                  <template slot-scope="scope">
109
+                    {{scope.row.value}}
110
+                  </template>
111
+                </el-table-column>
112
+              </el-table>
113
+
114
+
115
+            </div>
116
+          </div>
117
+        </el-container>
118
+      </div>
119
+    </div>
120
+  </div>
121
+</template>
122
+
123
+
124
+<script>
125
+import echarts from 'echarts'
126
+import {  uParseTime } from '@/utils/tools'
127
+import { getCurrentOrgPatients } from '@/api/common/common'
128
+import {
129
+  GetDefaultPatient,
130
+} from '@/api/common/statistics'
131
+import { PostSearch } from '@/api/patient'
132
+import { getDataConfig } from '@/utils/data'
133
+import { GetPersonQCStatistisData } from '../../../api/qcd'
134
+import LineChart from '../../qcd/components/LineChart.vue'
135
+
136
+export default {
137
+  components: {
138
+    LineChart
139
+  },
140
+  data() {
141
+    return {
142
+      pickerOptions: {
143
+        disabledDate(time) {
144
+          let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear() - 1)).getTime() - 24 * 3600 * 1000
145
+          return time.getTime() > Date.now() || time.getTime() < threeMonths
146
+
147
+        }
148
+      },
149
+      patient_name:'',
150
+      percent:[],
151
+      patientsData: [],
152
+      tableData: [],
153
+      loading: false,
154
+      search_value: '',
155
+      total: 0,
156
+      query: {
157
+        patient_id: '',
158
+        statistics_type: 1,
159
+        start_time: '',
160
+        end_time: '',
161
+        type:3,
162
+        limit: 10,
163
+        page: 1
164
+      },
165
+      crumbs: [
166
+        { path: false, name: '科室质控' },
167
+        { path: false, name: '指标评估统计' },
168
+        { path: false, name: '透析过程指标统计' }
169
+      ],
170
+      tableData1: [],
171
+      chart: {
172
+        title: {
173
+          text: 'ECharts 入门示例'
174
+        },
175
+        tooltip: {},
176
+        legend: {
177
+          data: [],
178
+          left: 0
179
+        },
180
+        xAxis: {
181
+          data: []
182
+        },
183
+        yAxis: {
184
+          axisLabel: {
185
+            formatter: '{value} %'
186
+          },
187
+          show: false
188
+        },
189
+        series: [
190
+          {
191
+            name: '',
192
+            type: 'line',
193
+            data: [],
194
+            barWidth: 30,
195
+            label: {
196
+              normal: {
197
+                show: true,
198
+                position: 'top',
199
+                formatter: (params) => {
200
+                  if(this.percent.length > 0){
201
+                    let str = ''
202
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
203
+                    return str
204
+                  }else{
205
+                    let str = ''
206
+                    str = params.data
207
+                    return str
208
+                  }
209
+                }
210
+              }
211
+            },
212
+            //配置样式
213
+            itemStyle: {
214
+              //通常情况下:
215
+
216
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
217
+              normal: {
218
+                color: function(params) {
219
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
220
+                  var colorList = [
221
+                    ['#A9E0F3', '#9FBDFC'],
222
+
223
+                    ['#FFD7C0', '#FF9994']
224
+                  ]
225
+
226
+                  var index = params.dataIndex
227
+                  if (params.dataIndex >= colorList.length) {
228
+                    index = params.dataIndex % colorList.length
229
+                  }
230
+
231
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
232
+                    { offset: 0, color: colorList[index][0] },
233
+                    // { offset: 0.5, color: colorList[index][1] },
234
+                    { offset: 1, color: colorList[index][1] }
235
+                  ])
236
+                },
237
+                lineStyle:{
238
+                  color:'#409eff' //改变折线颜色
239
+                },
240
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
241
+              },
242
+
243
+              //鼠标悬停时:
244
+              emphasis: {
245
+                shadowBlur: 10,
246
+                shadowOffsetX: 0,
247
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
248
+              }
249
+            }
250
+          }
251
+        ],
252
+        dataZoom: [
253
+          {
254
+            // Y轴固定,让内容滚动
255
+            type: 'slider',
256
+            show: false,
257
+            xAxisIndex: [0],
258
+            start: 1,
259
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
260
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
261
+          },
262
+          {
263
+            type: 'inside',
264
+            xAxisIndex: [0],
265
+            start: 1,
266
+            end: 20,
267
+            zoomLock: true // 锁定区域禁止缩放
268
+          }
269
+        ]
270
+      },
271
+      bar: {
272
+        title: {
273
+          text: 'ECharts 入门示例'
274
+        },
275
+        tooltip: {},
276
+        legend: {
277
+          data: [],
278
+          left: 0
279
+        },
280
+        xAxis: {
281
+          data: []
282
+        },
283
+        yAxis: {
284
+          axisLabel: {
285
+            formatter: '{value} %'
286
+          },
287
+          show: false
288
+        },
289
+        series: [
290
+          {
291
+            name: '',
292
+            type: 'bar',
293
+            data: [],
294
+            barWidth: 30,
295
+            label: {
296
+              normal: {
297
+                show: true,
298
+                position: 'top',
299
+                formatter: (params) => {
300
+                  if(this.percent.length > 0){
301
+                    let str = ''
302
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
303
+                    return str
304
+                  }else{
305
+                    let str = ''
306
+                    str = params.data
307
+                    return str
308
+                  }
309
+                }
310
+              }
311
+            },
312
+            //配置样式
313
+            itemStyle: {
314
+              //通常情况下:
315
+
316
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
317
+              normal: {
318
+                color: function(params) {
319
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
320
+                  var colorList = [
321
+                    ['#A9E0F3', '#9FBDFC'],
322
+                    ['#FFD7C0', '#FF9994']
323
+                  ]
324
+
325
+                  var index = params.dataIndex
326
+                  if (params.dataIndex >= colorList.length) {
327
+                    index = params.dataIndex % colorList.length
328
+                  }
329
+
330
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
331
+                    { offset: 0, color: colorList[index][0] },
332
+                    // { offset: 0.5, color: colorList[index][1] },
333
+                    { offset: 1, color: colorList[index][1] }
334
+                  ])
335
+                },
336
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
337
+              },
338
+
339
+              //鼠标悬停时:
340
+              emphasis: {
341
+                shadowBlur: 10,
342
+                shadowOffsetX: 0,
343
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
344
+              }
345
+            }
346
+          }
347
+        ]
348
+      }
349
+
350
+    }
351
+  },
352
+  methods: {
353
+    printAction(){
354
+      this.$router.push({
355
+        path: "/Dialysisanalysis/qualitycontrol/print?patient_id=" + this.query.patient_id+"&project_id="+this.query.project_id+"&item_id="+this.query.item_id+"&start_time="+this.query.start_time+"&end_time="+this.query.end_time
356
+      });
357
+
358
+    },exportAction(){
359
+      let list = []
360
+      for (let i = 0; i < this.tableData.length; i++) {
361
+        let order = this.tableData[i]
362
+        let name = order.name
363
+        let value = order.value
364
+        let inspect_date = order.inspect_date
365
+
366
+        let obj = {
367
+          '姓名': name,
368
+          '数值': value,
369
+          '日期': inspect_date,
370
+        }
371
+        list.push(obj)
372
+      }
373
+      import('@/vendor/Export2Excel').then(excel => {
374
+        const tHeader = ['姓名', '数值', '日期']
375
+        const filterVal = ['姓名', '数值', '日期']
376
+        const data = this.formatJson(filterVal, list)
377
+        excel.export_json_to_excel1({
378
+          header: tHeader,
379
+          data,
380
+          filename: '明细',
381
+          ref: this.$refs['table'].$el
382
+        })
383
+      })
384
+    },
385
+    changeProject(val) {
386
+      this.query.statistics_type = val
387
+      this.query.page = 1
388
+      this.GetPersonQCStatistisData(this.query)
389
+      this.GetInspectionCheckIndexTableData(this.query)
390
+
391
+    },
392
+    handleChange(val) {
393
+      this.query.patient_id = val.id
394
+      this.query.page = 1
395
+      this.patient_name = val.name
396
+      this.GetPersonQCStatistisData(this.query)
397
+      this.GetInspectionCheckIndexTableData(this.query)
398
+    },
399
+    handleSizeChange(limit) {
400
+      this.query.limit = limit
401
+      this.GetInspectionCheckIndexTableData(this.query)
402
+
403
+    },
404
+    handleCurrentChange(page) {
405
+      this.query.page = page
406
+      this.GetPersonQCStatistisData(this.query)
407
+    },formatJson(filterVal, jsonData) {
408
+      return jsonData.map(v => filterVal.map(j => v[j]))
409
+    },
410
+    changeTime(val) {
411
+      var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time)
412
+      if (time > 0) {
413
+        this.$message.error('结束时间不能小于开始时间')
414
+        this.query.start_time = ''
415
+      } else {
416
+        // this.getDialysisList()
417
+        this.query.page = 1
418
+        this.GetPersonQCStatistisData(this.query)
419
+        this.GetInspectionCheckIndexTableData(this.query)
420
+
421
+      }
422
+
423
+    },
424
+    changeEndTime(val) {
425
+      var time =
426
+        this.getTimestamp(val) - this.getTimestamp(this.query.start_time)
427
+      if (time < 0) {
428
+        this.$message.error('结束时间不能小于开始时间')
429
+        this.query.end_time = ''
430
+      } else {
431
+        this.query.page = 1
432
+        this.GetPersonQCStatistisData(this.query)
433
+        this.GetInspectionCheckIndexTableData(this.query)
434
+
435
+      }
436
+    },
437
+    getTimestamp(time) {
438
+      // 把时间日期转成时间戳
439
+      return new Date(time).getTime() / 1000
440
+    },
441
+    QueryOperaById: function(val) {
442
+      let vascular_access_desc_name = ''
443
+      let vascular_access_desc = getDataConfig(
444
+        'hemodialysis',
445
+        'vascular_access_desc'
446
+      )
447
+      for (let i = 0; i < vascular_access_desc.length; i++) {
448
+        if (vascular_access_desc[i].id == val) {
449
+          vascular_access_desc_name = vascular_access_desc[i].name
450
+        }
451
+      }
452
+
453
+      return vascular_access_desc_name
454
+    },
455
+    GetAnticoagulantById: function(val) {
456
+      let anticoagulan_name = ''
457
+      var anticoagulantsConfitTwo = this.$store.getters.anticoagulants_confit
458
+      let anticoagulant = anticoagulantsConfitTwo
459
+      for (let keys in anticoagulant) {
460
+        if (anticoagulant[keys].id == val) {
461
+          anticoagulan_name = anticoagulant[keys].name
462
+        }
463
+      }
464
+      return anticoagulan_name
465
+    },
466
+    getModeName(mode_id) {
467
+      return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name : ''
468
+    },  getTime(val) {
469
+      if(val == "" || val == undefined){
470
+        return ""
471
+      }else {
472
+        return uParseTime(val, '{y}-{m}-{d}')
473
+      }
474
+    },
475
+    GetInspectionCheckIndexTableData(params) {
476
+      this.loading = true
477
+      GetPersonQCStatistisData(params)
478
+        .then(rs => {
479
+          var resp = rs.data
480
+          console.log("resp=====",resp)
481
+          if (resp.state == 1) {
482
+            this.loading = false
483
+            this.tableData = []
484
+            for (let i = 0; i < resp.data.inspections.length; i++) {
485
+              let obj = {
486
+                name:resp.data.patient.name,
487
+                value:resp.data.inspections[i].inspect_value,
488
+                inspect_date:resp.data.inspections[i].inspect_date
489
+              }
490
+              this.tableData.push(obj)
491
+            }
492
+            this.total = resp.data.total
493
+
494
+          } else {
495
+            this.loading = false
496
+          }
497
+        })
498
+        .catch(error => {
499
+
500
+        })
501
+    },
502
+    GetPersonQCStatistisData(params) {
503
+      this.chart.xAxis.data = []
504
+      this.chart.series[0].data = []
505
+      this.bar.xAxis.data = []
506
+      this.bar.series[0].data = []
507
+      this.percent = []
508
+      GetPersonQCStatistisData(params)
509
+        .then(rs => {
510
+          var resp = rs.data
511
+          if (resp.state == 1) {
512
+            console.log(resp.data.inspections)
513
+            for (let i = 0; i < resp.data.inspections.length; i++) {
514
+              this.chart.xAxis.data.push(this.getTime(resp.data.inspections[i].inspect_date))
515
+              this.chart.series[0].data.push(resp.data.inspections[i].inspect_value)
516
+            }
517
+            console.log(this.chart.xAxis.data)
518
+            console.log( this.chart.series[0].data)
519
+
520
+            this.getArrLength(this.chart.xAxis.data,1)
521
+          } else {
522
+
523
+          }
524
+        })
525
+        .catch(error => {
526
+        })
527
+    },
528
+    handleSelect(val) {
529
+      this.query.patient_id = val.id
530
+      this.query.page = 1
531
+      this.patient_name = val.name
532
+      for (let i = 0;i < this.patientsData.length; i++){
533
+        if (this.patientsData[i].id == val.id){
534
+          this.$refs.table.setCurrentRow(this.patientsData[i])
535
+        }
536
+      }
537
+
538
+
539
+    },
540
+    querySearchAsync(keyword, cb) {
541
+      let key = ''
542
+      if (keyword != undefined) {
543
+        key = keyword
544
+      }
545
+      let searchArray = []
546
+      PostSearch(key).then(response => {
547
+        if (response.data.state == 1) {
548
+          searchArray = response.data.data.patient
549
+          cb(searchArray)
550
+        } else {
551
+          cb([])
552
+        }
553
+      })
554
+    },
555
+    chooseWay(way) {
556
+      this.wayType = way
557
+    }, getCurrentOrgPatients() {
558
+      getCurrentOrgPatients().then(response => {
559
+        if (response.data.state == 1) {
560
+          var patients = response.data.data.patients
561
+          this.patientsData = patients
562
+          this.GetDefaultPatient()
563
+        }
564
+      })
565
+    }, GetDefaultPatient() {
566
+      GetDefaultPatient().then(response => {
567
+        if (response.data.state == 1) {
568
+          var patient = response.data.data.patient
569
+          for (let i = 0;i < this.patientsData.length; i++){
570
+            if (this.patientsData[i].id == patient.id){
571
+              this.patient_name = this.patientsData[i].name
572
+              this.$refs.table.setCurrentRow(this.patientsData[i])
573
+            }
574
+          }
575
+          this.query.patient_id = patient.id
576
+          this.GetPersonQCStatistisData(this.query)
577
+
578
+        }
579
+      })
580
+
581
+    },
582
+    getArrLength(result,type){
583
+      if(type == 1){
584
+        if(result.length > 10){
585
+          var dataZoom_end = (10/result.length)*100;
586
+          this.chart.dataZoom[0].end = dataZoom_end
587
+        }else{
588
+          var dataZoom_end = 100;
589
+          this.chart.dataZoom[0].end = dataZoom_end
590
+        }
591
+      }else if(type == 2){
592
+        if(result.length > 10){
593
+          var dataZoom_end = (10/result.length)*100;
594
+          this.bar.dataZoom[0].end = dataZoom_end
595
+        }else{
596
+          var dataZoom_end = 100;
597
+          this.bar.dataZoom[0].end = dataZoom_end
598
+        }
599
+      }
600
+
601
+    }
602
+  }, mounted() {
603
+    var date = new Date()
604
+    var year = date.getFullYear() //获取完整的年份(4位)
605
+    var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
606
+    var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
607
+    var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
608
+    this.query.patient_id = 0
609
+    this.query.end_time = year + '-' + month + '-' + day
610
+    this.query.start_time = year + '-' + last_month + '-' + day
611
+    this.query.project_id = 1
612
+    this.query.item_id = 166
613
+    this.getCurrentOrgPatients()
614
+
615
+    // this.GetPersonQCStatistisData()
616
+
617
+
618
+  }
619
+}
620
+</script>
621
+
622
+<style lang="scss" scoped>
623
+.tableTitle {
624
+  font-size: 16px;
625
+  color: #000;
626
+  font-weight: bold;
627
+  margin-bottom: 10px;
628
+}
629
+</style>
630
+<style lang="scss">
631
+.page_process {
632
+.el-tabs{
633
+  margin-bottom:0 !important;
634
+}
635
+.el-button--medium {
636
+  padding: 10px 8px;
637
+}
638
+
639
+.el-form-item {
640
+  margin-bottom: 0;
641
+}
642
+::-webkit-scrollbar{
643
+  height: 15px !important;
644
+}
645
+
646
+}
647
+</style>

+ 275 - 0
src/xt_pages/Dialysisanalysis/summary/index.vue Näytä tiedosto

@@ -0,0 +1,275 @@
1
+<!-- 血钾 -->
2
+<template>
3
+    <div class="main-contain">
4
+      <div class="position">
5
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
6
+      </div>
7
+      <div class="app-container">
8
+        <div class="page_patientControlAnalysis">
9
+          <div>
10
+            <el-row :gutter="25">
11
+              <el-col :span="5">
12
+                <div>
13
+                  <div class="block">
14
+                    <el-date-picker
15
+                      v-model="start_month"
16
+                      type="month"
17
+                      format="yyyy-MM"
18
+                      value-format="yyyy-MM"
19
+                      @change="changemonth"
20
+                      placeholder="选择月">
21
+                    </el-date-picker>
22
+                  </div>
23
+                </div>
24
+              </el-col>
25
+
26
+              <el-col :span="5">
27
+                <el-button size="small" icon="el-icon-printer" @click="exportAction" type="primary">导出
28
+                </el-button>
29
+              </el-col>
30
+
31
+            </el-row>
32
+
33
+            <div style="width: 80%;margin: auto;margin: 20px">
34
+              <el-table
35
+                :data="patientTableData"
36
+                border
37
+                ref="table"
38
+                :header-cell-style="{
39
+          backgroundColor: 'rgb(245, 247, 250)',
40
+          color: '#606266'
41
+        }"
42
+                style="width: 100%;">
43
+                <el-table-column type="index" label="序号" align="center" width="60">
44
+                </el-table-column>
45
+                <el-table-column
46
+                  prop="count"
47
+                  label="姓名"
48
+                >
49
+                  <template slot-scope="scope">
50
+                    {{ scope.row.name }}
51
+                  </template>
52
+                </el-table-column>
53
+                <el-table-column
54
+                  prop="count"
55
+                  label="月"
56
+                >
57
+                  <template slot-scope="scope">
58
+                    {{start_month.split("-")[1]}}
59
+                  </template>
60
+                </el-table-column>
61
+                <el-table-column
62
+                  prop="count"
63
+                  label="IPTH"
64
+                >
65
+                  <template slot-scope="scope">
66
+                    {{scope.row.ipth}}
67
+                  </template>
68
+                </el-table-column>
69
+                <el-table-column
70
+                  prop="count"
71
+                  label="血红蛋白"
72
+                >
73
+                  <template slot-scope="scope">
74
+                    {{scope.row.xhdb}}
75
+                  </template>
76
+                </el-table-column>
77
+                <el-table-column
78
+                  prop="count"
79
+                  label="血钾"
80
+                >
81
+                  <template slot-scope="scope">
82
+                    {{scope.row.xuejia}}
83
+                  </template>
84
+                </el-table-column>
85
+                <el-table-column
86
+                  prop="count"
87
+                  label="白蛋白"
88
+                >
89
+                  <template slot-scope="scope">
90
+                    {{scope.row.bdb}}
91
+                  </template>
92
+                </el-table-column>
93
+                <el-table-column
94
+                  prop="count"
95
+                  label="血磷"
96
+                >
97
+                  <template slot-scope="scope">
98
+                    {{scope.row.xuelin}}
99
+                  </template>
100
+                </el-table-column>
101
+              </el-table>
102
+            </div>
103
+          </div>
104
+        </div>
105
+      </div>
106
+    </div>
107
+  </template>
108
+
109
+<script>
110
+
111
+import {  GetFiveInstatistisc } from '../../../api/qcd'
112
+import { uParseTime } from '@/utils/tools'
113
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
114
+const moment = require('moment')
115
+
116
+export default {
117
+    name:'summary',
118
+    components: {
119
+        BreadCrumb,
120
+    },
121
+    data() {
122
+        return {
123
+          start_month:new Date(new Date().getFullYear(), new Date().getMonth()).toLocaleDateString('en-CA'),
124
+          start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
125
+          end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
126
+          patientTableData:[],
127
+            activeName: 'first'
128
+        }
129
+    },
130
+    methods:{
131
+      exportAction(){
132
+        let list = []
133
+        for (let i = 0; i < this.patientTableData.length; i++) {
134
+          let order = this.patientTableData[i]
135
+          let name = order.name
136
+
137
+          let obj = {
138
+            '姓名': name,
139
+          }
140
+          list.push(obj)
141
+        }
142
+        import('@/vendor/Export2Excel').then(excel => {
143
+          const tHeader = ['姓名']
144
+          const filterVal = ['姓名']
145
+          const data = this.formatJson(filterVal, list)
146
+          excel.export_json_to_excel1({
147
+            header: tHeader,
148
+            data,
149
+            filename: '明细',
150
+            ref: this.$refs['table'].$el
151
+          })
152
+        })
153
+      },formatJson(filterVal, jsonData) {
154
+        return jsonData.map(v => filterVal.map(j => v[j]))
155
+      },
156
+      getMonthStartAndEndDates(year, month) {
157
+        // month参数是从1到12的数字
158
+        // 将month减去1以得到JavaScript Date对象中对应的月份(0到11)
159
+        const jsMonth = month - 1;
160
+
161
+        // 获取指定月份的第一天
162
+        const startDate = new Date(year, jsMonth, 1);
163
+
164
+        // 获取下一个月的第一天
165
+        const endDate = new Date(year, jsMonth + 1, 1);
166
+
167
+        // 将endDate减去1毫秒以得到指定月份的最后一天
168
+        endDate.setTime(endDate.getTime() - 1);
169
+        let date1 = new Date(startDate);
170
+        let date2 = new Date(endDate);
171
+        let month3 =  date1.getMonth() + 1;
172
+        let month2 =  date2.getMonth() + 1;
173
+        let day1 =  date1.getDate();
174
+        let day2 =  date2.getDate();
175
+        this.start_time = date1.getFullYear() + "-"  + (month3 < 10 ? "0" + month3:month3) + "-"+(day1 < 10 ? "0" + day1:day1)
176
+        this.end_time =  date2.getFullYear() + "-"  + (month2 < 10 ? "0" + month2:month2)+"-"+(day2 < 10 ? "0" + day2:day2)
177
+        console.log(this.start_time)
178
+        console.log(this.end_time)
179
+      },
180
+      changemonth(){
181
+        this.getMonthStartAndEndDates(this.start_month.split("-")[0],this.start_month.split("-")[1])
182
+        this.getData()
183
+
184
+      },
185
+      getData(){
186
+        if(this.start_time.length == 0){
187
+          this.$message.error("请选择开始时间")
188
+          return
189
+        }
190
+        if(this.end_time.length == 0){
191
+          this.$message.error("请选择结束时间")
192
+          return
193
+
194
+        }
195
+        let params = {
196
+          start_date: this.start_time,
197
+          end_date: this.end_time,
198
+          keyword: this.keyword,
199
+        }
200
+        this.patientTableData = []
201
+        GetFiveInstatistisc(params).then(response => {
202
+          if (response.data.state == 1) {
203
+            this.patientTableData  =  response.data.data.list
204
+          } else {
205
+            this.$message.error(response.data.msg)
206
+          }
207
+        })
208
+
209
+      },
210
+      getTime(value, temp) {
211
+        if (value != undefined) {
212
+          return uParseTime(value, temp)
213
+        }
214
+        return ''
215
+      },
216
+      handleClick(tab, event) {
217
+        console.log(tab, event);
218
+      }
219
+    },created() {
220
+      this.getData()
221
+
222
+  }
223
+}
224
+</script>
225
+
226
+<style lang="scss" scoped>
227
+// .page_patientControlAnalysis {
228
+
229
+// .pointTitle {
230
+//   font-size: 13px;
231
+// }
232
+
233
+// .chartTitle {
234
+//   font-size: 16px;
235
+//   font-weight: bold;
236
+//   color: #000000;
237
+// }
238
+
239
+// .point {
240
+//   width: 13px;
241
+//   height: 13px;
242
+//   background: linear-gradient(
243
+//       0deg,
244
+//       rgba(169, 224, 243, 1),
245
+//       rgba(159, 189, 252, 1)
246
+//   );
247
+//   border-radius: 7px;
248
+//   margin-right: 8px;
249
+// }
250
+
251
+// .pointTitle {
252
+//   font-size: 13px;
253
+// }
254
+
255
+// }
256
+
257
+</style>
258
+
259
+<style lang="scss">
260
+// .page_patientControlAnalysis {
261
+
262
+// .el-form-item {
263
+//   margin-bottom: 0;
264
+// }
265
+
266
+// .cell {
267
+//   text-align: center;
268
+// }
269
+
270
+// ::-webkit-scrollbar {
271
+//   height: 15px !important;
272
+// }
273
+
274
+// }
275
+</style>

+ 50 - 16
src/xt_pages/dialysis/batch_print/batch_print_order_sixtyseven.vue Näytä tiedosto

@@ -493,19 +493,53 @@
493 493
           <div style="height: 80px;margin: 10px 0px;text-align: left;">
494 494
             <span>治疗小结:</span>
495 495
           </div>
496
-          <div style="text-align: left;">
497
-            <span style="">上机护士:
498
-              
499
-            </span>
500
-          <span style="margin-left:30px ;">核对护士:
501
-
502
-            </span>
503
-              <span style="margin-left:30px ;">下机护士:
504
-
505
-            </span>
506
-            <span style="margin-left:30px ;">医生:
507
-
508
-            </span>
496
+          <div style="text-align: left;width: 100%;">
497
+            <table>
498
+              <tr>
499
+                <td width="10%">上机护士:</td>
500
+                <td width="10%">
501
+                  <span>
502
+                <span
503
+                  v-if="
504
+                    setAdminUserES(
505
+                      dialysisOrder == null
506
+                        ? 0
507
+                        : dialysisOrder.start_nurse
508
+                    ) == ''
509
+                  "
510
+                >
511
+                  {{
512
+                    getAdminUser(
513
+                      dialysisOrder == null
514
+                        ? 0
515
+                        : dialysisOrder.start_nurse
516
+                    )
517
+                  }}</span
518
+                >
519
+                <img
520
+                  style="height: 30px"
521
+                  :src="
522
+                    setAdminUserES(
523
+                      dialysisOrder == null
524
+                        ? 0
525
+                        : dialysisOrder.start_nurse
526
+                    )
527
+                  "
528
+                  alt=""
529
+                  srcset=""
530
+                  v-else
531
+                />
532
+                  </span>
533
+                </td>
534
+                <td width="10%">核对护士:</td>
535
+                <td width="10%"></td>
536
+                <td width="10%">下机护士:</td>
537
+                <td width="10%"></td>
538
+                <td width="10%">医生:</td>
539
+                <td width="10%"></td>
540
+              </tr>
541
+            </table>
542
+          
509 543
           </div>
510 544
         </div>
511 545
           <template v-if="record.totallength > 14">
@@ -1067,8 +1101,8 @@ export default {
1067 1101
     padding: 10px;
1068 1102
   }
1069 1103
   .infoTitle{
1070
-    background: #efe7e7;
1071
-    border-top: 1px solid black;
1104
+    // background: #efe7e7;
1105
+    // border-top: 1px solid black;
1072 1106
     padding: 5px 0px;
1073 1107
     font-weight:bolder;
1074 1108
   }
@@ -1076,7 +1110,7 @@ export default {
1076 1110
     padding: 5px;
1077 1111
   }
1078 1112
   .table tr th{
1079
-    background: #efe7e7;
1113
+    // background: #efe7e7;
1080 1114
   }
1081 1115
 
1082 1116
 }

+ 10 - 10
src/xt_pages/dialysis/dialysisPrintOrder.vue Näytä tiedosto

@@ -821,7 +821,7 @@
821 821
         >
822 822
         </div>
823 823
       </template>
824
-      <!-- <template v-if="org_template_info.template_id == 67 ">
824
+      <template v-if="org_template_info.template_id == 67 ">
825 825
         <div>
826 826
           <el-button
827 827
           :loading="loading"
@@ -832,7 +832,7 @@
832 832
           >打印</el-button
833 833
         >
834 834
         </div>
835
-      </template> -->
835
+      </template>
836 836
     </div>
837 837
     <div class="app-container" style="min-height: 0">
838 838
       <!--<div class="order-print-btn"-->
@@ -2017,14 +2017,14 @@ export default {
2017 2017
           scanStyles: false,
2018 2018
         });
2019 2019
       }
2020
-      // else if (this.org_template_info.template_id == 67 ) {
2021
-      //   printJS({
2022
-      //     printable: "dialysis-print-box-1",
2023
-      //     type: "html",
2024
-      //     style: style2,
2025
-      //     scanStyles: false,
2026
-      //   });
2027
-      // }
2020
+      else if (this.org_template_info.template_id == 67 ) {
2021
+        printJS({
2022
+          printable: "dialysis-print-box-1",
2023
+          type: "html",
2024
+          style: style2,
2025
+          scanStyles: false,
2026
+        });
2027
+      }
2028 2028
       else if (
2029 2029
         this.org_template_info.template_id == 53
2030 2030
       ) {

+ 50 - 49
src/xt_pages/dialysis/template/DialysisPrintOrdersixtySeven.vue Näytä tiedosto

@@ -338,50 +338,53 @@
338 338
           <div style="height: 80px;margin: 10px 0px;text-align: left;">
339 339
             <span>治疗小结:</span>
340 340
           </div>
341
-          <div style="text-align: left;">
342
-            <span style="">上机护士:
343
-              <span>
344
-                <span
345
-                  v-if="
346
-                    setAdminUserES(
347
-                      dialysisOrder == null
348
-                        ? 0
349
-                        : dialysisOrder.start_nurse
350
-                    ) == ''
351
-                  "
352
-                >
353
-                  {{
354
-                    getAdminUser(
355
-                      dialysisOrder == null
356
-                        ? 0
357
-                        : dialysisOrder.start_nurse
358
-                    )
359
-                  }}</span
360
-                >
361
-                <img
362
-
363
-                  :src="
364
-                    setAdminUserES(
365
-                      dialysisOrder == null
366
-                        ? 0
367
-                        : dialysisOrder.start_nurse
368
-                    )
369
-                  "
370
-                  alt=""
371
-                  srcset=""
372
-                  v-else
373
-                />
374
-                </span>
375
-            </span>
376
-          <span style="margin-left:30px ;">核对护士:
377
-
378
-            </span>
379
-              <span style="margin-left:30px ;">下机护士:
380
-
381
-            </span>
382
-            <span style="margin-left:30px ;">医生:
383
-
384
-            </span>
341
+          <div style="text-align: left;width: 100%;">
342
+            <table>
343
+              <tr>
344
+                <td width="10%">上机护士:</td>
345
+                <td width="10%">
346
+                  <span>
347
+                    <span
348
+                      v-if="
349
+                        setAdminUserES(
350
+                          dialysisOrder == null
351
+                            ? 0
352
+                            : dialysisOrder.start_nurse
353
+                        ) == ''
354
+                      "
355
+                    >
356
+                      {{
357
+                        getAdminUser(
358
+                          dialysisOrder == null
359
+                            ? 0
360
+                            : dialysisOrder.start_nurse
361
+                        )
362
+                      }}</span>
363
+                    <img
364
+                      style="height: 30px"
365
+                      :src="
366
+                        setAdminUserES(
367
+                          dialysisOrder == null
368
+                            ? 0
369
+                            : dialysisOrder.start_nurse
370
+                        )
371
+                      "
372
+                      alt=""
373
+                      srcset=""
374
+                      v-else
375
+                    />
376
+                    
377
+                  </span>
378
+                </td>
379
+                <td width="10%">核对护士:</td>
380
+                <td width="10%"></td>
381
+                <td width="10%">下机护士:</td>
382
+                <td width="10%"></td>
383
+                <td width="10%">医生:</td>
384
+                <td width="10%"></td>
385
+              </tr>
386
+            </table>
387
+          
385 388
           </div>
386 389
         </div>
387 390
       </div>
@@ -1396,17 +1399,15 @@ export default {
1396 1399
     padding: 10px;
1397 1400
   }
1398 1401
   .infoTitle{
1399
-    background: #efe7e7;
1400
-    border-top: 1px solid black;
1402
+    // background: #efe7e7;
1403
+    // border-top: 1px solid black;
1401 1404
     padding: 5px 0px;
1402 1405
     font-weight:bolder;
1403 1406
   }
1404 1407
   .table tr td{
1405 1408
     padding: 5px;
1406 1409
   }
1407
-  .table tr th{
1408
-    background: #efe7e7;
1409
-  }
1410
+  
1410 1411
 
1411 1412
 }
1412 1413
 </style>

+ 10 - 3
src/xt_pages/outpatientCharges/statementTemplate/privateChargePrint.vue Näytä tiedosto

@@ -47,12 +47,19 @@
47 47
         <td width="100"></td>
48 48
         <td>床号</td>
49 49
         <td></td>
50
+<!--        <td>入院日期</td>-->
51
+<!--        <td>{{info.his.in_hosptial_time ? info.his.in_hosptial_time.split(' ')[0] : ''}}</td>-->
52
+<!--        <td>出院日期</td>-->
53
+<!--        <td width="100">{{info.his.out_hosptial_time ? info.his.out_hosptial_time.split(' ')[0] : ''}}</td>-->
54
+<!--        <td>住院天数</td>-->
55
+<!--        <td>{{getDay(info.his.in_hosptial_time.split(' ')[0] ,info.his.out_hosptial_time.split(' ')[0])}}</td>-->
56
+
50 57
         <td>入院日期</td>
51
-        <td>{{info.his.in_hosptial_time ? info.his.in_hosptial_time.split(' ')[0] : ''}}</td>
58
+        <td></td>
52 59
         <td>出院日期</td>
53
-        <td width="100">{{info.his.out_hosptial_time ? info.his.out_hosptial_time.split(' ')[0] : ''}}</td>
60
+        <td width="100"></td>
54 61
         <td>住院天数</td>
55
-        <td>{{getDay(info.his.in_hosptial_time.split(' ')[0] ,info.his.out_hosptial_time.split(' ')[0])}}</td>
62
+        <td></td>
56 63
 
57 64
       </tr>
58 65
       <tr>

+ 2 - 2
src/xt_pages/outpatientCharges/summary.vue Näytä tiedosto

@@ -127,7 +127,7 @@
127 127
 <!--           <el-button size="small" type="primary" @click="export_detail_three">报表下载12</el-button>-->
128 128
           <!-- <el-button size="small" type="primary" @click="export_detail_four">报表下载3</el-button>-->
129 129
           <!-- <el-button size="small" type="primary" @click="export_detail_five">报表下载3</el-button>-->
130
-          <!-- <el-button size="small" type="primary" @click="export_detail_six">报表下载9</el-button>-->
130
+<!--           <el-button size="small" type="primary" @click="export_detail_six">报表下载9</el-button>-->
131 131
           <!-- <el-button size="small" type="primary" @click="export_detail_tenone">报表下载10</el-button>-->
132 132
           <!--  <el-button size="small" type="primary" @click="export_detail_seven">报表下载4</el-button>-->
133 133
 
@@ -1672,7 +1672,7 @@ export default {
1672 1672
           var tarList = []
1673 1673
           for (let i = 0; i < list.length; i++) {
1674 1674
             let obj = {
1675
-              "周期": "2023年第季度",
1675
+              "周期": "2023年第季度",
1676 1676
               "类别": "门诊",
1677 1677
               "医保目录编码": list[i].code,
1678 1678
               "医保目录名称": list[i].name,

+ 128 - 10
src/xt_pages/outpatientDoctorStation/batch_print_checkTemplate/printOne.vue Näytä tiedosto

@@ -6,7 +6,7 @@
6 6
         style="box-shadow: 0 1 px 4 px rgba(0, 0, 0, 0.27),
7 7
          0 0 40 px rgba(0, 0, 0, 0.06) inset  "
8 8
     >
9
-       
9
+
10 10
       <div
11 11
           id="prescription-print"
12 12
           class="prescription-print"
@@ -90,8 +90,9 @@
90 90
                   :key="item.id"
91 91
                   style="margin-bottom: 10px"
92 92
               >
93
-                {{ item.team.project_team }}
93
+                {{ item.team.id > 0 ? item.team.project_team:item.project.project_name }}
94 94
               </div>
95
+
95 96
             </div>
96 97
           </div>
97 98
           <div
@@ -110,14 +111,32 @@
110 111
                 getTime(i.info.ctime) ? getTime(i.info.ctime).split(' ')[0] : ''
111 112
               }}
112 113
             </div>
113
-            <div>医生签字:{{ i.info.doctor ? i.info.doctor : '' }}</div>
114
+            <div>医生签字:
115
+              <img
116
+                v-if="setAdminUserES(i.info.creator)"
117
+                style="height: 30px"
118
+                :src="setAdminUserES(i.info.creator)"
119
+                alt=""
120
+                srcset=""
121
+              />
122
+              <span
123
+                style="width: 100px; display: inline-block"
124
+                v-else-if="i.info.doctor != ''"
125
+              >
126
+              {{ i.info.doctor ? i.info.doctor : "" }}
127
+            </span>
128
+              <span v-else>
129
+
130
+            </span>
131
+
132
+            </div>
114 133
           </div>
115 134
         </div>
116
-        
135
+
117 136
         <img style="width:100%;" v-if="org_id == 10138 || org_id == 0" src="https://kuyi.shengws.com/bailin/blend.jpg" alt="">
118 137
         <img style="width:100%;" v-if="org_id == 10278" src="https://kuyi.shengws.com/bailinbeier.png" alt="">
119 138
       </div>
120
-       
139
+
121 140
     </div>
122 141
   </div>
123 142
 </template>
@@ -151,11 +170,27 @@ export default {
151 170
       doctor: '',
152 171
       org_id: '',
153 172
       singleProjectPrint: [],
154
-      total_copy: []
173
+      total_copy: [],
174
+      operatorMaps: {},
175
+
155 176
     }
156 177
   },
157 178
 
158 179
   methods: {
180
+    // 电子签名
181
+    setAdminUserES(id) {
182
+      // console.log(id, "id");
183
+      if (id == 0) {
184
+        return "";
185
+      }
186
+      if (id in this.operatorMaps) {
187
+        // console.log(this.operatorMaps, "this.operatorMaps");
188
+        return this.operatorMaps[id].url;
189
+      } else {
190
+        // console.log("po");
191
+        return "";
192
+      }
193
+    },
159 194
     getAllDoctorList() {
160 195
       getAllDoctorList().then((response) => {
161 196
         if (response.data.state == 1) {
@@ -177,8 +212,10 @@ export default {
177 212
       var res = []
178 213
       for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
179 214
         for (var j = 0, resLen = res.length; j < resLen; j++) {
180
-          if (array[i].team_id === res[j].team_id) {
181
-            break
215
+          if(array[i].team_id != 0) {
216
+            if (array[i].team_id === res[j].team_id) {
217
+              break
218
+            }
182 219
           }
183 220
         }
184 221
         if (j === resLen) {
@@ -214,8 +251,43 @@ export default {
214 251
         // }
215 252
       })
216 253
       let data = []
254
+      projectPrint =  this.unique_two(projectPrint)
217 255
       console.log(projectPrint)
256
+      projectPrint.map((item) => {
257
+        // console.log(item, "999");
258
+        if (item.team.id == 0) {
259
+          console.log("~~~~~~")
260
+          data.push(item)
261
+        } else {
262
+          let status = data.some((it) => it.team.id == item.team.id)
263
+          if (!status) {
264
+            data.push(item)
265
+          }
266
+        }
267
+      })
268
+      if (isUpdate) {
269
+        this.projectPrint = data
270
+      }
271
+      console.log(data)
272
+      return data
273
+    },
274
+    getTeamTwo(prescriptions, isUpdate = true) {
275
+      let projectPrint = []
276
+      prescriptions.forEach((item) => {
277
+        // !此为修改前的处理方法,因考虑到可能有逻辑错误的存在故注释,若后续需求以这个为准可放开此条!
278
+        if (item.project.length > 0) {
279
+          item.project.map((it) => {
280
+            if (it.type == 2) {
281
+              if (it.project.cost_classify == 3) {
282
+                projectPrint.push(it)
283
+              }
284
+            }
285
+          })
286
+        }
287
+      })
288
+      let data = []
218 289
       projectPrint =  this.unique_two(projectPrint)
290
+      console.log(projectPrint)
219 291
       projectPrint.map((item) => {
220 292
         // console.log(item, "999");
221 293
         if (item.team.id == 0) {
@@ -233,6 +305,7 @@ export default {
233 305
       return data
234 306
     },
235 307
 
308
+
236 309
     // 计算金额(单独从上面的方法割开来,防止进入死循环)
237 310
     getSingleTeam(prescriptions) {
238 311
       let projectPrint = []
@@ -464,12 +537,57 @@ export default {
464 537
           return '二档医疗退休'
465 538
           break
466 539
       }
467
-    }
540
+    }, getPrescriptionPrint() {
541
+      var params = {
542
+        patient_id: this.patient_id,
543
+        record_date: this.record_date,
544
+        prescription_id: this.prescription_id,
545
+        his_patient_id: this.his_patient_id,
546
+        ids: this.ids,
547
+        p_type: 2,
548
+      };
549
+      console.log("params", params);
550
+      getPrescriptionPrint(params).then((response) => {
551
+        if (response.data.state == 1) {
552
+          var advicePrint = response.data.data.advicePrint;
553
+          console.log("adviceprint9999", advicePrint);
554
+          this.advicePrint = advicePrint;
555
+
556
+          this.doctorList_1 = response.data.data.eles;
557
+          console.log(this.doctorList_1, "百霖医生列表");
558
+          if (this.doctorList_1.length > 0) {
559
+            var operatorsLen = this.doctorList_1.length;
560
+            for (var index = 0; index < operatorsLen; index++) {
561
+              this.$set(
562
+                this.operatorMaps,
563
+                this.doctorList_1[index].creator,
564
+                this.doctorList_1[index]
565
+              );
566
+            }
567
+          }
568
+
569
+          this.getPage();
570
+          this.prescriptions = advicePrint;
571
+          console.log("处方222222", this.prescriptions);
572
+          var hisPatient = response.data.data.hisPatient;
573
+          console.log("hisPatient", hisPatient);
574
+          this.hisPatient = hisPatient;
575
+          var projectlist = response.data.data.projectlist;
576
+          console.log("所有项目列表", projectlist);
577
+          this.projectList = projectlist;
578
+
579
+          let outputlist1Name = response.data.data.his.patient_info
580
+            ? JSON.parse(response.data.data.his.patient_info)
581
+            : {};
582
+          this.faber = outputlist1Name;
583
+        }
584
+      });
585
+    },
468 586
   },
469 587
   created() {
470 588
     // this.getAllDoctorList()
471 589
     this.getInitData()
472
-    // this.getPrescriptionPrint()
590
+    this.getPrescriptionPrint()
473 591
     // this.getHisPatientDetail()
474 592
     // this.getPatientCaseHistory()
475 593
     var xtuser = this.$store.getters.xt_user

+ 696 - 0
src/xt_pages/outpatientDoctorStation/batch_print_checkTemplate/printTwo.vue Näytä tiedosto

@@ -0,0 +1,696 @@
1
+<template>
2
+  <div>
3
+    <div id="prescriptionPrint1">
4
+      <div v-for="(i, index) in printData" :key="index">
5
+        <div v-for="(item, index) in i.prescriptions" :key="index">
6
+          <div id="prescription-print3" class="prescription-print">
7
+            <img
8
+              style="width: 100%; height: 80px"
9
+              v-if="org_id == 10138"
10
+              src="https://kuyi.shengws.com/bailin/bltotle.jpg"
11
+              alt=""
12
+            />
13
+            <img
14
+              style="width: 100%; height: 80px"
15
+              v-if="org_id == 10278 || org_id == 0"
16
+              src="https://kuyi.shengws.com/beierlog.png"
17
+              alt=""
18
+            />
19
+            <div class="printTitle">检验申请单</div>
20
+            <div style="border: 1px solid #000;margin-bottom: 10px;">
21
+              <div
22
+                style="
23
+            display: flex;
24
+            justify-content: space-between;
25
+            border-bottom: 1px solid #000;
26
+            line-height: 40px;
27
+            padding: 0 10px;
28
+          "
29
+              >
30
+                <div>是否急诊:否</div>
31
+                <div>
32
+                  结算方式:{{ '医保' }}
33
+                </div>
34
+                <div>金额:{{ item.total }}</div>
35
+              </div>
36
+              <div
37
+                style="
38
+            display: flex;
39
+            justify-content: space-between;
40
+            border-bottom: 1px solid #000;
41
+            line-height: 40px;
42
+            padding: 0 10px;
43
+          "
44
+              >
45
+                <div>
46
+                  姓名:{{
47
+                    i.name
48
+                      ? i.name.indexOf('(') > -1
49
+                        ? i.name.substring(
50
+                          0,
51
+                          i.name.indexOf('(')
52
+                        )
53
+                        : i.name
54
+                      : ''
55
+                  }}
56
+                </div>
57
+                <div>
58
+                  性别:
59
+                  <span v-if="i.gender == 1">男</span>
60
+                  <span v-if="i.gender == 2">女</span>
61
+                </div>
62
+                <!--          <div>-->
63
+                <!--            年龄:{{-->
64
+                <!--              advicePrint[0].patient.age ? advicePrint[0].patient.age : ""-->
65
+                <!--            }}岁-->
66
+                <!--          </div>-->
67
+                <div> 年龄:{{
68
+                    getNewAge(i.birthday)
69
+                      ? getNewAge(i.birthday)
70
+                      : ''
71
+                  }}岁
72
+                </div>
73
+
74
+              </div>
75
+              <div style="margin-bottom: 20px; padding: 10px 10px 0" v-if="org_id!=10278 && org_id!=10138 && org_id!=0">
76
+                病史摘要:{{
77
+                  i.history.history_of_present_illness
78
+                    ? i.history.history_of_present_illness
79
+                    : ''
80
+                }}
81
+              </div>
82
+              <!-- <div style="margin-bottom:20px;padding:0 10px;">体格检查:
83
+                          <span>体温:{{ history.temperature ? history.temperature + '℃' : '/' }}</span>
84
+                          <span>脉搏:{{ history.pulse ? history.pulse + '次/分' : '/' }}</span>
85
+                          <span>呼吸:{{ history.breathing ? history.breathing + '次/分' : '/' }}</span>
86
+                          <span>血压:{{ history.sbp }}/{{ history.dbp }}mmHg</span>
87
+                      </div> -->
88
+              <div style="margin-bottom: 20px; padding: 0 10px">
89
+                临床诊断:{{ getDiagnosis(i.info.diagnosis) }}
90
+              </div>
91
+              <div style="display: flex; margin-bottom: 20px; padding: 0 10px">
92
+                <div>检验项目:</div>
93
+                <div>
94
+                  <div v-for="subitem in item.projectPrint" style="margin-bottom: 10px">
95
+                    {{ subitem.team.project_team }}
96
+                  </div>
97
+                  <div v-for="subitem in item.singleProjectPrint" style="margin-bottom: 10px">
98
+                    {{ subitem.project.project_name }}
99
+                  </div>
100
+                </div>
101
+              </div>
102
+              <div
103
+                style="
104
+            display: flex;
105
+            justify-content: space-between;
106
+            border-top: 1px solid #000;
107
+            line-height: 40px;
108
+            padding: 0 10px;
109
+          "
110
+              >
111
+                <div>开单医生:{{ doctor ? doctor : '' }}</div>
112
+                <div>
113
+                  开单日期:
114
+                  {{ getTime(pre_time) ? getTime(pre_time).split(' ')[0] : '' }}
115
+                </div>
116
+                <div>
117
+                  医生签字:
118
+
119
+                  <span
120
+                    style="width: 100px; display: inline-block"
121
+                    v-if="i.info.creator == 0"
122
+                  >
123
+               {{ i.info.doctor ? i.info.doctor : '' }}
124
+              </span>
125
+                  <img
126
+                    style="height: 30px"
127
+                    :src="setAdminUserES(i.info.creator)"
128
+                    alt=""
129
+                    srcset=""
130
+                    v-else
131
+                  />
132
+                </div>
133
+              </div>
134
+            </div>
135
+            <img
136
+              style="width: 100%"
137
+              v-if="org_id == 10138 "
138
+              src="https://kuyi.shengws.com/bailin/blend.jpg"
139
+              alt=""
140
+            />
141
+            <img
142
+              style="width: 100%"
143
+              v-if="org_id == 10278 || org_id == 0"
144
+              src="https://kuyi.shengws.com/bailinbeier.png"
145
+              alt=""
146
+            />
147
+          </div>
148
+        </div>
149
+      </div>
150
+    </div>
151
+  </div>
152
+</template>
153
+<script>
154
+import { uParseTime } from '@/utils/tools'
155
+import {
156
+  getAllDoctorList,
157
+  getHisPatientDetail,
158
+  getPatientCaseHistory,
159
+  getPrescriptionPrint
160
+} from '@/api/project/project'
161
+import { getInitData } from '@/api/his/his'
162
+
163
+export default {
164
+  props: {
165
+    patient_id: Number,
166
+    record_date: String,
167
+    prescription_id: Number,
168
+    ids: String,
169
+    printData: Array
170
+
171
+  },
172
+  data() {
173
+    return {
174
+      doctorList_1: [],
175
+      doctorList: [],
176
+      advicePrint: {},
177
+      patient: {},
178
+      tableData: [],
179
+      prescriptionInfo: [],
180
+      hisPatient: {},
181
+      department: [],
182
+      prescriptions: [],
183
+      projectList: [],
184
+      doc_name: '',
185
+      orgname: '',
186
+      diagnoses: [],
187
+      pageArr: [],
188
+      faber: {},
189
+      total: 0,
190
+      projectPrint: [],
191
+      time: '',
192
+      doctor: '',
193
+      org_id: '',
194
+      singleProjectPrint: [],
195
+      operatorMaps: {}
196
+    }
197
+  },
198
+  methods: {
199
+    getAge(patient) {
200
+      // 将时间戳转换为 Date 对象
201
+      const birthday = new Date(patient.birthday * 1000)
202
+
203
+      // 获取当前日期
204
+      const now = new Date()
205
+      // 计算年龄差
206
+      const ageDiffMs = now - birthday
207
+      const ageDate = new Date(ageDiffMs) // 不需要减掉 1970 年的时间戳
208
+      // 提取年份
209
+      const age = ageDate.getUTCFullYear() - 1970
210
+      return age
211
+    }, getNewAge(birthday) {
212
+      // var myDate = new Date(birthday * 1000)
213
+      // var month = myDate.getMonth() + 1
214
+      // var day = myDate.getDate()
215
+      // var age = new Date().getFullYear() - myDate.getFullYear()
216
+      // if (month < new Date().getMonth() + 1 || new Date().getMonth() + 1 == month && day <= new Date().getDate()) {
217
+      //   age++
218
+      // }
219
+      // return age
220
+      var nowTime = new Date().getTime()
221
+      return Math.ceil((nowTime - birthday * 1000) / 31536000000)
222
+    },
223
+    getPatientCaseHistory() {
224
+      const params = {
225
+        patient_id: this.patient_id
226
+      }
227
+      getPatientCaseHistory(params).then((response) => {
228
+        if (response.data.state == 1) {
229
+          var history = response.data.data.history
230
+          // console.log("中国history222222", history);
231
+          this.history = history
232
+        }
233
+      })
234
+    },
235
+    getAllDoctorList() {
236
+      getAllDoctorList().then((response) => {
237
+        if (response.data.state == 1) {
238
+          var doctor = response.data.data.doctor
239
+
240
+          this.doctorList = doctor
241
+        }
242
+      })
243
+    },
244
+
245
+    getDoctor(id) {
246
+      var name = ''
247
+      for (let i = 0; i < this.doctorList.length; i++) {
248
+        if (id == this.doctorList[i].admin_user_id) {
249
+          name = this.doctorList[i].user_name
250
+        }
251
+      }
252
+      return name
253
+    },
254
+    getTime(value, temp) {
255
+      if (value != undefined) {
256
+        return uParseTime(value, temp)
257
+      }
258
+      return ''
259
+    },
260
+
261
+    getPrescriptionPrint() {
262
+      var params = {
263
+        // patient_id:this.patient_id,
264
+        // record_date:this.record_date,
265
+        // prescription_id:this.prescription_id,
266
+        patient_id: this.patient_id,
267
+        record_date: this.record_date,
268
+        prescription_id: this.prescription_id,
269
+        ids: this.ids,
270
+        p_type: 2
271
+      }
272
+      // console.log("params", params);
273
+      getPrescriptionPrint(params).then((response) => {
274
+        if (response.data.state == 1) {
275
+          var advicePrint = response.data.data.advicePrint
276
+          // console.log("adviceprint9999", advicePrint);
277
+          this.advicePrint = advicePrint
278
+          this.prescriptions = advicePrint
279
+          // console.log("处方222222", this.prescriptions);
280
+          var hisPatient = response.data.data.hisPatient
281
+          // console.log("hisPatient", hisPatient);
282
+          this.hisPatient = hisPatient
283
+          let projectPrint = []
284
+          let total = 0
285
+          this.advicePrint.map((item) => {
286
+            // console.log("imte233232323232323223", item.project);
287
+            if (item.project.length > 0) {
288
+              item.project.map((it) => {
289
+                if (it.type == 2) {
290
+                  if (it.project.cost_classify == 3) {
291
+                    projectPrint.push(it)
292
+                    total += it.project.price * parseInt(it.count)
293
+                  }
294
+                }
295
+              })
296
+            }
297
+          })
298
+          this.doctorList_1 = response.data.data.eles
299
+          // console.log(this.doctorList_1, "医生列表");
300
+          if (this.doctorList_1.length > 0) {
301
+            var operatorsLen = this.doctorList_1.length
302
+            for (var index = 0; index < operatorsLen; index++) {
303
+              this.$set(
304
+                this.operatorMaps,
305
+                this.doctorList_1[index].creator,
306
+                this.doctorList_1[index]
307
+              )
308
+            }
309
+          }
310
+          let data = []
311
+          let data2 = []
312
+          projectPrint.map((item) => {
313
+            if (item.team.id != 0) {
314
+              let status = data.some((it) => it.team.id == item.team.id)
315
+              if (!status) {
316
+                data.push(item)
317
+              }
318
+            }
319
+            if (item.team.id == 0) {
320
+              data2.push(item)
321
+            }
322
+          })
323
+          this.projectPrint = data
324
+          console.log('列表', this.projectPrint)
325
+          this.total = total.toFixed(2)
326
+          this.pre_time = this.advicePrint[0].pre_time
327
+          this.doctor = this.advicePrint[0].doctor
328
+
329
+          this.singleProjectPrint = data2
330
+
331
+          var projectlist = response.data.data.projectlist
332
+
333
+          var projectlist = response.data.data.projectlist
334
+          // console.log("所有项目列表", projectlist);
335
+          this.projectList = projectlist
336
+          this.getPage()
337
+          let outputlist1Name = response.data.data.his.patient_info
338
+            ? JSON.parse(response.data.data.his.patient_info)
339
+            : {}
340
+          this.faber = outputlist1Name
341
+        }
342
+      })
343
+    },
344
+    // 电子签名
345
+    setAdminUserES(id) {
346
+      // console.log(id, "id");
347
+      if (id == 0) {
348
+        return ''
349
+      }
350
+      if (id in this.operatorMaps) {
351
+        // console.log(this.operatorMaps, "this.operatorMaps");
352
+        return this.operatorMaps[id].url
353
+      } else {
354
+        // console.log("po");
355
+        return ''
356
+      }
357
+    },
358
+    getHisPatientDetail() {
359
+      const params = {
360
+        patient_id: this.patient_id
361
+      }
362
+      getHisPatientDetail(params).then((response) => {
363
+        if (response.data.state == 1) {
364
+          var hisPatient = response.data.data.hisPatient
365
+          // console.log("挂号病人", hisPatient);
366
+          this.hisPatient = hisPatient
367
+        }
368
+      })
369
+    },
370
+    getInitData() {
371
+      getInitData().then((response) => {
372
+        if (response.data.state == 1) {
373
+          this.department = response.data.data.department
374
+          this.diagnoses = response.data.data.diagnose.sort(this.compare('id'))
375
+          // console.log("争端", this.diagnoses);
376
+        }
377
+      })
378
+    },
379
+    getDepart(id) {
380
+      var name = ''
381
+      for (let i = 0; i < this.department.length; i++) {
382
+        if (id == this.department[i].id) {
383
+          name = this.department[i].name
384
+        }
385
+      }
386
+      return name
387
+    },
388
+    getTotalOne(id) {
389
+      var total = 0
390
+      var addtotal = 0
391
+      for (let i = 0; i < this.prescriptions.length; i++) {
392
+        if (id == this.prescriptions[i].id) {
393
+          if (this.prescriptions[i].project != null) {
394
+            for (let a = 0; a < this.prescriptions[i].project.length; a++) {
395
+              total =
396
+                total +
397
+                this.prescriptions[i].project[a].price *
398
+                this.prescriptions[i].project[a].count
399
+            }
400
+          }
401
+
402
+          if (this.prescriptions[i].additionalcharge != null) {
403
+            for (
404
+              let a = 0;
405
+              a < this.prescriptions[i].additionalcharge.length;
406
+              a++
407
+            ) {
408
+              addtotal =
409
+                addtotal +
410
+                this.prescriptions[i].additionalcharge[a].price *
411
+                this.prescriptions[i].additionalcharge[a].count
412
+            }
413
+          }
414
+          addtotal = Math.floor(addtotal * 100) / 100
415
+        }
416
+      }
417
+
418
+      for (let i = 0; i < this.prescriptions.length; i++) {
419
+        if (id == this.prescriptions[i].id) {
420
+          if (this.prescriptions[i].advices != null) {
421
+            for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
422
+              total =
423
+                total +
424
+                this.prescriptions[i].advices[a].price *
425
+                this.prescriptions[i].advices[a].prescribing_number
426
+            }
427
+          }
428
+
429
+          if (this.prescriptions[i].additionalcharge != null) {
430
+            for (
431
+              let a = 0;
432
+              a < this.prescriptions[i].additionalcharge.length;
433
+              a++
434
+            ) {
435
+              addtotal =
436
+                addtotal +
437
+                this.prescriptions[i].additionalcharge[a].price *
438
+                this.prescriptions[i].additionalcharge[a].count
439
+            }
440
+          }
441
+          addtotal = Math.floor(addtotal * 100) / 100
442
+        }
443
+      }
444
+
445
+      return total + addtotal
446
+    },
447
+
448
+    getProjectName(id) {
449
+      var project_name = ''
450
+      for (let i = 0; i < this.projectList.length; i++) {
451
+        if (id == this.projectList[i].id) {
452
+          project_name = this.projectList[i].project_name
453
+        }
454
+      }
455
+      return project_name
456
+    },
457
+
458
+    getDiagnosis(ids) {
459
+      let newIds = ids.split(',').sort(function(a, b) {
460
+        return a - b
461
+      })
462
+
463
+      var name = ''
464
+      let nameArr = []
465
+      for (let i = 0; i < this.diagnoses.length; i++) {
466
+        // if(id == this.diagnoses[i].id){
467
+        //    name = this.diagnoses[i].class_name
468
+        // }
469
+
470
+        if (newIds.indexOf(this.diagnoses[i].id.toString()) > -1) {
471
+          // name += diagnoses[i].class_name + ' '
472
+          nameArr.push(this.diagnoses[i].class_name)
473
+        }
474
+      }
475
+      let newNameArr = []
476
+      nameArr.map((item, index) => {
477
+        if (item == '尿毒症') {
478
+          newNameArr.push(item)
479
+          nameArr.splice(index, 1, '')
480
+        }
481
+      })
482
+      newNameArr.push(...nameArr)
483
+      return newNameArr.join(' ')
484
+    },
485
+    compare(property) {
486
+      return function(a, b) {
487
+        var value1 = a[property]
488
+        var value2 = b[property]
489
+        return value1 - value2 //升序排序
490
+      }
491
+    },
492
+    getPage() {
493
+      this.page = 1
494
+      this.pageArr = []
495
+
496
+      this.advicePrint.map((item) => {
497
+        let arr = []
498
+        item.pageArr = []
499
+        if (item.advices.length <= 5) {
500
+          this.page = 1
501
+          arr.push(item.advices.length)
502
+          item.pageArr.push(arr)
503
+        } else if (item.advices.length > 5) {
504
+          this.page = parseInt(item.advices.length / 5)
505
+          let num = item.advices.length % 5
506
+          for (var i = 0; i < this.page; i++) {
507
+            item.pageArr.push([5])
508
+          }
509
+          if (num != 0) {
510
+            item.pageArr.push([num])
511
+          }
512
+        }
513
+      })
514
+      // console.log('this.pageArr',this.pageArr)
515
+    },
516
+    getName(list) {
517
+      console.log('list', list)
518
+      let new_list = []
519
+      for (let i = 0; i < list.length; i++) {
520
+        if (list[i].aac031 == '1') {
521
+          new_list.push(list[i])
522
+        }
523
+      }
524
+
525
+      switch (new_list[0].bcc334) {
526
+        case 'A31001':
527
+          return '深圳医保1档'
528
+          break
529
+        case 'A31002':
530
+          return '深圳医保2档'
531
+
532
+          break
533
+        case 'A31003':
534
+          return '深圳医保3档'
535
+
536
+          break
537
+        case 'A31004':
538
+          return '二档(少儿)'
539
+
540
+          break
541
+        case 'A31005':
542
+          return '学生二档'
543
+
544
+          break
545
+        case 'A31006':
546
+          return '大学生二档'
547
+
548
+          break
549
+        case 'A32001':
550
+          return '在职公务员'
551
+          break
552
+        case 'A32002':
553
+          return '在职驻深公务员'
554
+
555
+          break
556
+        case 'A39301':
557
+          return '家属统筹医疗'
558
+
559
+          break
560
+        case 'A41001':
561
+          return '工伤在职'
562
+
563
+          break
564
+        case 'A51001':
565
+          return '生育在职'
566
+
567
+          break
568
+        case 'A52001':
569
+          return '生育医疗一档'
570
+
571
+          break
572
+        case 'A52002':
573
+          return '生育医疗一档'
574
+
575
+          break
576
+        case 'C31001':
577
+          return '一档医疗退休'
578
+
579
+          break
580
+        case 'C31002':
581
+          return '二档医疗退休'
582
+          break
583
+      }
584
+    }
585
+  },
586
+  created() {
587
+    this.getAllDoctorList()
588
+    this.getInitData()
589
+    this.getPrescriptionPrint()
590
+    this.getHisPatientDetail()
591
+    this.getPatientCaseHistory()
592
+    var xtuser = this.$store.getters.xt_user
593
+    this.orgname = xtuser.org.org_name
594
+    this.org_id = this.$store.getters.xt_user.org_id
595
+  },
596
+  watch: {
597
+    ids: function(val) {
598
+      this.ids = val
599
+      this.getPrescriptionPrint()
600
+    }
601
+  }
602
+}
603
+</script>
604
+
605
+
606
+<style lang="scss" scoped>
607
+.prescription-print {
608
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
609
+  0 0 60px rgba(0, 0, 0, 0.06) inset;
610
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
611
+  0 0 40px rgba(0, 0, 0, 0.06) inset;
612
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
613
+  margin-bottom: 20px;
614
+  padding: 20px 10px;
615
+}
616
+
617
+.printTitle {
618
+  font-size: 22px;
619
+  text-align: center;
620
+  font-weight: bold;
621
+  margin-bottom: 10px;
622
+}
623
+
624
+.infoTitle {
625
+  display: flex;
626
+  margin-top: 10px;
627
+  line-height: 24px;
628
+}
629
+
630
+.infoTitle div {
631
+  width: 200px;
632
+}
633
+
634
+.infoMain {
635
+  display: flex;
636
+  flex-wrap: wrap;
637
+  margin-top: 10px;
638
+}
639
+
640
+.infoMain div {
641
+  width: 50%;
642
+  line-height: 24px;
643
+}
644
+
645
+.prescriptionBox {
646
+  padding: 0 10px;
647
+  min-height: 400px;
648
+}
649
+
650
+.Rp {
651
+  font-size: 22px;
652
+  font-weight: bold;
653
+}
654
+
655
+.drugsBox {
656
+  padding-left: 40px;
657
+  margin-bottom: 10px;
658
+}
659
+
660
+.drugsBox div {
661
+  line-height: 20px;
662
+}
663
+
664
+.drugsOne {
665
+  line-height: 24px;
666
+}
667
+
668
+.drugsOne span {
669
+  margin-right: 20px;
670
+}
671
+
672
+.doctorBox {
673
+  display: flex;
674
+  justify-content: space-between;
675
+  padding: 0 10px;
676
+  line-height: 24px;
677
+  border-bottom: 2px solid #000;
678
+}
679
+
680
+.actionBar {
681
+  display: flex;
682
+  justify-content: space-between;
683
+  line-height: 24px;
684
+  padding: 0 10px;
685
+}
686
+
687
+.actionBar p {
688
+  width: 150px;
689
+}
690
+
691
+.under_line {
692
+  display: inline-block;
693
+  border-bottom: 1px solid #000;
694
+  flex: 1;
695
+}
696
+</style>

+ 2 - 4
src/xt_pages/outpatientDoctorStation/pastInquiries.vue Näytä tiedosto

@@ -426,7 +426,6 @@ export default {
426 426
         getBatchPrint(params).then((res) => {
427 427
           let Arr = res.data.data.patients
428 428
 
429
-
430 429
           let new_patients = []
431 430
           if (type != 3) {
432 431
 
@@ -476,12 +475,11 @@ export default {
476 475
             Arr.forEach((el) => {
477 476
               el.new_prescriptions.forEach((o) => {
478 477
                 o.project.forEach((i) => {
479
-                  if (i.team.project_team != '') {
480 478
                     new_patients.push(el)
481
-                  }
482 479
                 })
483 480
               })
484 481
             })
482
+
485 483
             let projectPrint = []
486 484
             new_patients.forEach((el) => {
487 485
               el.new_prescriptions.map((item) => {
@@ -513,7 +511,7 @@ export default {
513 511
       }
514 512
       this.innerVisible = true
515 513
     },
516
-    // 外层去重方
514
+    // // 外层去重方
517 515
     split_project(Arr) {
518 516
       let hash = {}
519 517
       let new_Arr = []

+ 2 - 1
src/xt_pages/outpatientDoctorStation/print.vue Näytä tiedosto

@@ -144,7 +144,8 @@ export default {
144 144
             scanStyles: false,
145 145
           });
146 146
         }, 500);
147
-      } else {
147
+      } 
148
+       else {
148 149
         const style =
149 150
           "@media print {#prescription-print{font-size:14px;}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:10px;line-height: 1px; padding:0 10px;}.infoTitle p{width: 200px;font-size:14px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{padding:0 10px;min-height:450px;}.Rp{font-size: 22px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;position: relative;}.drugsBox div{line-height: 20px;width:80%} .drugsOne{line-height: 1px;} .drugsOne span{margin-right: 20px;} .doctorBox{display: flex; justify-content: space-between; padding:0 10px; line-height: 1px; border-bottom: 2px solid #000;} .actionBar{display: flex; justify-content: space-between; line-height: 1px; padding:0 10px;} .actionBar p{width:150px;}}";
150 151
         printJS({

+ 20 - 25
src/xt_pages/outpatientDoctorStation/template/prinSeven.vue Näytä tiedosto

@@ -22,14 +22,14 @@
22 22
           {{ orgname }}处方笺
23 23
         </div>
24 24
         <div >
25
-          <div class="infoTitle">
26
-            <p>姓名:{{ item.patient.name ? item.patient.name : "" }}</p>
27
-            <p>
25
+          <div  style="display: flex;border-top: 2px solid #000;margin-top: 10px;line-height: 24px;padding: 0 10px;">
26
+            <p style="width: 200px;">姓名:{{ item.patient.name ? item.patient.name : "" }}</p>
27
+            <p style="width: 200px;">
28 28
               性别:
29 29
               <span v-if="item.patient.gender == 1">男</span>
30 30
               <span v-if="item.patient.gender == 2">女</span>
31 31
             </p>
32
-            <p>年龄:{{ getAge(item.patient) ? getAge(item.patient) : "" }}岁</p>
32
+            <p style="width: 200px;">年龄:{{ getAge(item.patient) ? getAge(item.patient) : "" }}岁</p>
33 33
           </div>
34 34
           <div class="infoMain">
35 35
             <div style="margin-bottom: 10px">
@@ -49,13 +49,13 @@
49 49
             <div style="margin-bottom: 10px" v-else>
50 50
               日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}
51 51
             </div>
52
-            <div>地址:{{ item.patient.home_address }}</div>
53
-            <div style="display: flex; width: 50%">
52
+            <div style="width: 100%;">地址:{{ item.patient.home_address }}</div>
53
+            <div style=" width: 50%">
54 54
               临床诊断:{{ getDiagnosis(item.info.diagnosis) }}
55 55
             </div>
56 56
           </div>
57 57
         </div>
58
-          <div class="prescriptionBox" >
58
+          <div class="prescriptionBox" style="min-height: 400px;">
59 59
             <div class="Rp">Rp:</div>
60 60
             <div
61 61
               class="drugsBox"
@@ -93,8 +93,8 @@
93 93
                     <div style="margin-bottom: 10px" v-else>
94 94
                       日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}
95 95
                     </div>
96
-                    <div>地址:{{ item.patient.home_address }}</div>
97
-                    <div style="display: flex; width: 50%">
96
+                    <div style="width: 100%">地址:{{ item.patient.home_address }}</div>
97
+                    <div style="width: 100%">
98 98
                       临床诊断:{{ getDiagnosis(item.info.diagnosis) }}
99 99
                     </div>
100 100
                   </div>
@@ -265,6 +265,13 @@
265 265
           <div  style="border-bottom: 2px solid #000; width: 100%;margin-right: 30px;padding: 0 10px;line-height: 24px;" >
266 266
             <p style="text-align: right;">医师:{{ item.doctor ? item.doctor : "" }}</p>
267 267
           </div>
268
+          <!-- <div style="display: flex;justify-content: space-around;border-bottom: 2px solid #000;">
269
+            <p style="width:300px;">大额处方患者意见: 
270
+              <el-radio v-model="radio" label="1">同意</el-radio>
271
+              <el-radio v-model="radio" label="2">不同意</el-radio>
272
+            </p>
273
+            <p style="text-align: right;">医师:{{ item.doctor ? item.doctor : "" }}</p>
274
+          </div> -->
268 275
 
269 276
           <div class="actionBar" >
270 277
             <!-- <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
@@ -286,30 +293,18 @@
286 293
             </p>
287 294
             
288 295
           </div>
289
-          <div class="actionBar" style="margin-bottom: 10px;">
296
+          <div class="actionBar">
290 297
             <p style="width:300px;">大额处方患者意见: 
291 298
               <el-radio v-model="radio" label="1">同意</el-radio>
292 299
               <el-radio v-model="radio" label="2">不同意</el-radio>
293 300
             </p>
301
+            
294 302
             <p>收费员:</p>
295 303
           </div>
296
-          <div style="padding: 0px 10px;">
304
+          <div>
297 305
             <p >患者签名:</p>
298 306
           </div>
299
-
300
-          <!-- <div class="actionBar" v-else>
301
-            <p >审核、调配:</p>
302
-            <p >核对、发药:</p>
303
-            <p >
304
-              药费:{{
305
-                getTotalOne(item.id).toFixed(2)
306
-                  ? getTotalOne(item.id).toFixed(2)
307
-                  : 0
308
-              }}元
309
-            </p>
310
-           
311
-          </div> -->
312
-        <!-- </div> -->
307
+          
313 308
       </div>
314 309
     </div>
315 310
   </div>

+ 9 - 10
src/xt_pages/outpatientDoctorStation/treatTemplate/printOne.vue Näytä tiedosto

@@ -28,12 +28,14 @@
28 28
                     <span v-if="item.patient.gender == 2">女</span>
29 29
                 </div>
30 30
                 <div style="margin-bottom: 10px;width:25%">年龄:
31
-                    <span>{{getAge(item.patient)?getAge(item.patient):""}}</span>
31
+                    <span>{{getAge(item.patient)?getAge(item.patient):""}}</span>
32 32
                 </div>
33 33
                 <div style="margin-bottom: 10px;width:25%">参保类型:{{hisPatient.social_type?hisPatient.social_type:''}}
34 34
                 </div>
35 35
                 <div style="margin-bottom: 10px;width:50%;">联系电话:{{item.patient.phone}}</div>
36
-                <div style="width:50%;">地址:{{item.patient.unit_address}}</div>
36
+                <div style="width:50%;">地址:{{ item.patient.home_address }}
37
+                  <!-- {{item.patient.unit_address}} -->
38
+                </div>
37 39
                 <div style="width:100%;">诊断:{{getDiagnosis(item.info.diagnosis)}}</div>
38 40
             </div>
39 41
 
@@ -78,11 +80,7 @@
78 80
             <div style="display: flex; margin-top: 10px; line-height: 24px;padding: 0 10px;">
79 81
                 <div style="width: 300px;">开单医生:{{item.doctor?item.doctor:''}}</div>
80 82
                 <div style="width: 300px;">签章:</div>
81
-            </div>
82
-
83
-            <div class="actionBar">
84
-                <div>执行医生:{{item.doctor?item.doctor:''}}</div>
85
-                <div>费用:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):''}}元</div>
83
+                <div style="width: 300px;">费用:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):''}}元</div>
86 84
             </div>
87 85
 
88 86
             <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
@@ -417,10 +415,11 @@
417 415
         })
418 416
       },
419 417
       getDiagnosis(id) {
420
-        var name = ''
418
+        let arr = id.split(",");
419
+        var name = "";
421 420
         for (let i = 0; i < this.diagnoses.length; i++) {
422
-          if (id == this.diagnoses[i].id) {
423
-            name = this.diagnoses[i].class_name
421
+          if (arr.indexOf(String(this.diagnoses[i].id)) > -1) {
422
+            name += this.diagnoses[i].class_name + " ";
424 423
           }
425 424
         }
426 425
         return name

+ 13 - 0
src/xt_pages/outpatientTool/components/batchPrint.vue Näytä tiedosto

@@ -0,0 +1,13 @@
1
+<template>
2
+
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  name: 'batchPrint'
8
+}
9
+</script>
10
+
11
+<style scoped>
12
+
13
+</style>

+ 33 - 0
src/xt_pages/outpatientTool/components/detail.vue Näytä tiedosto

@@ -255,6 +255,9 @@ export default {
255 255
           let tempData = response.data.data.patients
256 256
           let data = response.data.data.patients
257 257
           let orders = this.unique(tempData)
258
+
259
+          let order_infos = []
260
+
258 261
           for (let i = 0; i < orders.length; i++) {
259 262
             let obj = {
260 263
               patient_id: orders[i].id,
@@ -276,6 +279,7 @@ export default {
276 279
               order_info: []
277 280
             }
278 281
             let orders = tempPatients[i].orders
282
+
279 283
             for (let b = 0; b < orders.length; b++) {
280 284
               for (let c = 0; c < orders[b].order_info.length; c++) {
281 285
                 let newObj = {}
@@ -314,6 +318,7 @@ export default {
314 318
                   }
315 319
                 }
316 320
                 obj.order_info.push(newObj)
321
+                order_infos.push(orders[b].order_info)
317 322
               }
318 323
             }
319 324
             tempPatientsTwo.push(obj)
@@ -437,8 +442,36 @@ export default {
437 442
 
438 443
           // console.log(tempPatientsTwo.length)
439 444
           //
445
+          console.log(order_infos)
446
+          let advices = []
447
+          let projects = []
448
+          let goods = []
449
+          for(let i = 0; i < order_infos.length; i++){
450
+            console.log(order_infos[i])
451
+            if(order_infos[i].advice_id > 0 && order_infos[i].project_id == 0){
452
+              advices.push(order_infos[i].advice)
453
+            }
454
+            if(order_infos[i].advice_id == 0 && order_infos[i].project_id > 0){
455
+              if(order_infos[i].project.type == 3){
456
+                goods.push(order_infos[i].project)
457
+              }
458
+            }
459
+            if(order_infos[i].advice_id == 0 && order_infos[i].project_id > 0){
460
+              if(order_infos[i].project.type == 2){
461
+                projects.push(order_infos[i].project)
462
+              }
463
+            }
464
+          }
465
+
466
+          console.log(advices)
467
+          console.log(projects)
468
+          console.log(goods)
440 469
 
441 470
         }
471
+
472
+
473
+
474
+
442 475
         //
443 476
         // console.log('去重前')
444 477
         // console.log(advice)

+ 206 - 26
src/xt_pages/outpatientTool/components/settle.vue Näytä tiedosto

@@ -49,7 +49,7 @@
49 49
               <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
50 50
           </div>
51 51
       </div>
52
-      <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="report-table"
52
+      <el-table :data="tableData" border :row-style="{ color: '#303133' }"
53 53
                 :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
54 54
                 show-summary
55 55
                 v-loading="settle_loading"
@@ -94,73 +94,96 @@
94 94
                   <div v-if="scope.row.med_type == '14'">门诊特殊病</div>
95 95
                   <div v-if="scope.row.med_type == '11'">普通门诊</div>
96 96
                   <div v-if="scope.row.med_type == '1112'">普通门诊</div>
97
-                
97
+
98 98
               </template>
99 99
           </el-table-column>
100
-          <el-table-column align="center" prop="item_name" label="医疗费总额">
100
+          <el-table-column align="center" prop="medfee_sumamt" label="医疗费总额">
101 101
               <template slot-scope="scope">{{scope.row.medfee_sumamt.toFixed(2)}}</template>
102 102
           </el-table-column>
103
-          <el-table-column align="center" prop="item_name" label="基金支付金额">
103
+          <el-table-column align="center" prop="fund_pay_sumamt" label="基金支付金额">
104 104
               <template slot-scope="scope">{{scope.row.fund_pay_sumamt.toFixed(2)}}</template>
105 105
           </el-table-column>
106
-          <el-table-column align="center" prop="item_name" label="个人账户支付金额">
106
+          <el-table-column align="center" prop="acct_pay" label="个人账户支付金额">
107 107
               <template slot-scope="scope">{{scope.row.acct_pay.toFixed(2)}}</template>
108 108
           </el-table-column>
109
-          <el-table-column align="center" prop="item_name" label="个人支付金额">
109
+          <el-table-column align="center" prop="psn_cash_pay" label="个人支付金额">
110 110
               <template slot-scope="scope">{{scope.row.psn_cash_pay.toFixed(2)}}</template>
111 111
           </el-table-column>
112
-          <el-table-column align="center" prop="item_name" label="基金统筹金额">
112
+          <el-table-column align="center" prop="hifp_pay" label="基金统筹金额">
113 113
               <template slot-scope="scope">{{scope.row.hifp_pay.toFixed(2)}}</template>
114 114
           </el-table-column>
115 115
 
116
-          <el-table-column align="center" prop="item_name" label="大额基金支付">
116
+          <el-table-column align="center" prop="hifob_pay" label="大额基金支付">
117 117
               <template slot-scope="scope">{{scope.row.hifob_pay.toFixed(2)}}</template>
118 118
           </el-table-column>
119 119
 
120 120
 
121
-          <el-table-column align="center" prop="item_name" label="医疗救助基金">
121
+          <el-table-column align="center" prop="maf_pay" label="医疗救助基金">
122 122
               <template slot-scope="scope">{{scope.row.maf_pay.toFixed(2)}}</template>
123 123
           </el-table-column>
124 124
 
125
-          <el-table-column align="center" prop="item_name" label="企业补充医疗保险基金支出">
125
+          <el-table-column align="center" prop="hifes_pay" label="企业补充医疗保险基金支出">
126 126
               <template slot-scope="scope">{{scope.row.hifes_pay.toFixed(2)}}</template>
127 127
           </el-table-column>
128 128
 
129 129
 
130
-          <el-table-column align="center" prop="item_name" label="居民大病保险资金支出">
130
+          <el-table-column align="center" prop="hifmi_pay" label="居民大病保险资金支出">
131 131
               <template slot-scope="scope">{{scope.row.hifmi_pay.toFixed(2)}}</template>
132 132
           </el-table-column>
133 133
 
134
-        <el-table-column align="center" prop="item_name" label="其他支付">
134
+        <el-table-column align="center" prop="oth_pay" label="其他支付">
135 135
           <template slot-scope="scope">{{scope.row.oth_pay.toFixed(2)}}</template>
136 136
         </el-table-column>
137 137
 
138
-        <el-table-column align="center" prop="item_name" label="公务员医疗补助资金支出">
138
+        <el-table-column align="center" prop="cvlserv_pay" label="公务员医疗补助资金支出">
139 139
           <template slot-scope="scope">{{scope.row.cvlserv_pay.toFixed(2)}}</template>
140 140
         </el-table-column>
141 141
 
142
-        <el-table-column align="center" prop="item_name" label="微信支付">
143
-          <template slot-scope="scope">{{scope.row.wechat_pay}}</template>
142
+        <el-table-column align="center" prop="wechat_pay" label="微信支付">
143
+          <template slot-scope="scope" style="width: 100px">
144
+            <el-input v-model="scope.row.wechat_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
145
+            <el-button size="small" @click="change(scope.row.id,scope.row.wechat_pay,'wechat_pay')">修改</el-button>
146
+          </template>
144 147
         </el-table-column>
145 148
 
146
-        <el-table-column align="center" prop="item_name" label="支付宝支付">
147
-          <template slot-scope="scope">{{scope.row.ali_pay}}</template>
149
+        <el-table-column align="center" prop="ali_pay" label="支付宝支付">
150
+<!--          <template slot-scope="scope">{{scope.row.ali_pay}}</template>-->
151
+          <template slot-scope="scope" style="width: 100px">
152
+            <el-input  v-model="scope.row.ali_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
153
+            <el-button size="small" @click="change(scope.row.id,scope.row.ali_pay,'ali_pay')">修改</el-button>
154
+          </template>
148 155
         </el-table-column>
149 156
 
150
-        <el-table-column align="center" prop="item_name" label="银行卡支付">
151
-          <template slot-scope="scope">{{scope.row.band_card_pay}}</template>
157
+        <el-table-column align="center" prop="band_card_pay" label="银行卡支付">
158
+<!--          <template slot-scope="scope">{{scope.row.band_card_pay}}</template>-->
159
+          <template slot-scope="scope" style="width: 100px">
160
+            <el-input v-model="scope.row.band_card_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
161
+            <el-button size="small" @click="change(scope.row.id,scope.row.band_card_pay,'band_card_pay')">修改</el-button>
162
+          </template>
152 163
         </el-table-column>
153 164
 
154
-        <el-table-column align="center" prop="item_name" label="积分支付">
155
-          <template slot-scope="scope">{{scope.row.jifen_pay}}</template>
165
+        <el-table-column align="center" prop="jifen_pay" label="积分支付">
166
+<!--          <template slot-scope="scope">{{scope.row.jifen_pay}}</template>-->
167
+          <template slot-scope="scope" style="width: 100px">
168
+            <el-input v-model="scope.row.jifen_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
169
+            <el-button size="small" @click="change(scope.row.id,scope.row.jifen_pay,'jifen_pay')">修改</el-button>
170
+          </template>
156 171
         </el-table-column>
157 172
 
158
-        <el-table-column align="center" prop="item_name" label="现金支付">
159
-          <template slot-scope="scope">{{scope.row.cash_pay}}</template>
173
+        <el-table-column align="center" prop="cash_pay" label="现金支付">
174
+<!--          <template slot-scope="scope">{{scope.row.cash_pay}}</template>-->
175
+          <template slot-scope="scope" style="width: 100px">
176
+            <el-input v-model="scope.row.cash_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
177
+            <el-button size="small" @click="change(scope.row.id,scope.row.cash_pay,'cash_pay')">修改</el-button>
178
+          </template>
160 179
         </el-table-column>
161 180
 
162 181
         <el-table-column align="center" prop="item_name" label="其他说明">
163
-          <template slot-scope="scope">{{scope.row.oth_desc}}</template>
182
+<!--          <template slot-scope="scope">{{scope.row.oth_desc}}</template>-->
183
+          <template slot-scope="scope" style="width: 100px">
184
+            <el-input v-model="scope.row.oth_desc"></el-input>
185
+            <el-button size="small" @click="change(scope.row.id,scope.row.oth_desc,'oth_desc')">修改</el-button>
186
+          </template>
164 187
         </el-table-column>
165 188
 
166 189
           <el-table-column align="center" prop="total" label="费用总额">
@@ -170,13 +193,155 @@
170 193
           </el-table-column>
171 194
 
172 195
       </el-table>
196
+
197
+    <el-table ref="report-table" :data="tableData" v-show="false" border :row-style="{ color: '#303133' }"
198
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
199
+              show-summary
200
+              v-loading="settle_loading"
201
+              max-height="600"
202
+              :span-method="merge"
203
+              :summary-method="getTotal"
204
+              highlight-current-row>
205
+
206
+      <el-table-column align="center" prop="name" label="患者名字">
207
+        <template slot-scope="scope">{{ scope.row.other_name }}</template>
208
+      </el-table-column>
209
+      <el-table-column align="center" prop="item_name" label="身份证">
210
+        <template slot-scope="scope">
211
+          {{scope.row.id_card_no}}
212
+        </template>
213
+      </el-table-column>
214
+      <el-table-column align="center" prop="item_name" label="就诊号">
215
+        <template slot-scope="scope">
216
+          {{scope.row.mdtrt_id}}
217
+        </template>
218
+      </el-table-column>
219
+      <el-table-column align="center" prop="item_name" label="治疗日期">
220
+        <template slot-scope="scope">
221
+          {{getTimes(scope.row.settle_accounts_date)}}
222
+        </template>
223
+      </el-table-column>
224
+
225
+      <el-table-column align="center" prop="item_name" label="结算日期">
226
+        <template slot-scope="scope">
227
+          {{scope.row.setl_time?scope.row.setl_time.split(" ")[0]:getTimes(scope.row.settle_accounts_date)}}
228
+        </template>
229
+      </el-table-column>
230
+
231
+      <el-table-column align="center" prop="item_name" label="结算类型">
232
+        <template slot-scope="scope">
233
+          <div v-if="scope.row.is_medicine_insurance == 0">自费</div>
234
+          <div v-if="scope.row.is_medicine_insurance == 1">医保</div>
235
+        </template>
236
+      </el-table-column>
237
+      <el-table-column align="center" prop="item_name" label="处方类型">
238
+        <template slot-scope="scope">
239
+          <div v-if="scope.row.med_type == '14'">门诊特殊病</div>
240
+          <div v-if="scope.row.med_type == '11'">普通门诊</div>
241
+          <div v-if="scope.row.med_type == '1112'">普通门诊</div>
242
+
243
+        </template>
244
+      </el-table-column>
245
+      <el-table-column align="center" prop="medfee_sumamt" label="医疗费总额">
246
+        <template slot-scope="scope">{{scope.row.medfee_sumamt.toFixed(2)}}</template>
247
+      </el-table-column>
248
+      <el-table-column align="center" prop="fund_pay_sumamt" label="基金支付金额">
249
+        <template slot-scope="scope">{{scope.row.fund_pay_sumamt.toFixed(2)}}</template>
250
+      </el-table-column>
251
+      <el-table-column align="center" prop="acct_pay" label="个人账户支付金额">
252
+        <template slot-scope="scope">{{scope.row.acct_pay.toFixed(2)}}</template>
253
+      </el-table-column>
254
+      <el-table-column align="center" prop="psn_cash_pay" label="个人支付金额">
255
+        <template slot-scope="scope">{{scope.row.psn_cash_pay.toFixed(2)}}</template>
256
+      </el-table-column>
257
+      <el-table-column align="center" prop="hifp_pay" label="基金统筹金额">
258
+        <template slot-scope="scope">{{scope.row.hifp_pay.toFixed(2)}}</template>
259
+      </el-table-column>
260
+
261
+      <el-table-column align="center" prop="hifob_pay" label="大额基金支付">
262
+        <template slot-scope="scope">{{scope.row.hifob_pay.toFixed(2)}}</template>
263
+      </el-table-column>
264
+
265
+
266
+      <el-table-column align="center" prop="maf_pay" label="医疗救助基金">
267
+        <template slot-scope="scope">{{scope.row.maf_pay.toFixed(2)}}</template>
268
+      </el-table-column>
269
+
270
+      <el-table-column align="center" prop="hifes_pay" label="企业补充医疗保险基金支出">
271
+        <template slot-scope="scope">{{scope.row.hifes_pay.toFixed(2)}}</template>
272
+      </el-table-column>
273
+
274
+
275
+      <el-table-column align="center" prop="hifmi_pay" label="居民大病保险资金支出">
276
+        <template slot-scope="scope">{{scope.row.hifmi_pay.toFixed(2)}}</template>
277
+      </el-table-column>
278
+
279
+      <el-table-column align="center" prop="oth_pay" label="其他支付">
280
+        <template slot-scope="scope">{{scope.row.oth_pay.toFixed(2)}}</template>
281
+      </el-table-column>
282
+
283
+      <el-table-column align="center" prop="cvlserv_pay" label="公务员医疗补助资金支出">
284
+        <template slot-scope="scope">{{scope.row.cvlserv_pay.toFixed(2)}}</template>
285
+      </el-table-column>
286
+
287
+      <el-table-column align="center" prop="wechat_pay" label="微信支付">
288
+        <template slot-scope="scope">{{scope.row.wechat_pay}}</template>
289
+
290
+<!--        <template slot-scope="scope" style="width: 100px">-->
291
+<!--          <el-input v-model="scope.row.wechat_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>-->
292
+<!--        </template>-->
293
+      </el-table-column>
294
+
295
+      <el-table-column align="center" prop="ali_pay" label="支付宝支付">
296
+                  <template slot-scope="scope">{{scope.row.ali_pay}}</template>
297
+<!--        <template slot-scope="scope" style="width: 100px">-->
298
+<!--          <el-input  v-model="scope.row.ali_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>-->
299
+<!--        </template>-->
300
+      </el-table-column>
301
+
302
+      <el-table-column align="center" prop="band_card_pay" label="银行卡支付">
303
+                  <template slot-scope="scope">{{scope.row.band_card_pay}}</template>
304
+<!--        <template slot-scope="scope" style="width: 100px">-->
305
+<!--          <el-input v-model="scope.row.band_card_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>-->
306
+<!--        </template>-->
307
+      </el-table-column>
308
+
309
+      <el-table-column align="center" prop="jifen_pay" label="积分支付">
310
+                  <template slot-scope="scope">{{scope.row.jifen_pay}}</template>
311
+<!--        <template slot-scope="scope" style="width: 100px">-->
312
+<!--          <el-input v-model="scope.row.jifen_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>-->
313
+<!--        </template>-->
314
+      </el-table-column>
315
+
316
+      <el-table-column align="center" prop="cash_pay" label="现金支付">
317
+                  <template slot-scope="scope">{{scope.row.cash_pay}}</template>
318
+<!--        <template slot-scope="scope" style="width: 100px">-->
319
+<!--          <el-input v-model="scope.row.cash_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>-->
320
+<!--        </template>-->
321
+      </el-table-column>
322
+
323
+      <el-table-column align="center" prop="item_name" label="其他说明">
324
+                  <template slot-scope="scope">{{scope.row.oth_desc}}</template>
325
+<!--        <template slot-scope="scope" style="width: 100px">-->
326
+<!--          <el-input v-model="scope.row.oth_desc"></el-input>-->
327
+<!--        </template>-->
328
+      </el-table-column>
329
+
330
+      <el-table-column align="center" prop="total" label="费用总额">
331
+        <template slot-scope="scope">
332
+          <div>{{scope.row.total.toFixed(2)}}</div>
333
+        </template>
334
+      </el-table-column>
335
+
336
+    </el-table>
337
+
173 338
   </div>
174 339
 </template>
175 340
 
176 341
 
177 342
 <script>
178 343
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
179
-import { GetSummarySettle } from '@/api/his/his'
344
+import { GetSummarySettle,changeOrderDesc } from '@/api/his/his'
180 345
 import { uParseTime } from '@/utils/tools'
181 346
 // import NewStatementPrint from './newStatementPrint'
182 347
   const moment = require('moment')
@@ -208,6 +373,20 @@ import { uParseTime } from '@/utils/tools'
208 373
       }
209 374
     },
210 375
     methods: {
376
+      change(id,desc,type){
377
+        let params = {
378
+          id: id,
379
+          desc: desc,
380
+          change_type: type
381
+        }
382
+        changeOrderDesc(params).then(response => {
383
+          if (response.data.state == 0) {
384
+            this.$message.error(response.data.msg)
385
+          } else {
386
+            this.$message.success(response.data.data.msg)
387
+          }
388
+        })
389
+      },
211 390
       getTimes(time) {
212 391
         return uParseTime(time, '{y}-{m}-{d}')
213 392
       },
@@ -269,6 +448,7 @@ import { uParseTime } from '@/utils/tools'
269 448
               for (let b = 0; b < data[i].orders.length; b++) {
270 449
                 let order = data[i].orders[b]
271 450
                 order['other_name'] = data[i].name
451
+                order['id'] = order.id
272 452
                 order['id_card_no'] = data[i].id_card_no
273 453
                 order['mdtrt_id'] =order.mdtrt_id
274 454
 
@@ -381,7 +561,7 @@ import { uParseTime } from '@/utils/tools'
381 561
           }
382 562
           console.log(data)
383 563
           const values = data.map(item => Number(item[column.property]))
384
-          if (column.property === 'total') {
564
+          if (column.property === 'total' || column.property === 'medfee_sumamt'  || column.property === 'fund_pay_sumamt'  || column.property === 'acct_pay'  || column.property === 'maf_pay'  || column.property === 'psn_cash_pay'  || column.property === 'hifp_pay'  || column.property === 'hifob_pay' ||  column.property === 'hifes_pay' || column.property === 'hifmi_pay' || column.property === 'oth_pay' || column.property === 'cvlserv_pay' || column.property === 'wechat_pay' || column.property === 'ali_pay' || column.property === 'band_card_pay' || column.property === 'jifen_pay' || column.property === 'cash_pay') {
385 565
             sums[index] = values.reduce((prev, curr) => {
386 566
               const value = Number(curr)
387 567
               if (!isNaN(value)) {

+ 46 - 7
src/xt_pages/outpatientTool/labelPrint.vue Näytä tiedosto

@@ -44,11 +44,11 @@
44 44
                         :value="item.id">
45 45
                       </el-option>
46 46
                     </el-select>
47
-
47
+                  <el-button @click="printThree()">批量打印</el-button>
48 48
                   <el-checkbox v-model="is_combination_print">是否组合打印</el-checkbox>
49 49
 
50
-<!--                  <el-checkbox v-model="is_combination_print">是否组合打印</el-checkbox>-->
51
-                  <el-button v-if="!is_combination_print" @click="printTwo()">组合打印</el-button>
50
+<!--                  <el-checkbox @click="printTwo()">批量打印</el-checkbox>-->
51
+                  <el-button v-if="!is_combination_print && $store.getters.xt_user.org.id == 10138" @click="printTwo()">组合打印</el-button>
52 52
 
53 53
                 </div>
54 54
             </div>
@@ -134,7 +134,7 @@
134 134
                               <div>{{getTime(current_ctime,'{m}-{d}')}}</div>
135 135
                               <div>{{getTime(current_ctime,'{h}:{i}')}}</div>
136 136
                           </div>
137
-                          <img  v-if="$store.getters.xt_user.org.id != 0 &&  $store.getters.xt_user.org.id != 10138" style="width:300px;height:200px;margin-left:10px;" id="barcode">
137
+                          <img  v-if=" $store.getters.xt_user.org.id != 10138"  id="barcode">
138 138
                       </div>
139 139
                       <div style="margin-bottom:5px;">{{current_number}}</div>
140 140
                       <div style="display:flex;">
@@ -148,6 +148,39 @@
148 148
                 <el-button type="primary" @click="labelVisible = false">确 定</el-button>
149 149
             </div>
150 150
         </el-dialog>
151
+
152
+
153
+      <el-dialog title="批量打印" :visible.sync="batchLabelVisible">
154
+        <div>
155
+          <el-row style="float:right;">
156
+            <el-col :span="24">
157
+              <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印
158
+              </el-button>
159
+            </el-col>
160
+          </el-row>
161
+            <div id="sign" class="signPrint">
162
+              <div v-for="item in selecting_schs">
163
+               <div style="display:flex;margin-bottom:10px;" >
164
+              <div style="margin-left:15px;">
165
+                <div style="font-weight:bold;font-size:24px;">C</div>
166
+                <div>{{getTime(item.ctime,'{m}-{d}')}}</div>
167
+                <div>{{getTime(item.ctime,'{h}:{i}')}}</div>
168
+              </div>
169
+              <img  v-if=" $store.getters.xt_user.org.id != 10138"  id="barcode">
170
+            </div>
171
+                <div style="margin-bottom:5px;">{{item.number}}</div>
172
+               <div style="display:flex;">
173
+              <div style="font-size:24px;padding-left:20px;">{{item.project_name}}</div>
174
+              <div style="font-size:24px;margin-left:20px;">{{item.patient_name}}</div>
175
+              </div>
176
+              </div>
177
+          </div>
178
+        </div>
179
+        <div slot="footer" class="dialog-footer">
180
+          <el-button @click="batchLabelVisible = false">取 消</el-button>
181
+<!--          <el-button type="primary" @click="labelVisible = false">确 定</el-button>-->
182
+        </div>
183
+      </el-dialog>
151 184
     </div>
152 185
 
153 186
 </template>
@@ -201,11 +234,16 @@
201 234
         items: [
202 235
           { id: 1, name: '已打印' },
203 236
           { id: 2, name: '未打印' }
204
-        ]
237
+        ],
238
+        batchLabelVisible:false,
239
+
205 240
 
206 241
       }
207 242
     },
208 243
     methods: {
244
+      printThree(){
245
+      this.batchLabelVisible = true
246
+      },
209 247
       printTwo(){
210 248
         if(this.selecting_schs.length == 0){
211 249
           this.$message.error("请选择需要组合打印的记录")
@@ -287,8 +325,9 @@
287 325
                     lineColor: '#000',
288 326
                     background: '#EBEEF5',
289 327
                     width: 3,
290
-                    height: 200,
291
-                    displayValue: false,
328
+                    height: 100,
329
+                    displayValue: true,
330
+                    text:response.data.data.labels.id,
292 331
                     fontOptions:"bold italic",//使文字加粗体或变斜体
293 332
                     font:"fantasy",//设置文本的字体
294 333
                     textAlign:"left",//设置文本的水平对齐方式