Ver Fonte

Merge remote-tracking branch 'origin/release_v4.1.2'

deason há 3 anos atrás
pai
commit
1a4f9b0f57

+ 6 - 0
src/modules/basic/routes/routes.js

@@ -18,6 +18,7 @@ import school_config from "../view/school_config";
 import unimportant_school_config from "../view/unimportant_school_config";
 import sys_notice from "../view/sys_notice";
 import sysLoginRuleList from "../view/sys_login_rule_list";
+import sysCryptoConfig from "../view/sys_crypto_config";
 import admin_operate from "../view/admin_operate";
 
 export default [
@@ -124,6 +125,11 @@ export default [
         meta: { privilegeCodes: "sys_login_rule_list" },
         component: sysLoginRuleList, //登录规则列表
       },
+      {
+        path: "sysCryptoConfig",
+        meta: { privilegeCodes: "sys_crypto_config" },
+        component: sysCryptoConfig, //加密方案组合配置
+      },
     ],
   },
 ];

+ 1 - 1
src/modules/basic/view/school_config.vue

@@ -108,7 +108,7 @@
             v-model="ruleForm.PC_CLIENT_ENABLED"
             on-text="是"
             off-text="否"
-            :disabled="true"
+            :disabled="false"
           ></el-switch>
         </el-form-item>
 

+ 246 - 0
src/modules/basic/view/sys_crypto_config.vue

