소스 검색

统计配置开发

XMLWAN 4 년 전
부모
커밋
590c920d62

+ 66 - 0
src/api/common/common.js 파일 보기

@@ -340,3 +340,69 @@ export function getPatientList(startime, endtime, limit, page) {
340 340
     params: params
341 341
   })
342 342
 }
343
+
344
+export function getPatientDetailCheck(id, startime, endtime) {
345
+  const params = {
346
+    id: id,
347
+    startime: startime,
348
+    endtime: endtime
349
+  }
350
+  return request({
351
+    url: '/com/api/getPatientDetailCheck',
352
+    method: 'get',
353
+    params: params
354
+  })
355
+}
356
+
357
+export function SearchDetailCheck(keyword, startime, endtime) {
358
+  const params = {
359
+    keyword: keyword,
360
+    startime: startime,
361
+    endtime: endtime
362
+  }
363
+
364
+  return request({
365
+    url: '/com/api/searchdetailcheck',
366
+    method: 'get',
367
+    params: params
368
+  })
369
+}
370
+
371
+export function getNormData(params) {
372
+  return request({
373
+    url: '/com/api/getnormdata',
374
+    method: 'Get',
375
+    params: params
376
+  })
377
+}
378
+
379
+export function getFirstQuarter(lapseto, startime, endtime) {
380
+  const params = {
381
+    lapseto: lapseto,
382
+    startime: startime,
383
+    endtime: endtime
384
+  }
385
+  console.log('params', params)
386
+  return request({
387
+    url: '/com/api/getfirstquarter',
388
+    method: 'get',
389
+    params: params
390
+  })
391
+}
392
+
393
+export function getProjectList(params) {
394
+  console.log('params', params)
395
+  return request({
396
+    url: '/com/api/getprojectlist',
397
+    method: 'get',
398
+    params: params
399
+  })
400
+}
401
+
402
+export function getMonthProjectList(params) {
403
+  return request({
404
+    url: '/com/api/getmonthprojectlist',
405
+    method: 'get',
406
+    params: params
407
+  })
408
+}

+ 56 - 56
src/router/modules/qcd.js 파일 보기

@@ -11,62 +11,62 @@ export default {
11 11
     icon: "statistics"
12 12
   },
13 13
   children: [
14
-    {
15
-      path: "/statistics/index",
16
-      component: () => import("@/xt_pages/statistics/index"),
17
-      name: "statistics",
18
-      meta: {
19
-        title: "statistics",
20
-        noCache: true
21
-      }
22
-    },
23
-    {
24
-      path: "/qcd/dialysistotal",
25
-      component: () => import("@/xt_pages/qcd/dialysisTotal"),
26
-      name: "dialysistotal",
27
-      meta: {
28
-        title: "透析总量",
29
-        noCache: true
30
-      }
31
-    },
32
-    {
33
-      path: "/qcd/processindicators",
34
-      component: () => import("@/xt_pages/qcd/processIndicators"),
35
-      name: "processIndicators",
36
-      meta: {
37
-        title: "过程指标",
38
-        noCache: true
39
-      }
40
-    },
41
-    {
42
-      path: "/qcd/outcomeIndicators/control",
43
-      component: () => import("@/xt_pages/qcd/outcomeIndicators/control"),
44
-      name: "outcomeIndicatorsControl",
45
-      meta: {
46
-        title: "结果指标",
47
-        noCache: true
48
-      }
49
-    },
50
-    {
51
-      path: "/qcd/outcomeIndicators/query",
52
-      hidden: true,
53
-      is_menu: false,
54
-      component: () => import("@/xt_pages/qcd/outcomeIndicators/query"),
55
-      name: "outcomeIndicatorsQuery",
56
-      meta: {
57
-        title: "指标查询",
58
-        noCache: true
59
-      }
60
-    },
61
-    {
62
-      path: "/qcd/patientanalysis/total",
63
-      component: () => import("@/xt_pages/qcd/patientAnalysis/total"),
64
-      name: "patientAnalysisTotal",
65
-      meta: {
66
-        title: "患者分析",
67
-        noCache: true
68
-      }
69
-    },
14
+    // {
15
+    //   path: "/statistics/index",
16
+    //   component: () => import("@/xt_pages/statistics/index"),
17
+    //   name: "statistics",
18
+    //   meta: {
19
+    //     title: "statistics",
20
+    //     noCache: true
21
+    //   }
22
+    // },
23
+    // {
24
+    //   path: "/qcd/dialysistotal",
25
+    //   component: () => import("@/xt_pages/qcd/dialysisTotal"),
26
+    //   name: "dialysistotal",
27
+    //   meta: {
28
+    //     title: "透析总量",
29
+    //     noCache: true
30
+    //   }
31
+    // },
32
+    // {
33
+    //   path: "/qcd/processindicators",
34
+    //   component: () => import("@/xt_pages/qcd/processIndicators"),
35
+    //   name: "processIndicators",
36
+    //   meta: {
37
+    //     title: "过程指标",
38
+    //     noCache: true
39
+    //   }
40
+    // },
41
+    // {
42
+    //   path: "/qcd/outcomeIndicators/control",
43
+    //   component: () => import("@/xt_pages/qcd/outcomeIndicators/control"),
44
+    //   name: "outcomeIndicatorsControl",
45
+    //   meta: {
46
+    //     title: "结果指标",
47
+    //     noCache: true
48
+    //   }
49
+    // },
50
+    // {
51
+    //   path: "/qcd/outcomeIndicators/query",
52
+    //   hidden: true,
53
+    //   is_menu: false,
54
+    //   component: () => import("@/xt_pages/qcd/outcomeIndicators/query"),
55
+    //   name: "outcomeIndicatorsQuery",
56
+    //   meta: {
57
+    //     title: "指标查询",
58
+    //     noCache: true
59
+    //   }
60
+    // },
61
+    // {
62
+    //   path: "/qcd/patientanalysis/total",
63
+    //   component: () => import("@/xt_pages/qcd/patientAnalysis/total"),
64
+    //   name: "patientAnalysisTotal",
65
+    //   meta: {
66
+    //     title: "患者分析",
67
+    //     noCache: true
68
+    //   }
69
+    // },
70 70
     {
71 71
       path: "/qcd/patientanalysis/statisticalConfig",
72 72
       component: () => import("@/xt_pages/qcd/statisticalConfiguration"),

+ 1 - 0
src/xt_pages/dialysis/batch_print/batch_print_order_eight.vue 파일 보기

@@ -1719,6 +1719,7 @@ export default {
1719 1719
       })
1720 1720
     },
