|
@@ -35,20 +35,30 @@
|
|
|
</td>
|
|
|
<template v-if="IS_TIKU_TAB">
|
|
|
<td>
|
|
|
- <el-button
|
|
|
- v-if="!attachment.isExposed && taskStatus.IS_APPLY"
|
|
|
- type="text"
|
|
|
- class="btn-primary"
|
|
|
- @click="toSelect(attachment)"
|
|
|
- >
|
|
|
- <i
|
|
|
- :class="[
|
|
|
- 'icon',
|
|
|
- attachment.attachmentId ? 'icon-files-act' : 'icon-files',
|
|
|
- ]"
|
|
|
- ></i
|
|
|
- >{{ attachment.filename || "选择试卷" }}
|
|
|
- </el-button>
|
|
|
+ <template v-if="!attachment.isExposed && taskStatus.IS_APPLY">
|
|
|
+ <div class="box-justify">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ class="btn-primary box-grow"
|
|
|
+ @click="toSelect(attachment)"
|
|
|
+ >
|
|
|
+ <i
|
|
|
+ :class="[
|
|
|
+ 'icon',
|
|
|
+ attachment.attachmentId ? 'icon-files-act' : 'icon-files',
|
|
|
+ ]"
|
|
|
+ ></i
|
|
|
+ >{{ attachment.filename || "选择试卷" }}
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ class="btn-primary box-static"
|
|
|
+ :disabled="!attachment.paperUrl"
|
|
|
+ @click="toViewPaper(attachment)"
|
|
|
+ >预览</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<el-button
|
|
|
v-else
|
|
|
type="text"
|
|
@@ -159,9 +169,6 @@
|
|
|
placeholder="请选择"
|
|
|
style="width: 200px"
|
|
|
filterable
|
|
|
- @visible-change="
|
|
|
- (visible) => cardOptionOpened(visible, attachment)
|
|
|
- "
|
|
|
@change="cardChange(attachment)"
|
|
|
>
|
|
|
<el-option
|
|
@@ -537,6 +544,7 @@ export default {
|
|
|
attachmentId: "",
|
|
|
filename: "",
|
|
|
paperId: null,
|
|
|
+ paperUrl: null,
|
|
|
uuid: null,
|
|
|
cardId: "",
|
|
|
cardType: "",
|
|
@@ -665,18 +673,6 @@ export default {
|
|
|
attachment.createId = card.createId;
|
|
|
}
|
|
|
},
|
|
|
- cardOptionOpened(visible, attachment) {
|
|
|
- if (!visible) return;
|
|
|
-
|
|
|
- // const selectedCardIds = this.paperAttachments.map((item) => item.cardId);
|
|
|
- // this.cards = this.cards.map((card) => {
|
|
|
- // card.disabled =
|
|
|
- // card.id !== attachment.cardId &&
|
|
|
- // selectedCardIds.includes(card.id) &&
|
|
|
- // card.type !== "GENERIC";
|
|
|
- // return card;
|
|
|
- // });
|
|
|
- },
|
|
|
async toCreateCard(attachment) {
|
|
|
if (!this.examTask.cardRuleId) {
|
|
|
this.$message.error("题卡规则缺失!");
|
|
@@ -760,8 +756,13 @@ export default {
|
|
|
cardTitle: info.title,
|
|
|
uuid: info.uuid,
|
|
|
attachmentId: info.attachmentId,
|
|
|
+ paperUrl: info.paperUrl,
|
|
|
});
|
|
|
},
|
|
|
+ toViewPaper(attachment) {
|
|
|
+ if (!attachment.paperUrl) return;
|
|
|
+ window.open(attachment.paperUrl);
|
|
|
+ },
|
|
|
// image-preview
|
|
|
toPreview(index) {
|
|
|
this.curImageIndex = index;
|