瀏覽代碼

统计配置开发

XMLWAN 5 年之前
父節點
當前提交
68f922f777

+ 31 - 0
src/api/common/common.js 查看文件

@@ -423,3 +423,34 @@ export function getPatientsControl(lapstor, startime, endtime, page, limit) {
423 423
   })
424 424
 }
425 425
 
426
+export function getCartogramlist(lapsetor, startime, endtime, limit, page) {
427
+  const params = {
428
+    lapsetor: lapsetor,
429
+    startime: startime,
430
+    endtime: endtime,
431
+    limit: limit,
432
+    page: page
433
+  }
434
+
435
+  return request({
436
+    url: '/com/api/getcartogramlist',
437
+    method: 'Get',
438
+    params: params
439
+  })
440
+}
441
+
442
+export function getPatientContorlAnalysis(params) {
443
+  return request({
444
+    url: '/com/api/getpatientcontor',
445
+    method: 'get',
446
+    params: params
447
+  })
448
+}
449
+
450
+export function GetQualityControl(params) {
451
+  return request({
452
+    url: '/com/api/getqualitycontrol',
453
+    method: 'Get',
454
+    params: params
455
+  })
456
+}

+ 103 - 91
src/router/modules/dialysis.js 查看文件

@@ -1,62 +1,62 @@
1
-import Layout from "@/views/layout/Layout";
1
+import Layout from '@/views/layout/Layout'
2 2
 
