From 22a6b89a5328e64daba76920d64e234ac5823f96 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 30 Nov 2021 18:30:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E7=AD=89=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/header/index.vue | 31 ++++--------------------------- src/pages/data/list/index.vue | 2 +- src/pages/index/list/index.vue | 2 +- src/pages/stat/list/index.vue | 25 ++++++++++++++++++------- 4 files changed, 24 insertions(+), 36 deletions(-) diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue index ec7feb0..00c61f1 100644 --- a/src/layouts/header/index.vue +++ b/src/layouts/header/index.vue @@ -55,17 +55,12 @@ import navbar from '../navbar' import { mapState, mapActions } from 'vuex' import Setting from '@/setting' import util from '@/libs/util' -import bus from '@/libs/bus' export default { data() { return { token: util.local.get(Setting.tokenKey), isLogin: this.$route.path == '/login', - isData: this.$route.path == '/data/list', customer: this.$route.query.customer, - rendered: false, - keyword: '', - searchTimer: null, showSetting: true, id: '', schoolName: '', @@ -86,25 +81,6 @@ export default { 'routes' ]) }, - watch: { - keyword: function(val) { - clearTimeout(this.searchTimer) - if (!this.rendered) { - this.searchTimer = setTimeout(() => { - bus.$emit('initData', this.keyword) - }, 500) - } - this.rendered = false - }, - '$route'(to, from) { - let isData = this.$route.path == '/data/list' - if (isData) { - this.rendered = true - this.keyword = '' - } - this.isData = isData - } - }, mounted() { // 如果是客户,则存到store里去,因为客户是没有用户信息的,上面要根据这个值来判断显示与否 if (this.customer) { @@ -146,6 +122,7 @@ export default { this.showSetting = false }, toIndex() { + // 如果是在首页,直接刷新页面,否则,跳转到首页,并且重置进入后台的图标 if (this.$route.path === '/index/list') { location.reload() } else { @@ -166,13 +143,13 @@ export default { let route = this.$router.resolve({ path: this.routes[0].name, query: { - mg: btoa(true), + mg: btoa(true), // 后台的标识 schoolId: btoa(this.schoolId), - customer: btoa(this.isCustomer), + customer: btoa(this.isCustomer), // 客户标识 userName: this.userName } }) - window.open(route.href) + window.open(route.href) // 后台要打开新标签页 } else { // 如果接口返回的后台角色权限为空,则表示没有给该角色开放任何模块权限,直接提示用户未开放 util.warningMsg('该角色未开放模块,请联系管理员') diff --git a/src/pages/data/list/index.vue b/src/pages/data/list/index.vue index a757643..1fff713 100644 --- a/src/pages/data/list/index.vue +++ b/src/pages/data/list/index.vue @@ -77,7 +77,7 @@ :with-header="false" :visible.sync="previewVisible">