Browse Source

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

28169 2 months ago
parent
commit
d1dc14f8ee

+ 3 - 2
src/xt_pages/Dialysisanalysis/weightblood/components/after_Blood.vue View File

@@ -230,7 +230,7 @@ import html2canvas from "html2canvas"
230 230
         const params={
231 231
           start_time:this.start_date,
232 232
           end_time:this.end_date,
233
-          statistics_type:1
233
+          statistics_type:2
234 234
         }
235 235
         Getpatinetbp(params).then(response =>{
236 236
           if(response.data.state ==1){
@@ -392,6 +392,7 @@ import html2canvas from "html2canvas"
392 392
           start_time:this.start_date,
393 393
           end_time:this.end_date,
394 394
           status_type:value,
395
+          statistics_type:2,
395 396
           page:this.currentPage,
396 397
           limit:this.limit,
397 398
         }
@@ -570,7 +571,7 @@ import html2canvas from "html2canvas"
570 571
           }else{
571 572
             var m =date.getMonth() + 1; //月
572 573
           }
573
-          if(date.getDate() + 1<10){
574
+          if(date.getDate()<10){
574 575
             var d ='0'+date.getDate(); //日
575 576
           }else{
576 577
             var d = date.getDate(); //日

+ 2 - 1
src/xt_pages/Dialysisanalysis/weightblood/components/before_Blood.vue View File

@@ -400,6 +400,7 @@ import html2canvas from "html2canvas"
400 400
           start_time:this.start_date,
401 401
           end_time:this.end_date,
402 402
           status_type:blood,
403
+          statistics_type:1,
403 404
           page:this.currentPage,
404 405
           limit:this.limit,
405 406
         }
@@ -580,7 +581,7 @@ import html2canvas from "html2canvas"
580 581
           }else{
581 582
             var m =date.getMonth() + 1; //月
582 583
           }
583
-          if(date.getDate() + 1<10){
584
+          if(date.getDate()<10){
584 585
             var d ='0'+date.getDate(); //日
585 586
           }else{
586 587
             var d = date.getDate(); //日

+ 17 - 3
src/xt_pages/Dialysisanalysis/weightblood/components/blood_table.vue View File

@@ -11,7 +11,7 @@
11 11
     <div class="app-container">
12 12
       <div class="page_patientControlAnalysis">
13 13
         <div style="display: flex;margin-bottom: 20px;">
14
-          <div style="flex: 2;display: flex;flex-wrap:wrap">
14
+          <div style="flex: 3;display: flex;flex-wrap:wrap">
15 15
             <div>
16 16
               日期:
17 17
               <el-select v-model="date_value" @change="datachange" placeholder="请选择" style="width: 100px;">
@@ -52,6 +52,18 @@
52 52
                 </el-option>
53 53
               </el-select>
54 54
             </div>
55
+            <div>
56
+              患者状态:
57
+              <el-select v-model="blood_value" placeholder="请选择" style="width: 100px;">
58
+                <el-option :key="0" label="不限" :value="0"></el-option>
59
+                <el-option
60
+                  v-for="item in blood_options"
61
+                  :key="item.value"
62
+                  :label="item.label"
63
+                  :value="item.value">
64
+                </el-option>
65
+              </el-select>
66
+            </div>
55 67
 
56 68
           </div>
57 69
           <div style="flex: 1;">
@@ -174,11 +186,12 @@ import html2canvas from "html2canvas"
174 186
         total:0,
175 187
         tableData:[],
176 188
         status_value:1,
189
+        blood_value:0,
177 190
         status_options:[{value:1,label:'达标'},{value:2,label:'不达标'}],
178 191
         date_options:[{value:1,label:'最近七天'},{value:2,label:'本周'},{value:3,label:'上周'},{value:4,label:'本月'},
179 192
                       {value:5,label:'上月'},{value:6,label:'本年'},{value:7,label:'上一年'}
180 193
         ],
181
-
194
+        blood_options:[{value:1,label:'透前血压'},{value:2,label:'透后血压'}],
182 195
         date_mode_options:[{value:1,label:'按周'},{value:2,label:'按天'},{value:3,label:'按月'},{value:4,label:'按年'}],
183 196
         source_options:[{value:1,label:'以开始透析为准'},{value:2,label:'以排班为准'}],
184 197
 
@@ -289,6 +302,7 @@ import html2canvas from "html2canvas"
289 302
       Getdialyzerdetail(value){
290 303
         const params={
291 304
           status_type:value,
305
+          statistics_type:this.blood_value,
292 306
           start_time:this.start_date,
293 307
           end_time:this.end_date,
294 308
           page:this.currentPage,
@@ -415,7 +429,7 @@ import html2canvas from "html2canvas"
415 429
           }else{
416 430
             var m =date.getMonth() + 1; //月
417 431
           }
418
-          if(date.getDate() + 1<10){
432
+          if(date.getDate()<10){
419 433
             var d ='0'+date.getDate(); //日
420 434
           }else{
421 435
             var d = date.getDate(); //日

+ 3 - 3
src/xt_pages/Dialysisanalysis/weightblood/components/dialyze_after.vue View File

@@ -260,8 +260,8 @@ import html2canvas from "html2canvas"
260 260
         date_options:[{value:1,label:'最近七天'},{value:2,label:'本周'},{value:3,label:'上周'},{value:4,label:'本月'},
261 261
                       {value:5,label:'上月'},{value:6,label:'本年'},{value:7,label:'上一年'}
262 262
         ],
263
-        status_options:[{value:1,label:'小于40kg'},{value:2,label:'40~50kg'},{value:3,label:'60~70kg'},
264
-                        {value:4,label:'大于70kg'},{value:5,label:'未知'}],
263
+        status_options:[{value:1,label:'40~50kg'},{value:2,label:'50~60kg'},{value:3,label:'60~70kg'},
264
+                        {value:4,label:'大于70kg'},{value:5,label:'小于40kg'},{value:6,label:'未知'}],
265 265
 
266 266
         date_mode_options:[{value:1,label:'按周'},{value:2,label:'按天'},{value:3,label:'按月'},{value:4,label:'按年'}],
267 267
         source_options:[{value:1,label:'以开始透析为准'},{value:2,label:'以排班为准'}],
@@ -624,7 +624,7 @@ import html2canvas from "html2canvas"
624 624
           }else{
625 625
             var m =date.getMonth() + 1; //月
626 626
           }
627
-          if(date.getDate() + 1<10){
627
+          if(date.getDate()<10){
628 628
             var d ='0'+date.getDate(); //日
629 629
           }else{
630 630
             var d = date.getDate(); //日

+ 3 - 3
src/xt_pages/Dialysisanalysis/weightblood/components/dry_denominator.vue View File

@@ -261,8 +261,8 @@ import html2canvas from "html2canvas"
261 261
         date_options:[{value:1,label:'最近七天'},{value:2,label:'本周'},{value:3,label:'上周'},{value:4,label:'本月'},
262 262
                       {value:5,label:'上月'},{value:6,label:'本年'},{value:7,label:'上一年'}
263 263
         ],
264
-        status_options:[{value:1,label:'小于40kg'},{value:2,label:'40~50kg'},{value:3,label:'60~70kg'},
265
-                        {value:4,label:'大于70kg'},{value:5,label:'未知'}],
264
+        status_options:[{value:1,label:'40~50kg'},{value:2,label:'50~60kg'},{value:3,label:'60~70kg'},
265
+                        {value:4,label:'大于70kg'},{value:5,label:'小于40kg'},{value:6,label:'未知'}],
266 266
         date_mode_options:[{value:1,label:'按周'},{value:2,label:'按天'},{value:3,label:'按月'},{value:4,label:'按年'}],
267 267
         source_options:[{value:1,label:'以开始透析为准'},{value:2,label:'以排班为准'}],
268 268
 
@@ -625,7 +625,7 @@ import html2canvas from "html2canvas"
625 625
           }else{
626 626
             var m =date.getMonth() + 1; //月
627 627
           }
628
-          if(date.getDate() + 1<10){
628
+          if(date.getDate()<10){
629 629
             var d ='0'+date.getDate(); //日
630 630
           }else{
631 631
             var d = date.getDate(); //日

+ 3 - 5
src/xt_pages/Dialysisanalysis/weightblood/components/dry_weight.vue View File

@@ -205,8 +205,8 @@ import html2canvas from "html2canvas"
205 205
         nurseList:[],
206 206
         operators:[],
207 207
         docList:[],
208
-        // status_options:[{value:1,label:'小于40kg'},{value:2,label:'40~50kg'},{value:3,label:'60~70kg'},
209
-        //                 {value:4,label:'大于70kg'},{value:5,label:'未知'}],
208
+        // status_options:[{value:1,label:'40~50kg'},{value:2,label:'50~60kg'},{value:3,label:'60~70kg'},
209
+        //                 {value:4,label:'大于70kg'},{value:5,label:'小于40kg'},{value:6,label:'未知'}],
210 210
 
211 211
         date_options:[{value:1,label:'最近七天'},{value:2,label:'本周'},{value:3,label:'上周'},{value:4,label:'本月'},
212 212
                       {value:5,label:'上月'},{value:6,label:'本年'},{value:7,label:'上一年'}
@@ -578,13 +578,11 @@ import html2canvas from "html2canvas"
578 578
           }else{
579 579
             var m =date.getMonth() + 1; //月
580 580
           }
581
-          if(date.getDate() + 1<10){
581
+          if(date.getDate()<10){
582 582
             var d ='0'+date.getDate(); //日
583 583
           }else{
584 584
             var d = date.getDate(); //日
585 585
           }
586
-          // var d = date.getDate(); //日
587
-
588 586
           return y + "-" + m + "-" + d;
589 587
       },
590 588
       handleCurrentChange(val){

+ 2 - 2
src/xt_pages/Dialysisanalysis/weightblood/components/list_denominator.vue View File

@@ -260,8 +260,8 @@ import html2canvas from "html2canvas"
260 260
         date_options:[{value:1,label:'最近七天'},{value:2,label:'本周'},{value:3,label:'上周'},{value:4,label:'本月'},
261 261
                       {value:5,label:'上月'},{value:6,label:'本年'},{value:7,label:'上一年'}
262 262
         ],
263
-        status_options:[{value:1,label:'小于40kg'},{value:2,label:'40~50kg'},{value:3,label:'60~70kg'},
264
-                        {value:4,label:'大于70kg'},{value:5,label:'未知'}],
263
+        status_options:[{value:1,label:'40~50kg'},{value:2,label:'50~60kg'},{value:3,label:'60~70kg'},
264
+                        {value:4,label:'大于70kg'},{value:5,label:'小于40kg'},{value:6,label:'未知'}],
265 265
         date_mode_options:[{value:1,label:'按周'},{value:2,label:'按天'},{value:3,label:'按月'},{value:4,label:'按年'}],
266 266
         source_options:[{value:1,label:'以开始透析为准'},{value:2,label:'以排班为准'}],
267 267
 

+ 7 - 7
src/xt_pages/Dialysisanalysis/weightblood/components/weight_table.vue View File

@@ -198,8 +198,8 @@ import html2canvas from "html2canvas"
198 198
         date_options:[{value:1,label:'最近七天'},{value:2,label:'本周'},{value:3,label:'上周'},{value:4,label:'本月'},
199 199
                       {value:5,label:'上月'},{value:6,label:'本年'},{value:7,label:'上一年'}
200 200
         ],
201
-        status_options:[{value:1,label:'小于40kg'},{value:2,label:'40~50kg'},{value:3,label:'60~70kg'},
202
-                        {value:4,label:'大于70kg'},{value:5,label:'未知'}],
201
+        status_options:[{value:1,label:'40~50kg'},{value:2,label:'50~60kg'},{value:3,label:'60~70kg'},
202
+                        {value:4,label:'大于70kg'},{value:5,label:'小于40kg'},{value:6,label:'未知'}],
203 203
         date_mode_options:[{value:1,label:'按周'},{value:2,label:'按天'},{value:3,label:'按月'},{value:4,label:'按年'}],
204 204
         source_options:[{value:1,label:'以开始透析为准'},{value:2,label:'以排班为准'}],
205 205
 
@@ -248,12 +248,12 @@ import html2canvas from "html2canvas"
248 248
         XLSX.writeFile(bookNew, name) // 保存的文件名
249 249
       },
250 250
       // 查询
251
-      sete_click(){
252
-        this.getecharts()
253
-      },
251
+      // sete_click(){
252
+      //   // this.getecharts()
253
+      // },
254 254
       // 详情查询
255 255
       deil_click(){
256
-        // this.Getdialyzerdetail(this.getdialyze(this.dialyze_value))
256
+        this.Getdialyzerdetail()
257 257
       },
258 258
        // 下载
259 259
       Download_click(){
@@ -478,7 +478,7 @@ import html2canvas from "html2canvas"
478 478
           }else{
479 479
             var m =date.getMonth() + 1; //月
480 480
           }
481
-          if(date.getDate() + 1<10){
481
+          if(date.getDate()<10){
482 482
             var d ='0'+date.getDate(); //日
483 483
           }else{
484 484
             var d = date.getDate(); //日

+ 61 - 35
src/xt_pages/outpatientTool/components/gather.vue View File

@@ -122,8 +122,8 @@ export default {
122 122
        costClassify:getDictionaryDataConfig('system','cost_classify'),
123 123
       tableData: [],
124 124
       chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
125
-      item_type: '0',
126
-      new_item_type:0,
125
+      item_type: "",
126
+      new_item_type:"",
127 127
       item_time_type:'1',
128 128
       items: [
129 129
         { id: 1, name: '药品' },
@@ -165,12 +165,26 @@ export default {
165 165
       // this.getSummaryDetailList()
166 166
     },
167 167
     changeItem() {
168
+      // console.log("-----")
169
+      // this.tableData = []
168 170
       this.new_item_type = this.item_type
169 171
       if(this.item_type == 1){
170 172
         this.new_item_type = -100
171 173
       }else if(this.item_type == 5){
172 174
         this.new_item_type = -200
173 175
       }
176
+      //
177
+      // if(this.new_item_type == 0){
178
+      //   this.tableData = this.all_table_data
179
+      // }else{
180
+      //   let new_table_data = []
181
+      //   for(let aa = 0; aa < this.all_table_data.length; aa++){
182
+      //     if(this.new_item_type == this.all_table_data[aa].cost_classify){
183
+      //       new_table_data.push(this.all_table_data[aa])
184
+      //     }
185
+      //   }
186
+      //   this.tableData = new_table_data
187
+      // }
174 188
       // this.getSummaryDetailList()
175 189
     }, uniquepid(arr) {
176 190
       const res = new Map()
@@ -288,7 +302,6 @@ export default {
288 302
               }
289 303
               new_obj.items.push(obj)
290 304
             }
291
-
292 305
             tempPatientsThree.push(new_obj)
293 306
           }
294 307
 
@@ -299,18 +312,20 @@ export default {
299 312
           for(let i = 0; i < tempPatientsThree.length;i++){
300 313
             let sum = 0
301 314
             for(let b = 0; b < tempPatientsThree[i].items.length;b++){
302
-              let obj = {
315
+              let obj2 = {
303 316
                 name:tempPatientsThree[i].items[b].name,
304 317
                 cost_classify:tempPatientsThree[i].items[b].cost_classify,
305 318
                 price:tempPatientsThree[i].items[b].price,
306
-                patient_id:tempPatientsThree[i].items[b].patient_id,
319
+                patient_id:tempPatientsThree[i].patient_id,
307 320
                 item_name:tempPatientsThree[i].items[b].item_name,
308 321
                 sum:0,
309 322
               }
310 323
               sum = sum + tempPatientsThree[i].items[b].price
311
-              this.tableData.push(obj)
312
-              this.all_table_data.push(obj)
324
+              console.log(obj2)
325
+              this.tableData.push(obj2)
326
+              this.all_table_data.push(obj2)
313 327
             }
328
+
314 329
             for(let c = 0; c < this.tableData.length;c++){
315 330
               if(tempPatientsThree[i].patient_id == this.tableData[c].patient_id){
316 331
                 this.tableData[c].sum = sum
@@ -335,6 +350,7 @@ export default {
335 350
             this.tableData = new_table_data
336 351
           }
337 352
           this.handleSpanTempArr()
353
+          // this.getTotal()
338 354
         }
339 355
       })
340 356
     },getName(cost_classify){
@@ -384,10 +400,7 @@ export default {
384 400
       }
385 401
       return res
386 402
     },unique3(array) {
387
-      console.log("-----11122222")
388 403
 
389
-      console.log(array)
390
-      // res用来存储结果
391 404
       var res = []
392 405
       for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
393 406
         for (var j = 0, resLen = res.length; j < resLen; j++) {
@@ -401,18 +414,6 @@ export default {
401 414
         }
402 415
       }
403 416
       return res
404
-    }, sort(arr) {
405
-      for (var i = 0; i < arr.length - 1; i++) {
406
-        for (var j = 0; j < arr.length - i - 1; j++) {
407
-          if (arr[j].patient_id > arr[j + 1].patient_id) {// 相邻元素两两对比
408
-            var hand = arr[j]
409
-            arr[j] = arr[j + 1]
410
-            arr[j + 1] = hand
411
-
412
-          }
413
-        }
414
-      }
415
-      return arr
416 417
     }, handleSpanTempArr() {
417 418
       this.tempArr = []
418 419
 
@@ -431,8 +432,8 @@ export default {
431 432
           }
432 433
         }
433 434
       }
434
-      console.log('this.tableData',this.tableData);
435
-      
435
+      // console.log('this.tableData',this.tableData);
436
+
436 437
       let sameRowArr = [], sIdx = 0
437 438
       this.tableData.forEach((item, index) => {
438 439
         item.index = index
@@ -448,8 +449,8 @@ export default {
448 449
         }
449 450
       })
450 451
       this.sameRowArr = sameRowArr
451
-      console.log('this.sameRowArr',this.sameRowArr);
452
-      
452
+      // console.log('this.sameRowArr',this.sameRowArr);
453
+
453 454
     }, merge({ row, column, rowIndex, columnIndex }) {
454 455
       if (columnIndex === 0 || columnIndex === 3) {
455 456
         const _row = this.tempArr[rowIndex]
@@ -459,26 +460,51 @@ export default {
459 460
           colspan: _col
460 461
         }
461 462
       }
462
-    }, getTotal(param) {
463
+    }, deepCopy(obj) {
464
+        if ((obj === null) || (typeof obj !== 'object')) {
465
+          return obj;
466
+        }
467
+
468
+        if (obj instanceof Date) {
469
+          return new Date(obj.getTime());
470
+        }
471
+
472
+        if (obj instanceof Array) {
473
+          return obj.reduce((arr, item, i) => {
474
+            arr[i] = this.deepCopy(item);
475
+            return arr;
476
+          }, []);
477
+        }
478
+
479
+        if (obj instanceof Object) {
480
+          return Object.keys(obj).reduce((newObj, key) => {
481
+            newObj[key] = this.deepCopy(obj[key]);
482
+            return newObj;
483
+          }, {});
484
+        }
485
+  },getTotal(param) {
463 486
       const { columns, data } = param
464 487
       const sums = []
488
+      console.log(data)
465 489
       columns.forEach((column, index) => {
466 490
         if (index === 0) {
467 491
           sums[index] = '合计'
468 492
           return
469 493
         }
470
-        console.log('data',data)
471
-        for(let i=0;i<data.length;i++){
472
-          for(let j=i+1;j<data.length;j++){
473
-            if(data[i].patient_id == data[j].patient_id){
474
-              data.splice(j,1)
494
+       var data2  = this.deepCopy(data)
495
+        // var data2 = data
496
+        // console.log('data',data)
497
+        for(let i=0;i<data2.length;i++){
498
+          for(let j=i+1;j<data2.length;j++){
499
+            if(data2[i].patient_id == data2[j].patient_id){
500
+              data2.splice(j,1)
475 501
               j--
476 502
             }
477 503
           }
478 504
         }
479
-        console.log('data111',data);
480
-        
481
-        const values = data.map(item => Number(item[column.property]))
505
+        // console.log('data111',data);
506
+
507
+        const values = data2.map(item => Number(item[column.property]))
482 508
         if (column.property === 'sum') {
483 509
           sums[index] = values.reduce((prev, curr) => {
484 510
             const value = Number(curr)