Browse Source

题卡修改为可重复使用,不再限制只用一次

xiaofei 2 years ago
parent
commit
d45ed74076

+ 24 - 2
src/modules/base/views/CardManage.vue

@@ -10,6 +10,21 @@
               clearable
             ></el-input>
           </el-form-item>
+          <el-form-item label="题卡类型:" label-width="90px">
+            <el-select
+              v-model="filter.cardType"
+              style="width: 120px"
+              placeholder="题卡类型"
+              clearable
+            >
+              <el-option
+                v-for="(val, key) in CARD_TYPE"
+                :key="key"
+                :value="key"
+                :label="val"
+              ></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="创建方式:" label-width="90px">
             <el-select
               v-model="filter.createMethod"
@@ -74,7 +89,9 @@
         ></el-table-column>
         <el-table-column label="课程(代码)">
           <template slot-scope="scope">
-            {{ scope.row.courseName }}({{ scope.row.courseCode }})
+            {{ scope.row.courseName | defaultFieldFilter }}({{
+              scope.row.courseCode | defaultFieldFilter
+            }})
           </template>
         </el-table-column>
         <el-table-column prop="type" label="类型" width="100">
@@ -212,7 +229,10 @@
 </template>
 
 <script>
-import { CARD_CREATE_METHOD_TYPE } from "../../../constants/enumerate";
+import {
+  CARD_CREATE_METHOD_TYPE,
+  CARD_TYPE,
+} from "../../../constants/enumerate";
 import {
   cardListPage,
   deleteCard,
@@ -232,6 +252,7 @@ export default {
     return {
       filter: {
         title: "",
+        cardType: "",
         createMethod: "",
         createStartTime: "",
         createEndTime: "",
@@ -240,6 +261,7 @@ export default {
       size: this.GLOBAL.pageSize,
       total: 0,
       CARD_CREATE_METHOD_TYPE,
+      CARD_TYPE,
       cardList: [],
       curCard: {},
       // date-picker

+ 8 - 8
src/modules/exam/components/ApplyContent.vue

@@ -1003,14 +1003,14 @@ export default {
     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;
-      });
+      //   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;
+      //   });
     },
     toCreateCard(attachment) {
       if (!this.examTask.cardRuleId) {

+ 8 - 8
src/modules/exam/components/ModifyTaskPaper.vue

@@ -538,14 +538,14 @@ export default {
     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;
-      });
+      //   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;
+      //   });
     },
     checkDataValid() {
       // 设置了入库强制包含试卷时,校验试卷是否上传。

+ 8 - 8
src/modules/exam/components/createExamAndPrintTask/InfoExamTask.vue

@@ -540,14 +540,14 @@ export default {
     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;
-      });
+      //   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;
+      //   });
     },
     toCreateCard(attachment) {
       if (!this.examTask.cardRuleId) {