Browse Source

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

See999 4 years ago
parent
commit
1b2eaac412

+ 16 - 2
src/api/common/common.js View File

213
 }
213
 }
214
 
214
 
215
 export function getDialysisList(startime, endtime, page, limit) {
215
 export function getDialysisList(startime, endtime, page, limit) {
216
-  console.log('startime', startime)
217
-  console.log('endtime', endtime)
218
   const params = {
216
   const params = {
219
     startime: startime,
217
     startime: startime,
220
     endtime: endtime,
218
     endtime: endtime,
227
     params: params
225
     params: params
228
   })
226
   })
229
 }
227
 }
228
+
229
+export function getLastSort(params) {
230
+  return request({
231
+    url: '/com/api/getlastsort',
232
+    method: 'get',
233
+    params: params
234
+  })
235
+}
236
+
237
+export function getLastCheckList(params) {
238
+  return request({
239
+    url: '/com/api/getlastchecklist',
240
+    method: 'Get',
241
+    params: params
242
+  })
243
+}

+ 19 - 6
src/xt_pages/qcd/checkStatistical.vue View File

108
 import PieChart from "../qcd/components/BarChart";
108
 import PieChart from "../qcd/components/BarChart";
109
 import { uParseTime } from "@/utils/tools";
109
 import { uParseTime } from "@/utils/tools";
110
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
110
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
111
-import {getAllInspectionData,SaveCheckConfiguration,getAllCheckList,getCheckDetail,UpdateCheck,DeleteCheck} from "@/api/common/common"
111
+import {getAllInspectionData,SaveCheckConfiguration,getAllCheckList,getCheckDetail,UpdateCheck,DeleteCheck,getLastCheckList} from "@/api/common/common"
112
 export default {
112
 export default {
113
   name: "dialysisTotal",
113
   name: "dialysisTotal",
114
   data() {
114
   data() {
147
   created() {
147
   created() {
148
     //获取大项
148
     //获取大项
149
     this.getAllInspectionData(),
149
     this.getAllInspectionData(),
150
-    this.getAllCheckList()
150
+    this.getAllCheckList(),
151
+    //获取排序
152
+    this.getLastCheckList()
151
   },
153
   },
152
   methods: {
154
   methods: {
153
     handleTabClick(tab, event) {
155
     handleTabClick(tab, event) {
160
        getCheckDetail(id).then(response=>{
162
        getCheckDetail(id).then(response=>{
161
          if(response.data.state == 1){
163
          if(response.data.state == 1){
162
            var checkdetail = response.data.data.checkdetail
164
            var checkdetail = response.data.data.checkdetail
163
-           console.log("checkdetail",checkdetail)
165
+          // console.log("checkdetail",checkdetail)
164
            this.editform.id = checkdetail.id
166
            this.editform.id = checkdetail.id
165
            this.editform.inspectionMajor = checkdetail.inspection_major
167
            this.editform.inspectionMajor = checkdetail.inspection_major
166
            this.editform.frequency = checkdetail.inspection_frequency
168
            this.editform.frequency = checkdetail.inspection_frequency
193
                 this.form.inspectionMajor = ""
195
                 this.form.inspectionMajor = ""
194
                 this.form.frequency = ""
196
                 this.form.frequency = ""
195
                 this.form.sort = ""
197
                 this.form.sort = ""
198
+                this.getAllCheckList()
199
+                this.getLastCheckList()
196
               }else{
200
               }else{
197
                 this.$message.error("检验检查项已存在,不能重复添加")
201
                 this.$message.error("检验检查项已存在,不能重复添加")
198
               }
202
               }
203
+              
199
            })
204
            })
200
          }
205
          }
201
        })
206
        })
217
               checklist[i].sort = ""
222
               checklist[i].sort = ""
218
             }
223
             }
219
           }
224
           }
220
-          console.log("列表",checklist)
225
+         // console.log("列表",checklist)
221
           this.checkList = checklist
226
           this.checkList = checklist
222
           this.total = response.data.data.total
227
           this.total = response.data.data.total
223
-          console.log("total",this.total)
228
+          //console.log("total",this.total)
224
         }
229
         }
225
       })
230
       })
226
     },
231
     },
