|
@@ -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>
|
|
@@ -132,6 +133,23 @@
|
|
|
:title="modalTitle"
|
|
|
@close="onDetailModalClose"
|
|
|
></user-detail>
|
|
|
+ <el-dialog
|
|
|
+ title="修改密码"
|
|
|
+ :visible.sync="dialogFormVisible"
|
|
|
+ :modal-append-to-body="false"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ style="width:100%"
|
|
|
+ >
|
|
|
+ <el-form>
|
|
|
+ <el-form-item label="新密码" prop="password">
|
|
|
+ <el-input v-model="newPassword" placeholder="请输入新密码" style="width:50%" show-password></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogFormVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="changePw">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -165,7 +183,9 @@ export default {
|
|
|
modalTitle: "",
|
|
|
businessKey: "",
|
|
|
showModal: false,
|
|
|
- companyResult:""
|
|
|
+ companyResult:"",
|
|
|
+ dialogFormVisible:false,
|
|
|
+ newPassword:""
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -301,6 +321,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() {
|