{"remainingRequest":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\views\\main-navbar-update-password.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\views\\main-navbar-update-password.vue","mtime":1581948666000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["\r\nimport debounce from 'lodash/debounce'\r\nimport { clearLoginInfo } from '@/utils'\r\nexport default {\r\n data () {\r\n return {\r\n visible: false,\r\n dataForm: {\r\n password: '',\r\n newPassword: '',\r\n confirmPassword: ''\r\n }\r\n }\r\n },\r\n computed: {\r\n dataRule () {\r\n var validateConfirmPassword = (rule, value, callback) => {\r\n if (this.dataForm.newPassword !== value) {\r\n return callback(new Error(this.$t('updatePassword.validate.confirmPassword')))\r\n }\r\n callback()\r\n }\r\n return {\r\n password: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n newPassword: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n confirmPassword: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' },\r\n { validator: validateConfirmPassword, trigger: 'blur' }\r\n ]\r\n }\r\n }\r\n },\r\n methods: {\r\n init () {\r\n this.visible = true\r\n this.$nextTick(() => {\r\n this.$refs['dataForm'].resetFields()\r\n })\r\n },\r\n // 表单提交\r\n dataFormSubmitHandle: debounce(function () {\r\n this.$refs['dataForm'].validate((valid) => {\r\n if (!valid) {\r\n return false\r\n }\r\n this.$http.put('/sys/user/password', this.dataForm).then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n return this.$message.error(res.msg)\r\n }\r\n this.$message({\r\n message: this.$t('prompt.success'),\r\n type: 'success',\r\n duration: 500,\r\n onClose: () => {\r\n this.visible = false\r\n clearLoginInfo()\r\n this.$router.replace({ name: 'login' })\r\n }\r\n })\r\n }).catch(() => {})\r\n })\r\n }, 1000, { 'leading': true, 'trailing': false })\r\n }\r\n}\r\n",{"version":3,"sources":["main-navbar-update-password.vue"],"names":[],"mappings":";AA6BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"main-navbar-update-password.vue","sourceRoot":"src/views","sourcesContent":["\r\n \r\n \r\n \r\n {{ $store.state.user.name }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ $t('cancel') }}\r\n {{ $t('confirm') }}\r\n \r\n \r\n\r\n\r\n\r\n"]}]}