|
@@ -161,7 +161,7 @@
|
|
|
class="btn-primary"
|
|
|
@click="toViewCard(attachment)"
|
|
|
>
|
|
|
- 查看题卡
|
|
|
+ {{ attachment.cardTitle || "预览" }}
|
|
|
</el-button>
|
|
|
</td>
|
|
|
<td v-if="IS_EDIT">
|
|
@@ -222,9 +222,10 @@
|
|
|
<script>
|
|
|
import UploadPaperDialog from "./UploadPaperDialog";
|
|
|
import ModifyCard from "../../card/components/ModifyCard";
|
|
|
-import { taskApplyDetail, taskPaperApplyEdit } from "../api";
|
|
|
+import { taskApplyDetail, taskPaperApplyEdit, cardForSelectList } from "../api";
|
|
|
import { attachmentPreview } from "../../login/api";
|
|
|
import { examRuleDetail } from "../../base/api";
|
|
|
+import { COMMON_CARD_RULE_ID } from "@/constants/enumerate";
|
|
|
|
|
|
const initTaskApply = {
|
|
|
examId: "",
|
|
@@ -303,7 +304,8 @@ export default {
|
|
|
curAttachment: {},
|
|
|
curUploadType: "paper",
|
|
|
abc: "abcdefghijklmnopqrstuvwxyz".toUpperCase(),
|
|
|
- includePaper: false
|
|
|
+ includePaper: false,
|
|
|
+ cards: []
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -364,6 +366,9 @@ export default {
|
|
|
name,
|
|
|
attachmentId: "",
|
|
|
filename: "",
|
|
|
+ cardId: "",
|
|
|
+ cardType: "",
|
|
|
+ cardTitle: "",
|
|
|
pages: 0,
|
|
|
canDelete: true,
|
|
|
isExposed: false
|
|
@@ -444,8 +449,10 @@ export default {
|
|
|
const aind = this.paperAttachments.findIndex(
|
|
|
item => item.name === this.curAttachment.name
|
|
|
);
|
|
|
- if (aind !== -1) {
|
|
|
- this.paperAttachments[aind].cardId = card && card.id;
|
|
|
+ if (aind !== -1 && card) {
|
|
|
+ this.paperAttachments[aind].cardId = card.id;
|
|
|
+ this.paperAttachments[aind].cardType = card.type;
|
|
|
+ this.paperAttachments[aind].cardTitle = card.title;
|
|
|
}
|
|
|
},
|
|
|
toCreateCard(attachment) {
|