xiatian 2 years ago
parent
commit
68754da8a2

+ 3 - 7
src/modules/questions/views/GenPaperDetail.vue

@@ -888,7 +888,7 @@ export default {
       this.$http.get(url).then((response) => {
       this.$http.get(url).then((response) => {
         this.paperStructs = response.data;
         this.paperStructs = response.data;
         for (let paperStructObj of this.paperStructs) {
         for (let paperStructObj of this.paperStructs) {
-          if (paperStructObj.paperStrucType == "BLUEPRINT") {
+          if (paperStructObj.type == "BLUEPRINT") {
             for (let couProperty of this.coursePropertyList) {
             for (let couProperty of this.coursePropertyList) {
               if (couProperty.id == paperStructObj.coursePropertyId) {
               if (couProperty.id == paperStructObj.coursePropertyId) {
                 this.blueStructs.push(paperStructObj);
                 this.blueStructs.push(paperStructObj);
@@ -1039,10 +1039,6 @@ export default {
         this.$httpWithMsg
         this.$httpWithMsg
           .post(url, this.genPaper)
           .post(url, this.genPaper)
           .then((res) => {
           .then((res) => {
-            this.$notify({
-              message: "组卷成功",
-              type: "success",
-            });
             this.back(res.data.status);
             this.back(res.data.status);
           })
           })
           .finally(() => {
           .finally(() => {
@@ -1060,12 +1056,12 @@ export default {
     back(status) {
     back(status) {
       if ("PASS" == status) {
       if ("PASS" == status) {
         this.$notify({
         this.$notify({
-          message: "上传成功",
+          message: "组卷成功",
           type: "success",
           type: "success",
         });
         });
         this.$router.push({ path: "/questions/gen_paper/1" });
         this.$router.push({ path: "/questions/gen_paper/1" });
       } else {
       } else {
-        this.$confirm("已开启审核功能.是否跳转到待审列表?", "上传成功", {
+        this.$confirm("已开启审核功能.是否跳转到待审列表?", "组卷成功", {
           confirmButtonText: "确定",
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           cancelButtonText: "取消",
           type: "warning",
           type: "warning",

+ 2 - 2
src/modules/questions/views/InsertBluePaperStructureInfo.vue

@@ -331,7 +331,7 @@ export default {
       question: {
       question: {
         questionType: "",
         questionType: "",
         courseId: null,
         courseId: null,
-        coursePropertyName: "",
+        coursePropertyId: "",
         publicity: "",
         publicity: "",
         firstPropertyId: "",
         firstPropertyId: "",
         secondPropertyId: "",
         secondPropertyId: "",
@@ -741,7 +741,7 @@ export default {
     showActiveIn(publicity, difficulty, row) {
     showActiveIn(publicity, difficulty, row) {
       this.question.questionType = this.paperDetailStruct.questionType;
       this.question.questionType = this.paperDetailStruct.questionType;
       this.question.courseId = this.blueStruct.courseId;
       this.question.courseId = this.blueStruct.courseId;
-      this.question.coursePropertyName = this.blueStruct.coursePropertyName;
+      this.question.coursePropertyId = this.blueStruct.coursePropertyId;
       this.question.quesNames = this.paperDetailStruct.quesNames.join(",");
       this.question.quesNames = this.paperDetailStruct.quesNames.join(",");
       console.log("this.question:", this.question);
       console.log("this.question:", this.question);
       if (publicity == 0) {
       if (publicity == 0) {

+ 5 - 14
src/modules/questions/views/InsertPaperStructure.vue

@@ -43,7 +43,7 @@
             v-model.number="paperStruct.totalScore"
             v-model.number="paperStruct.totalScore"
             placeholder="总分"
             placeholder="总分"
             :precision="1"
             :precision="1"
-            :min="0.1"
+            :min="0"
           ></el-input-number>
           ></el-input-number>
         </el-form-item>
         </el-form-item>
         <el-form-item label="制定课程">
         <el-form-item label="制定课程">
@@ -322,7 +322,7 @@ export default {
       console.log(this.paperStructId);
       console.log(this.paperStructId);
       if (this.paperStructId != "add") {
       if (this.paperStructId != "add") {
         //假如没ID就是新增
         //假如没ID就是新增
-        this.$http
+        this.$httpWithMsg
           .put(url, this.paperStruct)
           .put(url, this.paperStruct)
           .then(() => {
           .then(() => {
             this.$notify({
             this.$notify({
@@ -333,16 +333,11 @@ export default {
             this.removeItem();
             this.removeItem();
             this.back();
             this.back();
           })
           })
-          .catch(() => {
-            this.$notify({
-              type: "error",
-              message: "试卷结构名称重复,请重新命名",
-            });
-
+          .finally(() => {
             this.loading = false;
             this.loading = false;
           });
           });
       } else {
       } else {
-        this.$http
+        this.$httpWithMsg
           .post(url, this.paperStruct)
           .post(url, this.paperStruct)
           .then(() => {
           .then(() => {
             this.$notify({
             this.$notify({
@@ -353,12 +348,8 @@ export default {
             this.removeItem();
             this.removeItem();
             this.back();
             this.back();
           })
           })
-          .catch(() => {
+          .finally(() => {
             this.loading = false;
             this.loading = false;
-            this.$notify({
-              type: "error",
-              message: "试卷结构名称重复,请重新命名",
-            });
           });
           });
       }
       }
     },
     },

+ 2 - 2
src/modules/questions/views/InsertPaperStructureInfo.vue

@@ -28,7 +28,7 @@
           <el-input-number
           <el-input-number
             v-model="paperUnitForm.score"
             v-model="paperUnitForm.score"
             :precision="1"
             :precision="1"
-            :min="0.1"
+            :min="0"
             @change="muli"
             @change="muli"
           ></el-input-number>
           ></el-input-number>
         </el-form-item>
         </el-form-item>
@@ -209,7 +209,7 @@
                 v-model.number="paperUnitForm2.score"
                 v-model.number="paperUnitForm2.score"
                 placeholder="请输入每题分值"
                 placeholder="请输入每题分值"
                 :precision="1"
                 :precision="1"
-                :min="0.1"
+                :min="0"
                 @change="muli2"
                 @change="muli2"
               ></el-input-number>
               ></el-input-number>
             </el-form-item>
             </el-form-item>