保安服务企业管理项目备份
guoshilong
2023-12-29 69370e2873a525c53e8d1d8655c3172624aa8733
智能分析跳转逻辑修改
1 files modified
18 ■■■■ changed files
src/page/login/userlogin.vue 18 ●●●● patch | view | raw | blame | history
src/page/login/userlogin.vue
@@ -37,7 +37,8 @@
        </el-form-item>
        <el-form-item>
            <el-button type="primary" size="small" @click.native.prevent="handleLogin" class="login-submit">{{
                $t("login.submit") }}
          $t("login.submit")
        }}
            </el-button>
        </el-form-item>
    </el-form>
@@ -90,7 +91,8 @@
        this.getTenant()
        this.refreshCode()
    },
    mounted () { },
  mounted() {
  },
    computed: {
        ...mapGetters(["tagWel", "userInfo"]),
    },
@@ -119,15 +121,21 @@
                    this.$store
                        .dispatch("LoginByUsername", this.loginForm)
                        .then(() => {
              console.log("userInfo",this.userInfo)
              this.$store.dispatch("GetMenu", [this.userInfo, ""]).then((data) => {
                //登录跳转首页改完跳转保安单位情况智能分析
                let path = this.tagWel.value
                            console.log(this.userInfo)
                            // let path = this.tagWel.value登录跳转首页改完跳转保安单位情况智能分析
                            let path = '/securityAnalysis'
                let menu = data.filter(e => e.path == "/securityAnalysis/index")
                if (menu.length > 0) {
                  path = '/securityAnalysis'
                }
                            if (this.userInfo.role_name.indexOf("考勤管理员") > -1) {
                                path = "check/record"
                            }
                            this.$router.push({ path: path })
                            loading.close()
              });
                        })
                        .catch(() => {
                            loading.close()