|
@@ -5,36 +5,61 @@
|
|
<div class="page-form-title-box">
|
|
<div class="page-form-title-box">
|
|
<el-form :model="queryParams" class="form-box" ref="queryForm"
|
|
<el-form :model="queryParams" class="form-box" ref="queryForm"
|
|
:inline="true" style="width:100%;">
|
|
:inline="true" style="width:100%;">
|
|
- <el-form-item label="" prop="queryParamsData1">
|
|
|
|
|
|
+ <el-form-item label="" prop="account">
|
|
|
|
+ <div class="check-max-box">
|
|
|
|
+ <p :class="checkType === '2'?'checkBox':''" @click="checkTypeButton('2')">教师</p>
|
|
|
|
+ <p :class="checkType === '1'?'checkBox':''" @click="checkTypeButton('1')">研究生</p>
|
|
|
|
+ <p :class="checkType === '0'?'checkBox':''" @click="checkTypeButton('0')">本科生</p>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="" prop="account">
|
|
|
|
+ <el-input
|
|
|
|
+ maxLength="30"
|
|
|
|
+ v-model="queryParams.account"
|
|
|
|
+ placeholder="学工号"
|
|
|
|
+ style="width: 200px"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="" prop="name">
|
|
<el-input
|
|
<el-input
|
|
maxLength="30"
|
|
maxLength="30"
|
|
- v-model="queryParams.queryParamsData1"
|
|
|
|
- placeholder="请输入"
|
|
|
|
|
|
+ v-model="queryParams.name"
|
|
|
|
+ placeholder="用户名"
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="" prop="queryParamsData2">
|
|
|
|
- <el-select v-model="queryParams.queryParamsData2" placeholder="请选择" style="width: 200px">
|
|
|
|
|
|
+ <!--学院-->
|
|
|
|
+ <el-form-item label="" prop="deptCode">
|
|
|
|
+ <el-select v-model="queryParams.deptCode" placeholder="学院" style="width: 200px">
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in optionList"
|
|
|
|
- :key="dict.value"
|
|
|
|
- :label="dict.label"
|
|
|
|
- :value="dict.value"
|
|
|
|
|
|
+ v-for="dict in deptOption"
|
|
|
|
+ :key="dict.deptNum"
|
|
|
|
+ :label="dict.deptName"
|
|
|
|
+ :value="dict.deptNum"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="" prop="state">
|
|
|
|
- <el-date-picker
|
|
|
|
- :clearable="false"
|
|
|
|
- v-model="dateRange"
|
|
|
|
- size="small"
|
|
|
|
- style="width: 240px"
|
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
- type="daterange"
|
|
|
|
- range-separator="-"
|
|
|
|
- start-placeholder="开始日期"
|
|
|
|
- end-placeholder="结束日期"
|
|
|
|
- ></el-date-picker>
|
|
|
|
|
|
+ <!--教师状态-->
|
|
|
|
+ <el-form-item label="" prop="status" v-if="checkType === '2'">
|
|
|
|
+ <el-select v-model="queryParams.status" placeholder="用户状态" style="width: 200px">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in teacherOption"
|
|
|
|
+ :key="dict.code"
|
|
|
|
+ :label="dict.desc"
|
|
|
|
+ :value="dict.code"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <!--学生状态-->
|
|
|
|
+ <el-form-item label="" prop="status" v-if="checkType !== '2'">
|
|
|
|
+ <el-select v-model="queryParams.status" placeholder="用户状态" style="width: 200px">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in studentOption"
|
|
|
|
+ :key="dict.code"
|
|
|
|
+ :label="dict.desc"
|
|
|
|
+ :value="dict.code"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
|
|
<p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
|
|
<p class="page-reset-common-style-button" @click="resetQuery">重置</p>
|
|
<p class="page-reset-common-style-button" @click="resetQuery">重置</p>
|
|
@@ -46,20 +71,26 @@
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
<div class="page-content-box">
|
|
<div class="page-content-box">
|
|
- <el-table class="table-box" v-loading="loading" border :data="dataList"
|
|
|
|
|
|
+ <el-table class="table-box" ref="table-box" border :data="dataList"
|
|
@select-all="handleSelectionChange" @select="handleSelectionChange" :row-key="getRowKeys">
|
|
@select-all="handleSelectionChange" @select="handleSelectionChange" :row-key="getRowKeys">
|
|
|
|
+ <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
|
|
|
|
+ <el-table-column label="序号" type="index" width="60"/>
|
|
<el-table-column label="名称" prop="name" show-overflow-tooltip/>
|
|
<el-table-column label="名称" prop="name" show-overflow-tooltip/>
|
|
- <el-table-column label="内容" prop="content" width="200" show-overflow-tooltip/>
|
|
|
|
- <el-table-column label="创建时间" prop="createTime" width="200" show-overflow-tooltip>
|
|
|
|
|
|
+ <el-table-column label="性别" prop="gender" width="200" show-overflow-tooltip/>
|
|
|
|
+ <el-table-column label="联系方式" prop="phone" width="200" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
|
|
|
|
|
|
+ <span>{{scope.row.phone?scope.row.phone:'--'}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+ <el-table-column label="类型" prop="type" width="200" show-overflow-tooltip/>
|
|
|
|
+ <el-table-column label="学/工号" prop="account" width="200" show-overflow-tooltip/>
|
|
|
|
+ <el-table-column label="部门" prop="deptName" width="200" show-overflow-tooltip/>
|
|
|
|
+ <el-table-column label="备注" prop="remarks" width="200" show-overflow-tooltip/>
|
|
</el-table>
|
|
</el-table>
|
|
<pagination :page-sizes="[20, 30, 40, 50]"
|
|
<pagination :page-sizes="[20, 30, 40, 50]"
|
|
v-show="total>0"
|
|
v-show="total>0"
|
|
:total="total"
|
|
:total="total"
|
|
- :page.sync="queryParams.page"
|
|
|
|
|
|
+ :page.sync="queryParams.current"
|
|
:limit.sync="queryParams.pageSize"
|
|
:limit.sync="queryParams.pageSize"
|
|
@pagination="getList"
|
|
@pagination="getList"
|
|
/>
|
|
/>
|
|
@@ -68,7 +99,15 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
- //import { getDicts } from "@/api/commonality/noPermission";
|
|
|
|
|
|
+ import {
|
|
|
|
+ systemMainDataList,
|
|
|
|
+ systemMainDataTeacherStatus,
|
|
|
|
+ systemMainDataStudentStatus,
|
|
|
|
+ systemMainDataSync,
|
|
|
|
+ } from "@/api/serviceCenter/index";
|
|
|
|
+ import {
|
|
|
|
+ getDeptDropList,
|
|
|
|
+ } from '@/api/commonality/permission'
|
|
export default {
|
|
export default {
|
|
name: 'index',
|
|
name: 'index',
|
|
data () {
|
|
data () {
|
|
@@ -79,21 +118,23 @@
|
|
loading:false,
|
|
loading:false,
|
|
//下拉列表数据
|
|
//下拉列表数据
|
|
optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
|
|
optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
|
|
|
|
+ teacherOption:[],
|
|
|
|
+ studentOption:[],
|
|
|
|
+ deptOption:[],
|
|
//查询条件
|
|
//查询条件
|
|
|
|
+ checkType:'2',
|
|
queryParams:{
|
|
queryParams:{
|
|
- page:1,
|
|
|
|
|
|
+ current:1,
|
|
pageSize:20,
|
|
pageSize:20,
|
|
- queryParamsData1:"",
|
|
|
|
- queryParamsData2 :null,
|
|
|
|
|
|
+ deptCode:null,
|
|
|
|
+ status: '1',
|
|
|
|
+ account: "", //学工号
|
|
|
|
+ name: "", //用户名
|
|
},
|
|
},
|
|
- //时间数据
|
|
|
|
- dateRange:[],
|
|
|
|
//列表数据
|
|
//列表数据
|
|
dataList:[],
|
|
dataList:[],
|
|
//数据数量
|
|
//数据数量
|
|
total:0,
|
|
total:0,
|
|
- //组件传参
|
|
|
|
- propsData:{},
|
|
|
|
//选中数据
|
|
//选中数据
|
|
checkList:[],
|
|
checkList:[],
|
|
}
|
|
}
|
|
@@ -102,64 +143,62 @@
|
|
|
|
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
- //this.getList();
|
|
|
|
|
|
+ this.getDeptDropList();
|
|
|
|
+ this.systemMainDataTeacherStatus();
|
|
|
|
+ this.systemMainDataStudentStatus();
|
|
|
|
+ this.getList();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //类型切换
|
|
|
|
+ checkTypeButton(type){
|
|
|
|
+ if(this.checkType !== type){
|
|
|
|
+ this.$set(this,'checkType',type);
|
|
|
|
+ this.resetQuery();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
//查询按钮
|
|
//查询按钮
|
|
handleQuery(){
|
|
handleQuery(){
|
|
- this.$set(this.queryParams,'page',1);
|
|
|
|
|
|
+ this.$set(this,'checkList',[]);
|
|
|
|
+ this.$set(this.queryParams,'current',1);
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
//重置按钮
|
|
//重置按钮
|
|
resetQuery(){
|
|
resetQuery(){
|
|
- this.$set(this,'dateRange',[])
|
|
|
|
this.$set(this,'queryParams',{
|
|
this.$set(this,'queryParams',{
|
|
- page:1,
|
|
|
|
|
|
+ current:1,
|
|
pageSize:20,
|
|
pageSize:20,
|
|
- queryParamsData1:"",
|
|
|
|
- queryParamsData2 :null,
|
|
|
|
|
|
+ deptCode:null,
|
|
|
|
+ status: "1",
|
|
|
|
+ account: "", //学工号
|
|
|
|
+ name: "", //用户名
|
|
});
|
|
});
|
|
|
|
+ this.$set(this,'checkList',[]);
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
//获取数据列表
|
|
//获取数据列表
|
|
getList(){
|
|
getList(){
|
|
- this.$set(this,'loading',true);
|
|
|
|
|
|
+ let self = this;
|
|
let obj = JSON.parse(JSON.stringify(this.queryParams))
|
|
let obj = JSON.parse(JSON.stringify(this.queryParams))
|
|
- if(this.dateRange[0]){
|
|
|
|
- obj.startTime = this.dateRange[0]+'T00:00:00'
|
|
|
|
- obj.endTime = this.dateRange[1]+'T23:59:59'
|
|
|
|
- }else{
|
|
|
|
- obj.startTime = "";
|
|
|
|
- obj.endTime = "";
|
|
|
|
- }
|
|
|
|
- getListFunction(obj).then(response => {
|
|
|
|
- this.$set(this,'loading',false);
|
|
|
|
- this.$set(this,'dataList',response.data.records);
|
|
|
|
- this.$set(this,'total',response.data.total);
|
|
|
|
|
|
+ obj.type = this.checkType;
|
|
|
|
+ systemMainDataList(obj).then(response => {
|
|
|
|
+ this.$set(this,'dataList',response.records);
|
|
|
|
+ this.$set(this,'total',response.total);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//操作按钮
|
|
//操作按钮
|
|
tableButton(type,row){
|
|
tableButton(type,row){
|
|
if(type == 1){
|
|
if(type == 1){
|
|
if(this.checkList.length>0){
|
|
if(this.checkList.length>0){
|
|
- // let list = [];
|
|
|
|
- // this.checkList.forEach((item)=>{
|
|
|
|
- // list.push({
|
|
|
|
- // code:item.infoId+'&subId='+item.subId,
|
|
|
|
- // name:item.subName,
|
|
|
|
- // roomName:item.roomName,
|
|
|
|
- // })
|
|
|
|
- // })
|
|
|
|
- // this.$set(this,'batchQrCodeDialogData',{
|
|
|
|
- // title:'实验室二维码批量下载', //弹窗名称(非必传)
|
|
|
|
- // type:'5', //二维码类型 用于区分二维码功能类型
|
|
|
|
- // checkList:list
|
|
|
|
- // });
|
|
|
|
- // this.$nextTick(function () {
|
|
|
|
- // this.$refs['batchQrCodeDialog'].initialize();
|
|
|
|
- // })
|
|
|
|
|
|
+ let list = [];
|
|
|
|
+ this.checkList.forEach((item)=>{
|
|
|
|
+ list.push(item.account)
|
|
|
|
+ })
|
|
|
|
+ systemMainDataSync({account:list,type:this.checkType}).then(response => {
|
|
|
|
+ this.msgSuccess('操作成功,请线下检查同步数据.')
|
|
|
|
+ this.resetQuery();
|
|
|
|
+ });
|
|
}else{
|
|
}else{
|
|
- this.msgError('请勾选实验室')
|
|
|
|
|
|
+ this.msgError('请勾选用户')
|
|
}
|
|
}
|
|
}else if(type == 6){
|
|
}else if(type == 6){
|
|
//返回并刷新
|
|
//返回并刷新
|
|
@@ -167,7 +206,7 @@
|
|
this.getList();
|
|
this.getList();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- //****************************************导入功能**************************************
|
|
|
|
|
|
+ //****************************************勾选功能**************************************
|
|
// 多选框选中数据
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
handleSelectionChange(selection) {
|
|
let self = this;
|
|
let self = this;
|
|
@@ -193,7 +232,25 @@
|
|
需要在selection 添加 :reserve-selection="true"
|
|
需要在selection 添加 :reserve-selection="true"
|
|
*/
|
|
*/
|
|
getRowKeys(row) {
|
|
getRowKeys(row) {
|
|
- return row.id
|
|
|
|
|
|
+ return row.account
|
|
|
|
+ },
|
|
|
|
+ //外部链接-教师状态下拉列表
|
|
|
|
+ systemMainDataTeacherStatus(){
|
|
|
|
+ systemMainDataTeacherStatus().then(response => {
|
|
|
|
+ this.$set(this,'teacherOption',response.data);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //外部链接-学生状态下拉列表
|
|
|
|
+ systemMainDataStudentStatus(){
|
|
|
|
+ systemMainDataStudentStatus().then(response => {
|
|
|
|
+ this.$set(this,'studentOption',response.data);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //外部链接-学生状态下拉列表
|
|
|
|
+ getDeptDropList(){
|
|
|
|
+ getDeptDropList({ deptName: '', level: 2, deptType: 1 }).then(response => {
|
|
|
|
+ this.$set(this,'deptOption',response.data);
|
|
|
|
+ });
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
}
|
|
@@ -201,7 +258,35 @@
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
.batchUserControls{
|
|
.batchUserControls{
|
|
.batchUserControlsPage{
|
|
.batchUserControlsPage{
|
|
-
|
|
|
|
|
|
+ .check-max-box{
|
|
|
|
+ display: flex;
|
|
|
|
+ p{
|
|
|
|
+ background-color: #fff;
|
|
|
|
+ color:#0183FA;
|
|
|
|
+ border-top:1px solid #0183FA;
|
|
|
|
+ border-bottom:1px solid #0183FA;
|
|
|
|
+ width:80px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 38px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
|
|
+ p:nth-child(1){
|
|
|
|
+ border-left:1px solid #0183FA;
|
|
|
|
+ border-right:1px solid #0183FA;
|
|
|
|
+ border-top-left-radius: 6px;
|
|
|
|
+ border-bottom-left-radius: 6px;
|
|
|
|
+ }
|
|
|
|
+ p:nth-child(3){
|
|
|
|
+ border-left:1px solid #0183FA;
|
|
|
|
+ border-right:1px solid #0183FA;
|
|
|
|
+ border-top-right-radius: 6px;
|
|
|
|
+ border-bottom-right-radius: 6px;
|
|
|
|
+ }
|
|
|
|
+ .checkBox{
|
|
|
|
+ background-color: #0183FA;
|
|
|
|
+ color:#fff;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|