瀏覽代碼

统计配置开发

XMLWAN 4 年之前
父節點
當前提交
502ae482ae

+ 19 - 11
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckPersonal.vue 查看文件

7
           <el-button type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button>
7
           <el-button type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button>
8
         </el-form-item>
8
         </el-form-item>
9
       </el-form>
9
       </el-form>
10
-      <el-select v-model="value" placeholder="请选择" style="width:120px;margin-right:20px">
11
-        <el-option
12
-          v-for="item in options"
13
-          :key="item.value"
14
-          :label="item.label"
15
-          :value="item.value"
16
-        ></el-option>
17
-      </el-select>
18
       <label class="title">
10
       <label class="title">
19
         <span class="name">日期查询</span> :
11
         <span class="name">日期查询</span> :
20
       </label>
12
       </label>
47
     <el-container>
39
     <el-container>
48
       <div style="width:150px">
40
       <div style="width:150px">
49
         <div class="tableTitle">患者列表</div>
41
         <div class="tableTitle">患者列表</div>
50
-        <el-table :data="tableData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
51
-          <el-table-column prop="date" label="日期" width="70"></el-table-column>
52
-          <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>
53
         </el-table>
49
         </el-table>
54
       </div>
50
       </div>
55
       <div style="padding-left:10px;flex:1">
51
       <div style="padding-left:10px;flex:1">
66
 <script>
62
 <script>
67
 import echarts from "echarts";
63
 import echarts from "echarts";
68
 import LineChart from "../../components/LineChart";
64
 import LineChart from "../../components/LineChart";
65
+import { getCurrentOrgPatients } from "@/api/common/common";
69
 export default {
66
 export default {
70
   components: {
67
   components: {
71
     LineChart
68
     LineChart
151
           name: "王小虎"
148
           name: "王小虎"
152
         }
149
         }
153
       ],
150
       ],
151
+      patientsData:[],
154
       chart: {
152
       chart: {
155
         title: {
153
         title: {
156
           text: "ECharts 入门示例"
154
           text: "ECharts 入门示例"
249
         this.listQuery.end_time = "";
247
         this.listQuery.end_time = "";
250
       } else {
248
       } else {
251
       }
249
       }
250
+    },
251
+    getCurrentOrgPatients(){
252
+      getCurrentOrgPatients().then(response=>{
253
+         var patients = response.data.data.patients
254
+         this.patientsData = patients
255
+      })
252
     }
256
     }
257
+  },
258
+  created(){
259
+   //获取该机构下的所有患者
260
+     this.getCurrentOrgPatients()
253
   }
261
   }
254
 };
262
 };
255
 </script>
263
 </script>

+ 81 - 7
src/xt_pages/qcd/treatmentControlAnalysis/components/TimeAll.vue 查看文件

98
     </div>
98
     </div>
99
   </div>
99
   </div>
100
 </template>
100
 </template>
101
-  
101
+
102
 <script>
102
 <script>
103
 import echarts from "echarts";
103
 import echarts from "echarts";
104
 import LineChart from "../../components/LineChart";
104
 import LineChart from "../../components/LineChart";
210
     };
210
     };
211
   },
211
   },
212
   methods: {
212
   methods: {
213
-    changeTime() {},
213
+    changeTime(val) {
214
+      var time = this.getTimestamp(val) - this.getTimestamp(this.listQuery.end_time);
215
+      if (time > 0) {
216
+        this.$message.error("结束时间不能小于开始时间");
217
+        this.listQuery.start_time = "";
218
+      } else {
219
+        this.geStatistics()
220
+      }
221
+
222
+    },
214
     changeEndTime(val) {
223
     changeEndTime(val) {
215
       var time =
224
       var time =
216
         this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
225
         this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
218
         this.$message.error("结束时间不能小于开始时间");
227
         this.$message.error("结束时间不能小于开始时间");
219
         this.listQuery.end_time = "";
228
         this.listQuery.end_time = "";
220
       } else {
229
       } else {
230
+        this.geStatistics()
221
       }
231
       }
222
     },
232
     },
