Commit 4bd4f408 authored by 黄奎's avatar 黄奎

修改密码

parent a4e5892d
......@@ -15,8 +15,8 @@
<el-button size="mini" style="margin-left:20px;" @click="copyCode()">复制链接</el-button>
</el-alert>
<div class="searchInput">
<el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入用户昵称"
v-model="msg.EmpName" size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()">
<el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入用户昵称" v-model="msg.EmpName"
size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()">
</el-input>
<span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"
@click="msg.pageIndex=1,getList()"> </span>
......@@ -37,7 +37,8 @@
<img @click="EditRole(scope.row)" src="../../assets/img/userman/edit.png" alt="">
</el-tooltip>
<el-tooltip slot="label" class="item" effect="dark" content="修改密码" placement="top">
<img @click="upPwddialog=true" style="margin:0 10px;" src="../../assets/img/userman/change.png" alt="">
<img @click="upPwddialog=true,pwdMsg.EmpId=scope.row.EmpId" style="margin:0 10px;"
src="../../assets/img/userman/change.png" alt="">
</el-tooltip>
<el-tooltip slot="label" class="item" effect="dark" content="删除" placement="top">
<img @click="RemmoveRole(scope.row)" src="../../assets/img/userman/del.png" alt="">
......@@ -84,11 +85,11 @@
<el-dialog title="提示" :visible.sync="upPwddialog" width="400px">
<el-form label-width="0">
<p style="padding:10px 0">请输入新密码</p>
<el-input type="password" v-model="pwdMsg.password"></el-input>
<el-input type="password" v-model="pwdMsg.EmpPwd"></el-input>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="upPwddialog = false">取 消</el-button>
<el-button size="small" type="primary">确 定</el-button>
<el-button size="small" type="primary" @click="UpdatePwd()">确 定</el-button>
</span>
</el-dialog>
</div>
......@@ -101,16 +102,18 @@
//修改密码弹窗
upPwddialog: false,
//全选
checkAll:false,
checkArr: [],//选中数组
checkAll: false,
checkArr: [], //选中数组
dataList: [],
msg: {
pageIndex: 1,
pageSize: 15,
EmpName:''
EmpName: ''
},
//修改密码
pwdMsg: {
password: ''
EmpPwd: '',
EmpId: 0,
},
total: 0,
empIsShowAdd: true,
......@@ -145,6 +148,18 @@
},
methods: {
UpdatePwd() {
this.apipost("/api/Employee/SetEmployeePwd", this.pwdMsg, res => {
if (res.data.resultCode == 1) {
this.getList();;
this.upPwddialog = false;
this.Success(res.data.message);
this.pwdMsg.EmpPwd='';
} else {
this.Info(res.data.message);
}
})
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
......@@ -171,7 +186,7 @@
},
//保存
saveMsg() {
this.addMsg.RoleAuth=this.checkArr.join(',');
this.addMsg.RoleAuth = this.checkArr.join(',');
this.apipost("/api/Employee/SetEmployee", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.getList();
......@@ -196,12 +211,12 @@
EmpId: item.EmpId
}, res => {
if (res.data.resultCode == 1) {
this.checkArr=[];
this.checkArr = [];
this.addMsg = res.data.data;
this.empIsShowAdd = false;
let newArr = this.addMsg.RoleAuth.split(',');
if(this.addMsg.RoleAuth!=''){
this.checkArr=newArr.map(function(data){
if (this.addMsg.RoleAuth != '') {
this.checkArr = newArr.map(function (data) {
return +data;
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment