| | |
| | | <hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> |
| | | |
| | | <breadcrumb class="breadcrumb-container" /> |
| | | |
| | | <!-- 固定右上角 --> |
| | | <h3 style="position: fixed; top: 0; font-size: 16px; color: #5a5e66; " :style="'right:' + orgCss() ">{{ getOrgName() }}</h3> |
| | | <div class="right-menu"> |
| | | <el-dropdown class="avatar-container" trigger="click"> |
| | | <div class="avatar-wrapper"> |
| | | <img :src="avatar+'?imageView2/1/w/80/h/80'" class="user-avatar"> |
| | | <i class="el-icon-caret-bottom" /> |
| | | {{ '你好,' + getUserName() }} |
| | | <i class="el-icon-caret-bottom"></i> |
| | | </div> |
| | | <el-dropdown-menu slot="dropdown" class="user-dropdown"> |
| | | <router-link to="/"> |
| | | <el-dropdown-item> |
| | | Home |
| | | </el-dropdown-item> |
| | | </router-link> |
| | | <a target="_blank" href="https://github.com/PanJiaChen/vue-admin-template/"> |
| | | <el-dropdown-item>Github</el-dropdown-item> |
| | | </a> |
| | | <a target="_blank" href="https://panjiachen.github.io/vue-element-admin-site/#/"> |
| | | <el-dropdown-item>Docs</el-dropdown-item> |
| | | </a> |
| | | <el-dropdown-item divided @click.native="logout"> |
| | | <span style="display:block;">Log Out</span> |
| | | <el-dropdown-item @click.native="logout"> |
| | | <span style="display:block;">退出登录</span> |
| | | </el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | |
| | | ]) |
| | | }, |
| | | methods: { |
| | | orgCss() { |
| | | return JSON.parse(localStorage.getItem("user")).name.length * 20 + 100 + 'px'; |
| | | }, |
| | | getOrgName() { |
| | | return JSON.parse(localStorage.getItem("user")).staffs[0].org.name; |
| | | }, |
| | | getUserName() { |
| | | return JSON.parse(localStorage.getItem("user")).name; |
| | | }, |
| | | toggleSideBar() { |
| | | this.$store.dispatch('app/toggleSideBar') |
| | | }, |
| | | async logout() { |
| | | await this.$store.dispatch('user/logout') |
| | | this.$router.push(`/login?redirect=${this.$route.fullPath}`) |
| | | // await this.$store.dispatch('user/logout') |
| | | this.$router.push(`/login`) |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | .avatar-container { |
| | | margin-right: 30px; |
| | | margin-right: 50px; |
| | | |
| | | .avatar-wrapper { |
| | | margin-top: 5px; |
| | | position: relative; |
| | | cursor: pointer; |
| | | |
| | | .user-avatar { |
| | | cursor: pointer; |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | title: 'Vue Admin Template', |
| | | logo: 'https://wpimg.wallstcn.com/69a1c46c-eb1c-4b46-8bd4-e9e686ef5251.png' |
| | | title: '叮当微教务', |
| | | logo: 'https://s1.locimg.com/2024/09/11/ba34571897536.png' |
| | | } |
| | | } |
| | | } |
| | |
| | | & .sidebar-title { |
| | | display: inline-block; |
| | | margin: 0; |
| | | color: #fff; |
| | | color: #FFF; |
| | | font-weight: 600; |
| | | line-height: 50px; |
| | | font-size: 14px; |
| | |
| | | <template> |
| | | <div :class="{'has-logo':showLogo}"> |
| | | <div :class="{'has-logo':showLogo}" style="border-right: 1px solid #DDE0E2;"> |
| | | <logo v-if="showLogo" :collapse="isCollapse" /> |
| | | <el-scrollbar wrap-class="scrollbar-wrapper"> |
| | | <el-menu |
| | |
| | | return path |
| | | }, |
| | | showLogo() { |
| | | return this.$store.state.settings.sidebarLogo |
| | | return true; |
| | | }, |
| | | variables() { |
| | | return variables |
| | |
| | | <script> |
| | | import { Navbar, Sidebar, AppMain } from './components' |
| | | import ResizeMixin from './mixin/ResizeHandler' |
| | | import { login } from "@/api/user"; |
| | | |
| | | export default { |
| | | name: 'Layout', |
| | |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | // 获取地址栏code |
| | | let code = this.$route.query.code; |
| | | if (code) { |
| | | this.getUserDate(code); |
| | | } |
| | | // else { |
| | | // this.$router.push("/login"); |
| | | // } |
| | | }, |
| | | methods: { |
| | | getUserDate(code) { |
| | | login({ |
| | | code: code, |
| | | }).then((res) => { |
| | | localStorage.setItem("user", JSON.stringify(res)); |
| | | }); |
| | | }, |
| | | handleClickOutside() { |
| | | this.$store.dispatch('app/closeSideBar', { withoutAnimation: false }) |
| | | } |
| | |
| | | hidden: true, |
| | | }, |
| | | |
| | | { |
| | | path: "/", |
| | | component: Layout, |
| | | redirect: "/home", |
| | | children: [ |
| | | { |
| | | path: "home", |
| | | name: "home", |
| | | component: () => import("@/views/home/index"), |
| | | meta: { title: "首页", icon: "dashboard" }, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: "/", |
| | | component: Layout, |
| | | redirect: "/curriculum", |
| | | children: [ |
| | | { |
| | | path: "/curriculum", |
| | | name: "Curriculum", |
| | | component: () => import("@/views/curriculum/index"), |
| | | meta: { title: "课表", icon: "table" }, |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // path: "/", |
| | | // component: Layout, |
| | | // redirect: "/home", |
| | | // children: [ |
| | | // { |
| | | // path: "home", |
| | | // name: "home", |
| | | // component: () => import("@/views/home/index"), |
| | | // meta: { title: "首页", icon: "dashboard" }, |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // { |
| | | // path: "/", |
| | | // component: Layout, |
| | | // redirect: "/curriculum", |
| | | // children: [ |
| | | // { |
| | | // path: "/curriculum", |
| | | // name: "Curriculum", |
| | | // component: () => import("@/views/curriculum/index"), |
| | | // meta: { title: "课表", icon: "table" }, |
| | | // }, |
| | | // ], |
| | | // }, |
| | | { |
| | | path: "/", |
| | | component: Layout, |
| | |
| | | path: "/student", |
| | | name: "Student", |
| | | component: () => import("@/views/student/index"), |
| | | meta: { title: "学员", icon: "table" }, |
| | | meta: { title: "学员列表", icon: "table" }, |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | path: "/class", |
| | | name: "Class", |
| | | component: () => import("@/views/class/index"), |
| | | meta: { title: "班级", icon: "table" }, |
| | | meta: { title: "班级列表", icon: "table" }, |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | // sidebar |
| | | $menuText:#323232; |
| | | $menuText:rgb(191, 203, 217); |
| | | $menuActiveText:#409EFF; |
| | | $subMenuActiveText:#409EFF; //https://github.com/ElemeFE/element/issues/12951 |
| | | |
| | | $menuBg:rgb(119, 183, 228); |
| | | $menuBg:#304156; |
| | | $menuHover:#c3e8ff; |
| | | |
| | | $subMenuBg:#c3ebff; |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | // 获取地址栏code |
| | | let code = this.$route.query.code; |
| | | if (code) { |
| | | this.getUserDate(code); |
| | | } else { |
| | | this.$router.push("/login"); |
| | | } |
| | | }, |
| | | methods: { |
| | | getUserDate(code) { |
| | | login({ |
| | | code: code, |
| | | }).then((res) => { |
| | | localStorage.setItem("user", JSON.stringify(res)); |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | }; |
| | | return { |
| | | appid: "wx7103925df6236723", |
| | | redirect_uri: encodeURIComponent("https://dingdang.9village.cn"), |
| | | redirect_uri: encodeURIComponent("https://dingdang.9village.cn/#/student"), |
| | | state: "1", |
| | | href: "data:text/css;base64,LmltcG93ZXJCb3ggLnFyY29kZSB7CiAgICAgICAgICBib3JkZXI6IG5vbmU7CiAgICAgICAgICB3aWR0aDogMTQwcHg7CiAgICAgICAgICBoZWlnaHQ6IDE0MHB4OwogICAgICAgIH0=", // 自定义样式链接 |
| | | loginForm: { |
| | |
| | | |
| | | /* reset element-ui css */ |
| | | .login-container { |
| | | // background-image: url('https://s1.locimg.com/2024/09/12/891ab39f72938.png'); |
| | | // background-size: contain; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | |
| | | <!-- <el-button type="primary" size="small" @click="showCreate">新建学员</el-button> --> |
| | | <el-button type="primary" size="small" @click="handleExport">导出学员</el-button> |
| | | <div style="width: 500px"> |
| | | <el-date-picker v-model="dateRange" type="daterange" range-separator="至" start-placeholder="开始日期" |
| | | <!-- <el-date-picker v-model="dateRange" type="daterange" range-separator="至" start-placeholder="开始日期" |
| | | end-placeholder="结束日期" value-format="yyyy-MM-dd" style="margin-right: 10px"> |
| | | </el-date-picker> |
| | | <el-button type="primary" @click="handleExport2">导出课包</el-button> |
| | | <el-button type="primary" @click="handleExport2">导出课包</el-button> --> |
| | | </div> |
| | | <div style="width: 300px"> |
| | | <el-input |
| | |
| | | this.list = response.data.findPlayerByStaff.ls; |
| | | this.total = response.data.findPlayerByStaff.pageOut.total; |
| | | this.listLoading = false; |
| | | }); |
| | | }) |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.data.pageIn.size = val; |