Commit 5480b3e6 by caoyanzhi

Merge branch 'feature/4月-菜单和权限'

parents a4c4f142 abc2edaf
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
<div class="hb-layout-pager" :style="{ height: activedMenu.length > 3 ? `calc(100% - 30px)` : '100%', 'padding-bottom': pagePaddingBottom }"> <div class="hb-layout-pager" :style="{ height: activedMenu.length > 3 ? `calc(100% - 30px)` : '100%', 'padding-bottom': pagePaddingBottom }">
<!-- 页面内容 --> <!-- 页面内容 -->
<!-- <router-view v-if="activeBrand" :brandId="activeBrand" :activeGroupId="activeGroup" :tabType="activeTab" @showTab="showTab"></router-view> --> <!-- <router-view v-if="activeBrand" :brandId="activeBrand" :activeGroupId="activeGroup" :tabType="activeTab" @showTab="showTab"></router-view> -->
<keep-alive v-if="$route.meta.keepAlive"> <keep-alive>
<router-view :brand-id="enterpriseId"></router-view> <router-view :brand-id="enterpriseId" v-if="$route.meta.keepAlive"></router-view>
</keep-alive> </keep-alive>
<router-view v-else :brand-id="enterpriseId"></router-view> <router-view v-if="!$route.meta.keepAlive" :brand-id="enterpriseId"></router-view>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -75,8 +75,12 @@ router.beforeEach((to, from, next) => { ...@@ -75,8 +75,12 @@ router.beforeEach((to, from, next) => {
} else { } else {
baseUrl = host; baseUrl = host;
} }
const { fromPath = [] } = from.meta || {};
from.meta.keepAlive = fromPath.includes(to.path);
next(); next();
}); });
// 将按钮code挂到vue的原型上,供页面中埋点使用 // 将按钮code挂到vue的原型上,供页面中埋点使用
Vue.prototype.$buttonCode = buttonCode; Vue.prototype.$buttonCode = buttonCode;
......
...@@ -143,7 +143,8 @@ export const constantRouterMap = [ ...@@ -143,7 +143,8 @@ export const constantRouterMap = [
name: '话务任务记录', name: '话务任务记录',
component: _import('salesleads/trafficTask', 'taskRecord'), component: _import('salesleads/trafficTask', 'taskRecord'),
meta: { meta: {
keepAlive: true keepAlive: true,
fromPath: ['/taskDetail']
} }
}, },
...@@ -234,7 +235,11 @@ export const constantRouterMap = [ ...@@ -234,7 +235,11 @@ export const constantRouterMap = [
{ {
path: '/memberGroupSet', path: '/memberGroupSet',
name: '客户分组设置', name: '客户分组设置',
component: _import('apps/customerApp', 'memberGroupSet') component: _import('apps/customerApp', 'memberGroupSet'),
meta: {
keepAlive: true,
fromPath: ['/addGroupTemplate', '/editGroupTemplate', '/storeRangeSet']
}
}, },
{ {
path: '/memberSearchSet', path: '/memberSearchSet',
...@@ -343,16 +348,14 @@ export const constantRouterMap = [ ...@@ -343,16 +348,14 @@ export const constantRouterMap = [
name: '月指标任务', name: '月指标任务',
component: _import('apps/quota', 'monthTask'), component: _import('apps/quota', 'monthTask'),
meta: { meta: {
keepAlive: true keepAlive: true,
fromPath: ['/monthTaskDetail']
} }
}, },
{ {
path: '/monthTaskDetail', path: '/monthTaskDetail',
name: '月指标任务详情', name: '月指标任务详情',
component: _import('apps/quota', 'monthTaskDetail'), component: _import('apps/quota', 'monthTaskDetail')
meta: {
keepAlive: true
}
}, },
// 卡券赠送 // 卡券赠送
{ {
......
...@@ -179,6 +179,11 @@ export default { ...@@ -179,6 +179,11 @@ export default {
const that = this; const that = this;
that.getTableList(); that.getTableList();
this.getTemplateCount(); this.getTemplateCount();
},
activated() {
const that = this;
that.getTableList();
this.getTemplateCount();
} }
}; };
</script> </script>
......
...@@ -297,6 +297,13 @@ export default { ...@@ -297,6 +297,13 @@ export default {
} }
} }
}, },
activated() {
let that = this;
that.activeBrand = that.brandId;
if (!!that.brandId) {
that.getTableList();
}
},
mounted() { mounted() {
let that = this; let that = this;
that.activeBrand = that.brandId; that.activeBrand = that.brandId;
......
...@@ -95,6 +95,7 @@ import { _debounce } from '@/common/js/public'; ...@@ -95,6 +95,7 @@ import { _debounce } from '@/common/js/public';
import showMsg from '@/common/js/showmsg'; import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error'; import errMsg from '@/common/js/error';
export default { export default {
name: 'TaskRecord',
props: { props: {
brandId: { brandId: {
type: String, type: String,
...@@ -425,6 +426,16 @@ export default { ...@@ -425,6 +426,16 @@ export default {
} }
} }
}, },
activated() {
const that = this;
// this.conditionObj.dateRange = that.initDataRange();
that.activeBrand = that.brandId;
if (!!this.brandId) {
that.$nextTick(() => {
that.getTableList();
});
}
},
mounted() { mounted() {
const that = this; const that = this;
// this.conditionObj.dateRange = that.initDataRange(); // this.conditionObj.dateRange = that.initDataRange();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment