Browse Source

统计配置开发

XMLWAN 4 years ago
parent
commit
9190565f54

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

241
     params: params
241
     params: params
242
   })
242
   })
243
 }
243
 }
244
+
245
+export function getDialysisDetailById(id, startime, endtime, limit, page) {
246
+  const params = {
247
+    id: id,
248
+    startime: startime,
249
+    endtime: endtime,
250
+    limit: limit,
251
+    page: page
252
+  }
253
+  return request({
254
+    url: '/com/api/getdialysisdetailbyid',
255
+    method: 'get',
256
+    params: params
257
+  })
258
+}

+ 20 - 3
src/xt_pages/qcd/treatmentControlAnalysis/components/TimePersonal.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="patientsData" border style="width: 100%;" height="500">
42
+        <el-table :data="patientsData" border style="width: 100%;" 
43
+            height="500" 
44
+            highlight-current-row
45
+            @current-change="handleChange">
43
           <el-table-column prop="dialysis_no" label="透析号" width="80" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
46
           <el-table-column prop="dialysis_no" label="透析号" width="80" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
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>
92
 
95
 
93
 
96
 
94
 <script>
97
 <script>
95
- import { getCurrentOrgPatients,getDialysisList } from "@/api/common/common";
98
+ import { getCurrentOrgPatients,getDialysisList,getDialysisDetailById } from "@/api/common/common";
96
  import { uParseTime } from "@/utils/tools";
99
  import { uParseTime } from "@/utils/tools";
97
 export default {
100
 export default {
98
   data() {
101
   data() {
110
       DialysisData: [],
113
       DialysisData: [],
111
       patientsData:[],
114
       patientsData:[],
112
       prescriptionList:[],
115
       prescriptionList:[],
116
+      limit:1000,
117
+      page:1,
113
     };
118
     };
114
   },
119
   },
115
   methods: {
120
   methods: {
331
     unique(arr) {
336
     unique(arr) {
332
         const res = new Map();
337
         const res = new Map();
333
         return arr.filter((arr) => !res.has(arr.mode_id) && res.set(arr.mode_id, 1));
338
         return arr.filter((arr) => !res.has(arr.mode_id) && res.set(arr.mode_id, 1));
334
-      },
339
+    },
340
+    //获取每个病人的数据
341
+    handleChange(val){
342
+       console.log("val---",val)
343
+       getDialysisDetailById(val.patient_id,this.listQuery.start_time,this.listQuery.end_time,this.limit,this.page).then(response=>{
344
+          if(response.data.state === 1){
345
+            var patients =  response.data.data.patients
346
+            console.log("patients",patients)
347
+            var total = response.data.data.total
348
+            console.log("total",total)
349
+          }
350
+       })
351
+    }
335
   },
352
   },
336
   created(){
353
   created(){
337
     var nowDate = new Date();
354
     var nowDate = new Date();