Kaynağa Gözat

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

zhangjie 6 ay önce
ebeveyn
işleme
a984675eda

+ 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";