Explorar el Código

统计配置开发

XMLWAN hace 4 años
padre
commit
3faf8681eb

+ 15 - 0
src/api/common/common.js Ver fichero

256
     params: params
256
     params: params
257
   })
257
   })
258
 }
258
 }
259
+
260
+export function getPrescriptionByName(keyword, startime, endtime, limit, page) {
261
+  const params = {
262
+    keyword: keyword,
263
+    startime: startime,
264
+    endtime: endtime,
265
+    limit: limit,
266
+    page: page
267
+  }
268
+  return request({
269
+    url: '/com/api/getprescriptionbyname',
270
+    method: 'Get',
271
+    params: params
272
+  })
273
+}

+ 47 - 10
src/xt_pages/qcd/treatmentControlAnalysis/components/TimePersonal.vue Ver fichero

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="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
42
+        <el-table :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
43
+         :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
44
+          highlight-current-row
45
+          @current-change="handleChange">
43
           <el-table-column prop="dialysis_no" label="透析号" width="80">
46
           <el-table-column prop="dialysis_no" label="透析号" width="80">
44
             <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
47
             <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
45
           </el-table-column>
48
           </el-table-column>
50
       </div>
53
       </div>
51
       <div style="padding-left:10px;flex:1">
54
       <div style="padding-left:10px;flex:1">
52
         <div class="tableTitle">统计表</div>
55
         <div class="tableTitle">统计表</div>
53
-        <el-table :data="DialysisData" style="width: 100%" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
56
+        <el-table :data="DialysisData" style="width: 100%" border :row-style="{ color: '#303133' }" 
57
+        :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
58
+        >
54
           <el-table-column fixed prop="name" label="姓名" width="140">
59
           <el-table-column fixed prop="name" label="姓名" width="140">
55
             <!-- <template slot-scope="scope">{{ scope.row.name }}</template> -->
60
             <!-- <template slot-scope="scope">{{ scope.row.name }}</template> -->
56
           </el-table-column>
61
           </el-table-column>
91
 
96
 
92
 
97
 
93
 <script>
98
 <script>
94
- import { getCurrentOrgPatients,getDialysisList } from "@/api/common/common";
99
+ import { getCurrentOrgPatients,getDialysisList,getDialysisDetailById,getPrescriptionByName } from "@/api/common/common";
95
  import { uParseTime } from "@/utils/tools";
100
  import { uParseTime } from "@/utils/tools";
96
 export default {
101
 export default {
97
   data() {
102
   data() {
109
       DialysisData: [],
114
       DialysisData: [],
110
       patientsData:[],
115
       patientsData:[],
111
       prescriptionList:[],
116
       prescriptionList:[],
117
+      limit:1000,
118
+      page:1,
112
     };
119
     };
113
   },
120
   },
114
   methods: {
121
   methods: {
126
       getCurrentOrgPatients().then(response=>{
133
       getCurrentOrgPatients().then(response=>{
127
          if(response.data.state == 1){
134
          if(response.data.state == 1){
128
            var patients = response.data.data.patients
135
            var patients = response.data.data.patients
129
-           console.log("病人列表3",patients)
130
            this.patientsData = patients
136
            this.patientsData = patients
131
          }
137
          }
132
       })
138
       })
221
 
227
 
222
             
228
             
223
           var list = response.data.data.list
229
           var list = response.data.data.list
224
-          console.log("list",list)
230
+          //console.log("list",list)
225
           var totallist  =  response.data.data.totallist
231
           var totallist  =  response.data.data.totallist
226
-          console.log("totallist",totallist)
232
+         // console.log("totallist",totallist)
227
           this.total = totallist  
233
           this.total = totallist  
228
           var prescriptionList = response.data.data.prescriptionList
234
           var prescriptionList = response.data.data.prescriptionList
229
           for(let i=0;i<prescriptionList.length;i++){
235
           for(let i=0;i<prescriptionList.length;i++){
255
               prescriptionList[i].mode_id = "CRRT"
261
               prescriptionList[i].mode_id = "CRRT"
256
             }else if(prescriptionList[i].mode_id == 14){
262
             }else if(prescriptionList[i].mode_id == 14){
257
               prescriptionList[i].mode_id = "腹水回输"
263
               prescriptionList[i].mode_id = "腹水回输"
264
+            }else if(prescriptionList[i].mode_id == 15){
265
+               prescriptionList[i].mode_id = "HD前置换"
266
+            }
267
+            else if(prescriptionList[i].mode_id == 16){
268
+               prescriptionList[i].mode_id = "HD后置换"
269
+            }
270
+            else if(prescriptionList[i].mode_id == 17){
271
+               prescriptionList[i].mode_id = "HDF前置换"
272
+            }
273
+            else if(prescriptionList[i].mode_id == 18){
274
+               prescriptionList[i].mode_id = "HDF后置换"
258
             }else if(prescriptionList[i].mode_id == 19){
275
             }else if(prescriptionList[i].mode_id == 19){
259
               prescriptionList[i].mode_id = "IUF+HD"
276
               prescriptionList[i].mode_id = "IUF+HD"
260
             }
277
             }
261
           }
278
           }
