|
|
|
@ -12,8 +12,7 @@ |
|
|
|
style="font-size: 18px;color: red;" /> |
|
|
|
</el-tooltip> |
|
|
|
<el-tooltip class="item" effect="dark" content="已检" placement="top"> |
|
|
|
<i v-show="scope.row.completeFlag == '1'" class="el-icon-success" |
|
|
|
style="font-size: 18px;color: green;" /> |
|
|
|
<i v-show="scope.row.completeFlag == '1'" class="el-icon-success" style="font-size: 18px;color: green;" /> |
|
|
|
</el-tooltip> |
|
|
|
<el-tooltip class="item" effect="dark" content="弃检" placement="top"> |
|
|
|
<i v-show="scope.row.completeFlag == '2'" class="el-icon-remove" style="font-size: 18px;" /> |
|
|
|
@ -25,14 +24,42 @@ |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div :style="'width:' + (window.pageWidth - 180 - 110 - 15) + 'px;'"> |
|
|
|
<!-- |
|
|
|
<el-table :data="tableData" :height="divHeight" border highlight-current-row> |
|
|
|
<el-table-column prop="itemName" label="项目" width="150" /> |
|
|
|
<el-table-column prop="unitName" label="单位" width="80" align="center" /> |
|
|
|
<el-table-column prop="referenceRangeValue" label="参考范围" width="80" align="center" /> |
|
|
|
<el-table-column v-for="(item, index) of tableCols" :label="item" :prop="item" :key="index" min-width="150" |
|
|
|
<el-table-column v-for="(item, index) of tableCols" :label="item.substring(0,10)" :prop="item" :key="index" min-width="150" |
|
|
|
align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ scope.row[item] }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
--> |
|
|
|
<table width="100%" style="font-size:14px;text-align: center;border-collapse:collapse;" border="1" |
|
|
|
cellspacing="0" bordercolor="#909399" > |
|
|
|
<col width="150"> |
|
|
|
<col width="50"> |
|
|
|
<col width="80"> |
|
|
|
<thead> |
|
|
|
<tr height="30"> |
|
|
|
<td width="150">项目</td> |
|
|
|
<td width="50">单位</td> |
|
|
|
<td width="80">参考范围</td> |
|
|
|
<td v-for="(item, index) of tableCols" :key="index" min-width="150">{{ item.substring(0, 10) }}</td> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
<tbody v-for="(item, index) of tableData" :key="index"> |
|
|
|
<tr height="30"> |
|
|
|
<td style="text-align: left;font-weight: bolder;"><div style="padding: 0 5px;">{{ item.itemName }}</div></td> |
|
|
|
<td>{{ item.unitName }}</td> |
|
|
|
<td>{{ item.referenceRangeValue }}</td> |
|
|
|
<td v-for="(item2, index2) of tableCols" :key="index2" min-width="150">{{ item[item2] }}</td> |
|
|
|
</tr> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -85,8 +112,8 @@ export default { |
|
|
|
registerCheckList(patientId) { |
|
|
|
this.RegisterCheckList = [] |
|
|
|
if (!patientId) return |
|
|
|
console.log(`/api/app/sumsummaryreport/gethorizontalcomparisonasbitemlist?PatientId=${patientId}`) |
|
|
|
getapi(`/api/app/sumsummaryreport/gethorizontalcomparisonasbitemlist?PatientId=${patientId}`) |
|
|
|
// console.log(`/api/app/sumsummaryreport/gethorizontalcomparisonasbitemlist?PatientId=${patientId}`) |
|
|
|
postapi('/api/app/SumSummaryReport/GetHorizontalComparisonAsbitems', { patientId }) |
|
|
|
.then((res) => { |
|
|
|
console.log("获取横向对比 SumItems", res.data); |
|
|
|
if (res.code != -1) { |
|
|
|
@ -114,8 +141,8 @@ export default { |
|
|
|
// "checkDate": "2023-07-14", |
|
|
|
// "resultValue": "阴性" |
|
|
|
SumItems(patientId, asbitemId) { |
|
|
|
console.log(`/api/app/sumsummaryreport/gethorizontalcomparisonlist?PatientId=${patientId}&AsbitemId=${asbitemId}`) |
|
|
|
getapi(`/api/app/sumsummaryreport/gethorizontalcomparisonlist?PatientId=${patientId}&AsbitemId=${asbitemId}`) |
|
|
|
// console.log(`/api/app/sumsummaryreport/gethorizontalcomparisonlist?PatientId=${patientId}&AsbitemId=${asbitemId}`) |
|
|
|
postapi('/api/app/SumSummaryReport/GetHorizontalComparisons', { patientId, asbitemId }) |
|
|
|
.then((res) => { |
|
|
|
console.log("获取横向对比 SumItems", res.data); |
|
|
|
if (res.code != -1) { |
|
|
|
@ -128,8 +155,8 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//交叉报表 |
|
|
|
crossTableOld(tableData) { |
|
|
|
|
|
|
|
crossTable(tableData) { |
|
|
|
this.tableData = [] //显示数据 |
|
|
|
this.tableRows = [] //动态行 |
|
|
|
this.tableCols = [] //动态列 |
|
|
|
@ -137,7 +164,8 @@ export default { |
|
|
|
// console.log('tableData', tableData) |
|
|
|
tableData.forEach(e => { |
|
|
|
if (this.tableRows.indexOf(e.itemName) == - 1) this.tableRows.push(e.itemName) |
|
|
|
if (this.tableCols.indexOf(e.checkDate) == - 1) this.tableCols.push(e.checkDate) |
|
|
|
let checkDate = e.checkDate.substring(0, 10) |
|
|
|
if (this.tableCols.indexOf(checkDate) == - 1) this.tableCols.push(checkDate) |
|
|
|
}); |
|
|
|
this.tableCols.sort(); |
|
|
|
|
|
|
|
@ -164,7 +192,70 @@ export default { |
|
|
|
// console.log('this.tableCols', this.tableCols) |
|
|
|
// console.log('this.tableData', this.tableData) |
|
|
|
}, |
|
|
|
crossTable(tableData) { |
|
|
|
// [ |
|
|
|
// { |
|
|
|
// "regsterCheckId": "00000000-0000-0000-0000-000000000000", |
|
|
|
// "checkDate": "2018-06-08T00:00:00", |
|
|
|
// "summarys": [ |
|
|
|
// { |
|
|
|
// "summary": "体重指数:23.89 诊断为:正常" |
|
|
|
// } |
|
|
|
// ], |
|
|
|
// "registerCheckItems": [ |
|
|
|
// { |
|
|
|
// "itemName": "身高", |
|
|
|
// "unitName": "", |
|
|
|
// "referenceRangeValue": "", |
|
|
|
// "resultValue": "176", |
|
|
|
// "reportFontColor": 0 |
|
|
|
// } |
|
|
|
|
|
|
|
this.tableData = [] //显示数据 |
|
|
|
this.tableCols = [] //动态列 |
|
|
|
|
|
|
|
// console.log('tableData', tableData) |
|
|
|
// this.tableCols.push('itemName') |
|
|
|
// this.tableCols.push('unitName') |
|
|
|
// this.tableCols.push('referenceRangeValue') |
|
|
|
let summary = { itemName: '小结', unitName: '', referenceRangeValue: '' } |
|
|
|
tableData.forEach((e, i) => { |
|
|
|
|
|
|
|
let lsummary = '' |
|
|
|
e.summarys.forEach((s, i) => { |
|
|
|
let splitStr = '<br>' |
|
|
|
if (i == 0) splitStr = '' |
|
|
|
lsummary += splitStr + (s.summary || '') |
|
|
|
}); |
|
|
|
summary[e.checkDate] = lsummary |
|
|
|
|
|
|
|
// 获取列数 |
|
|
|
if (this.tableCols.indexOf(e.checkDate) == - 1) this.tableCols.push(e.checkDate) |
|
|
|
|
|
|
|
// 获取行及数据 |
|
|
|
let row = {} |
|
|
|
e.registerCheckItems.forEach(r => { |
|
|
|
let lfind = arrayExistObj(this.tableData, 'itemName', r.itemName) |
|
|
|
if (lfind > -1) { |
|
|
|
this.tableData[lfind][e.checkDate] = r.resultValue |
|
|
|
this.tableData[lfind][e.checkDate + '_color'] = r.reportFontColor |
|
|
|
} else { |
|
|
|
row = { |
|
|
|
itemName: r.itemName, |
|
|
|
unitName: r.unitName, |
|
|
|
referenceRangeValue: r.referenceRangeValue |
|
|
|
} |
|
|
|
row[e.checkDate] = r.resultValue |
|
|
|
row[e.checkDate + '_color'] = r.reportFontColor |
|
|
|
this.tableData.push(row) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.tableData.push(summary) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|