zhangjie před 4 roky
rodič
revize
71424edf1e

+ 2 - 6
card/assets/styles/card-design.scss

@@ -418,15 +418,11 @@
       padding-right: 0;
     }
     &:nth-of-type(2) {
-      left: 25%;
+      left: 33.3%;
       transform: translateX(-50%);
     }
     &:nth-of-type(3) {
-      left: 50%;
-      transform: translateX(-50%);
-    }
-    &:nth-of-type(4) {
-      left: 75%;
+      left: 66.7%;
       transform: translateX(-50%);
     }
   }

+ 1 - 1
card/views/CardDesign.vue

@@ -294,7 +294,7 @@ export default {
       ELEMENT_LIST,
       TOPIC_LIST,
       topicList: [],
-      steps: ["添加标题", "基本设置", "试题配置", "设置阅卷参数", "预览生成"],
+      steps: ["添加标题", "基本设置", "试题配置", "预览生成"],
       columnWidth: 0,
       cardPreviewUrl: "",
       isSubmit: false,

+ 1 - 1
src/modules/base/components/ModifyUser.vue

@@ -74,7 +74,7 @@
               v-for="item in courses"
               :key="item.id"
               :value="item.id"
-              :label="item.name"
+              :label="`${item.name}(${item.code})`"
             >
             </el-option>
           </el-select>

+ 7 - 2
src/modules/exam/components/ModifyExamTask.vue

@@ -178,11 +178,16 @@ export default {
                 return callback();
               }
 
-              if (/^[0-9a-zA-Z]{3,30}$/.test(value)) {
+              if (value.length < 200) {
                 callback();
               } else {
-                callback(new Error("试卷编号只能包含字母数字,长度在3-30之间"));
+                callback(new Error("试卷编号长度不能超过200"));
               }
+              // if (/^[0-9a-zA-Z]{3,30}$/.test(value)) {
+              //   callback();
+              // } else {
+              //   callback(new Error("试卷编号只能包含字母数字,长度在3-30之间"));
+              // }
             },
             trigger: "change"
           }

+ 11 - 1
src/modules/exam/components/UploadPaperDialog.vue

@@ -4,7 +4,7 @@
     :visible.sync="modalIsShow"
     :title="`上传${curConfig.title}`"
     top="10vh"
-    width="520px"
+    width="600px"
     :close-on-click-modal="false"
     :close-on-press-escape="false"
     append-to-body
@@ -24,6 +24,7 @@
         @upload-success="uploadSuccess"
         ref="UploadFileView"
       ></upload-file-view>
+      <el-button @click="toPreview" style="margin-left: 10px;">预览</el-button>
     </div>
     <div slot="footer">
       <el-button type="primary" @click="confirm" :disabled="loading"
@@ -36,6 +37,7 @@
 
 <script>
 import UploadFileView from "@/components/UploadFileView";
+import { attachmentPreview } from "../../login/api";
 
 export default {
   name: "upload-paper-dialog",
@@ -116,6 +118,14 @@ export default {
     confirm() {
       this.$emit("confirm", this.attachment, this.uploadType);
       this.cancel();
+    },
+    async toPreview() {
+      if (!this.attachment.attachmentId) {
+        this.$message.error(`请先上传${this.curConfig.title}!`);
+        return;
+      }
+      const data = await attachmentPreview(this.attachment.attachmentId);
+      window.open(data.url);
     }
   }
 };