264
         DeleteCheck(id,index).then(response => {
269
         DeleteCheck(id,index).then(response => {
265
           if (response.data.state === 1) {
270
           if (response.data.state === 1) {
266
            var msg =  response.data.data.msg
271
            var msg =  response.data.data.msg
267
-           console.log("msg",msg)
272
+           //console.log("msg",msg)
268
            this.checkList.splice(index,1)
273
            this.checkList.splice(index,1)
269
           }
274
           }
270
         });
275
         });
271
       });
276
       });
277
+    },
278
+    getLastCheckList(){
279
+      getLastCheckList().then(response=>{
280
+         if(response.data.state === 1){
281
+          var checklist =  response.data.data.checkList
282
+          this.form.sort = checklist.sort+1+""
283
+         }
284
+      })
272
     }
285
     }
273
   },
286
   },
274
   components: {
287
   components: {

+ 24 - 11
src/xt_pages/qcd/statisticalConfiguration.vue View File

140
 import PieChart from "../qcd/components/BarChart";
140
 import PieChart from "../qcd/components/BarChart";
141
 import { uParseTime } from "@/utils/tools";
141
 import { uParseTime } from "@/utils/tools";
142
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
142
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
143
-import { getInspectionMajor,getInspectionMinor,getInspectionRange,saveConfiguration,getConfigurationList,getConfigurationDetail,getAllInspectionMinor,UpdateConfiguration,DeleteConfiguration }from "@/api/common/common";
143
+import { getInspectionMajor,getInspectionMinor,getInspectionRange,saveConfiguration,getConfigurationList,getConfigurationDetail,getAllInspectionMinor,UpdateConfiguration,DeleteConfiguration,getLastSort }from "@/api/common/common";
144
 export default {
144
 export default {
145
   name: "dialysisTotal",
145
   name: "dialysisTotal",
146
   data() {
146
   data() {
196
       getConfigurationDetail(id).then(response=>{
196
       getConfigurationDetail(id).then(response=>{
197
          if(response.data.state == 1){
197
          if(response.data.state == 1){
198
            var configurationdetail = response.data.data.configurationdetail
198
            var configurationdetail = response.data.data.configurationdetail
199
-           console.log("详情",configurationdetail)
199
+          // console.log("详情",configurationdetail)
200
            this.editform.id = configurationdetail.id
200
            this.editform.id = configurationdetail.id
201
            this.editform.inspectionMajor = configurationdetail.inspection_major
201
            this.editform.inspectionMajor = configurationdetail.inspection_major
202
            this.editform.inspectionMinor = configurationdetail.inspection_minor
202
            this.editform.inspectionMinor = configurationdetail.inspection_minor
216
       getInspectionMajor().then(response=>{
216
       getInspectionMajor().then(response=>{
217
         if(response.data.state == 1){
217
         if(response.data.state == 1){
218
           var inspection =  response.data.data.inspection
218
           var inspection =  response.data.data.inspection
219
-          console.log("大项",inspection)
219
+          //console.log("大项",inspection)
220
           this.InspectionMajor = inspection
220
           this.InspectionMajor = inspection
221
          
221
          
222
         }
222
         }
227
       getInspectionMinor(id).then(response=>{
227
       getInspectionMinor(id).then(response=>{
228
         if(response.data.state == 1){
228
         if(response.data.state == 1){
229
          var inspection =  response.data.data.inspection
229
          var inspection =  response.data.data.inspection
230
-         console.log("小项",inspection)
230
+        // console.log("小项",inspection)
231
          this.InspectionMinor = inspection
231
          this.InspectionMinor = inspection
232
         }
232
         }
233
       })
233
       })
237
        getInspectionMinor(id).then(response=>{
237
        getInspectionMinor(id).then(response=>{
238
         if(response.data.state == 1){
238
         if(response.data.state == 1){
239
          var inspection =  response.data.data.inspection
239
          var inspection =  response.data.data.inspection
240
-         console.log("小项",inspection)
240
+        // console.log("小项",inspection)
241
          this.InspectionMinorTwo = inspection
241
          this.InspectionMinorTwo = inspection
242
         }
242
         }
243
       })
243
       })
247
        getInspectionRange(id).then(response=>{
247
        getInspectionRange(id).then(response=>{
248
          if(response.data.state == 1){
248
          if(response.data.state == 1){
249
            var inspectionRange =  response.data.data.inspectionRange
249
            var inspectionRange =  response.data.data.inspectionRange
250
-           console.log("inspectionRange",inspectionRange)
250
+          // console.log("inspectionRange",inspectionRange)
251
            this.form.min_range = inspectionRange.range_min
251
            this.form.min_range = inspectionRange.range_min
252
            this.form.large_range = inspectionRange.range_max
252
            this.form.large_range = inspectionRange.range_max
253
          }
253
          }
254
       })
254
       })
255
     },
255
     },
256
     saveInspection(formName){
256
     saveInspection(formName){
257
+      
257
       this.$refs[formName].validate(valid=>{
258
       this.$refs[formName].validate(valid=>{
258
         if(valid){
259
         if(valid){
259
           saveConfiguration(this.form).then(response=>{
260
           saveConfiguration(this.form).then(response=>{
267
              this.form.min_range = ""
268
              this.form.min_range = ""
268
              this.form.sort = ""
269
              this.form.sort = ""
269
              this.getConfigurationList()
270
              this.getConfigurationList()
271
+             this.getLastSort()
270
             }else{
272
             }else{
271
              this.$message.error("检查小项已存在")
273
              this.$message.error("检查小项已存在")
272
             }
274
             }
291
               configurationlist[i].sort = ""
293
               configurationlist[i].sort = ""
292
             }
294
             }
293
           }
295
           }
294
-          console.log("列表",configurationlist)
296
+          //console.log("列表",configurationlist)
295
           this.configuraData = configurationlist
297
           this.configuraData = configurationlist
296
           var total = response.data.data.total
298
           var total = response.data.data.total
297
-          console.log("total",total)
299
+         // console.log("total",total)
298
           this.total = total
300
           this.total = total
299
         }
301
         }
300
       })
302
       })
305
         if(response.data.state == 1){
307
         if(response.data.state == 1){
306
           var minor =  response.data.data.minor
308
           var minor =  response.data.data.minor
307
           this.InspectionMinorTwo = minor
309
           this.InspectionMinorTwo = minor
308
-          console.log("minor",minor)
310
+          //console.log("minor",minor)
309
         }
311
         }
310
       })
312
       })
311
     },
313
     },
322
       UpdateConfiguration(this.editform.id,this.editform).then(response=>{
324
       UpdateConfiguration(this.editform.id,this.editform).then(response=>{
323
         if(response.data.state == 1){
325
         if(response.data.state == 1){
324
          var standard =  response.data.data.standard
326
          var standard =  response.data.data.standard
325
-         console.log("standard",standard)
327
+        // console.log("standard",standard)
326
          this.$message.success("保存成功")
328
          this.$message.success("保存成功")
327
          this.editDialog = false
329
          this.editDialog = false
328
          this.getConfigurationList()
330
          this.getConfigurationList()
345
         DeleteConfiguration(id,index).then(response => {
347
         DeleteConfiguration(id,index).then(response => {
346
           if (response.data.state === 1) {
348
           if (response.data.state === 1) {
347
            var msg =  response.data.data.msg
349
            var msg =  response.data.data.msg
348
-           console.log("msg",msg)
350
+          // console.log("msg",msg)
349
            this.configuraData.splice(index,1)
351
            this.configuraData.splice(index,1)
350
           }
352
           }
351
         });
353
         });
352
       });
354
       });
353
     },
355
     },
356
+    getLastSort(){
357
+      getLastSort().then(response=>{
358
+        if(response.data.state === 1){
359
+          var standard = response.data.data.standard
360
+         // console.log("standard",standard)
361
+          this.form.sort = standard.sort + 1+''
362
+        }
363
+      })
364
+    },
354
   },
365
   },
355
   components: {
366
   components: {
356
     PieChart,
367
     PieChart,
363
     this.getConfigurationList()
374
     this.getConfigurationList()
364
     //获取所有小项的数据
375
     //获取所有小项的数据
365
     this.getAllInspectionMinor()
376
     this.getAllInspectionMinor()
377
+    //获取排序值
378
+    this.getLastSort()
366
    },
379
    },
367
 
380
 
368
 };
381
 };

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

54
           <el-table-column fixed prop="name" label="姓名" width="140">
54
           <el-table-column fixed prop="name" label="姓名" width="140">
55
             <!-- <template slot-scope="scope">{{ scope.row.name }}</template> -->
55
             <!-- <template slot-scope="scope">{{ scope.row.name }}</template> -->
56
           </el-table-column>
56
           </el-table-column>
57
-          <el-table-column prop="age" label="年龄" width="140">
58
-             <!-- <template slot-scope="scope">{{ scope.row.id_card_no }}</template> -->
57
+          <el-table-column  label="年龄" width="140">
58
+             <template slot-scope="scope">{{ getAge(scope.row.id_card_no) }}</template>
59
           </el-table-column>
59
           </el-table-column>
60
           <el-table-column prop="dialysis_no" label="透析号" width="140">
60
           <el-table-column prop="dialysis_no" label="透析号" width="140">
61
               <!-- <template slot-scope="scope">{{ scope.row.dialysis_no }}</template> -->
61
               <!-- <template slot-scope="scope">{{ scope.row.dialysis_no }}</template> -->
62
           </el-table-column>
62
           </el-table-column>
63
           <el-table-column prop="mode_id" label="透析模式">
63
           <el-table-column prop="mode_id" label="透析模式">
64
               <template slot-scope="scope">
64
               <template slot-scope="scope">
65
-                <span>{{ scope.row.mode_id.join("、") }}</span>
65
+                <!--<span>{{ scope.row.mode_id.join("、") }}</span>-->
66
+                <span>{{scope.row.patient_id}}</span>
66
               </template>
67
               </template>
67
            </el-table-column>
68
            </el-table-column>
68
-          <el-table-column prop="address" label="透析总次数" width="140"></el-table-column>
69
+          <el-table-column prop="address" label="透析总次数" width="140">
70
+            <template slot-scope="scope">
71
+                <span>{{ scope.row.total_dialysis + scope.row.user_sys_before_count }}</span>
72
+              </template>
73
+          </el-table-column>
69
         </el-table>
74
         </el-table>
70
 
75
 
71
         <el-pagination
76
         <el-pagination
104
       tableData: [],
109
       tableData: [],
105
       DialysisData: [],
110
       DialysisData: [],
106
       patientsData:[],
111
       patientsData:[],
112
+      prescriptionList:[],
107
     };
113
     };
108
   },
114
   },
