Merge branch 'master' of http://42.193.1.25:9521/r/dream_web
| | |
| | | } |
| | | }, |
| | | 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 }) |
| | | } |
| | |
| | | module.exports = { |
| | | |
| | | title: 'Vue Admin Template', |
| | | title: '叮当微教务', |
| | | |
| | | /** |
| | | * @type {boolean} true | false |
| | |
| | | |
| | | <script> |
| | | import { mapGetters } from "vuex"; |
| | | import { login } from "@/api/user"; |
| | | import Chart from "./components/chart.vue"; |
| | | |
| | | export default { |
| | |
| | | <script> |
| | | import { getData, getRenew, getExpire, getDeleted, handleExport } from "@/api/student"; |
| | | import StudentCreate from "./components/create.vue"; |
| | | import { login } from "@/api/user"; |
| | | |
| | | export default { |
| | | filters: { |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | this.fetchData(); |
| | | // 获取地址栏code |
| | | let code = this.$route.query.code; |
| | | if (code) { |
| | | if (localStorage.getItem("code")) { |
| | | if (code !== localStorage.getItem("code")) { |
| | | this.getUserDate(code); |
| | | } |
| | | } else { |
| | | this.getUserDate(code); |
| | | } |
| | | } else { |
| | | if (!localStorage.getItem("user")) { |
| | | this.$router.push("/login"); |
| | | } |
| | | } |
| | | if (localStorage.getItem("user")) { |
| | | this.fetchData(); |
| | | } |
| | | }, |
| | | methods: { |
| | | getUserDate(code) { |
| | | let that = this; |
| | | login({ |
| | | code: code, |
| | | }).then((res) => { |
| | | localStorage.setItem("user", JSON.stringify(res)); |
| | | localStorage.setItem("code", code); |
| | | that.fetchData(); |
| | | }); |
| | | }, |
| | | handleExport() { |
| | | this.download('exportPlayer', { |
| | | this.download('exportPlayer?orgId=' + JSON.parse(localStorage.getItem("user")).staffs[0].org.id, { |
| | | }, `导出_${new Date().getTime()}.xlsx`) |
| | | }, |
| | | handleExport2() { |