Browse Source

公共菜单

wgl 4 years ago
parent
commit
19c0205e20

+ 1 - 1
config/project.js

@@ -1 +1 @@
-exports.name = 'pension'
+exports.name = 'business'

+ 5 - 0
src/components/Common.vue

@@ -122,6 +122,9 @@
 					var iconInfoList = response ? response.iconInfoList : '';
 					this.set_menu_list(iconInfoList);
 
+					var commonIconInfoList = response ? response.commonIconInfoList : '';
+					this.set_common_menu_list(commonIconInfoList);
+
 					this.asynCallBack();
 
 				}).catch(error => {
@@ -155,6 +158,7 @@
 				set_person_temp: types.SET_PERSON_TEMP,
 				set_fun_list: types.SET_FUN_LIST,
 				set_app_version: types.SET_APP_VERSION,
+				set_common_menu_list: types.SET_COMMON_MENI_LIST,
 			})
 		},
 		mounted() {
@@ -170,6 +174,7 @@
 				person_data: 'person_data',
 				person_popedom: 'person_popedom',
 				menu_list: 'menu_list',
+				common_menu_list: 'common_menu_list',
 				person_temp: 'person_temp',
 				fun_list: 'fun_list',
 				app_version: 'app_version'

+ 2 - 1
src/projects/business/views/Master/Home.vue

@@ -288,7 +288,8 @@
 				token: 'token',
 				person_data: 'person_data',
 				person_popedom: 'person_popedom',
-				menu_list: 'menu_list'
+				menu_list: 'menu_list',
+				common_menu_list: 'common_menu_list',
 			})
 		}
 	}

+ 2 - 1
src/projects/pension/views/Master/Home.vue

@@ -289,7 +289,8 @@
 				token: 'token',
 				person_data: 'person_data',
 				person_popedom: 'person_popedom',
-				menu_list: 'menu_list'
+				menu_list: 'menu_list',
+				common_menu_list: 'common_menu_list',
 			})
 		}
 	}

+ 3 - 1
src/store/getters.js

@@ -16,4 +16,6 @@ export const fun_list = state => state.fun_list
 
 export const register_form_data = state => state.register_form_data
 
-export const app_version = state => state.app_version
+export const app_version = state => state.app_version
+
+export const common_menu_list = state => state.common_menu_list

+ 2 - 1
src/store/mutation-types.js

@@ -8,4 +8,5 @@ export const SET_MENI_LIST = 'SET_MENI_LIST'
 export const SET_PERSON_TEMP = 'SET_PERSON_TEMP'
 export const SET_FUN_LIST = 'SET_FUN_LIST'
 export const SET_REGISTER_FORM_DATA = 'SET_REGISTER_FORM_DATA'
-export const SET_APP_VERSION = 'SET_APP_VERSION'
+export const SET_APP_VERSION = 'SET_APP_VERSION'
+export const SET_COMMON_MENU_LIST = 'SET_COMMON_MENU_LIST'

+ 6 - 0
src/store/mutations.js

@@ -5,6 +5,7 @@ import {
 	setPersonData,
 	setPersonPopedom,
 	setMenuList,
+	setCommonMenuList,
 	setPersonTemp,
 	setFunList,
 	setRegisterFormData,
@@ -48,6 +49,11 @@ const mutations = {
 		setMenuList(storage_prefix, data)
 		state.menu_list = data
 	},
+	
+	[types.SET_COMMON_MENI_LIST](state, data) {
+		setCommonMenuList(storage_prefix, data)
+		state.common_menu_list = data
+	},
 
 	[types.SET_PERSON_TEMP](state, data) {
 		setPersonTemp(storage_prefix, data)

+ 2 - 0
src/store/state.js

@@ -4,6 +4,7 @@ import {
 	getPersonData,
 	getPersonPopedom,
 	getMenuList,
+	getCommonMenuList,
 	getPersonTemp,
 	getFunList,
 	getRegisterFormData,
@@ -21,6 +22,7 @@ const state = {
 	control_abnormal_statistics_startTime: '',
 	control_abnormal_statistics_endTime: '',
 	menu_list: getMenuList(storage_prefix),
+	common_menu_list: getCommonMenuList(storage_prefix),
 	person_temp: getPersonTemp(storage_prefix),
 	fun_list: getFunList(storage_prefix),
 	register_form_data: getRegisterFormData(storage_prefix),

+ 4 - 0
src/utils/storage.js

@@ -74,6 +74,10 @@ export const setMenuList = (channel, data) => set(channel + '_menu_list', data)
 
 export const getMenuList = (channel) => get(channel + '_menu_list')
 
+export const setCommonMenuList = (channel, data) => set(channel + '_common_menu_list', data)
+
+export const getCommonMenuList = (channel) => get(channel + '_common_menu_list')
+
 export const setFunList = (channel, data) => set(channel + '_fun_list', data)
 
 export const getFunList = (channel) => get(channel + '_fun_list')