浏览代码

fix: 命题任务题卡编辑问题

zhangjie 6 月之前
父节点
当前提交
a984675eda
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      src/modules/exam/components/taskApply/TaskPaper.vue

+ 7 - 1
src/modules/exam/components/taskApply/TaskPaper.vue

@@ -262,7 +262,8 @@
                   :disabled="
                     !attachment.cardId ||
                     attachment.cardType === 'GENERIC' ||
-                    !(!attachment.used && attachment.createId === user.id)
+                    (attachment.cardId !== attachment.originCardId &&
+                      attachment.used)
                   "
                   @click="toEditCard(attachment)"
                   >编辑</el-button
@@ -562,6 +563,11 @@ export default {
         this.addAtachment();
       }
 
+      this.paperAttachments = this.paperAttachments.map((aitem) => {
+        aitem.originCardId = aitem.cardId;
+        return aitem;
+      });
+
       const pAttachment = this.paperAttachments.some((item) => !!item.paperId);
       if (pAttachment) {
         this.curTab = "tiku";