This commit is contained in:
曹辉 2022-09-30 15:42:28 +08:00
parent c620698570
commit f15daa392a
2 changed files with 38 additions and 53 deletions

View File

@ -145,7 +145,7 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-download" icon="el-icon-download"
v-if="scope.row.checkStatus == 1" v-show="scope.row.checkStatus == 1"
@click="handleExport(scope.row)" @click="handleExport(scope.row)"
v-hasPermi="['system:kindergartenCheckReport:download']" v-hasPermi="['system:kindergartenCheckReport:download']"
>下载</el-button >下载</el-button
@ -155,7 +155,7 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-download" icon="el-icon-download"
v-else v-show="scope.row.checkStatus == 0"
@click="handleExport(scope.row)" @click="handleExport(scope.row)"
v-hasPermi="['system:kindergartenCheckReport:download']" v-hasPermi="['system:kindergartenCheckReport:download']"
>下载</el-button >下载</el-button
@ -614,13 +614,9 @@ export default {
/** 审核按钮操作 */ /** 审核按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const id = row.id || this.ids; this.form = JSON.parse(JSON.stringify(row));
this.form = row;
var code = "";
existKindergartenCheckReport(row.kindergartenId, row.batchCode).then( existKindergartenCheckReport(row.kindergartenId, row.batchCode).then(
(response) => { (response) => {
console.log(response);
code = response.code;
if (response.data.existFlag) { if (response.data.existFlag) {
this.title = "修改幼儿园检测报告审批状态"; this.title = "修改幼儿园检测报告审批状态";
this.pdfurl = baseurl + response.data.downloadAddress; this.pdfurl = baseurl + response.data.downloadAddress;
@ -631,7 +627,7 @@ export default {
this.form.id = res.data.id; this.form.id = res.data.id;
// this.pdfurl = window.URL.createObjectURL(res); // this.pdfurl = window.URL.createObjectURL(res);
// window.open(this.pdfurl); // window.open(this.pdfurl);
console.log(this.form) this.info();
this.open = true; this.open = true;
}); });
} }
@ -640,30 +636,28 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
console.log(this.form); var obj = {
if (this.form.id != null) { id: this.form.id,
var obj = { checkStatus: this.form.checkStatus,
id: this.form.id, };
checkStatus: this.form.checkStatus, updateKindergartenCheckReport(obj).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.queryParams = {
pageNum: 1,
pageSize: 10,
kindergartenId: null,
batchCode: null,
}; };
updateKindergartenCheckReport(obj).then((response) => { this.info();
this.$modal.msgSuccess("修改成功"); });
this.open = false;
this.queryParams = {
pageNum: 1,
pageSize: 10,
kindergartenId: null,
batchCode: null,
};
this.info();
});
}
}, },
// //
lookhand(item) { lookhand(item) {
report(item.kindergartenId, item.batchCode).then((res) => { report(item.kindergartenId, item.batchCode).then((res) => {
// this.pdfurl = window.URL.createObjectURL(res); // this.pdfurl = window.URL.createObjectURL(res);
this.pdfurl = baseurl + res.data.downloadAddress; this.pdfurl = baseurl + res.data.downloadAddress;
this.info();
this.openiframe = true; this.openiframe = true;
console.log(this.pdfurl); console.log(this.pdfurl);
// window.open(this.pdfurl); // window.open(this.pdfurl);

View File

@ -132,7 +132,7 @@
type="text" type="text"
icon="el-icon-download" icon="el-icon-download"
@click="handleExport(scope.row)" @click="handleExport(scope.row)"
v-if="scope.row.checkStatus == 1" v-show="scope.row.checkStatus == 1"
v-hasPermi="['system:personalCheckReport:download']" v-hasPermi="['system:personalCheckReport:download']"
>下载</el-button >下载</el-button
> >
@ -141,7 +141,7 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-download" icon="el-icon-download"
v-else v-show="scope.row.checkStatus == 0"
@click="handleExport(scope.row)" @click="handleExport(scope.row)"
v-hasPermi="['system:personalCheckReport:download']" v-hasPermi="['system:personalCheckReport:download']"
>下载</el-button >下载</el-button
@ -879,7 +879,7 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
this.form = row; this.form = JSON.parse(JSON.stringify(row));
console.log(this.form); console.log(this.form);
// this.form = row; // this.form = row;
this.title = "修改个人体质检测报告"; this.title = "修改个人体质检测报告";
@ -892,6 +892,7 @@ export default {
// this.pdfurl = window.URL.createObjectURL(res); // this.pdfurl = window.URL.createObjectURL(res);
this.pdfurl = baseurl + res.data.downloadAddress; this.pdfurl = baseurl + res.data.downloadAddress;
this.form.id = res.data.id; this.form.id = res.data.id;
this.getList();
this.open = true; this.open = true;
// window.open(this.pdfurl); // window.open(this.pdfurl);
}); });
@ -931,26 +932,20 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { var obj = {
if (valid) { id: this.form.id,
if (this.form.id != null) { checkStatus: this.form.checkStatus,
var obj = { };
id: this.form.id, updatePersonalCheckReport(obj).then((response) => {
checkStatus: this.form.checkStatus, this.$modal.msgSuccess("修改成功");
}; this.queryParams = {
updatePersonalCheckReport(obj).then((response) => { pageNum: 1,
this.$modal.msgSuccess("修改成功"); pageSize: 10,
this.open = false; studentId: null,
this.queryParams = { batchCode: null,
pageNum: 1, };
pageSize: 10, this.getList();
studentId: null, this.open = false;
batchCode: null,
};
this.getList();
});
}
}
}); });
}, },
// //
@ -959,6 +954,7 @@ export default {
checkReportreport(item.studentId, item.batchCode).then((res) => { checkReportreport(item.studentId, item.batchCode).then((res) => {
// this.pdfurl = window.URL.createObjectURL(res); // this.pdfurl = window.URL.createObjectURL(res);
this.pdfurl = baseurl + res.data.downloadAddress; this.pdfurl = baseurl + res.data.downloadAddress;
this.getList();
this.openiframe = true; this.openiframe = true;
// window.open(this.pdfurl); // window.open(this.pdfurl);
}); });
@ -975,11 +971,6 @@ export default {
); );
} }
}, },
itemlists(studentId, batchCode) {
console.log(studentId, batchCode);
this.queryParams.studentId = studentId;
this.queryParams.batchCode = batchCode;
},
// //
classresetQuery() { classresetQuery() {