Browse Source

统计配置开发

XMLWAN 5 years ago
parent
commit
c0ed5a1910

+ 22 - 0
src/api/common/common.js View File

318
     params: params
318
     params: params
319
   })
319
   })
320
 }
320
 }
321
+
322
+export function getAllMajorInspection(params) {
323
+  return request({
324
+    url: '/com/api/getallmajorInspection',
325
+    method: 'Get',
326
+    params: params
327
+  })
328
+}
329
+
330
+export function getPatientList(startime, endtime, limit, page) {
331
+  const params = {
332
+    startime: startime,
333
+    endtime: endtime,
334
+    limit: limit,
335
+    page: page
336
+  }
337
+  return request({
338
+    url: '/com/api/getpatientlist',
339
+    method: 'Get',
340
+    params: params
341
+  })
342
+}

+ 2 - 2
src/xt_pages/integration/his/patientHisConfig.vue View File

264
         }
264
         }
265
         this.form.other_age = this.getAge(row)
265
         this.form.other_age = this.getAge(row)
266
         this.form.infectious = this.getInfectiousName(row)
266
         this.form.infectious = this.getInfectiousName(row)
267
-        console.log('111111')
268
-        console.log(this.getInfectiousName(row))
267
+       // console.log('111111')
268
+       // console.log(this.getInfectiousName(row))
269
 
269
 
