|
@@ -429,7 +429,8 @@ export default {
|
429
|
429
|
}
|
430
|
430
|
}
|
431
|
431
|
}
|
432
|
|
-
|
|
432
|
+ console.log('this.tableData',this.tableData);
|
|
433
|
+
|
433
|
434
|
let sameRowArr = [], sIdx = 0
|
434
|
435
|
this.tableData.forEach((item, index) => {
|
435
|
436
|
item.index = index
|
|
@@ -445,6 +446,8 @@ export default {
|
445
|
446
|
}
|
446
|
447
|
})
|
447
|
448
|
this.sameRowArr = sameRowArr
|
|
449
|
+ console.log('this.sameRowArr',this.sameRowArr);
|
|
450
|
+
|
448
|
451
|
}, merge({ row, column, rowIndex, columnIndex }) {
|
449
|
452
|
if (columnIndex === 0 || columnIndex === 3) {
|
450
|
453
|
const _row = this.tempArr[rowIndex]
|
|
@@ -462,7 +465,17 @@ export default {
|
462
|
465
|
sums[index] = '合计'
|
463
|
466
|
return
|
464
|
467
|
}
|
465
|
|
- console.log(data)
|
|
468
|
+ console.log('data',data)
|
|
469
|
+ for(let i=0;i<data.length;i++){
|
|
470
|
+ for(let j=i+1;j<data.length;j++){
|
|
471
|
+ if(data[i].patient_id == data[j].patient_id){
|
|
472
|
+ data.splice(j,1)
|
|
473
|
+ j--
|
|
474
|
+ }
|
|
475
|
+ }
|
|
476
|
+ }
|
|
477
|
+ console.log('data111',data);
|
|
478
|
+
|
466
|
479
|
const values = data.map(item => Number(item[column.property]))
|
467
|
480
|
if (column.property === 'sum') {
|
468
|
481
|
sums[index] = values.reduce((prev, curr) => {
|