{"remainingRequest":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\reform-fvue\\src\\views\\YKZAuth.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\YKZAuth.vue","mtime":1687234541085},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\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//\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//\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport { Loading } from 'element-ui';\nexport default {\n name: 'jumping',\n data: function data() {\n var checkAccount = function checkAccount(rule, value, callback) {\n if (!value) {\n return callback(new Error('请输入账号'));\n }\n\n if (/^[a-zA-Z0-9_-]{2,20}$/.test(value)) {\n return callback();\n } else {\n return callback(new Error('账号格式不符合规范'));\n }\n };\n\n return {\n loading: null,\n loginLoading: false,\n login: {\n account: '',\n password: '' // remberPwd: 0,\n\n },\n rules: {\n account: [{\n validator: checkAccount,\n trigger: 'blur'\n }, {\n required: true,\n message: '请输入账号',\n trigger: 'blur'\n }],\n password: [{\n required: true,\n message: '请输入密码',\n trigger: 'blur'\n }]\n }\n };\n },\n mounted: function mounted() {\n if (this.$route.query.auth_code) {\n this.openFullScreen();\n }\n },\n watch: {\n $route: {\n handler: function handler(to, from) {\n if (this.$route.query.msg || this.$route.query.binding) {\n this.showMsg();\n }\n },\n deep: true,\n // 深度监听\n immediate: true // 第一次初始化渲染就可以监听到\n\n }\n },\n methods: {\n showMsg: function showMsg() {\n if (this.loading) this.loading.close();\n },\n inputGetFocus: function inputGetFocus() {\n this.responseError = '';\n },\n openFullScreen: function openFullScreen() {\n this.loading = Loading.service({\n lock: true,\n text: '改革报表加载中......',\n spinner: 'el-icon-loading',\n background: this.$route.query.type ? 'rgba(0, 0, 0, 0.1)' : 'rgba(0, 0, 0, 0.6)'\n });\n },\n onSubmit: function onSubmit(values) {\n this.handleLogin();\n },\n submitForm: function submitForm() {\n var _this = this;\n\n this.$refs.login.validate(function (valid) {\n if (valid) {\n _this.inputGetFocus();\n\n _this.handleLogin();\n } else {\n return false;\n }\n });\n },\n handleLogin: function handleLogin() {\n var _this2 = this;\n\n this.loginLoading = true;\n\n if (!this.$route.params || !this.$route.params.account || !this.$route.params.openid) {\n this.$message.warning('愉快政验证已失效,请重新验证!');\n return;\n }\n\n var data = {\n loginData: this.login,\n ykzData: {\n ykzAccount: this.$route.params.account,\n ykzAccountId: this.$route.params.openid\n }\n };\n this.$store.dispatch('login/bindingYKZ', data).then(function (user) {\n console.log(user);\n\n if (user.loginStatus && user.loginStatus == true) {\n //获取前台页面\n _this2.$store.dispatch('login/getAllDict');\n\n if (_this2.$route.query.type) {\n _this2.$router.push({\n path: \"/MajorProjectsMobile\"\n });\n } else {\n //获取前台所有菜单\n _this2.$store.dispatch('menu/actionFrontMenus').then(function (res) {\n var dataArr = res && res.filter(function (item) {\n return item.alias === 'bigScreen';\n }); // 如果用户有大屏菜单进去大屏页面\n\n if (dataArr && dataArr.length !== 0) {\n if (dataArr[0].children.length !== 0) {\n _this2.$router.push({\n path: \"/\".concat(dataArr[0].children[0].alias)\n });\n }\n } else {\n // 如果用户没有大屏菜单 则根据第一角色查菜单\n _this2.getRoleMenus();\n\n return;\n var dataMenus = res && res.filter(function (item) {\n return item.alias === 'normal';\n });\n\n if (dataMenus && dataMenus.length !== 0) {\n if (dataMenus[0].children.length !== 0) {\n _this2.$router.push({\n path: \"/platLayout/\".concat(dataMenus[0].children[0].children[0].alias)\n });\n } else {\n _this2.$router.push({\n path: \"/platLayout/\".concat(dataMenus[0].children[0].alias)\n });\n }\n }\n }\n\n _this2.loginLoading = false;\n });\n }\n } else if (user.loginStatus == false) {\n console.log(user);\n var msg = user.message ? user.message : '登录失败,请重新验证!';\n\n _this2.$message.warning(msg);\n }\n }).catch(function (msg) {\n console.log(msg);\n\n _this2.$message.warning(msg);\n\n _this2.loginLoading = false;\n });\n }\n },\n getRoleMenus: function getRoleMenus() {\n var _this3 = this;\n\n var UserDetail = JSON.parse(sessionStorage.getItem('currentUserDetail'));\n var defaultRoleCode = UserDetail.roleList[0].roleCode;\n sessionStorage.setItem('currentRoleCode', defaultRoleCode);\n this.$store.dispatch('menu/actionsRoleMenu', defaultRoleCode).then(function (res) {\n var dataMenus = res && res.filter(function (item) {\n return item.alias === 'normal';\n });\n\n if (dataMenus && dataMenus.length !== 0) {\n if (dataMenus[0].children.length !== 0 && dataMenus[0].children[0].children.length) {\n _this3.$router.push({\n path: \"/platLayout/\".concat(dataMenus[0].children[0].children[0].alias)\n });\n } else {\n _this3.$router.push({\n path: \"/platLayout/\".concat(dataMenus[0].children[0].alias)\n });\n }\n }\n });\n },\n beforeDestroy: function beforeDestroy() {\n if (this.loading) this.loading.close();\n }\n};",null]}