233
+    getTimestamp(time) {
234
+      // 把时间日期转成时间戳
235
+      return new Date(time).getTime() / 1000;
236
+    },
223
     handleSizeChange(limit) {
237
     handleSizeChange(limit) {
224
       this.listQuery.limit = limit;
238
       this.listQuery.limit = limit;
225
       this.geStatistics();
239
       this.geStatistics();
236
       geStatistics(this.listQuery).then(response=>{
250
       geStatistics(this.listQuery).then(response=>{
237
         if(response.data.state === 1){
251
         if(response.data.state === 1){
238
           var dtd =  response.data.data.statistics
252
           var dtd =  response.data.data.statistics
239
-          console.log("statistics",dtd)
253
+         console.log("dtd",dtd)
240
             var dd = {};
254
             var dd = {};
241
           for (const index in dtd) {
255
           for (const index in dtd) {
242
             if (!(dtd[index].date in dd)) {
256
             if (!(dtd[index].date in dd)) {
272
             this.tableData.push({ date: key, data: dd[key], total: total });
286
             this.tableData.push({ date: key, data: dd[key], total: total });
273
           }
287
           }
274
           var ttd = response.data.data.ttd
288
           var ttd = response.data.data.ttd
275
-          console.log("ttd",ttd)
276
-        
289
+         console.log("ttd",ttd)
290
+         // for(let i=0;i<ttd.length;i++){
291
+         //    if(ttd[i].mode_id == "1"){
292
+         //       ttd[i].mode_id == "HD"
293
+         //    }
294
+         //     if(ttd[i].mode_id == "2"){
295
+         //       ttd[i].mode_id == "HDF"
296
+         //    }
297
+         //     if(ttd[i].mode_id == "3"){
298
+         //       ttd[i].mode_id == "HD+HP"
299
+         //    }
300
+         //     if(ttd[i].mode_id == "4"){
301
+         //       ttd[i].mode_id == "HP"
302
+         //    }
303
+         //     if(ttd[i].mode_id == "5"){
304
+         //       ttd[i].mode_id == "HF"
305
+         //    }
306
+         //     if(ttd[i].mode_id == "6"){
307
+         //       ttd[i].mode_id == "SCUF"
308
+         //    }
309
+         //     if(ttd[i].mode_id == "7"){
310
+         //       ttd[i].mode_id == "IUF"
311
+         //    }
312
+         //     if(ttd[i].mode_id == "8"){
313
+         //       ttd[i].mode_id == "HFHD"
314
+         //    }
315
+         //     if(ttd[i].mode_id == "9"){
316
+         //       ttd[i].mode_id == "HFHD+HP"
317
+         //    }
318
+         //     if(ttd[i].mode_id == "10"){
319
+         //       ttd[i].mode_id == "PHF"
320
+         //    }
321
+         //     if(ttd[i].mode_id == "11"){
322
+         //       ttd[i].mode_id == "HFR"
323
+         //    }
324
+         //     if(ttd[i].mode_id == "12"){
325
+         //       ttd[i].mode_id == "HDF+HP"
326
+         //    }
327
+         //    if(ttd[i].mode_id == "13"){
328
+         //       ttd[i].mode_id == "CRRT"
329
+         //    }
330
+         //      if(ttd[i].mode_id == "14"){
331
+         //       ttd[i].mode_id == "腹水回输"
332
+         //    }
333
+         //      if(ttd[i].mode_id == "15"){
334
+         //       ttd[i].mode_id == "HD前置换"
335
+         //    }
336
+         //      if(ttd[i].mode_id == "16"){
337
+         //       ttd[i].mode_id == "HD后置换"
338
+         //    }
339
+         //      if(ttd[i].mode_id == "17"){
340
+         //       ttd[i].mode_id == "HDF前置换"
341
+         //    }
342
+         //      if(ttd[i].mode_id == "18"){
343
+         //       ttd[i].mode_id == "HDF后置换"
344
+         //    }
345
+         //
346
+         //      if(ttd[i].mode_id == "19"){
347
+         //       ttd[i].mode_id == IUF+HD
348
+         //    }
349
+        // }
350
+
277
           this.total =  response.data.data.total
351
           this.total =  response.data.data.total
278
-         
352
+           console.log("total",this.total)
279
 
353
 
280
         }
354
         }
281
       })
355
       })
283
   },
357
   },
284
   created(){
358
   created(){
285
     this.modeOptions = this.$store.getters.treatment_mode;
359
     this.modeOptions = this.$store.getters.treatment_mode;
286
-    
360
+
287
     var nowDate = new Date();
361
     var nowDate = new Date();
288
     var nowYear = nowDate.getFullYear();
362
     var nowYear = nowDate.getFullYear();
289
     var nowMonth = nowDate.getMonth() + 1;
363
     var nowMonth = nowDate.getMonth() + 1;

+ 15 - 1
src/xt_pages/qcd/treatmentControlAnalysis/components/TimePersonal.vue 查看文件

127
     };
127
     };
128
   },
128
   },
129
   methods: {
129
   methods: {
130
-    changeTime() {},
130
+    changeTime(val) {
131
+       var time = this.getTimestamp(val) - this.getTimestamp(this.listQuery.end_time);
132
+      if (time > 0) {
133
+        this.$message.error("结束时间不能小于开始时间");
134
+        this.listQuery.start_time = "";
135
+      } else {
136
+        this.getDialysisList()
137
+      }
138
+      
139
+    },
131
     changeEndTime(val) {
140
     changeEndTime(val) {
132
       var time =
141
       var time =
133
         this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
142
         this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
135
         this.$message.error("结束时间不能小于开始时间");
144
         this.$message.error("结束时间不能小于开始时间");
136
         this.listQuery.end_time = "";
145
         this.listQuery.end_time = "";
137
       } else {
146
       } else {
147
+        this.getDialysisList()
138
       }
148
       }
139
     },
149
     },
150
+   getTimestamp(time) {
151
+      // 把时间日期转成时间戳
152
+      return new Date(time).getTime() / 1000;
153
+    },
140
     getCurrentOrgPatients(){
154
     getCurrentOrgPatients(){
141
       getCurrentOrgPatients().then(response=>{
155
       getCurrentOrgPatients().then(response=>{
142
          if(response.data.state == 1){
156
          if(response.data.state == 1){