262
           
279
           
263
-          console.log("prescriptionList",prescriptionList)
280
+         // console.log("prescriptionList",prescriptionList)
264
           for(let i=0;i<this.prescriptionList.length;i++){
281
           for(let i=0;i<this.prescriptionList.length;i++){
265
             for(let j=0;j<list.length;j++){
282
             for(let j=0;j<list.length;j++){
266
               if(this.prescriptionList[i].patient_id == list[j].patient_id){
283
               if(this.prescriptionList[i].patient_id == list[j].patient_id){
284
             }
301
             }
285
           })
302
           })
286
           let list = Object.values(dataInfo)
303
           let list = Object.values(dataInfo)
287
-          console.log("arr",list)    
304
+          //console.log("arr",list)    
288
           list.map(item => {
305
           list.map(item => {
289
             for (let i = 0; i < prescriptionList.length; i++) {
306
             for (let i = 0; i < prescriptionList.length; i++) {
290
               if (item.patient_id === prescriptionList[i].patient_id) {
307
               if (item.patient_id === prescriptionList[i].patient_id) {
292
               }
309
               }
293
             }
310
             }
294
           })
311
           })
295
-          console.log("list---",list)
312
+        //  console.log("list---",list)
296
           this.DialysisData = list
313
           this.DialysisData = list
297
          }
314
          }
298
       })
315
       })
310
 				return age;
327
 				return age;
311
 			}
328
 			}
312
     },
329
     },
313
-    onSearch(){},
330
+    onSearch(){
331
+      getPrescriptionByName(this.listQuery.search,this.listQuery.start_time,this.listQuery.end_time,this.limit,this.page).then(response=>{
332
+         if(response.data.state === 1){
333
+           var patient =  response.data.data.patient
334
+           console.log("patient",patient)
335
+           var total = response.data.data.total
336
+           console.log("total",total)
337
+         }
338
+      })
339
+    },
314
     unique(arr) {
340
     unique(arr) {
315
         const res = new Map();
341
         const res = new Map();
316
         return arr.filter((arr) => !res.has(arr.mode_id) && res.set(arr.mode_id, 1));
342
         return arr.filter((arr) => !res.has(arr.mode_id) && res.set(arr.mode_id, 1));
317
       },
343
       },
344
+    handleChange(val){
345
+       getDialysisDetailById(val.id,this.listQuery.start_time,this.listQuery.end_time,this.limit,this.page).then(response=>{
346
+          if(response.data.state === 1){
347
+            var patients =  response.data.data.patients
348
+            console.log("patients",patients)
349
+            var total =  response.data.data.total
350
+            console.log("total",total)
351
+          }
352
+       })
353
+     
354
+    }
318
   },
355
   },
319
   created(){
356
   created(){
320
     var nowDate = new Date();
357
     var nowDate = new Date();