pengjun 3 weeks ago
parent
commit
38884ba716
  1. 67
      src/views/customerReport/combinationDetails.vue

67
src/views/customerReport/combinationDetails.vue

@ -127,11 +127,11 @@
<el-table-column prop="personnelTypeName" label="人员类别" width="120" align="center"/> <el-table-column prop="personnelTypeName" label="人员类别" width="120" align="center"/>
<el-table-column prop="medicalStartDate" label="体检日期" width="90" align="center"/> <el-table-column prop="medicalStartDate" label="体检日期" width="90" align="center"/>
<el-table-column prop="medicalTimes" label="体检次数" width="70" align="center"/> <el-table-column prop="medicalTimes" label="体检次数" width="70" align="center"/>
<el-table-column
<el-table-column
v-for="(item, index) in columnData" v-for="(item, index) in columnData"
:key="index" :key="index"
:prop="item.prop" :prop="item.prop"
:label="item.lable"
:label="item.label"
align="left" align="left"
> >
</el-table-column> </el-table-column>
@ -438,14 +438,14 @@ page-break-before: avoid;}}`, // 去除页眉页脚
body.completeFlag = this.patientRegister.query.checkCompleteFlag; body.completeFlag = this.patientRegister.query.checkCompleteFlag;
//console.log('/api/app/peisreport/getpatientregisterreport',body) //console.log('/api/app/peisreport/getpatientregisterreport',body)
postapi("/api/customerreport/getasbitemspecificresultreport", body).then(
postapi("/api/customerreport/getasbitemspecificresultreport", body).then(
(res) => { (res) => {
if (res.code != -1) { if (res.code != -1) {
let bodys = res.data; let bodys = res.data;
let that = this; let that = this;
let template = { let template = {
prop: "", prop: "",
lable: "",
label: "",
}; };
that.columnData = []; that.columnData = [];
that.category = []; that.category = [];
@ -459,46 +459,40 @@ page-break-before: avoid;}}`, // 去除页眉页脚
for (let i = 0; i < bodys.length; i++) { for (let i = 0; i < bodys.length; i++) {
for (let k = 0; k < bodys[i].registerChecks.length; k++) { for (let k = 0; k < bodys[i].registerChecks.length; k++) {
if(that.summary=="Y"){ if(that.summary=="Y"){
this.$set(
bodys[i],
// bodys[i].registerChecks[k].registerCheckId +
bodys[i].registerChecks[k].checkName +
"小结",
bodys[i].registerChecks[k].registerCheckSummarys
);
this.$set(
bodys[i],
bodys[i].registerChecks[k].checkName + "小结",
bodys[i].registerChecks[k].registerCheckSummarys
);
} }
if(this.combinationDetails=="Y"){ if(this.combinationDetails=="Y"){
if (bodys[i].registerChecks[k].checkName == that.category[m]) {
for (let j = 0;j < bodys[i].registerChecks[k].registerCheckItems.length;j++) {
let templatess = JSON.parse(JSON.stringify(template));
templatess.prop =
// bodys[i].registerChecks[k].registerCheckId +
bodys[i].registerChecks[k].checkName +
bodys[i].registerChecks[k].registerCheckItems[j]
.itemName;
templatess.lable =
// bodys[i].registerChecks[k].checkName +
// "/" +
bodys[i].registerChecks[k].registerCheckItems[j]
.itemName;
that.columnData.push(templatess);
this.$set(
bodys[i],
// bodys[i].registerChecks[k].registerCheckId +
bodys[i].registerChecks[k].checkName +
if (bodys[i].registerChecks[k].checkName == that.category[m]) {
for (let j = 0;j < bodys[i].registerChecks[k].registerCheckItems.length;j++) {
let templatess = Object.assign({}, template);
templatess.prop =
bodys[i].registerChecks[k].checkName +
bodys[i].registerChecks[k].registerCheckItems[j] bodys[i].registerChecks[k].registerCheckItems[j]
.itemName,
bodys[i].registerChecks[k].registerCheckItems[j].result
)
.itemName;
templatess.label =
bodys[i].registerChecks[k].registerCheckItems[j]
.itemName;
that.columnData.push(templatess);
this.$set(
bodys[i],
bodys[i].registerChecks[k].checkName +
bodys[i].registerChecks[k].registerCheckItems[j]
.itemName,
bodys[i].registerChecks[k].registerCheckItems[j].result
)
}
} }
} }
}
} }
} }
if(that.summary=="Y"){ if(that.summary=="Y"){
let templates = JSON.parse(JSON.stringify(template));
let templates = Object.assign({}, template);
templates.prop =that.category[m] +"小结"; templates.prop =that.category[m] +"小结";
templates.lable = that.category[m] + "小结";
templates.label = that.category[m] + "小结";
that.columnData.push(templates); that.columnData.push(templates);
} }
} }
@ -510,9 +504,6 @@ page-break-before: avoid;}}`, // 去除页眉页脚
let qc = this.columnData.filter( let qc = this.columnData.filter(
(key) => !map.has(key.prop) && map.set(key.prop, 1) (key) => !map.has(key.prop) && map.set(key.prop, 1)
); );
// qc.sort(function (a, b) {
// return a.lable < b.lable ? -1 : 1; //
// })
this.columnData = qc; this.columnData = qc;
this.dataList = bodys; this.dataList = bodys;

Loading…
Cancel
Save