This commit is contained in:
曹辉 2022-10-21 09:55:24 +08:00
parent f3c7362886
commit dd24182550
4 changed files with 1013 additions and 1140 deletions

View File

@ -176,7 +176,7 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
width="1600px" width="1350px"
append-to-body append-to-body
> >
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
@ -186,7 +186,7 @@
<el-radio :label="1">已审核</el-radio> <el-radio :label="1">已审核</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<div style="height: 600px; overflow: auto"> <div style="height: 550px; overflow: auto">
<kindergartenEcharts <kindergartenEcharts
v-if="open" v-if="open"
:itemlists="itemlist" :itemlists="itemlist"
@ -212,7 +212,7 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="openiframe" width="1600px" append-to-body> <el-dialog :visible.sync="openiframe" width="1350px" append-to-body>
<div style="height: 680px; overflow: auto"> <div style="height: 680px; overflow: auto">
<kindergartenEcharts <kindergartenEcharts
:itemlists="itemlist" :itemlists="itemlist"
@ -544,7 +544,6 @@ export default {
listKindergartenInfo(this.kqueryParams).then((response) => { listKindergartenInfo(this.kqueryParams).then((response) => {
this.kindergartenList = response.rows; this.kindergartenList = response.rows;
this.total1 = response.total; this.total1 = response.total;
// console.log(this.kindergartenList);
}); });
}, },
// //
@ -576,7 +575,6 @@ export default {
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
console.log(this.queryParams);
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.info(); this.info();
}, },
@ -654,7 +652,6 @@ export default {
var PDF = new JsPDF("", "pt", "a4"); var PDF = new JsPDF("", "pt", "a4");
if (leftHeight < pageHeight) { if (leftHeight < pageHeight) {
PDF.addImage(pageData, "JPEG", 0, 0, imgWidth, imgHeight); PDF.addImage(pageData, "JPEG", 0, 0, imgWidth, imgHeight);
console.log(PDF);
} else { } else {
while (leftHeight > 0) { while (leftHeight > 0) {
PDF.addImage(pageData, "JPEG", 0, position, imgWidth, imgHeight); PDF.addImage(pageData, "JPEG", 0, position, imgWidth, imgHeight);
@ -666,78 +663,47 @@ export default {
} }
} }
// PDF.save(".pdf"); // // PDF.save(".pdf"); //
console.log(this.form);
var basepdf = PDF.output("datauristring"); // base64 var basepdf = PDF.output("datauristring"); // base64
// basepdf = basepdf.split("filename=generated.pdf;"); // basepdf = basepdf.split("filename=generated.pdf;");
// base64 (blob) // base64 (blob)
let blob = this.dataURLtoBlob(basepdf); let blob = this.dataURLtoBlob(basepdf);
// console.log(blob, "blob");
let formData = new FormData(); let formData = new FormData();
formData.append("kindergartenFile", blob); formData.append("kindergartenFile", blob);
formData.append("kindergartenId", this.form.kindergartenId); formData.append("kindergartenId", this.form.kindergartenId);
formData.append("kindergartenName", this.form.kindergartenName); formData.append("kindergartenName", this.form.kindergartenName);
formData.append("batchCode", this.form.batchCode); formData.append("batchCode", this.form.batchCode);
formData.append("checkStatus", this.form.checkStatus); formData.append("checkStatus", this.form.checkStatus);
console.log(this.form);
uploadKindergartenCheckReport(formData).then((res) => { uploadKindergartenCheckReport(formData).then((res) => {
console.log(res);
if (res.code == 200) { if (res.code == 200) {
this.$message({ this.$message({
message: "审核", message: "审核成",
type: "success", type: "success",
}); });
this.info(); this.info();
} }
}); });
}); });
// updateKindergartenCheckReport(obj).then((response) => {
// this.$modal.msgSuccess("");
// this.open = false;
// this.queryParams = {
// pageNum: 1,
// pageSize: 10,
// kindergartenId: null,
// batchCode: null,
// };
// this.info();
// });
}, },
// //
lookhand(item) { lookhand(item) {
this.itemlist.kindergartenId = item.kindergartenId; this.itemlist.kindergartenId = item.kindergartenId;
this.itemlist.batchCode = item.batchCode; this.itemlist.batchCode = item.batchCode;
this.itemlist.number++; this.itemlist.number++;
console.log(item);
this.loading = true; this.loading = true;
setTimeout(() => { setTimeout(() => {
this.openiframe = true; this.openiframe = true;
this.loading = false; this.loading = false;
}, 300); }, 300);
// report(item.kindergartenId, item.batchCode).then((res) => {
// // this.pdfurl = window.URL.createObjectURL(res);
// this.pdfurl = baseurl + res.data.downloadAddress;
// this.info();
// this.openiframe = true;
// console.log(this.pdfurl);
// // window.open(this.pdfurl);
// });
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport(row) { handleExport(row) {
// report(row.id).then((res) => {
// console.log(res);
// });
if (row.checkStatus == 0) { if (row.checkStatus == 0) {
this.$message.error("未审核,不可下载"); this.$message.error("未审核,不可下载");
} else if (row.checkStatus == 1) { } else if (row.checkStatus == 1) {
this.download( this.download(
`/system/kindergartenCheckReport/download?id=${row.id}`, `/system/kindergartenCheckReport/download?id=${row.id}`,
{}, {},
row.reportName + `.pdf` row.reportName
); );
} }
}, },
@ -794,7 +760,6 @@ export default {
listKindergartenInfo(this.kqueryParams).then((response) => { listKindergartenInfo(this.kqueryParams).then((response) => {
this.kindergartenList = response.rows; this.kindergartenList = response.rows;
this.total1 = response.total; this.total1 = response.total;
// console.log(this.kindergartenList);
}); });
}, },
kinresetQuery() { kinresetQuery() {
@ -812,7 +777,6 @@ export default {
}, },
// /base64 // /base64
dataURLtoBlob(dataurl) { dataURLtoBlob(dataurl) {
// console.log(dataurl);
var arr = dataurl.split(","), var arr = dataurl.split(","),
mime = arr[0].match(/:(.*?);/)[1], mime = arr[0].match(/:(.*?);/)[1],
bstr = atob(arr[1]), bstr = atob(arr[1]),

View File

@ -4,9 +4,10 @@
<div <div
style=" style="
font-size: 40px; font-size: 40px;
margin: 60px auto; margin: 0 auto;
font-weight: 600; font-weight: 600;
text-align: center; text-align: center;
height:160px;line-height:160px
" "
> >
幼儿园综合体质分析报告书 幼儿园综合体质分析报告书
@ -707,7 +708,7 @@
>班级体质分析({{ ilist.categoryScoreList[0].className }})</span >班级体质分析({{ ilist.categoryScoreList[0].className }})</span
> >
</div> </div>
<div style="margin: 0 auto; width: 1400px; line-height: 60px"> <div style="margin: 0 auto; width: 1180px; line-height: 60px">
<div style="font-size: 12px; width: 100%; overflow: auto"> <div style="font-size: 12px; width: 100%; overflow: auto">
<div <div
style=" style="

View File

@ -603,7 +603,7 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
width="1200px" width="1050px"
append-to-body append-to-body
> >
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
@ -614,7 +614,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="height: 650px; overflow: auto"> <div style="height: 550px; overflow: auto">
<personalecharts <personalecharts
v-if="open" v-if="open"
:itemlists="itemlist" :itemlists="itemlist"
@ -625,22 +625,10 @@
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
<!-- <el-form-item label="学生姓名" prop="studentId">
<el-input v-model="form.studentId" placeholder="请输入学生姓名" />
</el-form-item>
<el-form-item label="批次编号" prop="batchCode">
<el-input v-model="form.batchCode" placeholder="请输入批次编号" />
</el-form-item>
<el-form-item label="报告编号" prop="reportCode">
<el-input v-model="form.reportCode" placeholder="请输入报告编号" />
</el-form-item>
<el-form-item label="报告名称" prop="reportName">
<el-input v-model="form.reportName" placeholder="请输入报告名称" />
</el-form-item> -->
</el-dialog> </el-dialog>
<!-- // --> <!-- // -->
<el-dialog <el-dialog
width="1200px" width="1300px"
style="height: 95%" style="height: 95%"
append-to-body append-to-body
:visible.sync="openiframe" :visible.sync="openiframe"
@ -839,14 +827,6 @@ export default {
this.openiframe = true; this.openiframe = true;
this.loading = false; this.loading = false;
}, 300); }, 300);
// checkReportreport(item.studentId, item.batchCode).then((res) => {
// // this.pdfurl = window.URL.createObjectURL(res);
// this.pdfurl = baseurl + res.data.downloadAddress;
// this.getList();
// this.openiframe = true;
// // window.open(this.pdfurl);
// });
}, },
/** 查询个人体质检测报告列表 */ /** 查询个人体质检测报告列表 */
getList() { getList() {
@ -889,7 +869,6 @@ export default {
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
console.log(this.queryParams);
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.getList(); this.getList();
}, },
@ -906,26 +885,6 @@ export default {
this.open = true; this.open = true;
this.loading = false; this.loading = false;
}, 300); }, 300);
// existCheckReport(row.studentId, row.batchCode).then((res) => {
// if (res.code == 200) {
// if (res.data.existFlag) {
// this.loading = false;
// this.open = true;
// } else {
// checkReportreport(row.studentId, row.batchCode).then((res) => {
// // this.pdfurl = window.URL.createObjectURL(res);
// this.form.id = res.data.id;
// this.getList();
// this.loading = false;
// this.open = true;
// // window.open(this.pdfurl);
// });
// }
// } else if (res.code == 500) {
// this.loading = false;
// this.$message.error("");
// }
// });
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
@ -959,7 +918,6 @@ export default {
}, },
// /base64 // /base64
dataURLtoBlob(dataurl) { dataURLtoBlob(dataurl) {
console.log(dataurl);
var arr = dataurl.split(","), var arr = dataurl.split(","),
mime = arr[0].match(/:(.*?);/)[1], mime = arr[0].match(/:(.*?);/)[1],
bstr = atob(arr[1]), bstr = atob(arr[1]),
@ -974,21 +932,6 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
// updatePersonalCheckReport(obj).then((res) => {
// if (res.code == 200) {
// this.$modal.msgSuccess("");
// this.queryParams = {
// pageNum: 1,
// pageSize: 10,
// studentId: null,
// batchCode: null,
// };
// this.getList();
// this.open = false;
// } else {
// this.$modal.msgSuccess("");
// }
// });
//pdf //pdf
this.open = false; this.open = false;
let shareContent = document.querySelector(".personal"), //DOM let shareContent = document.querySelector(".personal"), //DOM
@ -1023,7 +966,6 @@ export default {
var PDF = new JsPDF("", "pt", "a4"); var PDF = new JsPDF("", "pt", "a4");
if (leftHeight < pageHeight) { if (leftHeight < pageHeight) {
PDF.addImage(pageData, "JPEG", 0, 0, imgWidth, imgHeight); PDF.addImage(pageData, "JPEG", 0, 0, imgWidth, imgHeight);
console.log(PDF);
} else { } else {
while (leftHeight > 0) { while (leftHeight > 0) {
PDF.addImage(pageData, "JPEG", 0, position, imgWidth, imgHeight); PDF.addImage(pageData, "JPEG", 0, position, imgWidth, imgHeight);
@ -1038,8 +980,6 @@ export default {
// basepdf = basepdf.split("filename=generated.pdf;"); // basepdf = basepdf.split("filename=generated.pdf;");
// base64 (blob) // base64 (blob)
let blob = this.dataURLtoBlob(basepdf); let blob = this.dataURLtoBlob(basepdf);
console.log(blob, "blob");
let formData = new FormData(); let formData = new FormData();
formData.append("personalFile", blob); formData.append("personalFile", blob);
formData.append("studentId", this.form.studentId); formData.append("studentId", this.form.studentId);
@ -1047,8 +987,13 @@ export default {
formData.append("batchCode", this.form.batchCode); formData.append("batchCode", this.form.batchCode);
formData.append("checkStatus", this.form.checkStatus); formData.append("checkStatus", this.form.checkStatus);
uploadPersonalCheckReport(formData).then((res) => { uploadPersonalCheckReport(formData).then((res) => {
console.log(res); if (res.code == 200) {
this.getList(); this.$message({
message: "审核完成",
type: "success",
});
this.getList();
}
}); });
// PDF.save(".pdf"); // // PDF.save(".pdf"); //
}); });
@ -1061,7 +1006,7 @@ export default {
this.download( this.download(
`/system/personalCheckReport/download?id=${row.id}`, `/system/personalCheckReport/download?id=${row.id}`,
{}, {},
row.reportName + `.pdf` row.reportName
); );
} }
}, },
@ -1093,7 +1038,6 @@ export default {
listKindergartenInfo(this.kqueryParams).then((response) => { listKindergartenInfo(this.kqueryParams).then((response) => {
this.kindergartenList = response.rows; this.kindergartenList = response.rows;
this.total1 = response.total; this.total1 = response.total;
// console.log(this.kindergartenList);
}); });
}, },
// //
@ -1131,7 +1075,6 @@ export default {
}, },
// //
batchCodeclick(row) { batchCodeclick(row) {
console.log(row);
this.batchCode = row.batchCode; this.batchCode = row.batchCode;
this.queryParams.batchCode = row.batchCode; this.queryParams.batchCode = row.batchCode;
this.batchName = row.batchName; this.batchName = row.batchName;
@ -1175,12 +1118,10 @@ export default {
listStudentInfo(this.studentqueryParams).then((res) => { listStudentInfo(this.studentqueryParams).then((res) => {
this.studentInfoList = res.rows; this.studentInfoList = res.rows;
this.total3 = res.total; this.total3 = res.total;
// console.log(this.studentInfoList);
}); });
}, },
// //
classshowclick() { classshowclick() {
console.log(this.classqueryParams);
if ( if (
this.classqueryParams.kindergartenId == "" || this.classqueryParams.kindergartenId == "" ||
this.classqueryParams.kindergartenId == null this.classqueryParams.kindergartenId == null
@ -1190,7 +1131,6 @@ export default {
this.classshow = true; this.classshow = true;
this.classinfo(); this.classinfo();
} }
// console.log(this.classqueryParams);
}, },
// //
studentcancel() { studentcancel() {
@ -1210,7 +1150,6 @@ export default {
}, },
// //
classclick(row) { classclick(row) {
// console.log(row);
this.className = row.className; this.className = row.className;
this.classId = row.id; this.classId = row.id;
this.studentqueryParams.classId = row.id; this.studentqueryParams.classId = row.id;
@ -1244,7 +1183,6 @@ export default {
listClassinfo(this.classqueryParams).then((response) => { listClassinfo(this.classqueryParams).then((response) => {
this.classinfoList = response.rows; this.classinfoList = response.rows;
this.total2 = response.total; this.total2 = response.total;
// console.log(this.classinfoList);
}); });
}, },
@ -1253,7 +1191,6 @@ export default {
listKindergartenInfo(this.kqueryParams).then((response) => { listKindergartenInfo(this.kqueryParams).then((response) => {
this.kindergartenList = response.rows; this.kindergartenList = response.rows;
this.total1 = response.total; this.total1 = response.total;
// console.log(this.kindergartenList);
}); });
}, },
// //

File diff suppressed because it is too large Load Diff