|
|
|
@ -1,10 +1,8 @@ |
|
|
|
<template> |
|
|
|
<div :style="'width:100%;height:'+(window.pageHeight < 600 ? 330:window.pageHeight-270)+'px;'"> |
|
|
|
<el-table :data="tableData" |
|
|
|
:height="window.pageHeight < 600 ? 330:window.pageHeight-270" |
|
|
|
border highlight-current-row > |
|
|
|
<el-table-column prop="itemTypeName" label="项目" width="180"/> |
|
|
|
<el-table-column v-for="(item,index) of tableCols" :label="item" :prop="item" :key="index" width="200"> |
|
|
|
<div style="'width:100%;"> |
|
|
|
<el-table :data="tableData" :height="divHeight" border highlight-current-row> |
|
|
|
<el-table-column prop="itemTypeName" label="项目" width="180" /> |
|
|
|
<el-table-column v-for="(item, index) of tableCols" :label="item" :prop="item" :key="index" width="200"> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
@ -16,13 +14,13 @@ import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
|
import { arrayExistObj } from '@/utlis/proFunc'; |
|
|
|
export default { |
|
|
|
components: {}, |
|
|
|
props:["patientId"], |
|
|
|
props: ["patientId"], |
|
|
|
data() { |
|
|
|
return { |
|
|
|
orgData:[], //原始的数据, |
|
|
|
tableData:[], //显示数据 |
|
|
|
tableRows:[], //动态行 |
|
|
|
tableCols:[], //动态列 |
|
|
|
orgData: [], //原始的数据, |
|
|
|
tableData: [], //显示数据 |
|
|
|
tableRows: [], //动态行 |
|
|
|
tableCols: [], //动态列 |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
@ -36,14 +34,19 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
...mapState(['window','dict', 'doctorCheck', 'sumDoctorCheck']), |
|
|
|
...mapState(['window', 'dict', 'doctorCheck', 'sumDoctorCheck']), |
|
|
|
|
|
|
|
divHeight() { |
|
|
|
let tempHeight = this.window.pageHeight < 600 ? 600 : this.window.pageHeight |
|
|
|
return tempHeight - 195 |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
//获取结果明细 3a0c6589-9989-4d7f-ba54-61e5b0138220 |
|
|
|
SumItems(patientId) { |
|
|
|
this.orgData = [] |
|
|
|
if(!patientId) return |
|
|
|
if (!patientId) return |
|
|
|
console.log(`/api/app/sumsummaryreport/getitemtypecontrastlist?PatientId=${patientId}`) |
|
|
|
getapi(`/api/app/sumsummaryreport/getitemtypecontrastlist?PatientId=${patientId}`) |
|
|
|
.then((res) => { |
|
|
|
@ -62,15 +65,15 @@ export default { |
|
|
|
// "itemTypeName": "一般检查", |
|
|
|
// "registerDate": "2023-07-14", |
|
|
|
// "summarys": "身高体重:重度肥胖" |
|
|
|
crossTable(tableData){ |
|
|
|
this.tableData=[] //显示数据 |
|
|
|
this.tableRows=[] //动态行 |
|
|
|
this.tableCols=[] //动态列 |
|
|
|
crossTable(tableData) { |
|
|
|
this.tableData = [] //显示数据 |
|
|
|
this.tableRows = [] //动态行 |
|
|
|
this.tableCols = [] //动态列 |
|
|
|
|
|
|
|
console.log('tableData',tableData) |
|
|
|
console.log('tableData', tableData) |
|
|
|
tableData.forEach(e => { |
|
|
|
if(this.tableRows.indexOf(e.itemTypeName) == - 1) this.tableRows.push(e.itemTypeName) |
|
|
|
if(this.tableCols.indexOf(e.registerDate) == - 1) this.tableCols.push(e.registerDate) |
|
|
|
if (this.tableRows.indexOf(e.itemTypeName) == - 1) this.tableRows.push(e.itemTypeName) |
|
|
|
if (this.tableCols.indexOf(e.registerDate) == - 1) this.tableCols.push(e.registerDate) |
|
|
|
}); |
|
|
|
this.tableCols.sort(); |
|
|
|
|
|
|
|
@ -79,8 +82,8 @@ export default { |
|
|
|
let summarys = '' |
|
|
|
item['itemTypeName'] = r |
|
|
|
this.tableCols.forEach(c => { |
|
|
|
for(let i=0;i<tableData.length;i++){ |
|
|
|
if(tableData[i].itemTypeName == r && tableData[i].registerDate == c){ |
|
|
|
for (let i = 0; i < tableData.length; i++) { |
|
|
|
if (tableData[i].itemTypeName == r && tableData[i].registerDate == c) { |
|
|
|
summarys = tableData[i].summarys |
|
|
|
break; |
|
|
|
} |
|
|
|
@ -89,9 +92,9 @@ export default { |
|
|
|
}); |
|
|
|
this.tableData.push(item) |
|
|
|
}); |
|
|
|
console.log('this.tableRows',this.tableRows) |
|
|
|
console.log('this.tableCols',this.tableCols) |
|
|
|
console.log('this.tableData',this.tableData) |
|
|
|
console.log('this.tableRows', this.tableRows) |
|
|
|
console.log('this.tableCols', this.tableCols) |
|
|
|
console.log('this.tableData', this.tableData) |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
@ -99,8 +102,8 @@ export default { |
|
|
|
//监听事件 |
|
|
|
watch: { |
|
|
|
//检查项目切换 |
|
|
|
"patientId":{ |
|
|
|
immediate:true, |
|
|
|
"patientId": { |
|
|
|
immediate: true, |
|
|
|
handler(newVal, oldVal) { |
|
|
|
console.log("watch patientId newVal:", newVal, " oldVal:", oldVal); |
|
|
|
this.SumItems(newVal) |
|
|
|
|