1721 1721
     getPartName(id) {
1722
+      console.log("id",id)
1722 1723
       for (let i = 0; i < this.bloodAccess.length; i++) {
1723 1724
         if ((this.bloodAccess[i].id = id)) {
1724 1725
           return this.bloodAccess[i].name;

+ 3 - 0
src/xt_pages/dialysis/details/dialog/acceptsTreatmentDialog.vue 파일 보기

@@ -60,6 +60,9 @@
60 60
         <el-radio v-model="receiveTreatmentAsses.condition" label="3"
61 61
           >手术期</el-radio
62 62
         >
63
+        <el-radio v-model="receiveTreatmentAsses.condition" label="4"
64
+          >急诊</el-radio
65
+        >
63 66
       </el-form-item>
64 67
 
65 68
       <el-form-item

+ 23 - 0
src/xt_pages/dialysis/dialysisPrintOrder.vue 파일 보기

@@ -160,6 +160,16 @@
160 160
           >打印</el-button
161 161
         >
162 162
       </template>
163
+      <template v-if="org_template_info.template_id == 15">
164
+        <el-button
165
+          :loading="loading"
166
+          size="small"
167
+          icon="el-icon-printer"
168
+          @click="printThisPage"
169
+          type="primary"
170
+          >打印</el-button
171
+        >
172
+      </template>
163 173
     </div>
164 174
     <div class="app-container ">
165 175
       <!--<div class="order-print-btn"-->
@@ -245,6 +255,10 @@
245 255
         v-bind:childResponse="childResponse"
246 256
         v-if="org_template_info.template_id == 13"
247 257
       ></DialysisPrintOrderThirteen>
258
+      <DialysisPrintOrderFifteen
259
+        v-bind:childResponse="childResponse"
260
+        v-if="org_template_info.template_id == 15"
261
+      ></DialysisPrintOrderFifteen>
248 262
     </div>
249 263
   </div>
250 264
 </template>
@@ -269,10 +283,12 @@ import DialysisPrintOrderTen from "./template/DialysisPrintOrderTen";
269 283
 import DialysisPrintOrderEleven from "./template/DialysisPrintOrderEleven";
270 284
 import DialysisPrintOrderTwelve from "./template/DialysisPrintOrderTwelve";
271 285
 import DialysisPrintOrderThirteen from "./template/DialysisPrintOrderThirteen";
286
+import DialysisPrintOrderFifteen from "./template/DialysisPrintOrderFifteen";
272 287
 
273 288
 export default {
274 289
   name: "dialysisPrintOrder",
275 290
   components: {
291
+  DialysisPrintOrderFifteen,
276 292
     DialysisPrintOrderThirteen,
277 293
     DialysisPrintOrderTwelve,
278 294
     DialysisPrintOrderEleven,
@@ -508,6 +524,13 @@ export default {
508 524
           style: style3,
509 525
           scanStyles: false
510 526
         });
527
+      } else if (this.org_template_info.template_id == 15){
528
+        printJS({
529
+          printable: "dialysis-print-box",
530
+          type: "html",
531
+          style: style,
532
+          scanStyles: false
533
+        });
511 534
       }
512 535
     },
513 536
     printThisOnePage() {

+ 357 - 47
src/xt_pages/qcd/officesControlAnalysis/project.vue 파일 보기

@@ -9,7 +9,7 @@
9 9
         <el-tab-pane label="按项目分组" name="second"></el-tab-pane>
10 10
       </el-tabs>
11 11
       <div class="cell clearfix">
12
-        <el-select v-model="value" placeholder="请选择" style="width:120px;margin-right:20px">
12
+        <el-select v-model="lapseto" placeholder="请选择" style="width:120px;margin-right:20px" @change="changeOptions">
13 13
           <el-option
14 14
             v-for="item in options"
15 15
             :key="item.value"
@@ -25,12 +25,12 @@
25 25
             :value="item.value"
26 26
           ></el-option>
27 27
         </el-select>
28
-        <el-select v-model="value" placeholder="请选择" style="width:120px;margin-right:20px">
28
+        <el-select v-model="mode_type" placeholder="请选择" style="width:120px;margin-right:20px" @change="handleModeType">
29 29
           <el-option
30
-            v-for="item in options"
31
-            :key="item.value"
32
-            :label="item.label"
33
-            :value="item.value"
30
+            v-for="item in normdata"
31
+            :key="item.inspection_minor"
32
+            :label="item.item_name"
33
+            :value="item.inspection_minor"
34 34
           ></el-option>
35 35
         </el-select>
36 36
       </div>
@@ -46,35 +46,20 @@
46 46
         <p class="pointTitle">指标正常范围值</p>
47 47
       </div>
48 48
       <div class="cell clearfix newDisplay">
49
-        <span class="index">钙(2.25-2.75)</span>
50
-        <span class="index">钙(2.25-2.75)</span>
51
-        <span class="index">钙(2.25-2.75)</span>
52
-        <span class="index">钙(2.25-2.75)</span>
53
-        <span class="index">钙(2.25-2.75)</span>
54
-        <span class="index">钙(2.25-2.75)</span>
55
-        <span class="index">钙(2.25-2.75)</span>
56
-        <span class="index">钙(2.25-2.75)</span>
57
-        <span class="index">钙(2.25-2.75)</span>
58
-        <span class="index">钙(2.25-2.75)</span>
59
-        <span class="index">钙(2.25-2.75)</span>
60
-        <span class="index">钙(2.25-2.75)</span>
61
-        <span class="index">钙(2.25-2.75)</span>
62
-        <span class="index">钙(2.25-2.75)</span>
63
-        <span class="index">钙(2.25-2.75)</span>
64
-        <span class="index">钙(2.25-2.75)</span>
65
-        <span class="index">钙(2.25-2.75)</span>
66
-        <span class="index">钙(2.25-2.75)</span>
49
+        <span class="index" v-for="(item,index) in normdata" :key="index ">{{item.item_name}}({{item.min_range}}-{{item.large_range}})</span>
67 50
       </div>
68 51
     </div>
69 52
   </div>
70 53
 </template>
71 54
 
72 55
 <script>
56
+const moment = require('moment')
73 57
 import echarts from "echarts";
74 58
 import { GetOICData } from "@/api/qcd";
75 59
 import LineChart from "../../qcd/components/LineChart";
76 60
 import { uParseTime } from "@/utils/tools";
77 61
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
62
+import {getNormData,getProjectList,getMonthProjectList } from "@/api/common/common"
78 63
 export default {
79 64
   components: {
80 65
     LineChart,
@@ -83,6 +68,11 @@ export default {
83 68
   data() {
84 69
     return {
85 70
       activeName: "second",
71
+      normdata:[],
72
+      modesData: {
73
+        xAxis: [],
74
+        series: []
75
+      },
86 76
       crumbs: [
87 77
         { path: false, name: "科室质控" },
88 78
         { path: false, name: "科室质控达标统计" },
@@ -90,38 +80,32 @@ export default {
90 80
       ],
91 81
       options: [
92 82
         {
93
-          value: "选项1",
94
-          label: "黄金糕"
83
+          value:0,
84
+          label:"全部",
95 85
         },
96 86
         {
97
-          value: "选项2",
98
-          label: "双皮奶"
87
+          value: 1,
88
+          label: "留治",
99 89
         },
100 90
         {
101
-          value: "选项3",
102
-          label: "蚵仔煎"
91
+          value:2,
92
+          label: "转归"
103 93
         },
104
-        {
105
-          value: "选项4",
106
-          label: "龙须面"
107
-        },
108
-        {
109
-          value: "选项5",
110
-          label: "北京烤鸭"
111
-        }
112 94
       ],
113
-      value: "请选项",
114 95
       options1: [
115 96
         {
116
-          value: "按季度对比统计",
97
+          value: 1,
117 98
           label: "按季度对比统计"
118 99
         },
119 100
         {
120
-          value: "按月份对比统计",
101
+          value: 2,
121 102
           label: "按月份对比统计"
122
-        }
103
+        },
123 104
       ],
124
-      type: "按季度对比统计",
105
+      value: "请选项",
106
+      lapseto:0,
107
+      type:1,
108
+      mode_type:"",
125 109
       chart: {
126 110
         title: {
127 111
           text: "ECharts 入门示例"
@@ -143,7 +127,7 @@ export default {
143 127
         series: [
144 128
           {
145 129
             name: "次数",
146
-            type: "line",
130
+            type: "bar",
147 131
             data: [
148 132
               "78.57",
149 133
               "50",
@@ -160,7 +144,7 @@ export default {
160 144
               normal: {
161 145
                 show: true,
162 146
                 position: "top",
163
-                formatter: "{c}"
147
+                formatter: "{c}%"
164 148
               }
165 149
             },
166 150
             //配置样式
@@ -217,10 +201,336 @@ export default {
217 201
       }
218 202
     },
219 203
     chooseType(val) {
220
-      console.log(val);
221 204
       this.type = val;
205
+      console.log("val",val)
206
+      //按季度
207
+      if(val == 1){
208
+        this.getlist()
209
+      }
210
+      //按月份
211
+      if(val == 2){
212
+        this.getMonthList()
213
+      }
214
+     
215
+    },
216
+    changeOptions(val){
217
+      this.lapseto = val
218
+      this.getlist()
219
+    },
220
+    getNormData(){
221
+        getNormData().then(response=>{
222
+            var normdata = response.data.data.normdata
223
+            console.log("normdata",normdata)
224
+            for(let i=0;i<normdata.length;i++){
225
+             this.mode_type = normdata[0].inspection_minor
226
+            }
227
+            this.normdata = normdata
228
+            this.getlist()
229
+            this.getMonthList()
230
+        })
231
+    },
232
+    handleModeType(val){
233
+      this.mode_type = val
234
+      this.getlist()
235
+    },
236
+
237
+    //季度
238
+    getlist(){
239
+         this.modesData.series = []
240
+         this.modesData.xAxis = []
241
+        const firstQuarterStart =  moment().startOf('year').format('YYYY-MM-DD')
242
+       // console.log("本月开始时间",firstQuarterStart)
243
+        const firstQuarterEnd = moment().month(11).endOf('month').format("YYYY-MM-DD")
244
+       // console.log("本月结束时间",firstQuarterEnd)
245
+
246
+        //第一季度
247
+        const first_quarter_start =  moment().startOf('year').format('YYYY-MM-DD')
248
+       // console.log("第一季度",first_quarter_start)
249
+        const first_qurter_end = moment().month(2).endOf('month').format("YYYY-MM-DD")
250
+      // console.log("第一季度",first_qurter_end)
251
+        //第二季度
252
+        const second_qurter_start = moment().month(3).startOf('month').format("YYYY-MM-DD")
253
+      //  console.log("第二季度",second_qurter_start)
254
+        const second_qurter_end = moment().month(5).endOf('month').format("YYYY-MM-DD")
255
+      //  console.log("第二季度",second_qurter_end)
256
+        //第三季度
257
+        const three_qurter_start = moment().month(6).startOf('month').format("YYYY-MM-DD")
258
+      //  console.log("第三季度",three_qurter_start)
259
+        const three_qurter_end = moment().month(8).endOf('month').format("YYYY-MM-DD")
260
+      //  console.log("第三季度",three_qurter_end)
261
+        //第四季度
262
+         const four_qurter_start = moment().month(9).startOf('month').format("YYYY-MM-DD")
263
+      //  console.log("第四季度",four_qurter_start)
264
+        const four_qurter_end = moment().month(11).endOf('month').format("YYYY-MM-DD")
265
+      //  console.log("第四季度",four_qurter_end)
266
+     
267
+         const params = {
268
+           lapseto:this.lapseto,
269
+           itemtype:this.type,
270
+           modetype:this.mode_type,
271
+           startime:firstQuarterStart,
272
+           endtime:firstQuarterEnd,
273
+           first_quarter_start:first_quarter_start,
274
+           first_qurter_end:first_qurter_end,
275
+           second_qurter_start:second_qurter_start,
276
+           second_qurter_end:second_qurter_end,
277
+           three_qurter_start:three_qurter_start,
278
+           three_qurter_end:three_qurter_end,
279
+           four_qurter_start:four_qurter_start,
280
+           four_qurter_end:four_qurter_end,
281
+         }
282
+         console.log("params",params)
283
+      getProjectList(params).then(response=>{
284
+        if(response.data.state === 1){
285
+          var list = response.data.data.list
286
+         // console.log("数据源",list)
287
+          var standList =  response.data.data.standList
288
+         // console.log("standList",standList)
289
+          var newArr = [
290
+            {Total:"第一季度",Count:1,NoCount: 0},
291
+            {Total:"第二季度",Count:1,NoCount: 0},
292
+            {Total:"第三季度",Count:1,NoCount: 0},
293
+            {Total:"第四季度",Count:1,NoCount: 0},
294
+          ]
295
+    
296
+
297
+        //获取2个数组不同的部分
298
+        var arrTwo = this.arrayDate(list,newArr)
299
+        arrTwo.map(item => {
300
+              list.push(item)
301
+           })
302
+        //  console.log("list",list)
303
+         
304
+         for(let i=0;i<list.length;i++){
305
+            if(list[i].Total == "第一季度"){
306
+               list[i].Total = 1
307
+            }
308
+          if(list[i].Total == "第二季度"){
309
+               list[i].Total = 2
310
+           }
311
+         if(list[i].Total == "第三季度"){
312
+               list[i].Total = 3
313
+           }
314
+          if(list[i].Total == "第四季度"){
315
+               list[i].Total = 4
316
+           }
317
+         }
318
+          //排序
319
+          list.sort(this.compare('Total'))
320
+          for(let i=0;i<list.length;i++){
321
+            if(list[i].Total == 1){
322
+               list[i].Total = "第一季度"
323
+            }
324
+            if(list[i].Total == 2){
325
+               list[i].Total = "第二季度"
326
+            }
327
+            if(list[i].Total == 3){
328
+               list[i].Total = "第三季度"
329
+            }
330
+            if(list[i].Total == 4){
331
+               list[i].Total = "第四季度"
332
+            }
333
+          }
334
+
335
+           var newArrThree = [
336
+            {Total:"第一季度",Count:0},
337
+            {Total:"第二季度",Count:0},
338
+            {Total:"第三季度",Count:0},
339
+            {Total:"第四季度",Count:0},
340
+          ]
341
+
342
+           //获取2个数组不同的部分
343
+          var standArr = this.arrayDateTwo(standList,newArrThree)  
344
+          standArr.map(item=>{
345
+            standList.push(item)
346
+          })
347
+         //  console.log("standList",standList)
348
+
349
+        
350
+       //  console.log("list-----",list)
351
+         var arrFive = []
352
+          for(let i=0;i<list.length;i++){
353
+             for(let j=0;j<standList.length;j++){
354
+                if(list[i].Total == standList[j].Total){
355
+                    list[i].NoCount = standList[j].Count
356
+                    arrFive.push(list[i])
357
+                }
358
+             }
359
+          }
360
+        
361
+       // console.log("arrFive",arrFive)
362
+        
363
+        for(const key in arrFive){
364
+            this.modesData.xAxis.push(arrFive[key].Total);
365
+            this.modesData.series.push(((arrFive[key].NoCount/arrFive[key].Count)*100).toFixed(1));
366
+          }
367
+         
368
+
369
+          this.chart.series[0].data = this.modesData.series
370
+          this.chart.xAxis.data = this.modesData.xAxis
371
+        //  console.log("222000",this.modesData)
372
+        }
373
+      })
374
+    },
375
+     arrayDate(array1,array2){
376
+      //  console.log("array1",array1)
377
+      //  console.log("array2",array2)
378
+        var array1 = array1;
379
+        var array2 = array2;
380
+        var result = [];
381
+        for(var i = 0; i < array2.length; i++){
382
+            var obj = array2[i];
383
+            var num = obj.Total;   //staff_id   就是要对比的key
384
+            var isExist = false;
385
+            for(var j = 0; j < array1.length; j++){
386
+                var aj = array1[j];
387
+                var n = aj.Total;
388
+                if(n == num){
389
+                    isExist = true;
390
+                    break;
391
+             }
392
+            }
393
+            if(!isExist){
394
+                result.push(obj);
395
+            }
396
+        }
397
+      //  console.log("result",result)
398
+        return result;
399
+    },
400
+    arrayDateTwo(array1,array2){
401
+      //   console.log("array1",array1)
402
+      //   console.log("array2",array2)
403
+        var array1 = array1;
404
+        var array2 = array2;
405
+        var result = [];
406
+        for(var i = 0; i < array2.length; i++){
407
+            var obj = array2[i];
408
+            var num = obj.Total;   //staff_id   就是要对比的key
409
+            var isExist = false;
410
+            for(var j = 0; j < array1.length; j++){
411
+                var aj = array1[j];
412
+                var n = aj.Total;
413
+                if(n == num){
414
+                    isExist = true;
415
+                    break;
416
+             }
417
+            }
418
+            if(!isExist){
419
+                result.push(obj);
420
+            }
421
+        }
422
+      //  console.log("resultTwo",result)
423
+        return result;
424
+    },
425
+     compare(property){
426
+       return function(a,b){
427
+          var value1 = a[property];
428
+          var value2 = b[property];
429
+          return value1 - value2;
430
+        }
431
+    },
432
+    
433
+    //按月份统计
434
+    getMonthList(){
435
+        const januaryStart = moment().month(0).startOf('month').format("YYYY-MM-DD")
436
+        console.log("一月始",januaryStart)
437
+        const januaryEnd = moment().month(0).endOf('month').format("YYYY-MM-DD")
438
+        console.log("一月末",januaryEnd)
439
+
440
+        const  febStart = moment().month(1).startOf('month').format("YYYY-MM-DD")
441
+        console.log("二月始",febStart)
442
+        const febEnd = moment().month(1).endOf('month').format("YYYY-MM-DD")
443
+        console.log("二月末",febEnd)
444
+
445
+        const  marchStart = moment().month(2).startOf('month').format("YYYY-MM-DD")
446
+        console.log("三月始",marchStart)
447
+        const marchEnd = moment().month(2).endOf('month').format("YYYY-MM-DD")
448
+        console.log("三月末",marchEnd)
449
+
450
+        const  aprStart = moment().month(3).startOf('month').format("YYYY-MM-DD")
451
+        console.log("四月始",aprStart)
452
+        const aprEnd = moment().month(3).endOf('month').format("YYYY-MM-DD")
453
+        console.log("四月末",aprEnd)
454
+
455
+        const  mayStart = moment().month(4).startOf('month').format("YYYY-MM-DD")
456
+        console.log("五月始",mayStart)
457
+        const mayEnd = moment().month(4).endOf('month').format("YYYY-MM-DD")
458
+        console.log("五月末",mayEnd)
459
+
460
+        const  junStart = moment().month(5).startOf('month').format("YYYY-MM-DD")
461
+        console.log("六月始",junStart)
462
+        const junEnd = moment().month(5).endOf('month').format("YYYY-MM-DD")
463
+        console.log("六月末",junEnd)
464
+
465
+        const  julStart = moment().month(6).startOf('month').format("YYYY-MM-DD")
466
+        console.log("7月始",julStart)
467
+        const julEnd = moment().month(6).endOf('month').format("YYYY-MM-DD")
468
+        console.log("7月末",julEnd)
469
+
470
+        const  augStart = moment().month(7).startOf('month').format("YYYY-MM-DD")
471
+        console.log("8月始",augStart)
472
+        const augEnd = moment().month(7).endOf('month').format("YYYY-MM-DD")
473
+        console.log("8月末",augEnd)
474
+
475
+        const  sepStart = moment().month(8).startOf('month').format("YYYY-MM-DD")
476
+        console.log("9月始",sepStart)
477
+        const sepEnd = moment().month(8).endOf('month').format("YYYY-MM-DD")
478
+        console.log("9月末",sepEnd)
479
+
480
+        const  octStart = moment().month(9).startOf('month').format("YYYY-MM-DD")
481
+        console.log("10月始",octStart)
482
+        const octEnd = moment().month(9).endOf('month').format("YYYY-MM-DD")
483
+        console.log("10月末",octEnd)
484
+
485
+        const  novStart = moment().month(10).startOf('month').format("YYYY-MM-DD")
486
+        console.log("11月始",novStart)
487
+        const novEnd = moment().month(10).endOf('month').format("YYYY-MM-DD")
488
+        console.log("11月末",novEnd)
489
+        
490
+        const  decStart = moment().month(11).startOf('month').format("YYYY-MM-DD")
491
+        console.log("12月始",decStart)
492
+        const decEnd = moment().month(11).endOf('month').format("YYYY-MM-DD")
493
+        console.log("12月末",decEnd)
494
+        
495
+        const params = {
496
+          lapseto:this.lapseto,
497
+          itemtype:this.type,
498
+          modetype:this.mode_type,
499
+          januaryStart:januaryStart,
500
+          januaryEnd:januaryEnd,
501
+          febStart:febStart,
502
+          febEnd:febEnd,
503
+          marchStart:marchStart,
504
+          marchEnd:marchEnd,
505
+          aprStart:aprStart,
506
+          aprEnd:aprEnd,
507
+          mayStart:mayStart,
508
+          mayEnd:mayEnd,
509
+          junStart:junStart,
510
+          junEnd:junEnd,
511
+          julStart:julStart,
512
+          julEnd:julEnd,
513
+          augStart:augStart,
514
+          augEnd:augEnd,
515
+          sepStart:sepStart,
516
+          sepEnd:sepEnd,
517
+          octStart:octStart,
518
+          octEnd:octEnd,
519
+          novStart:novStart,
520
+          novEnd:novEnd,
521
+          decStart:decStart,
522
+          decEnd:decEnd,    
523
+        }
524
+       console.log("params",params)
525
+       getMonthProjectList(params).then(response=>{
526
+         
527
+       })
222 528
     }
223
-  }
529
+  },
530
+  created(){
531
+       //获取指标正常范围值
532
+     this.getNormData()
533
+  },
224 534
 };
225 535
 </script>
226 536
 

+ 241 - 40
src/xt_pages/qcd/officesControlAnalysis/time.vue 파일 보기

@@ -9,7 +9,7 @@
9 9
         <el-tab-pane label="按项目分组" name="second"></el-tab-pane>
10 10
       </el-tabs>
11 11
       <div class="cell clearfix">
12
-        <el-select v-model="value" placeholder="请选择" style="width:120px;margin-right:20px">
12
+        <el-select v-model="lapseto" placeholder="请选择" style="width:120px;margin-right:20px" @change="changeLapseto">
13 13
           <el-option
14 14
             v-for="item in options"
15 15
             :key="item.value"
@@ -89,35 +89,20 @@
89 89
         <p class="pointTitle">指标正常范围值</p>
90 90
       </div>
91 91
       <div class="cell clearfix newDisplay">
92
-        <span class="index">钙(2.25-2.75)</span>
93
-        <span class="index">钙(2.25-2.75)</span>
94
-        <span class="index">钙(2.25-2.75)</span>
95
-        <span class="index">钙(2.25-2.75)</span>
96
-        <span class="index">钙(2.25-2.75)</span>
97
-        <span class="index">钙(2.25-2.75)</span>
98
-        <span class="index">钙(2.25-2.75)</span>
99
-        <span class="index">钙(2.25-2.75)</span>
100
-        <span class="index">钙(2.25-2.75)</span>
101
-        <span class="index">钙(2.25-2.75)</span>
102
-        <span class="index">钙(2.25-2.75)</span>
103
-        <span class="index">钙(2.25-2.75)</span>
104
-        <span class="index">钙(2.25-2.75)</span>
105
-        <span class="index">钙(2.25-2.75)</span>
106
-        <span class="index">钙(2.25-2.75)</span>
107
-        <span class="index">钙(2.25-2.75)</span>
108
-        <span class="index">钙(2.25-2.75)</span>
109
-        <span class="index">钙(2.25-2.75)</span>
92
+         <span v-for="(item,index) in normData" :key="index" class="index">{{item.item_name}}({{item.min_range}}-{{item.large_range}})</span> 
110 93
       </div>
111 94
     </div>
112 95
   </div>
113 96
 </template>
114 97
 
115 98
 <script>
99
+const moment = require('moment')
116 100
 import echarts from "echarts";
117 101
 import { GetOICData } from "@/api/qcd";
118 102
 import LineChart from "../../qcd/components/LineChart";
119 103
 import { uParseTime } from "@/utils/tools";
120 104
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
105
+import {getNormData,getFirstQuarter}from "@/api/common/common"
121 106
 export default {
122 107
   components: {
123 108
     LineChart,
@@ -126,38 +111,36 @@ export default {
126 111
   data() {
127 112
     return {
128 113
       activeName: "first",
114
+      modesData: {
115
+        xAxis: [],
116
+        series: []
117
+       },
129 118
       crumbs: [
130 119
         { path: false, name: "科室质控" },
131 120
         { path: false, name: "科室质控达标统计" },
132 121
         { path: false, name: "按时间分组" }
133 122
       ],
123
+      normData:[],
134 124
       listQuery: {
135 125
         start_time: "",
136 126
         end_time: "",
137 127
         page: 1,
138 128
         limit: 10
139 129
       },
130
+      lapseto:0,
140 131
       options: [
141 132
         {
142
-          value: "选项1",
143
-          label: "黄金糕"
144
-        },
145
-        {
146
-          value: "选项2",
147
-          label: "双皮奶"
148
-        },
133
+          value: 0,
134
+          label: "全部"
135
+        }, 
149 136
         {
150
-          value: "选项3",
151
-          label: "蚵仔煎"
152
-        },
153
-        {
154
-          value: "选项4",
155
-          label: "龙须面"
156
-        },
137
+          value: 1,
138
+          label: "留治"
139
+        }, 
157 140
         {
158
-          value: "选项5",
159
-          label: "北京烤鸭"
160
-        }
141
+          value: 2,
142
+          label: "转出"
143
+        }, 
161 144
       ],
162 145
       value: "请选项",
163 146
       options1: [
@@ -211,7 +194,7 @@ export default {
211 194
         },
212 195
         yAxis: {
213 196
           axisLabel: {
214
-            formatter: "{value} %"
197
+            formatter: "{value}%"
215 198
           },
216 199
           show: false
217 200
         },
@@ -235,7 +218,7 @@ export default {
235 218
               normal: {
236 219
                 show: true,
237 220
                 position: "top",
238
-                formatter: "{c}"
221
+                formatter: "{c}%"
239 222
               }
240 223
             },
241 224
             //配置样式
@@ -281,7 +264,7 @@ export default {
281 264
               }
282 265
             }
283 266
           }
284
-        ]
267
+        ],
285 268
       }
286 269
     };
287 270
   },
@@ -292,6 +275,14 @@ export default {
292 275
       }
293 276
     },
294 277
     changeTime() {},
278
+    changeLapseto(val){
279
+      console.log("val",val)
280
+      this.lapseto = val
281
+      const firstQuarterStart =  moment().startOf('year').format('YYYY-MM-DD')
282
+      const firstQuarterEnd = moment().month(2).endOf('month').format("YYYY-MM-DD")
283
+      this.getFirstQuarter(val,firstQuarterStart,firstQuarterEnd)
284
+    },
285
+     
295 286
     changeEndTime(val) {
296 287
       var time =
297 288
         this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
@@ -311,10 +302,220 @@ export default {
311 302
     },
312 303
     chooseQuarter(quarter) {
313 304
       this.quarterType = quarter;
305
+      //第一季度
306
+      if(quarter === 0){
307
+        //本月的开始时间
308
+        const firstQuarterStart =  moment().startOf('year').format('YYYY-MM-DD')
309
+        const firstQuarterEnd = moment().month(2).endOf('month').format("YYYY-MM-DD")
310
+        this.getFirstQuarter(this.lapseto,firstQuarterStart,firstQuarterEnd)
311
+      }
312
+
313
+      //第二季度
314
+      if(quarter === 1){
315
+        const febQuarterStart = moment().month(3).startOf('month').format("YYYY-MM-DD")
316
+        const fedQuarterEnd = moment().month(5).endOf('month').format("YYYY-MM-DD")
317
+        this.getFirstQuarter(this.lapseto,febQuarterStart,fedQuarterEnd)
318
+      }
319
+
320
+      //第三季度
321
+      if(quarter === 2){
322
+        const threeQuarterStart = moment().month(6).startOf('month').format("YYYY-MM-DD")
323
+        const threeQuarterEnd = moment().month(8).endOf('month').format("YYYY-MM-DD")
324
+        this.getFirstQuarter(this.lapseto,threeQuarterStart,threeQuarterEnd)
325
+      }
326
+
327
+      //第四季度
328
+      if(quarter === 3){
329
+        const fourQuarterStart = moment().month(8).startOf('month').format("YYYY-MM-DD")
330
+        const fourQuarterEnd = moment().month(11).endOf('month').format("YYYY-MM-DD")
331
+        this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
332
+      }
333
+
334
+      
314 335
     },
315 336
     chooseMonth(month) {
316 337
       this.monthType = month;
317
-    }
338
+    
339
+      //1月
340
+      if(month == 0){
341
+          const fourQuarterStart = moment().month(0).startOf('month').format("YYYY-MM-DD")
342
+          console.log("fourQuarterStart",fourQuarterStart)
343
+          const fourQuarterEnd = moment().month(0).endOf('month').format("YYYY-MM-DD")
344
+           this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
345
+
346
+      }
347
+      //2月
348
+      if(month == 1){
349
+         const fourQuarterStart = moment().month(1).startOf('month').format("YYYY-MM-DD")
350
+         console.log("fourQuarterStart",fourQuarterStart)
351
+         const fourQuarterEnd = moment().month(1).endOf('month').format("YYYY-MM-DD")
352
+        this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
353
+      }
354
+      //
355
+     //3月
356
+      if(month == 2){
357
+         const fourQuarterStart = moment().month(2).startOf('month').format("YYYY-MM-DD")
358
+         console.log("fourQuarterStart",fourQuarterStart)
359
+         const fourQuarterEnd = moment().month(2).endOf('month').format("YYYY-MM-DD")
360
+         this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
361
+      }
362
+      //4月
363
+       if(month == 3){
364
+         const fourQuarterStart = moment().month(3).startOf('month').format("YYYY-MM-DD")
365
+         console.log("fourQuarterStart",fourQuarterStart)
366
+         const fourQuarterEnd = moment().month(3).endOf('month').format("YYYY-MM-DD")
367
+          this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
368
+      }
369
+      //5月
370
+       if(month == 4){
371
+         const fourQuarterStart = moment().month(4).startOf('month').format("YYYY-MM-DD")
372
+         console.log("fourQuarterStart",fourQuarterStart)
373
+         const fourQuarterEnd = moment().month(4).endOf('month').format("YYYY-MM-DD")
374
+          this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
375
+      }
376
+      //6月
377
+       if(month == 5){
378
+         const fourQuarterStart = moment().month(5).startOf('month').format("YYYY-MM-DD")
379
+         console.log("fourQuarterStart",fourQuarterStart)
380
+         const fourQuarterEnd = moment().month(5).endOf('month').format("YYYY-MM-DD")
381
+          this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
382
+      }
383
+      //7月
384
+       if(month == 6){
385
+         const fourQuarterStart = moment().month(6).startOf('month').format("YYYY-MM-DD")
386
+         console.log("fourQuarterStart",fourQuarterStart)
387
+         const fourQuarterEnd = moment().month(6).endOf('month').format("YYYY-MM-DD")
388
+          this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
389
+      }
390
+      //8月
391
+       if(month == 7){
392
+         const fourQuarterStart = moment().month(7).startOf('month').format("YYYY-MM-DD")
393
+         console.log("fourQuarterStart",fourQuarterStart)
394
+         const fourQuarterEnd = moment().month(7).endOf('month').format("YYYY-MM-DD")
395
+          this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
396
+      }
397
+      //9月
398
+       if(month == 8){
399
+         const fourQuarterStart = moment().month(8).startOf('month').format("YYYY-MM-DD")
400
+         console.log("fourQuarterStart",fourQuarterStart)
401
+         const fourQuarterEnd = moment().month(8).endOf('month').format("YYYY-MM-DD")
402
+         this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
403
+      }
404
+      //10月
405
+       if(month == 9){
406
+         const fourQuarterStart = moment().month(9).startOf('month').format("YYYY-MM-DD")
407
+         console.log("fourQuarterStart",fourQuarterStart)
408
+         const fourQuarterEnd = moment().month(9).endOf('month').format("YYYY-MM-DD")
409
+          this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
410
+      }
411
+      //11月
412
+       if(month == 10){
413
+         const fourQuarterStart = moment().month(10).startOf('month').format("YYYY-MM-DD")
414
+         console.log("fourQuarterStart",fourQuarterStart)
415
+         const fourQuarterEnd = moment().month(10).endOf('month').format("YYYY-MM-DD")
416
+         this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
417
+      }
418
+       //12月
419
+       if(month == 11){
420
+         const fourQuarterStart = moment().month(11).startOf('month').format("YYYY-MM-DD")
421
+         console.log("fourQuarterStart",fourQuarterStart)
422
+         const fourQuarterEnd = moment().month(11).endOf('month').format("YYYY-MM-DD")
423
+          this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
424
+      }
425
+    },
426
+    getNormData(){
427
+      getNormData().then(response=>{
428
+         if(response.data.state === 1){
429
+           var normdata = response.data.data.normdata
430
+           console.log("normdata",normdata)
431
+           this.normData = normdata
432
+         }
433
+      })
434
+    },
435
+    //第一季度
436
+    getFirstQuarter(val,startime,endtime){
437
+       this.modesData.series = []
438
+       this.modesData.xAxis = []
439
+      getFirstQuarter(val,startime,endtime).then(response=>{
440
+         if(response.data.state === 1){
441
+            var count =  response.data.data.count
442
+            console.log("count",count)
443
+            var arr=[]
444
+            for(let i=0;i<count.length;i++){  
445
+               for(let j=0;j<this.normData.length;j++){
446
+                if(count[i].item_id == this.normData[j].inspection_minor){
447
+                     arr.push(count[i])
448
+                }
449
+              }
450
+            }
451
+            console.log("arr",arr)
452
+            var arrtwo =  this.arrayDate(count,this.normData)
453
+            for(let i=0;i<arrtwo.length;i++){
454
+                this.$set(arrtwo[i], 'Count', 0)
455
+              }
456
+           for(let i=0;i<arrtwo.length;i++){
457
+                this.$set(arrtwo[i], 'Total', 1)
458
+              }
459
+            arrtwo.map(item => {
460
+              arr.push(item)
461
+            })
462
+            arr.sort(this.compare('sort'))    
463
+            for(const key in this.normData ){
464
+               this.modesData.xAxis.push(this.normData[key].item_name);
465
+                if(key in arr){
466
+                    this.modesData.series.push(((parseInt(arr[key].Count)/parseInt(arr[key].Total))*100).toFixed(1));
467
+                } else {
468
+                 this.modesData.series.push(0);
469
+              }
470
+            }
471
+            this.chart.series[0].data = this.modesData.series
472
+            this.chart.xAxis.data = this.modesData.xAxis
473
+            console.log(2222,this.modesData)
474
+
475
+          
476
+         }
477
+      })
478
+    },
479
+   compare(property){
480
+        return function(a,b){
481
+            var value1 = a[property];
482
+            var value2 = b[property];
483
+            return value1 - value2;
484
+        }
485
+    },
486
+    arrayDate(array1,array2){
487
+        var array1 = array1;
488
+        var array2 = this.normData;
489
+        var result = [];
490
+        for(var i = 0; i < array2.length; i++){
491
+            var obj = array2[i];
492
+            var num = obj.inspection_minor;   //staff_id   就是要对比的key
493
+            var isExist = false;
494
+            for(var j = 0; j < array1.length; j++){
495
+                var aj = array1[j];
496
+                var n = aj.item_id;
497
+                if(n == num){
498
+                    isExist = true;
499
+                    break;
500
+             }
501
+            }
502
+            if(!isExist){
503
+                result.push(obj);
504
+            }
505
+        }
506
+        console.log("result",result)
507
+        return result;
508
+    },
509
+  },
510
+  created(){
511
+       //本月的开始时间
512
+      const firstQuarterStart =  moment().startOf('year').format('YYYY-MM-DD')
513
+    
514
+      const firstQuarterEnd = moment().month(2).endOf('month').format("YYYY-MM-DD")
515
+     
516
+     //获取指标正常范围值
517
+     this.getNormData()
518
+     this.getFirstQuarter(this.lapseto,firstQuarterStart,firstQuarterEnd)
318 519
   }
319 520
 };
320 521
 </script>

+ 143 - 30
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckAll.vue 파일 보기

@@ -39,7 +39,10 @@
39 39
     <el-container>
40 40
       <div style="width:150px">
41 41
         <div class="tableTitle">患者列表</div>
42
-        <el-table :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
42
+        <el-table :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
43
+        :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
44
+         highlight-current-row
45
+         @current-change="handleChange">
43 46
            <el-table-column prop="dialysis_no" label="透析号" width="80">
44 47
             <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
45 48
           </el-table-column>
@@ -52,7 +55,7 @@
52 55
         <div class="tableTitle">统计表</div>
53 56
         <el-table :data="tableData" style="width: 100%" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
54 57
           <el-table-column prop="name" label="姓名" fixed>
55
-            <template slot-scope="scope">{{ scope.row.name }}</template>
58
+            <template slot-scope="scope">{{ scope.row.name}}</template>
56 59
          </el-table-column>
57 60
          <el-table-column
58 61
           :label="modeItem.project_name"
@@ -62,7 +65,9 @@
62 65
           v-for="(modeItem, index) in tableName"
63 66
           :key="index"
64 67
         >
65
-         
68
+          <template slot-scope="scope">
69
+              {{ scope.row.data[1].Count}}
70
+          </template>
66 71
         </el-table-column>
67 72
         </el-table>
68 73
 
@@ -85,7 +90,7 @@
85 90
 
86 91
 
87 92
 <script>
88
-  import {getCurrentOrgPatients,getAllMajorInspection,getPatientList } from "@/api/common/common"
93
+  import {getCurrentOrgPatients,getAllMajorInspection,getPatientList,getPatientDetailCheck,SearchDetailCheck } from "@/api/common/common"
89 94
 export default {
90 95
   data() {
91 96
     return {
@@ -95,33 +100,12 @@ export default {
95 100
         page: 1,
96 101
         limit: 20
97 102
       },
98
-      options: [
99
-        {
100
-          value: "选项1",
101
-          label: "黄金糕"
102
-        },
103
-        {
104
-          value: "选项2",
105
-          label: "双皮奶"
106
-        },
107
-        {
108
-          value: "选项3",
109
-          label: "蚵仔煎"
110
-        },
111
-        {
112
-          value: "选项4",
113
-          label: "龙须面"
114
-        },
115
-        {
116
-          value: "选项5",
117
-          label: "北京烤鸭"
118
-        }
119
-      ],
120 103
       value: "请选项",
121 104
       tableData: [],
122 105
       patientsData:[],
123 106
       total:0,
124 107
       tableName:[],
108
+      ObjectData:{},
125 109
     };
126 110
   },
127 111
   methods: {
@@ -135,6 +119,20 @@ export default {
135 119
       }
136 120
     },
137 121
     onSearch(){
122
+      SearchDetailCheck(this.listQuery.search,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
123
+          if(response.data.state === 1){
124
+           var  checkDetail =  response.data.data.checkDetail
125
+             var arr = []
126
+            for(let i=0;i<checkDetail.length;i++){
127
+              for(let j=0;j<this.tableName.length;j++){
128
+                 if(checkDetail[i].ProjectId == this.tableName[j].inspection_major){
129
+                   arr.push(checkDetail[i])
130
+                 }
131
+              }
132
+            }
133
+            console.log("arr",arr)
134
+          }
135
+      })
138 136
     },
139 137
      handleSizeChange(limit) {
140 138
       this.listQuery.limit = limit;
@@ -169,6 +167,15 @@ export default {
169 167
         if(response.data.state === 1){
170 168
            var inspection = response.data.data.inspection
171 169
            console.log("inspection",inspection)
170
+           var a=[1];
171
+           for(let i=0;i<inspection.length;i++){
172
+             a.push(inspection[i])
173
+           }
174
+           console.log("a",a)
175
+           var arr = this.arrayToObj(a)
176
+
177
+           console.log("arr",arr)
178
+           this.ObjectData = arr
172 179
            this.tableName = inspection
173 180
         }
174 181
       })
@@ -177,15 +184,121 @@ export default {
177 184
       getPatientList(this.listQuery.start_time,this.listQuery.end_time,this.listQuery.limit,this.listQuery.page).then(response=>{
178 185
          if(response.data.state === 1){
179 186
            var patientInfo = response.data.data.patientInfo
180
-           console.log("列表数据",patientInfo)
181
-           this.tableData = patientInfo
187
+           console.log("列表数据2",patientInfo)
188
+
182 189
            var total = response.data.data.total
183 190
            console.log("total",total)
184 191
            this.total = total
185
-           var list = response.data.data.list
192
+          //  var arrlist = response.data.data.list
193
+          //   console.log("list",arrlist)
194
+          //   let listInfo = []
195
+          //  for(let i=0;i<arrlist.length;i++){
196
+          //    for(let j=0;j<this.tableName.length;j++){
197
+          //       if(arrlist[i].ProjectId == this.tableName[j].inspection_major){
198
+          //          listInfo.push(arrlist[i])
199
+          //       }
200
+          //    }
201
+          //  }
202
+          //   let dataInfo = {}
203
+          //   listInfo.forEach((item, index) => {
204
+          //     let { PatientId } = item
205
+          //     if (!dataInfo[PatientId]) {
206
+          //       dataInfo[PatientId] = {
207
+          //         PatientId,
208
+          //         name:item.name,
209
+          //         child: []
210
+          //       }
211
+          //     }
212
+          //   })
213
+          //   console.log("dataInfo",dataInfo)
214
+          //   let list = Object.values(dataInfo)
215
+          //   list.map(item => {
216
+          //     for (let i = 0; i < listInfo.length; i++) {
217
+          //       if (
218
+          //         item.PatientId === listInfo[i].PatientId
219
+          //       ) {
220
+          //         item.child.push(listInfo[i])
221
+          //       }
222
+          //     }
223
+          //   })
224
+          // var arrpatient = []
225
+          //  console.log("arr",list)
226
+          //    list.map(item => {
227
+          //     for (let i = 0; i < patientInfo.length; i++) {
228
+          //       if (
229
+          //         item.PatientId === patientInfo[i].patient_id
230
+          //       ) {
231
+          //          arrpatient.push(item)
232
+          //       }
233
+          //     }
234
+          //   })
235
+          // console.log("arrpatient",arrpatient)
236
+          //
237
+          // this.tableData = patientInfo
238
+
239
+
240
+
241
+          var list = response.data.data.list
186 242
            console.log("list",list)
243
+            var dtd = []
244
+            for(let i=0;i<list.length;i++){
245
+                for(let j=0;j<this.tableName.length;j++){
246
+                    if(list[i].ProjectId == this.tableName[j].inspection_major){
247
+                      dtd.push(list[i])
248
+                    }
249
+                }
250
+            }
251
+           console.log("dtd",dtd)
252
+          var dd = {};
253
+           for (const index in dtd) {
254
+            if (!(dtd[index].name in dd)) {
255
+               dd[dtd[index].name] = {};
256
+            }
257
+            if (!(dtd[index].ProjectId in dd[dtd[index].name]) && dtd[index].ProjectId != 0) {
258
+              dd[dtd[index].name][dtd[index].ProjectId] = dtd[index];
259
+            }
260
+          }
261
+
262
+           for(const key in dd){
263
+              for(const mkey in this.ObjectData){
264
+               if (mkey in dd[key]) {
265
+                    dd[key][mkey].ProjectName = this.ObjectData[mkey].project_name;
266
+                    var Count = parseInt(dd[key][mkey].Count);
267
+                    console.log("Count",Count)
268
+
269
+                }else{
270
+                   dd[key][mkey] = {
271
+                    ProjectName: this.ObjectData[mkey].project_name,
272
+                    name: mkey,
273
+                   Count: 0
274
+                  };
275
+                }
276
+             }
277
+             this.tableData.push({ name: key, data: dd[key]});
278
+            }
279
+            console.log("表",this.tableData)
187 280
          }
188 281
       })
282
+    },
283
+    handleChange(val){
284
+      getPatientDetailCheck(val.id,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
285
+          if(response.data.state === 1){
286
+            var checkDetail =  response.data.data.checkDetail
287
+            console.log("checkDetail",checkDetail)
288
+            var arr = []
289
+            for(let i=0;i<checkDetail.length;i++){
290
+              for(let j=0;j<this.tableName.length;j++){
291
+                 if(checkDetail[i].ProjectId == this.tableName[j].inspection_major){
292
+                   arr.push(checkDetail[i])
293
+                 }
294
+              }
295
+            }
296
+            console.log("arr",arr)
297
+          }
298
+      })
299
+    },
300
+   arrayToObj(arr){
301
+      return Object.assign({},arr);
189 302
     }
190 303
   },
191 304
   created(){
@@ -215,7 +328,7 @@ export default {
215 328
      this.getAllMajorInspection()
216 329
      //获取列表数据
217 330
      this.getPatientList()
218
-  }  
331
+  }
219 332
 };
