| | |
| | | ENV = 'development' |
| | | |
| | | # base api |
| | | VUE_APP_BASE_API = 'https://www.9village.cn/dream_test' |
| | | VUE_APP_BASE_API = '/dream_test' |
| | |
| | | ## dream_web |
| | | ## dream_test_web |
| | | |
| | | 叮当微教务后台 |
| | | |
| | |
| | | <template> |
| | | <div class="navbar"> |
| | | <hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> |
| | | <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> |
| | | <!-- <h3 style="position: fixed; top: 0; font-size: 16px; color: #5a5e66; " :style="'right:' + orgCss() ">{{ getOrgName() }}</h3> --> |
| | | |
| | | <div class="right-menu"> |
| | | <el-dropdown trigger="click" ref="eldrop" style="margin-right:20px"> |
| | | <div class="avatar-wrapper" style="font-size:20px"> |
| | | {{ selectStaff.org.name }} |
| | | <i class="el-icon-caret-bottom"></i> |
| | | </div> |
| | | <el-dropdown-menu slot="dropdown" align="center"> |
| | | <el-dropdown-item |
| | | v-for="item in staffs" |
| | | @click.native="changeStaff(item)" |
| | | :key="item.id" |
| | | > |
| | | {{ item.org.name }} |
| | | </el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | <el-dropdown class="avatar-container" trigger="click"> |
| | | <div class="avatar-wrapper"> |
| | | {{ '你好,' + getUserName() }} |
| | | {{ '您好,' + getUserName() }} |
| | | <i class="el-icon-caret-bottom"></i> |
| | | </div> |
| | | <el-dropdown-menu slot="dropdown" class="user-dropdown"> |
| | | <el-dropdown-item @click.native="logout"> |
| | | <span style="display:block;">退出登录</span> |
| | | <span style="display: block">退出登录</span> |
| | | </el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | |
| | | import Hamburger from '@/components/Hamburger' |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | selectStaff: JSON.parse(localStorage.getItem("selectStaff")), |
| | | staffs: JSON.parse(localStorage.getItem("staffs")) |
| | | } |
| | | }, |
| | | components: { |
| | | Breadcrumb, |
| | | Hamburger |
| | |
| | | ]) |
| | | }, |
| | | methods: { |
| | | changeStaff(item) { |
| | | this.selectStaff = item |
| | | localStorage.setItem("selectStaff", JSON.stringify(item)) |
| | | this.$router.go(0) |
| | | }, |
| | | orgCss() { |
| | | return JSON.parse(localStorage.getItem("user")).name.length * 20 + 100 + 'px'; |
| | | }, |
| | |
| | | overflow: hidden; |
| | | position: relative; |
| | | background: #fff; |
| | | box-shadow: 0 1px 4px rgba(0,21,41,.08); |
| | | box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08); |
| | | |
| | | .hamburger-container { |
| | | line-height: 46px; |
| | | height: 100%; |
| | | float: left; |
| | | cursor: pointer; |
| | | transition: background .3s; |
| | | transition: background 0.3s; |
| | | -webkit-tap-highlight-color:transparent; |
| | | |
| | | &:hover { |
| | | background: rgba(0, 0, 0, .025) |
| | | background: rgba(0, 0, 0, 0.025); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | &.hover-effect { |
| | | cursor: pointer; |
| | | transition: background .3s; |
| | | transition: background 0.3s; |
| | | |
| | | &:hover { |
| | | background: rgba(0, 0, 0, .025) |
| | | background: rgba(0, 0, 0, 0.025); |
| | | } |
| | | } |
| | | } |
| | |
| | | :collapse-transition="false" |
| | | mode="vertical" |
| | | > |
| | | <sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path" /> |
| | | <sidebar-item v-for="(route,index) in routes" :key="index" :item="route" :base-path="route.path" /> |
| | | </el-menu> |
| | | </el-scrollbar> |
| | | </div> |
| | |
| | | |
| | | // export default apolloClient; |
| | | // 定义不同请求地址 |
| | | const EFORMURI = "https://www.9village.cn/dream_test/graphql"; |
| | | const IOTURI = "https://www.9village.cn/dream_test" + "/graphql"; |
| | | const EFORMURI = "/dream_test/graphql"; |
| | | const IOTURI = "/dream_test/graphql"; |
| | | // import ApolloClient from 'apollo-boost' //引入apollo-boost插件 |
| | | import { ApolloClient } from "apollo-client"; |
| | | import { createHttpLink } from "apollo-link-http"; |
| | |
| | | headers: { |
| | | Authorization: JSON.parse(localStorage.getItem("user")).jwtToken, |
| | | // Authorization:'eyJhbGciOiJIUzI1NiJ9.eyJleHBUaW1lIjoiMjAyNC8wNy8zMSAxODoxMSIsInVzZXJJZCI6NDQsImp0aSI6ImVlMDM3NmFjLWQ5OTAtNDRkZS05YTVmLTUxYjhjMjc0YWNiOSIsImlhdCI6MTcyMjQxMzUwMSwic3ViIjoieWNsIiwiZXhwIjoxNzIyNDIwNzAxfQ.bSd0qag44dwXeJQpvryYJXEtrQ03-8MmHQWhgILGXO4', |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | playerId: |
| | | JSON.parse(localStorage.getItem("user")).players.length > 0 |
| | | ? JSON.parse(localStorage.getItem("user")).players[0].id |
| | |
| | | activeName: "all", |
| | | total: 0, |
| | | data: { |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: "", |
| | | pageIn: { |
| | | //可选,如果是分页查询,需要加上。 |
| | |
| | | this.listLoading = true; |
| | | let data = { |
| | | itemType: "TEAM", |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: this.data.keyword, |
| | | pageIn: { ...this.data.pageIn }, |
| | | }; |
| | |
| | | activeName: "comment", |
| | | total: 0, |
| | | data: { |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: "", |
| | | pageIn: { |
| | | //可选,如果是分页查询,需要加上。 |
| | |
| | | this.listLoading = true; |
| | | let data = { |
| | | commentTypes: ["DIRECT_COMMENT"], |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: this.data.keyword, |
| | | pageIn: { ...this.data.pageIn }, |
| | | }; |
| | |
| | | methods: { |
| | | getCourses() { |
| | | let data = { |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | day: this.getYMD(this.time), |
| | | }; |
| | | getBySessionExistsOfDay(data).then((res) => { |
| | |
| | | courseIds.push(i.id); |
| | | }); |
| | | let params = { |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | beginDate: this.getYMD(this.time), |
| | | endDate: this.getYMD(this.time), |
| | | courseIds: courseIds, |
| | |
| | | activeName: "all", |
| | | total: 0, |
| | | data: { |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: "", |
| | | pageIn: { |
| | | //可选,如果是分页查询,需要加上。 |
| | |
| | | } else if (this.activeName == "other") { |
| | | this.listLoading = true; |
| | | let data = { |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: this.data.keyword, |
| | | pageIn: { ...this.data.pageIn }, |
| | | }; |
| | |
| | | activeName: "student", |
| | | total: 0, |
| | | data: { |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: "", |
| | | pageIn: { |
| | | //可选,如果是分页查询,需要加上。 |
| | |
| | | this.listLoading = true; |
| | | let data = { |
| | | types: ["NORMAL"], |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: this.data.keyword, |
| | | pageIn: { ...this.data.pageIn }, |
| | | }; |
| | |
| | | code: code, |
| | | }).then((res) => { |
| | | localStorage.setItem("user", JSON.stringify(res)); |
| | | localStorage.setItem("staffs", JSON.stringify(res.staffs)); |
| | | localStorage.setItem("selectStaff", JSON.stringify(res.staffs[0])); |
| | | this.$router.push("/student"); |
| | | }); |
| | | }, |
| | |
| | | activeName: "student", |
| | | total: 0, |
| | | data: { |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: "", |
| | | pageIn: { |
| | | //可选,如果是分页查询,需要加上。 |
| | |
| | | this.listLoading = true; |
| | | let data = { |
| | | types: ["NORMAL"], |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: this.data.keyword, |
| | | pageIn: { ...this.data.pageIn }, |
| | | }; |
| | |
| | | this.listLoading = true; |
| | | let data = { |
| | | completeTypes: ["ROLL_CALL"], |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: this.data.keyword, |
| | | pageIn: { ...this.data.pageIn }, |
| | | }; |
| | |
| | | v-if="activeName == 'deactivated'" |
| | | > |
| | | <template slot-scope=""> |
| | | <el-link type="primary" :underline="false">恢复</el-link> |
| | | <el-link type="primary" :underline="false" |
| | | >恢复</el-link |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | activeName: "all", |
| | | total: 0, |
| | | data: { |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: "", |
| | | pageIn: { |
| | | //可选,如果是分页查询,需要加上。 |
| | |
| | | this.fetchData("pageIn"); |
| | | }, |
| | | fetchData(_val) { |
| | | |
| | | this.data.staffId = JSON.parse(localStorage.getItem("selectStaff")).id |
| | | if (_val !== "pageIn") { |
| | | this.data.pageIn.index = 0; |
| | | this.data.pageIn.size = 10; |
| | |
| | | this.listLoading = true; |
| | | let data = { |
| | | itemType: "COURSE", |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: this.data.keyword, |
| | | pageIn: { ...this.data.pageIn }, |
| | | }; |
| | |
| | | id: "", |
| | | name: "", |
| | | }, |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | visibility: true, |
| | | voucherId: "", //课包/会员卡 |
| | | }, |
| | |
| | | }, |
| | | getSaleManList() { |
| | | let data = { |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: "", |
| | | pageIn: { |
| | | index: 0, |
| | |
| | | }, |
| | | getSaleManList() { |
| | | let data = { |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: "", |
| | | pageIn: { |
| | | index: 0, |
| | |
| | | </el-tabs> |
| | | <div style="display: flex; justify-content: space-between"> |
| | | <!-- <el-button type="primary" size="small" @click="showCreate">新建学员</el-button> --> |
| | | <el-button type="primary" size="small" @click="handleExport">导出学员</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="开始日期" |
| | | end-placeholder="结束日期" value-format="yyyy-MM-dd" style="margin-right: 10px"> |
| | |
| | | v-if="activeName !== 'deactivated'" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.gender == "FEMALE" ? "女" : "男" }} |
| | | {{ scope.row.gender == 'FEMALE' ? '女' : '男' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | v-if="activeName !== 'deactivated'" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.mobile ? scope.row.mobile : "--" }} |
| | | {{ scope.row.mobile ? scope.row.mobile : '--' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | v-if="activeName !== 'deactivated'" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.user ? "是" : "否" }} |
| | | {{ scope.row.user ? '是' : '否' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | v-if="activeName == 'deactivated'" |
| | | > |
| | | <template slot-scope=""> |
| | | <el-link type="primary" :underline="false">删除</el-link> |
| | | <el-link type="primary" :underline="false" |
| | | >删除</el-link |
| | | > |
| | | |
| | | <el-link type="primary" :underline="false">恢复</el-link> |
| | | <el-link type="primary" :underline="false" |
| | | >恢复</el-link |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | activeName: "all", |
| | | total: 0, |
| | | data: { |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: "", |
| | | pageIn: { |
| | | //可选,如果是分页查询,需要加上。 |
| | |
| | | this.handleClick(); |
| | | }, |
| | | handleClick(tab, event) { |
| | | this.data.staffId = JSON.parse(localStorage.getItem("selectStaff")).id |
| | | if (this.activeName == "pendingFees") { |
| | | this.listLoading = true; |
| | | getRenew(this.data).then((response) => { |
| | |
| | | this.listLoading = true; |
| | | let data = { |
| | | itemType: "PLAYER", |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: this.data.keyword, |
| | | pageIn: { ...this.data.pageIn }, |
| | | }; |
| | |
| | | activeName: "work", |
| | | total: 0, |
| | | data: { |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: "", |
| | | pageIn: { |
| | | //可选,如果是分页查询,需要加上。 |
| | |
| | | this.listLoading = true; |
| | | let data = { |
| | | commentTypes: ["PLAYER_REPLY"], |
| | | staffId: JSON.parse(localStorage.getItem("user")).staffs[0].id, |
| | | staffId: JSON.parse(localStorage.getItem("selectStaff")).id, |
| | | keyword: this.data.keyword, |
| | | pageIn: { ...this.data.pageIn }, |
| | | }; |
| | |
| | | proxy: { |
| | | [process.env.VUE_APP_BASE_API]: { |
| | | // 匹配所有以 '/dev-api'开头的请求路径 |
| | | target: "http://192.168.3.87:18081/dream", //类似于Nginx反向代理 |
| | | target: "http://localhost:18081/dream_test", //类似于Nginx反向代理 |
| | | changeOrigin: true, // 支持跨域 |
| | | pathRewrite: { |
| | | // 重写路径: 去掉路径中开头的'/dev-api' |