zhangjie 1 рік тому
батько
коміт
1a2d2acf93

+ 1 - 7
src/constants/adminNavs.js

@@ -11,16 +11,10 @@ const navs = [
     name: "学校管理",
     url: "SchoolManage",
   },
-  {
-    id: "3",
-    parentId: "1",
-    name: "用户管理",
-    url: "AdminUserManage",
-  },
   {
     id: "4",
     parentId: "1",
-    name: "系统角色管理",
+    name: "角色管理",
     url: "SystemRoleManage",
   },
   {

+ 3 - 3
src/constants/enumerate.js

@@ -349,9 +349,9 @@ export const QUESTION_TYPE_LIST = [
 ];
 
 export const QUESTION_SCORE_TYPE = {
-  NONE: "",
-  ALL: "任选给分",
-  LEAK: "漏选给分",
+  NONE: "全对给分",
+  ALL: "任选给分",
+  LEAK: "漏选给分",
 };
 
 // mark

+ 0 - 6
src/modules/admin/router.js

@@ -1,4 +1,3 @@
-import AdminUserManage from "./views/AdminUserManage.vue";
 import PrivilegeManage from "./views/PrivilegeManage.vue";
 import SystemRoleManage from "./views/SystemRoleManage.vue";
 import SchoolManage from "./views/SchoolManage.vue";
@@ -10,11 +9,6 @@ export default {
   name: "Admin",
   component: Admin,
   children: [
-    {
-      path: "admin-user-manage",
-      name: "AdminUserManage",
-      component: AdminUserManage,
-    },
     {
       path: "privilege-manage",
       name: "PrivilegeManage",

+ 10 - 2
src/modules/admin/views/Admin.vue

@@ -128,7 +128,7 @@ export default {
 
     if (this.$route.name === "Admin") {
       this.$router.replace({
-        name: "AdminUserManage",
+        name: "SchoolManage",
       });
     }
     this.initData();
@@ -207,7 +207,15 @@ export default {
     async logoutAction() {
       await logout();
       this.$ls.clear();
-      this.$router.push({ name: "Login" });
+      const paramDomainCode = window.sessionStorage.getItem("paramDomainCode");
+      const routeDomainCode = window.sessionStorage.getItem("routeDomainCode");
+      if (paramDomainCode) {
+        this.$router.push({ name: "Login", query: { code: paramDomainCode } });
+      } else if (routeDomainCode) {
+        this.$router.push({ name: "Login", params: { code: routeDomainCode } });
+      } else {
+        this.$router.push({ name: "Login" });
+      }
     },
     toSelectSchool() {
       this.$router.push({ name: "SelectSchool" });

+ 1 - 0
src/modules/mark/components/markParam/MarkParamGroup.vue

@@ -105,6 +105,7 @@
       :disabled-question-nos="disabledQuestionNos"
       :paper-structure="subjectiveQuestionList"
       @modified="groupModified"
+      @cancel="updateDisableQuestionNos"
     ></modify-mark-group>
     <!-- ModifyMarkArea -->
     <modify-mark-area

+ 3 - 0
src/modules/mark/components/markParam/MarkParamObjectiveAnswer.vue

@@ -140,6 +140,9 @@ export default {
           error: false,
           errMsg: "",
         };
+        if (item.questionType === 2 && !item.objectivePolicy) {
+          item.objectivePolicy = "NONE";
+        }
         if (nitem.mainNumber !== curMainNumber) {
           curMainNumber = nitem.mainNumber;
           nitem.mainFirstSub = true;

+ 27 - 0
src/modules/mark/components/markParam/MarkParamStructure.vue

@@ -495,12 +495,39 @@ export default {
         return omit(item, ["key", "mainId", "expandSub"]);
       });
     },
+    statPaperStructure() {
+      const questionCount = this.tableData.length;
+
+      const subjectiveQuestionCount = this.tableData.filter(
+        (item) => !item.isObjective
+      ).length;
+
+      return {
+        questionCount,
+        paperTotalScore: calcSum(
+          this.tableData.map((item) => item.totalScore || 0)
+        ),
+        subjectiveQuestionCount,
+        objectiveQuestionCount: questionCount - subjectiveQuestionCount,
+      };
+    },
     async submit() {
       if (this.loading) return;
       if (!this.checkData()) return;
 
       this.loading = true;
       const questions = this.getData();
+      const paperStat = this.statPaperStructure();
+      let tipsContent = `本试卷共${paperStat.questionCount}道小题,客观题${paperStat.objectiveQuestionCount}道,主观题${paperStat.subjectiveQuestionCount}道,总分为${paperStat.paperTotalScore}分。`;
+      const confirm = await this.$confirm(
+        `${tipsContent}确定要提交吗?`,
+        "提示",
+        {
+          type: "warning",
+        }
+      ).catch(() => {});
+      if (confirm !== "confirm") return;
+
       const res = await markStructureSave({
         examId: this.basicInfo.examId,
         paperNumber: this.basicInfo.paperNumber,

+ 2 - 1
src/modules/mark/components/markParam/ModifyMarkGroup.vue

@@ -342,6 +342,7 @@ export default {
     },
     cancel() {
       this.modalIsShow = false;
+      this.$emit("cancel");
     },
     open() {
       this.modalIsShow = true;
@@ -610,7 +611,7 @@ export default {
         datas.pictureConfigs = [];
       }
       this.$emit("modified", datas);
-      this.cancel();
+      this.modalIsShow = false;
     },
   },
 };