3 3
 export default {
4
-  path: "/dialysis/",
4
+  path: '/dialysis/',
5 5
   component: Layout,
6
-  redirect: "noredirect",
7
-  name: "dialysis",
6
+  redirect: 'noredirect',
7
+  name: 'dialysis',
8 8
   alwaysShow: true,
9 9
   meta: {
10
-    title: "dialysis",
11
-    icon: "touxi"
10
+    title: 'dialysis',
11
+    icon: 'touxi'
12 12
   },
13 13
   children: [
14 14
     {
15
-      path: "/dialysis/dialysisrecord",
16
-      component: () => import("@/xt_pages/dialysis/schedualPatient"),
17
-      name: "透析记录",
15
+      path: '/dialysis/dialysisrecord',
16
+      component: () => import('@/xt_pages/dialysis/schedualPatient'),
17
+      name: '透析记录',
18 18
       meta: {
19
-        title: "透析记录",
19
+        title: '透析记录',
20 20
         noCache: true
21 21
       }
22 22
     },
23 23
     {
24
-      path: "/dialysis/watch",
25
-      component: () => import("@/xt_pages/dialysis/bloodPresssWatch"),
26
-      name: "watch",
24
+      path: '/dialysis/watch',
25
+      component: () => import('@/xt_pages/dialysis/bloodPresssWatch'),
26
+      name: 'watch',
27 27
       meta: {
28
-        title: "watch",
28
+        title: 'watch',
29 29
         noCache: true
30 30
       }
31 31
     },
32 32
     {
33
-      path: "/dialysis/board",
34
-      component: () => import("@/xt_pages/dialysis/bulletinBoard"),
35
-      name: "数据看板",
33
+      path: '/dialysis/board',
34
+      component: () => import('@/xt_pages/dialysis/bulletinBoard'),
35
+      name: '数据看板',
36 36
       meta: {
37
-        title: "数据看板",
37
+        title: '数据看板',
38 38
         noCache: true
39 39
       }
40 40
     },
41 41
     {
42
-      path: "/dialysis/record/:id",
43
-      component: () => import("@/xt_pages/dialysis/dialysisPage"),
42
+      path: '/dialysis/record/:id',
43
+      component: () => import('@/xt_pages/dialysis/dialysisPage'),
44 44
       hidden: true,
45 45
       is_menu: false,
46
-      name: "paper",
46
+      name: 'paper',
47 47
       meta: {
48
-        title: "paper",
48
+        title: 'paper',
49 49
         noCache: true
50 50
       }
51 51
     },
52 52
     {
53
-      path: "/dialysis/print",
54
-      component: () => import("@/xt_pages/dialysis/dialysisPrintOrder"),
53
+      path: '/dialysis/print',
54
+      component: () => import('@/xt_pages/dialysis/dialysisPrintOrder'),
55 55
       hidden: true,
56 56
       is_menu: false,
57
-      name: "dialysisPrintOrder",
57
+      name: 'dialysisPrintOrder',
58 58
       meta: {
59
-        title: "dialysisPrintOrder",
59
+        title: 'dialysisPrintOrder',
60 60
         noCache: true
61 61
       }
62 62
     },
@@ -65,195 +65,207 @@ export default {
65 65
     // { path: 'prepare', component: () => import('@/xt_pages/dialysis/dialysisPrepare'), name: 'prepare', meta: { title: 'prepare' }},
66 66
 
67 67
     {
68
-      path: "/dialysis/details",
69
-      component: () => import("@/xt_pages/dialysis/details"),
70
-      name: "details",
68
+      path: '/dialysis/details',
69
+      component: () => import('@/xt_pages/dialysis/details'),
70
+      name: 'details',
71 71
       meta: {
72
-        title: "details"
72
+        title: 'details'
73 73
       },
74 74
       hidden: true,
75 75
       is_menu: false,
76 76
       noCache: true
77 77
     },
78 78
     {
79
-      path: "/dialysis/print/batch",
79
+      path: '/dialysis/print/batch',
80 80
       component: () =>
81
-        import("@/xt_pages/dialysis/batch_print/batch_print_order"),
81
+        import('@/xt_pages/dialysis/batch_print/batch_print_order'),
82 82
       hidden: true,
83 83
       is_menu: false,
84
-      name: "dialysis_batch_print",
84
+      name: 'dialysis_batch_print',
85 85
       meta: {
86
-        title: "批量打印",
86
+        title: '批量打印',
87 87
         noCache: true
88 88
       }
89 89
     },
90 90
     {
91
-      path: "/dialysis/print/batch/other",
91
+      path: '/dialysis/print/batch/other',
92 92
       component: () =>
93
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_other"),
93
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_other'),
94 94
       hidden: true,
95 95
       is_menu: false,
96
-      name: "dialysis_batch_print_two",
96
+      name: 'dialysis_batch_print_two',
97 97
       meta: {
98
-        title: "批量打印",
98
+        title: '批量打印',
99 99
         noCache: true
100 100
       }
101 101
     },
102 102
     {
103
-      path: "/dialysis/print/batch/three",
103
+      path: '/dialysis/print/batch/three',
104 104
       component: () =>
105
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_three"),
105
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_three'),
106 106
       hidden: true,
107 107
       is_menu: false,
108
-      name: "dialysis_batch_print_two_one",
108
+      name: 'dialysis_batch_print_two_one',
109 109
       meta: {
110
-        title: "批量打印",
110
+        title: '批量打印',
111 111
         noCache: true
112 112
       }
113 113
     },
114 114
     {
115
-      path: "/dialysis/print/batch/four",
115
+      path: '/dialysis/print/batch/four',
116 116
       component: () =>
117
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_four"),
117
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_four'),
118 118
       hidden: true,
119 119
       is_menu: false,
120
-      name: "dialysis_batch_print_two_one",
120
+      name: 'dialysis_batch_print_two_one',
121 121
       meta: {
122
-        title: "批量打印",
122
+        title: '批量打印',
123 123
         noCache: true
124 124
       }
125 125
     },
126 126
     {
127
-      path: "/dialysis/print/batch/five",
127
+      path: '/dialysis/print/batch/five',
128 128
       component: () =>
129
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_five"),
129
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_five'),
130 130
       hidden: true,
131 131
       is_menu: false,
132
-      name: "dialysis_batch_print_two_one",
132
+      name: 'dialysis_batch_print_two_one',
133 133
       meta: {
134
-        title: "批量打印",
134
+        title: '批量打印',
135 135
         noCache: true
136 136
       }
137 137
     },
138 138
     {
139
-      path: "/dialysis/print/batch/six",
139
+      path: '/dialysis/print/batch/six',
140 140
       component: () =>
141
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_six"),
141
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_six'),
142 142
       hidden: true,
143 143
       is_menu: false,
144
-      name: "dialysis_batch_six",
144
+      name: 'dialysis_batch_six',
145 145
       meta: {
146
-        title: "批量打印",
146
+        title: '批量打印',
147 147
         noCache: true
148 148
       }
149 149
     },
150 150
     {
151
-      path: "/dialysis/print/batch/seven",
151
+      path: '/dialysis/print/batch/seven',
152 152
       component: () =>
153
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_seven"),
153
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_seven'),
154 154
       hidden: true,
155 155
       is_menu: false,
156
-      name: "dialysis_batch_seven",
156
+      name: 'dialysis_batch_seven',
157 157
       meta: {
158
-        title: "批量打印",
158
+        title: '批量打印',
159 159
         noCache: true
160 160
       }
161 161
     },
162 162
     {
163
-      path: "/dialysis/print/batch/eight",
163
+      path: '/dialysis/print/batch/eight',
164 164
       component: () =>
165
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_eight"),
165
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_eight'),
166 166
       hidden: true,
167 167
       is_menu: false,
168
-      name: "dialysis_batch_eight",
168
+      name: 'dialysis_batch_eight',
169 169
       meta: {
170
-        title: "批量打印",
170
+        title: '批量打印',
171 171
         noCache: true
172 172
       }
173 173
     },
174 174
     {
175
-      path: "/dialysis/print/batch/nine",
175
+      path: '/dialysis/print/batch/nine',
176 176
       component: () =>
177
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_nine"),
177
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_nine'),
178 178
       hidden: true,
179 179
       is_menu: false,
180
-      name: "dialysis_batch_nine",
180
+      name: 'dialysis_batch_nine',
181 181
       meta: {
182
-        title: "批量打印",
182
+        title: '批量打印',
183 183
         noCache: true
184 184
       }
185 185
     },
186 186
     {
187
-      path: "/dialysis/print/batch/twelve",
187
+      path: '/dialysis/print/batch/twelve',
188 188
       component: () =>
189
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_twelve"),
189
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_twelve'),
190 190
       hidden: true,
191 191
       is_menu: false,
192
-      name: "dialysis_batch_twelve",
192
+      name: 'dialysis_batch_twelve',
193 193
       meta: {
194
-        title: "批量打印",
194
+        title: '批量打印',
195 195
         noCache: true
196 196
       }
197 197
     },
198 198
     {
199
-      path: "/dialysis/print/batch/thirteen",
199
+      path: '/dialysis/print/batch/thirteen',
200 200
       component: () =>
201
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_thirteen"),
201
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_thirteen'),
202 202
       hidden: true,
203 203
       is_menu: false,
204
-      name: "dialysis_batch_thirteen",
204
+      name: 'dialysis_batch_thirteen',
205 205
       meta: {
206
-        title: "批量打印",
206
+        title: '批量打印',
207 207
         noCache: true
208 208
       }
209 209
     },
210 210
     {
211
-      path: "/dialysis/print/batch/otherone",
211
+      path: '/dialysis/print/batch/fifteen',
212 212
       component: () =>
213
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_other_one"),
213
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_fifteen'),
214 214
       hidden: true,
215 215
       is_menu: false,
216
-      name: "dialysis_batch_print_two_one",
216
+      name: 'dialysis_batch_fifteen',
217 217
       meta: {
218
-        title: "批量打印",
218
+        title: '批量打印',
219 219
         noCache: true
220 220
       }
221 221
     },
222 222
     {
223
-      path: "/dialysis/print/batch/othertwo",
223
+      path: '/dialysis/print/batch/otherone',
224 224
       component: () =>
225
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_other_two"),
225
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_other_one'),
226 226
       hidden: true,
227 227
       is_menu: false,
228
-      name: "dialysis_batch_print_two_two",
228
+      name: 'dialysis_batch_print_two_one',
229 229
       meta: {
230
-        title: "批量打印",
230
+        title: '批量打印',
231 231
         noCache: true
232 232
       }
233 233
     },
234 234
     {
235
-      path: "/dialysis/print/batch/fiveone",
235
+      path: '/dialysis/print/batch/othertwo',
236 236
       component: () =>
237
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_five_one"),
237
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_other_two'),
238 238
       hidden: true,
239 239
       is_menu: false,
240
-      name: "dialysis_batch_print_two_two",
240
+      name: 'dialysis_batch_print_two_two',
241 241
       meta: {
242
-        title: "批量打印",
242
+        title: '批量打印',
243 243
         noCache: true
244 244
       }
245 245
     },
246 246
     {
247
-      path: "/dialysis/print/batch/fivetwo",
247
+      path: '/dialysis/print/batch/fiveone',
248 248
       component: () =>
249
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_five_two"),
249
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_five_one'),
250 250
       hidden: true,
251 251
       is_menu: false,
252
-      name: "dialysis_batch_print_two_two",
252
+      name: 'dialysis_batch_print_two_two',
253 253
       meta: {
254
-        title: "批量打印",
254
+        title: '批量打印',
255
+        noCache: true
256
+      }
257
+    },
258
+    {
259
+      path: '/dialysis/print/batch/fivetwo',
260
+      component: () =>
261
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_five_two'),
262
+      hidden: true,
263
+      is_menu: false,
264
+      name: 'dialysis_batch_print_two_two',
265
+      meta: {
266
+        title: '批量打印',
255 267
         noCache: true
256 268
       }
257 269
     }
258 270
   ]
259
-};
271
+}

