c2aaae3609d6e72504c542e7901b8635.json 16 KB

1
  1. {"remainingRequest":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/src/views/login/index.vue?vue&type=script&lang=js","dependencies":[{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/src/views/login/index.vue","mtime":1708395041888},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/cache-loader/dist/cjs.js","mtime":1708395146433},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/babel-loader/lib/index.js","mtime":1708395147257},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/cache-loader/dist/cjs.js","mtime":1708395146433},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/vue-loader/lib/index.js","mtime":1708395147382}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:Ly8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KDQppbXBvcnQgeyB2YWxpZFVzZXJuYW1lIH0gZnJvbSAnQC91dGlscy92YWxpZGF0ZScNCmltcG9ydCB7IGxvZ2luLCBnZXRDb2RlSW1nLCBnZXRJbmZvLCB1c2VyUm91dGVycyxwcm9qZWN0TmFtZSB9IGZyb20gJ0AvYXBpL3VzZXInDQppbXBvcnQgeyBuZXh0VGljayB9IGZyb20gJ3Byb2Nlc3MnDQppbXBvcnQgZGVib3VuY2UgZnJvbSAnQC91dGlscy9kZWJvdW5jZScNCmV4cG9ydCBkZW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SW1nKCkNCiAgICB9LA0KICAgIGdldENvZGVJbWcoKSB7DQogICAgICBnZXRDb2RlSW1nKCkudGhlbihyZXMgPT4gew0KICAgICAgICBpZiAocmVzLmNvZGUgPT0gMjAwKSB7ICAgICAgICAgIA0KICAgICAgICAgIGlmIChyZXMuY2FwdGNoYUVuYWJsZWQpIHsNCiAgICAgICAgICAgIHRoaXMuaXNTaG93Q29kZSA9IHRydWUNCiAgICAgICAgICAgICAgdGhpcy5jb2RlVXJsID0gImRhdGE6aW1hZ2UvZ2lmO2Jhc2U2NCwiICsgcmVzLmltZzsNCiAgICAgICAgICAgICAgdGhpcy5sb2dpbkZvcm0udXVpZCA9IHJlcy51dWlkDQogICAgICAgICAgICB9IGVsc2Ugew0KICAgICAgICAgICAgICB0aGlzLmlzU2hvd0NvZGUgPSBmYWxzZQ0KICAgICAgICAgICAgfSAgICAgICAgICANCiAgICAgICAgfQ0KICAgICAgfSkNCiAgICB9LA0KICAgIGhhbmRsZUxvZ2luKCkgew0KICAgICAgdGhpcy4kcmVmcy5sb2dpbkZvcm0udmFsaWRhdGUodmFsaWQgPT4gew0KICAgICAgICBpZiAodmFsaWQpIHsgICAgICANCiAgICAgICAgICB0aGlzLmxvYWRpbmcgPSB0cnVlICAgDQogICAgICAgICAgICB0aGlzLiRzdG9yZS5kaXNwYXRjaCgndXNlci9sb2dpbicsIHRoaXMubG9naW5Gb3JtKS50aGVuKHJlcyA9PiB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICANCiAgICAgICAgICAgIHRoaXMuJHJvdXRlci5wdXNoKHsgcGF0aDogICcvJyB9KQ0KICAgICAgICAgICAgdGhpcy4kc3RvcmUuZGlzcGF0Y2goJ2FwcC9jbG9zZVNpZGVCYXInLCB7IHdpdGhvdXRBbmltYXRpb246IGZhbHNlIH0pICAgDQogICAgICAgICAgICB0aGlzLmxvYWRpbmcgPSBmYWxzZSAgICAgICAgICAgICAgICAgICANCiAgICAgICAgICB9KS5jYXRjaChlcnIgPT4geyAgICAgICAgICAgIA0KICAgICAgICAgICAgdGhpcy5sb2FkaW5nID0gZmFsc2UNCiAgICAgICAgICB9KSAgICAgICANCiAgICAgICAgfSBlbHNlIHsNCiAgICAgICAgICBjb25zb2xlLmxvZygnZXJyb3Igc3VibWl0ISEnKQ0KICAgICAgICAgIHJldHVybiBmYWxzZQ0KICAgICAgICB9DQogICAgICB9KQ0KICAgIH0sDQogICAgLy8gaGFuZGxlTG9naW46ZGVib3VuY2UoZnVuY3Rpb24oKXsNCiAgICAvLyAgIHRoaXMuJHJlZnMubG9naW5Gb3JtLnZhbGlkYXRlKHZhbGlkID0+IHsNCiAgICAvLyAgICAgaWYgKHZhbGlkKSB7ICAgICAgDQogICAgLy8gICAgICAgdGhpcy5sb2FkaW5nID0gdHJ1ZSAgIA0KICAgIC8vICAgICAgICAgdGhpcy4kc3RvcmUuZGlzcGF0Y2goJ3VzZXIvbG9naW4nLCB0aGlzLmxvZ2luRm9ybSkudGhlbihyZXMgPT4geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgDQogICAgLy8gICAgICAgICB0aGlzLiRyb3V0ZXIucHVzaCh7IHBhdGg6ICAnLycgfSkNCiAgICAvLyAgICAgICAgIHRoaXMuJHN0b3JlLmRpc3BhdGNoKCdhcHAvY2xvc2VTaWRlQmFyJywgeyB3aXRob3V0QW5pbWF0aW9uOiBmYWxzZSB9KSAgICAgICAgICAgICAgICAgICAgICANCiAgICAvLyAgICAgICB9KS5jYXRjaChlcnIgPT4geyAgICAgICAgICAgIA0KICAgIC8vICAgICAgICAgdGhpcy5sb2FkaW5nID0gZmFsc2UNCiAgICAvLyAgICAgICB9KSAgICAgICAgDQogICAgLy8gICAgIH0gZWxzZSB7DQogICAgLy8gICAgICAgY29uc29sZS5sb2coJ2Vycm9yIHN1Ym1pdCEhJykNCiAgICAvLyAgICAgICByZXR1cm4gZmFsc2UNCiAgICAvLyAgICAgfQ0KICAgIC8vICAgfSkNCiAgICAvLyB9LDIwMDApDQogIH0NCn0NCg=="},{"version":3,"sources":["index.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DA;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;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":"index.vue","sourceRoot":"src/views/login","sourcesContent":["\r\n<template>\r\n <div class=\"page\">\r\n <!-- <span class=\"title\">{{ projectName }}</span> -->\r\n <div class=\"box_9\">\r\n <span class=\"text_1\">用户登录</span>\r\n <div style=\"width: 100%;height: 40px;\"></div>\r\n <el-form ref=\"loginForm\" :model=\"loginForm\" :rules=\"loginRules\" auto-complete=\"on\" label-position=\"left\">\r\n <el-form-item prop=\"username\">\r\n <el-input tabindex=\"1\" ref=\"username\" v-model=\"loginForm.username\" placeholder=\"请输入用户名\" name=\"username\"\r\n type=\"text\" auto-complete=\"on\">\r\n <template #prefix>\r\n <img style=\"position: relative;top: 5px;\" src=\"../../assets/编组 4.png\">\r\n </template>\r\n </el-input>\r\n </el-form-item>\r\n <div style=\"width: 100%;height: 20px;\"></div>\r\n <el-form-item prop=\"password\">\r\n <el-input tabindex=\"2\" :key=\"passwordType\" ref=\"password\" v-model=\"loginForm.password\" :type=\"passwordType\"\r\n placeholder=\"请输入密码\" name=\"password\" auto-complete=\"on\" @keyup.enter.native=\"handleLogin\">\r\n <template #prefix>\r\n <img style=\"position: relative;top: 5px;\" src=\"../../assets/icon-lock.png\">\r\n </template></el-input>\r\n </el-form-item>\r\n <div style=\"width: 100%;height: 20px;\"></div>\r\n <el-form-item v-if=\"isShowCode\" prop=\"code\">\r\n <el-input v-model=\"loginForm.code\" class=\"checkCode\" placeholder=\"请输入校验码\">\r\n <template #prefix>\r\n <img style=\"position: relative;top: 5px;\" src=\"../../assets/编组 5.png\">\r\n </template></el-input>\r\n\r\n </el-form-item>\r\n <div class=\"codeImg\">\r\n <img :src=\"codeUrl\" @click=\"getCode\" width=\"100px\">\r\n </div>\r\n </el-form>\r\n <!-- <div style=\"position: relative;\">\r\n <div class=\"text-wrapper_1\" @click=\"handleLogin\">\r\n <span>登&nbsp;录</span>\r\n </div>\r\n </div> -->\r\n <el-button class=\"text-wrapper_1\" :loading=\"loading\" @click.native.prevent=\"handleLogin\">\r\n <span>登&nbsp;录</span>\r\n </el-button>\r\n </div>\r\n </div>\r\n</template>\r\n<script>\r\nexport default {\r\n data() {\r\n return {\r\n constants: {},\r\n };\r\n },\r\n methods: {},\r\n};\r\n</script>\r\n\r\n\r\n<script>\r\nimport { validUsername } from '@/utils/validate'\r\nimport { login, getCodeImg, getInfo, userRouters,projectName } from '@/api/user'\r\nimport { nextTick } from 'process'\r\nimport debounce from '@/utils/debounce'\r\nexport default {\r\n name: 'Login',\r\n data() {\r\n const validateUsername = (rule, value, callback) => {\r\n if (!validUsername(value)) {\r\n callback(new Error('Please enter the correct user name'))\r\n } else {\r\n callback()\r\n }\r\n }\r\n const validatePassword = (rule, value, callback) => {\r\n if (value.length < 6) {\r\n callback(new Error('The password can not be less than 6 digits'))\r\n } else {\r\n callback()\r\n }\r\n }\r\n return {\r\n isShowCode: false,\r\n codeUrl: '',\r\n loginForm: {\r\n username: \"\",\r\n password: \"\",\r\n code: '',\r\n uuid: ''\r\n },\r\n loginRules: {\r\n username: [{ required: true, trigger: 'blur', message: '请输入用户名!' }],\r\n password: [{ required: true, trigger: 'blur', message: '请输入密码!' }],\r\n code: [{ required: true, message: '请输入验证码!', trigger: 'blur' },]\r\n },\r\n loading: false,\r\n passwordType: 'password',\r\n redirect: undefined,\r\n projectName:'',\r\n }\r\n },\r\n watch: {\r\n $route: {\r\n handler: function (route) {\r\n this.redirect = route.query && route.query.redirect\r\n },\r\n immediate: true\r\n }\r\n },\r\n created() {\r\n this.getCodeImg() \r\n projectName().then(res => { \r\n this.projectName = res \r\n }) \r\n },\r\n methods: {\r\n showPwd() {\r\n if (this.passwordType === 'password') {\r\n this.passwordType = ''\r\n } else {\r\n this.passwordType = 'password'\r\n }\r\n this.$nextTick(() => {\r\n this.$refs.password.focus()\r\n })\r\n },\r\n getCode() {\r\n this.getCodeImg()\r\n },\r\n getCodeImg() {\r\n getCodeImg().then(res => {\r\n if (res.code == 200) { \r\n if (res.captchaEnabled) {\r\n this.isShowCode = true\r\n this.codeUrl = \"data:image/gif;base64,\" + res.img;\r\n this.loginForm.uuid = res.uuid\r\n } else {\r\n this.isShowCode = false\r\n } \r\n }\r\n })\r\n },\r\n handleLogin() {\r\n this.$refs.loginForm.validate(valid => {\r\n if (valid) { \r\n this.loading = true \r\n this.$store.dispatch('user/login', this.loginForm).then(res => { \r\n this.$router.push({ path: '/' })\r\n this.$store.dispatch('app/closeSideBar', { withoutAnimation: false }) \r\n this.loading = false \r\n }).catch(err => { \r\n this.loading = false\r\n }) \r\n } else {\r\n console.log('error submit!!')\r\n return false\r\n }\r\n })\r\n },\r\n // handleLogin:debounce(function(){\r\n // this.$refs.loginForm.validate(valid => {\r\n // if (valid) { \r\n // this.loading = true \r\n // this.$store.dispatch('user/login', this.loginForm).then(res => { \r\n // this.$router.push({ path: '/' })\r\n // this.$store.dispatch('app/closeSideBar', { withoutAnimation: false }) \r\n // }).catch(err => { \r\n // this.loading = false\r\n // }) \r\n // } else {\r\n // console.log('error submit!!')\r\n // return false\r\n // }\r\n // })\r\n // },2000)\r\n }\r\n}\r\n</script>\r\n\r\n\r\n\r\n<style lang=\"scss\" scoped>\r\n.page {\r\n position: relative;\r\n // background-image: url('../../assets/bg.png');\r\n background: url('../../assets/ceshibeijing.png'); \r\n background-repeat: no-repeat;\r\n background-position: center;\r\n background-attachment: fixed;\r\n background-size: cover;\r\n -webkit-background-size: cover;\r\n -moz-background-size: cover;\r\n -o-background-size: cover; \r\n background-position:0px -1px;\r\n min-width: 700px;\r\n min-height: 970px;\r\n height: 100vh;\r\n text-align: center;\r\n\r\n .title {\r\n position: absolute;\r\n left: 60px;\r\n top: 46px;\r\n font-size: 32px;\r\n color: #FFFFFF;\r\n font-family: PingFangSC-Medium, PingFang SC;\r\n font-weight: 500;\r\n text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);\r\n }\r\n\r\n .image_22 {\r\n position: relative;\r\n top: 50px;\r\n // display: block;\r\n // margin: 0 auto;\r\n // padding-top: 50px;\r\n }\r\n\r\n .box_9 {\r\n position: absolute;\r\n right: 164px;\r\n top: 245px;\r\n padding: 72px 56px 40px;\r\n width: 472px;\r\n height: 572px;\r\n text-align: center;\r\n background: url('../../assets/登录框.png') no-repeat center center;\r\n\r\n .codeImg {\r\n img {\r\n display: block;\r\n float: right;\r\n position: relative;\r\n top: -60px;\r\n right: 3px;\r\n }\r\n }\r\n\r\n .text_1 {\r\n color: rgba(255, 255, 255, 1);\r\n font-size: 32px;\r\n font-family: PingFangSC-Medium, PingFang SC;\r\n font-weight: 500;\r\n }\r\n\r\n .text-wrapper_1 {\r\n position: relative;\r\n top: 110px;\r\n bottom: 0;\r\n width: 100%;\r\n height: 48px;\r\n border: 0;\r\n background-color: #254DD3;\r\n cursor: pointer;\r\n font-size: 24px;\r\n font-family: PingFangSC-Medium, PingFang SC;\r\n font-weight: 500;\r\n color: #FFFFFF;\r\n }\r\n\r\n .text-wrapper_1:hover {\r\n background-color: #0156FD;\r\n }\r\n\r\n .text-wrapper_1:active {\r\n background-color: #194DA4;\r\n }\r\n\r\n ::v-deep .el-icon-loading {\r\n position: relative;\r\n top: 0px;\r\n }\r\n }\r\n}\r\n\r\n::v-deep .el-input__inner {\r\n font-size: 18px;\r\n background-color: transparent !important;\r\n border-radius: 0;\r\n border-top: 0;\r\n border-left: 0;\r\n border-right: 0;\r\n border-bottom: 1px solid #528CD7 !important;\r\n color: #fff;\r\n padding-left: 40px;\r\n // margin-bottom: 20px;\r\n}\r\n\r\n::v-deep .el-input__inner:-webkit-autofill {\r\n -webkit-text-fill-color: #fff !important;\r\n font-size: 18px;\r\n transition: background-color 5000s ease-in-out 0s;\r\n caret-color: #fff !important;\r\n}\r\n\r\n::v-deep .el-form-item__error {\r\n // position: relative;\r\n // top: -20px;\r\n // left: -130px;\r\n}</style>\r\n"]}]}