270
         if (row.his_patient.id > 0) {
270
         if (row.his_patient.id > 0) {
271
           this.his_record_id = row.his_patient.id
271
           this.his_record_id = row.his_patient.id

+ 110 - 146
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckAll.vue View File

39
     <el-container>
39
     <el-container>
40
       <div style="width:150px">
40
       <div style="width:150px">
41
         <div class="tableTitle">患者列表</div>
41
         <div class="tableTitle">患者列表</div>
42
-        <el-table :data="tableData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
43
-          <el-table-column prop="date" label="日期" width="70"></el-table-column>
44
-          <el-table-column prop="name" label="姓名" width="80"></el-table-column>
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'}">
43
+           <el-table-column prop="dialysis_no" label="透析号" width="80">
44
+            <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
45
+          </el-table-column>
46
+          <el-table-column prop="name" label="姓名" width="80">
47
+            <template slot-scope="scope">{{ scope.row.name }}</template>
48
+          </el-table-column>
45
         </el-table>
49
         </el-table>
46
       </div>
50
       </div>
47
       <div style="padding-left:10px;flex:1">
51
       <div style="padding-left:10px;flex:1">
48
         <div class="tableTitle">统计表</div>
52
         <div class="tableTitle">统计表</div>
49
-        <el-table :data="tableData1" style="width: 100%" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
50
-          <el-table-column fixed prop="date" label="日期"></el-table-column>
51
-          <el-table-column prop="name" label="姓名"></el-table-column>
52
-          <el-table-column prop="province" label="省份"></el-table-column>
53
-          <el-table-column prop="city" label="市区"></el-table-column>
54
-          <el-table-column prop="address" label="地址"></el-table-column>
55
-          <el-table-column prop="zip" label="邮编"></el-table-column>
53
+        <el-table :data="tableData" style="width: 100%" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
54
+          <el-table-column prop="name" label="姓名" fixed>
55
+            <template slot-scope="scope">{{ scope.row.name }}</template>
56
+         </el-table-column>
57
+         <el-table-column
58
+          :label="modeItem.project_name"
59
+          property="number"
60
+          align="center"
61
+          min-width="100"
62
+          v-for="(modeItem, index) in tableName"
63
+          :key="index"
64
+        >
65
+         
66
+        </el-table-column>
56
         </el-table>
67
         </el-table>
57
 
68
 
58
         <el-pagination
69
         <el-pagination
60
           @size-change="handleSizeChange"
71
           @size-change="handleSizeChange"
61
           @current-change="handleCurrentChange"
72
           @current-change="handleCurrentChange"
62
           :current-page="listQuery.page"
73
           :current-page="listQuery.page"
63
-          :page-sizes="[10, 20, 50, 100]"
74
+          :page-sizes="[20, 40, 60, 80,100]"
64
           :page-size="10"
75
           :page-size="10"
65
           background
76
           background
66
           style="margin-top:20px;"
77
           style="margin-top:20px;"
74
 
85
 
75
 
86
 
76
 <script>
87
 <script>
88
+  import {getCurrentOrgPatients,getAllMajorInspection,getPatientList } from "@/api/common/common"
77
 export default {
89
 export default {
78
   data() {
90
   data() {
79
     return {
91
     return {
81
         start_time: "",
93
         start_time: "",
82
         end_time: "",
94
         end_time: "",
83
         page: 1,
95
         page: 1,
84
-        limit: 10
96
+        limit: 20
85
       },
97
       },
86
       options: [
98
       options: [
87
         {
99
         {
106
         }
118
         }
107
       ],
119
       ],
108
       value: "请选项",
120
       value: "请选项",
109
-      tableData: [
110
-        {
111
-          date: "2016",
112
-          name: "王小虎"
113
-        },
114
-        {
115
-          date: "2016",
116
-          name: "王小虎"
117
-        },
118
-        {
119
-          date: "2016",
120
-          name: "王小虎"
121
-        },
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
-      tableData1: [
160
-        {
161
-          date: "2016-05-03",
162
-          name: "王小虎",
163
-          province: "上海",
164
-          city: "普陀区",
165
-          address: "上海市普陀区金沙江路 1518 弄",
166
-          zip: 200333
167
-        },
168
-        {
169
-          date: "2016-05-02",
170
-          name: "王小虎",
171
-          province: "上海",
172
-          city: "普陀区",
173
-          address: "上海市普陀区金沙江路 1518 弄",
174
-          zip: 200333
175
-        },
176
-        {
177
-          date: "2016-05-04",
178
-          name: "王小虎",
179
-          province: "上海",
180
-          city: "普陀区",
181
-          address: "上海市普陀区金沙江路 1518 弄",
182
-          zip: 200333
183
-        },
184
-        {
185
-          date: "2016-05-01",
186
-          name: "王小虎",
187
-          province: "上海",
188
-          city: "普陀区",
189
-          address: "上海市普陀区金沙江路 1518 弄",
190
-          zip: 200333
191
-        },
192
-        {
193
-          date: "2016-05-08",
194
-          name: "王小虎",
195
-          province: "上海",
196
-          city: "普陀区",
197
-          address: "上海市普陀区金沙江路 1518 弄",
198
-          zip: 200333
199
-        },
200
-        {
201
-          date: "2016-05-06",
202
-          name: "王小虎",
203
-          province: "上海",
204
-          city: "普陀区",
205
-          address: "上海市普陀区金沙江路 1518 弄",
206
-          zip: 200333
207
-        },
208
-        {
209
-          date: "2016-05-07",
210
-          name: "王小虎",
211
-          province: "上海",
212
-          city: "普陀区",
213
-          address: "上海市普陀区金沙江路 1518 弄",
214
-          zip: 200333
215
-        },
216
-        {
217
-          date: "2016-05-08",
218
-          name: "王小虎",
219
-          province: "上海",
220
-          city: "普陀区",
221
-          address: "上海市普陀区金沙江路 1518 弄",
222
-          zip: 200333
223
-        },
224
-        {
225
-          date: "2016-05-06",
226
-          name: "王小虎",
227
-          province: "上海",
228
-          city: "普陀区",
229
-          address: "上海市普陀区金沙江路 1518 弄",
230
-          zip: 200333
231
-        },
232
-        {
233
-          date: "2016-05-07",
234
-          name: "王小虎",
235
-          province: "上海",
236
-          city: "普陀区",
237
-          address: "上海市普陀区金沙江路 1518 弄",
238
-          zip: 200333
239
-        }
240
-      ]
121
+      tableData: [],
122
+      patientsData:[],
123
+      total:0,
124
+      tableName:[],
241
     };
125
     };
242
   },
126
   },
243
   methods: {
127
   methods: {
244
-    changeTime() {},
128
+    changeTime(val) {
129
+      var time = this.getTimestamp(val) - this.getTimestamp(this.listQuery.end_time);
130
+      if (time > 0) {
131
+        this.$message.error("结束时间不能小于开始时间");
132
+        this.listQuery.start_time = "";
133
+      } else {
134
+        this.getPatientList()
135
+      }
136
+    },
137
+    onSearch(){
138
+    },
139
+     handleSizeChange(limit) {
140
+      this.listQuery.limit = limit;
141
+       this.getPatientList()
142
+    },
143
+    handleCurrentChange(page) {
144
+      this.listQuery.page = page;
145
+       this.getPatientList()
146
+    },
245
     changeEndTime(val) {
147
     changeEndTime(val) {
246
       var time =
148
       var time =
247
         this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
149
         this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
249
         this.$message.error("结束时间不能小于开始时间");
151
         this.$message.error("结束时间不能小于开始时间");
250
         this.listQuery.end_time = "";
152
         this.listQuery.end_time = "";
251
       } else {
153
       } else {
154
+        this.getPatientList()
252
       }
155
       }
156
+    },
157
+    //获取病人列表
158
+    getCurrentOrgPatients(){
159
+      getCurrentOrgPatients().then(response=>{
160
+         if(response.data.state === 1){
161
+            var patients = response.data.data.patients
162
+            this.patientsData = patients
163
+         }
164
+      })
165
+    },
166
+    //获取检验检查项目
167
+    getAllMajorInspection(){
168
+      getAllMajorInspection().then(response=>{
169
+        if(response.data.state === 1){
170
+           var inspection = response.data.data.inspection
171
+           console.log("inspection",inspection)
172
+           this.tableName = inspection
173
+        }
174
+      })
175
+    },
176
+    getPatientList(){
177
+      getPatientList(this.listQuery.start_time,this.listQuery.end_time,this.listQuery.limit,this.listQuery.page).then(response=>{
178
+         if(response.data.state === 1){
179
+           var patientInfo = response.data.data.patientInfo
180
+           console.log("列表数据",patientInfo)
181
+           this.tableData = patientInfo
182
+           var total = response.data.data.total
183
+           console.log("total",total)
184
+           this.total = total
185
+           var list = response.data.data.list
186
+           console.log("list",list)
187
+         }
188
+      })
253
     }
189
     }
254
-  }
190
+  },
191
+  created(){
192
+     var nowDate = new Date();
193
+    var nowYear = nowDate.getFullYear();
194
+    var nowMonth = nowDate.getMonth() + 1;
195
+    var nowDay = nowDate.getDate();
196
+    this.listQuery.end_time =
197
+      nowYear +
198
+      "-" +
199
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
200
+      "-" +
201
+      (nowDay < 10 ? "0" + nowDay : nowDay);
202
+    nowDate.setMonth(nowDate.getMonth() - 3);
203
+    nowYear = nowDate.getFullYear();
204
+    nowMonth = nowDate.getMonth() + 1;
205
+    nowDay = nowDate.getDate();
206
+    this.listQuery.start_time =
207
+      nowYear +
208
+      "-" +
209
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
210
+      "-" +
211
+      (nowDay < 10 ? "0" + nowDay : nowDay);
212
+       //获取该机构下的所有患者
213
+     this.getCurrentOrgPatients()
214
+     //获取检验检查项目
215
+     this.getAllMajorInspection()
216
+     //获取列表数据
217
+     this.getPatientList()
218
+  }  
255
 };
