{"remainingRequest":"/Users/admin/projects/dms/src/dealer_admin/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/admin/projects/dms/src/dealer_admin/src/layout/components/Settings/changePass.vue?vue&type=script&lang=js","dependencies":[{"path":"/Users/admin/projects/dms/src/dealer_admin/src/layout/components/Settings/changePass.vue","mtime":1713161556000},{"path":"/Users/admin/projects/dms/src/dealer_admin/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/admin/projects/dms/src/dealer_admin/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/admin/projects/dms/src/dealer_admin/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/Users/admin/projects/dms/src/dealer_admin/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/admin/projects/dms/src/dealer_admin/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport * as API from \"@/api/admin\";\nimport _ from \"lodash\";\n\nimport * as Utils from \"@/utils/validate\";\n\nexport default {\n  components: {},\n  data() {\n    return {\n      dateVal: \"\",\n      dialogFormVisible: false,\n      //记录输入信息\n      form: {\n        password: '',\n        confirmPass: '',\n      },\n    };\n  },\n  computed: {},\n  created() {\n    this.$forceUpdate();\n  },\n  methods: {\n\n    resetForm() {\n      this.form = {\n        password: '',\n        confirmPass: '',\n      };\n    },\n    change(e) {\n      this.$forceUpdate();\n    },\n    async init() {\n      this.resetForm();\n      this.dialogFormVisible = true;\n    },\n    /** 表单提交，区分好 是 新增 、 更新 */\n    async dataFormSubmit() {\n      const tempData = _.cloneDeep(this.form);\n      tempData.password = tempData.password.trim();\n      tempData.confirmPass = tempData.confirmPass.trim();\n      if(tempData.password == ''){\n        this.showError(\"请输入密码\");\n        return;\n      }\n      if(tempData.confirmPass == ''){\n        this.showError(\"请输入确认密码\");\n        return;\n      }\n      if(tempData.password != tempData.confirmPass ){\n        this.showError(\"两次密码不一致\");\n        return;\n      }\n      //点击确认再次提示\n      this.$confirm(\"确认提交???\", \"提示\")\n        .then(_ => {\n          this.$refs[\"dataForm\"].validate(async valid => {\n            if (valid) {\n              let res = await API.changePass(tempData);\n              this.dialogFormVisible = false;\n\n              this.$message({\n                message: `修改成功`,\n                type: \"success\",\n                duration: 1501,\n                onClose: () => {}\n              });\n            }\n          });\n        })\n        .catch(_ => {});\n    },\n    showError(msg) {\n      this.$message.error(msg);\n    }\n  }\n};\n",null]}