刘洋 1 год назад
Родитель
Сommit
039f8ec756

+ 3 - 1
src/App.vue

@@ -1,6 +1,8 @@
 <template>
   <div id="app">
-    <keep-alive :include="['Home', 'ExamPaperPendingTrial']">
+    <keep-alive
+      :include="user?.userId ? ['Home', 'ExamPaperPendingTrial'] : []"
+    >
       <router-view />
     </keep-alive>
 

BIN
src/assets/images/paper_edit_warning.png


+ 1 - 1
src/assets/styles/adaptive.scss

@@ -202,7 +202,7 @@
     }
     .edit-body {
       margin: 0 40px;
-      padding-top: 125px;
+      padding-top: 120px !important;
     }
     .edit-part-list {
       margin-bottom: 15px;

+ 2 - 1
src/assets/styles/pages.scss

@@ -262,7 +262,8 @@
       }
     }
     &.is-danger {
-      box-shadow: 0px 0 10px inset #ffa280;
+      // box-shadow: 0px 0 10px inset #ffa280;
+      box-shadow: inset 0px 0px 10px 0px #F76560;
     }
   }
   .edit-property {

+ 1 - 1
src/modules/paper/components/SelectQuestionDialog.vue

@@ -176,7 +176,7 @@
           </el-table-column>
           <el-table-column label="创建人" prop="creator" width="120">
           </el-table-column>
-          <el-table-column label="属性" min-width="150">
+          <el-table-column label="知识点" min-width="150">
             <div
               v-if="scope.row.quesProperties"
               slot-scope="scope"

+ 40 - 1
src/modules/paper/views/EditPaper.vue

@@ -219,7 +219,16 @@
       </div>
     </div>
 
-    <div class="edit-body">
+    <div class="edit-body" style="margin: 0 16px; padding-top: 140px">
+      <div
+        class="edit-warning-wrap"
+        :class="{ hid: this.checkPaperQuestionAllHasScore() }"
+      >
+        <div class="edit-warning">
+          <img src="../../../assets/images/paper_edit_warning.png" />
+          <span>有小题未设置分值</span>
+        </div>
+      </div>
       <!-- 考试说明 -->
       <div class="edit-part-list">
         <div class="edit-part">
@@ -1291,6 +1300,36 @@ export default {
 .edit-paper {
   height: 100vh;
   overflow: auto;
+  .edit-warning-wrap {
+    height: 69px;
+
+    &.hid {
+      height: 0;
+      overflow: hidden;
+      .edit-warning {
+        height: 0;
+        overflow: hidden;
+      }
+    }
+    transition: all 0.3s;
+  }
+  .edit-warning {
+    height: 54px;
+    background: #fdcdc5;
+    border-radius: 8px;
+    padding: 0 15px;
+    display: flex;
+    align-items: center;
+    transition: all 0.3s;
+    img {
+      width: 20px;
+      margin-right: 8px;
+    }
+    span {
+      color: #262626;
+      font-size: 14px;
+    }
+  }
   .edit-part {
     &.level2 {
       padding-bottom: 60px;

+ 11 - 11
src/modules/portal/views/tips/Tips.vue

@@ -130,16 +130,16 @@ const ALL_INSTRUCTIONS = {
         },
       ],
     },
-    {
-      menu1Name: "考试用卷绑定",
-      menu2: [
-        {
-          name: "考试管理——调卷规则",
-          link: "/questions/extract_paper_rule/0",
-          detail: "来指定在本次考试中使用卷库中的哪一套试卷,及抽卷的比例。",
-        },
-      ],
-    },
+    // {
+    //   menu1Name: "考试用卷绑定",
+    //   menu2: [
+    //     {
+    //       name: "考试管理——调卷规则",
+    //       link: "/questions/extract_paper_rule/0",
+    //       detail: "来指定在本次考试中使用卷库中的哪一套试卷,及抽卷的比例。",
+    //     },
+    //   ],
+    // },
   ],
   "/oe/tips": [
     {
@@ -281,8 +281,8 @@ export default {
     },
   },
   created() {
-    console.log("this.$route.path", this.$route.path);
     this.instructions = ALL_INSTRUCTIONS[this.$route.path];
+    this.$store.commit("UPDATE_CURRENT_PATHS", []);
   },
   methods: {},
 };

+ 5 - 1
src/modules/question/components/QuestionInfoEdit.vue

@@ -274,10 +274,14 @@ export default {
             if (item.firstProperty) {
               item.firstProperty = {
                 id: item.firstProperty.id,
+                name: item.firstProperty.name,
               };
             }
             if (item.secondProperty) {
-              item.secondProperty = { id: item.secondProperty.id };
+              item.secondProperty = {
+                id: item.secondProperty.id,
+                name: item.secondProperty.name,
+              };
             }
             return item;
           }

+ 6 - 1
src/modules/questions/views/Course.vue

@@ -76,7 +76,12 @@
           @click="insertCourse"
           >新增</svg-btn
         >
-        <svg-btn name="daoru" @click="importCourse">导入</svg-btn>
+        <svg-btn
+          name="daoru"
+          @click="importCourse"
+          v-if="authButtons.includes('index_course-add_course')"
+          >导入</svg-btn
+        >
         <svg-btn name="daochu" @click="exportCourse">导出</svg-btn>
         <svg-btn name="shanchu" :disabled="noBatchSelected" @click="deleteByIds"
           >删除</svg-btn

+ 30 - 33
src/modules/questions/views/GenPaper.vue

@@ -625,22 +625,24 @@ export default {
         type: "warning",
       }).then(() => {
         this.loading = true;
-        this.$http.put(QUESTION_API + "/paper_storage/recovery/" + row.id).then(
-          () => {
-            this.$notify({
-              message: "操作成功",
-              type: "success",
-            });
-            this.searchGenPaper();
-          },
-          (response) => {
-            this.$notify({
-              message: response.response.data.desc,
-              type: "error",
-            });
-            this.loading = false;
-          }
-        );
+        this.$httpWithMsg
+          .put(QUESTION_API + "/paper_storage/recovery/" + row.id)
+          .then(
+            () => {
+              this.$notify({
+                message: "操作成功",
+                type: "success",
+              });
+              this.searchGenPaper();
+            },
+            (response) => {
+              this.$notify({
+                message: response.response.data.desc,
+                type: "error",
+              });
+              this.loading = false;
+            }
+          );
       });
     },
     recoveryPapers() {
@@ -756,11 +758,13 @@ export default {
       this.currentPage = 1;
       this.loading = true;
       var url = QUESTION_API + "/genPaper/" + pageNo + "/" + this.pageSize;
-      this.$http.get(url, { params: this.formSearch }).then((response) => {
-        this.tableData = response.data.content;
-        this.total = response.data.totalElements;
-        this.currentPage = Number(pageNo);
-      });
+      this.$httpWithMsg
+        .get(url, { params: this.formSearch })
+        .then((response) => {
+          this.tableData = response.data.content;
+          this.total = response.data.totalElements;
+          this.currentPage = Number(pageNo);
+        });
       this.loading = false;
     },
     genPaperDetail() {
@@ -820,7 +824,7 @@ export default {
         type: "warning",
       }).then(() => {
         this.loading = true;
-        this.$http.delete(QUESTION_API + "/paper/" + row.id).then(
+        this.$httpWithMsg.delete(QUESTION_API + "/paper/" + row.id).then(
           () => {
             this.$notify({
               message: "删除成功",
@@ -851,23 +855,16 @@ export default {
           type: "warning",
         }).then(() => {
           this.loading = true;
-          this.$http.delete(QUESTION_API + "/paper/" + paperIds).then(
-            () => {
+          this.$httpWithMsg
+            .delete(QUESTION_API + "/paper/" + paperIds)
+            .then(() => {
               this.$notify({
                 message: "删除成功",
                 type: "success",
               });
               this.searchGenPaper();
               this.selectedPaperIds = [];
-            },
-            (response) => {
-              this.$notify({
-                message: response.response.data.desc,
-                type: "error",
-              });
-              this.loading = false;
-            }
-          );
+            });
         });
       } else {
         this.$notify({

+ 1 - 1
src/modules/questions/views/QuestionInfo.vue

@@ -117,7 +117,7 @@
 
       <div class="line-seperator"></div>
 
-      <el-form-item label="试题关联属性" label-width="100px">
+      <el-form-item label="试题关联知识点" label-width="120px">
         <el-tag
           v-for="(content, propIndex) in quesModel.quesProperties"
           :key="propIndex"