109
   methods: {
115
   methods: {
181
               if(dialysislist[i].mode_id == 13){
187
               if(dialysislist[i].mode_id == 13){
182
                 dialysislist[i].mode_id = "CRRT"
188
                 dialysislist[i].mode_id = "CRRT"
183
               }
189
               }
184
-                if(dialysislist[i].mode_id == 14){
190
+             if(dialysislist[i].mode_id == 14){
185
                 dialysislist[i].mode_id = "腹水回输"
191
                 dialysislist[i].mode_id = "腹水回输"
186
               }
192
               }
187
               if(dialysislist[i].mode_id == 19){
193
               if(dialysislist[i].mode_id == 19){
199
                 patient_id: patient_id,
205
                 patient_id: patient_id,
200
                 dialysis_no: item.dialysis_no,
206
                 dialysis_no: item.dialysis_no,
201
                 name:item.name,
207
                 name:item.name,
202
-                age:item.id_card_no
208
+                age:item.id_card_no,
209
+                total_dialysis:item.total_dialysis,
210
+                user_sys_before_count:item.user_sys_before_count,
203
             })
211
             })
204
            });
212
            });
205
            res.map(item => {
213
            res.map(item => {
206
              item.age = this.getAge(item.age)
214
              item.age = this.getAge(item.age)
207
            })
215
            })
