浏览代码

complication

zhengchengwu 6 年前
父节点
当前提交
31fcdc1e0d

文件差异内容过多而无法显示
+ 477 - 519
src/router/index.js


+ 384 - 0
src/xt_pages/qcd/patientAnalysis/complication.vue 查看文件

@@ -0,0 +1,384 @@
1
+<template>
2
+ <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+    </div>
6
+    <div class="app-container" id="outcome-indicators-query">
7
+      <analysis-nav activeName="complication"></analysis-nav>
8
+
9
+      <div class="cell">
10
+        <label class="title">
11
+          <span class="name">日期查询</span> :
12
+        </label>
13
+        <el-date-picker
14
+          v-model="listQuery.start_time"
15
+          prefix-icon="el-icon-date"
16
+          @change="changeTime"
17
+          :editable="false"
18
+          style="width: 196px;"
19
+          type="date"
20
+          placeholder="选择日期时间"
21
+          align="right"
22
+          format="yyyy-MM-dd"
23
+          value-format="yyyy-MM-dd"
24
+        ></el-date-picker>
25
+        <span class>-</span>
26
+        <el-date-picker
27
+          v-model="listQuery.end_time"
28
+          prefix-icon="el-icon-date"
29
+          @change="changeTime"
30
+          :editable="false"
31
+          style="width: 196px;"
32
+          type="date"
33
+          placeholder="选择日期时间"
34
+          align="right"
35
+          format="yyyy-MM-dd"
36
+          value-format="yyyy-MM-dd"
37
+        ></el-date-picker>
38
+      </div>
39
+      <div class="cell clearfix">
40
+        <label class="title">
41
+          <span class="name">统计状态</span> :
42
+        </label>
43
+        <div class="time">
44
+          <ul class>
45
+            <li
46
+              :class="item.value==statisticalState?'active':''"
47
+              @click="selectStatisticalState( item.value)"
48
+              v-for="item in statisticalStateOption"
49
+              :key="item.value"
50
+            >{{item.label}}</li>
51
+          </ul>
52
+        </div>
53
+      </div>
54
+      <div class="cell clearfix">
55
+        <label class="title">
56
+          <span class="name">年龄</span> :
57
+        </label>
58
+        <div class="time">
59
+          <ul class>
60
+            <li
61
+              :class="item.age==ageType?'active':''"
62
+              @click="selectAge( item.age)"
63
+              v-for="item in ageOptions"
64
+              :key="item.value"
65
+            >{{item.label}}</li>
66
+          </ul>
67
+        </div>
68
+      </div>
69
+
70
+
71
+      <h4 class="hui">统计图</h4>
72
+      <hr class="huixiao">
73
+      <el-row :gutter="32">
74
+        <el-col :xs="24" :sm="24" :lg="24">
75
+          <div class="chart-wrapper">
76
+              <pie-chart title="" :options="CompletionOptions"/>
77
+          </div>
78
+        </el-col>
79
+      </el-row>
80
+
81
+      <h4 class="hui">统计表</h4>
82
+      <hr class="huixiao">
83
+      <el-table
84
+        ref="multipleTable"
85
+        :data="tableData"
86
+        border
87
+        fit
88
+        highlight-current-row
89
+        style="width: 100%;margin-top: 10px;"
90
+        :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
91
+      >
92
+        
93
+        <el-table-column  label="日期" min-width="80" property="created_time" align="center">
94
+          <template slot-scope="scope"><span>{{getTime(scope.row.created_time,'{y}-{m}-{d}')}}</span></template>
95
+        </el-table-column>
96
+        <el-table-column  label="透析号" min-width="100" property="dialysis_no" align="center">
97
+        </el-table-column>
98
+        <el-table-column  label="姓名" min-width="100" property="name" align="center">
99
+        </el-table-column>
100
+        <el-table-column  label="患者来源" min-width="80" property="source" align="center">
101
+          <template slot-scope="scope"><span>{{getPatientSource(scope.row.source)}}</span></template>
102
+        </el-table-column>
103
+        <el-table-column  label="归转状态" min-width="80" property="lapseto" align="center">
104
+          <template slot-scope="scope"><span>{{getPatientLapseto(scope.row.lapseto)}}</span></template>
105
+        </el-table-column>
106
+        
107
+      </el-table>
108
+
109
+      <!-- <pagi-nation title="分页"></pagi-nation> -->
110
+
111
+      <el-pagination
112
+      align="right"
113
+        @size-change="handleSizeChange"
114
+        @current-change="handleCurrentChange"
115
+        :current-page="listQuery.pate"
116
+        :page-sizes="[10, 20, 50, 100]"
117
+        :page-size="10"
118
+        background
119
+        style="margin-top:20px;"
120
+        layout="total, sizes, prev, pager, next, jumper"
121
+        :total="total"
122
+      ></el-pagination>
123
+    </div>
124
+  </div>
125
+</template>
126
+
127
+
128
+<script>
129
+import { GetPATotalData  } from "@/api/qcd";
130
+import PieChart from '../components/PieChart'
131
+import {jsGetAge, uParseTime} from "@/utils/tools";
132
+import analysisNav from './components/analysisNav'
133
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
134
+export default {
135
+  name: "totalAnalysis",
136
+  data() {
137
+    return {
138
+      crumbs:[
139
+        {path:false, name:'科室质控'},
140
+        {path:false, name:'患者分析'},
141
+        {path:false, name:'并发症分析'},
142
+      ],
143
+      total: 0,
144
+      patientMap:{},
145
+      listQuery: {
146
+        start_time: "",
147
+        end_time: "",
148
+        page: 1,
149
+        limit: 10,
150
+      },
151
+      CompletionOptions:{
152
+        legend:[],
153
+        series:[],
154
+      },
155
+      tableData: [],
156
+      statisticalState:1,
157
+      statisticalStateOption:[
158
+        { value: 1, label: "透前评估", },
159
+        { value: 2, label: "透后评估", },
160
+      ],
161
+      ageType: 0,
162
+      ageOptions: [
163
+        { value: 0, label: "全部", age: 0 },
164
+        { value: 1, label: "20~30", age: 1 },
165
+        { value: 2, label: "30~40", age: 2 },
166
+        { value: 3, label: "40~50", age: 3 },
167
+        { value: 4, label: "其他", age: 4 },
168
+      ],
169
+    };
170
+  },
171
+  created() {
172
+
173
+    var nowDate = new Date();
174
+    var nowYear = nowDate.getFullYear();
175
+    var nowMonth = nowDate.getMonth() + 1;
176
+    var nowDay = nowDate.getDate();
177
+    this.listQuery.end_time =
178
+      nowYear +
179
+      "-" +
180
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
181
+      "-" +
182
+      (nowDay < 10 ? "0" + nowDay : nowDay);
183
+    nowDate.setMonth(nowDate.getMonth() - 3);
184
+    nowYear = nowDate.getFullYear();
185
+    nowMonth = nowDate.getMonth() + 1;
186
+    nowDay = nowDate.getDate();
187
+    this.listQuery.start_time =
188
+      nowYear +
189
+      "-" +
190
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
191
+      "-" +
192
+      (nowDay < 10 ? "0" + nowDay : nowDay);
193
+    this.getList();
194
+  },
195
+  methods: {
196
+    getList() {
197
+      GetPATotalData(this.listQuery).then(response => {
198
+        if (response.data.state == 0) {
199
+          this.$message.error(response.data.msg);
200
+          return false;
201
+        } else {
202
+            this.tableData = [];
203
+            this.total = response.data.data.total;
204
+            var patients = response.data.data.patients;
205
+            for (const index in patients) {
206
+                this.tableData.push(patients[index]);
207
+            }
208
+            var lapsetoIn = response.data.data.lapsetoIn;
209
+            var lapsetoOut = response.data.data.lapsetoOut;
210
+            this.CompletionOptions = {
211
+                legend:[],
212
+                series:[],
213
+            };
214
+            this.CompletionOptions.legend.push('留治病人');
215
+            this.CompletionOptions.series.push({
216
+                value:lapsetoIn,name:'留治病人'
217
+            });
218
+            this.CompletionOptions.legend.push('转出病人');
219
+            this.CompletionOptions.series.push({
220
+                value:lapsetoOut,name:'转出病人'
221
+            });
222
+        }
223
+      });
224
+    },
225
+    changeTime() {
226
+      this.getList();
227
+    },
228
+    onSearch(){
229
+      this.getList();
230
+    },
231
+    changeModel() {
232
+      this.getList();
233
+    },
234
+    handleSizeChange(val) {
235
+      this.listQuery.limit = val;
236
+      this.getList();
237
+    },
238
+    handleCurrentChange(val) {
239
+      this.listQuery.page = val;
240
+      this.getList();
241
+    },
242
+    selectStatisticalState(state) {
243
+      this.statisticalState = state;
244
+      this.listQuery.statistical_state = state;
245
+      this.getList();
246
+    },
247
+    selectAge(age) {
248
+      this.ageType = age;
249
+      this.listQuery.age = age;
250
+      this.getList();
251
+    },
252
+    
253
+    getTime(value, temp) {
254
+        if (value != undefined) {
255
+          return uParseTime(value, temp)
256
+        }
257
+        return ""
258
+    },
259
+    getProjectName(id) {
260
+      return (id in this.projectOptions) ? this.projectOptions[id].project_name:'';
261
+    },
262
+    getPatientName(id) {
263
+      return (id in this.patientMap) ? this.patientMap[id].name:'';
264
+    },
265
+    getPatientLapseto(lapseto) {
266
+      if(lapseto==1) {
267
+        return '留治';
268
+      }else if(lapseto == 2) {
269
+        return '转出';
270
+      }
271
+      return '--';
272
+    },
273
+    getPatientSource(srouce){
274
+      if(srouce==1) {
275
+        return '门诊';
276
+      }else if(srouce == 2) {
277
+        return '住院';
278
+      }
279
+      return '其他';
280
+    },
281
+    getPatientGender(gender) {
282
+      if (gender == 1) {
283
+        return '男';
284
+      } else if(gender == 2) {
285
+        return '女';
286
+      }
287
+      return '';
288
+    },
289
+    tranAge(birthday) {
290
+        var birth = uParseTime(birthday, '{y}-{m}-{d}');
291
+        return jsGetAge(birth, '-');
292
+    },
293
+    getPatientDialysisNo(id) {
294
+      return (id in this.patientMap) ? this.patientMap[id].dialysis_no:'';
295
+    },
296
+    getItemVulue(project_id, item_id, row) {
297
+        var key = project_id + '_' + item_id;
298
+        return (typeof(row.items) !== 'undefined' && (key in row.items)) ? row.items[key].inspect_value:'';
299
+    },
300
+    renderheader(h, { column, $index }) {
301
+        return h('span', {}, [
302
+            h('span', {}, column.label.split('//')[0]),
303
+            h('br'),
304
+            h('span', {}, column.label.split('//')[1])
305
+        ])
306
+    },
307
+  },
308
+  components: {
309
+      analysisNav,
310
+      PieChart,
311
+      BreadCrumb
312
+  }
313
+};
314
+</script>
315
+<style>
316
+#oictable ::-webkit-scrollbar {
317
+  height: 15px;
318
+}
319
+#outcome-indicators-query .el-form-item {
320
+    margin-bottom: 0px !important;
321
+}
322
+</style>
323
+
324
+
325
+<style rel="stylesheet/scss" lang="scss" scoped>
326
+.app-container {
327
+//   margin: 20px;
328
+  font-size: 15px;
329
+  .filter-container {
330
+    padding-bottom: 5px;
331
+  }
332
+  .hui {
333
+    color: #909399;
334
+    margin-bottom: 5px;
335
+  }
336
+  .huixiao {
337
+    border: solid 1px #ebeef5;
338
+  }
339
+  .search-component {
340
+    width: 500px;
341
+    .searchBox {
342
+      width: 300px;
343
+      height: 36px;
344
+      line-height: 36px;
345
+      padding-left: 15px;
346
+      border: 1px #dcdfe6 solid;
347
+      border-right: none;
348
+      outline: none;
349
+      float: left;
350
+      border-radius: 6px 0 0 6px;
351
+      font-size: 14px;
352
+      color: #333;
353
+      background: #fff;
354
+      box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
355
+    }
356
+    .searchBtn {
357
+      background-color: #409eff;
358
+      color: #fff;
359
+      font-size: 15px;
360
+      text-align: center;
361
+      height: 36px;
362
+      line-height: 36px;
363
+      float: left;
364
+      outline: none;
365
+      width: 70px;
366
+      border: none;
367
+      border-radius: 0 6px 6px 0;
368
+      font-family: "Microsoft Yahei";
369
+      cursor: pointer;
370
+    }
371
+  }
372
+  .amount {
373
+    font-weight: normal;
374
+    padding: 10px 0 0 0;
375
+    color: #606266;
376
+    font-size: 14px;
377
+    span {
378
+      color: #ef2525;
379
+      font-family: "Arial";
380
+      padding: 0 2px;
381
+    }
382
+  }
383
+}
384
+</style>

