Commit 67bc3193 by taowenzhong

退回修改添加修改意见

parent d7019105
...@@ -422,8 +422,7 @@ export function pass(examId, studentIds) { ...@@ -422,8 +422,7 @@ export function pass(examId, studentIds) {
export function back(examId, studentIds) { export function back(examId, studentIds) {
return request({ return request({
url: `/recruitExam/back/${examId}/${studentIds}`, url: `/recruitExam/back/${examId}/${studentIds}`,
method: 'put', method: 'put'
// data: file,
}) })
} }
// 驳回 // 驳回
...@@ -446,11 +445,13 @@ export function passOne(examId, studentIds) { ...@@ -446,11 +445,13 @@ export function passOne(examId, studentIds) {
}) })
} }
// 单个退回修改 // 单个退回修改
export function backOne(examId, studentIds) { export function backOne(examId, studentIds, msg) {
return request({ return request({
url: `/recruitExam/backOne/${examId}/${studentIds}`, url: `/recruitExam/backOne/${examId}/${studentIds}`,
method: 'put', method: 'put',
// data: file, data: {
message: msg
}
}) })
} }
// 单个驳回 // 单个驳回
......
...@@ -209,9 +209,15 @@ ...@@ -209,9 +209,15 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="资料" :span="3"> <el-descriptions-item label="资料" :span="3">
<template v-for="item in form.fileList"> <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> </template>
<el-button <el-button
v-if="form.fileList && form.fileList.length > 0"
type="text" icon="el-icon-download" type="text" icon="el-icon-download"
@click="downloadFile(form.fileList)" @click="downloadFile(form.fileList)"
>下载 >下载
...@@ -459,14 +465,20 @@ export default { ...@@ -459,14 +465,20 @@ export default {
downloadFile(files) { downloadFile(files) {
const info = this.form const info = this.form
const zip = new JSZip() const zip = new JSZip()
const names = files.map(item => { return item.fjmc }) const names = files.map(item => {
const fileUrls = files.map(item => { return this.baseUrl + item.fjlj }) return item.fjmc
const buffers = fileUrls.map(item => { return this.urlToBlob(item) }) })
const fileUrls = files.map(item => {
return this.baseUrl + item.fjlj
})
const buffers = fileUrls.map(item => {
return this.urlToBlob(item)
})
Promise.all(buffers).then((res) => { Promise.all(buffers).then((res) => {
res.forEach((item, index) => { res.forEach((item, index) => {
zip.file(names[index], item) 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`) FileSaver.saveAs(content, `${info.project}-${info.studentName}-${info.idCard}.zip`)
}) })
}) })
...@@ -675,8 +687,11 @@ export default { ...@@ -675,8 +687,11 @@ export default {
const examId = this.examId const examId = this.examId
const id = row.studentId || this.ids const id = row.studentId || this.ids
this.$modal.confirm('是否确认退回修改该数据?').then(function () { this.$prompt('请输入退回原因', '退回修改', {
return backOne(examId, id) confirmButtonText: '退回',
cancelButtonText: '取消'
}).then(({ value }) => {
return backOne(examId, id, value)
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("退回修改成功"); 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