Ver código fonte

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

See999 4 anos atrás
pai
commit
1b2eaac412

+ 16 - 2
src/api/common/common.js Ver arquivo

@@ -213,8 +213,6 @@ export function getCurrentOrgPatients(params) {
213 213
 }
214 214
 
215 215
 export function getDialysisList(startime, endtime, page, limit) {
216
-  console.log('startime', startime)
217
-  console.log('endtime', endtime)
218 216
   const params = {
219 217
     startime: startime,
220 218
     endtime: endtime,
@@ -227,3 +225,19 @@ export function getDialysisList(startime, endtime, page, limit) {
227 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 Ver arquivo

@@ -108,7 +108,7 @@ import { GetOICData } from "@/api/qcd";
108 108
 import PieChart from "../qcd/components/BarChart";
109 109
 import { uParseTime } from "@/utils/tools";
110 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 112
 export default {
113 113
   name: "dialysisTotal",
114 114
   data() {
@@ -147,7 +147,9 @@ export default {
147 147
   created() {
148 148
     //获取大项
149 149
     this.getAllInspectionData(),
150
-    this.getAllCheckList()
150
+    this.getAllCheckList(),
151
+    //获取排序
152
+    this.getLastCheckList()
151 153
   },
152 154
   methods: {
153 155
     handleTabClick(tab, event) {
@@ -160,7 +162,7 @@ export default {
160 162
        getCheckDetail(id).then(response=>{
161 163
          if(response.data.state == 1){
162 164
            var checkdetail = response.data.data.checkdetail
163
-           console.log("checkdetail",checkdetail)
165
+          // console.log("checkdetail",checkdetail)
164 166
            this.editform.id = checkdetail.id
165 167
            this.editform.inspectionMajor = checkdetail.inspection_major
166 168
            this.editform.frequency = checkdetail.inspection_frequency
@@ -193,9 +195,12 @@ export default {
193 195
                 this.form.inspectionMajor = ""
194 196
                 this.form.frequency = ""
195 197
                 this.form.sort = ""
198
+                this.getAllCheckList()
199
+                this.getLastCheckList()
196 200
               }else{
197 201
                 this.$message.error("检验检查项已存在,不能重复添加")
198 202
               }
203
+              
199 204
            })
200 205
          }
201 206
        })
@@ -217,10 +222,10 @@ export default {
217 222
               checklist[i].sort = ""
218 223
             }
219 224
           }
220
-          console.log("列表",checklist)
225
+         // console.log("列表",checklist)
221 226
           this.checkList = checklist
222 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,11 +269,19 @@ export default {
264 269
         DeleteCheck(id,index).then(response => {
265 270
           if (response.data.state === 1) {
266 271
            var msg =  response.data.data.msg
267
-           console.log("msg",msg)
272
+           //console.log("msg",msg)
268 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 287
   components: {

+ 24 - 11
src/xt_pages/qcd/statisticalConfiguration.vue Ver arquivo

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

+ 114 - 10
src/xt_pages/qcd/treatmentControlAnalysis/components/TimePersonal.vue Ver arquivo

@@ -54,18 +54,23 @@
54 54
           <el-table-column fixed prop="name" label="姓名" width="140">
55 55
             <!-- <template slot-scope="scope">{{ scope.row.name }}</template> -->
56 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 59
           </el-table-column>
60 60
           <el-table-column prop="dialysis_no" label="透析号" width="140">
61 61
               <!-- <template slot-scope="scope">{{ scope.row.dialysis_no }}</template> -->
62 62
           </el-table-column>
63 63
           <el-table-column prop="mode_id" label="透析模式">
64 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 67
               </template>
67 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 74
         </el-table>
70 75
 
71 76
         <el-pagination
@@ -104,6 +109,7 @@ export default {
104 109
       tableData: [],
105 110
       DialysisData: [],
106 111
       patientsData:[],
112
+      prescriptionList:[],
107 113
     };
108 114
   },
109 115
   methods: {
@@ -181,7 +187,7 @@ export default {
181 187
               if(dialysislist[i].mode_id == 13){
182 188
                 dialysislist[i].mode_id = "CRRT"
183 189
               }
184
-                if(dialysislist[i].mode_id == 14){
190
+             if(dialysislist[i].mode_id == 14){
185 191
                 dialysislist[i].mode_id = "腹水回输"
186 192
               }
187 193
               if(dialysislist[i].mode_id == 19){
@@ -199,18 +205,112 @@ export default {
199 205
                 patient_id: patient_id,
200 206
                 dialysis_no: item.dialysis_no,
201 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 213
            res.map(item => {
206 214
              item.age = this.getAge(item.age)
207 215
            })
208 216
            console.log(res)
209
-           this.DialysisData = res
217
+           //this.DialysisData = res
210 218
  
211 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,7 +327,11 @@ export default {
227 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 336
   created(){
233 337
     var nowDate = new Date();

+ 2 - 2
src/xt_pages/user/patients.vue Ver arquivo

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