用户修改(静态)

dev_2022-04-07
yujialong 3 years ago
parent 9161141d9a
commit 9910bf9ed2
  1. 2
      src/utils/api.js
  2. 4
      src/utils/http.js
  3. 49
      src/views/course/contentSettings.vue
  4. 9
      src/views/setting/index.vue
  5. 4
      src/views/setting/info.vue
  6. 347
      src/views/user/AddUser.vue
  7. 26
      src/views/user/User.vue

@ -56,7 +56,7 @@ export default {
selectAccountDetail: `users/users/userAccount/selectAccountDetail`, selectAccountDetail: `users/users/userAccount/selectAccountDetail`,
selectUserSysBind: `users/users/userAccount/selectUserSysBind`, selectUserSysBind: `users/users/userAccount/selectUserSysBind`,
updatePersonCenter: `users/users/userAccount/updatePersonCenter`, updatePersonCenter: `users/users/userAccount/updatePersonCenter`,
updateUserAvatars: `users/users/userAccount/updateUserAvatars`, updateUserAvatars: `${Setting.host}users/users/userAccount/updateUserAvatars`,
userInfo: `users/users/userAccount/userInfo`, userInfo: `users/users/userAccount/userInfo`,
// bindPhoneOrEmail: `users/users/userAccount/bindPhoneOrEmail`, // bindPhoneOrEmail: `users/users/userAccount/bindPhoneOrEmail`,
// sendPhoneOrEmailCode: `users/users/userAccount/sendPhoneOrEmailCode`, // sendPhoneOrEmailCode: `users/users/userAccount/sendPhoneOrEmailCode`,

@ -132,9 +132,9 @@ export function get(url, params){
/** /**
* post方法对应post请求 * post方法对应post请求
*/ */
export function post(url, params) { export function post(url, params, config) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
axios.post(url,params) axios.post(url,params, config)
.then(res => { .then(res => {
return resolve(res.data); return resolve(res.data);
}) })

@ -85,17 +85,18 @@
:before-upload="beforeUpload" :before-upload="beforeUpload"
:on-remove="handleRemove" :on-remove="handleRemove"
:on-error="uploadError" :on-error="uploadError"
:on-success="uploadSuccess"
:before-remove="beforeRemove" :before-remove="beforeRemove"
:limit="1" :limit="1"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:action="this.api.fileupload" :action="this.api.fileupload"
:file-list="uploadList" :file-list="uploadList"
:headers="headers" :headers="headers"
:http-request="handleRequest"
name="file" name="file"
> >
<el-button size="small"><img src="@/assets/img/upload.png" alt=""> 上传资源</el-button> <el-button size="small"><img src="@/assets/img/upload.png" alt=""> 上传资源</el-button>
</el-upload> </el-upload>
<el-progress v-if="showProgress" :stroke-width="3" :percentage="progressPercent"></el-progress>
</el-form-item> </el-form-item>
<el-form-item label="小节名称"> <el-form-item label="小节名称">
<el-input placeholder="请输入小节名称" v-model="sectionName" maxlength="50"></el-input> <el-input placeholder="请输入小节名称" v-model="sectionName" maxlength="50"></el-input>
@ -113,17 +114,18 @@
:before-upload="beforeUpload" :before-upload="beforeUpload"
:on-remove="handleRemove" :on-remove="handleRemove"
:on-error="uploadError" :on-error="uploadError"
:on-success="uploadSuccess"
:before-remove="beforeRemove" :before-remove="beforeRemove"
:limit="1" :limit="1"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:action="this.api.fileupload" :action="this.api.fileupload"
:file-list="uploadList" :file-list="uploadList"
:headers="headers" :headers="headers"
:http-request="handleRequest"
name="file" name="file"
> >
<el-button size="small"><img src="@/assets/img/upload.png" alt=""> 上传资源</el-button> <el-button size="small"><img src="@/assets/img/upload.png" alt=""> 上传资源</el-button>
</el-upload> </el-upload>
<el-progress v-if="showProgress" :stroke-width="3" :percentage="progressPercent"></el-progress>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="switchVisible = false">取消</el-button> <el-button @click="switchVisible = false">取消</el-button>
@ -186,7 +188,7 @@
<script> <script>
import { Loading } from "element-ui"; import { Loading } from "element-ui";
import pdf from "@/components/pdf"; import pdf from "@/components/pdf";
import axios from 'axios'
export default { export default {
name: "contentSettings", name: "contentSettings",
data() { data() {
@ -227,7 +229,9 @@ export default {
loadIns: null, loadIns: null,
pdfVisible: false, pdfVisible: false,
pdfSrc: "", pdfSrc: "",
previewing: false previewing: false,
showProgress: false,
progressPercent: 0
}; };
}, },
components: { pdf }, components: { pdf },
@ -302,19 +306,40 @@ export default {
this.originalFileName = file.name; this.originalFileName = file.name;
if (this.isAddSection) this.sectionName = file.name.substring(0, file.name.lastIndexOf(".")); if (this.isAddSection) this.sectionName = file.name.substring(0, file.name.lastIndexOf("."));
this.fileType = file.name.substring(file.name.lastIndexOf(".") + 1); this.fileType = file.name.substring(file.name.lastIndexOf(".") + 1);
this.showProgress = true
}, },
handleExceed(files, fileList) { handleExceed(files, fileList) {
this.$message.warning( this.$message.warning(
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!` `当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
); );
}, },
uploadSuccess(res, file, fileList) { //
let { fileId, fileType, fileUrl, ossFileName } = res.data.filesResult; handleRequest(data) {
this.uploading = false; const param = new FormData()
this.fileId = fileId; param.append('file', data.file)
this.fileType = fileType; const config = {
this.fileUrl = fileUrl; timeout: 10000000000,
this.fileName = ossFileName; headers: {
'Accept': '*/*',
'Content-Type': 'multipart/form-data'
},
//
onUploadProgress: progressEvent => {
const per = Number((progressEvent.loaded / progressEvent.total * 100).toFixed(2))
console.log("🚀 ~ file: contentSettings.vue ~ line 329 ~ handleRequest ~ per", per, this.progressPercent)
if (this.progressPercent <= 80) this.progressPercent = (per > 80) ? (Math.random() * 10 + 80).toFixed(2) : per
}
}
axios.post(this.api.fileupload, param, config).then(res => {
this.progressPercent = 100
this.showProgress = false
const { fileId, fileType, fileUrl, ossFileName } = res.data.data.filesResult
this.uploading = false
this.fileId = fileId
this.fileType = fileType
this.fileUrl = fileUrl
this.fileName = ossFileName
})
}, },
uploadError(err, file, fileList) { uploadError(err, file, fileList) {
this.$message({ this.$message({
@ -391,6 +416,7 @@ export default {
}, },
closeSection() { closeSection() {
this.isAddSection = false; this.isAddSection = false;
this.progressPercent = 0
}, },
addSection(id) { addSection(id) {
this.chapterId = id; this.chapterId = id;
@ -455,6 +481,7 @@ export default {
this.fileType = ""; this.fileType = "";
this.fileUrl = ""; this.fileUrl = "";
this.sectionId = ""; this.sectionId = "";
this.progressPercent = 0
}, },
// //
download(row) { download(row) {

@ -24,7 +24,7 @@
<script> <script>
import Setting from '@/setting' import Setting from '@/setting'
import { mapState,mapActions } from 'vuex' import { mapState,mapMutations } from 'vuex'
import info from './info' import info from './info'
import util from '@/libs/util' import util from '@/libs/util'
export default { export default {
@ -66,11 +66,10 @@ export default {
}, },
methods: { methods: {
...mapActions('user', [
'setAvatar'
]),
changeAvatar(res) { changeAvatar(res) {
this.setAvatar(res.message) this.$store.commit('userAvatar', {
avatar: res.message
})
}, },
updateStatus(status){ updateStatus(status){
this.edited = status this.edited = status

@ -159,8 +159,8 @@
</div> </div>
</div> </div>
<div class="btns"> <div class="btns">
<el-button size="small" v-throttle @click="$router.back()">取消</el-button> <el-button size="small" @click="$router.back()">取消</el-button>
<el-button type="primary" size="small" v-throttle @click="save">更新</el-button> <el-button type="primary" size="small" @click="save">更新</el-button>
</div> </div>
<el-dialog :title="form.email ? '更换邮箱' : '绑定邮箱'" :visible.sync="emailVisible" :close-on-click-modal="false" @close="closeEmail" width="30%"> <el-dialog :title="form.email ? '更换邮箱' : '绑定邮箱'" :visible.sync="emailVisible" :close-on-click-modal="false" @close="closeEmail" width="30%">

@ -7,167 +7,7 @@
<div class="per_title" @click="goback()"> <div class="per_title" @click="goback()">
<i class="el-icon-arrow-left"></i> <i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span> <span class="per_back">返回</span>
<span class="per_school">查看用户信息</span> <span class="per_school">{{ isDetail ? '查看' : '编辑' }}用户信息</span>
</div>
</div>
</el-card>
<!-- 个人信息 -->
<el-card shadow="hover" class="mgb20">
<div>
<div class="flex-between mgb20 user_header">
<div class="flex-center">
<p class="addhr_tag"></p>
<span>个人信息</span>
</div>
</div>
<div>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="120px"
:disabled="isDetail"
>
<el-col :span="6" :offset="5">
<el-form-item prop="userName" label="用户姓名">
<el-input v-model="form.userName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="证件类型" prop="documentType">
<el-input v-model="form.documentType" placeholder="请输入"></el-input>
<!-- <el-select-->
<!-- v-model="form.documentType"-->
<!-- clearable-->
<!-- placeholder="请选择证件类型"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="(item,index) in documentTypeList"-->
<!-- :key="index"-->
<!-- :label="item.name"-->
<!-- :value="item.value"-->
<!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item>
<el-form-item label="国家">
<el-input v-model="form.countries" placeholder="请输入"></el-input>
<!-- <el-select-->
<!-- v-model="form.countries"-->
<!-- clearable-->
<!-- placeholder="请选择国家"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="(item,index) in countryList"-->
<!-- :key="index"-->
<!-- :label="item.name"-->
<!-- :value="item.value"-->
<!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item>
<el-form-item label="城市">
<el-input v-model="form.cityName" placeholder="请输入"></el-input>
<!-- <el-select-->
<!-- v-model="form.cityId"-->
<!-- clearable-->
<!-- placeholder="请选择城市"-->
<!-- :disabled="form.cityId ? false : true"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="(item,index) in cityList"-->
<!-- :key="index"-->
<!-- :label="item.cityName"-->
<!-- :value="item.cityId"-->
<!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item>
<el-form-item label="教育程度">
<!-- <el-input v-model="form.educationDegree" placeholder="请输入"></el-input>-->
<el-select
v-model="form.educationDegree"
clearable
placeholder="请选择教育程度"
>
<el-option
v-for="(item,index) in educationDegreeList"
:key="index"
:label="item.name"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="当前院校">
<el-input v-model="form.schoolName" placeholder="请输入"></el-input>
<!-- <el-select v-model="form.schoolId" filterable clearable placeholder="请选择学校">-->
<!-- <el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option>-->
<!-- </el-select>-->
</el-form-item>
</el-col>
<el-col :span="6" :offset="2">
<el-form-item label="唯一识别码">
<el-input
v-model="form.uniqueIdentification"
placeholder="请输入"
:disabled="true"
></el-input>
</el-form-item>
<el-form-item prop="idNumber" label="证件号码">
<el-input
v-model="form.idNumber"
placeholder="请输入证件号码"
maxlength="18"
></el-input>
</el-form-item>
<el-form-item label="省份">
<el-input v-model="form.provinceName" placeholder="请输入"></el-input>
<!-- <el-select-->
<!-- v-model="form.provinceId"-->
<!-- clearable-->
<!-- placeholder="请选择省份"-->
<!-- @change="getCity"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="(item,index) in provinceList"-->
<!-- :key="index"-->
<!-- :label="item.provinceName"-->
<!-- :value="item.provinceId"-->
<!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item>
<el-form-item label="出生日期">
<el-date-picker
type="date"
placeholder="选择出生日期"
v-model="form.dateBirth"
style="width: 100%;"
value-format="yyyy-MM-dd"
></el-date-picker>
</el-form-item>
<el-form-item label="性别">
<el-select clearable
v-model="form.sex"
:disabled="IDdisabled"
placeholder="请选择性别"
>
<el-option
v-for="(item,index) in sexList"
:key="index"
:label="item.name"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-form>
</div> </div>
</div> </div>
</el-card> </el-card>
@ -209,8 +49,8 @@
</el-col> </el-col>
<el-col :span="6" :offset="2"> <el-col :span="6" :offset="2">
<el-form-item label="微信号"> <el-form-item label="唯一识别码">
<el-input v-model="form.WeChatID" placeholder="请输入微信号"></el-input> <el-input v-model="form.uniqueIdentification" disabled></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-col> </el-col>
@ -219,116 +59,65 @@
</div> </div>
</el-card> </el-card>
<!-- 个人档案 --> <!-- 个人信息 -->
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="mgb20">
<div> <div>
<div class="flex-between mgb20 user_header"> <div class="flex-between mgb20 user_header">
<div class="flex-center"> <div class="flex-center">
<p class="addhr_tag"></p> <p class="addhr_tag"></p>
<span>个人档案</span> <span>实名认证信息未实名认证</span>
</div> </div>
</div> </div>
<div> <div>
<div class="flex-center" v-for="(item,index) in archivesList" :key="index" v-show="index == 0 || index == 1 || index == 2 || showArch"> <el-form
<el-col :span="16" :offset="4"> ref="form"
<el-card shadow="hover" class="from_card"> :model="form"
<el-form ref="form" :model="form" :rules="rules" label-width="120px" :disabled="isDetail"> :rules="rules"
<div> label-width="120px"
<el-col :span="10"> :disabled="isDetail"
<el-form-item label="职业"> >
<el-input v-model="item.professionalName" placeholder="请输入"></el-input> <el-col :span="6" :offset="5">
<!-- <el-select--> <el-form-item prop="userName" label="用户姓名">
<!-- v-model="item.personalCareerId"--> <el-input v-model="form.userName" placeholder="请输入"></el-input>
<!-- placeholder="请选择职业"--> </el-form-item>
<!-- >-->
<!-- <el-option--> <el-form-item label="证件类型" prop="documentType">
<!-- v-for="item1 in occupationList"--> <!-- <el-input v-model="form.documentType" placeholder="请输入"></el-input> -->
<!-- :key="item1.value"--> <el-select
<!-- :label="item1.label"--> v-model="form.documentType"
<!-- :value="item1.value"--> clearable
<!-- ></el-option>--> placeholder="请选择证件类型"
<!-- </el-select>--> >
</el-form-item> <el-option
<el-form-item label="院校"> v-for="(item,index) in documentTypeList"
<el-input v-model="item.schoolName" placeholder="请输入"></el-input> :key="index"
<!-- <el-select v-model="item.schoolId" filterable clearable placeholder="请选择院校" @change="id => getSchoolName(id,index)">--> :label="item.name"
<!-- <el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option>--> :value="item.value"
<!-- </el-select>--> ></el-option>
</el-form-item> </el-select>
<el-form-item label="专业类"> </el-form-item>
<el-input v-model="item.professionalClassName" placeholder="请输入"></el-input> </el-col>
<!-- <el-select-->
<!-- v-model="item.professionalClassId"--> <el-col :span="6" :offset="2">
<!-- :disabled="item.disciplineId ? false : true"--> <el-form-item prop="phone" label="手机号">
<!-- clearable--> <el-input
<!-- placeholder="请选择专业类"--> v-model="form.phone"
<!-- @change="id => getItemProfessional(id,index)"--> placeholder="请输入手机号"
<!-- @clear="() => clearItemProfess(index)"--> maxlength="11"
<!-- >--> ></el-input>
<!-- <el-option--> </el-form-item>
<!-- v-for="(item2,index) in item.ProfessionalClassList"-->
<!-- :key="index"-->
<!-- :label="item2.professionalClassName"-->
<!-- :value="item2.professionalClassId"-->
<!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item>
</el-col>
</div>
<div> <el-form-item prop="idNumber" label="证件号码">
<el-col :span="10" :offset="3"> <el-input
<el-form-item> v-model="form.idNumber"
<br /> placeholder="请输入证件号码"
</el-form-item> maxlength="18"
<el-form-item label="专业学科"> ></el-input>
<el-input v-model="item.disciplineName" placeholder="请输入"></el-input> </el-form-item>
<!-- <el-select-->
<!-- v-model="item.disciplineId"-->
<!-- clearable-->
<!-- placeholder="请选择专业学科"-->
<!-- @change="id => getItemProfessionalClass(id,index)"-->
<!-- @clear="() => clearItemClass(index)"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="(item3,index) in item.subjectList"-->
<!-- :key="index"-->
<!-- :label="item3.disciplineName"-->
<!-- :value="item3.disciplineId"-->
<!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item>
<el-form-item label="专业">
<el-input v-model="item.professionalName" placeholder="请输入"></el-input>
<!-- <el-select-->
<!-- v-model="item.professionalId"-->
<!-- :disabled="item.professionalClassId ? false : true"-->
<!-- clearable-->
<!-- placeholder="请选择专业"-->
<!-- @change="getItemStuGrade"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="(item4,index) in item.ProfessionalList"-->
<!-- :key="index"-->
<!-- :label="item4.professionalName"-->
<!-- :value="item4.professionalId"-->
<!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item>
</el-col>
</div>
</el-form>
</el-card>
</el-col> </el-col>
</div> </el-form>
</div>
<div class="fold" v-if="archivesList.length > 3">
<img :class="{ 'arrowTransform': showArch, 'arrowTransformReturn': !showArch}" style="width: 21px;height: 17px;" src="../../assets/img/person/open.png" alt="" @click="foldArch">
</div> </div>
<div v-if="!archivesList.length" style="line-height: 60px; color: #909399; text-align: center;">暂无数据</div>
</div> </div>
</el-card> </el-card>
@ -337,7 +126,7 @@
<div class="flex-between mgb20"> <div class="flex-between mgb20">
<div class="flex-center"> <div class="flex-center">
<p class="addhr_tag"></p> <p class="addhr_tag"></p>
<span>已绑定系统</span> <span>已绑定的平台和用户信息</span>
</div> </div>
<div> <div>
<el-dialog :title="isShow ? '查看系统' : '编辑系统'" :visible.sync="dialogFormVisible" :center="!isIE()" :close-on-click-modal="false"> <el-dialog :title="isShow ? '查看系统' : '编辑系统'" :visible.sync="dialogFormVisible" :center="!isIE()" :close-on-click-modal="false">
@ -415,13 +204,18 @@
row-key="platformId" row-key="platformId"
> >
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="platformName" label="系统名称" align="center"></el-table-column> <el-table-column prop="platformName" label="平台名称" align="center"></el-table-column>
<el-table-column prop="domainName" label="域名" align="center"></el-table-column> <el-table-column prop="platformName" label="绑定组织名称" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> <el-table-column prop="platformName" label="姓名" align="center"></el-table-column>
<el-table-column prop="platformName" label="工号/学号" align="center"></el-table-column>
<el-table-column prop="platformName" label="角色" align="center"></el-table-column>
<el-table-column prop="platformName" label="绑定时间" align="center"></el-table-column>
<el-table-column prop="domainName" label="登录次数" align="center"></el-table-column>
<el-table-column prop="createTime" label="上一次的登录时间" align="center"></el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row,true)">查看</el-button> <el-button type="text" @click="show(scope.row,true)">查看</el-button>
<el-button type="text" @click="show(scope.row,false)">编辑</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="switchUser($event,scope.row,scope.$index)" v-auth="'/user:启用'"></el-switch>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -436,8 +230,8 @@ export default {
name: 'baseform', name: 'baseform',
data() { data() {
return { return {
isDetail: true, userId: this.$route.query.userId,
isDetail: this.$route.query.show, //
typeList: [ typeList: [
{ {
id: 0, id: 0,
@ -465,7 +259,7 @@ export default {
dialogFormVisible: false, dialogFormVisible: false,
form: { form: {
// //
userId: this.$store.state.userId, userId: '',
userName: '', // userName: '', //
uniqueIdentification: '', // uniqueIdentification: '', //
documentType: '居民身份证', // documentType: '居民身份证', //
@ -503,7 +297,7 @@ export default {
disciplineName: '', // disciplineName: '', //
professionalId: '', // professionalId: '', //
professionalName: '', // professionalName: '', //
userId: this.$store.state.userId userId: this.$route.query.userId
}, },
archivesList: [], archivesList: [],
rules: { rules: {
@ -585,7 +379,6 @@ export default {
schoolList: [], schoolList: [],
cityList: [], // cityList: [], //
provinceList: this.$store.state.provinceList, // provinceList: this.$store.state.provinceList, //
userId: this.$store.state.userId,
IDdisabled: false, IDdisabled: false,
regionOption: [{ regionOption: [{
regionName: '职站', regionName: '职站',
@ -864,6 +657,18 @@ export default {
}) })
} }
}, },
switchUser(val,row,index) {
this.$get(this.api.updateAccountAllEnable,{
id: row.userId,
isEnable: val
}).then(res => {
if(res.code == '200') {
this.$message.success(val ? '启用成功' : '禁用成功')
}else{
this.$message.success(res.message)
}
}).catch(res => {})
},
show(row,isShow){ show(row,isShow){
let obj = {} let obj = {}
Object.assign(obj,{ Object.assign(obj,{

@ -106,19 +106,17 @@
<el-table :data="userData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="userId"> <el-table :data="userData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="userId">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="account" label="用户账号" align="center"></el-table-column>
<el-table-column prop="provinceName" label="省份" align="center"></el-table-column>
<el-table-column prop="cityName" label="城市" align="center"></el-table-column>
<el-table-column prop="userName" 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="schoolName" label="学校" align="center"></el-table-column>
<el-table-column prop="platformName" label="来源" align="center"></el-table-column> <el-table-column prop="platformName" label="来源" align="center"></el-table-column>
<el-table-column prop="phone" label="手机号" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" width="150" 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="logInNumber" label="登录次数" align="center"></el-table-column>
<el-table-column prop="logInNumber" label="最近登录时间" align="center"></el-table-column>
<el-table-column label="操作" width="300" align="center"> <el-table-column label="操作" width="300" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row)" v-auth>查看</el-button> <el-button type="text" @click="toDetail(scope.row, 1)" v-auth>查看</el-button>
<el-button type="text" @click="edit(scope.row)" v-auth>编辑</el-button> <el-button type="text" @click="toDetail(scope.row)" v-auth>编辑</el-button>
<el-button v-if="scope.row.userId!==1" type="text" @click="handleDelete(scope.row)" v-auth>删除</el-button> <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-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> <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>
@ -317,20 +315,8 @@ export default {
this.page = val this.page = val
this.getData() this.getData()
}, },
permission(){ toDetail(row, detail){
this.$router.push('/permission') this.$router.push(`/adduser?userId=${row.userId}${detail ? '&show=1' : ''}`)
},
adduser(){
this.$store.commit("userData", { user_id : ''})
this.$router.push('/adduser')
},
edit(row){
this.$store.commit("userData", { user_id : row.userId})
this.$router.push('/adduser')
},
show(row){
this.$store.commit("userData", { user_id : row.userId})
this.$router.push('/adduser')
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('确定要删除吗?', '提示', { this.$confirm('确定要删除吗?', '提示', {

Loading…
Cancel
Save