| | |
| | | created() { |
| | | this.getTenant(); |
| | | //这里是浏览器的一个bug,突然出现的目前找不到原因,新的浏览器打开此项目。localStorage会少存储一个名为saber-permission的数据,少了这条数据租户管理界面会缺少几个按钮和样式 |
| | | //还有一种情况,当我们手动删除这条数据或者清空localStorage后,再刷新进入页面它也不存储这个变量,所以我就在这写死了存储,目前效果没有问题 |
| | | localStorage.setItem("saber-permission", JSON.stringify({ |
| | | "dataType": "object", "content": { |
| | | "flow_model_create": true, |
| | |
| | | })) |
| | | }, |
| | | mounted() { |
| | | //在mounted获取首页下拉菜单数据 |
| | | this.$axios.get('/api/ubcs-system/tenant/tenant-map').then(res => { |
| | | if (res.data.code == 200) { |
| | | this.loginForm.tenantId = res.data.data[0].TENANT_ID; |
| | |
| | | props: [], |
| | | methods: { |
| | | ChandleLogin() { |
| | | this.$store.dispatch("LoginBySso").then((res) => { |
| | | console.log('res', res) |
| | | this.$router.push({path: this.tagWel.value}); |
| | | }) |
| | | // this.$store.dispatch("LoginBySso").then((res) => { |
| | | // console.log('res', res) |
| | | // this.$router.push({path: this.tagWel.value}); |
| | | // }) |
| | | this.$router.push({path:'/sso'}); |
| | | }, |
| | | closehandle() { |
| | | removeToken() |
| | |
| | | |
| | | }, |
| | | handleLogin: function () { |
| | | debugger |
| | | this.userInfo = this.$store.state.upadatastatus |
| | | localStorage.setItem('username', this.loginForm.username) |
| | | this.$refs.loginForm.validate(valid => { |