|
@@ -1,353 +1,21 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
<section class="content" style="margin-top: -10px;">
|
|
<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="100px"
|
|
|
|
- >
|
|
|
|
- <el-row :gutter="5">
|
|
|
|
- <el-form-item
|
|
|
|
- v-if="isSuperAdmin"
|
|
|
|
- label="顶级机构"
|
|
|
|
- class="pull-left"
|
|
|
|
- >
|
|
|
|
- <el-select v-model="formSearch.rootOrgId" placeholder="请选择">
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in rootOrgList"
|
|
|
|
- :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
|
|
|
|
- placeholder="请输入姓名"
|
|
|
|
- v-model="formSearch.name"
|
|
|
|
- ></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="学号" class="pull-left">
|
|
|
|
- <el-input
|
|
|
|
- placeholder="请输入学号"
|
|
|
|
- v-model="formSearch.studentCode"
|
|
|
|
- ></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="身份证" class="pull-left">
|
|
|
|
- <el-input
|
|
|
|
- placeholder="请输入身份证"
|
|
|
|
- v-model="formSearch.identityNumber"
|
|
|
|
- ></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item class="pull-right buttonframe">
|
|
|
|
- <el-button
|
|
|
|
- v-if="rolePrivileges.search_student"
|
|
|
|
- size="small"
|
|
|
|
- type="primary"
|
|
|
|
- icon="search"
|
|
|
|
- @click="searchForm"
|
|
|
|
- >查询
|
|
|
|
- </el-button>
|
|
|
|
- <el-button
|
|
|
|
- v-if="rolePrivileges.upload_student_photo"
|
|
|
|
- size="small"
|
|
|
|
- type="info"
|
|
|
|
- @click="uploadPhoto"
|
|
|
|
- >上传照片
|
|
|
|
- </el-button>
|
|
|
|
- <el-button
|
|
|
|
- v-if="rolePrivileges.reset_student_password"
|
|
|
|
- size="small"
|
|
|
|
- type="warning"
|
|
|
|
- @click="resetPassword('');"
|
|
|
|
- >重置密码
|
|
|
|
- </el-button>
|
|
|
|
- <el-button
|
|
|
|
- v-if="rolePrivileges.change_student_availability"
|
|
|
|
- size="small"
|
|
|
|
- type="success"
|
|
|
|
- @click="enableStudent('');"
|
|
|
|
- >启用
|
|
|
|
- </el-button>
|
|
|
|
- <el-button
|
|
|
|
- v-if="rolePrivileges.change_student_availability"
|
|
|
|
- size="small"
|
|
|
|
- type="danger"
|
|
|
|
- @click="disableStudent('');"
|
|
|
|
- >禁用
|
|
|
|
- </el-button>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-row>
|
|
|
|
- </el-form>
|
|
|
|
-
|
|
|
|
- <!--页面列表-->
|
|
|
|
- <el-table :data="tableData" border style="width: 100%;text-align:center;"
|
|
|
|
- @selection-change="selectChange">
|
|
|
|
- <el-table-column type="selection" width="50"></el-table-column>
|
|
|
|
- <el-table-column prop="id" width="100" label="ID"></el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- label="考生"
|
|
|
|
- width="100">
|
|
|
|
- <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.name }}</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.phoneNumber }}
|
|
|
|
- </td>
|
|
|
|
- </tr>
|
|
|
|
- <tr>
|
|
|
|
- <td style="color: green">安全手机号</td>
|
|
|
|
- <td style="color:purple;padding-left: 20px;">{{ scope.row.securityPhone }}
|
|
|
|
- </td>
|
|
|
|
- </tr>
|
|
|
|
- <tr>
|
|
|
|
- <td style="color: green">创建时间</td>
|
|
|
|
- <td style="color:purple;padding-left: 20px;">{{ scope.row.creationTime }}
|
|
|
|
- </td>
|
|
|
|
- </tr>
|
|
|
|
- </div>
|
|
|
|
- <div slot="reference" class="name-wrapper">
|
|
|
|
- <span>{{ scope.row.name }}</span>
|
|
|
|
- </div>
|
|
|
|
- </el-popover>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column prop="studentCode" width="" label="学号"></el-table-column>
|
|
|
|
- <el-table-column prop="identityNumber" width="" label="身份证"></el-table-column>
|
|
|
|
- <el-table-column prop="updateTime" width="168" label="更新时间"></el-table-column>
|
|
|
|
- <el-table-column width="100" 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>
|
|
|
|
- <el-table-column label="操作" width="450">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <div>
|
|
|
|
- <el-button size="mini" type="warning" @click="showPhoto(scope.row)">查看照片</el-button>
|
|
|
|
- <el-button size="mini" type="warning" @click="showStuExamDialog(scope.row)">考试记录
|
|
|
|
- </el-button>
|
|
|
|
- <el-button v-if="rolePrivileges.reset_student_password" size="mini" type="warning"
|
|
|
|
- @click="resetPassword(scope.row)">重置密码
|
|
|
|
- </el-button>
|
|
|
|
- <el-button
|
|
|
|
- v-if="(null!=scope.row.enable)&&(!scope.row.enable)&&rolePrivileges.change_student_availability"
|
|
|
|
- size="mini"
|
|
|
|
- type="success"
|
|
|
|
- @click="enableStudent(scope.row)">启用
|
|
|
|
- </el-button>
|
|
|
|
- <el-button v-else-if="rolePrivileges.change_student_availability"
|
|
|
|
- size="mini"
|
|
|
|
- type="danger"
|
|
|
|
- @click="disableStudent(scope.row)">禁用
|
|
|
|
- </el-button>
|
|
|
|
- <el-button v-if="rolePrivileges.unbind_student_code" size="mini" type="warning"
|
|
|
|
- @click="unbindStudentCode(scope.row)">解绑学号
|
|
|
|
- </el-button>
|
|
|
|
- <el-button v-if="rolePrivileges.unbind_security_phone" size="mini" type="warning"
|
|
|
|
- @click="unbindSecurityPhone(scope.row)">解绑安全手机
|
|
|
|
- </el-button>
|
|
|
|
- </div>
|
|
|
|
- </template>
|
|
|
|
- </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>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- <!--box-body END-->
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
</section>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
- import {core_api} from "../constants/constants.js";
|
|
|
|
- import {mapState} from "vuex";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
- return {
|
|
|
|
- rolePrivileges: {
|
|
|
|
- search_student: false,
|
|
|
|
- upload_student_photo: false,
|
|
|
|
- reset_student_password: false,
|
|
|
|
- change_student_availability: false,
|
|
|
|
- unbind_student_code: false,
|
|
|
|
- unbind_security_phone: false
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- isSuperAdmin: false,
|
|
|
|
- rootOrgList: null,
|
|
|
|
-
|
|
|
|
- formSearch: {
|
|
|
|
- rootOrgId: null,
|
|
|
|
- name: '',
|
|
|
|
- studentCode: '',
|
|
|
|
- identityNumber: '',
|
|
|
|
- enable: ''
|
|
|
|
- },
|
|
|
|
- selectedStuIds: [],
|
|
|
|
-
|
|
|
|
- tableData: [],
|
|
|
|
- currentPage: 1,
|
|
|
|
- pageSize: 10,
|
|
|
|
- total: 10,
|
|
|
|
- };
|
|
|
|
- },
|
|
|
|
- computed: {
|
|
|
|
- ...mapState({user: state => state.user})
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
- uploadPhoto() {
|
|
|
|
- },
|
|
|
|
- resetPassword() {
|
|
|
|
- },
|
|
|
|
- enableStudent() {
|
|
|
|
- },
|
|
|
|
- disableStudent() {
|
|
|
|
- },
|
|
|
|
- showPhoto() {
|
|
|
|
- },
|
|
|
|
- showStuExamDialog() {
|
|
|
|
- },
|
|
|
|
- resetPassword() {
|
|
|
|
- },
|
|
|
|
- enableStudent() {
|
|
|
|
- },
|
|
|
|
- disableStudent() {
|
|
|
|
- },
|
|
|
|
- unbindStudentCode() {
|
|
|
|
- },
|
|
|
|
- unbindSecurityPhone() {
|
|
|
|
- },
|
|
|
|
- handleCurrentChange(val) {
|
|
|
|
- this.currentPage = val;
|
|
|
|
- this.searchForm();
|
|
|
|
- },
|
|
|
|
- selectChange(row) {
|
|
|
|
- this.selectedStuIds = [];
|
|
|
|
- row.forEach((element, index) => {
|
|
|
|
- this.selectedStuIds.push(element.id);
|
|
|
|
- })
|
|
|
|
- console.log(this.selectedStuIds);
|
|
|
|
- },
|
|
|
|
- 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 '启用';
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- //查询方法
|
|
|
|
- searchForm() {
|
|
|
|
- var params = new URLSearchParams(this.formSearch);
|
|
|
|
- var url = core_api + "/student/studentPage/" + (this.currentPage - 1) + "/" + this.pageSize + "?" + params;
|
|
|
|
- this.$http.get(url).then(response => {
|
|
|
|
- this.tableData = response.data.list;
|
|
|
|
- this.total = response.data.total;
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- initPrivileges() {
|
|
|
|
- var params = new URLSearchParams({
|
|
|
|
- privilegeCodes: Object.keys(this.rolePrivileges).toString()
|
|
|
|
- });
|
|
|
|
- var url = core_api + "/rolePrivilege/checkPrivileges?" + params;
|
|
|
|
- this.$http.post(url).then(response => {
|
|
|
|
- this.rolePrivileges = response.data;
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- init() {
|
|
|
|
- this.initPrivileges();
|
|
|
|
-
|
|
|
|
- for (let role of this.user.roleList) {
|
|
|
|
- if (role.roleCode == "SUPER_ADMIN") {
|
|
|
|
- this.isSuperAdmin = true;
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- var url = core_api + "/org/getRootOrgList";
|
|
|
|
-
|
|
|
|
- this.$http.get(url).then(response => {
|
|
|
|
- this.rootOrgList = response.data;
|
|
|
|
- this.formSearch.rootOrgId = this.user.rootOrgId;
|
|
|
|
- this.searchForm();
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ return {};
|
|
},
|
|
},
|
|
|
|
+ computed: {},
|
|
|
|
+ methods: {},
|
|
|
|
|
|
//初始化查询
|
|
//初始化查询
|
|
created() {
|
|
created() {
|
|
- this.init();
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|