208
            console.log(res)
216
            console.log(res)
209
-           this.DialysisData = res
217
+           //this.DialysisData = res
210
  
218
  
211
             var total = response.data.data.total
219
             var total = response.data.data.total
212
-            console.log("total",total)
213
-            this.total = total
220
+            console.log("total",total) 
221
+           // this.total = total
222
+            
223
+            var list = response.data.data.list
224
+             for(let i=0;i<list.length;i++){
225
+              if(list[i].mode_id == 1){
226
+                list[i].mode_id = "HD"
227
+              }
228
+               if(list[i].mode_id == 2){
229
+                list[i].mode_id = "HDF"
230
+              }
231
+               if(list[i].mode_id == 3){
232
+                list[i].mode_id = "HD+HP"
233
+              }
234
+               if(list[i].mode_id == 4){
235
+                list[i].mode_id = "HP"
236
+              }
237
+               if(list[i].mode_id == 5){
238
+                list[i].mode_id = "HF"
239
+              }
240
+               if(list[i].mode_id == 6){
241
+                list[i].mode_id = "SCUF"
242
+              }
243
+               if(list[i].mode_id == 7){
244
+                list[i].mode_id = "IUF"
245
+              }
246
+               if(list[i].mode_id == 8){
247
+                list[i].mode_id = "HFHD"
248
+              }
249
+               if(list[i].mode_id == 9){
250
+                list[i].mode_id = "HFHD+HP"
251
+              }
252
+               if(list[i].mode_id == 10){
253
+                list[i].mode_id = "PHF"
254
+              }
255
+               if(list[i].mode_id == 11){
256
+                list[i].mode_id = "HFR"
257
+              }
258
+              if(list[i].mode_id == 12){
259
+                list[i].mode_id = "HDF+HP"
260
+              }
261
+              if(list[i].mode_id == 13){
262
+                list[i].mode_id = "CRRT"
263
+              }
264
+             if(list[i].mode_id == 14){
265
+                list[i].mode_id = "腹水回输"
266
+              }
267
+              if(list[i].mode_id == 19){
268
+                list[i].mode_id = "IUF+HD"
269
+              }
270
+           }
271
+            console.log("list",list)
272
+            
273
+            var totallist  =  response.data.data.totallist
274
+             console.log("totallist",totallist)
275
+            this.total = totallist  
276
+            var prescriptionList = response.data.data.prescriptionList
277
+            
278
+            console.log("prescriptionList",prescriptionList)
279
+            for(let i=0;i<this.prescriptionList.length;i++){
280
+             for(let j=0;j<list.length;j++){
281
+               if(this.prescriptionList[i].patient_id == list[j].patient_id){
282
+                  arr.push(this.prescriptionList[i])
283
+               }
284
+             }
285
+            }
286
+             let dataInfo = {}
287
+              list.forEach((item, index) => {
288
+                let { patient_id } = item
289
+                if (!dataInfo[patient_id]) {
290
+                  dataInfo[patient_id] = {
291
+                    patient_id,
292
+                    name:item.name,
293
+                    id_card_no:item.id_card_no,
294
+                    dialysis_no:item.dialysis_no,
295
+                    total_dialysis:item.total_dialysis,
296
+                    user_sys_before_count:item.user_sys_before_count,
297
+                    child: []
298
+                  }
299
+                }
300
+              })
301
+             let list = Object.values(dataInfo)
302
+            console.log("arr",list)    
303
+            list.map(item => {
304
+              for (let i = 0; i < prescriptionList.length; i++) {
305
+                if (
306
+                  item.patient_id === prescriptionList[i].patient_id
307
+                ) {
308
+                  item.child.push(prescriptionList[i])
309
+                }
310
+              }
311
+            })
312
+            console.log("list---",list)
313
+            this.DialysisData = list
214
          }
314
          }
215
       })
315
       })
216
     },
316
     },
227
 				return age;
327
 				return age;
228
 			}
328
 			}
229
     },
329
     },
230
-    onSearch(){}
330
+    onSearch(){},
331
+    unique(arr) {
332
+        const res = new Map();
333
+        return arr.filter((arr) => !res.has(arr.mode_id) && res.set(arr.mode_id, 1));
334
+      },
231
   },
335
   },
232
   created(){
336
   created(){
233
     var nowDate = new Date();
337
     var nowDate = new Date();

+ 2 - 2
src/xt_pages/user/patients.vue View File

1102
 
1102
 
1103
       },
1103
       },
1104
       getCount(row) {
1104
       getCount(row) {
1105
-        console.log(row)
1105
+        
1106
         return row.total_dialysis + row.user_sys_before_count
1106
         return row.total_dialysis + row.user_sys_before_count
1107
       },
1107
       },
1108
       EditLapseto() {
1108
       EditLapseto() {
1239
             return false
1239
             return false
1240
           } else {
1240
           } else {
1241
             this.tableData = response.data.data.patients
1241
             this.tableData = response.data.data.patients
1242
-            // console.log('病人是', this.tableData)
1242
+             console.log('病人是', this.tableData)
1243
             this.pageTotal = this.tableData.length
1243
             this.pageTotal = this.tableData.length
1244
             this.total = response.data.data.total
1244
             this.total = response.data.data.total
1245
           }
1245
           }