@@ -0,0 +1,246 @@
+<template>
+  <section style="margin-top: 0px">
+    <div>
+      <div style="width: 643px; padding: 10px 0px">
+        <el-alert title="算法代号" type="success" show-icon :closable="false">
+          <el-breadcrumb separator="|" style="font-size: 9px">
+            <el-breadcrumb-item>AES 简写 A</el-breadcrumb-item>
+            <el-breadcrumb-item>Base64 简写 B</el-breadcrumb-item>
+            <el-breadcrumb-item>RC4 简写 C</el-breadcrumb-item>
+            <el-breadcrumb-item>DES 简写 D</el-breadcrumb-item>
+            <el-breadcrumb-item>TripleDES 简写 E</el-breadcrumb-item>
+          </el-breadcrumb>
+        </el-alert>
+      </div>
+
+      <el-transfer
+        v-model="enableCryptoConfigs"
+        :data="allCryptoConfigs"
+        :titles="['禁用组合列表', '启用组合列表']"
+        :button-texts="['禁用', '启用']"
+        :format="{
+          noChecked: '${total}',
+          hasChecked: '${checked}/${total}',
+        }"
+        @change="handleChange"
+      >
+        <el-button
+          slot="right-footer"
+          class="transfer-footer"
+          type="primary"
+          size="small"
+          :disabled="!canEdit"
+          round
+          plain
+          @click="updateCryptoConfigs()"
+          >保存</el-button
+        >
+      </el-transfer>
+
+      <div style="width: 643px; margin: 50px 0px 20px 0px">
+        <el-alert
+          title="配置被禁用旧版本API的学校ID列表"
+          type="warning"
+          show-icon
+          :closable="false"
+        >
+          注:多个值请逗号分隔!
+          <el-button
+            class="el-alert__closebtn"
+            type="warning"
+            size="small"
+            round
+            plain
+            @click="updateDisabledRootOrgIds()"
+          >
+            保存</el-button
+          >
+        </el-alert>
+
+        <el-input
+          v-model="disabledRootOrgIds"
+          style="margin-top: 5px"
+          type="textarea"
+          placeholder="示例:111,222,333"
+          maxlength="500"
+          rows="3"
+        />
+      </div>
+    </div>
+  </section>
+</template>
+
+<script>
+import { mapState } from "vuex";
+import { CORE_API } from "@/constants/constants.js";
+
+export default {
+  data() {
+    return {
+      loading: false,
+      canEdit: false,
+      allCryptoConfigs: [],
+      enableCryptoConfigs: [],
+      disabledRootOrgIds: null,
+    };
+  },
+  computed: {
+    ...mapState({ user: (state) => state.user }),
+    isSuperAdmin() {
+      return this.user.roleList.some((role) => role.roleCode === "SUPER_ADMIN");
+    },
+  },
+  created() {
+    if (this.isSuperAdmin) {
+      this.loadCryptoConfigs();
+      this.loadDisabledRootOrgIds();
+    }
+  },
+  methods: {
+    handleChange() {
+      this.canEdit = true;
+    },
+    loadCryptoConfigs() {
+      this.loading = true;
+      let url = CORE_API + "/crypto/config/list";
+
+      this.$http.post(url).then(
+        (response) => {
+          let data = response.data;
+
+          for (let n = 0; n < data.length; n++) {
+            let obj = data[n];
+            this.allCryptoConfigs.push({
+              key: obj.combination,
+              label: obj.combination,
+              disabled: false,
+            });
+
+            if (obj.enable) {
+              this.enableCryptoConfigs.push(obj.combination);
+            }
+          }
+
+          this.loading = false;
+        },
+        () => {
+          this.$notify({
+            type: "error",
+            message: "获取组合配置失败!",
+          });
+          this.loading = false;
+        }
+      );
+    },
+    updateCryptoConfigs() {
+      let params = [];
+      for (let n = 0; n < this.allCryptoConfigs.length; n++) {
+        let obj = this.allCryptoConfigs[n];
+
+        let enable = false;
+        if (this.enableCryptoConfigs.indexOf(obj.key) > -1) {
+          enable = true;
+        }
+
+        params.push({ combination: obj.key, enable: enable });
+      }
+
+      if (params.length === 0) {
+        return;
+      }
+
+      this.$confirm("确认保存?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        this.canEdit = false;
+        let url = CORE_API + "/crypto/config/update";
+
+        this.$http.post(url, params).then(
+          () => {
+            this.$notify({
+              type: "success",
+              message: "保存成功!",
+            });
+          },
+          () => {
+            this.$notify({
+              type: "error",
+              message: "保存失败!",
+            });
+          }
+        );
+      });
+    },
+    loadDisabledRootOrgIds() {
+      let url = "/api/ecs_oe_student/temp/config/list";
+      this.$http.post(url).then(
+        (response) => {
+          let data = response.data;
+          this.disabledRootOrgIds = data.join(",");
+        },
+        () => {
+          this.$notify({
+            type: "error",
+            message: "获取被禁用旧版本API的学校ID列表失败!",
+          });
+        }
+      );
+    },
+    updateDisabledRootOrgIds() {
+      let params = [];
+      if (this.disabledRootOrgIds) {
+        let values = this.disabledRootOrgIds.split(",");
+        // console.log("values", values);
+        let reg = /^[0-9]+$/;
+        for (let n = 0; n < values.length; n++) {
+          if (reg.test(values[n])) {
+            params.push(values[n]);
+          }
+        }
+      }
+
+      this.$confirm("确认保存?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        let url = "/api/ecs_oe_student/temp/config/update";
+        this.$http.post(url, params).then(
+          () => {
+            this.$notify({
+              type: "success",
+              message: "保存成功!",
+            });
+            this.disabledRootOrgIds = params.join(",");
+          },
+          () => {
+            this.$notify({
+              type: "error",
+              message: "保存失败!",
+            });
+          }
+        );
+      });
+    },
+  },
+};
+</script>
+
+<style scoped>
+.transfer-footer {
+  margin: 4px 13px 0px 0px;
+  float: right;
+}
+</style>
+
+<style>
+.el-transfer-panel {
+  height: 390px;
+}
+.el-transfer-panel__list {
+  min-height: 310px;
+  height: 310px;
+}
+</style>

+ 16 - 27
src/modules/examwork/view/onlineHomework.vue

@@ -213,6 +213,19 @@
                     ></el-switch>
                   </el-form-item>
                 </el-row>
+
+                <el-row>
+                  <el-form-item
+                    label="开启IP访问设置"
+                    :label-width="style.label_width_tab1"
+                  >
+                    <el-switch
+                      v-model="form.properties.IP_LIMIT"
+                      on-text="是"
+                      off-text="否"
+                    ></el-switch>
+                  </el-form-item>
+                </el-row>
               </el-tab-pane>
               <!-- 周期设置 -->
               <el-tab-pane label="周期设置" name="tab8">
@@ -604,33 +617,6 @@
                   </el-form-item>
                 </el-row>
               </el-tab-pane>
