1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/.cache/vue-loader/791dc57c8a6e3c9867ed8c00bd2...

1 line
10 KiB
JSON
Raw Normal View History

2023-12-18 13:12:25 +08:00
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\main-navbar-update-info.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\main-navbar-update-info.vue","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\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//\n//\n//\n//\n//\n//\n\nimport debounce from 'lodash/debounce'\nimport { isEmail, isMobile } from '@/utils/validate'\nimport { clearLoginInfo } from '@/utils'\nexport default {\n data () {\n return {\n visible: false,\n loading:false,\n roleList: [],\n roleIdListDefault: [],\n dataForm: {\n realName: '',\n mobile: '',\n email: ''\n }\n }\n },\n computed: {\n dataRule () {\n var validateEmail = (rule, value, callback) => {\n if (!isEmail(value)) {\n return callback(new Error(this.$t('validate.format', { 'attr': this.$t('user.email') })))\n }\n callback()\n }\n var validateMobile = (rule, value, callback) => {\n if (!isMobile(value)) {\n return callback(new Error(this.$t('validate.format', { 'attr': this.$t('user.mobile') })))\n }\n callback()\n }\n return {\n realName: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n email: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' },\n { validator: isEmail, trigger: 'blur' }\n ],\n mobile: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' },\n { validator: isMobile, trigger: 'blur' }\n ]\n }\n }\n },\n created(){\n this.dataForm.id=this.$store.state.user.id;\n },\n methods: {\n init () {\n this.visible = true\n this.$nextTick(() => {\n this.$refs['dataForm'].resetFields();\n this.roleIdListDefault = [];\n Promise.all([\n this.getRoleList()\n ]).then(() => {\n if (this.dataForm.id) {\n this.getInfo()\n }\n })\n })\n },\n // 获取角色列表\n getRoleList () {\n return this.$http.get('/sys/role/list').then(({ data: res }) => {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n this.roleList = res.data\n }).catch(() => {})\n },\n getInfo(){\n this.$http.get(`/sys/user/${this.dataForm.id}`).then(({ data: res }) => {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n this.dataForm = {\n ...this.dataForm,\n ...res.data,\n roleIdList: []\n }\n // 角色配置, 区分是否为默认角色\n for (var i = 0; i < res.data.roleIdList.length; i++) {\n if (this.roleList.filter(item => item.id === res.data.roleIdList[i])[0]) {\n this.dataForm.roleIdList.push(res.data.roleIdList[i])\n continue\n }\n this.roleIdListDefault.push(res.data.roleIdList[i])\n }\n }).catch(() => {})\n },\n // 表单提交\n dataFormSubmitHandle: debounce(function () {\n this.$refs['dataForm'].validate((valid) => {\n if (!valid) {\n return false\n }\n this.loading=true;\n th