|
@@ -1,162 +1,170 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <section class="content" style="margin-top: -10px;">
|
|
|
+ <section class="content">
|
|
|
+ <div class="box box-info">
|
|
|
<!-- 正文信息 -->
|
|
|
<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-form :inline="true" :model="formSearch" label-width="70px">
|
|
|
+ <el-row>
|
|
|
+ <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>
|
|
|
- </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
|
|
|
+ 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>
|
|
|
- </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
|
|
|
+ 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>
|
|
|
- </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-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">
|
|
|
+ <el-button
|
|
|
+ v-if="rolePrivileges.search_examStudent"
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
+ @click="searchForm"
|
|
|
+ >查询
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small" @click="resetSearchForm">
|
|
|
+ 重置
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="rolePrivileges.add_examStudent"
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ @click="openAddingDialog"
|
|
|
+ >新增
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="rolePrivileges.del_examStudent"
|
|
|
+ size="small"
|
|
|
+ type="danger"
|
|
|
+ icon="delete"
|
|
|
+ @click="deleteStuByExam"
|
|
|
+ >批次删除
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="rolePrivileges.copy_examStudent"
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ icon="document"
|
|
|
+ @click="copy"
|
|
|
+ >复制
|
|
|
+ </el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <div>
|
|
|
+ <span>操作:</span>
|
|
|
+ <el-button
|
|
|
+ v-if="rolePrivileges.del_examStudent"
|
|
|
+ size="small"
|
|
|
+ type="danger"
|
|
|
+ icon="delete"
|
|
|
+ @click="deleteStuBatch"
|
|
|
+ :disabled="noBatchSelected"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </el-row>
|
|
|
</el-form>
|
|
|
|
|
|
+ <div style="width: 100%;margin-bottom: 10px;"></div>
|
|
|
+
|
|
|
<!-- 新增弹出窗口 -->
|
|
|
<el-dialog
|
|
|
@close="closeAddingStudentDialog"
|
|
@@ -614,7 +622,11 @@
|
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 复制弹窗 -->
|
|
|
- <el-dialog title="考生信息复制" size="tiny" v-model="studentCopyDialog">
|
|
|
+ <el-dialog
|
|
|
+ title="考生信息复制"
|
|
|
+ size="tiny"
|
|
|
+ :visible.sync="studentCopyDialog"
|
|
|
+ >
|
|
|
<el-form
|
|
|
:model="studentCopyForm"
|
|
|
:rules="rules"
|
|
@@ -691,7 +703,7 @@
|
|
|
style="width: 100%;text-align:center;"
|
|
|
@selection-change="selectChange"
|
|
|
>
|
|
|
- <el-table-column type="selection" width="55"></el-table-column>
|
|
|
+ <el-table-column type="selection" width="40"></el-table-column>
|
|
|
<el-table-column prop="id" label="ID"></el-table-column>
|
|
|
<el-table-column label="考生">
|
|
|
<template slot-scope="scope">
|
|
@@ -790,30 +802,15 @@
|
|
|
<el-table-column prop="examName" label="考试名称"> </el-table-column>
|
|
|
<el-table-column prop="courseName" label="课程名称">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="updateTime" width="168" label="更新时间">
|
|
|
+ <el-table-column prop="updateTime" width="155" label="更新时间">
|
|
|
</el-table-column>
|
|
|
- <el-table-column width="80" label="状态">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>
|
|
|
- <span>
|
|
|
- <el-tag :type="getTag(scope.row.enable)">{{
|
|
|
- getEnable(scope.row.enable)
|
|
|
- }}</el-tag>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
+ <el-table-column width="60" label="状态">
|
|
|
+ <span slot-scope="scope"> {{ getStatus(scope.row.enable) }} </span>
|
|
|
</el-table-column>
|
|
|
- <el-table-column width="250" label="操作">
|
|
|
+ <el-table-column width="230" label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<div v-if="scope.row.locked">锁定中,请稍后操作</div>
|
|
|
<div v-else>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="info"
|
|
|
- @click="showPhoto(scope.row)"
|
|
|
- >
|
|
|
- 查看照片
|
|
|
- </el-button>
|
|
|
<el-button
|
|
|
v-if="rolePrivileges.update_examStudent"
|
|
|
size="mini"
|
|
@@ -840,13 +837,32 @@
|
|
|
@click="disableExamStudent(scope.row)"
|
|
|
>禁用
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- v-if="rolePrivileges.del_examStudent"
|
|
|
- size="mini"
|
|
|
- type="danger"
|
|
|
- @click="deleteExamStudent(scope.row)"
|
|
|
- >删除
|
|
|
- </el-button>
|
|
|
+
|
|
|
+ <el-dropdown style="margin-left: 10px;">
|
|
|
+ <el-button type="primary" plain size="mini">
|
|
|
+ 更多<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ </el-button>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item>
|
|
|
+ <el-button
|
|
|
+ v-if="rolePrivileges.del_examStudent"
|
|
|
+ size="mini"
|
|
|
+ type="danger"
|
|
|
+ @click="deleteExamStudent(scope.row)"
|
|
|
+ >删除
|
|
|
+ </el-button></el-dropdown-item
|
|
|
+ >
|
|
|
+ <el-dropdown-item>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="info"
|
|
|
+ @click="showPhoto(scope.row)"
|
|
|
+ >
|
|
|
+ 查看照片
|
|
|
+ </el-button>
|
|
|
+ </el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -856,7 +872,9 @@
|
|
|
@current-change="handleCurrentChange"
|
|
|
:current-page="currentPage"
|
|
|
:page-size="pageSize"
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
+ :page-sizes="[10, 30, 50, 100]"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
:total="total"
|
|
|
>
|
|
|
</el-pagination>
|
|
@@ -879,18 +897,22 @@
|
|
|
@close="closePhotoDialog"
|
|
|
title="照片"
|
|
|
:visible.sync="photoDialog"
|
|
|
+ width="300px"
|
|
|
>
|
|
|
- <div class="student_photo">
|
|
|
- <img :src="photo.url" alt="学生照片" height="20%" width="30%" />
|
|
|
- </div>
|
|
|
+ <img :src="photo.url" alt="学生照片" height="100%" width="100%" />
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
- </section>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { TASK_API, CORE_API, EXAM_WORK_API } from "@/constants/constants.js";
|
|
|
+import {
|
|
|
+ TASK_API,
|
|
|
+ CORE_API,
|
|
|
+ EXAM_WORK_API,
|
|
|
+ PAPER_TYPE
|
|
|
+} from "@/constants/constants.js";
|
|
|
import { mapState } from "vuex";
|
|
|
|
|
|
export default {
|
|
@@ -960,34 +982,7 @@ export default {
|
|
|
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"
|
|
|
- ],
|
|
|
+ paperTypeList: PAPER_TYPE,
|
|
|
courseList4Search: [],
|
|
|
courseList4InsertOrUpdate: [],
|
|
|
|
|
@@ -1118,20 +1113,14 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
return examStuIds;
|
|
|
+ },
|
|
|
+ noBatchSelected() {
|
|
|
+ return this.selectedExamStuIds.length === 0;
|
|
|
}
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
- getTag(status) {
|
|
|
- if (status == true) {
|
|
|
- return "success";
|
|
|
- } else if (status == false) {
|
|
|
- return "danger";
|
|
|
- } else {
|
|
|
- return status;
|
|
|
- }
|
|
|
- },
|
|
|
- getEnable(enable) {
|
|
|
+ getStatus(enable) {
|
|
|
if (enable == true) {
|
|
|
return "启用";
|
|
|
} else if (enable == false) {
|
|
@@ -1247,7 +1236,12 @@ export default {
|
|
|
this.photoDialog = false;
|
|
|
},
|
|
|
showPhoto(row) {
|
|
|
- var url = CORE_API + "/student/" + row.studentId;
|
|
|
+ var url =
|
|
|
+ CORE_API +
|
|
|
+ "/student/getStudentInfo?rootOrgId=" +
|
|
|
+ row.rootOrgId +
|
|
|
+ "&studentId=" +
|
|
|
+ row.studentId;
|
|
|
this.$http.get(url).then(response => {
|
|
|
if (response.data.photoPath) {
|
|
|
this.photo.url = response.data.photoPath;
|
|
@@ -1287,6 +1281,17 @@ export default {
|
|
|
});
|
|
|
console.log(this.selectedExamStuIds);
|
|
|
},
|
|
|
+ resetSearchForm() {
|
|
|
+ this.formSearch.rootOrgId = "";
|
|
|
+ this.formSearch.examId = "";
|
|
|
+ this.formSearch.studentCode = "";
|
|
|
+ this.formSearch.studentName = "";
|
|
|
+ this.formSearch.orgId = "";
|
|
|
+ this.formSearch.specialtyName = "";
|
|
|
+ this.formSearch.courseId = "";
|
|
|
+ this.formSearch.infoCollector = "";
|
|
|
+ this.formSearch.identityNumber = "";
|
|
|
+ },
|
|
|
//查询方法
|
|
|
searchForm() {
|
|
|
var param = new URLSearchParams(this.formSearch);
|
|
@@ -1471,6 +1476,10 @@ export default {
|
|
|
this.currentPage = val;
|
|
|
this.searchForm();
|
|
|
},
|
|
|
+ handleSizeChange(val) {
|
|
|
+ this.pageSize = val;
|
|
|
+ this.searchForm();
|
|
|
+ },
|
|
|
//新增
|
|
|
openAddingDialog() {
|
|
|
if (this.$refs.addingStudentForm) {
|
|
@@ -1799,3 +1808,8 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
+<style scoped>
|
|
|
+.input {
|
|
|
+ width: 170px;
|
|
|
+}
|
|
|
+</style>
|