-              <el-tab-pane label="网络设置" name="tab6">
-                <el-row>
-                  <el-form-item
-                    label="IP限制"
-                    :label-width="style.label_width_tab6"
-                  >
-                    <el-radio-group v-model="form.properties.IP_LIMIT">
-                      <el-radio label="true">开启</el-radio>
-                      <el-radio label="false">关闭</el-radio>
-                    </el-radio-group>
-                  </el-form-item>
-                </el-row>
-                <el-row>
-                  <el-form-item
-                    label="IP段( *表示任意 )"
-                    :label-width="style.label_width_tab6"
-                  >
-                    <el-input
-                      v-model="form.properties.IP_ADDRESSES"
-                      maxlength="2000"
-                      class="input"
-                      type="textarea"
-                      rows="6"
-                    ></el-input>
-                  </el-form-item>
-                </el-row>
-              </el-tab-pane>
               <el-tab-pane label="其它" name="tab7">
                 <el-row>
                   <el-form-item
@@ -1082,6 +1068,9 @@ export default {
             this.form.properties.LIMITED_IF_NO_SPECIAL_SETTINGS =
               this.form.properties.LIMITED_IF_NO_SPECIAL_SETTINGS === "true";
 
+            this.form.properties.IP_LIMIT =
+              this.form.properties.IP_LIMIT === "true";
+
             if (this.form.properties.EXAM_CYCLE_TIME_RANGE) {
               this.examCycleTimeRangeArr = JSON.parse(
                 this.form.properties.EXAM_CYCLE_TIME_RANGE

+ 5 - 3
src/modules/oe/views/alreadyAudited.vue

@@ -723,9 +723,11 @@ export default {
       }
       this.tableLoading = true;
       var params = JSON.parse(JSON.stringify(this.form));
-      if (!this.currentPagePrivileges.INVIGILATE_AUDIT_STATUS) {
-        params.status = "UN_PASS";
-      }
+
+      // if (!this.currentPagePrivileges.INVIGILATE_AUDIT_STATUS) {
+      //   params.status = "UN_PASS";
+      // }
+
       this.$http
         .post("/api/ecs_oe_admin/exam/audit/list", params)
         .then((response) => {

+ 13 - 0
src/modules/oe/views/examDetail.vue

@@ -413,6 +413,7 @@
                   <el-col :span="24">
                     <el-dropdown>
                       <el-button
+                        v-show="scope.row.showReAudit"
                         size="mini"
                         icon="el-icon-arrow-down"
                         type="primary"
@@ -588,6 +589,7 @@ export default {
   data() {
     return {
       isOnlineExam: false,
+      needShowReAudit: false,
       selectedIds: [],
       disciplineTypeList: [],
       total: 0,
@@ -657,6 +659,9 @@ export default {
   computed: {
     ...mapState({ user: (state) => state.user }),
     noBatchSelected() {
+      if (!this.needShowReAudit) {
+        return true;
+      }
       if (!this.isOnlineExam) {
         return true;
       }
@@ -783,6 +788,8 @@ export default {
         this.form.pageNo = 1;
       }
       this.tableLoading = true;
+      this.needShowReAudit = false;
+
       var params = JSON.parse(JSON.stringify(this.form));
       this.$http
         .post("/api/ecs_oe_admin/exam/record/detail/list", params)
@@ -791,6 +798,12 @@ export default {
             this.tableData = response.data.content;
             this.total = response.data.totalElements;
             this.form.pageNo = response.data.number + 1;
+
+            this.tableData.forEach((obj) => {
+              if (obj.showReAudit) {
+                this.needShowReAudit = true;
+              }
+            });
           } else {
             this.tableData = [];
           }

+ 11 - 11
src/modules/questions/views/EditSelectQuestion.vue

@@ -415,13 +415,15 @@ export default {
           .catch(() => {});
       } else {
         this.fullscreenLoading = true;
-        this.$http.put(QUESTION_API + "/question", this.quesModel).then(() => {
-          this.$notify({
-            message: "保存成功",
-            type: "success",
-          });
-          this.fullscreenLoading = false;
-        });
+        this.$httpWithMsg
+          .put(QUESTION_API + "/question", this.quesModel)
+          .then(() => {
+            this.$notify({
+              message: "保存成功",
+              type: "success",
+            });
+          })
+          .finally(() => (this.fullscreenLoading = false));
       }
     },
     //新增试题
@@ -434,7 +436,7 @@ export default {
         return false;
       }
       this.fullscreenLoading = true;
-      this.$http
+      this.$httpWithMsg
         .post(
           QUESTION_API +
             "/paper/addQuestion/" +
@@ -451,9 +453,7 @@ export default {
           });
           this.$router.push({ path: "/questions/question_list/0" });
         })
-        .catch(() => {
-          this.fullscreenLoading = false;
-        });
+        .finally(() => (this.fullscreenLoading = false));
     },
     //新增选项
     addQuesOption() {