|
|
@ -1,6 +1,7 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="wrap"> |
|
|
|
<div class="wrap"> |
|
|
|
<el-card shadow="hover" class="mgb20"> |
|
|
|
<el-card shadow="hover" |
|
|
|
|
|
|
|
class="mgb20"> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<div class="flex-center mgb20"> |
|
|
|
<div class="flex-center mgb20"> |
|
|
|
<p class="hr_tag"></p> |
|
|
|
<p class="hr_tag"></p> |
|
|
@ -18,35 +19,57 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
--> |
|
|
|
--> |
|
|
|
<el-form-item label="省份"> |
|
|
|
<el-form-item label="省份"> |
|
|
|
<el-select v-model="form.provinces" clearable placeholder="请选择省份" @change="getCity" @clear="clearprovince()"> |
|
|
|
<el-select v-model="form.provinces" |
|
|
|
<el-option v-for="(item,index) in provinceList" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option> |
|
|
|
clearable |
|
|
|
|
|
|
|
placeholder="请选择省份" |
|
|
|
|
|
|
|
@change="getCity" |
|
|
|
|
|
|
|
@clear="clearprovince()"> |
|
|
|
|
|
|
|
<el-option v-for="(item,index) in provinceList" |
|
|
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
:label="item.provinceName" |
|
|
|
|
|
|
|
:value="item.provinceId"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-form-item label="城市"> |
|
|
|
<el-form-item label="城市"> |
|
|
|
<el-select v-model="form.city" clearable placeholder="请选择城市" |
|
|
|
<el-select v-model="form.city" |
|
|
|
:disabled="form.provinces ? false : true" @clear="clearcity()" @change="initData"> |
|
|
|
clearable |
|
|
|
<el-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option> |
|
|
|
placeholder="请选择城市" |
|
|
|
|
|
|
|
:disabled="form.provinces ? false : true" |
|
|
|
|
|
|
|
@clear="clearcity()" |
|
|
|
|
|
|
|
@change="initData"> |
|
|
|
|
|
|
|
<el-option v-for="(item,index) in cityList" |
|
|
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
:label="item.cityName" |
|
|
|
|
|
|
|
:value="item.cityId"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-form-item label="来源"> |
|
|
|
<el-form-item label="来源"> |
|
|
|
<el-select v-model="form.platformId" clearable placeholder="请选择来源" @change="initData"> |
|
|
|
<el-select v-model="form.platformId" |
|
|
|
<el-option |
|
|
|
clearable |
|
|
|
v-for="item in platformList" |
|
|
|
placeholder="请选择来源" |
|
|
|
|
|
|
|
@change="initData"> |
|
|
|
|
|
|
|
<el-option v-for="item in platformList" |
|
|
|
:key="item.value" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
:value="item.value"></el-option> |
|
|
|
></el-option> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-form-item label="学校"> |
|
|
|
<el-form-item label="学校"> |
|
|
|
<el-select v-model="form.schoolId" clearable filterable placeholder="请选择学校" @change="initData"> |
|
|
|
<el-select v-model="form.schoolId" |
|
|
|
<el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option> |
|
|
|
clearable |
|
|
|
|
|
|
|
filterable |
|
|
|
|
|
|
|
placeholder="请选择学校" |
|
|
|
|
|
|
|
@change="initData"> |
|
|
|
|
|
|
|
<el-option v-for="(item,index) in schoolList" |
|
|
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
:label="item.schoolName" |
|
|
|
|
|
|
|
:value="item.schoolId"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
@ -60,16 +83,19 @@ |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="创建时间" class="userRadio"> |
|
|
|
<el-form-item label="创建时间" |
|
|
|
|
|
|
|
class="userRadio"> |
|
|
|
<el-radio-group v-model="form.month"> |
|
|
|
<el-radio-group v-model="form.month"> |
|
|
|
<el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border>{{item.name}}</el-radio> |
|
|
|
<el-radio v-for="(item,index) in dateList" |
|
|
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
:label="item.id" |
|
|
|
|
|
|
|
border>{{item.name}}</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-radio-group> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="自定义"> |
|
|
|
<el-form-item label="自定义"> |
|
|
|
<el-date-picker |
|
|
|
<el-date-picker v-model="form.date" |
|
|
|
v-model="form.date" |
|
|
|
|
|
|
|
align="right" |
|
|
|
align="right" |
|
|
|
unlink-panels |
|
|
|
unlink-panels |
|
|
|
type="daterange" |
|
|
|
type="daterange" |
|
|
@ -77,13 +103,15 @@ |
|
|
|
end-placeholder="结束日期" |
|
|
|
end-placeholder="结束日期" |
|
|
|
format="yyyy-MM-dd" |
|
|
|
format="yyyy-MM-dd" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
clearable |
|
|
|
clearable></el-date-picker> |
|
|
|
></el-date-picker> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-input placeholder="支持手机号,姓名" prefix-icon="el-icon-search" v-model="form.keyword" clearable></el-input> |
|
|
|
<el-input placeholder="支持手机号,姓名" |
|
|
|
|
|
|
|
prefix-icon="el-icon-search" |
|
|
|
|
|
|
|
v-model="form.keyword" |
|
|
|
|
|
|
|
clearable></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
@ -93,37 +121,89 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="card"> |
|
|
|
<el-card shadow="hover" |
|
|
|
|
|
|
|
class="card"> |
|
|
|
<div class="flex-between mgb20"> |
|
|
|
<div class="flex-between mgb20"> |
|
|
|
<div class="flex-center"> |
|
|
|
<div class="flex-center"> |
|
|
|
<p class="hr_tag"></p> |
|
|
|
<p class="hr_tag"></p> |
|
|
|
<span>用户列表</span> |
|
|
|
<span>用户列表</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button> |
|
|
|
<el-button type="primary" |
|
|
|
|
|
|
|
round |
|
|
|
|
|
|
|
@click="delAllSelection" |
|
|
|
|
|
|
|
v-auth>批量删除</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-table :data="userData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" v-loading="loading" row-key="userId"> |
|
|
|
<el-table :data="userData" |
|
|
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> |
|
|
|
class="table" |
|
|
|
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> |
|
|
|
ref="table" |
|
|
|
<el-table-column prop="userName" label="姓名" align="center"></el-table-column> |
|
|
|
stripe |
|
|
|
<el-table-column prop="phone" label="手机号" align="center"></el-table-column> |
|
|
|
header-align="center" |
|
|
|
<el-table-column prop="schoolName" label="学校" align="center"></el-table-column> |
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
<el-table-column prop="platformName" label="来源" align="center"></el-table-column> |
|
|
|
v-loading="loading" |
|
|
|
<el-table-column prop="createTime" label="创建时间" width="150" align="center"></el-table-column> |
|
|
|
row-key="userId"> |
|
|
|
<el-table-column prop="logInNumber" label="登录次数" align="center"></el-table-column> |
|
|
|
<el-table-column type="selection" |
|
|
|
<el-table-column prop="lastLoginTime" label="最近登录时间" align="center"></el-table-column> |
|
|
|
width="55" |
|
|
|
<el-table-column label="操作" width="300" align="center"> |
|
|
|
align="center" |
|
|
|
|
|
|
|
:reserve-selection="true"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column type="index" |
|
|
|
|
|
|
|
width="100" |
|
|
|
|
|
|
|
label="序号" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="userName" |
|
|
|
|
|
|
|
label="姓名" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="phone" |
|
|
|
|
|
|
|
label="手机号" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="schoolName" |
|
|
|
|
|
|
|
label="学校" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="platformName" |
|
|
|
|
|
|
|
label="来源" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="createTime" |
|
|
|
|
|
|
|
label="创建时间" |
|
|
|
|
|
|
|
width="150" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="logInNumber" |
|
|
|
|
|
|
|
label="登录次数" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="lastLoginTime" |
|
|
|
|
|
|
|
label="最近登录时间" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column label="操作" |
|
|
|
|
|
|
|
width="300" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="text" @click="toDetail(scope.row, 1)" v-auth>查看</el-button> |
|
|
|
<el-button type="text" |
|
|
|
<el-button v-if="scope.row.userId!==1" type="text" @click="handleDelete(scope.row)" v-auth>删除</el-button> |
|
|
|
@click="toDetail(scope.row, 1)" |
|
|
|
<el-button type="text" @click="resetPassword(scope.row)" v-auth>重置密码</el-button> |
|
|
|
v-auth>查看</el-button> |
|
|
|
<el-switch v-if="scope.row.userId!==1" v-model="scope.row.isEnable" :active-value="1" :inactive-value="0" style="margin: 0 10px 0 5px" :active-text="scope.row.isEnable ? '启用' : '禁用'" @change="switchOff($event,scope.row,scope.$index)" v-auth="'/user:启用'"></el-switch> |
|
|
|
<el-button v-if="scope.row.userId!==1" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
@click="handleDelete(scope.row)" |
|
|
|
|
|
|
|
v-auth>删除</el-button> |
|
|
|
|
|
|
|
<el-button type="text" |
|
|
|
|
|
|
|
@click="resetPassword(scope.row)" |
|
|
|
|
|
|
|
v-auth>重置密码</el-button> |
|
|
|
|
|
|
|
<el-switch v-if="scope.row.userId!==1" |
|
|
|
|
|
|
|
v-model="scope.row.isEnable" |
|
|
|
|
|
|
|
:active-value="1" |
|
|
|
|
|
|
|
:inactive-value="0" |
|
|
|
|
|
|
|
style="margin: 0 10px 0 5px" |
|
|
|
|
|
|
|
:active-text="scope.row.isEnable ? '启用' : '禁用'" |
|
|
|
|
|
|
|
@change="switchOff($event,scope.row,scope.$index)" |
|
|
|
|
|
|
|
v-auth="'/user:启用'"></el-switch> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
<div class="pagination"> |
|
|
|
<div class="pagination"> |
|
|
|
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="totals"> |
|
|
|
<el-pagination background |
|
|
|
|
|
|
|
@current-change="currentChange" |
|
|
|
|
|
|
|
:current-page="page" |
|
|
|
|
|
|
|
layout="total, prev, pager, next" |
|
|
|
|
|
|
|
:total="totals"> |
|
|
|
</el-pagination> |
|
|
|
</el-pagination> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
@ -385,7 +465,8 @@ export default { |
|
|
|
}).catch((res) => { |
|
|
|
}).catch((res) => { |
|
|
|
// 弹框提示是否要继续启用,点了是,才需要继续启用 |
|
|
|
// 弹框提示是否要继续启用,点了是,才需要继续启用 |
|
|
|
this.$confirm(res.message, '提示', { |
|
|
|
this.$confirm(res.message, '提示', { |
|
|
|
type: 'info' |
|
|
|
type: 'info', |
|
|
|
|
|
|
|
closeOnClickModal: false |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
this.switchUser(val, row) |
|
|
|
this.switchUser(val, row) |
|
|
|
}).catch(() => { |
|
|
|
}).catch(() => { |
|
|
|