|
@@ -36,12 +36,12 @@
|
|
|
<!-- </sa-item>-->
|
|
|
</el-form>
|
|
|
<!-- ------------- 快捷按钮 ------------- -->
|
|
|
- <sa-item type="fast-btn" show="add,get,delete,export,reset"></sa-item>
|
|
|
+ <sa-item type="fast-btn" show="add,get,delete,reset"></sa-item>
|
|
|
<!-- ------------- 数据列表 ------------- -->
|
|
|
<el-table class="data-table" ref="data-table" :data="dataList">
|
|
|
<sa-td type="selection"></sa-td>
|
|
|
- <sa-td type="user-avatar" name="用户名" prop="name,avatar" min-width="120px"></sa-td>
|
|
|
- <sa-td type="text" name="手机" prop="phone"></sa-td>
|
|
|
+ <sa-td type="text" name="用户名" prop="name" min-width="150px"></sa-td>
|
|
|
+ <sa-td type="text" name="姓名" prop="nickname"></sa-td>
|
|
|
<sa-td name="创建人" >
|
|
|
<template slot-scope="s">
|
|
|
<span v-if="s.row.createByAid == -1">无</span>
|
|
@@ -52,25 +52,28 @@
|
|
|
<sa-td type="datetime" name="最后登录" prop="loginTime" width="150px"></sa-td>
|
|
|
<sa-td type="text" name="登录次数" prop="loginCount" not="0" width="100px"></sa-td>
|
|
|
<sa-td type="switch" name="账号状态" prop="status" :jv="{1: '正常', 2: '禁用[#ff4949]'}" @change="s => updateStatus(s.row)" width="120px"></sa-td>
|
|
|
- <el-table-column label="操作" fixed="right" width="450px">
|
|
|
+ <el-table-column label="操作" fixed="right" width="390px">
|
|
|
<template slot-scope="s">
|
|
|
<span @click="getInfo(s.row)">
|
|
|
- <el-button type="success" class="c-btn" icon="el-icon-view">查看</el-button>
|
|
|
+ <el-button type="success" class="c-btn">查看</el-button>
|
|
|
</span>
|
|
|
<span @click="updateName(s.row)">
|
|
|
- <el-button type="primary" class="c-btn" icon="el-icon-edit">改名称</el-button>
|
|
|
+ <el-button type="primary" class="c-btn" >改登录名</el-button>
|
|
|
+ </span>
|
|
|
+ <span @click="updateNickname(s.row)">
|
|
|
+ <el-button type="primary" class="c-btn" >改姓名</el-button>
|
|
|
</span>
|
|
|
<span @click="updateAvatar(s.row)">
|
|
|
- <el-button type="primary" class="c-btn" icon="el-icon-edit">改头像</el-button>
|
|
|
+ <el-button type="primary" class="c-btn" >改头像</el-button>
|
|
|
</span>
|
|
|
<span @click="updatePassword(s.row)">
|
|
|
- <el-button type="primary" class="c-btn" icon="el-icon-edit">改密码</el-button>
|
|
|
+ <el-button type="primary" class="c-btn" >改密码</el-button>
|
|
|
</span>
|
|
|
<span @click="roleFn(s.row)">
|
|
|
- <el-button type="primary" class="c-btn" icon="el-icon-edit">角色</el-button>
|
|
|
+ <el-button type="primary" class="c-btn" >角色</el-button>
|
|
|
</span>
|
|
|
<span @click="del(s.row)">
|
|
|
- <el-button type="danger" class="c-btn" icon="el-icon-delete">删除</el-button>
|
|
|
+ <el-button type="danger" class="c-btn" >删除</el-button>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -154,6 +157,15 @@
|
|
|
this.roleDialog.visible=false;
|
|
|
}.bind(this))
|
|
|
},
|
|
|
+ updateNickname(data){
|
|
|
+ layer.prompt({title: '修改名称'}, function(pass, index){
|
|
|
+ layer.close(index);
|
|
|
+ sa.ajax('/admin/updateNickname', {id: data.id, nickname: pass}, function(res){
|
|
|
+ data.nickname = pass;
|
|
|
+ layer.msg('修改成功');
|
|
|
+ }.bind(this))
|
|
|
+ });
|
|
|
+ },
|
|
|
// 刷新
|
|
|
f5: function(isPage){
|
|
|
sa.ajax('/admin/getList', this.p, function(res){
|