Commit fabe6e7d by 冒粤蓉

fix

1 parent de20b472
...@@ -41,10 +41,36 @@ export default { ...@@ -41,10 +41,36 @@ export default {
if(to.meta.keepAlives) { if(to.meta.keepAlives) {
this.keepAlives.push(to.name); this.keepAlives.push(to.name);
} }
if(this.isQiankun) {
this.getBreadcrumb();
}
} }
}, },
methods: { methods: {
...mapMutations(['updateBaseURL']), ...mapMutations(['updateBaseURL']),
getBreadcrumb() {
let matched = this.$route.matched.filter(item => item.name); // this.$route.matched 可以获取到一个数组,包含当前路由的所有嵌套路径片段的路由记录
const first = matched[0];
const { meta, path } = first;
const basePath = '/trialRun#';
let breadcrumb = [];
if(meta) {
const { title, parentTitle, parentPath } = meta;
if(parentTitle) {
breadcrumb.push({
name: parentTitle,
path: basePath + parentPath
})
}
if(title) {
breadcrumb.push({
name: title,
path: basePath + path
})
}
this.$root.parentVuex.dispatch('menu/setBreadCrumb', breadcrumb);
}
},
goToPage(path) { goToPage(path) {
this.$root.parentRouter.push(path); this.$root.parentRouter.push(path);
} }
......
...@@ -221,7 +221,7 @@ export default{ ...@@ -221,7 +221,7 @@ export default{
this.getCurrentPosition().then((pos)=>{ this.getCurrentPosition().then((pos)=>{
this.lng = pos.lng; this.lng = pos.lng;
this.lat = pos.lat; this.lat = pos.lat;
this.radius = 1000; this.radius = 150;
this.drawFenceCircle(pos) this.drawFenceCircle(pos)
this.$emit('onUpdateMapData',{ this.$emit('onUpdateMapData',{
......
...@@ -39,27 +39,6 @@ function render({ data = {} , container } = {}) { ...@@ -39,27 +39,6 @@ function render({ data = {} , container } = {}) {
}, },
render: h => h(App), render: h => h(App),
}).$mount(container ? container.querySelector('#glsx-sub-system') : '#glsx-sub-system'); }).$mount(container ? container.querySelector('#glsx-sub-system') : '#glsx-sub-system');
router.beforeEach((to, from, next)=>{
const metaTitle = to.meta.title;
const thisBreadCrumb = data.store.getters.curBreadCrumb;
if(metaTitle) {
if(thisBreadCrumb) {
let nextChildren = {};
nextChildren = {
active: true,
menuName: metaTitle,
path: '/trialRun#' + to.path,
params: to.params
};
thisBreadCrumb.children.children = nextChildren;
}
} else {
thisBreadCrumb.children.children = '';
}
data.store.dispatch('menu/setBreadCrumb', thisBreadCrumb);
next();
})
} }
if (!window.__POWERED_BY_QIANKUN__) { if (!window.__POWERED_BY_QIANKUN__) {
......
...@@ -10,6 +10,7 @@ const routes = [ ...@@ -10,6 +10,7 @@ const routes = [
name: 'specialShop', name: 'specialShop',
component: () => import('../views/specialShop/index.vue'), component: () => import('../views/specialShop/index.vue'),
meta: { meta: {
title: '特约店列表',
keepAlive: true keepAlive: true
} }
}, },
...@@ -18,6 +19,7 @@ const routes = [ ...@@ -18,6 +19,7 @@ const routes = [
name: 'toDo', name: 'toDo',
component: () => import('../views/toDo/index.vue'), component: () => import('../views/toDo/index.vue'),
meta: { meta: {
title: '待办列表',
keepAlive: true keepAlive: true
} }
}, },
...@@ -26,6 +28,7 @@ const routes = [ ...@@ -26,6 +28,7 @@ const routes = [
name: 'vehicleManage', name: 'vehicleManage',
component: () => import('../views/vehicleManage/index.vue'), component: () => import('../views/vehicleManage/index.vue'),
meta: { meta: {
title: '试驾车辆列表',
keepAlive: true keepAlive: true
} }
}, },
...@@ -34,15 +37,18 @@ const routes = [ ...@@ -34,15 +37,18 @@ const routes = [
name: 'vehicleSubmit', name: 'vehicleSubmit',
component: () => import('../views/vehicleSubmit/index.vue'), component: () => import('../views/vehicleSubmit/index.vue'),
meta: { meta: {
title: '上牌资料提交',
keepAlive: true keepAlive: true
} }
}, },
{ {
path: '/vehicleSubmit/addVehicle', path: '/vehicleSubmit/addVehicle',
name: 'addVehicle', name: 'addVehicle',
meta: {title: '资料详情'},
component: () => import('../views/vehicleSubmit/addVehicle/index.vue'), component: () => import('../views/vehicleSubmit/addVehicle/index.vue'),
meta: { meta: {
title: '上牌资料详情',
parentTitle: '上牌资料提交',
parentPath: '/vehicleSubmit',
keepAlive: true keepAlive: true
} }
}, },
...@@ -51,6 +57,7 @@ const routes = [ ...@@ -51,6 +57,7 @@ const routes = [
name: 'vehicleCheck', name: 'vehicleCheck',
component: () => import('../views/vehicleSubmit/vehicleCheck/index.vue'), component: () => import('../views/vehicleSubmit/vehicleCheck/index.vue'),
meta: { meta: {
title: '上牌资料审核',
keepAlive: true keepAlive: true
} }
}, },
...@@ -59,15 +66,16 @@ const routes = [ ...@@ -59,15 +66,16 @@ const routes = [
name: 'reportManage', name: 'reportManage',
component: () => import('../views/reportManage/index.vue'), component: () => import('../views/reportManage/index.vue'),
meta: { meta: {
title: '有效试驾',
keepAlive: true keepAlive: true
} }
}, },
{ {
path: '/specialShop', path: '/specialShop',
name: 'specialShop', name: 'specialShop',
meta: {title: '新增特约店'},
component: () => import('../views/specialShop/index.vue'), component: () => import('../views/specialShop/index.vue'),
meta: { meta: {
title: '特约店列表',
keepAlive: true keepAlive: true
} }
}, },
...@@ -76,6 +84,9 @@ const routes = [ ...@@ -76,6 +84,9 @@ const routes = [
name: 'addShop', name: 'addShop',
component: () => import('../views/specialShop/addShop/index.vue'), component: () => import('../views/specialShop/addShop/index.vue'),
meta: { meta: {
title: '新增特约店',
parentTitle: '特约店列表',
parentPath: '/specialShop',
keepAlive: false keepAlive: false
} }
}, },
...@@ -84,6 +95,7 @@ const routes = [ ...@@ -84,6 +95,7 @@ const routes = [
name: 'testDriveCheckList', name: 'testDriveCheckList',
component: () => import('../views/testDrive/checkList.vue'), component: () => import('../views/testDrive/checkList.vue'),
meta: { meta: {
title: '试驶线路审核',
keepAlive: true keepAlive: true
} }
}, },
...@@ -92,6 +104,7 @@ const routes = [ ...@@ -92,6 +104,7 @@ const routes = [
name: 'removeAlarm', name: 'removeAlarm',
component: () => import('../views/alarmCenter/removeAlarm.vue'), component: () => import('../views/alarmCenter/removeAlarm.vue'),
meta: { meta: {
title: '拆除预警',
keepAlive: true keepAlive: true
} }
} }
......
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
specialShopDefaultProps: { specialShopDefaultProps: {
children: 'children', children: 'children',
label: 'label', label: 'label',
value: 'id' value: 'code'
}, },
readonlyStatus: false, readonlyStatus: false,
form: { form: {
...@@ -186,7 +186,7 @@ export default { ...@@ -186,7 +186,7 @@ export default {
fenceName: '', fenceName: '',
lng: '', lng: '',
lat: '', lat: '',
radius: 1000, radius: 150,
bizFenceType: '12', bizFenceType: '12',
shapeType: 1, shapeType: 1,
specialShopId: '', specialShopId: '',
...@@ -293,7 +293,7 @@ export default { ...@@ -293,7 +293,7 @@ export default {
this.restainFenceName = form.fenceName; this.restainFenceName = form.fenceName;
this.form.fenceName = form.fenceName; this.form.fenceName = form.fenceName;
this.form.msgtel = data.telNumbers; this.form.msgtel = data.telNumbers;
this.form.specialShopId = data.shopCode; this.form.specialShopId = data.specialShopId;
this.form.specialShopName = data.shopName; this.form.specialShopName = data.shopName;
this.form.shopLevel = data.shopLevel; this.form.shopLevel = data.shopLevel;
...@@ -479,7 +479,7 @@ export default { ...@@ -479,7 +479,7 @@ export default {
const params = this.getParams(); const params = this.getParams();
params.id = this.shopId; params.id = this.shopId;
updateFence(JSON.stringify(params)).then((res)=>{ updateFence(params).then((res)=>{
if(res.code == 200){ if(res.code == 200){
//this.closeDialog(); //this.closeDialog();
this.$message({ this.$message({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!