Browse Source

5.0.4静态页面开发中

刘洋 11 tháng trước cách đây
mục cha
commit
31e20c9816

+ 7 - 0
src/modules/examwork/routes/routes.js

@@ -1,6 +1,7 @@
 import Home from "../../portal/views/home/Home.vue";
 import student from "../view/student.vue";
 import examStudentImport from "../view/examStudentImport.vue";
+import ipConfig from "../view/ipConfig.vue";
 import examStudent from "../view/examStudent.vue";
 import examInfo from "../view/examInfo.vue";
 import traditionExam from "../view/traditionExam.vue";
@@ -40,6 +41,12 @@ export default [
         meta: { pageName: "考生导入" },
         component: examStudentImport,
       },
+      {
+        path: "ip-config", //考点IP登记
+        name: "IpConfig",
+        meta: { pageName: "考点IP登记" },
+        component: ipConfig,
+      },
       {
         path: "examStudent", //考生管理
         meta: { pageName: "考生管理" },

+ 227 - 0
src/modules/examwork/view/ipConfig.vue

@@ -0,0 +1,227 @@
+<template>
+  <section class="content">
+    <div class="box box-info">
+      <div class="box-body">
+        <el-form
+          ref="formSearch"
+          :model="formSearch"
+          :inline="true"
+          label-width="70px"
+        >
+          <el-form-item label="学习中心">
+            <el-select
+              v-model="formSearch.orgId"
+              class="input"
+              :remote-method="getOrgList4Search"
+              :loading="getOrgList4SearchLoading"
+              remote
+              filterable
+              clearable
+              placeholder="请选择"
+            >
+              <el-option
+                v-for="item in orgList4Search"
+                :key="item.id"
+                :label="item.name + ' - ' + item.code"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <el-button
+              size="small"
+              type="primary"
+              icon="el-icon-search"
+              @click="resetPageAndSearchForm"
+              >查询</el-button
+            >
+          </el-form-item>
+          <el-form-item class="d-block">
+            <el-button size="small" type="primary" @click="editItem(null)"
+              >新增</el-button
+            >
+            <el-button size="small" type="primary">批量导入</el-button>
+            <el-button size="small" type="danger">批量删除</el-button>
+            <el-button
+              size="small"
+              type="success"
+              @click="openSynchronousDialog"
+              >同步到考试</el-button
+            >
+          </el-form-item>
+        </el-form>
+        <el-table
+          :data="tableData"
+          border
+          style="width: 100%; text-align: center; margin-top: 10px"
+          @selection-change="selectChange"
+        >
+          <el-table-column type="selection" width="50"></el-table-column>
+        </el-table>
+        <div class="page pull-right">
+          <el-pagination
+            :current-page="currentPage"
+            :page-size="pageSize"
+            :page-sizes="[10, 20, 50, 100, 200, 300]"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="total"
+            @current-change="handleCurrentChange"
+            @size-change="handleSizeChange"
+          ></el-pagination>
+        </div>
+      </div>
+    </div>
+    <el-dialog
+      title="同步到考试"
+      width="400px"
+      :visible.sync="showSynchronousDialog"
+    >
+      <el-form
+        ref="synchronousRef"
+        :model="synchronousForm"
+        :rules="synchronousRules"
+        label-width="80px"
+      >
+        <el-form-item label="选择考试" prop="examId">
+          <el-select
+            v-model="synchronousForm.examId"
+            placeholder="请选择考试"
+          />
+          <div style="font-size: 12px; color: #e6a23c">
+            提示:只能选择开启了IP特殊设置的考试
+          </div>
+        </el-form-item>
+      </el-form>
+      <div slot="footer">
+        <el-button @click="showSynchronousDialog = false">取消</el-button>
+        <el-button type="primary" @click="synchronousSubmit">同步</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog
+      :title="curRow ? '修改' : '新增'"
+      width="450px"
+      :visible.sync="showEditDialog"
+    >
+      <el-form
+        ref="editRef"
+        :model="editForm"
+        :rules="editRules"
+        label-width="80px"
+      >
+        <el-form-item label="学习中心" prop="orgId">
+          <el-select v-model="editForm.orgId" placeholder="请选择学习中心" />
+        </el-form-item>
+        <el-form-item label="IP/IP段" prop="ip">
+          <el-input v-model="editForm.ip" placeholder="请输入IP或者IP段" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="editForm.remark" type="textarea" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer">
+        <el-button @click="showEditDialog = false">取消</el-button>
+        <el-button type="primary" @click="editSubmit">保存</el-button>
+      </div>
+    </el-dialog>
+  </section>
+</template>
+
+<script>
+import { CORE_API } from "@/constants/constants.js";
+import { mapState } from "vuex";
+export default {
+  name: "IpConfig",
+  computed: {
+    ...mapState({ user: (state) => state.user }),
+  },
+  data() {
+    return {
+      curRow: null,
+      showSynchronousDialog: false,
+      formSearch: {
+        orgId: "",
+      },
+      getOrgList4SearchLoading: false,
+      orgList4Search: [],
+      tableData: [],
+      currentPage: 1,
+      pageSize: 10,
+      total: 10,
+      selectedIds: [],
+      editForm: {
+        orgId: "",
+        ip: "",
+        remark: "",
+      },
+      editRules: {},
+      synchronousForm: {
+        examId: "",
+      },
+      synchronousRules: {
+        examId: [
+          {
+            required: true,
+            message: "请选择考试",
+            trigger: "blur",
+          },
+        ],
+      },
+      showEditDialog: false,
+    };
+  },
+  created() {
+    this.getOrgList4Search("");
+  },
+  methods: {
+    editSubmit() {},
+    openSynchronousDialog() {
+      this.synchronousForm.examId = "";
+      this.showSynchronousDialog = true;
+    },
+    synchronousSubmit() {
+      this.showSynchronousDialog = false;
+    },
+    getOrgList4Search(orgName) {
+      this.getOrgList4SearchLoading = true;
+      let url =
+        CORE_API +
+        "/org/query?rootOrgId=" +
+        this.user.rootOrgId +
+        "&name=" +
+        orgName;
+      this.$httpWithMsg
+        .get(url)
+        .then((response) => {
+          this.getOrgList4SearchLoading = false;
+          this.orgList4Search = response.data;
+        })
+        .catch((response) => {
+          console.log(response);
+          this.getOrgList4SearchLoading = false;
+        });
+    },
+    resetPageAndSearchForm() {
+      this.currentPage = 1;
+      this.searchForm();
+    },
+    searchForm() {},
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.searchForm();
+    },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.searchForm();
+    },
+    editItem(item) {
+      this.curRow = item;
+      this.showEditDialog = true;
+    },
+    selectChange(rows) {
+      this.selectedIds = rows.map((item) => item.id);
+    },
+  },
+};
+</script>
+
+<style></style>

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

