Browse Source

lint format

deason 4 năm trước cách đây
mục cha
commit
eec8a29aa9

+ 31 - 31
src/modules/basic/view/resource_list.vue

@@ -234,10 +234,10 @@ import { mapState } from "vuex";
 export default {
   name: "ResourceList",
   data() {
-    var validateFile = function (rule, value, callback) {
+    var validateFile = function(rule, value, callback) {
       if (value) {
         var upFileName = value.name;
-        var reg = /^[a-zA-Z\-_0-9\.]{1,50}$/;
+        var reg = /^[a-zA-Z\\-_0-9\\.]{1,50}$/;
         if (!upFileName.match(reg)) {
           return callback(
             new Error("文件名长度最大为50且只能包含字母,数字,'-','_','.'")
@@ -265,16 +265,16 @@ export default {
         parentId: -1,
         rootOrgId: null,
         code: "",
-        name: "",
+        name: ""
       },
       dirForm: {
         dirName: "",
-        loading: false,
+        loading: false
       },
       fileForm: {
         fileName: null,
         dataFile: null,
-        loading: false,
+        loading: false
       },
       loading: true,
       tableData: [],
@@ -288,9 +288,9 @@ export default {
           {
             pattern: /^[a-zA-Z\\-_0-9]{1,50}$/,
             message: "目录名称必须为1-50位字母,数字,'-','_'组合",
-            trigger: "blur",
-          },
-        ],
+            trigger: "blur"
+          }
+        ]
       },
       fileRules: {
         dataFile: [
@@ -298,22 +298,22 @@ export default {
             required: true,
             type: "object",
             message: "请选择文件",
-            trigger: "change",
+            trigger: "change"
           },
           {
             validator: validateFile,
             type: "object",
-            trigger: "change",
-          },
-        ],
-      },
+            trigger: "change"
+          }
+        ]
+      }
     };
   },
   computed: {
-    ...mapState({ user: (state) => state.user }),
+    ...mapState({ user: state => state.user }),
     isSuperAdmin() {
-      return this.user.roleList.some((role) => role.roleCode == "SUPER_ADMIN");
-    },
+      return this.user.roleList.some(role => role.roleCode == "SUPER_ADMIN");
+    }
   },
   methods: {
     handleUploadFile(file) {
@@ -341,7 +341,7 @@ export default {
         .then(() => {
           this.$notify({
             type: "success",
-            message: "上传成功!",
+            message: "上传成功!"
           });
           this.closeFileModel();
           this.searchForm();
@@ -371,12 +371,12 @@ export default {
         .post(url, {
           parentId: this.formSearch.parentId,
           rootOrgId: this.formSearch.rootOrgId,
-          name: this.dirForm.dirName,
+          name: this.dirForm.dirName
         })
         .then(() => {
           this.$notify({
             type: "success",
-            message: "新增成功!",
+            message: "新增成功!"
           });
           this.closeDirModel();
           this.searchForm();
@@ -406,13 +406,13 @@ export default {
       this.$confirm("确定删除?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       }).then(() => {
         var url = CORE_API + "/resource/" + row.id;
         this.$httpWithMsg.delete(url).then(() => {
           this.$notify({
             type: "success",
-            message: "删除成功!",
+            message: "删除成功!"
           });
           this.searchForm();
         });
@@ -428,7 +428,7 @@ export default {
       if (this.formSearch.rootOrgId == null) {
         this.$notify({
           type: "warning",
-          message: "请选择学校",
+          message: "请选择学校"
         });
         return;
       }
@@ -438,7 +438,7 @@ export default {
       if (this.formSearch.rootOrgId == null) {
         this.$notify({
           type: "warning",
-          message: "请选择学校",
+          message: "请选择学校"
         });
         return;
       }
@@ -462,7 +462,7 @@ export default {
       if (this.formSearch.rootOrgId == null) {
         this.$notify({
           type: "warning",
-          message: "请选择学校",
+          message: "请选择学校"
         });
         return;
       }
@@ -479,12 +479,12 @@ export default {
         param;
       this.$httpWithMsg
         .get(url)
-        .then((response) => {
+        .then(response => {
           this.tableData = response.data.list;
           this.total = response.data.total;
           this.loading = false;
 
-          this.$nextTick(function () {
+          this.$nextTick(function() {
             this.paginationShow = true;
           });
         })
@@ -494,14 +494,14 @@ export default {
       if (this.isSuperAdmin) {
         this.$httpWithMsg
           .get(CORE_API + "/org/getRootOrgList")
-          .then((response) => {
+          .then(response => {
             this.rootOrgList = response.data;
           });
       } else {
         this.formSearch.rootOrgId = this.user.rootOrgId;
         this.searchForm();
       }
-    },
+    }
   },
   watch: {
     "formSearch.rootOrgId": {
@@ -514,13 +514,13 @@ export default {
           this.formSearch.parentId = -1;
           this.handleSearchBtn();
         }
-      },
-    },
+      }
+    }
   },
   //初始化查询
   created() {
     this.init();
-  },
+  }
 };
 </script>
 

+ 36 - 12
src/modules/examwork/view/onlineExam.vue

@@ -245,7 +245,9 @@
                       auto-complete="off"
                       class="input"
                     >
-                      <template slot="append">分钟</template>
+                      <template slot="append"
+                        >分钟</template
+                      >
                     </el-input>
                   </el-form-item>
                 </el-row>
@@ -261,7 +263,9 @@
                       auto-complete="off"
                       class="input"
                     >
-                      <template slot="append">次</template>
+                      <template slot="append"
+                        >次</template
+                      >
                     </el-input>
                   </el-form-item>
                 </el-row>
@@ -277,7 +281,9 @@
                       auto-complete="off"
                       class="input"
                     >
-                      <template slot="append">分钟</template>
+                      <template slot="append"
+                        >分钟</template
+                      >
                     </el-input>
                   </el-form-item>
                 </el-row>
@@ -293,7 +299,9 @@
                       auto-complete="off"
                       class="input"
                     >
-                      <template slot="append">分钟</template>
+                      <template slot="append"
+                        >分钟</template
+                      >
                     </el-input>
                   </el-form-item>
                 </el-row>
@@ -309,7 +317,9 @@
                       auto-complete="off"
                       class="input"
                     >
-                      <template slot="append">次</template>
+                      <template slot="append"
+                        >次</template
+                      >
                     </el-input>
                   </el-form-item>
                 </el-row>
@@ -520,7 +530,9 @@
                       auto-complete="off"
                       class="input"
                     >
-                      <template slot="append">分钟</template>
+                      <template slot="append"
+                        >分钟</template
+                      >
                     </el-input>
                   </el-form-item>
                 </el-row>
@@ -536,7 +548,9 @@
                       auto-complete="off"
                       class="input"
                     >
-                      <template slot="append">%</template>
+                      <template slot="append"
+                        >%</template
+                      >
                     </el-input>
                   </el-form-item>
                 </el-row>
@@ -552,7 +566,9 @@
                       auto-complete="off"
                       class="input"
                     >
-                      <template slot="append">%</template>
+                      <template slot="append"
+                        >%</template
+                      >
                     </el-input>
                   </el-form-item>
                 </el-row>
@@ -595,7 +611,9 @@
                       auto-complete="off"
                       class="input"
                     >
-                      <template slot="append">分钟</template>
+                      <template slot="append"
+                        >分钟</template
+                      >
                     </el-input>
                   </el-form-item>
                 </el-row>
@@ -618,7 +636,9 @@
                       auto-complete="off"
                       class="input"
                     >
-                      <template slot="append">分钟</template>
+                      <template slot="append"
+                        >分钟</template
+                      >
                     </el-input>
                   </el-form-item>
                 </el-row>
@@ -663,7 +683,9 @@
                       auto-complete="off"
                       class="input"
                     >
-                      <template slot="append">分钟</template>
+                      <template slot="append"
+                        >分钟</template
+                      >
                     </el-input>
                   </el-form-item>
                 </el-row>
@@ -687,7 +709,9 @@
                       auto-complete="off"
                       class="input"
                     >
-                      <template slot="append">分钟</template>
+                      <template slot="append"
+                        >分钟</template
+                      >
                     </el-input>
                   </el-form-item>
                 </el-row>

+ 15 - 5
src/modules/examwork/view/onlineHomework.vue

@@ -228,7 +228,9 @@
                       auto-complete="off"
                       class="input"
                     >
-                      <template slot="append">分钟</template>
+                      <template slot="append"
+                        >分钟</template
+                      >
                     </el-input>
                   </el-form-item>
                 </el-row>
@@ -244,7 +246,9 @@
                       auto-complete="off"
                       class="input"
                     >
-                      <template slot="append">次</template>
+                      <template slot="append"
+                        >次</template
+                      >
                     </el-input>
                   </el-form-item>
                 </el-row>
@@ -260,7 +264,9 @@
                       auto-complete="off"
                       class="input"
                     >
-                      <template slot="append">分钟</template>
+                      <template slot="append"
+                        >分钟</template
+                      >
                     </el-input>
                   </el-form-item>
                 </el-row>
@@ -276,7 +282,9 @@
                       auto-complete="off"
                       class="input"
                     >
-                      <template slot="append">分钟</template>
+                      <template slot="append"
+                        >分钟</template
+                      >
                     </el-input>
                   </el-form-item>
                 </el-row>
@@ -292,7 +300,9 @@
                       auto-complete="off"
                       class="input"
                     >
-                      <template slot="append">次</template>
+                      <template slot="append"
+                        >次</template
+                      >
                     </el-input>
                   </el-form-item>
                 </el-row>

+ 37 - 29
src/modules/examwork/view/practiceExam.vue

@@ -153,7 +153,9 @@
                       class="input"
                       v-model.trim.number="form.duration"
                       auto-complete="off"
-                      ><template slot="append">分钟</template></el-input
+                      ><template slot="append"
+                        >分钟</template
+                      ></el-input
                     >
                   </el-form-item>
                 </el-row>
@@ -168,7 +170,9 @@
                       class="input"
                       v-model.trim.number="form.examTimes"
                       auto-complete="off"
-                      ><template slot="append">次</template></el-input
+                      ><template slot="append"
+                        >次</template
+                      ></el-input
                     >
                   </el-form-item>
                 </el-row>
@@ -183,7 +187,9 @@
                       class="input"
                       v-model.trim.number="form.properties.FREEZE_TIME"
                       auto-complete="off"
-                      ><template slot="append">分钟</template></el-input
+                      ><template slot="append"
+                        >分钟</template
+                      ></el-input
                     >
                   </el-form-item>
                 </el-row>
@@ -198,7 +204,9 @@
                       class="input"
                       v-model.trim.number="form.properties.EXAM_RECONNECT_TIME"
                       auto-complete="off"
-                      ><template slot="append">分钟</template></el-input
+                      ><template slot="append"
+                        >分钟</template
+                      ></el-input
                     >
                   </el-form-item>
                 </el-row>
@@ -399,14 +407,14 @@ let validateExamReconnectTime = (rule, value, callback) => {
 export default {
   components: {
     ckeditor,
-    LinkTitlesCustom,
+    LinkTitlesCustom
   },
   data() {
     return {
       style: {
         label_width_tab1: "80px",
         label_width_tab2: "110px",
-        label_width_tab3: "120px",
+        label_width_tab3: "120px"
       },
       activeName: "tab1",
       toActiveName: null,
@@ -427,8 +435,8 @@ export default {
           BEFORE_EXAM_REMARK: "",
           AFTER_EXAM_REMARK: "",
           IS_OBJ_SCORE_VIEW: "true",
-          PRACTICE_TYPE: "IN_PRACTICE",
-        },
+          PRACTICE_TYPE: "IN_PRACTICE"
+        }
       },
       examTypeList: EXAM_TYPE,
       examId: "",
@@ -439,26 +447,26 @@ export default {
           {
             required: true,
             validator: validateExamDatetimeRange,
-            trigger: "blur",
-          },
+            trigger: "blur"
+          }
         ],
         duration: [
-          { required: true, validator: validateDuration, trigger: "blur" },
+          { required: true, validator: validateDuration, trigger: "blur" }
         ],
         examTimes: [
-          { required: true, validator: validateExamTimes, trigger: "blur" },
+          { required: true, validator: validateExamTimes, trigger: "blur" }
         ],
         FREEZE_TIME: [
-          { required: true, validator: validateFreezeTime, trigger: "blur" },
+          { required: true, validator: validateFreezeTime, trigger: "blur" }
         ],
         EXAM_RECONNECT_TIME: [
           {
             required: true,
             validator: validateExamReconnectTime,
-            trigger: "blur",
-          },
-        ],
-      },
+            trigger: "blur"
+          }
+        ]
+      }
     };
   },
 
@@ -466,7 +474,7 @@ export default {
     init() {
       if (this.examId != "add") {
         let url = EXAM_WORK_API + "/exam/" + this.examId;
-        this.$httpWithMsg.get(url).then((response) => {
+        this.$httpWithMsg.get(url).then(response => {
           let body = response.data;
           body.properties = this.form.properties;
           this.form = Object.assign(this.form, response.data);
@@ -475,7 +483,7 @@ export default {
           console.log("getOnlineExam(); form: ", this.form);
 
           let url = EXAM_WORK_API + "/exam/allProperties/" + this.examId;
-          this.$httpWithMsg.get(url).then((response) => {
+          this.$httpWithMsg.get(url).then(response => {
             this.form.properties = Object.assign(
               this.form.properties,
               response.data
@@ -489,40 +497,40 @@ export default {
         this.show_ckeditor = true;
       }
     },
-    saveExam: function () {
+    saveExam: function() {
       this.toActiveName = null;
       this.form.beginTime = this.examDatetimeRange[0];
       this.form.endTime = this.examDatetimeRange[1];
       console.log(this.form);
       let url = EXAM_WORK_API + "/exam";
-      this.$refs.form.validate((valid) => {
+      this.$refs.form.validate(valid => {
         if (valid) {
           if (this.examId != "add") {
-            this.$httpWithMsg.put(url, this.form).then((response) => {
+            this.$httpWithMsg.put(url, this.form).then(response => {
               if (200 != response.status) {
                 this.$notify({
                   type: "error",
-                  message: response.body.desc,
+                  message: response.body.desc
                 });
                 return;
               }
               this.$notify({
                 type: "success",
-                message: "保存成功",
+                message: "保存成功"
               });
             });
           } else {
             this.form.code = this.form.name;
-            this.$httpWithMsg.post(url, this.form).then((response) => {
+            this.$httpWithMsg.post(url, this.form).then(response => {
               console.log(response);
               this.$notify({
                 type: "success",
-                message: "新增成功",
+                message: "新增成功"
               });
               this.examId = response.data.id;
               this.form.id = this.examId;
               this.$router.push({
-                path: "/examwork/practiceExam/" + response.data.id,
+                path: "/examwork/practiceExam/" + response.data.id
               });
             });
           }
@@ -533,13 +541,13 @@ export default {
     },
     back() {
       this.$router.push({ path: "/examwork/examInfo" });
-    },
+    }
   },
   created() {
     _this = this;
     this.examId = this.$route.params.id;
     this.init();
-  },
+  }
 };
 </script>
 <style scoped>

+ 58 - 60
src/modules/marking/views/MarkWork.vue

@@ -272,13 +272,13 @@ export default {
   data() {
     return {
       formSearch: {
-        name: "",
+        name: ""
       },
       formMarkWork: {
         examType: "",
         name: "",
         examIds: [],
-        remark: "",
+        remark: ""
       },
       rules: {
         name: [{ required: true, message: "请输入名称", trigger: "blur" }],
@@ -287,23 +287,23 @@ export default {
             required: true,
             message: "请选择考试批次",
             trigger: "change",
-            type: "array",
-          },
+            type: "array"
+          }
         ],
         examType: [
           {
             required: true,
             message: "请选择考试类型",
             trigger: "change",
-            type: "string",
-          },
-        ],
+            type: "string"
+          }
+        ]
       },
       statusList: [
         { code: 0, name: "创建中" },
         { code: 1, name: "创建成功" },
         { code: 2, name: "创建失败" },
-        { code: 3, name: "追加中" },
+        { code: 3, name: "追加中" }
       ],
       examSelect: [],
       tableData: [],
@@ -318,18 +318,18 @@ export default {
       loading: false,
       closeClickModal: false,
       saveLoading: false,
-      oldWorkName: "",
+      oldWorkName: ""
     };
   },
   computed: {
-    ...mapState({ user: (state) => state.user }),
+    ...mapState({ user: state => state.user })
   },
   methods: {
     settingMarkWork(row) {
       if (Number.parseInt(row.status) != 1) {
         this.$notify({
           message: "该评卷工作未完成,不能进行设置.",
-          type: "warning",
+          type: "warning"
         });
         return;
       }
@@ -339,7 +339,7 @@ export default {
         "/" +
         encodeURIComponent(row.name);
       this.$router.push({
-        path: url,
+        path: url
       });
     },
     getStatus(code) {
@@ -364,7 +364,7 @@ export default {
         .then(() => {
           this.$notify({
             message: "操作成功",
-            type: "success",
+            type: "success"
           });
           this.initMarkWorkData();
           this.loading = false;
@@ -375,7 +375,7 @@ export default {
       this.$http.put(DATA_PROCESS_API + "/markWorks/" + row.id).then(() => {
         this.$notify({
           message: "操作成功",
-          type: "success",
+          type: "success"
         });
         this.initMarkWorkData();
         this.loading = false;
@@ -400,25 +400,23 @@ export default {
       if (this.formMarkWork.examType) {
         params = params + "&examType=" + this.formMarkWork.examType;
       }
-      this.$http
-        .get(DATA_PROCESS_API + "/exam/all" + params)
-        .then((response) => {
-          response.data.forEach((element, index) => {
-            tempSelect[index] = {
-              value: element.id,
-              label: element.name,
-            };
-          });
-          this.examSelect = tempSelect;
-          //this.loading = false;
+      this.$http.get(DATA_PROCESS_API + "/exam/all" + params).then(response => {
+        response.data.forEach((element, index) => {
+          tempSelect[index] = {
+            value: element.id,
+            label: element.name
+          };
         });
+        this.examSelect = tempSelect;
+        //this.loading = false;
+      });
     },
     initMarkWorkData() {
       var orgId = this.user.rootOrgId;
       this.loading = true;
       this.$http
         .get(DATA_PROCESS_API + "/markWorks?orgId=" + orgId)
-        .then((response) => {
+        .then(response => {
           console.log(response);
           this.totalTableData = response.data;
           this.total = response.data.length;
@@ -435,10 +433,10 @@ export default {
           .get(
             MARKING_API + "/markWorks/getWorkList?workIds=" + creatingWorkIds
           )
-          .then((response) => {
-            response.data.forEach((element) => {
+          .then(response => {
+            response.data.forEach(element => {
               if (element.status != 0) {
-                this.tableData.forEach((e) => {
+                this.tableData.forEach(e => {
                   if (e.id == element.id) {
                     e.status = element.status;
                   }
@@ -453,7 +451,7 @@ export default {
     },
     getCreatingWorkId() {
       var tempData = [];
-      this.tableData.forEach((element) => {
+      this.tableData.forEach(element => {
         if (element.status == 0) {
           tempData.push(element.id);
         }
@@ -465,7 +463,7 @@ export default {
       this.paging();
     },
     filterMarkWork() {
-      var tempData = this.totalTableData.filter((element) => {
+      var tempData = this.totalTableData.filter(element => {
         if (this.formSearch.name) {
           return element.name.includes(this.formSearch.name);
         } else {
@@ -520,14 +518,14 @@ export default {
       if (Number.parseInt(row.status) == 0) {
         this.$notify({
           message: "创建中的评卷工作不能删除!",
-          type: "error",
+          type: "error"
         });
         return;
       }
       this.$confirm("确认删除评卷工作?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       }).then(() => {
         this.loading = true;
         this.$http
@@ -535,14 +533,14 @@ export default {
           .then(() => {
             this.$notify({
               message: "删除成功",
-              type: "success",
+              type: "success"
             });
             this.initMarkWorkData();
           })
-          .catch((e) => {
+          .catch(e => {
             this.$notify({
               message: e.response.data.desc,
-              type: "error",
+              type: "error"
             });
           });
         this.loading = false;
@@ -552,7 +550,7 @@ export default {
       this.$confirm("确认结束评卷工作?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       }).then(() => {
         this.loading = true;
         this.$http
@@ -560,14 +558,14 @@ export default {
           .then(() => {
             this.$notify({
               message: "操作成功",
-              type: "success",
+              type: "success"
             });
             this.initMarkWorkData();
           })
-          .catch((e) => {
+          .catch(e => {
             this.$notify({
               message: e.response.data.desc,
-              type: "error",
+              type: "error"
             });
           });
         this.loading = false;
@@ -577,7 +575,7 @@ export default {
       this.$confirm("确认开启评卷工作?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       }).then(() => {
         this.loading = true;
         this.$http
@@ -585,14 +583,14 @@ export default {
           .then(() => {
             this.$notify({
               message: "操作成功",
-              type: "success",
+              type: "success"
             });
             this.initMarkWorkData();
           })
-          .catch((e) => {
+          .catch(e => {
             this.$notify({
               message: e.response.data.desc,
-              type: "error",
+              type: "error"
             });
           });
         this.loading = false;
@@ -602,27 +600,27 @@ export default {
       if (!(Number.parseInt(row.progress) == 100)) {
         this.$notify({
           message: "进度未达到100%,不能进行成绩发布",
-          type: "error",
+          type: "error"
         });
         return;
       }
       this.$confirm("确认成绩发布?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       }).then(() => {
         this.loading = true;
         this.$http.post(MARKING_API + "/markWorks/" + row.id + "/publish").then(
           () => {
             this.$notify({
               message: "成绩发布成功",
-              type: "success",
+              type: "success"
             });
           },
           () => {
             this.$notify({
               message: "成绩发布失败",
-              type: "error",
+              type: "error"
             });
           }
         );
@@ -635,7 +633,7 @@ export default {
         if (workList.name == workName) {
           this.$notify({
             message: "评卷工作名称已存在,请重新输入!",
-            type: "warning",
+            type: "warning"
           });
           return true;
         }
@@ -643,7 +641,7 @@ export default {
       return false;
     },
     saveMarkWork() {
-      this.$refs.formMarkWork.validate((valid) => {
+      this.$refs.formMarkWork.validate(valid => {
         if (valid) {
           var newWorkName = this.formMarkWork.name;
           if (newWorkName != this.oldWorkName) {
@@ -664,17 +662,17 @@ export default {
                 () => {
                   this.$notify({
                     message: "评卷工作保存成功",
-                    type: "success",
+                    type: "success"
                   });
                   this.closeMarkWork();
                   this.initMarkWorkData();
                   this.loading = false;
                   this.saveLoading = false;
                 },
-                (error) => {
+                error => {
                   this.$notify({
                     message: error.response.data,
-                    type: "error",
+                    type: "error"
                   });
                   this.loading = false;
                   this.saveLoading = false;
@@ -687,17 +685,17 @@ export default {
                 () => {
                   this.$notify({
                     message: "评卷工作新增成功",
-                    type: "success",
+                    type: "success"
                   });
                   this.closeMarkWork();
                   this.initMarkWorkData();
                   this.loading = false;
                   this.saveLoading = false;
                 },
-                (error) => {
+                error => {
                   this.$notify({
                     message: error.response.data,
-                    type: "error",
+                    type: "error"
                   });
                   this.loading = false;
                   this.saveLoading = false;
@@ -717,7 +715,7 @@ export default {
         //编辑
         this.formMarkWork = Object.assign(this.formMarkWork, {
           remark: "",
-          name: "",
+          name: ""
         });
         this.$refs["formMarkWork"].clearValidate();
       } else {
@@ -725,7 +723,7 @@ export default {
         this.formMarkWork = Object.assign(this.formMarkWork, {
           remark: "",
           examName: "",
-          name: "",
+          name: ""
         });
         this.$refs["formMarkWork"].clearValidate();
       }
@@ -740,11 +738,11 @@ export default {
       this.pageSize = val;
       this.filterMarkWork();
       this.paging();
-    },
+    }
   },
   created() {
     this.initMarkWorkData();
-  },
+  }
 };
 </script>
 <style scoped>

+ 65 - 65
src/modules/oe/views/examSummary.vue

@@ -256,11 +256,11 @@ export default {
       pieOptions: {},
       exportOrgLoading: false,
       exportCourseLoading: false,
-      examSyncPercentage: 0,
+      examSyncPercentage: 0
     };
   },
   computed: {
-    ...mapState({ user: (state) => state.user }),
+    ...mapState({ user: state => state.user })
   },
   methods: {
     getExams(examName) {
@@ -271,10 +271,10 @@ export default {
         .get("/api/ecs_exam_work/exam/queryByNameLike", {
           params: {
             name: examName,
-            examTypes: "ONLINE#OFFLINE#ONLINE_HOMEWORK",
-          },
+            examTypes: "ONLINE#OFFLINE#ONLINE_HOMEWORK"
+          }
         })
-        .then((response) => {
+        .then(response => {
           this.examList = response.data;
         });
     },
@@ -288,10 +288,10 @@ export default {
           params: {
             name: orgName,
             rootOrgId: rootOrgId,
-            enable: true,
-          },
+            enable: true
+          }
         })
-        .then((response) => {
+        .then(response => {
           this.orgList = response.data;
         });
     },
@@ -306,7 +306,7 @@ export default {
             "&orgId=" +
             this.orgId
         )
-        .then((response) => {
+        .then(response => {
           if (response.data && response.data.length > 0) {
             this.orgExamInfos = response.data;
           } else {
@@ -319,10 +319,10 @@ export default {
         .get("/api/ecs_oe_admin/exam/student/courseProgress/list", {
           params: {
             examId: this.examId,
-            courseId: this.courseId,
-          },
+            courseId: this.courseId
+          }
         })
-        .then((response) => {
+        .then(response => {
           if (response.data && response.data.length > 0) {
             this.courseProgressList = response.data;
             this.buildLine(response.data);
@@ -340,10 +340,10 @@ export default {
         .get("/api/ecs_oe_admin/exam/student/findCoursesByExamIdAndOrgId", {
           params: {
             examId: this.examId,
-            orgId: this.orgId,
-          },
+            orgId: this.orgId
+          }
         })
-        .then((response) => {
+        .then(response => {
           if (response.data && response.data.length > 0) {
             this.courseList = response.data;
           } else {
@@ -352,7 +352,7 @@ export default {
         });
     },
     changeExam(examId) {
-      var exam = this.examList.filter((item) => {
+      var exam = this.examList.filter(item => {
         return item.id == examId;
       })[0];
       this.getPieData(exam.examType);
@@ -377,24 +377,24 @@ export default {
           "/api/ecs_oe_admin/exam/student/statistic/by/finished?examId=" +
             this.examId
         )
-        .then((response) => {
+        .then(response => {
           var resp = response.data;
           var optionData = {
             title: "考试人次:" + (resp.finished + resp.unFinished),
             legendData: [
               noCompletedWord + resp.unFinished,
-              completedWord + resp.finished,
+              completedWord + resp.finished
             ],
             seriesData: [
               {
                 name: noCompletedWord + resp.unFinished,
-                value: resp.unFinished,
+                value: resp.unFinished
               },
               {
                 name: completedWord + resp.finished,
-                value: resp.finished,
-              },
-            ],
+                value: resp.finished
+              }
+            ]
           };
           this.buildPieOptions(optionData);
         });
@@ -406,18 +406,18 @@ export default {
         title: {
           text: data.title,
           subtext: "",
-          x: "left",
+          x: "left"
         },
         tooltip: {
           trigger: "item",
-          formatter: "{b}人次<br/>占比:{d}%",
+          formatter: "{b}人次<br/>占比:{d}%"
         },
         legend: {
           type: "scroll",
           orient: "vertical",
           right: 200,
           top: 30,
-          data: data.legendData,
+          data: data.legendData
         },
         series: [
           {
@@ -430,15 +430,15 @@ export default {
               emphasis: {
                 shadowBlur: 10,
                 shadowOffsetX: 0,
-                shadowColor: "rgba(0, 0, 0, 0.5)",
-              },
-            },
-          },
-        ],
+                shadowColor: "rgba(0, 0, 0, 0.5)"
+              }
+            }
+          }
+        ]
       };
     },
     buildLine(courseProgressList) {
-      courseProgressList.sort(function (a, b) {
+      courseProgressList.sort(function(a, b) {
         if (b["completedProportion"] != a["completedProportion"]) {
           return b["completedProportion"] - a["completedProportion"];
         } else if (b["allNum"] != a["allNum"]) {
@@ -460,18 +460,18 @@ export default {
       var seriesBar = {
         name: "计划数",
         type: "bar",
-        data: [],
+        data: []
       };
       var seriesLine1 = {
         name: "完成数",
         type: "line",
-        data: [],
+        data: []
       };
       var seriesLine2 = {
         name: "完成比(%)",
         type: "line",
         yAxisIndex: 1,
-        data: [],
+        data: []
       };
       var yAxis_maxScale1 = 0;
       for (var i = 0; i < courseProgressDataList.length; i++) {
@@ -487,7 +487,7 @@ export default {
         legendData: ["计划数", "完成数", "完成比(%)"],
         xAxis: { data: xAxisData },
         series: [seriesBar, seriesLine1, seriesLine2],
-        yAxis_maxScale1,
+        yAxis_maxScale1
       };
       this.buildLineOptions(optionData);
     },
@@ -500,29 +500,29 @@ export default {
           axisPointer: {
             type: "cross",
             crossStyle: {
-              color: "#999",
-            },
-          },
+              color: "#999"
+            }
+          }
         },
         toolbox: {
           feature: {
             dataView: { show: true, readOnly: false },
             magicType: { show: true, type: ["line", "bar"] },
             restore: { show: true },
-            saveAsImage: { show: true },
-          },
+            saveAsImage: { show: true }
+          }
         },
         legend: {
-          data: optionData.legendData,
+          data: optionData.legendData
         },
         xAxis: [
           {
             type: "category",
             data: optionData.xAxis.data,
             axisPointer: {
-              type: "shadow",
-            },
-          },
+              type: "shadow"
+            }
+          }
         ],
         yAxis: [
           {
@@ -532,8 +532,8 @@ export default {
             max: optionData.yAxis_maxScale1,
             interval: 10000,
             axisLabel: {
-              formatter: "{value} ",
-            },
+              formatter: "{value} "
+            }
           },
           {
             type: "value",
@@ -542,11 +542,11 @@ export default {
             max: 100,
             interval: 20,
             axisLabel: {
-              formatter: "{value} %",
-            },
-          },
+              formatter: "{value} %"
+            }
+          }
         ],
-        series: optionData.series,
+        series: optionData.series
       };
     },
     sortByFinishedPercent(obj1, obj2) {
@@ -560,16 +560,16 @@ export default {
         .get("/api/ecs_oe_admin/exam/student/statistic/by/org/export", {
           params: {
             examId: this.examId,
-            orgId: this.orgId,
+            orgId: this.orgId
           },
           responseType: "arraybuffer",
-          timeout: 20 * 60 * 1000, //限时20分钟
+          timeout: 20 * 60 * 1000 //限时20分钟
         })
-        .then((response) => {
+        .then(response => {
           if (response.data) {
             var blob = new Blob([response.data], {
               type:
-                "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+                "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
             });
             var url = URL.createObjectURL(blob);
             var a = document.createElement("a");
@@ -588,16 +588,16 @@ export default {
         .get("/api/ecs_oe_admin/exam/student/courseProgress/list/export", {
           params: {
             examId: this.examId,
-            courseId: this.courseId,
+            courseId: this.courseId
           },
           responseType: "arraybuffer",
-          timeout: 20 * 60 * 1000, //限时20分钟
+          timeout: 20 * 60 * 1000 //限时20分钟
         })
-        .then((response) => {
+        .then(response => {
           if (response.data) {
             var blob = new Blob([response.data], {
               type:
-                "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+                "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
             });
             var url = URL.createObjectURL(blob);
             var a = document.createElement("a");
@@ -616,18 +616,18 @@ export default {
           title: "警告",
           message: "请选择考试批次",
           type: "warning",
-          duration: 2000,
+          duration: 2000
         });
         return false;
       }
       this.$http
         .get("/api/ecs_oe_admin/examControl/getExamSyncPercentage", {
-          params: { examId: this.examId },
+          params: { examId: this.examId }
         })
-        .then((response) => {
+        .then(response => {
           this.examSyncPercentage = response.data;
         })
-        .catch((res) => {
+        .catch(res => {
           var errorMsg = "操作失败";
           if (res.response && res.response.data) {
             errorMsg = res.response.data.desc;
@@ -635,16 +635,16 @@ export default {
           this.$notify({
             title: "提示",
             message: errorMsg,
-            type: "error",
+            type: "error"
           });
         });
-    },
+    }
   },
   created() {
     this.getExams();
     this.getOrgs();
     this.refreshExamSyncPercentage();
-  },
+  }
 };
 </script>
 <style>

+ 107 - 110
src/modules/questions/views/EditPaper.vue

@@ -627,9 +627,9 @@
             <div
               v-if="
                 quesModel.questionType != 'NESTED_ANSWER_QUESTION' &&
-                quesModel.questionType != 'SINGLE_ANSWER_QUESTION' &&
-                quesModel.questionType != 'MULTIPLE_ANSWER_QUESTION' &&
-                quesModel.questionType != 'BOOL_ANSWER_QUESTION'
+                  quesModel.questionType != 'SINGLE_ANSWER_QUESTION' &&
+                  quesModel.questionType != 'MULTIPLE_ANSWER_QUESTION' &&
+                  quesModel.questionType != 'BOOL_ANSWER_QUESTION'
               "
             >
               <el-form-item label="答案">
@@ -640,7 +640,7 @@
             <div
               v-if="
                 quesModel.questionType == 'SINGLE_ANSWER_QUESTION' ||
-                quesModel.questionType == 'MULTIPLE_ANSWER_QUESTION'
+                  quesModel.questionType == 'MULTIPLE_ANSWER_QUESTION'
               "
             >
               <el-form-item label="答案">
@@ -678,7 +678,7 @@
                 paper.paperType == 'IMPORT' &&
                 (quesModel.questionType == 'SINGLE_ANSWER_QUESTION' ||
                   quesModel.questionType == 'MULTIPLE_ANSWER_QUESTION')
-              ),
+              )
             }"
           >
             <el-button
@@ -686,8 +686,8 @@
               @click="addQuesOption"
               v-if="
                 paper.paperType == 'IMPORT' &&
-                (quesModel.questionType == 'SINGLE_ANSWER_QUESTION' ||
-                  quesModel.questionType == 'MULTIPLE_ANSWER_QUESTION')
+                  (quesModel.questionType == 'SINGLE_ANSWER_QUESTION' ||
+                    quesModel.questionType == 'MULTIPLE_ANSWER_QUESTION')
               "
               ><i class="el-icon-plus"></i> 新增选项
             </el-button>
@@ -809,7 +809,7 @@ export default {
   name: "editPaperApp",
   components: {
     reduplicate_mark,
-    ckeditor,
+    ckeditor
   },
   data() {
     return {
@@ -829,9 +829,9 @@ export default {
       paper: {
         course: {
           code: "",
-          name: "",
+          name: ""
         },
-        examRemark: "",
+        examRemark: ""
       },
       loading: false,
       dialogLoading: false,
@@ -878,7 +878,7 @@ export default {
         "SlateBlue",
         "SlateGray",
         "Tomato",
-        "VioletRed",
+        "VioletRed"
       ],
       difficultyDegreeList: [
         { label: 0.1, value: 0.1 },
@@ -890,15 +890,15 @@ export default {
         { label: 0.7, value: 0.7 },
         { label: 0.8, value: 0.8 },
         { label: 0.9, value: 0.9 },
-        { label: 1.0, value: 1.0 },
+        { label: 1.0, value: 1.0 }
       ],
       publicityList: [
         { label: "公开", value: true },
-        { label: "非公开", value: false },
+        { label: "非公开", value: false }
       ],
       answerTypes: [
         { label: "文本", value: "DIVERSIFIED_TEXT" },
-        { label: "音频", value: "SINGLE_AUDIO" },
+        { label: "音频", value: "SINGLE_AUDIO" }
       ],
       coursePropertyList: [],
       coursePropertyName: "", //课程属性名
@@ -908,7 +908,7 @@ export default {
       secondPropertyId: "", //二级属性id
       examRemark: "",
       showQuestions: [],
-      showButtons: [],
+      showButtons: []
     };
   },
   methods: {
@@ -940,7 +940,7 @@ export default {
         param.append("dataFile", file, file.name);
       }
       let config = {
-        headers: { "Content-Type": "multipart/form-data" },
+        headers: { "Content-Type": "multipart/form-data" }
       };
       this.uploadAnswerLoading = true;
       this.$http
@@ -957,7 +957,7 @@ export default {
           document.getElementById("answerFile").value = "";
           this.initPaper();
         })
-        .catch((error) => {
+        .catch(error => {
           this.answerMessage = error.response.data.desc;
           document.getElementById("answerFile").value = "";
           this.uploadAnswerLoading = false;
@@ -996,7 +996,7 @@ export default {
           "/" +
           this.paperDetailId +
           "/" +
-          this.parentView,
+          this.parentView
       });
     },
     //打开编辑大题题目弹窗
@@ -1018,7 +1018,7 @@ export default {
         .then(() => {
           this.$notify({
             message: "保存成功",
-            type: "success",
+            type: "success"
           });
           this.detailLoading = false;
           this.closePaperDatailDialog();
@@ -1033,63 +1033,60 @@ export default {
       this.paper = {
         course: {
           code: "",
-          name: "",
-        },
+          name: ""
+        }
       };
-      this.$http
-        .get(QUESTION_API + "/paper/" + this.paperId)
-        .then((response) => {
-          this.paper = response.data;
-          //查询所有课程属性名
-          this.initCourseProperty(this.paper.course.code);
-          //将所有小题分为公开和非公开
-          if (this.paper.paperDetails && this.paper.paperDetails.length > 0) {
-            for (let paperDetil of this.paper.paperDetails) {
-              this.showQuestions.push({ is_show: true });
-              this.showButtons.push({ up: true });
-              paperDetil.pubCount = 0;
-              paperDetil.noPubCount = 0;
-              if (
-                paperDetil.paperDetailUnits &&
-                paperDetil.paperDetailUnits.length > 0
-              ) {
-                for (let paperDetilUt of paperDetil.paperDetailUnits) {
-                  if (
-                    paperDetilUt.question.questionType !=
-                    "NESTED_ANSWER_QUESTION"
-                  ) {
-                    //非套题
-                    if (paperDetilUt.question.publicity) {
+      this.$http.get(QUESTION_API + "/paper/" + this.paperId).then(response => {
+        this.paper = response.data;
+        //查询所有课程属性名
+        this.initCourseProperty(this.paper.course.code);
+        //将所有小题分为公开和非公开
+        if (this.paper.paperDetails && this.paper.paperDetails.length > 0) {
+          for (let paperDetil of this.paper.paperDetails) {
+            this.showQuestions.push({ is_show: true });
+            this.showButtons.push({ up: true });
+            paperDetil.pubCount = 0;
+            paperDetil.noPubCount = 0;
+            if (
+              paperDetil.paperDetailUnits &&
+              paperDetil.paperDetailUnits.length > 0
+            ) {
+              for (let paperDetilUt of paperDetil.paperDetailUnits) {
+                if (
+                  paperDetilUt.question.questionType != "NESTED_ANSWER_QUESTION"
+                ) {
+                  //非套题
+                  if (paperDetilUt.question.publicity) {
+                    paperDetil.pubCount = paperDetil.pubCount + 1;
+                  } else {
+                    paperDetil.noPubCount = paperDetil.noPubCount + 1;
+                  }
+                } else {
+                  //循环所有子题
+                  for (let ques of paperDetilUt.question.subQuestions) {
+                    if (ques.publicity) {
                       paperDetil.pubCount = paperDetil.pubCount + 1;
                     } else {
                       paperDetil.noPubCount = paperDetil.noPubCount + 1;
                     }
-                  } else {
-                    //循环所有子题
-                    for (let ques of paperDetilUt.question.subQuestions) {
-                      if (ques.publicity) {
-                        paperDetil.pubCount = paperDetil.pubCount + 1;
-                      } else {
-                        paperDetil.noPubCount = paperDetil.noPubCount + 1;
-                      }
-                    }
                   }
                 }
               }
             }
           }
-          setTimeout(() => {
-            document.documentElement.scrollTop = document.body.scrollTop = scrollPosition;
-            console.log(scrollPosition);
-          }, 1000);
-          this.loading = false;
-        });
+        }
+        setTimeout(() => {
+          document.documentElement.scrollTop = document.body.scrollTop = scrollPosition;
+          console.log(scrollPosition);
+        }, 1000);
+        this.loading = false;
+      });
     },
     //查询所有课程属性名
     initCourseProperty(courseCode) {
       this.$http
         .get(QUESTION_API + "/courseProperty/enable/" + courseCode)
-        .then((response) => {
+        .then(response => {
           this.coursePropertyList = response.data;
         });
     },
@@ -1108,7 +1105,7 @@ export default {
       if (count == 0) {
         this.$alert("您确定删除吗?", "提示", {
           confirmButtonText: "确定",
-          callback: (action) => {
+          callback: action => {
             if (action == "confirm") {
               this.loading = true;
               this.$http
@@ -1118,17 +1115,17 @@ export default {
                   this.loading = true;
                   this.$notify({
                     message: "删除成功",
-                    type: "success",
+                    type: "success"
                   });
                   this.loading = false;
                 });
             }
-          },
+          }
         });
       } else {
         this.$alert("大题下还有小题,不可删除!", "提示", {
           confirmButtonText: "确定",
-          callback: () => {},
+          callback: () => {}
         });
       }
     },
@@ -1301,7 +1298,7 @@ export default {
           if (courseProperty.name == this.coursePropertyName) {
             this.$http
               .get(QUESTION_API + "/property/first/" + courseProperty.id)
-              .then((response) => {
+              .then(response => {
                 this.firstPropertyList = response.data;
               });
           }
@@ -1314,7 +1311,7 @@ export default {
       if (this.firstPropertyId) {
         this.$http
           .get(QUESTION_API + "/property/second/" + this.firstPropertyId)
-          .then((response) => {
+          .then(response => {
             this.secondPropertyList = response.data;
           });
       }
@@ -1328,7 +1325,7 @@ export default {
         id: "",
         coursePropertyName: "",
         firstProperty: {},
-        secondProperty: {},
+        secondProperty: {}
       };
       if (
         this.quesModel.quesProperties == null ||
@@ -1350,7 +1347,7 @@ export default {
         if (quesPro.id == quesProperty.id) {
           this.$notify({
             message: "该属性已存在,请重新选择",
-            type: "error",
+            type: "error"
           });
           return false;
         }
@@ -1370,7 +1367,7 @@ export default {
         if (!this.secondPropertyId) {
           this.$notify({
             message: "请选择二级属性",
-            type: "error",
+            type: "error"
           });
           return false;
         }
@@ -1395,14 +1392,14 @@ export default {
       if (!this.coursePropertyName) {
         this.$notify({
           message: "请选择属性",
-          type: "error",
+          type: "error"
         });
         return false;
       }
       if (!this.firstPropertyId) {
         this.$notify({
           message: "请选择一级属性",
-          type: "error",
+          type: "error"
         });
         return false;
       }
@@ -1437,7 +1434,7 @@ export default {
       this.quesModel.quesOptions.push({
         number: "",
         optionBody: "",
-        isCorrect: "",
+        isCorrect: ""
       });
       for (var i = 0; i < this.quesModel.quesOptions.length; i++) {
         this.quesModel.quesOptions[i]["number"] = i + 1;
@@ -1461,14 +1458,14 @@ export default {
       } else {
         this.$notify({
           message: "分数只能为正数",
-          type: "error",
+          type: "error"
         });
         return;
       }
       let paperDetailUnitExp = {
         id: this.editPaperDetailUnit.id,
         question: this.quesModel,
-        score: this.quesModel.score,
+        score: this.quesModel.score
       };
       if (
         this.quesModel.quesOptions &&
@@ -1477,12 +1474,12 @@ export default {
         this.$confirm("无选项将删除该试题, 是否继续?", "提示", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
-          type: "warning",
+          type: "warning"
         }).then(() => {
           this.dialogLoading = true;
           this.$http
             .delete(QUESTION_API + "/paper/deleteQuestion/" + this.quesModel.id)
-            .then((response) => {
+            .then(response => {
               if (response.data.length > 0) {
                 var deleteInfo =
                   "该试题被试卷:" +
@@ -1490,12 +1487,12 @@ export default {
                   "使用,不能删除";
                 this.$notify({
                   message: deleteInfo,
-                  type: "error",
+                  type: "error"
                 });
               } else {
                 this.$notify({
                   message: "保存成功",
-                  type: "success",
+                  type: "success"
                 });
               }
               this.dialogLoading = false;
@@ -1508,17 +1505,17 @@ export default {
           .then(() => {
             this.$notify({
               message: "保存成功",
-              type: "success",
+              type: "success"
             });
             this.dialogLoading = false;
             this.closeQuesDialog();
             this.initPaper();
           })
-          .catch((err) => {
+          .catch(err => {
             this.dialogLoading = false;
             this.$notify({
               type: "error",
-              message: err.response.data.desc,
+              message: err.response.data.desc
             });
           });
       }
@@ -1557,7 +1554,7 @@ export default {
     deleteQues01(paperDetailUnitId) {
       this.$alert("您确定删除吗?", "提示", {
         confirmButtonText: "确定",
-        callback: (action) => {
+        callback: action => {
           if (action == "confirm") {
             this.loading = true;
             this.$http
@@ -1569,23 +1566,23 @@ export default {
                 this.loading = true;
                 this.$notify({
                   message: "删除成功",
-                  type: "success",
+                  type: "success"
                 });
                 this.loading = false;
               });
           }
-        },
+        }
       });
     },
     deleteQues02(questionId) {
       this.$alert("您确定删除吗?", "提示", {
         confirmButtonText: "确定",
-        callback: (action) => {
+        callback: action => {
           if (action == "confirm") {
             this.loading = true;
             this.$http
               .delete(QUESTION_API + "/paper/deleteQuestion/" + questionId)
-              .then((response) => {
+              .then(response => {
                 if (response.data.length > 0) {
                   var deleteInfo =
                     "该试题被试卷:" +
@@ -1593,7 +1590,7 @@ export default {
                     "使用,不能删除";
                   this.$notify({
                     message: deleteInfo,
-                    type: "error",
+                    type: "error"
                   });
                 } else {
                   this.initPaper();
@@ -1602,13 +1599,13 @@ export default {
                   this.loading = true;
                   this.$notify({
                     message: "保存成功",
-                    type: "success",
+                    type: "success"
                   });
                 }
                 this.loading = false;
               });
           }
-        },
+        }
       });
     },
     //获取重复试题
@@ -1616,7 +1613,7 @@ export default {
       this.duplicateLoading = true;
       this.$http
         .get(QUESTION_API + "/paper/" + this.paperId + "/reduplicate-questions")
-        .then((response) => {
+        .then(response => {
           this.reduplicateQuestions = response.data;
           this.duplicateLoading = false;
           this.initReduplicateQuesColor();
@@ -1642,7 +1639,7 @@ export default {
       if (colorCount > 20) {
         this.reduplicateQuesColor = randomColor({
           luminosity: "bright",
-          count: colorCount,
+          count: colorCount
         });
       } else {
         this.reduplicateQuesColor = this.defaultColor;
@@ -1679,38 +1676,38 @@ export default {
         .then(() => {
           this.$notify({
             message: "保存成功",
-            type: "success",
+            type: "success"
           });
           this.loading = false;
           this.initPaper();
         })
-        .catch((error) => {
+        .catch(error => {
           this.loading = false;
           this.$notify({
             type: "error",
-            message: error.response.data.desc,
+            message: error.response.data.desc
           });
         });
     },
     //删除试卷
     deletePaper(id) {
       this.$confirm("确认删除试卷吗?", "提示", {
-        type: "warning",
+        type: "warning"
       }).then(() => {
         this.loading = true;
         this.$http.delete(QUESTION_API + "/paper/" + id).then(
           () => {
             this.$notify({
               message: "删除成功",
-              type: "success",
+              type: "success"
             });
             this.back();
           },
-          (error) => {
+          error => {
             this.$notify({
               message: error.response.data.desc,
               type: "error",
-              title: "错误",
+              title: "错误"
             });
             this.loading = false;
           }
@@ -1735,11 +1732,11 @@ export default {
     back() {
       if (sessionStorage.getItem("question_back") == "true") {
         this.$router.push({
-          path: "/questions/" + this.parentView + "/0",
+          path: "/questions/" + this.parentView + "/0"
         });
       } else {
         this.$router.push({
-          path: "/questions/" + this.parentView + "/1",
+          path: "/questions/" + this.parentView + "/1"
         });
       }
     },
@@ -1792,7 +1789,7 @@ export default {
           QUESTION_API + "/checkRadioFile/" + this.paperId,
           this.fileNameList
         )
-        .then((response) => {
+        .then(response => {
           console.log("response:", response);
           this.message = response.data.errorMsg;
           if (this.message == "OK") {
@@ -1802,7 +1799,7 @@ export default {
             this.isUpload = true;
           }
         })
-        .catch((error) => {
+        .catch(error => {
           console.log(error);
         });
     },
@@ -1816,7 +1813,7 @@ export default {
         param.append("files", file, file.name);
       }
       let config = {
-        headers: { "Content-Type": "multipart/form-data" },
+        headers: { "Content-Type": "multipart/form-data" }
       };
       this.$http
         .post(QUESTION_API + "/uploadRadio/" + this.paperId, param, config)
@@ -1828,15 +1825,15 @@ export default {
           document.getElementById("radioFile").value = "";
           this.initPaper();
         })
-        .catch((error) => {
+        .catch(error => {
           this.message = error.response.data.desc;
           this.uploadAudioLoading = false;
         });
-    },
+    }
   },
   computed: {
     ...mapState({
-      user: (state) => state.user,
+      user: state => state.user
     }),
     updatePorperty() {
       if (this.parentView === "gen_paper") {
@@ -1852,7 +1849,7 @@ export default {
         return obj.sort().toString();
       }
       return this.quesModel.quesAnswer;
-    },
+    }
   },
   watch: {},
   created() {
@@ -1865,10 +1862,10 @@ export default {
     this.uploadAction = QUESTION_API + "/uploadRadio/" + this.paperId;
     this.uploadHeaders = {
       key: this.user.key,
-      token: this.user.token,
+      token: this.user.token
     };
   },
-  mounted() {},
+  mounted() {}
 };
 </script>
 <style scoped src="../styles/EditPaper.css">

+ 41 - 41
src/modules/questions/views/GenPaper.vue

@@ -22,7 +22,7 @@
                 clearable
                 placeholder="全部"
                 size="small"
-                @focus="(e) => getCourses(e.target.value)"
+                @focus="e => getCourses(e.target.value)"
               >
                 <el-option
                   v-for="item in courseInfoSelect"
@@ -471,7 +471,7 @@ export default {
         { label: 0.7, value: 0.7 },
         { label: 0.8, value: 0.8 },
         { label: 0.9, value: 0.9 },
-        { label: 1.0, value: 1.0 },
+        { label: 1.0, value: 1.0 }
       ],
       publicityList: PUBLICITY_LIST,
       isClear: 0,
@@ -482,7 +482,7 @@ export default {
         creator: "",
         lastModifyName: "",
         level: "",
-        name: "",
+        name: ""
       },
       tableData: [],
       currentPage: 1,
@@ -496,7 +496,7 @@ export default {
       fileList: [],
       uploadAction: "",
       formUpload: {
-        paperName: "",
+        paperName: ""
       },
       uploadData: {},
       fileLoading: false,
@@ -505,7 +505,7 @@ export default {
         id: "",
         courseCode: "",
         courseName: "",
-        exportContentList: [],
+        exportContentList: []
       },
       isShow: true,
       examList: [],
@@ -516,11 +516,11 @@ export default {
       isShowPrintExamPackagePassword: false,
       printExamPackagePassword: "",
       printFrom: {
-        examId: "",
+        examId: ""
       },
       rules: {
-        examId: [{ required: true, message: "请输入名称", trigger: "change" }],
-      },
+        examId: [{ required: true, message: "请输入名称", trigger: "change" }]
+      }
     };
   },
   methods: {
@@ -529,7 +529,7 @@ export default {
         this.$notify({
           title: "警告",
           message: "请勾选难度或公开度",
-          type: "warning",
+          type: "warning"
         });
         return;
       }
@@ -546,7 +546,7 @@ export default {
         .then(() => {
           this.$notify({
             message: "更新成功",
-            type: "success",
+            type: "success"
           });
           this.searchGenPaper();
           this.quesLoading = false;
@@ -561,7 +561,7 @@ export default {
         this.$notify({
           title: "警告",
           message: "请选择试卷",
-          type: "warning",
+          type: "warning"
         });
         return;
       }
@@ -581,7 +581,7 @@ export default {
         courseNo: "",
         courseName: "",
         level: "",
-        name: "",
+        name: ""
       };
     },
     //查询
@@ -594,7 +594,7 @@ 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.$http.get(url, { params: this.formSearch }).then(response => {
         this.tableData = response.data.content;
         this.total = response.data.totalElements;
         this.currentPage = Number(pageNo);
@@ -607,7 +607,7 @@ export default {
         this.$notify({
           title: "警告",
           message: "请选择课程",
-          type: "warning",
+          type: "warning"
         });
       } else {
         var course = this.getCourseObj(courseNo);
@@ -616,7 +616,7 @@ export default {
         sessionStorage.setItem("gen_paper", JSON.stringify(this.formSearch));
         sessionStorage.setItem("gen_paper_currentPage", this.currentPage);
         this.$router.push({
-          path: "/questions/gen_paper_detail/" + courseNo + "/" + level,
+          path: "/questions/gen_paper_detail/" + courseNo + "/" + level
         });
       }
     },
@@ -651,26 +651,26 @@ export default {
       sessionStorage.setItem("gen_paper_currentPage", this.currentPage);
       sessionStorage.setItem("question_back", "false");
       this.$router.push({
-        path: "/edit_paper/" + row.id + "/gen_paper",
+        path: "/edit_paper/" + row.id + "/gen_paper"
       });
     },
     deleteGenPaper(row) {
       this.$confirm("确认删除试卷吗?", "提示", {
-        type: "warning",
+        type: "warning"
       }).then(() => {
         this.loading = true;
         this.$http.delete(QUESTION_API + "/paper/" + row.id).then(
           () => {
             this.$notify({
               message: "删除成功",
-              type: "success",
+              type: "success"
             });
             this.searchGenPaper();
           },
-          (response) => {
+          response => {
             this.$notify({
               message: response.response.data.desc,
-              type: "error",
+              type: "error"
             });
             this.loading = false;
           }
@@ -679,7 +679,7 @@ export default {
     },
     selectChange(row) {
       this.selectedPaperIds = [];
-      row.forEach((element) => {
+      row.forEach(element => {
         this.selectedPaperIds.push(element.id);
       });
     },
@@ -687,22 +687,22 @@ export default {
       var paperIds = this.paperIds;
       if (this.selectedPaperIds.length != 0) {
         this.$confirm("确认删除试卷吗?", "提示", {
-          type: "warning",
+          type: "warning"
         }).then(() => {
           this.loading = true;
           this.$http.delete(QUESTION_API + "/paper/" + paperIds).then(
             () => {
               this.$notify({
                 message: "删除成功",
-                type: "success",
+                type: "success"
               });
               this.searchGenPaper();
               this.selectedPaperIds = [];
             },
-            (response) => {
+            response => {
               this.$notify({
                 message: response.response.data.desc,
-                type: "error",
+                type: "error"
               });
               this.loading = false;
             }
@@ -711,7 +711,7 @@ export default {
       } else {
         this.$notify({
           message: "请勾选删除的数据",
-          type: "warning",
+          type: "warning"
         });
       }
     },
@@ -721,7 +721,7 @@ export default {
       this.courseLoading = true;
       this.$http
         .get(CORE_API + "/course/query?name=" + query + "&enable=true")
-        .then((response) => {
+        .then(response => {
           this.courseList = response.data;
           this.courseLoading = false;
         });
@@ -750,7 +750,7 @@ export default {
       } else {
         this.$notify({
           message: "请勾选导出的数据",
-          type: "warning",
+          type: "warning"
         });
       }
       /* 分布式印刷数据包设置 */
@@ -763,7 +763,7 @@ export default {
       if (this.exportModel.exportContentList.length == 0) {
         this.$notify({
           message: "请选择导出内容",
-          type: "error",
+          type: "error"
         });
         return false;
       }
@@ -772,7 +772,7 @@ export default {
         if (!reg.test(this.printExamPackagePassword)) {
           this.$notify({
             message: "加密密码请输入6至12位的数字或字母!",
-            type: "error",
+            type: "error"
           });
           return false;
         }
@@ -843,7 +843,7 @@ export default {
     },
     //传至印刷模块
     sendPrint(formData) {
-      this.$refs[formData].validate((valid) => {
+      this.$refs[formData].validate(valid => {
         if (valid) {
           var orgId = "";
           for (let exam of this.examList) {
@@ -865,7 +865,7 @@ export default {
             }
             this.$notify({
               message: "已推送",
-              type: "success",
+              type: "success"
             });
             this.resetForm2(formData);
             this.dialogModel = false;
@@ -883,7 +883,7 @@ export default {
         .get(
           EXAM_WORK_API + "/exam/queryByNameLike?name=" + query + "&enable=true"
         )
-        .then((response) => {
+        .then(response => {
           this.examList = response.data;
         });
     },
@@ -891,7 +891,7 @@ export default {
       //查询所有考试
       this.$http
         .get(EXAM_WORK_API + "/exam/queryByNameLike?name=&enable=true")
-        .then((response) => {
+        .then(response => {
           var list = response.data;
           for (var i = 0; i < list.length; i++) {
             if (list[i].examType == "TRADITION") {
@@ -904,7 +904,7 @@ export default {
     searchOrgName() {
       this.$http
         .get(CORE_API + "/org/rootOrg/" + this.user.rootOrgId)
-        .then((response) => {
+        .then(response => {
           this.Org = response.data;
         });
     },
@@ -916,7 +916,7 @@ export default {
           courseNo: "",
           courseName: "",
           level: "",
-          name: "",
+          name: ""
         };
         this.currentPage = 1;
       } else {
@@ -928,7 +928,7 @@ export default {
       }
       this.getCourses(this.formSearch.courseName);
       this.searchGenPaper();
-    },
+    }
   },
   computed: {
     paperIds() {
@@ -951,7 +951,7 @@ export default {
         courseList.push({
           courseNo: courseNo,
           courseInfo: courseInfo,
-          courseName: courseName,
+          courseName: courseName
         });
       }
       return courseList;
@@ -959,16 +959,16 @@ export default {
     noBatchSelected() {
       return this.selectedPaperIds.length === 0;
     },
-    ...mapState({ user: (state) => state.user }),
+    ...mapState({ user: state => state.user })
   },
   watch: {
-    $route: "initVue",
+    $route: "initVue"
   },
   created() {
     this.initVue();
     this.searchExamList();
     this.searchOrgName();
-  },
+  }
 };
 </script>
 <style scoped src="../styles/Common.css"></style>

+ 47 - 47
src/modules/questions/views/GenPaperDetail.vue

@@ -747,11 +747,11 @@ export default {
         genNumber: "",
         paperStructId: "",
         simpleParams: {},
-        simpleGenPaperPolicy: "BY_QUESTIONNUM",
+        simpleGenPaperPolicy: "BY_QUESTIONNUM"
       },
       simpleGenPaperPolicys: [
         { label: "按试题数量抽取", value: "BY_QUESTIONNUM" },
-        { label: "按试题分数抽取", value: "BY_SCORE" },
+        { label: "按试题分数抽取", value: "BY_SCORE" }
       ],
       tempPapers: [],
       tempPaperIds: [],
@@ -770,7 +770,7 @@ export default {
       coursePropertyList: [],
       paperType: "IMPORT",
       selectedNPapers: [],
-      message: "",
+      message: ""
     };
   },
   methods: {
@@ -798,7 +798,7 @@ export default {
     },
     selectChange(val) {
       console.log("val123:");
-      val.forEach((element) => {
+      val.forEach(element => {
         element.publicSimple = 0;
         element.publicMedium = 0;
         element.publicDifficulty = 0;
@@ -826,7 +826,7 @@ export default {
               "?courseNo=" +
               this.genPaper.courseNo
           )
-          .then((response) => {
+          .then(response => {
             console.log("response:", response);
             this.selectPapers = response.data.content;
             this.totalSelect = response.data.totalElements;
@@ -845,7 +845,7 @@ export default {
               "?courseNo=" +
               this.genPaper.courseNo
           )
-          .then((response) => {
+          .then(response => {
             this.selectPapers = response.data.content;
             this.totalSelect = response.data.totalElements;
             this.loading = false;
@@ -866,7 +866,7 @@ export default {
       var courseNo = this.genPaper.courseNo;
       var url = QUESTION_API + "/paperStruct?courseNo=" + courseNo;
       this.loading = true;
-      this.$http.get(url).then((response) => {
+      this.$http.get(url).then(response => {
         this.paperStructs = response.data;
         for (let paperStructObj of this.paperStructs) {
           if (paperStructObj.paperStrucType == "BLUEPRINT") {
@@ -896,7 +896,7 @@ export default {
       if (!this.genPaper.paperName) {
         this.$notify({
           message: "试卷名称不能为空!",
-          type: "error",
+          type: "error"
         });
         return false;
       }
@@ -904,7 +904,7 @@ export default {
       if (!this.genPaper.genNumber) {
         this.$notify({
           message: "请输入需要组卷套数!",
-          type: "error",
+          type: "error"
         });
         return false;
       }
@@ -914,14 +914,14 @@ export default {
       ) {
         this.$notify({
           message: "组卷套数必须为1-99之间的整数!",
-          type: "error",
+          type: "error"
         });
         return false;
       }
       if (this.genType == "SIMPLE" && this.selectedIds.length == 0) {
         this.$notify({
           message: "请选择题源范围!",
-          type: "error",
+          type: "error"
         });
         return false;
       }
@@ -929,13 +929,13 @@ export default {
         if (!this.selectedIds || this.selectedIds.length == 0) {
           this.$notify({
             message: "请选择题源范围!",
-            type: "error",
+            type: "error"
           });
           return false;
         } else if (this.paperDetailStructs.length == 0) {
           this.$notify({
             message: "请选择试卷结构!",
-            type: "error",
+            type: "error"
           });
           return false;
         }
@@ -944,13 +944,13 @@ export default {
         if (!this.selectedIds || this.selectedIds.length == 0) {
           this.$notify({
             message: "请选择题源范围!",
-            type: "error",
+            type: "error"
           });
           return false;
         } else if (this.paperDetailStructs.length == 0) {
           this.$notify({
             message: "请选择试卷结构!",
-            type: "error",
+            type: "error"
           });
           return false;
         }
@@ -961,14 +961,14 @@ export default {
       if (!this.genPaper.paperName) {
         this.$notify({
           message: "试卷名称不能为空!",
-          type: "error",
+          type: "error"
         });
         return false;
       }
       if (this.paperDetailStructs.length == 0) {
         this.$notify({
           message: "请选择试卷结构!",
-          type: "error",
+          type: "error"
         });
         return false;
       }
@@ -976,21 +976,21 @@ export default {
 
       this.fullscreenLoading = true;
       this.$http.post(url, this.genPaper).then(
-        (response) => {
+        response => {
           this.$notify({
             message: "组卷成功",
-            type: "success",
+            type: "success"
           });
           this.fullscreenLoading = false;
           let paperId = response.data.paper.id;
           this.$router.push({
-            path: "/edit_paper/" + paperId + "/gen_paper",
+            path: "/edit_paper/" + paperId + "/gen_paper"
           });
         },
-        (error) => {
+        error => {
           this.$notify({
             message: error.response.data.msg,
-            type: "error",
+            type: "error"
           });
           this.fullscreenLoading = false;
         }
@@ -1014,25 +1014,25 @@ export default {
         this.fullscreenLoading = true;
         this.genPaper.paperIds = this.selectedIds;
         this.$http.post(url, this.genPaper).then(
-          (response) => {
+          response => {
             this.$notify({
               message: "组卷成功",
-              type: "success",
+              type: "success"
             });
             this.fullscreenLoading = false;
             if (this.genPaper.genNumber == 1) {
               let paperId = response.data.paper.id;
               this.$router.push({
-                path: "/edit_paper/" + paperId + "/gen_paper",
+                path: "/edit_paper/" + paperId + "/gen_paper"
               });
             } else {
               this.back();
             }
           },
-          (error) => {
+          error => {
             this.$notify({
               message: error.response.data.msg,
-              type: "error",
+              type: "error"
             });
             this.fullscreenLoading = false;
           }
@@ -1078,42 +1078,42 @@ export default {
           if (!this.isNumber(paper.publicSimple)) {
             this.$notify({
               message: "“抽取策略”中的“抽取分数”列要为正数!",
-              type: "error",
+              type: "error"
             });
             return false;
           }
           if (!this.isNumber(paper.publicMedium)) {
             this.$notify({
               message: "“抽取策略”中的“抽取分数”列要为正数!",
-              type: "error",
+              type: "error"
             });
             return false;
           }
           if (!this.isNumber(paper.publicDifficulty)) {
             this.$notify({
               message: "“抽取策略”中的“抽取分数”列要为正数!",
-              type: "error",
+              type: "error"
             });
             return false;
           }
           if (!this.isNumber(paper.noPublicSimple)) {
             this.$notify({
               message: "“抽取策略”中的“抽取分数”列要为正数!",
-              type: "error",
+              type: "error"
             });
             return false;
           }
           if (!this.isNumber(paper.noPublicMedium)) {
             this.$notify({
               message: "“抽取策略”中的“抽取分数”列要为正数!",
-              type: "error",
+              type: "error"
             });
             return false;
           }
           if (!this.isNumber(paper.noPublicDifficulty)) {
             this.$notify({
               message: "“抽取策略”中的“抽取分数”列要为正数!",
-              type: "error",
+              type: "error"
             });
             return false;
           }
@@ -1121,42 +1121,42 @@ export default {
           if (!this.isFloat(paper.publicSimple)) {
             this.$notify({
               message: "“抽取策略”中的“抽取数量”列要为正整数!",
-              type: "error",
+              type: "error"
             });
             return false;
           }
           if (!this.isFloat(paper.publicMedium)) {
             this.$notify({
               message: "“抽取策略”中的“抽取数量”列要为正整数!",
-              type: "error",
+              type: "error"
             });
             return false;
           }
           if (!this.isFloat(paper.publicDifficulty)) {
             this.$notify({
               message: "“抽取策略”中的“抽取数量”列要为正整数!",
-              type: "error",
+              type: "error"
             });
             return false;
           }
           if (!this.isFloat(paper.noPublicSimple)) {
             this.$notify({
               message: "“抽取策略”中的“抽取数量”列要为正整数!",
-              type: "error",
+              type: "error"
             });
             return false;
           }
           if (!this.isFloat(paper.noPublicMedium)) {
             this.$notify({
               message: "“抽取策略”中的“抽取数量”列要为正整数!",
-              type: "error",
+              type: "error"
             });
             return false;
           }
           if (!this.isFloat(paper.noPublicDifficulty)) {
             this.$notify({
               message: "“抽取策略”中的“抽取数量”列要为正整数!",
-              type: "error",
+              type: "error"
             });
             return false;
           }
@@ -1180,7 +1180,7 @@ export default {
       var courseNo = this.genPaper.courseNo;
       this.$http
         .get(QUESTION_API + "/courseProperty/enable/" + courseNo)
-        .then((response) => {
+        .then(response => {
           this.coursePropertyList = response.data;
           this.searchPaperStructs();
         });
@@ -1192,7 +1192,7 @@ export default {
       this.searchPaper();
     },
     sum(row) {
-      setTimeout(function () {
+      setTimeout(function() {
         row.count =
           parseFloat(row.publicSimple) +
           parseFloat(row.publicMedium) +
@@ -1241,7 +1241,7 @@ export default {
               "/" +
               difficulty
           )
-          .then((response) => {
+          .then(response => {
             this.message = response.data;
           });
       }
@@ -1256,7 +1256,7 @@ export default {
               "/" +
               difficulty
           )
-          .then((response) => {
+          .then(response => {
             this.message = response.data;
           });
       }
@@ -1264,7 +1264,7 @@ export default {
     //鼠标离开事件
     showActiveOff() {
       this.message = "";
-    },
+    }
   },
   computed: {
     selectedPapers() {
@@ -1275,7 +1275,7 @@ export default {
           name: paper.name,
           totalScore: paper.totalScore,
           unitCount: paper.unitCount,
-          simpleParam: "",
+          simpleParam: ""
         });
       }
       return selectedPapers;
@@ -1286,7 +1286,7 @@ export default {
         selectedIds.push(paper.id);
       }
       return selectedIds;
-    },
+    }
   },
   created() {
     this.genPaper.courseNo = this.$route.params.courseNo;
@@ -1296,7 +1296,7 @@ export default {
     this.genPaper.level = this.$route.params.level;
     this.searchPaper();
     this.getCoursePropertyList();
-  },
+  }
 };
 </script>
 <style lang="css" scoped>

+ 43 - 43
src/modules/questions/views/ImportPaper.vue

@@ -23,7 +23,7 @@
                 clearable
                 placeholder="请输入"
                 size="small"
-                @focus="(e) => getCourses(e.target.value)"
+                @focus="e => getCourses(e.target.value)"
               >
                 <el-option
                   v-for="item in courseInfoSelect"
@@ -314,7 +314,7 @@
               filterable
               clearable
               placeholder="全部"
-              @focus="(e) => getCourses(e.target.value)"
+              @focus="e => getCourses(e.target.value)"
             >
               <el-option
                 v-for="item in courseInfoSelect"
@@ -409,7 +409,7 @@ export default {
         creator: "",
         lastModifyName: "",
         level: "",
-        name: "",
+        name: ""
       },
       tableData: [],
       levelList: LEVEL_TYPE,
@@ -425,7 +425,7 @@ export default {
       copyPaperDialog: false,
       copyPaperForm: {
         paperName: "",
-        courseNo: null,
+        courseNo: null
       },
       copyPaperId: "",
       quesPropertyDialog: false,
@@ -442,17 +442,17 @@ export default {
         { label: 0.7, value: 0.7 },
         { label: 0.8, value: 0.8 },
         { label: 0.9, value: 0.9 },
-        { label: 1.0, value: 1.0 },
+        { label: 1.0, value: 1.0 }
       ],
       publicityList: PUBLICITY_LIST,
       rules: {
         paperName: [
-          { required: true, message: "请输试卷名称", trigger: "blur" },
+          { required: true, message: "请输试卷名称", trigger: "blur" }
         ],
         courseNo: [
-          { required: true, message: "请选择课程名称", trigger: "change" },
-        ],
-      },
+          { required: true, message: "请选择课程名称", trigger: "change" }
+        ]
+      }
     };
   },
   methods: {
@@ -465,7 +465,7 @@ export default {
       this.currentPage = 1;
       this.loading = true;
       var url = QUESTION_API + "/importPaper/" + pageNo + "/" + this.pageSize;
-      this.$http.get(url, { params: this.formSearch }).then((response) => {
+      this.$http.get(url, { params: this.formSearch }).then(response => {
         this.tableData = response.data.content;
         this.total = response.data.totalElements;
         this.currentPage = pageNo;
@@ -495,26 +495,26 @@ export default {
       sessionStorage.setItem("import_paper_currentPage", this.currentPage);
       sessionStorage.setItem("question_back", "false");
       this.$router.push({
-        path: "/edit_paper/" + row.id + "/import_paper",
+        path: "/edit_paper/" + row.id + "/import_paper"
       });
     },
     deleteImportPaper(row) {
       this.$confirm("确认删除试卷吗?", "提示", {
-        type: "warning",
+        type: "warning"
       }).then(() => {
         this.loading = true;
         this.$http.delete(QUESTION_API + "/paper/" + row.id).then(
           () => {
             this.$notify({
               message: "删除成功",
-              type: "success",
+              type: "success"
             });
             this.searchImportPaper();
           },
-          (error) => {
+          error => {
             this.$notify({
               message: error.response.data.desc,
-              type: "error",
+              type: "error"
             });
             this.loading = false;
           }
@@ -523,29 +523,29 @@ export default {
     },
     selectChange(row) {
       this.selectedPaperIds = [];
-      row.forEach((element) => {
+      row.forEach(element => {
         this.selectedPaperIds.push(element.id);
       });
     },
     batchDeletePaper() {
       var paperIds = this.paperIds;
       this.$confirm("确认删除试卷吗?", "提示", {
-        type: "warning",
+        type: "warning"
       }).then(() => {
         this.loading = true;
         this.$http.delete(QUESTION_API + "/paper/" + paperIds).then(
           () => {
             this.$notify({
               message: "删除成功",
-              type: "success",
+              type: "success"
             });
             this.searchImportPaper();
             this.selectedPaperIds = [];
           },
-          (error) => {
+          error => {
             this.$notify({
               message: error.response.data.desc,
-              type: "error",
+              type: "error"
             });
             this.loading = false;
           }
@@ -555,7 +555,7 @@ export default {
     //导入试卷
     impPaper() {
       this.$router.push({
-        path: "/questions/import_paper_info",
+        path: "/questions/import_paper_info"
       });
     },
     //查询所有课程
@@ -563,7 +563,7 @@ export default {
       this.courseLoading = true;
       this.$http
         .get(CORE_API + "/course/query?name=" + query + "&enable=true")
-        .then((response) => {
+        .then(response => {
           this.courseList = response.data;
           this.courseLoading = false;
         });
@@ -573,22 +573,22 @@ export default {
       this.$http
         .put(QUESTION_API + "/useBasePaper/" + this.selectedPaperIds)
         .then(
-          (response) => {
+          response => {
             console.log("come in response:", response);
             if (!response.data.desc) {
               this.$notify({
                 message: "操作成功",
-                type: "success",
+                type: "success"
               });
             } else {
               this.$notify({
                 message: response.data.desc,
-                type: "error",
+                type: "error"
               });
             }
             this.loading = false;
           },
-          (error) => {
+          error => {
             var message = error.response.data.desc;
             var err = message
               .replace("[", "")
@@ -596,7 +596,7 @@ export default {
               .substring(message.indexOf("desc") + 4);
             this.$notify({
               message: err,
-              type: "error",
+              type: "error"
             });
             this.loading = false;
           }
@@ -611,7 +611,7 @@ export default {
     },
     //保存
     submitCopy(formData) {
-      this.$refs[formData].validate((valid) => {
+      this.$refs[formData].validate(valid => {
         if (valid) {
           this.cloneLoading = true;
           this.$http
@@ -627,16 +627,16 @@ export default {
             .then(() => {
               this.$notify({
                 message: "复制成功",
-                type: "success",
+                type: "success"
               });
               this.cloneLoading = false;
               this.copyPaperDialog = false;
               this.searchImportPaper();
             })
-            .catch((error) => {
+            .catch(error => {
               this.$notify({
                 type: "error",
-                message: error.response.data.msg,
+                message: error.response.data.msg
               });
               this.cloneLoading = false;
             });
@@ -654,7 +654,7 @@ export default {
         this.$notify({
           title: "警告",
           message: "请输入课程",
-          type: "warning",
+          type: "warning"
         });
         return;
       }
@@ -723,7 +723,7 @@ export default {
         this.$notify({
           title: "警告",
           message: "请选择试卷",
-          type: "warning",
+          type: "warning"
         });
         return;
       }
@@ -736,7 +736,7 @@ export default {
         this.$notify({
           title: "警告",
           message: "请输入课程",
-          type: "warning",
+          type: "warning"
         });
         return;
       }
@@ -767,7 +767,7 @@ export default {
         .then(() => {
           this.$notify({
             message: "更新成功",
-            type: "success",
+            type: "success"
           });
           this.searchImportPaper();
           this.quesLoading = false;
@@ -776,7 +776,7 @@ export default {
         .catch(() => {
           this.$notify({
             type: "error",
-            message: "更新失败",
+            message: "更新失败"
           });
           this.quesLoading = false;
           this.closePropertyDialog();
@@ -800,7 +800,7 @@ export default {
         .then(() => {
           this.$notify({
             message: "更新成功",
-            type: "success",
+            type: "success"
           });
           this.quesLoading = false;
           this.closePropertyDialog();
@@ -808,7 +808,7 @@ export default {
         .catch(() => {
           this.$notify({
             type: "error",
-            message: "更新失败",
+            message: "更新失败"
           });
           this.quesLoading = false;
           this.closePropertyDialog();
@@ -821,7 +821,7 @@ export default {
         this.formSearch = {
           courseNo: "",
           level: "",
-          name: "",
+          name: ""
         };
         this.currentPage = 1;
       } else {
@@ -835,7 +835,7 @@ export default {
         this.getCourses(this.formSearch.courseName);
       }
       this.handleCurrentChange(this.currentPage);
-    },
+    }
   },
   computed: {
     paperIds() {
@@ -861,14 +861,14 @@ export default {
     noBatchSelected() {
       return this.selectedPaperIds.length === 0;
     },
-    ...mapState({ user: (state) => state.user }),
+    ...mapState({ user: state => state.user })
   },
   watch: {
-    $route: "initVue",
+    $route: "initVue"
   },
   created() {
     this.initVue();
-  },
+  }
 };
 </script>
 <style scoped src="../styles/Common.css"></style>

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

@@ -410,7 +410,7 @@ export default {
       this.searchQues();
     },
     searchQues() {
-      var pageNo = Number(this.currentPage|1);
+      var pageNo = Number(this.currentPage | 1);
       this.currentPage = 1;
       this.tableData = [];
       var url = QUESTION_API + "/question/" + pageNo + "/" + this.pageSize;