219
 };
256
 </script>
220
 </script>
257
 
221
 

+ 23 - 10
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckPersonal.vue View File

171
     };
171
     };
172
   },
172
   },
173
   methods: {
173
   methods: {
174
-    changeTime() {},
174
+    changeTime(val) {
175
+      var time = this.getTimestamp(val) - this.getTimestamp(this.listQuery.end_time);
176
+      if (time > 0) {
177
+        this.$message.error("结束时间不能小于开始时间");
178
+        this.listQuery.start_time = "";
179
+      } else {
180
+        this.getInspectionTotalCount();
181
+      }
182
+    },
175
     changeEndTime(val) {
183
     changeEndTime(val) {
176
       var time =
184
       var time =
177
         this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
185
         this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
179
         this.$message.error("结束时间不能小于开始时间");
187
         this.$message.error("结束时间不能小于开始时间");
180
         this.listQuery.end_time = "";
188
         this.listQuery.end_time = "";
181
       } else {
189
       } else {
190
+        this.getInspectionTotalCount()
182
       }
191
       }
183
     },
192
     },
193
+    getTimestamp(time) {
194
+      // 把时间日期转成时间戳
195
+      return new Date(time).getTime() / 1000;
196
+    },
184
     getCurrentOrgPatients(){
197
     getCurrentOrgPatients(){
185
       getCurrentOrgPatients().then(response=>{
198
       getCurrentOrgPatients().then(response=>{
186
          var patients = response.data.data.patients
199
          var patients = response.data.data.patients
192
           if(response.data.state === 1){
205
           if(response.data.state === 1){
193
             var Inspection = response.data.data.Inspection
206
             var Inspection = response.data.data.Inspection
194
             this.tableData = Inspection
207
             this.tableData = Inspection
195
-            console.log("Inspection",Inspection)
208
+           // console.log("Inspection",Inspection)
196
             var counts = response.data.data.counts
209
             var counts = response.data.data.counts
197
-            console.log("counts",counts)
210
+           // console.log("counts",counts)
198
             var arr = []
211
             var arr = []
199
             for(let i=0;i<Inspection.length;i++){
212
             for(let i=0;i<Inspection.length;i++){
200
                for(let j=0;j<counts.length;j++){
213
                for(let j=0;j<counts.length;j++){
203
                  }
216
                  }
204
                }
217
                }
205
             }
218
             }
206
-            console.log("arr",arr)
219
+           // console.log("arr",arr)
207
             var hash = {};
220
             var hash = {};
208
             var i = 0;
221
             var i = 0;
209
             var res = [];
222
             var res = [];
219
             res.map(item => {
232
             res.map(item => {
220
              item.Count = eval(item.Count.join('+'))
233
              item.Count = eval(item.Count.join('+'))
221
             })
234
             })
222
-            console.log(11111,res)
235
+           // console.log(11111,res)
223
 
236
 
224
             for (const key in this.tableData) {
237
             for (const key in this.tableData) {
225
               this.modesData.xAxis.push(this.tableData[key].project_name);
238
               this.modesData.xAxis.push(this.tableData[key].project_name);
232
             }
245
             }
233
             this.chart.series[0].data = this.modesData.series
246
             this.chart.series[0].data = this.modesData.series
234
             this.chart.xAxis.data = this.modesData.xAxis
247
             this.chart.xAxis.data = this.modesData.xAxis
235
-            console.log(2222,this.modesData)
248
+           // console.log(2222,this.modesData)
236
           }
249
           }
237
       })
250
       })