220 333
 </script>
221 334
 

+ 35 - 3
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckPersonal.vue 파일 보기

@@ -200,11 +200,14 @@ export default {
200 200
       })
201 201
     },
202 202
     getInspectionTotalCount(){
203
+          this.modesData.series = []
204
+          this.modesData.xAxis = []
203 205
       getInspectionTotalCount(this.listQuery.start_time,this.listQuery.end_time).then(response=>{
204 206
           if(response.data.state === 1){
205 207
             var Inspection = response.data.data.Inspection
206
-            this.tableData = Inspection
207 208
             console.log("Inspection",Inspection)
209
+            this.tableData = Inspection
210
+          
208 211
             var counts = response.data.data.counts
209 212
             console.log("counts",counts)
210 213
             var arr = []
@@ -215,7 +218,9 @@ export default {
215 218
                  }
216 219
                }
217 220
             }
218
-            console.log("arr",arr)
221
+             console.log("arr",arr)
222
+             var arrtwo =  this.arrayDate(counts,this.normData)
223
+             console.log("arrtwo",arrtwo)
219 224
             var hash = {};
220 225
             var i = 0;
221 226
             var res = [];
@@ -225,6 +230,7 @@ export default {
225 230
                  Count: [item.Count],
226 231
                  ProjectName: ProjectName,
227 232
                  ProjectId: item.ProjectId,
233
+                 Sort:item.Sort,
228 234
              })
229 235
             });
