智慧农业后台管理页面
guanqb
2022-09-01 332cb84f4e7dad39dc4d7e8a2d2a0717dcf72588
src/page/index/top/index.vue
@@ -105,6 +105,7 @@
                        @click.native="switchDept"
                    >{{$t('navbar.switchDept')}}</el-dropdown-item>
                    <el-dropdown-item @click.native="logout" divided>{{$t('navbar.logOut')}}</el-dropdown-item>
                    <el-dropdown-item @click.native="returnChoose">{{$t('navbar.returnChoose')}}</el-dropdown-item>
                </el-dropdown-menu>
            </el-dropdown>
            <el-dialog title="用户信息选择" append-to-body :visible.sync="userBox" width="350px">
@@ -250,16 +251,21 @@
            done()
        },
        logout () {
            this.$confirm(this.$t("logoutTip"), this.$t("tip"), {
                confirmButtonText: this.$t("submitText"),
                cancelButtonText: this.$t("cancelText"),
                type: "warning"
            }).then(() => {
                this.$store.dispatch("LogOut").then(() => {
                    resetRouter()
                    this.$router.push({ path: "/login" })
                })
            })
            // this.$confirm(this.$t("logoutTip"), this.$t("tip"), {
            //     confirmButtonText: this.$t("submitText"),
            //     cancelButtonText: this.$t("cancelText"),
            //     type: "warning"
            // }).then(() => {
            //     this.$store.dispatch("LogOut").then(() => {
            //         resetRouter()
            //         this.$router.push({ path: "/login" })
            //     })
            // })
            window.location.href = 'http://dev.jxpskj.com:8020/ncny/login.html'
        },
        returnChoose () {
            window.location.href = 'http://dev.jxpskj.com:8020/ncny/systemwall2/index.html'
        }
    }
};