فهرست منبع

outlet 换名

WANG 6 سال پیش
والد
کامیت
87d530d85d
3فایلهای تغییر یافته به همراه2377 افزوده شده و 0 حذف شده
  1. 1 0
      src/constants/constants.js
  2. 433 0
      src/modules/examwork/view/examInfo.vue
  3. 1943 0
      src/modules/examwork/view/examStudent.vue

+ 1 - 0
src/constants/constants.js

@@ -6,3 +6,4 @@ export const OE_API = "/api/ecs_oe"; //网考API
 export const QUESTION_API = "/api/ecs_ques"; //题库API
 export const EXCHANGE_API = "/api/ecs_outlet"; //接口机
 export const PRINT_API = "/api/ecs_prt";
+export const TASK_API = "/api/ctr/task";

+ 433 - 0
src/modules/examwork/view/examInfo.vue

@@ -0,0 +1,433 @@
+<template>
+  <div>
+    <section class="content" style="margin-top: -10px;">
+      <div class="box box-info">
+        <!-- 头信息 -->
+        <div
+          class="box-header with-border"
+          style="background-color:#D3DCE6;margin-bottom:20px;"
+        >
+          <h3 class="box-title">考务管理 > 考试管理 > 考试信息</h3>
+          <div class="box-tools pull-right">
+            <button
+              type="button"
+              class="btn btn-box-tool"
+              data-widget="collapse"
+            >
+              <i class="fa fa-minus"></i>
+            </button>
+          </div>
+        </div>
+
+        <!-- 正文信息 -->
+        <div class="box-body">
+          <el-form
+            :inline="true"
+            :model="formSearch"
+            label-position="right"
+            label-width="70px"
+          >
+            <el-form-item label="考试名称" class="pull-left">
+              <el-input
+                v-model="formSearch.name"
+                auto-complete="off"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="类型" class="pull-left">
+              <el-select
+                v-model="formSearch.examType"
+                placeholder="请选择"
+                clearable
+              >
+                <el-option
+                  v-for="item in examTypeList"
+                  :label="item.label"
+                  :value="item.value"
+                  :key="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item class="pull-right buttonframe">
+              <el-button
+                v-if="rolePrivileges.search_exam"
+                size="small"
+                type="primary"
+                icon="search"
+                @click="searchForm"
+                >查询
+              </el-button>
+              <el-button
+                v-if="rolePrivileges.add_exam"
+                size="small"
+                type="primary"
+                icon="plus"
+                @click="addExamInfoDialog"
+                >新增
+              </el-button>
+            </el-form-item>
+          </el-form>
+
+          <!-- 弹出窗口 -->
+          <el-dialog
+            title="请选择考试类型:"
+            size="small"
+            v-model="examInfoDialog"
+          >
+            <el-button type="primary" @click="toTradition">传统考试</el-button>
+            <el-button type="primary" @click="toOnline">网络考试</el-button>
+            <el-button type="primary" @click="toPractice">练习考试</el-button>
+            <el-button type="primary" @click="toOffline">离线考试</el-button>
+            <el-button type="primary" @click="toPrint">
+              分布式印刷考试</el-button
+            >
+            <div slot="footer" class="dialog-footer">
+              <el-button @click="examInfoDialog = false;">取 消</el-button>
+            </div>
+          </el-dialog>
+
+          <!-- 页面列表 -->
+          <el-table
+            v-loading="loading"
+            element-loading-text="拼命加载中"
+            :data="tableData"
+            border
+            style="width: 100%;text-align:center;"
+            @selection-change="selectChange"
+          >
+            <el-table-column type="selection" width="55"></el-table-column>
+            <el-table-column inline-template width="80" label="ID">
+              <div>
+                <span>{{ row.id }}</span>
+              </div>
+            </el-table-column>
+            <el-table-column inline-template width="180" label="考试名称">
+              <div>
+                <span>{{ row.name }}</span>
+              </div>
+            </el-table-column>
+            <el-table-column inline-template width="100" label="考试类型">
+              <div>
+                <span>{{ getExamType(row.examType) }}</span>
+              </div>
+            </el-table-column>
+            <el-table-column inline-template width="170" label="开始时间">
+              <div>
+                <span>{{ row.beginTime }}</span>
+              </div>
+            </el-table-column>
+            <el-table-column inline-template width="170" label="结束时间">
+              <div>
+                <span>{{ row.endTime }}</span>
+              </div>
+            </el-table-column>
+            <el-table-column inline-template width="170" label="更新时间">
+              <div>
+                <span>{{ row.updateTime }}</span>
+              </div>
+            </el-table-column>
+            <el-table-column inline-template width="80" label="状态">
+              <div>
+                <span>
+                  <el-tag :type="getTag(row.enable)">
+                    {{ getEnable(row.enable) }}
+                  </el-tag>
+                </span>
+              </div>
+            </el-table-column>
+            <el-table-column :context="_self" inline-template label="操作">
+              <div>
+                <el-button
+                  v-if="rolePrivileges.update_exam"
+                  size="mini"
+                  type="info"
+                  @click="editExamInfoDialog(row);"
+                >
+                  修改
+                </el-button>
+                <el-button
+                  v-if="!row.enable && rolePrivileges.change_exam_availability"
+                  size="mini"
+                  type="success"
+                  @click="enableById(row);"
+                >
+                  <i class="fa fa-check" aria-hidden="true"></i>启用
+                </el-button>
+                <el-button
+                  v-else-if="rolePrivileges.change_exam_availability"
+                  size="mini"
+                  type="warning"
+                  @click="disableById(row);"
+                >
+                  <i class="fa fa-close" aria-hidden="true"></i>禁用
+                </el-button>
+                <!--
+                  <el-button v-if="rolePrivileges.exam_course_setting" size="mini" type="info"
+                          @click="showExamCourseSettingsDialog(row)">
+                      课程设置
+                  </el-button>
+                  <el-button v-if="rolePrivileges.exam_org_setting" size="mini" type="info"
+                          @click="showExamOrgSettingsDialog(row)">
+                      学习中心设置
+                  </el-button>
+                -->
+              </div>
+            </el-table-column>
+          </el-table>
+          <div class="page pull-right">
+            <el-pagination
+              @current-change="handleCurrentChange"
+              :current-page="currentPage"
+              :page-size="pageSize"
+              layout="total, prev, pager, next, jumper"
+              :total="total"
+            >
+            </el-pagination>
+          </div>
+        </div>
+      </div>
+    </section>
+  </div>
+</template>
+<style>
+.page {
+  margin-top: 10px;
+}
+
+.buttonframe {
+  margin-left: 20px;
+}
+
+.el-table th > .cell {
+  text-align: center;
+}
+
+.el-textarea__inner {
+  resize: none;
+}
+</style>
+<script>
+import { core_api, exam_work_api, EXAM_TYPE } from "../store/global";
+import { mapState } from "vuex";
+
+export default {
+  data() {
+    return {
+      rolePrivileges: {
+        search_exam: false,
+        add_exam: false,
+        del_exam: false,
+        update_exam: false,
+        change_exam_availability: false,
+        exam_course_setting: false,
+        exam_org_setting: false
+      },
+      formSearch: {
+        name: "",
+        examType: ""
+      },
+      loading: false,
+      examTypeList: EXAM_TYPE,
+      tableData: [],
+      currentPage: 1,
+      pageSize: 10,
+      total: 10,
+      formLabelWidth: "120px",
+      examInfoDialog: false,
+      examId: "",
+      selectedExamIds: [],
+      button: {}
+    };
+  },
+  computed: {
+    ...mapState({ user: state => state.user }),
+    examIds() {
+      var examIds = "";
+      for (let examId of this.selectedExamIds) {
+        if (!examIds) {
+          examIds += examId;
+        } else {
+          examIds += "," + examId;
+        }
+      }
+      return examIds;
+    }
+  },
+
+  methods: {
+    selectChange(row) {
+      this.selectedExamIds = [];
+      row.forEach((element, index) => {
+        console.log(index);
+        this.selectedExamIds.push(element.id);
+      });
+      console.log(this.selectedExamIds);
+    },
+    getTag(status) {
+      if (status == true) {
+        return "success";
+      } else if (status == false) {
+        return "danger";
+      }
+      return status;
+    },
+    getEnable(enable) {
+      if (enable == true) {
+        return "启用";
+      } else if (enable == false) {
+        return "禁用";
+      }
+      return enable;
+    },
+    enableById(row) {
+      this.$confirm("是否启用该考试?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        var url = exam_work_api + "/exam/enable/" + row.id;
+        this.$http
+          .put(url, {})
+          .then(response => {
+            console.log(response);
+            this.$notify({
+              type: "success",
+              message: "开启成功!"
+            });
+            this.searchForm();
+          })
+          .catch(response => {
+            if (response.status == 500) {
+              this.$notify({
+                showClose: true,
+                message: response.body.desc,
+                type: "error"
+              });
+            }
+          });
+      });
+    },
+    disableById(row) {
+      this.$confirm("是否禁用该考试?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "error"
+      }).then(() => {
+        var url = exam_work_api + "/exam/disable/" + row.id;
+        this.$http
+          .put(url, {})
+          .then(response => {
+            console.log(response);
+            this.$notify({
+              type: "success",
+              message: "禁用成功!"
+            });
+            this.searchForm();
+          })
+          .catch(response => {
+            if (response.status == 500) {
+              this.$notify({
+                showClose: true,
+                message: response.body.desc,
+                type: "error"
+              });
+            }
+          });
+      });
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.searchForm();
+    },
+    //查询方法
+    searchForm() {
+      var param = new URLSearchParams(this.formSearch);
+      var url =
+        exam_work_api +
+        "/exam/queryPage/" +
+        (this.currentPage - 1) +
+        "/" +
+        this.pageSize +
+        "?" +
+        param;
+      this.loading = true;
+      this.$http.get(url).then(response => {
+        console.log(response);
+        this.tableData = response.body.list;
+        this.total = response.body.total;
+        this.loading = false;
+      });
+    },
+    addExamInfoDialog() {
+      this.examInfoDialog = true;
+      this.examId = "";
+    },
+    editExamInfoDialog(row) {
+      if (row.examType == "ONLINE") {
+        this.$router.push({ path: "/index/onlineExam/" + row.id });
+      } else if (row.examType == "TRADITION") {
+        this.$router.push({ path: "/index/traditionExam/" + row.id });
+      } else if (row.examType == "PRACTICE") {
+        this.$router.push({ path: "/index/practiceExam/" + row.id });
+      } else if (row.examType == "OFFLINE") {
+        this.$router.push({ path: "/index/offlineExam/" + row.id });
+      } else if (row.examType == "PRINT_EXAM") {
+        this.$router.push({ path: "/index/printExam/" + row.id });
+      }
+    },
+    showExamCourseSettingsDialog(row) {
+      this.$router.push({ path: "/index/examCourseSettings/" + row.id });
+    },
+    showExamOrgSettingsDialog(row) {
+      this.$router.push({ path: "/index/examOrgSettings/" + row.id });
+    },
+    toTradition() {
+      this.$router.push({ path: "/index/traditionExam/add" });
+    },
+    toOnline() {
+      this.$router.push({ path: "/index/onlineExam/add" });
+    },
+    toPractice() {
+      this.$router.push({ path: "/index/practiceExam/add" });
+    },
+    toOffline() {
+      this.$router.push({ path: "/index/offlineExam/add" });
+    },
+    toPrint() {
+      this.$router.push({ path: "/index/printExam/add" });
+    },
+    getExamType(examType) {
+      for (let tempExamType of this.examTypeList) {
+        if (tempExamType.value == examType) {
+          return tempExamType.label;
+        }
+      }
+    },
+    initPrivileges() {
+      var url = core_api + "/rolePrivilege/checkPrivileges";
+      var params = {
+        privilegeCodes: Object.keys(this.rolePrivileges).toString()
+      };
+      this.$http.post(url, params, { emulateJSON: true }).then(
+        response => {
+          this.rolePrivileges = response.body;
+        },
+        response => {
+          if (response.status == 500) {
+            this.$notify({
+              showClose: true,
+              message: response.body.desc,
+              type: "error"
+            });
+          }
+        }
+      );
+    }
+  },
+  //初始化查询
+  created() {
+    this.initPrivileges();
+    this.searchForm();
+  }
+};
+</script>