230 236
             
@@ -233,6 +239,9 @@ export default {
233 239
             })
234 240
             console.log(11111,res)
235 241
 
242
+          
243
+
244
+
236 245
             for (const key in this.tableData) {
237 246
               this.modesData.xAxis.push(this.tableData[key].project_name);
238 247
               if (key in res) {
@@ -304,7 +313,30 @@ export default {
304 313
            console.log("arr",arr)
305 314
          }
306 315
       })
307
-    }
316
+    },
317
+    arrayDate(array1,array2){
318
+        var array1 = array1;
319
+        var array2 = this.tableData;
320
+        var result = [];
321
+        for(var i = 0; i < array2.length; i++){
322
+            var obj = array2[i];
323
+            var num = obj.inspection_major;   //staff_id   就是要对比的key
324
+            var isExist = false;
325
+            for(var j = 0; j < array1.length; j++){
326
+                var aj = array1[j];
327
+                var n = aj.ProjectId;
328
+                if(n == num){
329
+                    isExist = true;
330
+                    break;
331
+             }
332
+            }
333
+            if(!isExist){
334
+                result.push(obj);
335
+            }
336
+        }
337
+        console.log("result",result)
338
+        return result;
339
+    },
308 340
   },
309 341
   created(){
310 342
     var nowDate = new Date();

+ 10 - 4
src/xt_pages/qcd/treatmentControlAnalysis/components/TimeAll.vue 파일 보기

@@ -59,6 +59,7 @@
59 59
           property="date"
60 60
           align="center"
61 61
         ></el-table-column>
62
+
62 63
         <el-table-column
63 64
           :label="modeItem.name"
64 65
           property="number"
@@ -213,7 +214,7 @@ export default {
213 214
           let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
214 215
           return time.getTime() > Date.now() || time.getTime() < threeMonths;;
215 216
         }
216
-      }, 
217
+      },
217 218
     };
