|
@@ -113,6 +113,7 @@
|
|
|
<template slot-scope="{row}">
|
|
|
<el-button size="mini" type="warning" @click="handleEdit(row)">编辑</el-button>
|
|
|
<el-button size="mini" type="danger" @click="handleDelete(row)">删除</el-button>
|
|
|
+ <el-button size="mini" type="primary" @click="openChangePw(row)">修改密码</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -301,6 +302,35 @@ export default {
|
|
|
if(refreshed) {
|
|
|
this.changePage(this.pageIndex);
|
|
|
}
|
|
|
+ },
|
|
|
+ openChangePw(record) {
|
|
|
+ var self = this;
|
|
|
+ self.changeId = record.id;
|
|
|
+ self.dialogFormVisible = true;
|
|
|
+ },
|
|
|
+ changePw() {
|
|
|
+ var self = this;
|
|
|
+ var formData = new FormData();
|
|
|
+
|
|
|
+ formData.append("userId", self.changeId);
|
|
|
+ formData.append("newPwd", self.newPassword);
|
|
|
+
|
|
|
+ userApi.changeUserPassword(formData).then(function(response) {
|
|
|
+ var jsonData = response.data;
|
|
|
+
|
|
|
+ if (jsonData.result) {
|
|
|
+ self.changePage(self.pageIndex);
|
|
|
+
|
|
|
+ self.dialogFormVisible = false;
|
|
|
+ self.changeId = "";
|
|
|
+ self.newPassword = "";
|
|
|
+
|
|
|
+ self.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "修改成功!"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
mounted: function() {
|