From 562e4c8a6f9315ffb79598d9b0f524fb9b0793da Mon Sep 17 00:00:00 2001 From: beyond <931414026@qq.com> Date: Tue, 5 Nov 2019 13:29:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- src/lang/zh.js | 1 + src/router/index.js | 17 +++++++++++++++++ src/store/getters.js | 1 + src/store/modules/user.js | 5 +++++ src/views/home/index.vue | 38 +++++++++++++++++++------------------- 6 files changed, 44 insertions(+), 20 deletions(-) diff --git a/index.html b/index.html index 08c6f2e7..680423bf 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@
- + diff --git a/src/lang/zh.js b/src/lang/zh.js index 17702621..df241df5 100644 --- a/src/lang/zh.js +++ b/src/lang/zh.js @@ -9,6 +9,7 @@ export default { nwow: 'NWOW后台管理', CheckSet: '质检明细设置', home: '首页', + map: '地图', AddSupplierAdjust: '新建供应商调价单', SupplierAdjustList: '供应商调价单列表', WorkDesk: '工作台', diff --git a/src/router/index.js b/src/router/index.js index 9b71d1fa..f24b598e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -88,6 +88,23 @@ export default new Router({ }) export const asyncRouterMap = [ + // { + // path: '/map', + // component: Layout, + // redirect: 'noredirect', + // meta: { + // icon: 'caigouxuqiu', + // type: 1 + // }, + // children: [ + // { + // path: 'map', + // component: () => import('@/views/home/index'), + // name: 'map', + // meta: { title: 'map', noCache: true } + // } + // ] + // }, { path: '/home', component: Layout, diff --git a/src/store/getters.js b/src/store/getters.js index b92d5e45..6f3bf767 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -18,6 +18,7 @@ const getters = { userId: state => state.user.userId, useCountry: state => state.user.useCountry, regionId: state => state.user.regionId, + regionIds: state => state.user.regionIds, repositoryId: state => state.user.repositoryId, yin: state => state.app.yin, countryId: state => state.user.countryId, diff --git a/src/store/modules/user.js b/src/store/modules/user.js index d95abe10..3839a10a 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -17,6 +17,7 @@ const user = { userId: '', useCountry: getToken2(), regionId: '', + regionIds: '', repositoryId: '', countryId: '', deptId: '', @@ -58,6 +59,9 @@ const user = { SET_REGIONID: (state, regionId) => { state.regionId = regionId }, + SET_REGIONIDS: (state, regionIds) => { + state.regionId = regionIds + }, SET_REPOSITORYID: (state, repositoryId) => { state.repositoryId = repositoryId }, @@ -119,6 +123,7 @@ const user = { commit('SET_INTRODUCTION', data.introduction) commit('SET_USERID', data.userId) commit('SET_REGIONID', data.regionId) + commit('SET_REGIONIDS', data.regionIds) commit('SET_REPOSITORYID', data.repositoryId) commit('SET_COUNTTRYID', data.countryId) commit('SET_DEPTID', data.deptId) diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 4f4c0c3f..e965bec0 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -5,7 +5,7 @@