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

修改密码

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