Эх сурвалжийг харах

Merge branch 'dev_v5.0.6' of http://git.qmth.com.cn/examcloud-frontend/examcloud-admin-web into dev_v5.0.6

zhangjie 2 сар өмнө
parent
commit
56f1dde5a2

+ 14 - 0
src/modules/basic/view/school_config.vue

@@ -221,6 +221,12 @@
             <span style="font-size: 14px; line-height: 44px"> 秒</span>
           </el-form-item>
         </div>
+        <el-form-item label="接口同步考生照片是否覆盖" prop="OVERWRITE_PHOTO">
+          <el-radio-group v-model="ruleForm.OVERWRITE_PHOTO" class="input">
+            <el-radio label="true">覆盖</el-radio>
+            <el-radio label="false">不覆盖</el-radio>
+          </el-radio-group>
+        </el-form-item>
 
         <el-form-item>
           <el-button
@@ -335,6 +341,7 @@ export default {
         ACTION_ORDER: "",
         ACTION_DURATION: "",
         ALL_ACTION_DURATION: "",
+        OVERWRITE_PHOTO: true,
       },
       rules: {
         STUDENT_CLIENT_THIRD_PARTY_LOGIN_URL: [
@@ -650,6 +657,13 @@ export default {
             this.ruleForm.ALL_ACTION_DURATION = 120;
           }
 
+          if (response.data.OVERWRITE_PHOTO) {
+            this.ruleForm.OVERWRITE_PHOTO =
+              response.data.OVERWRITE_PHOTO === "true";
+          } else {
+            this.ruleForm.OVERWRITE_PHOTO = true;
+          }
+
           // this.originalRuleForm = Object.assign({}, this.ruleForm);
         } else {
           this.$notify({

+ 122 - 92
src/modules/questions/views/EditPaper.vue

@@ -1266,31 +1266,36 @@ export default {
         }
       }
       if (count == 0) {
-        this.$alert("您确定删除吗?", "提示", {
-          confirmButtonText: "确定",
-          callback: (action) => {
-            if (action == "confirm") {
-              this.loading = true;
-              this.$httpWithMsg
-                .delete(
-                  QUESTION_API +
-                    "/paperDetail/" +
-                    this.paperId +
-                    "/" +
-                    paperDetailsId
-                )
-                .then(() => {
-                  this.initPaper();
-                  this.loading = true;
-                  this.$notify({
-                    message: "删除成功",
-                    type: "success",
-                  });
-                })
-                .finally(() => (this.loading = false));
-            }
-          },
-        });
+        this.$alert(
+          "您确定删除吗?</br><span style='color:red'>保存后请注意检查试卷总分</span>",
+          "提示",
+          {
+            dangerouslyUseHTMLString: true,
+            confirmButtonText: "确定",
+            callback: (action) => {
+              if (action == "confirm") {
+                this.loading = true;
+                this.$httpWithMsg
+                  .delete(
+                    QUESTION_API +
+                      "/paperDetail/" +
+                      this.paperId +
+                      "/" +
+                      paperDetailsId
+                  )
+                  .then(() => {
+                    this.initPaper();
+                    this.loading = true;
+                    this.$notify({
+                      message: "删除成功",
+                      type: "success",
+                    });
+                  })
+                  .finally(() => (this.loading = false));
+              }
+            },
+          }
+        );
       } else {
         this.$alert("大题下还有小题,不可删除!", "提示", {
           confirmButtonText: "确定",
@@ -1633,9 +1638,10 @@ export default {
       }
       if (this.paper.paperType == "GENERATE") {
         this.$confirm(
-          "试题内容修改,会影响所有关联试卷,是否确定进行?",
+          "试题内容修改,会影响所有关联试卷,是否确定进行?</br><span style='color:red'>保存后请注意检查试卷总分</span>",
           "提示",
           {
+            dangerouslyUseHTMLString: true,
             confirmButtonText: "确定",
             cancelButtonText: "取消",
             type: "warning",
@@ -1783,56 +1789,66 @@ export default {
       }
     },
     deleteQues01(paperDetailUnitId) {
-      this.$alert("您确定删除吗?", "提示", {
-        confirmButtonText: "确定",
-        callback: (action) => {
-          if (action == "confirm") {
-            this.loading = true;
-            this.$httpWithMsg
-              .delete(QUESTION_API + "/paperDetailUnit/" + paperDetailUnitId)
-              .then(() => {
-                this.initPaper();
-                this.getreduplicateQuestions();
-                this.reduplicateGroup = [];
-                this.loading = true;
-                this.$notify({
-                  message: "删除成功",
-                  type: "success",
-                });
-              })
-              .finally(() => (this.loading = false));
-          }
-        },
-      });
+      this.$alert(
+        "您确定删除吗?</br><span style='color:red'>保存后请注意检查试卷总分</span>",
+        "提示",
+        {
+          dangerouslyUseHTMLString: true,
+          confirmButtonText: "确定",
+          callback: (action) => {
+            if (action == "confirm") {
+              this.loading = true;
+              this.$httpWithMsg
+                .delete(QUESTION_API + "/paperDetailUnit/" + paperDetailUnitId)
+                .then(() => {
+                  this.initPaper();
+                  this.getreduplicateQuestions();
+                  this.reduplicateGroup = [];
+                  this.loading = true;
+                  this.$notify({
+                    message: "删除成功",
+                    type: "success",
+                  });
+                })
+                .finally(() => (this.loading = false));
+            }
+          },
+        }
+      );
     },
     deleteQues02(questionId, paperDetailUnitId) {
-      this.$alert("您确定删除吗?", "提示", {
-        confirmButtonText: "确定",
-        callback: (action) => {
-          if (action == "confirm") {
-            this.loading = true;
-            this.$httpWithMsg
-              .delete(
-                QUESTION_API +
-                  "/paper/deleteQuestion/" +
-                  paperDetailUnitId +
-                  "/" +
-                  questionId
-              )
-              .then(() => {
-                this.initPaper();
-                this.getreduplicateQuestions();
-                this.reduplicateGroup = [];
-                this.loading = true;
-                this.$notify({
-                  message: "保存成功",
-                  type: "success",
-                });
-              })
-              .finally(() => (this.loading = false));
-          }
-        },
-      });
+      this.$alert(
+        "您确定删除吗?</br><span style='color:red'>保存后请注意检查试卷总分</span>",
+        "提示",
+        {
+          dangerouslyUseHTMLString: true,
+          confirmButtonText: "确定",
+          callback: (action) => {
+            if (action == "confirm") {
+              this.loading = true;
+              this.$httpWithMsg
+                .delete(
+                  QUESTION_API +
+                    "/paper/deleteQuestion/" +
+                    paperDetailUnitId +
+                    "/" +
+                    questionId
+                )
+                .then(() => {
+                  this.initPaper();
+                  this.getreduplicateQuestions();
+                  this.reduplicateGroup = [];
+                  this.loading = true;
+                  this.$notify({
+                    message: "保存成功",
+                    type: "success",
+                  });
+                })
+                .finally(() => (this.loading = false));
+            }
+          },
+        }
+      );
     },
     //获取重复试题
     getreduplicateQuestions() {
@@ -1896,24 +1912,38 @@ export default {
     },
     //保存试卷
     savePaper() {
-      this.loading = true;
-      this.$http
-        .put(QUESTION_API + "/paper", this.paper)
-        .then(() => {
-          this.$notify({
-            message: "保存成功",
-            type: "success",
-          });
-          this.loading = false;
-          this.initPaper();
-        })
-        .catch((error) => {
-          this.loading = false;
-          this.$notify({
-            type: "error",
-            message: error.response.data.desc,
-          });
-        });
+      this.$confirm(
+        "<span style='color:red'>当前试卷总分为" +
+          this.paper.totalScore +
+          ",是否保存?</span>",
+        "提示",
+        {
+          dangerouslyUseHTMLString: true,
+          confirmButtonText: "是",
+          cancelButtonText: "否",
+          type: "warning",
+        }
+      ).then(() => {
+        this.loading = true;
+        this.$http
+          .put(QUESTION_API + "/paper", this.paper)
+          .then(() => {
+            this.$notify({
+              message: "保存成功",
+              type: "success",
+            });
+            this.loading = false;
+            this.initPaper();
+          })
+          .catch((error) => {
+            this.loading = false;
+            this.$notify({
+              type: "error",
+              message: error.response.data.desc,
+            });
+          })
+          .finally(() => (this.loading = false));
+      });
     },
     //删除试卷
     deletePaper(id) {

+ 86 - 1
src/modules/questions/views/GenPaper.vue

@@ -8,7 +8,7 @@
         :inline="true"
         :model="formSearch"
         label-position="right"
-        label-width="70px"
+        label-width="90px"
       >
         <el-row>
           <el-col :span="6">
@@ -113,6 +113,20 @@
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="6">
+            <el-form-item label="小程序作答">
+              <el-select
+                v-model="formSearch.appAnswer"
+                class="search_width"
+                clearable
+                placeholder="请选择"
+                size="small"
+              >
+                <el-option value="true" label="是"> </el-option>
+                <el-option value="false" label="否"> </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
           <el-col :span="6">
             <div class="search_down">
               <el-button size="small" type="primary" @click="searchFrom"
@@ -239,6 +253,11 @@
             }}</span>
           </template>
         </el-table-column>
+        <el-table-column label="小程序作答" width="100">
+          <template slot-scope="scope">
+            <span>{{ scope.row.appAnswer == true ? "是" : "否" }}</span>
+          </template>
+        </el-table-column>
         <el-table-column label="录入员" width="150">
           <template slot-scope="scope">
             <span>{{ scope.row.creator }}</span>
@@ -338,6 +357,15 @@
                       ><i class="el-icon-delete"></i> 删除</el-button
                     >
                   </el-dropdown-item> -->
+                  <el-dropdown-item>
+                    <el-button
+                      size="mini"
+                      type="primary"
+                      plain
+                      @click="openMarkAppDialog(scope.row)"
+                      ><i class="el-icon-share"></i>标记小程序上传</el-button
+                    >
+                  </el-dropdown-item>
                 </el-dropdown-menu>
               </el-dropdown>
             </div>
@@ -357,6 +385,25 @@
         </el-pagination>
       </div>
     </div>
+    <el-dialog title="标记小程序上传" :visible.sync="markAppDialog">
+      <el-form :model="markAppModel" label-position="right" label-width="280px">
+        <el-row>
+          <el-col :md="24">
+            <el-form-item label="当前试卷是否包含需要小程序作答的试题">
+              <el-radio-group v-model="markAppModel.appAnswer" class="input">
+                <el-radio label="true">是</el-radio>
+                <el-radio label="false">否</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :md="24" class="text-center">
+            <el-button type="primary" @click="markApp">确定</el-button>
+          </el-col>
+        </el-row>
+      </el-form>
+    </el-dialog>
     <el-dialog title="导出" :visible.sync="exportDialog">
       <el-form :model="exportModel" label-position="right" label-width="80px">
         <el-row v-if="isShow">
@@ -568,6 +615,7 @@ export default {
       isClear: 0,
       courseLoading: false,
       formSearch: {
+        appAnswer: "",
         auditStatus: "",
         courseNo: "",
         courseName: "",
@@ -593,6 +641,11 @@ export default {
       },
       uploadData: {},
       fileLoading: false,
+      markAppDialog: false,
+      markAppModel: {
+        paperId: null,
+        appAnswer: false,
+      },
       exportDialog: false,
       exportModel: {
         id: "",
@@ -995,6 +1048,12 @@ export default {
           this.courseLoading = false;
         });
     },
+
+    openMarkAppDialog(row) {
+      this.markAppDialog = true;
+      this.markAppModel.appAnswer = row.appAnswer == true ? "true" : "false";
+      this.markAppModel.paperId = row.id;
+    },
     //打开导出弹框
     openExportDialog(row) {
       this.isShow = true;
@@ -1027,6 +1086,32 @@ export default {
       this.isShowPrintExamPackagePassword = false;
       this.printExamPackagePassword = "";
     },
+    markApp() {
+      this.loading = true;
+      let param = new URLSearchParams({
+        paperId: this.markAppModel.paperId,
+        appAnswer: this.markAppModel.appAnswer,
+      });
+      this.$http.post(QUESTION_API + "/paper/mark/app-answer", param).then(
+        () => {
+          this.$notify({
+            message: "标记成功",
+            type: "success",
+          });
+          this.searchGenPaper();
+          this.loading = false;
+          this.markAppDialog = false;
+        },
+        (response) => {
+          this.$notify({
+            message: response.response.data.desc,
+            type: "error",
+          });
+          this.markAppDialog = false;
+          this.loading = false;
+        }
+      );
+    },
     //导出试卷,答案,机考数据包
     exportPaperInfo() {
       if (this.exportModel.exportContentList.length == 0) {

+ 10 - 5
src/modules/questions/views/SelectQuestion.vue

@@ -314,11 +314,16 @@ export default {
           message: "请选择要添加的试题",
         });
       } else {
-        this.$confirm("是否添加这些试题?", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }).then(() => {
+        this.$confirm(
+          "是否添加这些试题?</br><span style='color:red'>保存后请注意检查试卷总分</span>",
+          "提示",
+          {
+            dangerouslyUseHTMLString: true,
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
+          }
+        ).then(() => {
           this.$httpWithMsg
             .post(
               QUESTION_API +