+ 12 - 0
src/xt_pages/dialysis/bloodPresssWatch.vue 查看文件

@@ -150,6 +150,16 @@
150 150
           >批量打印</el-button
151 151
         >
152 152
       </template>
153
+      <template v-if="this.template_id == 15">
154
+        <el-button
155
+          size="small"
156
+          icon="el-icon-printer"
157
+          :disabled="selecting_schs.length == 0"
158
+          @click="batchPrintAction"
159
+          type="primary"
160
+          >批量打印</el-button
161
+        >
162
+      </template>
153 163
     </div>
154 164
     <div class="app-container">
155 165
       <!-- <div class="filter-container">
@@ -655,6 +665,8 @@ export default {
655 665
         this.$router.push({ path: "/dialysis/print/batch/twelve" });
656 666
       } else if (this.template_id == 13) {
657 667
         this.$router.push({ path: "/dialysis/print/batch/thirteen" });
668
+      }else if (this.template_id == 15) {
669
+        this.$router.push({ path: "/dialysis/print/batch/fifteen" });
658 670
       }
659 671
     },
660 672
     batchPrintActionOne: function() {

+ 1 - 1
src/xt_pages/dialysis/details/acceptsAssessment.vue 查看文件

@@ -321,7 +321,7 @@
321 321
       this.postures = getDataConfig('hemodialysis', 'posture')
322 322
       this.sick_condition = getDataConfig('hemodialysis', 'sick_condition')
323 323
       this.precautions = getDataConfig('hemodialysis', 'precaution')
324
-      console.log("跌倒预防措施",this.precautions)
324
+      //console.log("跌倒预防措施",this.precautions)
325 325
       this.intake = getDataConfig('hemodialysis', 'intake')
326 326
       this.nutrition = getDataConfig('hemodialysis', 'nutrition')
327 327
       console.log(this.ways)

文件差異過大導致無法顯示
+ 1117 - 1408
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue


+ 182 - 65
src/xt_pages/qcd/patientComplianceDetails.vue 查看文件

@@ -7,16 +7,16 @@
7 7
       <div class="page_patientComplianceDetails">
8 8
         <div class="cell clearfix" style="margin:0">
9 9
           <el-form :inline="true" :model="listQuery">
10
-            <el-form-item label>
11
-              <el-input v-model.trim="listQuery.search" placeholder="姓名/透析号" style="width:150px"></el-input>
12
-              <el-button type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button>
13
-            </el-form-item>
10
+<!--            <el-form-item label>-->
11
+<!--              <el-input v-model.trim="listQuery.search" placeholder="姓名/透析号" style="width:150px"></el-input>-->
12
+<!--              <el-button type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button>-->
13
+<!--            </el-form-item>-->
14 14
           </el-form>
15 15
         </div>
16 16
         <el-container>
17 17
           <div style="width:150px">
18 18
             <div class="tableTitle">患者列表</div>
19
-            <el-table :data="patientsData" border style="width: 100%;" height="500">
19
+            <el-table :data="patientsData" border style="width: 100%;" height="500"  highlight-current-row @current-change="handleChange">
20 20
               <el-table-column prop="name" label="透析号" width="80">
21 21
                  <template slot-scope="scope">
22 22
                     {{scope.row.dialysis_no}}
@@ -58,6 +58,7 @@
58 58
                 align="right"
59 59
                 format="yyyy-MM-dd"
60 60
                 value-format="yyyy-MM-dd"
61
+                :picker-options="pickerOptions"
61 62
               ></el-date-picker>
62 63
               <span class>-</span>
63 64
               <el-date-picker
@@ -71,6 +72,7 @@
71 72
                 align="right"
72 73
                 format="yyyy-MM-dd"
73 74
                 value-format="yyyy-MM-dd"
75
+                :picker-options="pickerOptions"
74 76
               ></el-date-picker>
75 77
             </div>
76 78
             <div class="tableTitle">指标监控</div>
@@ -78,14 +80,15 @@
78 80
               <div class="qualityBox">
79 81
                 <div
80 82
                   class="qualityOne"
81
-                  v-for="(item,index) in arr"
83
+                  v-for="(item,index) in normData"
82 84
                   :key="index"
83 85
                   :class="quality == index ? 'active' : ''"
84
-                  @click="clickQuality(index)"
86
+                  @click="clickQuality(index,item.inspection_minor)"
85 87
                 >
86
-                  <p>{{ item }}</p>
87
-                  <i class="iconfont icon-gantanhao gth" v-if="index % 2 == 0"></i>
88
-                  <i class="iconfont icon-gou gou" v-else></i>
88
+                  <p>{{ item.item_name }}</p>
89
+                  <i class="iconfont icon-gou gou"></i>
90
+<!--                  <i class="iconfont icon-gantanhao gth" v-if="index % 2 == 0"></i>-->
91
+<!--                  <i class="iconfont icon-gou gou" v-else></i>-->
89 92
                 </div>
90 93
               </div>
91 94
             </div>
@@ -101,12 +104,13 @@
101 104
 </template>
102 105
 
103 106
 <script>
107
+const moment = require('moment')
104 108
 import echarts from "echarts";
105 109
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
106 110
 import LineChart from "../qcd/components/LineChart";
107 111
 import { uParseTime } from "@/utils/tools";
108
-import { getCurrentOrgPatients } from "@/api/common/common"
109
-export default { 
112
+import { getCurrentOrgPatients,GetQualityControl,getNormData } from "@/api/common/common"
113
+export default {
110 114
   components: {
111 115
     LineChart,
112 116
     BreadCrumb
@@ -118,68 +122,33 @@ export default {
118 122
         { path: false, name: "患者达标详情" }
119 123
       ],
120 124
       patientsData:[],
121
-      tableData: [
122
-        {
123
-          date: "2016",
124
-          name: "王小虎"
125
-        },
126
-        {
127
-          date: "2016",
128
-          name: "王小虎"
129
-        },
130
-        {
131
-          date: "2016",
132
-          name: "王小虎"
133
-        },
134
-        {
135
-          date: "2016",
136
-          name: "王小虎"
137
-        },
138
-        {
139
-          date: "2016",
140
-          name: "王小虎"
141
-        },
142
-        {
143
-          date: "2016",
144
-          name: "王小虎"
145
-        },
146
-        {
147
-          date: "2016",
148
-          name: "王小虎"
149
-        },
150
-        {
151
-          date: "2016",
152
-          name: "王小虎"
153
-        },
154
-        {
155
-          date: "2016",
156
-          name: "王小虎"
157
-        },
158
-        {
159
-          date: "2016",
160
-          name: "王小虎"
161
-        },
162
-        {
163
-          date: "2016",
164
-          name: "王小虎"
165
-        },
166
-        {
167
-          date: "2016",
168
-          name: "王小虎"
169
-        }
170
-      ],
125
+      normData:[],
126
+      startime:0,
127
+      endtime:0,
171 128
       listQuery: {
172 129
         start_time: "",
173 130
         end_time: "",
174 131
         page: 1,
175 132
         limit: 10
176 133
       },
134
+      item_id:0,
177 135
       month: [
178 136
         { value: 0, label: "本月", state: 0 },
179 137
         { value: 1, label: "近三个月", state: 1 },
180 138
         { value: 2, label: "近半年", state: 2 },
181 139
         { value: 3, label: "近一年", state: 3 }
182 140
       ],
141
+     modesData: {
142
+        xAxis: [],
143
+        series: []
144
+      },
145
+      pickerOptions: {
146
+        disabledDate(time) {
147
+          let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
148
+          return time.getTime() > Date.now() || time.getTime() < threeMonths;;
149
+        }
150
+      },
151
+      patientid:0,
183 152
       monthType: 0,
184 153
       arr: ["钙", "磷", "钙萨达撒所多", "磷", "钙", "磷", "钙", "磷"],
185 154
       quality: 0,
@@ -221,7 +190,7 @@ export default {
221 190
               normal: {
222 191
                 show: true,
223 192
                 position: "top",
224
-                formatter: "{c}"
193
+                formatter: "{c}g/L"
225 194
               }
226 195
             },
227 196
             //配置样式
@@ -273,10 +242,65 @@ export default {
273 242
   },
274 243
   methods: {
275 244
     chooseMonth(month) {
245
+      //一月
246
+      if(month == 0){
247
+        const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
248
+        console.log("开始时间",startDate)
249
+        const endDate = moment(new Date()).format('YYYY-MM-DD')
250
+        console.log("结束时间",endDate)
251
+        var now = new Date()
252
+        var nowMonth = now.getMonth(); //当前月
253
+        var nowYear = now.getFullYear(); //当前年
254
+        //本月的开始时间
255
+        var monthStartDate = new Date(nowYear, nowMonth, 1);
256
+        this.startime=Date.parse(monthStartDate)/1000;//s
257
+
258
+        //本月的结束时间
259
+        var monthEndDate = new Date(nowYear, nowMonth+1, 0);
260
+        this.endtime =Date.parse(monthEndDate)/1000-1;//s
261
+        this.getlist()
262
+      }
263
+
264
+      //近三月
265
+      if(month == 1){
266
+        const startDate = moment().subtract('month', 3).format('YYYY-MM-DD')
267
+        console.log("三月前",startDate)
268
+        this.startime = Date.parse(startDate)/1000
269
+        console.log("开始时间搓",this.startime)
270
+        const endDate = moment(new Date()).format('YYYY-MM-DD')
271
+        console.log("结束时间",endDate)
272
+        this.endtime = Date.parse(endDate)/1000
273
+        console.log("日期时间搓",this.endtime)
274
+        this.getlist()
275
+      }
276
+      console.log("month",month)
277
+
278
+       //近半年
279
+      if(month == 2){
280
+        const startDate = moment().subtract('month', 6).format('YYYY-MM-DD')
281
+        console.log("6月前",startDate)
282
+        this.startime = Date.parse(startDate)/1000
283
+        const endDate = moment(new Date()).format('YYYY-MM-DD')
284
+        this.endtime = Date.parse(endDate)/1000
285
+        this.getlist()
286
+      }
287
+
288
+      //近一年
289
+      if(month == 3){
290
+        const startDate = moment().subtract('month', 12).format('YYYY-MM-DD')
291
+        this.startime = Date.parse(startDate)/1000
292
+        const endDate = moment(new Date()).format('YYYY-MM-DD')
293
+        this.endtime = Date.parse(endDate)/1000
294
+         this.getlist()
295
+      }
296
+
297
+
276 298
       this.monthType = month;
277 299
     },
278
-    clickQuality(index) {
300
+    clickQuality(index,itemid) {
279 301
       this.quality = index;
302
+      this.item_id = itemid
303
+      this.getlist()
280 304
     },
281 305
     handleSizeChange(limit) {
282 306
       //this.limit = limit;
@@ -289,6 +313,39 @@ export default {
289 313
     getTime(time) {
290 314
       return uParseTime(time, "{y}-{m}-{d}");
291 315
     },
316
+    onSearch(){
317
+    },
318
+    changeTime(val){
319
+       var time = this.getTimestamp(val) - this.getTimestamp(this.listQuery.end_time);
320
+      if (time > 0) {
321
+        this.$message.error("结束时间不能小于开始时间");
322
+        this.listQuery.start_time = "";
323
+      } else {
324
+         this.startime = Date.parse(val)/1000;//s
325
+        this.getlist()
326
+      }
327
+
328
+    },
329
+    changeEndTime(val){
330
+      var time =
331
+          this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
332
+        if (time < 0) {
333
+          this.$message.error("结束时间不能小于开始时间");
334
+          this.listQuery.end_time = "";
335
+        } else {
336
+          this.endtime = Date.parse(val)/1000;//s
337
+          this.getlist()
338
+        }
339
+
340
+    },
341
+     getTimestamp(time) {
342
+      // 把时间日期转成时间戳
343
+      return new Date(time).getTime() / 1000;
344
+    },
345
+    handleChange(val){
346
+     this.patientid = val.id
347
+      this.getlist()
348
+    },
292 349
    getCurrentOrgPatients(){
293 350
       getCurrentOrgPatients().then(response=>{
294 351
           if(response.data.state == 1){
@@ -298,11 +355,71 @@ export default {
298 355
           }
299 356
       })
300 357
     },
358
+    getNormData(){
359
+      getNormData().then(response=>{
360
+         var normdata = response.data.data.normdata
361
+          console.log("normdata",normdata)
362
+          for(let i=0;i<normdata.length;i++){
363
+            this.item_id = normdata[0].inspection_minor
364
+            console.log("item_id",this.item_id)
365
+          }
366
+          this.normData = normdata
367
+          this.getlist()
368
+      })
369
+    },
370
+    getlist(){
371
+        this.modesData.series = []
372
+        this.modesData.xAxis = []
373
+
374
+        const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
375
+        console.log("开始时间",startDate)
376
+        const endDate = moment(new Date()).format('YYYY-MM-DD')
377
+        console.log("结束时间",endDate)
378
+        var now = new Date()
379
+        var nowMonth = now.getMonth(); //当前月
380
+        var nowYear = now.getFullYear(); //当前年
381
+        //本月的开始时间
382
+        var monthStartDate = new Date(nowYear, nowMonth, 1);
383
+        this.startime=Date.parse(monthStartDate)/1000;//s
384
+
385
+        //本月的结束时间
386
+        var monthEndDate = new Date(nowYear, nowMonth+1, 0);
387
+        this.endtime =Date.parse(monthEndDate)/1000-1;//s
388
+
389
+
390
+
391
+          const params = {
392
+            patientid:this.patientid,
393
+            startime:this.startime,
394
+            endtime:this.endtime,
395
+            itemid:this.item_id,
396
+          }
397
+        console.log("params",params)
398
+       GetQualityControl(params).then(response=>{
399
+          if(response.data.state == 1){
400
+            var list = response.data.data.list
401
+            console.log("list",list)
402
+            for(let i=0;i<list.length;i++){
403
+              this.modesData.xAxis.push(this.getTime(list[i].inspect_date));
404
+               this.modesData.series.push(list[i].inspect_value)
405
+            }
406
+            this.chart.series[0].data = this.modesData.series
407
+            this.chart.xAxis.data = this.modesData.xAxis
408
+            console.log(2222,this.modesData)
409
+          }
410
+
411
+       })
412
+    }
301 413
   },
302 414
 
303 415
    created(){
416
+     this.patientid =  this.$route.query.patientid
417
+     //获取指标项
418
+      this.getNormData()
304 419
      //获取该机构下的所有患者
305
-     this.getCurrentOrgPatients()
420
+      this.getCurrentOrgPatients()
421
+
422
+
306 423
   }
307 424
 };
308 425
 </script>

+ 207 - 22
src/xt_pages/qcd/patientControlAnalysis.vue 查看文件

@@ -77,12 +77,15 @@
77 77
               :key="index"
78 78
             >
79 79
             <template slot-scope="scope">
80
-              {{ scope.row.data[index].inspect_value}}
80
+                 <span v-if="scope.row.data[index].inspect_value == ''">0</span>
81
+                 <span v-if="scope.row.data[index].inspect_value !=''&& (parseInt(scope.row.data[index].inspect_value) < parseInt(scope.row.data[index].range_min))">{{scope.row.data[index].inspect_value}}↓</span>
82
+                <span v-if="scope.row.data[index].inspect_value !=''&& (parseInt(scope.row.data[index].inspect_value) > parseInt(scope.row.data[index].range_max))">{{scope.row.data[index].inspect_value}}↑</span>
83
+                <span v-if="scope.row.data[index].inspect_value !=''&& (parseInt(scope.row.data[index].inspect_value) >= parseInt(scope.row.data[index].range_min))&& (parseInt(scope.row.data[index].inspect_value) <= parseInt(scope.row.data[index].range_max)) ">{{scope.row.data[index].inspect_value}}</span>
81 84
             </template>
82 85
         </el-table-column>
83 86
             <el-table-column fixed="right" label="操作" width="100">
84 87
               <template slot-scope="scope">
85
-                <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
88
+                <el-button @click="handleClick(scope.row.name)" type="text" size="small">查看</el-button>
86 89
               </template>
87 90
             </el-table-column>
88 91
           </el-table>
@@ -109,7 +112,7 @@
109 112
 import echarts from "echarts";
110 113
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
111 114
 import LineChart from "../qcd/components/LineChart";
112
-import { getNormData,getPatientsControl } from "@/api/common/common"
115
+import { getNormData,getPatientsControl,getCartogramlist,getPatientContorlAnalysis } from "@/api/common/common"
113 116
 export default {
114 117
   components: {
115 118
     LineChart,
@@ -150,6 +153,10 @@ export default {
150 153
         },
151 154
       ],
152 155
       value: "",
156
+      modesData: {
157
+        xAxis: [],
158
+        series: []
159
+      },
153 160
       chart: {
154 161
         title: {
155 162
           text: "ECharts 入门示例"
@@ -178,7 +185,7 @@ export default {
178 185
               normal: {
179 186
                 show: true,
180 187
                 position: "top",
181
-                formatter: "{c}"
188
+                formatter: "{c}%"
182 189
               }
183 190
             },
184 191
             //配置样式
@@ -227,6 +234,14 @@ export default {
227 234
       ObjectData:{},
228 235
       tablePatients:[],
229 236
       tableSort:[],
237
+      dataName:[
238
+        {id:0,name:"达标"},
239
+        {id:1,name:"未达标"},
240
+      ],
241
+      dataCount:[
242
+         {id:0,count:0},
243
+         {id:1,count:0}
244
+      ]
230 245
     };
231 246
   },
232 247
   methods: {
@@ -262,8 +277,16 @@ export default {
262 277
       // 把时间日期转成时间戳
263 278
       return new Date(time).getTime() / 1000;
264 279
     },
265
-    handleClick(row) {
266
-      this.$router.push({ path: "/qcd/patientComplianceDetails" });
280
+    handleClick(name) {
281
+      var id = 0
282
+      var dialysis_no = 0
283
+      for(let i=0;i<this.tablePatients.length;i++){
284
+         if(name == this.tablePatients[i].name){
285
+            id = this.tablePatients[i].patient_id
286
+            dialysis_no = this.tablePatients[i].dialysis_no
287
+         }
288
+      }
289
+      this.$router.push({ path: "/qcd/patientComplianceDetails?patientid="+id});
267 290
     },
268 291
     getDialysisNo(name){
269 292
         for(let i=0;i<this.tablePatients.length;i++){
@@ -294,21 +317,63 @@ export default {
294 317
       })
295 318
     },
296 319
     onSearch(){
320
+         const params = {
321
+            lapstor:this.lapstor,
322
+            keyword:this.listQuery.search,
323
+            startime:this.listQuery.start_time,
324
+            endtime:this.listQuery.end_time,
325
+
326
+         }
327
+         console.log("params",params)
328
+       getPatientContorlAnalysis(params).then(response=>{
329
+           if(response.data.state == 1){
330
+              var patientcontorDetail = response.data.data.patientcontorDetail
331
+              console.log("patient",patientcontorDetail)
332
+              var name = response.data.data.name
333
+              console.log("name",name)
334
+              //统计配置的模块
335
+              var inspectdate = ""
336
+              for(let i=0;i<patientcontorDetail.length;i++){
337
+                 inspectdate = patientcontorDetail[0].inspect_date
338
+              }
339
+            //  console.log("日期",inspectdate)
340
+
341
+              var arr=[]
342
+              for(let i=0;i<patientcontorDetail.length;i++){
343
+                 if(patientcontorDetail[i].inspect_date == inspectdate){
344
+                    arr.push(patientcontorDetail[i])
345
+                 }
346
+              }
347
+             // console.log("arr",arr)
348
+
349
+             // console.log("表数据",this.tableData)
350
+              var arrtwo = []
351
+              for(let i=0;i<this.tableData.length;i++){
352
+                 if(name == this.tableData[i].name){
353
+                    arrtwo.push(this.tableData[i])
354
+                 }
355
+              }
356
+              console.log("arrtwo",arrtwo)
357
+              this.tableData = []
358
+              this.tableData = arrtwo
359
+           }
360
+       })
297 361
     },
298 362
     getlist(){
299 363
       getPatientsControl(this.lapstor,this.listQuery.start_time,this.listQuery.end_time,this.listQuery.page,this.listQuery.limit).then(response=>{
300 364
          if(response.data.state == 1){
301 365
            var patients = response.data.data.patients
302
-          // console.log("paitents",patients)
303
-          this.tablePatients = patients
304
-           var total =  response.data.data.total
305
-          // console.log("total",total)
306
-           this.total = total
307
-           var control = response.data.data.control
308
-         // console.log("control",control)
309
-          var newArr = []
310
-           //分页
311
-           for(let i=0;i<control.length;i++){
366
+             this.tablePatients = patients
367
+             var total =  response.data.data.total
368
+             // console.log("total",total)
369
+             this.total = total
370
+             var control = response.data.data.control
371
+
372
+
373
+             // console.log("control",control)
374
+             var newArr = []
375
+             //分页
376
+             for(let i=0;i<control.length;i++){
312 377
              for(let j=0;j<patients.length;j++){
313 378
                 if(control[i].patient_id == patients[j].patient_id){
314 379
                    newArr.push(control[i])
@@ -376,8 +441,6 @@ export default {
376 441
                dd[arrthree[index].name][arrthree[index].item_name] = arrthree[index];
377 442
             }
378 443
           }
379
-        console.log("ddd",dd)
380
-         console.log("obj",this.ObjectData)
381 444
           this.tableData= []
382 445
 
383 446
           for(const key in dd){
@@ -398,7 +461,7 @@ export default {
398 461
             this.newArr.map(item => {
399 462
               projectArr.push(item.item_name)
400 463
             })
401
-            console.log("projectArr",projectArr)
464
+           // console.log("projectArr",projectArr)
402 465
 
403 466
             this.tableData.map(item => {
404 467
             // console.log("item---",item.data)
@@ -410,9 +473,9 @@ export default {
410 473
                 return projectArr.indexOf(a.item_name)-projectArr.indexOf(b.item_name);
411 474
               });
412 475
               item.data = newarr
413
-              console.log(1111111111,item.data)
476
+             // console.log(1111111111,item.data)
414 477
             })
415
-              console.log("表",this.tableData)
478
+             console.log("表",this.tableData)
416 479
          }
417 480
       })
418 481
     },
@@ -440,9 +503,126 @@ export default {
440 503
                 result.push(obj);
441 504
             }
442 505
         }
443
-        console.log("result",result)
444 506
         return result;
445 507
     },
508
+
509
+    getCartogramlist(){
510
+       getCartogramlist(this.lapstor,this.listQuery.start_time,this.listQuery.end_time,this.limit,this.page).then(response=>{
511
+           if(response.data.state == 1){
512
+              var cartogramlist =  response.data.data.cartogramlist
513
+              console.log("cartogramlist",cartogramlist)
514
+              var totaltwo =  response.data.data.total
515
+               var cart = []
516
+               for(let i=0;i<cartogramlist.length;i++){
517
+                  if(cartogramlist[i].inspect_value != ''){
518
+                    cart.push(cartogramlist[i])
519
+                  }
520
+               }
521
+               console.log("cart",cart)
522
+               let dataInfo = {}
523
+                cart.forEach((item, index) => {
524
+                  let { patient_id } = item
525
+                  if (!dataInfo[patient_id]) {
526
+                    dataInfo[patient_id] = {
527
+                      patient_id,
528
+                      name:item.name,
529
+                      child: [],
530
+                      inspect_date:item.inspect_date,
531
+                      total:0,
532
+                    }
533
+                  }
534
+                })
535
+              let list = Object.values(dataInfo)
536
+              console.log("list",list)
537
+
538
+              var arr = []
539
+              list.map(item=>{
540
+                 for(let i=0;i<cart.length;i++){
541
+                    if(item.inspect_date == cart[i].inspect_date && item.patient_id == cart[i].patient_id){
542
+                        item.child.push(cart[i])
543
+                         item.total++
544
+                    }
545
+                 }
546
+              })
547
+
548
+
549
+
550
+             list.map(item=>{
551
+                item.child.map(it=>{
552
+                   arr.push(it)
553
+                })
554
+             })
555
+              console.log("arr",arr)
556
+
557
+             var arrtwo = []
558
+             for(let i=0;i<arr.length;i++){
559
+               if(parseInt(arr[i].range_min)<= parseInt(arr[i].inspect_value) && parseInt(arr[i].inspect_value)<=parseInt(arr[i].range_max )){
560
+                  arrtwo.push(arr[i])
561
+               }
562
+             }
563
+             console.log("arrtwo",arrtwo)
564
+
565
+             let objinfo = {}
566
+                arrtwo.forEach((item, index) => {
567
+                  let { patient_id } = item
568
+                  if (!objinfo[patient_id]) {
569
+                    objinfo[patient_id] = {
570
+                      patient_id,
571
+                      name:item.name,
572
+                      child: [],
573
+                      inspect_date:item.inspect_date,
574
+                      count:0,
575
+                    }
576
+                  }
577
+                })
578
+              let newlist = Object.values(objinfo)
579
+              newlist.map(item=>{
580
+                 for(let i=0;i<arrtwo.length;i++){
581
+                    if(arrtwo[i].patient_id == item.patient_id && arrtwo[i].inspect_date == item.inspect_date){
582
+                       item.child.push(arrtwo[i])
583
+                    }
584
+                 }
585
+              })
586
+              console.log("newlist",newlist)
587
+              newlist.map(item=>{
588
+                  item.child.map(it=>{
589
+                    if(parseInt(it.range_min)<= parseInt(it.inspect_value) && parseInt(it.inspect_value)<=parseInt(it.range_max )){
590
+                       item.count ++
591
+                    }
592
+                  })
593
+              })
594
+              console.log("newlist",newlist)
595
+
596
+
597
+              var newtotal = 0
598
+
599
+              list.map(item=>{
600
+                 for(let i=0;i<newlist.length;i++){
601
+                    if(item.patient_id == newlist[i].patient_id && item.total == newlist[i].count){
602
+                       newtotal ++
603
+                    }
604
+                 }
605
+              })
606
+             console.log("newtotal",newtotal)
607
+             var totalCount = totaltwo - newtotal
608
+              console.log("totalCount",totaltwo)
609
+             for(let i=0;i<this.dataName.length;i++){
610
+                this.modesData.xAxis.push(this.dataName[i].name);
611
+             }
612
+
613
+             for(let i=0;i<this.dataCount.length;i++){
614
+                this.dataCount[0].count = newtotal
615
+                this.dataCount[1].count =  totalCount
616
+             }
617
+
618
+             for(let i=0;i<this.dataCount.length;i++){
619
+                this.modesData.series.push(((this.dataCount[i].count/totaltwo)*100).toFixed(1));
620
+             }
621
+              this.chart.series[0].data = this.modesData.series
622
+              this.chart.xAxis.data = this.modesData.xAxis
623
+           }
624
+       })
625
+    }
446 626
   },
447 627
   created(){
448 628
     var nowDate = new Date();
@@ -466,10 +646,15 @@ export default {
466 646
       "-" +
467 647
       (nowDay < 10 ? "0" + nowDay : nowDay);
468 648
 
649
+
650
+
651
+
469 652
     //获取系统指标
470 653
     this.getNormData()
471 654
     //获取列表数据
472 655
     this.getlist()
656
+    //获取统计图数据
657
+    this.getCartogramlist()
473 658
   }
474 659
 };
475 660
 </script>

+ 1 - 0
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckAll.vue 查看文件

@@ -274,6 +274,7 @@ export default {
274 274
                  }
275 275
               }
276 276
             }
277
+           // console.log("arr",arr)
277 278
             let projectArr = []
278 279
             this.newArr.map(item => {
279 280
               projectArr.push(item.project_name)