218 219
   },
219 220
   methods: {
@@ -269,6 +270,7 @@ export default {
269 270
               dd[dtd[index].date][dtd[index].mode_id] = dtd[index];
270 271
             }
271 272
           }
273
+          console.log("ddd",dd)
272 274
           for (const key in dd) {
273 275
             var total = 0;
274 276
             for (const mkey in this.modeOptions) {
@@ -290,6 +292,7 @@ export default {
290 292
             }
291 293
             this.tableData.push({ date: key, data: dd[key], total: total });
292 294
           }
295
+          console.log("tabledata",this.tableData)
293 296
           var ttd = response.data.data.ttd
294 297
          // console.log("ttd",ttd)
295 298
           var modeMap = {};
@@ -310,7 +313,7 @@ export default {
310 313
               this.modesData.series.push(0);
311 314
             }
312 315
           }
313
-          
316
+
314 317
           this.chart.series[0].data = this.modesData.series
315 318
           this.chart.xAxis.data = this.modesData.xAxis
316 319
          // console.log(this.chart.series[0].data)
@@ -322,10 +325,11 @@ export default {
322 325
         }
323 326
       })
324 327
     },
328
+ 
325 329
   },
326 330
   created(){
327 331
     this.modeOptions = this.$store.getters.treatment_mode;
328
-
332
+    console.log("-----",this.modeOptions)
329 333
     var nowDate = new Date();
330 334
     var nowYear = nowDate.getFullYear();
331 335
     var nowMonth = nowDate.getMonth() + 1;
@@ -348,6 +352,7 @@ export default {
348 352
       (nowDay < 10 ? "0" + nowDay : nowDay);
349 353
       //获取统计列表数据
350 354
       this.geStatistics()
355
+      console.log("activeModes",this.activeModes)
351 356
   },
352 357
   computed: {
353 358
     activeModes: function() {
@@ -357,8 +362,9 @@ export default {
357 362
           modes.push(this.modeOptions[key]);
358 363
         }
359 364
       }
365
+
360 366
       return modes;
361
-      
367
+
362 368
     }
363 369
   },
364 370
 };