@@ -14,6 +14,7 @@ import examSummary from "../views/examSummary.vue";
 import exportTaskList from "../views/export_task_list.vue";
 import Tips from "../../portal/views/tips/Tips.vue";
 import ScoreStatistic from "../views/scoreStatistic.vue";
+import ReexamineRecord from "../views/ReexamineRecord.vue";
 
 export default [
   {
@@ -30,6 +31,11 @@ export default [
         path: "tips", //模块说明
         component: Tips,
       },
+      {
+        path: "reexamine-record",
+        name: "ReexamineRecord",
+        component: ReexamineRecord, //设置重考记录
+      },
       {
         path: "absent",
         name: "absent",

+ 125 - 0
src/modules/oe/views/ReexamineRecord.vue

@@ -0,0 +1,125 @@
+<template>
+  <section class="content">
+    <div class="box box-info">
+      <div class="box-body">
+        <el-form
+          ref="formSearch"
+          :model="formSearch"
+          :inline="true"
+          label-width="70px"
+        >
+          <el-form-item label="学习中心">
+            <el-select
+              v-model="formSearch.orgId"
+              class="input"
+              :remote-method="getOrgList4Search"
+              :loading="getOrgList4SearchLoading"
+              remote
+              filterable
+              clearable
+              placeholder="请选择"
+            >
+              <el-option
+                v-for="item in orgList4Search"
+                :key="item.id"
+                :label="item.name + ' - ' + item.code"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <el-button
+              size="small"
+              type="primary"
+              @click="resetPageAndSearchForm"
+              >查询</el-button
+            >
+            <el-button size="small" type="primary">导出</el-button>
+          </el-form-item>
+        </el-form>
+        <el-table
+          :data="tableData"
+          border
+          style="width: 100%; text-align: center; margin-top: 10px"
+        >
+        </el-table>
+        <div class="page pull-right">
+          <el-pagination
+            :current-page="currentPage"
+            :page-size="pageSize"
+            :page-sizes="[10, 20, 50, 100, 200, 300]"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="total"
+            @current-change="handleCurrentChange"
+            @size-change="handleSizeChange"
+          ></el-pagination>
+        </div>
+      </div>
+    </div>
+  </section>
+</template>
+
+<script>
+import { CORE_API } from "@/constants/constants.js";
+import { mapState } from "vuex";
+export default {
+  name: "IpConfig",
+  computed: {
+    ...mapState({ user: (state) => state.user }),
+  },
+  data() {
+    return {
+      formSearch: {},
+      getOrgList4SearchLoading: false,
+      orgList4Search: [],
+      tableData: [],
+      currentPage: 1,
+      pageSize: 10,
+      total: 10,
+    };
+  },
+  created() {
+    this.getOrgList4Search("");
+  },
+  methods: {
+    getOrgList4Search(orgName) {
+      this.getOrgList4SearchLoading = true;
+      let url =
+        CORE_API +
+        "/org/query?rootOrgId=" +
+        this.user.rootOrgId +
+        "&name=" +
+        orgName;
+      this.$httpWithMsg
+        .get(url)
+        .then((response) => {
+          this.getOrgList4SearchLoading = false;
+          this.orgList4Search = response.data;
+        })
+        .catch((response) => {
+          console.log(response);
+          this.getOrgList4SearchLoading = false;
+        });
+    },
+    resetPageAndSearchForm() {
+      this.currentPage = 1;
+      this.searchForm();
+    },
+    searchForm() {},
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.searchForm();
+    },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.searchForm();
+    },
+    editItem(item) {
+      this.curRow = item;
+      this.showEditDialog = true;
+    },
+  },
+};
+</script>
+
+<style></style>