|
@@ -10,12 +10,12 @@
|
|
<table class="table">
|
|
<table class="table">
|
|
<tr>
|
|
<tr>
|
|
<th>试卷类型</th>
|
|
<th>试卷类型</th>
|
|
- <th>试卷文件</th>
|
|
|
|
- <th>答题卡</th>
|
|
|
|
|
|
+ <th v-if="task.examPaper">试卷文件</th>
|
|
|
|
+ <th v-if="task.answerSheet">答题卡</th>
|
|
</tr>
|
|
</tr>
|
|
<tr v-for="(attachment, index) in paperAttachments" :key="index">
|
|
<tr v-for="(attachment, index) in paperAttachments" :key="index">
|
|
<td>{{ attachment.name }}卷</td>
|
|
<td>{{ attachment.name }}卷</td>
|
|
- <td class="td-link">
|
|
|
|
|
|
+ <td class="td-link" v-if="task.examPaper">
|
|
<span @click="downloadPaper(attachment)" title="点击下载试卷">
|
|
<span @click="downloadPaper(attachment)" title="点击下载试卷">
|
|
<i class="icon icon-download-act"></i>{{ attachment.filename }}
|
|
<i class="icon icon-download-act"></i>{{ attachment.filename }}
|
|
</span>
|
|
</span>
|
|
@@ -23,7 +23,7 @@
|
|
<td
|
|
<td
|
|
class="td-link"
|
|
class="td-link"
|
|
:rowspan="pTypeEnable ? paperAttachments.length : 1"
|
|
:rowspan="pTypeEnable ? paperAttachments.length : 1"
|
|
- v-if="index === 0"
|
|
|
|
|
|
+ v-if="index === 0 && task.answerSheet"
|
|
>
|
|
>
|
|
<span @click="toPreviewCard" title="点击预览答题卡内容">{{
|
|
<span @click="toPreviewCard" title="点击预览答题卡内容">{{
|
|
task.cardName
|
|
task.cardName
|
|
@@ -40,30 +40,41 @@
|
|
label-width="180px"
|
|
label-width="180px"
|
|
style="min-width:800px;"
|
|
style="min-width:800px;"
|
|
>
|
|
>
|
|
- <el-form-item prop="result" label="审核结果:">
|
|
|
|
- <el-radio-group v-model="modalForm.result">
|
|
|
|
|
|
+ <el-form-item prop="status" label="审核结果:">
|
|
|
|
+ <el-radio-group v-model="modalForm.status" :disabled="hasAudited">
|
|
<el-radio
|
|
<el-radio
|
|
- v-for="(val, key) in AUDIT_TYPE"
|
|
|
|
- :key="key"
|
|
|
|
- :label="key * 1"
|
|
|
|
- >{{ val }}</el-radio
|
|
|
|
|
|
+ v-for="item in AUDIT_TYPE"
|
|
|
|
+ :key="item.key"
|
|
|
|
+ :label="item.key"
|
|
|
|
+ >{{ item.name }}</el-radio
|
|
>
|
|
>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item prop="content" label="审核意见:">
|
|
|
|
|
|
+ <el-form-item
|
|
|
|
+ prop="remark"
|
|
|
|
+ label="审核意见:"
|
|
|
|
+ v-if="modalForm.status === 2"
|
|
|
|
+ >
|
|
<el-input
|
|
<el-input
|
|
type="textarea"
|
|
type="textarea"
|
|
style="width: 439px;"
|
|
style="width: 439px;"
|
|
- v-model.trim="modalForm.content"
|
|
|
|
|
|
+ v-model.trim="modalForm.remark"
|
|
|
|
+ :disabled="hasAudited"
|
|
placeholder="请输入审核意见"
|
|
placeholder="请输入审核意见"
|
|
clearable
|
|
clearable
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button type="primary" :disabled="isSubmit" @click="save"
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ :disabled="isSubmit"
|
|
|
|
+ @click="save"
|
|
|
|
+ v-if="!hasAudited"
|
|
>提交</el-button
|
|
>提交</el-button
|
|
>
|
|
>
|
|
- <el-button @click="goback">取消</el-button>
|
|
|
|
|
|
+ <el-button @click="goback">{{
|
|
|
|
+ hasAudited ? "返回" : "取消"
|
|
|
|
+ }}</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
@@ -71,7 +82,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { doneTaskDetail } from "../api";
|
|
|
|
|
|
+import { waitTaskDetail, auditExamTask } from "../api";
|
|
import { attachmentPreview } from "../../login/api";
|
|
import { attachmentPreview } from "../../login/api";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -84,20 +95,27 @@ export default {
|
|
paperAttachments: [],
|
|
paperAttachments: [],
|
|
curAttachment: {},
|
|
curAttachment: {},
|
|
isSubmit: false,
|
|
isSubmit: false,
|
|
- AUDIT_TYPE: {
|
|
|
|
- 1: "通过",
|
|
|
|
- 2: "不通过"
|
|
|
|
- },
|
|
|
|
- modalForm: { result: 1, content: "" },
|
|
|
|
|
|
+ hasAudited: false,
|
|
|
|
+ AUDIT_TYPE: [
|
|
|
|
+ {
|
|
|
|
+ key: 1,
|
|
|
|
+ name: "通过"
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ key: 2,
|
|
|
|
+ name: "不通过"
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ modalForm: { status: 1, remark: "" },
|
|
rules: {
|
|
rules: {
|
|
- result: [
|
|
|
|
|
|
+ status: [
|
|
{
|
|
{
|
|
required: true,
|
|
required: true,
|
|
message: "请选择审核结果",
|
|
message: "请选择审核结果",
|
|
trigger: "change"
|
|
trigger: "change"
|
|
}
|
|
}
|
|
],
|
|
],
|
|
- content: [
|
|
|
|
|
|
+ remark: [
|
|
{
|
|
{
|
|
required: true,
|
|
required: true,
|
|
message: "请输入审核意见",
|
|
message: "请输入审核意见",
|
|
@@ -107,12 +125,12 @@ export default {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- // mounted() {
|
|
|
|
- // this.getData();
|
|
|
|
- // },
|
|
|
|
|
|
+ mounted() {
|
|
|
|
+ this.getData();
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
async getData() {
|
|
async getData() {
|
|
- const data = await doneTaskDetail(this.taskId);
|
|
|
|
|
|
+ const data = await waitTaskDetail(this.taskId);
|
|
const nameCode = data.courseNameCode.split(/\(|\)/);
|
|
const nameCode = data.courseNameCode.split(/\(|\)/);
|
|
this.task = Object.assign(this.task, data, {
|
|
this.task = Object.assign(this.task, data, {
|
|
courseName: nameCode[0],
|
|
courseName: nameCode[0],
|
|
@@ -120,6 +138,11 @@ export default {
|
|
});
|
|
});
|
|
this.pTypeEnable = this.task.enablePaperType.split(",").length > 1;
|
|
this.pTypeEnable = this.task.enablePaperType.split(",").length > 1;
|
|
this.parsePaperAttachment();
|
|
this.parsePaperAttachment();
|
|
|
|
+ this.hasAudited = this.task.auditStatus !== 0;
|
|
|
|
+ this.modalForm = {
|
|
|
|
+ status: this.hasAudited ? data.auditStatus : 1,
|
|
|
|
+ remark: data.remark
|
|
|
|
+ };
|
|
},
|
|
},
|
|
parsePaperAttachment() {
|
|
parsePaperAttachment() {
|
|
const paperAttachment =
|
|
const paperAttachment =
|
|
@@ -146,6 +169,20 @@ export default {
|
|
async save() {
|
|
async save() {
|
|
const valid = await this.$refs["ModalForm"].validate().catch(() => {});
|
|
const valid = await this.$refs["ModalForm"].validate().catch(() => {});
|
|
if (!valid) return;
|
|
if (!valid) return;
|
|
|
|
+
|
|
|
|
+ if (this.isSubmit) return;
|
|
|
|
+ this.isSubmit = true;
|
|
|
|
+ const datas = {
|
|
|
|
+ ...this.modalForm,
|
|
|
|
+ taskId: this.taskId,
|
|
|
|
+ examId: this.task.examId
|
|
|
|
+ };
|
|
|
|
+ const result = await auditExamTask(datas).catch(() => {});
|
|
|
|
+ this.isSubmit = false;
|
|
|
|
+ if (!result) return;
|
|
|
|
+
|
|
|
|
+ this.$message.success("审核成功!");
|
|
|
|
+ this.goback();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|