238
     },
251
     },
242
        getInspectionDetailById(val.id,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
255
        getInspectionDetailById(val.id,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
243
           if(response.data.state === 1){
256
           if(response.data.state === 1){
244
             var patientdetail = response.data.data.patientdetail
257
             var patientdetail = response.data.data.patientdetail
245
-            console.log("patientdetail",patientdetail)
258
+           // console.log("patientdetail",patientdetail)
246
             var arr=[]
259
             var arr=[]
247
             for(let i=0;i<this.tableData.length;i++){
260
             for(let i=0;i<this.tableData.length;i++){
248
               for(let j=0;j<patientdetail.length;j++){
261
               for(let j=0;j<patientdetail.length;j++){
251
                  }
264
                  }
252
               }
265
               }
253
             }
266
             }
254
-            console.log("arr",arr)
267
+           // console.log("arr",arr)
255
           }
268
           }
256
        })
269
        })
257
     },
270
     },
261
       getSearchPatientInfo(this.listQuery.search,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
274
       getSearchPatientInfo(this.listQuery.search,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
262
          if(response.data.state  === 1){
275
          if(response.data.state  === 1){
263
            var PatientsInfo = response.data.data.PatientsInfo
276
            var PatientsInfo = response.data.data.PatientsInfo
264
-           console.log("PatientsInfo",PatientsInfo)
277
+         //  console.log("PatientsInfo",PatientsInfo)
265
            var arr = []
278
            var arr = []
266
            for(let i=0;i<this.tableData.length;i++){
279
            for(let i=0;i<this.tableData.length;i++){
267
              for(let j=0;j<PatientsInfo.length;j++){
280
              for(let j=0;j<PatientsInfo.length;j++){
270
                  }
283
                  }
271
              }
284
              }
272
            }
285
            }
273
-           console.log("arr",arr)
286
+         //  console.log("arr",arr)
274
          }
287
          }
275
       })
288
       })
276
     }
289
     }

+ 8 - 7
src/xt_pages/qcd/treatmentControlAnalysis/components/TimeAll.vue View File

257
       geStatistics(this.listQuery).then(response=>{
257
       geStatistics(this.listQuery).then(response=>{
258
         if(response.data.state === 1){
258
         if(response.data.state === 1){
259
           var dtd =  response.data.data.statistics
259
           var dtd =  response.data.data.statistics
260
-          console.log("dtd",dtd)
260
+        //  console.log("dtd",dtd)
261
           var dd = {};
261
           var dd = {};
262
           for (const index in dtd) {
262
           for (const index in dtd) {
263
             if (!(dtd[index].date in dd)) {
263
             if (!(dtd[index].date in dd)) {
289
             this.tableData.push({ date: key, data: dd[key], total: total });
289
             this.tableData.push({ date: key, data: dd[key], total: total });
290
           }
290
           }
291
           var ttd = response.data.data.ttd
291
           var ttd = response.data.data.ttd
292
-          console.log("ttd",ttd)
292
+         // console.log("ttd",ttd)
293
           var modeMap = {};
293
           var modeMap = {};
294
           var batotal = 0;
294
           var batotal = 0;
295
           for (const index in ttd) {
295
           for (const index in ttd) {
298
             }
298
             }
299
             modeMap[ttd[index].mode_id] = ttd[index];
299
             modeMap[ttd[index].mode_id] = ttd[index];
300
           }
300
           }
301
-          console.log(111,modeMap)
301
+         // console.log(111,modeMap)
302
           for (const key in this.modeOptions) {
302
           for (const key in this.modeOptions) {
303
             this.modesData.xAxis.push(this.modeOptions[key].name);
303
             this.modesData.xAxis.push(this.modeOptions[key].name);
304
             if (key in modeMap) {
304
             if (key in modeMap) {
311
           
311
           
312
           this.chart.series[0].data = this.modesData.series
312
           this.chart.series[0].data = this.modesData.series
313
           this.chart.xAxis.data = this.modesData.xAxis
313
           this.chart.xAxis.data = this.modesData.xAxis
314
-          console.log(this.chart.series[0].data)
315
-          console.log(this.chart.xAxis.data)
314
+         // console.log(this.chart.series[0].data)
315
+         // console.log(this.chart.xAxis.data)
316
 
316
 
317
           this.total =  response.data.data.total
317
           this.total =  response.data.data.total
318
-          console.log("total",this.total)
318
+         // console.log("total",this.total)
319
 
319
 
320
         }
320
         }
321
       })
321
       })
322
-    }
322
+    },
323
   },
323
   },
324
   created(){
324
   created(){
325
     this.modeOptions = this.$store.getters.treatment_mode;
325
     this.modeOptions = this.$store.getters.treatment_mode;
356
         }
356
         }
357
       }
357
       }
358
       return modes;
358
       return modes;
359
+      
359
     }
360
     }
360
   },
361
   },
361
 };
362
 };

+ 3 - 3
src/xt_pages/qcd/treatmentControlAnalysis/components/TimePersonal.vue View File

315
          if(response.data.state === 1){
315
          if(response.data.state === 1){
316
            var patients =  response.data.data.patient
316
            var patients =  response.data.data.patient
317
            this.getModeId(patients)
317
            this.getModeId(patients)
318
-           console.log("patient",patients)
318
+           //console.log("patient",patients)
319
            var hash = {};
319
            var hash = {};
320
            var i = 0;
320
            var i = 0;
321
            var res = [];
321
            var res = [];
334
            this.DialysisData = res
334
            this.DialysisData = res
335
            var total =  response.data.data.total
335
            var total =  response.data.data.total
336
            this.total = res.length
336
            this.total = res.length
337
-           console.log("total",total)
337
+          // console.log("total",total)
338
          }
338
          }
339
        })
339
        })
340
       }
340
       }
366
               })
366
               })
367
             });
367
             });
368
             this.DialysisData = res
368
             this.DialysisData = res
369
-            console.log(res)
369
+           // console.log(res)
370
             var total =  response.data.data.total
370
             var total =  response.data.data.total
371
             this.total = res.length
371
             this.total = res.length
372
             // console.log("total",total)
372
             // console.log("total",total)