+ 1943 - 0
src/modules/examwork/view/examStudent.vue

@@ -0,0 +1,1943 @@
+<style>
+.page {
+  margin-top: 10px;
+}
+
+.buttonframe {
+  margin-left: 20px;
+}
+
+.el-table th > .cell {
+  text-align: center;
+}
+
+.el-textarea__inner {
+  resize: none;
+}
+
+.input {
+  width: 170px;
+}
+
+.select_input {
+  width: 195px;
+}
+
+.dialog-footer {
+  text-align: center;
+}
+
+.form_width {
+  width: 200px;
+}
+</style>
+<template>
+  <div>
+    <section class="content" style="margin-top: -10px;">
+      <!-- 头信息 -->
+      <div
+        class="box-header with-border"
+        style="background-color:#D3DCE6;margin-bottom:20px;"
+      >
+        <h3 class="box-title">考生信息</h3>
+        <div class="box-tools pull-right">
+          <button type="button" class="btn btn-box-tool" data-widget="collapse">
+            <i class="fa fa-minus"></i>
+          </button>
+        </div>
+      </div>
+
+      <!-- 正文信息 -->
+      <div class="box-body">
+        <!-- 搜索表单 -->
+        <el-form
+          :inline="true"
+          :model="formSearch"
+          label-position="right"
+          label-width="100px"
+        >
+          <el-form-item label="考试" class="pull-left">
+            <el-select
+              class="input"
+              :remote-method="queryExams4Search"
+              remote
+              :loading="queryExams4SearchLoading"
+              filterable
+              clearable
+              v-model="formSearch.examId"
+              placeholder="请选择"
+            >
+              <el-option
+                v-for="item in examList4Search"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="姓名" class="pull-left">
+            <el-input
+              class="input"
+              placeholder="请输入姓名"
+              v-model="formSearch.studentName"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="学号" class="pull-left">
+            <el-input
+              class="input"
+              placeholder="请输入学号"
+              v-model="formSearch.studentCode"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="专业" class="pull-left">
+            <el-input
+              class="input"
+              placeholder="请输入专业"
+              v-model="formSearch.specialtyName"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="课程" class="pull-left">
+            <el-select
+              class="input"
+              :remote-method="getCourses4Search"
+              :loading="courseLoading4Search"
+              remote
+              filterable
+              clearable
+              v-model="formSearch.courseId"
+              placeholder="请选择"
+            >
+              <el-option
+                v-for="item in courseList4Search"
+                :label="item.name + ' - ' + item.code"
+                :value="item.id"
+                :key="item.id"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="学习中心" class="pull-left">
+            <el-select
+              class="input"
+              :remote-method="getOrgList4Search"
+              :loading="getOrgList4SearchLoading"
+              remote
+              filterable
+              clearable
+              v-model="formSearch.orgId"
+              placeholder="请选择"
+              :disabled="pureLC"
+            >
+              <el-option
+                v-for="item in orgList4Search"
+                :label="item.name + ' - ' + item.code"
+                :value="item.id"
+                :key="item.id"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="采集人" class="pull-left">
+            <el-input
+              class="input"
+              placeholder="请输入采集人"
+              v-model="formSearch.infoCollector"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="身份证" class="pull-left">
+            <el-input
+              class="input"
+              placeholder="请输入身份证"
+              v-model="formSearch.identityNumber"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="考点" class="pull-left">
+            <el-input
+              class="input"
+              placeholder="请输入考点"
+              v-model="formSearch.examSite"
+            ></el-input>
+          </el-form-item>
+          <el-form-item class="pull-right buttonframe">
+            <el-button
+              v-if="rolePrivileges.search_examStudent"
+              size="small"
+              type="primary"
+              icon="search"
+              @click="searchForm"
+              >查询
+            </el-button>
+            <el-button
+              v-if="rolePrivileges.add_examStudent"
+              size="small"
+              type="primary"
+              icon="plus"
+              @click="openAddingDialog"
+              >新增
+            </el-button>
+            <el-button
+              v-if="rolePrivileges.copy_examStudent"
+              size="small"
+              type="primary"
+              icon="document"
+              @click="copy"
+              >复制
+            </el-button>
+            <el-button
+              v-if="rolePrivileges.del_examStudent"
+              size="small"
+              type="danger"
+              icon="delete"
+              @click="deleteStuBatch"
+              >删除
+            </el-button>
+            <el-button
+              v-if="rolePrivileges.del_examStudent"
+              size="small"
+              type="danger"
+              icon="delete"
+              @click="deleteStuByExam"
+              >批次删除
+            </el-button>
+          </el-form-item>
+        </el-form>
+
+        <!-- 新增弹出窗口 -->
+        <el-dialog
+          @close="closeAddingStudentDialog"
+          title="考生信息页面"
+          v-model="addingStudentDialog"
+        >
+          <el-form
+            :model="examStudentForm"
+            size="large"
+            :rules="rules"
+            ref="addingStudentForm"
+          >
+            <el-row :gutter="20">
+              <el-col :xs="10" :sm="10" :md="10" :lg="10">
+                <el-form-item
+                  label="考试"
+                  :label-width="formLabelWidth"
+                  prop="examId"
+                >
+                  <el-select
+                    class="input"
+                    :remote-method="queryExams4InsertOrUpdate"
+                    :loading="queryExams4InsertOrUpdateLoading"
+                    remote
+                    filterable
+                    clearable
+                    v-model="examStudentForm.examId"
+                    placeholder="请选择"
+                  >
+                    <el-option
+                      v-for="item in examList4InsertOrUpdate"
+                      :label="item.name"
+                      :value="item.id"
+                      :key="item.id"
+                      :disabled="!item.enable"
+                    >
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :xs="10" :sm="10" :md="10" :lg="10">
+                <el-form-item
+                  label="姓名"
+                  :label-width="formLabelWidth"
+                  prop="studentName"
+                >
+                  <el-input
+                    class="input"
+                    v-model="examStudentForm.studentName"
+                    auto-complete="off"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="20">
+              <el-col :xs="10" :sm="10" :md="10" :lg="10">
+                <el-form-item
+                  label="学号"
+                  :label-width="formLabelWidth"
+                  prop="studentCode"
+                >
+                  <el-input
+                    class="input"
+                    v-model="examStudentForm.studentCode"
+                    auto-complete="off"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :xs="10" :sm="10" :md="10" :lg="10">
+                <el-form-item
+                  label="身份证号"
+                  :label-width="formLabelWidth"
+                  prop="identityNumber"
+                >
+                  <el-input
+                    class="input"
+                    v-model="examStudentForm.identityNumber"
+                    auto-complete="off"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="20">
+              <el-col :xs="10" :sm="10" :md="10" :lg="10">
+                <el-form-item
+                  label="学习中心"
+                  :label-width="formLabelWidth"
+                  prop="orgId"
+                >
+                  <el-select
+                    class="input"
+                    :remote-method="getOrgList4InsertOrUpdate"
+                    :loading="getOrgList4InsertOrUpdateLoading"
+                    remote
+                    filterable
+                    clearable
+                    v-model="examStudentForm.orgId"
+                    placeholder="请选择"
+                    :disabled="pureLC"
+                  >
+                    <el-option
+                      v-for="item in orgList4InsertOrUpdate"
+                      :label="item.name + ' - ' + item.code"
+                      :value="item.id"
+                      :key="item.id"
+                      :disabled="!item.enable"
+                    >
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :xs="10" :sm="10" :md="10" :lg="10">
+                <el-form-item
+                  label="课程"
+                  :label-width="formLabelWidth"
+                  prop="courseId"
+                >
+                  <el-select
+                    :remote-method="getCourses4InsertOrUpdate"
+                    :loading="courseLoading4InsertOrUpdate"
+                    remote
+                    filterable
+                    clearable
+                    class="input"
+                    v-model="examStudentForm.courseId"
+                    placeholder="请选择"
+                  >
+                    <el-option
+                      v-for="item in courseList4InsertOrUpdate"
+                      :label="item.name + ' - ' + item.code"
+                      :value="item.id"
+                      :key="item.id"
+                      :disabled="!item.enable"
+                    >
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="20">
+              <el-col :xs="10" :sm="10" :md="10" :lg="10">
+                <el-form-item
+                  label="试卷类型"
+                  :label-width="formLabelWidth"
+                  prop="paperType"
+                >
+                  <el-select
+                    class="input"
+                    v-model="examStudentForm.paperType"
+                    placeholder="请选择"
+                  >
+                    <el-option
+                      v-for="item in paperTypeList"
+                      :label="item"
+                      :value="item"
+                      :key="item"
+                    >
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :xs="10" :sm="10" :md="10" :lg="10">
+                <el-form-item label="专业" :label-width="formLabelWidth">
+                  <el-input
+                    class="input"
+                    v-model="examStudentForm.specialtyName"
+                    auto-complete="off"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="20">
+              <el-col :xs="10" :sm="10" :md="10" :lg="10">
+                <el-form-item label="考点" :label-width="formLabelWidth">
+                  <el-input
+                    class="input"
+                    v-model="examStudentForm.examSite"
+                    auto-complete="off"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="10">
+                <el-form-item label="年级" :label-width="formLabelWidth">
+                  <el-input
+                    class="input"
+                    v-model="examStudentForm.grade"
+                    auto-complete="off"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="20">
+              <el-col :span="10">
+                <el-form-item label="采集人" :label-width="formLabelWidth">
+                  <el-input
+                    class="input"
+                    v-model="examStudentForm.infoCollector"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="10">
+                <el-form-item label="电话" :label-width="formLabelWidth">
+                  <el-input
+                    class="input"
+                    v-model="examStudentForm.phone"
+                    auto-complete="off"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+          <div class="dialog-footer">
+            <el-button type="primary" @click="addStudent">确 定</el-button>
+            <el-button @click="closeAddingStudentDialog">取 消</el-button>
+          </div>
+        </el-dialog>
+
+        <!-- 修改弹出窗口 -->
+        <el-dialog
+          @close="closeUpdateStudentDialog"
+          title="考生信息页面"
+          v-model="updateStudentDialog"
+        >
+          <el-form
+            :model="examStudentForm"
+            size="large"
+            :rules="rules"
+            ref="updateStudentForm"
+          >
+            <el-row :gutter="20">
+              <el-col :xs="10" :sm="10" :md="10" :lg="10">
+                <el-form-item
+                  label="考试"
+                  :label-width="formLabelWidth"
+                  prop="examId"
+                >
+                  <el-select
+                    class="input"
+                    :remote-method="queryExams4InsertOrUpdate"
+                    :loading="queryExams4InsertOrUpdateLoading"
+                    remote
+                    disabled
+                    filterable
+                    clearable
+                    v-model="examStudentForm.examId"
+                    placeholder="请选择"
+                  >
+                    <el-option
+                      v-for="item in examList4InsertOrUpdate"
+                      :label="item.name"
+                      :value="item.id"
+                      :key="item.id"
+                      :disabled="!item.enable"
+                    >
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :xs="10" :sm="10" :md="10" :lg="10">
+                <el-form-item
+                  label="姓名"
+                  :label-width="formLabelWidth"
+                  prop="studentName"
+                >
+                  <el-input
+                    class="input"
+                    v-model="examStudentForm.studentName"
+                    auto-complete="off"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="20">
+              <el-col :xs="10" :sm="10" :md="10" :lg="10">
+                <el-form-item
+                  label="学号"
+                  :label-width="formLabelWidth"
+                  prop="studentCode"
+                >
+                  <el-input
+                    class="input"
+                    v-model="examStudentForm.studentCode"
+                    readonly
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :xs="10" :sm="10" :md="10" :lg="10">
+                <el-form-item
+                  label="身份证号"
+                  :label-width="formLabelWidth"
+                  prop="identityNumber"
+                >
+                  <el-input
+                    class="input"
+                    v-model="examStudentForm.identityNumber"
+                    readonly
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="20">
+              <el-col :xs="10" :sm="10" :md="10" :lg="10">
+                <el-form-item
+                  label="学习中心"
+                  :label-width="formLabelWidth"
+                  prop="orgId"
+                >
+                  <el-select
+                    class="input"
+                    :remote-method="getOrgList4InsertOrUpdate"
+                    :loading="getOrgList4InsertOrUpdateLoading"
+                    remote
+                    filterable
+                    clearable
+                    v-model="examStudentForm.orgId"
+                    placeholder="请选择"
+                    :disabled="pureLC"
+                  >
+                    <el-option
+                      v-for="item in orgList4InsertOrUpdate"
+                      :label="item.name + ' - ' + item.code"
+                      :value="item.id"
+                      :key="item.id"
+                      :disabled="!item.enable"
+                    >
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :xs="10" :sm="10" :md="10" :lg="10">
+                <el-form-item
+                  label="课程"
+                  :label-width="formLabelWidth"
+                  prop="courseId"
+                >
+                  <el-select
+                    :remote-method="getCourses4InsertOrUpdate"
+                    :loading="courseLoading4InsertOrUpdate"
+                    remote
+                    filterable
+                    clearable
+                    disabled
+                    class="input"
+                    v-model="examStudentForm.courseId"
+                    placeholder="请选择"
+                  >
+                    <el-option
+                      v-for="item in courseList4InsertOrUpdate"
+                      :label="item.name + ' - ' + item.code"
+                      :value="item.id"
+                      :key="item.id"
+                      :disabled="!item.enable"
+                    >
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="20">
+              <el-col :xs="10" :sm="10" :md="10" :lg="10">
+                <el-form-item
+                  label="试卷类型"
+                  :label-width="formLabelWidth"
+                  prop="paperType"
+                >
+                  <el-select
+                    class="input"
+                    v-model="examStudentForm.paperType"
+                    placeholder="请选择"
+                  >
+                    <el-option
+                      v-for="item in paperTypeList"
+                      :label="item"
+                      :value="item"
+                      :key="item"
+                    >
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :xs="10" :sm="10" :md="10" :lg="10">
+                <el-form-item label="专业" :label-width="formLabelWidth">
+                  <el-input
+                    class="input"
+                    v-model="examStudentForm.specialtyName"
+                    auto-complete="off"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="20">
+              <el-col :xs="10" :sm="10" :md="10" :lg="10">
+                <el-form-item label="考点" :label-width="formLabelWidth">
+                  <el-input
+                    class="input"
+                    v-model="examStudentForm.examSite"
+                    auto-complete="off"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="10">
+                <el-form-item label="年级" :label-width="formLabelWidth">
+                  <el-input
+                    class="input"
+                    v-model="examStudentForm.grade"
+                    auto-complete="off"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="20">
+              <el-col :span="10">
+                <el-form-item label="采集人" :label-width="formLabelWidth">
+                  <el-input
+                    class="input"
+                    v-model="examStudentForm.infoCollector"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="10">
+                <el-form-item label="电话" :label-width="formLabelWidth">
+                  <el-input
+                    class="input"
+                    v-model="examStudentForm.phone"
+                    auto-complete="off"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+          <div class="dialog-footer">
+            <el-button type="primary" @click="updateStudent">确 定</el-button>
+            <el-button @click="closeUpdateStudentDialog">取 消</el-button>
+          </div>
+        </el-dialog>
+
+        <!-- 复制弹窗 -->
+        <el-dialog title="考生信息复制" size="tiny" v-model="studentCopyDialog">
+          <el-form
+            :model="studentCopyForm"
+            :rules="rules"
+            ref="studentCopyForm"
+          >
+            <el-row>
+              <el-form-item
+                label="源考试批次"
+                prop="sourceExamId"
+                :label-width="formLabelWidth"
+              >
+                <el-select
+                  class="input"
+                  :remote-method="queryExams4CopyFrom"
+                  remote
+                  :loading="queryExams4CopyFromLoading"
+                  filterable
+                  clearable
+                  v-model="studentCopyForm.sourceExamId"
+                  placeholder="请选择"
+                >
+                  <el-option
+                    v-for="item in examList4CopyFrom"
+                    :label="item.name"
+                    :value="item.id"
+                    :key="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-row>
+            <el-row>
+              <el-form-item
+                label="目标考试批次"
+                prop="targetExamId"
+                :label-width="formLabelWidth"
+              >
+                <el-select
+                  class="input"
+                  :remote-method="queryExams4CopyTo"
+                  remote
+                  :loading="queryExams4CopyToLoading"
+                  filterable
+                  clearable
+                  v-model="studentCopyForm.targetExamId"
+                  placeholder="请选择"
+                >
+                  <el-option
+                    v-for="item in examList4CopyTo"
+                    :label="item.name"
+                    :value="item.id"
+                    :key="item.id"
+                    :disabled="!item.enable"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-row>
+            <el-row>
+              <div class="dialog-footer">
+                <el-button type="primary" @click="copyStudent">确 定</el-button>
+                <el-button @click="studentCopyDialog = false;">取 消</el-button>
+              </div>
+            </el-row>
+          </el-form>
+        </el-dialog>
+
+        <!-- 页面列表 -->
+        <el-table
+          v-loading="loading"
+          element-loading-text="拼命加载中"
+          :data="tableData"
+          border
+          style="width: 100%;text-align:center;"
+          @selection-change="selectChange"
+        >
+          <el-table-column type="selection" width="55"></el-table-column>
+          <el-table-column inline-template label="ID">
+            <div>
+              <span>{{ row.id }}</span>
+            </div>
+          </el-table-column>
+          <el-table-column label="考生">
+            <template scope="scope">
+              <el-popover trigger="hover" placement="left">
+                <div style="font-size: 18px;font-family: 新宋体">
+                  <tr>
+                    <td style="color: green">姓名</td>
+                    <td style="color:purple;padding-left: 20px;">
+                      {{ scope.row.studentName }}
+                    </td>
+                  </tr>
+                  <tr>
+                    <td style="color: green">身份证号</td>
+                    <td style="color:purple;padding-left: 20px;">
+                      {{ scope.row.identityNumber }}
+                    </td>
+                  </tr>
+                  <tr>
+                    <td style="color: green">学号</td>
+                    <td style="color:purple;padding-left: 20px;">
+                      {{ scope.row.studentCode }}
+                    </td>
+                  </tr>
+                  <tr>
+                    <td style="color: green">学习中心名称</td>
+                    <td style="color:purple;padding-left: 20px;">
+                      {{ scope.row.orgName }}
+                    </td>
+                  </tr>
+                  <tr>
+                    <td style="color: green">学习中心编码</td>
+                    <td style="color:purple;padding-left: 20px;">
+                      {{ scope.row.orgCode }}
+                    </td>
+                  </tr>
+                  <tr>
+                    <td style="color: green">课程名称</td>
+                    <td style="color:purple;padding-left: 20px;">
+                      {{ scope.row.courseName }}
+                    </td>
+                  </tr>
+                  <tr>
+                    <td style="color: green">课程编码</td>
+                    <td style="color:purple;padding-left: 20px;">
+                      {{ scope.row.courseCode }}
+                    </td>
+                  </tr>
+                  <tr>
+                    <td style="color: green">年级</td>
+                    <td style="color:purple;padding-left: 20px;">
+                      {{ scope.row.grade }}
+                    </td>
+                  </tr>
+                  <tr>
+                    <td style="color: green">电话</td>
+                    <td style="color:purple;padding-left: 20px;">
+                      {{ scope.row.phone }}
+                    </td>
+                  </tr>
+                  <tr>
+                    <td style="color: green">专业</td>
+                    <td style="color:purple;padding-left: 20px;">
+                      {{ scope.row.specialtyName }}
+                    </td>
+                  </tr>
+                  <tr>
+                    <td style="color: green">采集人</td>
+                    <td style="color:purple;padding-left: 20px;">
+                      {{ scope.row.infoCollector }}
+                    </td>
+                  </tr>
+                  <tr>
+                    <td style="color: green">考点</td>
+                    <td style="color:purple;padding-left: 20px;">
+                      {{ scope.row.examSite }}
+                    </td>
+                  </tr>
+                </div>
+
+                <div slot="reference" class="name-wrapper">
+                  <span>{{ scope.row.studentName }}</span>
+                </div>
+              </el-popover>
+            </template>
+          </el-table-column>
+          <el-table-column inline-template label="学号">
+            <div>
+              <span>{{ row.studentCode }}</span>
+            </div>
+          </el-table-column>
+          <el-table-column inline-template label="身份证号">
+            <div>
+              <span>{{ row.identityNumber }}</span>
+            </div>
+          </el-table-column>
+          <el-table-column inline-template label="学习中心">
+            <div>
+              <span>{{ row.orgName }}</span>
+            </div>
+          </el-table-column>
+          <el-table-column inline-template label="考试名称">
+            <div>
+              <span>{{ row.examName }}</span>
+            </div>
+          </el-table-column>
+          <el-table-column inline-template label="课程名称">
+            <div>
+              <span>{{ row.courseName }}</span>
+            </div>
+          </el-table-column>
+          <el-table-column inline-template width="168" label="更新时间">
+            <div>
+              <span>{{ row.updateTime }}</span>
+            </div>
+          </el-table-column>
+          <el-table-column inline-template width="80" label="状态">
+            <div>
+              <span>
+                <el-tag :type="getTag(row.enable)">{{
+                  getEnable(row.enable)
+                }}</el-tag>
+              </span>
+            </div>
+          </el-table-column>
+          <el-table-column
+            :context="_self"
+            width="250"
+            inline-template
+            label="操作"
+          >
+            <div v-if="row.locked">
+              <font style="color: red;">锁定中,请稍后操作</font>
+            </div>
+            <div v-else>
+              <el-button size="mini" type="info" @click="showPhoto(row);">
+                查看照片
+              </el-button>
+              <el-button
+                v-if="rolePrivileges.update_examStudent"
+                size="mini"
+                type="info"
+                @click="openUpdateDialog(row);"
+              >
+                修改
+              </el-button>
+              <el-button
+                v-if="
+                  null != row.enable &&
+                    !row.enable &&
+                    rolePrivileges.change_exam_student_availability
+                "
+                size="mini"
+                type="success"
+                @click="enableExamStudent(row);"
+                >启用
+              </el-button>
+              <el-button
+                v-else-if="rolePrivileges.change_exam_student_availability"
+                size="mini"
+                type="danger"
+                @click="disableExamStudent(row);"
+                >禁用
+              </el-button>
+              <el-button
+                v-if="rolePrivileges.del_examStudent"
+                size="mini"
+                type="danger"
+                @click="deleteExamStudent(row);"
+                >删除
+              </el-button>
+            </div>
+          </el-table-column>
+        </el-table>
+        <div class="page pull-right">
+          <el-pagination
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-size="pageSize"
+            layout="total, prev, pager, next, jumper"
+            :total="total"
+          >
+          </el-pagination>
+        </div>
+
+        <el-dialog title="错误提示" v-model="errDialog">
+          <div
+            class="text-danger"
+            v-for="errMessage in errMessages"
+            :key="errMessage.lineNum"
+          >
+            第{{ errMessage.lineNum }}行:{{ errMessage.msg }}
+          </div>
+          <span slot="footer" class="dialog-footer">
+            <el-button @click="errDialog = false;">确定</el-button>
+          </span>
+        </el-dialog>
+
+        <el-dialog @close="closePhotoDialog" title="照片" v-model="photoDialog">
+          <div class="student_photo">
+            <img :src="photo.url" alt="学生照片" height="20%" width="30%" />
+          </div>
+        </el-dialog>
+      </div>
+    </section>
+  </div>
+</template>
+
+<script>
+import { task_api, core_api, exam_work_api, photo_url } from "../store/global";
+import { mapState } from "vuex";
+
+export default {
+  data() {
+    var validateStuCode = (rule, value, callback) => {
+      if (
+        this.examStudentForm.studentCode &&
+        this.examStudentForm.studentCode.length < 6
+      ) {
+        callback(new Error("学号至少6位"));
+      } else {
+        callback();
+      }
+    };
+    var validateIdenNum = (rule, value, callback) => {
+      if (this.examStudentForm.identityNumber === "") {
+        return callback(new Error("请输入身份证"));
+      }
+      if (
+        this.examStudentForm.identityNumber &&
+        this.examStudentForm.identityNumber.length < 6
+      ) {
+        callback(new Error("身份证至少6位"));
+      } else {
+        callback();
+      }
+    };
+    return {
+      rolePrivileges: {
+        search_examStudent: false,
+        add_examStudent: false,
+        import_examStudent: false,
+        copy_examStudent: false,
+        del_examStudent: false,
+        update_examStudent: false,
+        change_exam_student_availability: false
+      },
+      isSuperAdmin: false,
+      pureLC: false,
+      lc_id: null,
+      lc_code: null,
+      lc_name: null,
+      loading: false,
+      courseLoading4Search: false,
+      courseLoading4InsertOrUpdate: false,
+      photoDialog: false,
+      photo: { url: "" },
+      specialtyList: [],
+      button: {},
+      errDialog: false,
+      errMessages: [],
+      uploadAction: exam_work_api + "/exam_student/import",
+      uploadData: { examId: "" },
+      fileLoading: false,
+      fileList: [],
+      uploadHeaders: {},
+      orgList4Search: [],
+      getOrgList4SearchLoading: false,
+      formSearch: {
+        rootOrgId: null,
+        examId: "",
+        studentCode: "",
+        studentName: "",
+        orgId: null,
+        specialtyName: "",
+        courseId: null,
+        infoCollector: "",
+        identityNumber: ""
+      },
+      paperTypeList: [
+        "A",
+        "B",
+        "C",
+        "D",
+        "E",
+        "F",
+        "G",
+        "H",
+        "I",
+        "J",
+        "K",
+        "L",
+        "M",
+        "N",
+        "O",
+        "P",
+        "Q",
+        "R",
+        "S",
+        "T",
+        "U",
+        "V",
+        "W",
+        "X",
+        "Y",
+        "Z"
+      ],
+      courseList4Search: [],
+      courseList4InsertOrUpdate: [],
+
+      examList4Search: [],
+      examList4InsertOrUpdate: [],
+      examList4Import: [],
+      examList4CopyFrom: [],
+      examList4CopyTo: [],
+
+      queryExams4SearchLoading: false,
+      queryExams4InsertOrUpdateLoading: false,
+      queryExams4ImportLoading: false,
+      queryExams4CopyFromLoading: false,
+      queryExams4CopyToLoading: false,
+
+      selectedExamStuIds: [],
+      addingStudentDialog: false,
+      updateStudentDialog: false,
+      studentPhoDialog: false,
+      studentImportDialog: false,
+      studentCopyDialog: false,
+
+      tableData: [],
+
+      currentPage: 1,
+      pageSize: 10,
+      total: 10,
+
+      formLabelWidth: "120px",
+
+      orgList4InsertOrUpdate: [],
+      getOrgList4InsertOrUpdateLoading: false,
+      examStudentForm: {
+        id: null,
+        examId: "",
+        courseId: null,
+        studentId: null,
+        studentName: "",
+        studentCode: "",
+        identityNumber: "",
+        specialtyName: "",
+        orgId: "",
+        examSite: "",
+        grade: "",
+        phone: "",
+        infoCollector: "",
+        paperType: "X"
+      },
+
+      studentImportForm: {
+        examId: ""
+      },
+      studentCopyForm: {
+        sourceExamId: "",
+        targetExamId: ""
+      },
+      result: false,
+
+      rules: {
+        examId: [
+          {
+            type: "number",
+            required: true,
+            message: "请选择考试",
+            trigger: "change"
+          }
+        ],
+        studentName: [
+          { required: true, message: "请输入姓名", trigger: "blur" }
+        ],
+        studentCode: [{ validator: validateStuCode, trigger: "blur" }],
+        identityNumber: [
+          { required: true, validator: validateIdenNum, trigger: "blur" }
+        ],
+        courseId: [
+          {
+            type: "number",
+            required: true,
+            message: "请选择课程",
+            trigger: "change"
+          }
+        ],
+        paperType: [
+          { required: false, message: "请输入试卷类型", trigger: "blur" }
+        ],
+        orgId: [
+          {
+            type: "number",
+            required: true,
+            message: "请选择学习中心",
+            trigger: "change"
+          }
+        ],
+        sourceExamId: [
+          {
+            type: "number",
+            required: true,
+            message: "请选择源考试批次",
+            trigger: "change"
+          }
+        ],
+        targetExamId: [
+          {
+            type: "number",
+            required: true,
+            message: "请选择目标考试批次",
+            trigger: "change"
+          }
+        ]
+      }
+    };
+  },
+
+  computed: {
+    ...mapState({ user: state => state.user }),
+    examStuIds() {
+      var examStuIds = "";
+      for (let examStuId of this.selectedExamStuIds) {
+        if (!examStuIds) {
+          examStuIds += examStuId;
+        } else {
+          examStuIds += "," + examStuId;
+        }
+      }
+      return examStuIds;
+    }
+  },
+
+  methods: {
+    getTag(status) {
+      if (status == true) {
+        return "success";
+      } else if (status == false) {
+        return "danger";
+      } else {
+        return status;
+      }
+    },
+    getEnable(enable) {
+      if (enable == true) {
+        return "启用";
+      } else if (enable == false) {
+        return "禁用";
+      } else {
+        return "启用";
+      }
+    },
+    queryExams4Search(name) {
+      this.queryExams(name, "search");
+    },
+    queryExams4InsertOrUpdate(name) {
+      this.queryExams(name, "insertOrUpdate");
+    },
+    queryExams4Import(name) {
+      this.queryExams(name, "import");
+    },
+    queryExams4CopyFrom(name) {
+      this.queryExams(name, "copyFrom");
+    },
+    queryExams4CopyTo(name) {
+      this.queryExams(name, "copyTo");
+    },
+    queryExams(name, where) {
+      console.log("queryExams; name: " + name);
+      if ("search" == where) {
+        this.queryExams4SearchLoading = true;
+      } else if ("insertOrUpdate" == where) {
+        this.queryExams4InsertOrUpdateLoading = true;
+      } else if ("import" == where) {
+        this.queryExams4ImportLoading = true;
+      } else if ("copyFrom" == where) {
+        this.queryExams4CopyFromLoading = true;
+      } else if ("copyTo" == where) {
+        this.queryExams4CopyToLoading = true;
+      }
+      this.$http
+        .get(exam_work_api + "/exam/queryByNameLike?name=" + name)
+        .then(response => {
+          if ("search" == where) {
+            this.queryExams4SearchLoading = false;
+            this.examList4Search = response.body;
+          } else if ("insertOrUpdate" == where) {
+            this.queryExams4InsertOrUpdateLoading = false;
+            this.examList4InsertOrUpdate = response.body;
+          } else if ("import" == where) {
+            this.queryExams4ImportLoading = false;
+            this.examList4Import = response.body;
+          } else if ("copyFrom" == where) {
+            this.queryExams4CopyFromLoading = false;
+            this.examList4CopyFrom = response.body;
+          } else if ("copyTo" == where) {
+            this.queryExams4CopyToLoading = false;
+            this.examList4CopyTo = response.body;
+          }
+        })
+        .catch(response => {
+          if (response.status == 500) {
+            this.$notify({
+              showClose: true,
+              message: response.body.desc,
+              type: "error"
+            });
+          }
+          if ("search" == where) {
+            this.queryExams4SearchLoading = false;
+          } else if ("insertOrUpdate" == where) {
+            this.queryExams4InsertOrUpdateLoading = false;
+          } else if ("import" == where) {
+            this.queryExams4ImportLoading = false;
+          } else if ("copyFrom" == where) {
+            this.queryExams4CopyFromLoading = false;
+          } else if ("copyTo" == where) {
+            this.queryExams4CopyToLoading = false;
+          }
+        });
+    },
+    getOrgList4Search(orgName) {
+      this.getOrgList(orgName, "search");
+    },
+    getOrgList4InsertOrUpdate(orgName) {
+      this.getOrgList(orgName, "insertOrUpdate");
+    },
+    getOrgList(orgName, where) {
+      if (Object.prototype.toString.call(orgName) != "[object String]") {
+        return;
+      }
+      orgName = orgName.split(" - ")[0];
+      if ("search" == where) {
+        this.getOrgList4SearchLoading = true;
+      } else if ("insertOrUpdate" == where) {
+        this.getOrgList4InsertOrUpdateLoading = true;
+      }
+
+      var url =
+        core_api + "/org/query?" + new URLSearchParams({ name: orgName });
+      this.$http
+        .get(url)
+        .then(response => {
+          if ("search" == where) {
+            this.getOrgList4SearchLoading = false;
+            this.orgList4Search = response.body;
+          } else if ("insertOrUpdate" == where) {
+            this.getOrgList4InsertOrUpdateLoading = false;
+            this.orgList4InsertOrUpdate = response.body;
+          }
+        })
+        .catch(response => {
+          if (response.status == 500) {
+            this.$notify({
+              showClose: true,
+              message: response.body.desc,
+              type: "error"
+            });
+          }
+          if ("search" == where) {
+            this.getOrgList4SearchLoading = false;
+          } else if ("insertOrUpdate" == where) {
+            this.getOrgList4InsertOrUpdateLoading = false;
+          }
+        });
+    },
+    closePhotoDialog() {
+      this.photo.url = "";
+      this.photoDialog = false;
+    },
+    showPhoto(row) {
+      var url = core_api + "/student/" + row.studentId;
+      this.$http.get(url).then(response => {
+        if (response.body.photoPath) {
+          this.photo.url = photo_url + response.body.photoPath;
+          this.photoDialog = true;
+        } else {
+          this.$notify({
+            showClose: true,
+            message: "未上传照片",
+            type: "error"
+          });
+        }
+      });
+    },
+    getExcelTitle(row) {
+      return "第" + row + "行";
+    },
+    getCourseName(code) {
+      for (let course of this.courseList) {
+        if (code == course.code) {
+          return course.name;
+        }
+      }
+    },
+    specialtySelect(code) {
+      console.log(code);
+      for (let specialty of this.specialtyList) {
+        if (code == specialty.code) {
+          return specialty.name;
+        }
+      }
+    },
+    selectChange(row) {
+      this.selectedExamStuIds = [];
+      row.forEach((element, index) => {
+        console.log(index);
+        this.selectedExamStuIds.push(element.id);
+      });
+      console.log(this.selectedExamStuIds);
+    },
+    //查询方法
+    searchForm() {
+      var param = new URLSearchParams(this.formSearch);
+      this.loading = true;
+      var url =
+        exam_work_api +
+        "/exam_student/examStudentPage/" +
+        (this.currentPage - 1) +
+        "/" +
+        this.pageSize +
+        "?" +
+        param;
+      this.$http
+        .get(url)
+        .then(response => {
+          this.tableData = response.body.list;
+          this.total = response.body.total;
+          this.loading = false;
+        })
+        .catch(function(response) {
+          if (response.status == 500) {
+            this.$notify({
+              showClose: true,
+              message: response.body.desc,
+              type: "error"
+            });
+          }
+        });
+    },
+    //查询所有课程
+    getSpecialtys() {
+      var orgId = this.user.orgId;
+      this.$http
+        .get(core_api + "/specialty/all?orgId=" + orgId)
+        .then(response => {
+          console.log(response);
+          this.specialtyList = response.body;
+        });
+    },
+    getCourses4Search(query) {
+      query = query.split(" - ")[0];
+      if (query) {
+        this.courseLoading4Search = true;
+        this.$http
+          .get(core_api + "/course/query?name=" + query)
+          .then(response => {
+            this.courseList4Search = response.body;
+            this.courseLoading4Search = false;
+          });
+      } else {
+        this.courseList4Search = [];
+      }
+    },
+    getCourses4InsertOrUpdate(query) {
+      query = query.split(" - ")[0];
+      if (query) {
+        this.courseLoading4InsertOrUpdate = true;
+        this.$http
+          .get(core_api + "/course/query?name=" + query)
+          .then(response => {
+            this.courseList4InsertOrUpdate = response.body;
+            this.courseLoading4InsertOrUpdate = false;
+          });
+      } else {
+        this.courseList4InsertOrUpdate = [];
+      }
+    },
+    //新增信息
+    addStudent() {
+      var url = exam_work_api + "/exam_student";
+      this.$refs.addingStudentForm.validate(valid => {
+        if (valid) {
+          this.$http.put(url, this.examStudentForm).then(
+            response => {
+              console.log(response);
+              this.$notify({
+                type: "success",
+                message: "保存成功"
+              });
+              this.addingStudentDialog = false;
+              this.searchForm();
+            },
+            response => {
+              if (response.status == 500) {
+                this.$notify({
+                  showClose: true,
+                  message: response.body.desc,
+                  type: "error"
+                });
+              }
+            }
+          );
+        } else {
+          return false;
+        }
+      });
+    },
+    //更新
+    updateStudent() {
+      var url = exam_work_api + "/exam_student";
+      this.$refs.updateStudentForm.validate(valid => {
+        if (valid) {
+          this.$http.put(url, this.examStudentForm).then(
+            response => {
+              console.log(response);
+              this.$notify({
+                type: "success",
+                message: "更新成功"
+              });
+              this.updateStudentDialog = false;
+              this.searchForm();
+            },
+            response => {
+              if (response.status == 500) {
+                this.$notify({
+                  showClose: true,
+                  message: response.body.desc,
+                  type: "error"
+                });
+              }
+            }
+          );
+        } else {
+          return false;
+        }
+      });
+    },
+    //删除方法
+    deleteExamStudent(row) {
+      this.$confirm("是否删除考生?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "error"
+      }).then(() => {
+        var url = exam_work_api + "/exam_student/" + row.id;
+        this.$http.delete(url).then(
+          response => {
+            console.log(response);
+            this.$notify({
+              type: "success",
+              message: "删除成功!"
+            });
+            this.searchForm();
+          },
+          response => {
+            if (response.status == 500) {
+              this.$notify({
+                showClose: true,
+                message: response.body.desc,
+                type: "error"
+              });
+            }
+          }
+        );
+      });
+    },
+    //批量删除方法
+    deleteStuBatch() {
+      if (this.examStuIds.length == 0) {
+        this.$notify({
+          type: "warning",
+          message: "请选择要删除的考生"
+        });
+        return;
+      }
+      this.$confirm("是否删除考生?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "error"
+      }).then(() => {
+        var url = exam_work_api + "/exam_student/" + this.examStuIds;
+        this.$http.delete(url).then(
+          response => {
+            console.log(response);
+            this.$notify({
+              type: "success",
+              message: "删除成功!"
+            });
+            this.searchForm();
+          },
+          response => {
+            if (response.status == 500) {
+              this.$notify({
+                showClose: true,
+                message: response.body.desc,
+                type: "error"
+              });
+            }
+          }
+        );
+      });
+    },
+    //按批次删除方法
+    deleteStuByExam() {
+      if (!this.formSearch.examId) {
+        this.$notify({
+          type: "warning",
+          message: "请选择要删除的批次"
+        });
+        return;
+      }
+
+      this.$msgbox({
+        title: "提示",
+        message: "是否删除该批次所有考生?",
+        showCancelButton: false,
+        confirmButtonText: "确定",
+        beforeClose: (action, instance, done) => {
+          if (action === "confirm") {
+            instance.confirmButtonLoading = true;
+            instance.confirmButtonText = "执行中...";
+
+            let inst = instance;
+            let delExamStudentDone = done;
+            var url =
+              exam_work_api + "/exam_student/exam/" + this.formSearch.examId;
+            this.$http.delete(url).then(
+              response => {
+                console.log(response);
+                this.$notify({
+                  type: "success",
+                  message: "删除成功!"
+                });
+                inst.confirmButtonLoading = false;
+                delExamStudentDone();
+                this.searchForm();
+              },
+              response => {
+                if (response.status == 500) {
+                  this.$notify({
+                    showClose: true,
+                    message: response.body.desc,
+                    type: "error"
+                  });
+                }
+                inst.confirmButtonLoading = false;
+                delExamStudentDone();
+              }
+            );
+          } else {
+            done();
+          }
+        }
+      }).then(action => {
+        console.log(action);
+      });
+    },
+
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.searchForm();
+    },
+    //新增
+    openAddingDialog() {
+      if (this.$refs.addingStudentForm) {
+        this.$refs.addingStudentForm.resetFields();
+      }
+      this.examStudentForm.examId = null;
+      this.examStudentForm.studentName = null;
+      this.examStudentForm.studentCode = null;
+      this.examStudentForm.identityNumber = null;
+      this.examStudentForm.courseId = null;
+      this.examStudentForm.examSite = null;
+      this.examStudentForm.grade = null;
+      this.examStudentForm.paperType = "X";
+      this.examStudentForm.specialtyName = null;
+      this.examStudentForm.phone = null;
+      this.examStudentForm.infoCollector = null;
+      if (this.pureLC) {
+        this.examStudentForm.orgId = this.lc_id;
+        this.orgList4InsertOrUpdate = [
+          { id: this.lc_id, name: this.lc_name, code: this.lc_code }
+        ];
+      } else {
+        this.examStudentForm.orgId = null;
+        this.orgList4InsertOrUpdate = null;
+      }
+      this.examList4InsertOrUpdate = [];
+      this.courseList4InsertOrUpdate = [];
+
+      this.queryExams4InsertOrUpdate("");
+      this.addingStudentDialog = true;
+    },
+    //修改
+    openUpdateDialog(row) {
+      if (this.$refs.updateStudentForm) {
+        this.$refs.updateStudentForm.resetFields();
+      }
+      this.orgList4InsertOrUpdate = [
+        { id: row.orgId, name: row.orgName, code: row.orgCode }
+      ];
+      this.courseList4InsertOrUpdate = [
+        { id: row.courseId, name: row.courseName, code: row.courseCode }
+      ];
+      this.examList4InsertOrUpdate = [{ id: row.examId, name: row.examName }];
+
+      this.examStudentForm.id = row.id;
+      this.examStudentForm.examId = row.examId;
+      this.examStudentForm.courseId = row.courseId;
+      this.examStudentForm.studentId = row.studentId;
+      this.examStudentForm.studentName = row.studentName;
+      this.examStudentForm.studentCode = row.studentCode;
+      this.examStudentForm.identityNumber = row.identityNumber;
+      this.examStudentForm.specialtyName = row.specialtyName;
+      this.examStudentForm.orgId = row.orgId;
+      this.examStudentForm.examSite = row.examSite;
+      this.examStudentForm.grade = row.grade;
+      this.examStudentForm.phone = row.phone;
+      this.examStudentForm.infoCollector = row.infoCollector;
+      this.examStudentForm.paperType = row.paperType;
+
+      this.updateStudentDialog = true;
+    },
+    //禁用
+    disableExamStudent(row) {
+      this.$confirm("是否禁用所选考生?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        var url = exam_work_api + "/exam_student/disable/" + row.id;
+        this.$http.put(url).then(response => {
+          console.log(response);
+          this.$notify({
+            type: "success",
+            message: "禁用成功"
+          });
+          this.searchForm();
+        });
+      });
+    },
+    //启用
+    enableExamStudent(row) {
+      this.$confirm("是否启用所选考生?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        var url = exam_work_api + "/exam_student/enable/" + row.id;
+        this.$http.put(url).then(response => {
+          console.log(response);
+          this.$notify({
+            type: "success",
+            message: "启用成功"
+          });
+          this.searchForm();
+        });
+      });
+    },
+    closeAddingStudentDialog() {
+      this.addingStudentDialog = false;
+    },
+    closeUpdateStudentDialog() {
+      this.updateStudentDialog = false;
+    },
+    //导入
+    imp() {
+      this.studentImportDialog = true;
+      this.initUpload();
+    },
+    //复制
+    copy() {
+      if (this.$refs.studentCopyForm) {
+        this.$refs.studentCopyForm.resetFields();
+      }
+      this.studentCopyDialog = true;
+      this.studentCopyForm.sourceExamId = null;
+      this.studentCopyForm.targetExamId = null;
+      this.examList4CopyFrom = [];
+      this.examList4CopyTo = [];
+    },
+    //复制学生
+    copyStudent() {
+      this.$refs.studentCopyForm.validate(valid => {
+        if (valid) {
+          if (
+            this.studentCopyForm.sourceExamId ==
+            this.studentCopyForm.targetExamId
+          ) {
+            this.$notify({
+              type: "error",
+              message: "源批次与目标批次不能相同"
+            });
+            return;
+          }
+          var url =
+            task_api +
+            "/copyExamStudent/addCopyTask?" +
+            new URLSearchParams({
+              examId1: this.studentCopyForm.sourceExamId,
+              examId2: this.studentCopyForm.targetExamId
+            });
+
+          this.fileLoading = true;
+          this.$http.post(url, {}).then(
+            response => {
+              console.log(response);
+              this.$notify({
+                type: "success",
+                message: "复制中,请稍后查看"
+              });
+              this.studentCopyDialog = false;
+              this.fileLoading = false;
+              this.searchForm();
+            },
+            response => {
+              if (response.status == 500) {
+                this.$notify({
+                  showClose: true,
+                  message: response.body.desc,
+                  type: "error"
+                });
+              }
+              this.fileLoading = false;
+            }
+          );
+        } else {
+          return false;
+        }
+      });
+    },
+    beforeUpload(file) {
+      console.log(file);
+    },
+    uploadProgress(event, file, fileList) {
+      console.log("uploadProgress");
+      console.log(event);
+      console.log(file);
+      console.log(fileList);
+    },
+    uploadSuccess(response, file, fileList) {
+      console.log("uploadSuccess");
+      console.log(response);
+      console.log(file);
+      console.log(fileList);
+      if (response.failNum > 0) {
+        this.errMessages = response.failRecords;
+        this.errDialog = true;
+      } else {
+        this.$notify({
+          message: "上传成功",
+          type: "success"
+        });
+      }
+
+      this.fileLoading = false;
+      this.studentImportDialog = false;
+      this.searchForm();
+    },
+    uploadError(response, file, fileList) {
+      console.log("uploadSuccess");
+      console.log(response);
+      console.log(file);
+      console.log(fileList);
+
+      var jsonStr = response.message.substring(4);
+      var resp = eval("(" + jsonStr + ")");
+      if (response.status == 500) {
+        this.$notify({
+          message: resp.desc,
+          type: "error"
+        });
+      }
+      this.fileLoading = false;
+    },
+    initUpload() {
+      if (this.$refs.studentImportForm) {
+        this.$refs.studentImportForm.resetFields();
+      }
+      this.fileList = [];
+      this.studentImportForm.examId = "";
+      this.studentImportForm.examList4Import = [];
+    },
+    checkUpload() {
+      if (!this.studentImportForm.examId) {
+        this.$notify({
+          message: "请选择考试批次",
+          type: "error"
+        });
+        return false;
+      } else {
+        this.uploadData.examId = this.studentImportForm.examId;
+      }
+      var fileList = this.$refs.upload.uploadFiles;
+      if (fileList.length == 0) {
+        this.$notify({
+          message: "上传文件不能为空",
+          type: "error"
+        });
+        return false;
+      }
+      if (fileList.length > 1) {
+        this.$notify({
+          message: "每次只能上传一个文件",
+          type: "error"
+        });
+        return false;
+      }
+      for (let file of fileList) {
+        if (!file.name.endsWith(".xlsx")) {
+          this.$notify({
+            message: "上传文件必须为xlsx格式",
+            type: "error"
+          });
+          this.initUpload();
+          return false;
+        }
+      }
+      return true;
+    },
+    //确定上传
+    submitUpload() {
+      if (!this.checkUpload()) {
+        return false;
+      }
+      this.$refs.upload.submit();
+      this.fileLoading = true;
+    },
+    //清空文件
+    removeFile() {
+      this.$refs.upload.clearFiles();
+    },
+    //下载模板
+    exportFile() {
+      window.location.href = "/api/ecs_exam_work/exam_student/download";
+    },
+    initPrivileges() {
+      var url = core_api + "/rolePrivilege/checkPrivileges";
+      var params = {
+        privilegeCodes: Object.keys(this.rolePrivileges).toString()
+      };
+      this.$http.post(url, params, { emulateJSON: true }).then(
+        response => {
+          this.rolePrivileges = response.body;
+        },
+        response => {
+          if (response.status == 500) {
+            this.$notify({
+              showClose: true,
+              message: response.body.desc,
+              type: "error"
+            });
+          }
+        }
+      );
+    },
+    init() {
+      for (let role of this.user.roleList) {
+        if (role.roleCode == "SUPER_ADMIN") {
+          this.isSuperAdmin = true;
+          continue;
+        } else if (role.roleCode == "LC_USER") {
+          this.pureLC = true;
+          continue;
+        }
+      }
+
+      if (1 < this.user.roleList.length) {
+        this.pureLC = false;
+      }
+
+      this.formSearch.rootOrgId = this.user.rootOrgId;
+      if (this.pureLC) {
+        var url = core_api + "/user/" + this.user.userId;
+        this.$http.get(url).then(
+          response => {
+            var userInfo = response.body;
+            this.lc_id = userInfo.orgId;
+            this.lc_name = userInfo.orgName;
+            this.lc_code = userInfo.orgCode;
+            this.orgList4Search = [
+              { id: this.lc_id, name: this.lc_name, code: this.lc_code }
+            ];
+            this.orgList4InsertOrUpdate = [
+              { id: this.lc_id, name: this.lc_name, code: this.lc_code }
+            ];
+            this.formSearch.orgId = this.lc_id;
+            this.examStudentForm.orgId = this.lc_id;
+            this.queryExams4Search("");
+            this.searchForm();
+          },
+          response => {
+            if (response.status == 500) {
+              this.$notify({
+                showClose: true,
+                message: response.body.desc,
+                type: "error"
+              });
+            }
+          }
+        );
+      } else {
+        this.queryExams4Search("");
+        this.searchForm();
+      }
+    }
+  },
+  created() {
+    this.initPrivileges();
+    this.init();
+    this.uploadHeaders = {
+      key: this.user.key,
+      token: this.user.token
+    };
+  }
+};
+</script>