|
|
|
@ -47,6 +47,20 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<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" |
|
|
|
style="font-size:14px;border-collapse:collapse;"> |
|
|
|
<tr style="text-align: center;" height="24"> |
|
|
|
@ -58,11 +72,11 @@ |
|
|
|
<td width="100">剩余人数</td> |
|
|
|
<td width="100">完成率</td> |
|
|
|
</tr> |
|
|
|
<template v-for="(sum,index) in tableData"> |
|
|
|
<template v-for="(item,index2) in sum.details"> |
|
|
|
<template v-for="(sum, index) in tableData"> |
|
|
|
<template v-for="(item, index2) in sum.details"> |
|
|
|
<tr height="24" v-if="index2 == 0"> |
|
|
|
<td align="center" class="tdCellClass" :rowspan="sum.details.length + 1">{{ sum.itemTypeName }}</td> |
|
|
|
<td align="left" class="tdCellClass">{{ item.asbitemName}}</td> |
|
|
|
<td align="left" class="tdCellClass">{{ item.asbitemName }}</td> |
|
|
|
<td align="center" class="tdCellClass">{{ item.signInCount }}</td> |
|
|
|
<td align="center" class="tdCellClass">{{ item.completeCount }}</td> |
|
|
|
<td align="center" class="tdCellClass">{{ item.giveUpCheckedCount }}</td> |
|
|
|
@ -70,7 +84,7 @@ |
|
|
|
<td align="center" class="tdCellClass">{{ item.completionRate + '%' }}</td> |
|
|
|
</tr> |
|
|
|
<tr height="24" v-else> |
|
|
|
<td align="left" class="tdCellClass">{{ item.asbitemName}}</td> |
|
|
|
<td align="left" class="tdCellClass">{{ item.asbitemName }}</td> |
|
|
|
<td align="center" class="tdCellClass">{{ item.signInCount }}</td> |
|
|
|
<td align="center" class="tdCellClass">{{ item.completeCount }}</td> |
|
|
|
<td align="center" class="tdCellClass">{{ item.giveUpCheckedCount }}</td> |
|
|
|
@ -78,18 +92,17 @@ |
|
|
|
<td align="center" class="tdCellClass">{{ item.completionRate + '%' }}</td> |
|
|
|
</tr> |
|
|
|
</template> |
|
|
|
<tr height="24"> |
|
|
|
<td align="right" class="tdCellClassRed">小计:</td> |
|
|
|
<td align="center" class="tdCellClassRed">{{ sum.sumSignInCount }}</td> |
|
|
|
<td align="center" class="tdCellClassRed">{{ sum.sumCompleteCount }}</td> |
|
|
|
<td align="center" class="tdCellClassRed">{{ sum.sumGiveUpCheckedCount }}</td> |
|
|
|
<td align="center" class="tdCellClassRed">{{ sum.sumBalanceCount }}</td> |
|
|
|
<td align="center" class="tdCellClassRed">{{ sum.sumCompletionRate + '%' }}</td> |
|
|
|
</tr> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
</table> |
|
|
|
<tr height="24"> |
|
|
|
<td align="right" class="tdCellClassRed">小计:</td> |
|
|
|
<td align="center" class="tdCellClassRed">{{ sum.sumSignInCount }}</td> |
|
|
|
<td align="center" class="tdCellClassRed">{{ sum.sumCompleteCount }}</td> |
|
|
|
<td align="center" class="tdCellClassRed">{{ sum.sumGiveUpCheckedCount }}</td> |
|
|
|
<td align="center" class="tdCellClassRed">{{ sum.sumBalanceCount }}</td> |
|
|
|
<td align="center" class="tdCellClassRed">{{ sum.sumCompletionRate + '%' }}</td> |
|
|
|
</tr> |
|
|
|
</template> |
|
|
|
</table> |
|
|
|
--> |
|
|
|
|
|
|
|
<!-- |
|
|
|
{ |
|
|
|
@ -149,7 +162,8 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
tableData: [], //列表数据 |
|
|
|
|
|
|
|
tableDataTrans: [], // 转换后数据 |
|
|
|
mergeDeptArray: [], |
|
|
|
|
|
|
|
}; |
|
|
|
}, |
|
|
|
@ -170,13 +184,37 @@ export default { |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapState(["pickerOptions", "window", "dict"]), |
|
|
|
divHeight(){ |
|
|
|
divHeight() { |
|
|
|
return this.window.pageHeight < 600 ? 430 : this.window.pageHeight - 140 |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]), |
|
|
|
//...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]), |
|
|
|
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() { |
|
|
|
//体检类别 |
|
|
|
// getapi("/api/app/medical-type/in-filter").then((res) => { |
|
|
|
@ -218,12 +256,31 @@ export default { |
|
|
|
.then(res => { |
|
|
|
if (res.code >= -1) { |
|
|
|
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 |
|
|
|
}) |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
//监听事件 |
|
|
|
|