+ 1 - 0
src/xt_pages/qcd/patientAnalysis/components/analysisNav.vue 查看文件

@@ -5,6 +5,7 @@
5 5
         <el-tab-pane label="血压分析" name="bloodpressure"></el-tab-pane>
6 6
         <el-tab-pane label="透析龄分析" name="dialysisage"></el-tab-pane>
7 7
         <el-tab-pane label="转归分析" name="lapseto"></el-tab-pane>
8
+        <el-tab-pane label="并发症分析" name="complication"></el-tab-pane>
8 9
     </el-tabs>
9 10
 </template>
10 11
 <script>

+ 13 - 13
src/xt_permission.js 查看文件

@@ -10,19 +10,19 @@ const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名
10 10
 
11 11
 router.beforeEach((to, from, next) => {
12 12
   // 线上注释
13
-  // if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
14
-  //   store.dispatch('VerifyConfigList', []).then(() => {
15
-  //     next()
16
-  //   })
17
-  // }
18
-  // if (store.getters.permission_routers === undefined) {
19
-  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
20
-  //     next()
21
-  //   })
22
-  // } else {
23
-  //   next()
24
-  // }
25
-  // return
13
+  if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
14
+    store.dispatch('VerifyConfigList', []).then(() => {
15
+      next()
16
+    })
17
+  }
18
+  if (store.getters.permission_routers === undefined) {
19
+    store.dispatch('xt_GenerateRoutes', []).then(() => {
20
+      next()
21
+    })
22
+  } else {
23
+    next()
24
+  }
25
+  return
26 26
   // 线上注释
27 27
 
28 28
   NProgress.start()