提交 e06847e8 编写于 作者: Mosher's avatar Mosher

update:更新

上级 f3c18a50
...@@ -129,4 +129,13 @@ export const getDepData = (state: any) => (srfkey: string) => { ...@@ -129,4 +129,13 @@ export const getDepData = (state: any) => (srfkey: string) => {
export const getViewMessage = (state: any) => (tag: string) => { export const getViewMessage = (state: any) => (tag: string) => {
let id = state.viewMessage[tag]; let id = state.viewMessage[tag];
return id; return id;
}
/**
* 获取全局数据
*
* @param state
*/
export const getAppGlobal = (state: any) => () => {
return state.appGlobal;
} }
\ No newline at end of file
...@@ -303,4 +303,27 @@ export const addViewMessage = (state: any, args: { tag: string, id: any }) => { ...@@ -303,4 +303,27 @@ export const addViewMessage = (state: any, args: { tag: string, id: any }) => {
if(args && args.tag && args.id) { if(args && args.tag && args.id) {
state.viewMessage[args.tag] = args.id; state.viewMessage[args.tag] = args.id;
} }
}
/**
* 添加全局数据
*
* @param state
*/
export const addAppGlobal = (state: any, args: { tag: string, param: any }) => {
if (args && args.tag && args.param) {
state.appGlobal[args.tag] = args.param;
}
}
/**
* 删除指定键值全局数据
*
* @param state
* @param args
*/
export const removeAppGlobal = (state: any, tag: string) => {
if (tag && state.appGlobal[tag]) {
delete state.appGlobal[tag];
}
} }
\ No newline at end of file
...@@ -17,4 +17,5 @@ export const rootstate: any = { ...@@ -17,4 +17,5 @@ export const rootstate: any = {
orgDataMap:{}, orgDataMap:{},
depDataMap:{}, depDataMap:{},
viewMessage: {}, viewMessage: {},
appGlobal:{},
} }
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册