pengjun 2 weeks ago
parent
commit
893a7e74ae
  1. 67
      src/components/report/deptProgress.vue

67
src/components/report/deptProgress.vue

@ -47,6 +47,20 @@
</div> </div>
<div :style="`overflow: auto;margin-top: 10px;width:'${window.pageWidth - 15}px;;height:${divHeight}px;`"> <div :style="`overflow: auto;margin-top: 10px;width:'${window.pageWidth - 15}px;;height:${divHeight}px;`">
<el-table :data="tableDataTrans" border style="width: 100%" highlight-current-row :span-method="spanMethod">
<el-table-column prop="itemTypeName" label="科室" min-width="120"></el-table-column>
<el-table-column prop="asbitemName" label="组合项目" min-width="180"></el-table-column>
<el-table-column prop="signInCount" label="签到人数" min-width="100" align="center"></el-table-column>
<el-table-column prop="completeCount" label="完成人数" min-width="100" align="center"></el-table-column>
<el-table-column prop="giveUpCheckedCount" label="弃检人数" min-width="100" align="center"></el-table-column>
<el-table-column prop="balanceCount" label="剩余人数" min-width="100" align="center"></el-table-column>
<el-table-column prop="completionRate" label="完成率" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.completionRate + '%' }}
</template>
</el-table-column>
</el-table>
<!--
<table width="800" border="1" cellspacing="0" bordercolor="#909399" <table width="800" border="1" cellspacing="0" bordercolor="#909399"
style="font-size:14px;border-collapse:collapse;"> style="font-size:14px;border-collapse:collapse;">
<tr style="text-align: center;" height="24"> <tr style="text-align: center;" height="24">
@ -87,9 +101,8 @@
<td align="center" class="tdCellClassRed">{{ sum.sumCompletionRate + '%' }}</td> <td align="center" class="tdCellClassRed">{{ sum.sumCompletionRate + '%' }}</td>
</tr> </tr>
</template> </template>
</table> </table>
-->
<!-- <!--
{ {
@ -149,7 +162,8 @@ export default {
}, },
tableData: [], // tableData: [], //
tableDataTrans: [], //
mergeDeptArray: [],
}; };
}, },
@ -175,8 +189,32 @@ export default {
} }
}, },
methods: { methods: {
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
//...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
dddw, moment, dddw, moment,
/**
* Element UI 表格合并方法
* @param {Object} params - { row, column, rowIndex, columnIndex }
* @returns {Array} [rowspan, colspan]
*/
spanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
const currentName = row.itemTypeName;
const prevRow = this.tableDataTrans[rowIndex - 1];
if (prevRow && prevRow.itemTypeName === currentName) {
return [0, 0];
} else {
let rowspan = 1;
for (let i = rowIndex + 1; i < this.tableDataTrans.length; i++) {
if (this.tableDataTrans[i].itemTypeName === currentName) rowspan++;
else break;
}
return [rowspan, 1];
}
}
return [1, 1];
},
dictInit() { dictInit() {
// //
// getapi("/api/app/medical-type/in-filter").then((res) => { // getapi("/api/app/medical-type/in-filter").then((res) => {
@ -218,12 +256,31 @@ export default {
.then(res => { .then(res => {
if (res.code >= -1) { if (res.code >= -1) {
this.tableData = res.data this.tableData = res.data
this.transTableData()
} }
}) })
}, },
//
transTableData() {
this.tableDataTrans = []
this.tableData.forEach(e => {
this.tableDataTrans = this.tableDataTrans.concat(e.details)
//
if (e.details.length > 1) {
this.tableDataTrans.push({
itemTypeName: e.itemTypeName,
asbitemName: "科室合计:",
signInCount: e.sumSignInCount,
completeCount: e.sumCompleteCount,
giveUpCheckedCount: e.sumGiveUpCheckedCount,
balanceCount: e.sumBalanceCount,
completionRate: e.sumCompletionRate
})
}
});
},
}, },
// //

Loading…
Cancel
Save