reset-password.ftl 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <!-- 修改密码 -->
  2. <div id="reset-password" class="reset-password">
  3. <el-dialog title="修改密码" :visible.sync="isShow">
  4. <el-form :model="resetPasswordForm" label-width='80px'>
  5. <el-form-item label="账号">
  6. <el-input v-model="resetPasswordForm.managerName" autocomplete="off" readonly disabled></el-input>
  7. </el-form-item>
  8. <el-form-item label="旧密码">
  9. <el-input v-model="resetPasswordForm.oldManagerPassword" autocomplete="off"></el-input>
  10. </el-form-item>
  11. <el-form-item label="新密码">
  12. <el-input v-model="resetPasswordForm.newManagerPassword" autocomplete="off"></el-input>
  13. </el-form-item>
  14. </el-form>
  15. <div slot="footer" class="dialog-footer">
  16. <el-button @click="isShow = false">取 消</el-button>
  17. <el-button type="primary" @click="updatePassword">更新密码</el-button>
  18. </div>
  19. </el-dialog>
  20. </div>
  21. <script>
  22. var resetPasswordVue = new Vue({
  23. el: '#reset-password',
  24. data: {
  25. // 模态框的显示
  26. isShow: false,
  27. resetPasswordForm: {
  28. managerName: '',
  29. oldManagerPassword: '',
  30. newManagerPassword: '',
  31. }
  32. },
  33. methods: {
  34. // 更新密码
  35. updatePassword: function () {
  36. var that = this;
  37. ms.http.post(ms.manager + "/updatePassword.do",that.resetPasswordForm)
  38. .then((data)=>{
  39. that.resetPasswordForm.oldManagerPassword = '';
  40. that.resetPasswordForm.newManagerPassword = '';
  41. that.isShow = false;
  42. }, (err) => {
  43. that.$message.error(err);
  44. })
  45. }
  46. }
  47. })
  48. </script>