Commit 67bc3193 by taowenzhong

退回修改添加修改意见

parent d7019105
......@@ -422,8 +422,7 @@ export function pass(examId, studentIds) {
export function back(examId, studentIds) {
return request({
url: `/recruitExam/back/${examId}/${studentIds}`,
method: 'put',
// data: file,
method: 'put'
})
}
// 驳回
......@@ -446,11 +445,13 @@ export function passOne(examId, studentIds) {
})
}
// 单个退回修改
export function backOne(examId, studentIds) {
export function backOne(examId, studentIds, msg) {
return request({
url: `/recruitExam/backOne/${examId}/${studentIds}`,
method: 'put',
// data: file,
data: {
message: msg
}
})
}
// 单个驳回
......
......@@ -209,9 +209,15 @@
</el-descriptions-item>
<el-descriptions-item label="资料" :span="3">
<template v-for="item in form.fileList">
<span style="margin-right: 10px">{{ item.fjmc }}</span>
<el-link
type="primary"
target="_blank"
:href="baseUrl + item.fjlj"
style="margin-right: 10px"
>{{ item.fjmc }}</el-link>
</template>
<el-button
v-if="form.fileList && form.fileList.length > 0"
type="text" icon="el-icon-download"
@click="downloadFile(form.fileList)"
>下载
......@@ -459,14 +465,20 @@ export default {
downloadFile(files) {
const info = this.form
const zip = new JSZip()
const names = files.map(item => { return item.fjmc })
const fileUrls = files.map(item => { return this.baseUrl + item.fjlj })
const buffers = fileUrls.map(item => { return this.urlToBlob(item) })
const names = files.map(item => {
return item.fjmc
})
const fileUrls = files.map(item => {
return this.baseUrl + item.fjlj
})
const buffers = fileUrls.map(item => {
return this.urlToBlob(item)
})
Promise.all(buffers).then((res) => {
res.forEach((item, index) => {
zip.file(names[index], item)
})
zip.generateAsync({ type: 'blob'}).then(content => {
zip.generateAsync({type: 'blob'}).then(content => {
FileSaver.saveAs(content, `${info.project}-${info.studentName}-${info.idCard}.zip`)
})
})
......@@ -483,10 +495,10 @@ export default {
const dataURL = canvas.toDataURL('image/jpeg', 0.9); // 0.9为图片质量,可以根据需要调整
// 将dataURL转换为Blob对象
fetch(dataURL)
.then(res => res.blob())
.then(blob => {
resolve(blob);
});
.then(res => res.blob())
.then(blob => {
resolve(blob);
});
};
img.onerror = (error) => {
reject(error);
......@@ -675,8 +687,11 @@ export default {
const examId = this.examId
const id = row.studentId || this.ids
this.$modal.confirm('是否确认退回修改该数据?').then(function () {
return backOne(examId, id)
this.$prompt('请输入退回原因', '退回修改', {
confirmButtonText: '退回',
cancelButtonText: '取消'
}).then(({ value }) => {
return backOne(examId, id, value)
}).then(() => {
this.getList();
this.$modal.msgSuccess("退回修改成功");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment