|
@@ -1,10 +1,10 @@
|
|
|
<!--学生管理-->
|
|
|
<template>
|
|
|
<div class="app-container student">
|
|
|
- <div v-if="pageType == 1" class="student-one-box">
|
|
|
+ <div v-show="pageType == 1" class="student-one-box">
|
|
|
<el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" v-show="showSearch">
|
|
|
<!--v-hasPermi="['laboratory:plan:add']"-->
|
|
|
- <el-form-item label="关键字" prop="searchValue" label-width="58px">
|
|
|
+ <el-form-item label="关键字" prop="searchValue" label-width="54px">
|
|
|
<el-input
|
|
|
maxLength="20"
|
|
|
v-model="queryParams.searchValue"
|
|
@@ -14,19 +14,10 @@
|
|
|
style="width: 240px"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="专业" prop="majorId" label-width="60px">
|
|
|
- <el-select v-model="queryParams.majorId" clearable placeholder="请选择专业">
|
|
|
- <el-option
|
|
|
- v-for="item in professionOptions"
|
|
|
- :key="item.id"
|
|
|
- :label="item.majorName"
|
|
|
- :value="item.id">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="学院" prop="deptId" label-width="80px">
|
|
|
+ <el-form-item label="学院" prop="deptId" label-width="50px">
|
|
|
<el-select v-model="queryParams.deptId" clearable placeholder="请选择学院">
|
|
|
<el-option
|
|
|
+ style="width:80px;"
|
|
|
v-for="item in collegeOptions"
|
|
|
:key="item.deptId"
|
|
|
:label="item.deptName"
|
|
@@ -34,12 +25,22 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="状态" prop="status" label-width="60px">
|
|
|
+ <el-form-item label="状态" prop="status" label-width="50px">
|
|
|
<el-select v-model="queryParams.status" clearable placeholder="请选择状态">
|
|
|
<el-option :key="0" label="启用" :value="0"></el-option>
|
|
|
<el-option :key="1" label="停用" :value="1"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="校园卡" prop="cardNumSimple" label-width="54px">
|
|
|
+ <el-select v-model="queryParams.cardNumSimple" clearable placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="item in professionOptions"
|
|
|
+ :key="item.postId"
|
|
|
+ :label="item.postName"
|
|
|
+ :value="item.postId">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-dropdown @command="importButton" v-hasPermi="['system:user_student:import']">
|
|
|
<div class="form-dropdown-box">
|
|
@@ -73,13 +74,20 @@
|
|
|
><i class="el-icon-plus"></i>新增</p>
|
|
|
</el-col>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item style="float: right;">
|
|
|
+ <el-col :span="1.5" v-hasPermi="['system:user_teacher:check']">
|
|
|
+ <p class="add-button-one-90"
|
|
|
+ @click="bindingCard"
|
|
|
+ >批量绑卡</p>
|
|
|
+ </el-col>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<p class="inquire-button-one" @click="handleQuery">查询</p>
|
|
|
<p class="reset-button-one" @click="resetQuery">重置</p>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-table border :data="userList" @selection-change="handleSelectionChange" ref="multipleTable" :row-key="getRowKeys">
|
|
|
- <el-table-column type="selection" width="50" align="center"/>
|
|
|
+ <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
|
|
|
<el-table-column label="序号" width="50" align="center" type="index"/>
|
|
|
<el-table-column label="姓名" align="left" prop="nickName"/>
|
|
|
<el-table-column label="学号" align="left" prop="userName" width="180">
|
|
@@ -149,6 +157,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<add-page v-if="pageType == 2" :editType="editType" :propsData="propsData" :titleName="titleName"></add-page>
|
|
|
+ <binding-card-page v-if="pageType == 3" :ids="ids"></binding-card-page>
|
|
|
<!--重置密码-->
|
|
|
<el-dialog title="重置密码" :visible.sync="reviseOpen" width="600px" append-to-body class="teacher-revise-dialog-box">
|
|
|
<el-form :model="passwordForm" ref="passwordForm" :inline="true" :rules="rules" class="addCheckPage-min">
|
|
@@ -214,11 +223,13 @@ import { treeselect } from "@/api/system/dept";
|
|
|
import {listMajorAll} from "@/api/system/major";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import addPage from "./addPage.vue"
|
|
|
+import bindingCardPage from "./bindingCardPage.vue"
|
|
|
|
|
|
export default {
|
|
|
name: "User",
|
|
|
components: {
|
|
|
- addPage
|
|
|
+ addPage,
|
|
|
+ bindingCardPage
|
|
|
},
|
|
|
data() {
|
|
|
const equalToPassword = (rule, value, callback) => {
|
|
@@ -255,7 +266,16 @@ export default {
|
|
|
// 部门树选项
|
|
|
deptOptions: undefined,
|
|
|
//专业列表
|
|
|
- professionOptions:[],
|
|
|
+ professionOptions:[
|
|
|
+ {
|
|
|
+ postName:"未绑定",
|
|
|
+ postId:"0",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ postName:"已绑定",
|
|
|
+ postId:"1",
|
|
|
+ },
|
|
|
+ ],
|
|
|
//学院列表
|
|
|
collegeOptions:[],
|
|
|
// 是否显示弹出层
|
|
@@ -375,16 +395,25 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.getList();
|
|
|
- this.getListAll();
|
|
|
+ // this.getListAll();
|
|
|
this.listDepartments();
|
|
|
- this.getDicts("sys_user_sex").then(response => {
|
|
|
-
|
|
|
- });
|
|
|
- this.getConfigKey("sys.user.initPassword").then(response => {
|
|
|
-
|
|
|
- });
|
|
|
+ this.getDicts("sys_user_sex").then(response => {});
|
|
|
+ this.getConfigKey("sys.user.initPassword").then(response => {});
|
|
|
},
|
|
|
methods: {
|
|
|
+ //批量绑卡页面跳转与数量检测
|
|
|
+ bindingCard(){
|
|
|
+ let self = this;
|
|
|
+ if(self.ids.length<1){
|
|
|
+ self.msgError('请先勾选人员')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(self.ids.length>50){
|
|
|
+ self.msgError('批量绑卡最多只可选中50条数据,当前选中了'+self.ids.length+'条.')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.pageType = 3;
|
|
|
+ },
|
|
|
//关闭重置密码页面
|
|
|
reviseOpenOff(){
|
|
|
this.reviseOpen = false;
|
|
@@ -479,31 +508,21 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//=========表格扩展选择器方法---开始=========
|
|
|
- //选择本页
|
|
|
- selectPage(){
|
|
|
- console.log(this.$refs.multipleTable)
|
|
|
- this.$refs.multipleTable.toggleAllSelection()
|
|
|
- // console.log(this.$refs.multipleTable.selection)
|
|
|
- },
|
|
|
- //清除选择
|
|
|
- clearSelection(){
|
|
|
- this.$refs.multipleTable.clearSelection()
|
|
|
- },
|
|
|
/*===记录勾选数据===
|
|
|
需要再el-table 添加 :row-key="getRowKeys"
|
|
|
需要在selection 添加 :reserve-selection="true"
|
|
|
*/
|
|
|
getRowKeys(row) {
|
|
|
- return row.id
|
|
|
+ return row.userId
|
|
|
},
|
|
|
//=========表格扩展选择器方法---结束=========
|
|
|
/** 查询用户列表 */
|
|
|
getList() {
|
|
|
- // this.loading = true;
|
|
|
+ this.loading = true;
|
|
|
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
|
|
- this.userList = response.rows;
|
|
|
+ this.$set(this,'userList',response.rows);
|
|
|
this.total = response.total;
|
|
|
- // this.loading = false;
|
|
|
+ this.loading = false;
|
|
|
}
|
|
|
);
|
|
|
},
|
|
@@ -533,7 +552,10 @@ export default {
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
+ this.pageType = 1;
|
|
|
this.queryParams.pageNum = 1;
|
|
|
+ this.$set(this,"selectedNum",0);
|
|
|
+ this.$refs.multipleTable.clearSelection()
|
|
|
this.getList();
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
@@ -544,7 +566,7 @@ export default {
|
|
|
pageNum: 1,
|
|
|
pageSize:20,
|
|
|
searchValue: "",
|
|
|
- majorId: "",
|
|
|
+ cardNumSimple: "",
|
|
|
deptId: "",
|
|
|
status: "",
|
|
|
});
|