Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
3d22165d
提交
3d22165d
编写于
11月 09, 2022
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
723ad2c7
变更
5
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
83 行增加
和
7 行删除
+83
-7
ui-logic-app-global-param.ts
src/logic/ui-logic/logic-param/ui-logic-app-global-param.ts
+4
-3
ui-logic-route-view-session-param.ts
...ui-logic/logic-param/ui-logic-route-view-session-param.ts
+5
-4
getters.ts
src/store/getters.ts
+18
-0
mutations.ts
src/store/mutations.ts
+54
-0
state.ts
src/store/state.ts
+2
-0
未找到文件。
src/logic/ui-logic/logic-param/ui-logic-app-global-param.ts
浏览文件 @
3d22165d
import
{
UILogicParamType
}
from
"@/logic/const/ui-logic-param-type"
;
import
{
UILogicParamBase
}
from
"./ui-logic-param-base"
;
import
store
from
'@/store'
;
/**
* 应用全局变量
...
...
@@ -37,7 +38,7 @@ export class UILogicAppGlobalParam extends UILogicParamBase {
*/
public
setReal
(
opts
:
any
)
{
this
.
realValue
=
opts
;
// AppServiceBase.getInstance().getAppStore()
.commit('addAppGlobal', { tag: this.logicParamModel.paramFieldName, param: opts });
store
.
commit
(
'addAppGlobal'
,
{
tag
:
this
.
logicParamModel
.
paramFieldName
,
param
:
opts
});
}
/**
...
...
@@ -68,7 +69,7 @@ export class UILogicAppGlobalParam extends UILogicParamBase {
*/
public
set
(
strName
:
string
,
value
:
any
)
{
this
.
realValue
[
strName
]
=
value
;
// AppServiceBase.getInstance().getAppStore()
.commit('addAppGlobal', { tag: this.logicParamModel.paramFieldName, param: this.realValue });
store
.
commit
(
'addAppGlobal'
,
{
tag
:
this
.
logicParamModel
.
paramFieldName
,
param
:
this
.
realValue
});
}
/**
...
...
@@ -79,7 +80,7 @@ export class UILogicAppGlobalParam extends UILogicParamBase {
*/
public
reset
(
strName
:
string
)
{
this
.
realValue
[
strName
]
=
null
;
// AppServiceBase.getInstance().getAppStore()
.commit('addAppGlobal', { tag: this.logicParamModel.paramFieldName, param: this.realValue });
store
.
commit
(
'addAppGlobal'
,
{
tag
:
this
.
logicParamModel
.
paramFieldName
,
param
:
this
.
realValue
});
}
}
\ No newline at end of file
src/logic/ui-logic/logic-param/ui-logic-route-view-session-param.ts
浏览文件 @
3d22165d
import
{
UILogicParamType
}
from
"@/logic/const/ui-logic-param-type"
;
import
{
UILogicParamBase
}
from
"./ui-logic-param-base"
;
import
store
from
'@/store'
;
/**
* 界面顶级视图会话共享参数绑定参数
...
...
@@ -26,7 +27,7 @@ export class UILogicRouteViewSessionParam extends UILogicParamBase {
*/
protected
init
(
params
:
any
)
{
this
.
logicParamType
=
UILogicParamType
.
routeViewSessionParam
;
this
.
realValue
=
this
.
setReal
(
this
.
getRouteViewSessionParam
(
params
));
this
.
setReal
(
this
.
getRouteViewSessionParam
(
params
));
}
/**
...
...
@@ -38,7 +39,7 @@ export class UILogicRouteViewSessionParam extends UILogicParamBase {
public
setReal
(
opts
:
any
)
{
this
.
realValue
=
opts
;
const
actionContainer
=
this
.
actionSession
.
actionContainer
;
this
.
$
store
.
commit
(
'addRouteViewGlobal'
,
{
tag
:
actionContainer
.
context
.
srfsessionid
,
param
:
{
[
this
.
logicParamModel
.
paramFieldName
]:
opts
}
});
store
.
commit
(
'addRouteViewGlobal'
,
{
tag
:
actionContainer
.
context
.
srfsessionid
,
param
:
{
[
this
.
logicParamModel
.
paramFieldName
]:
opts
}
});
}
/**
...
...
@@ -70,7 +71,7 @@ export class UILogicRouteViewSessionParam extends UILogicParamBase {
public
set
(
strName
:
string
,
value
:
any
)
{
this
.
realValue
[
strName
]
=
value
;
const
actionContainer
=
this
.
actionSession
.
actionContainer
;
this
.
$
store
.
commit
(
'addRouteViewGlobal'
,
{
tag
:
actionContainer
.
context
.
srfsessionid
,
param
:
{
[
this
.
logicParamModel
.
paramFieldName
]:
this
.
realValue
}
});
store
.
commit
(
'addRouteViewGlobal'
,
{
tag
:
actionContainer
.
context
.
srfsessionid
,
param
:
{
[
this
.
logicParamModel
.
paramFieldName
]:
this
.
realValue
}
});
}
/**
...
...
@@ -82,6 +83,6 @@ export class UILogicRouteViewSessionParam extends UILogicParamBase {
public
reset
(
strName
:
string
)
{
this
.
realValue
[
strName
]
=
null
;
const
actionContainer
=
this
.
actionSession
.
actionContainer
;
this
.
$
store
.
commit
(
'addRouteViewGlobal'
,
{
tag
:
actionContainer
.
context
.
srfsessionid
,
param
:
{
[
this
.
logicParamModel
.
paramFieldName
]:
this
.
realValue
}
});
store
.
commit
(
'addRouteViewGlobal'
,
{
tag
:
actionContainer
.
context
.
srfsessionid
,
param
:
{
[
this
.
logicParamModel
.
paramFieldName
]:
this
.
realValue
}
});
}
}
\ No newline at end of file
src/store/getters.ts
浏览文件 @
3d22165d
...
...
@@ -139,3 +139,21 @@ export const getViewMessage = (state: any) => (tag: string) => {
export
const
getAppGlobal
=
(
state
:
any
)
=>
()
=>
{
return
state
.
appGlobal
;
}
/**
* 获取顶层路由数据
*
* @param state
*/
export
const
getRouteViewGlobal
=
(
state
:
any
)
=>
(
key
:
string
)
=>
{
return
state
.
routeViewGlobal
[
key
];
}
/**
* 获取顶层视图
*
* @param state
*/
export
const
getView
=
(
state
:
any
)
=>
(
key
:
string
)
=>
{
return
state
.
appViews
[
key
];
}
\ No newline at end of file
src/store/mutations.ts
浏览文件 @
3d22165d
...
...
@@ -327,3 +327,57 @@ export const removeAppGlobal = (state: any, tag: string) => {
delete
state
.
appGlobal
[
tag
];
}
}
/**
* 添加顶层路由数据参数
*
* @param state
* @param args
*/
export
const
addRouteViewGlobal
=
(
state
:
any
,
args
:
{
tag
:
string
,
param
:
any
})
=>
{
if
(
args
&&
args
.
tag
&&
args
.
param
)
{
if
(
!
state
.
routeViewGlobal
[
args
.
tag
]){
state
.
routeViewGlobal
[
args
.
tag
]
=
args
.
param
;
}
else
{
const
cacheValue
=
state
.
routeViewGlobal
[
args
.
tag
];
Object
.
assign
(
cacheValue
,
args
.
param
);
state
.
routeViewGlobal
[
args
.
tag
]
=
cacheValue
;
}
}
}
/**
* 删除指定键值顶层路由数据参数
*
* @param state
* @param args
*/
export
const
removeRouteViewGlobal
=
(
state
:
any
,
tag
:
string
)
=>
{
if
(
tag
&&
state
.
routeViewGlobal
[
tag
])
{
delete
state
.
routeViewGlobal
[
tag
];
}
}
/**
* 添加顶层视图
*
* @param state
* @param args
*/
export
const
addView
=
(
state
:
any
,
args
:
{
tag
:
string
,
param
:
any
})
=>
{
if
(
args
&&
args
.
tag
&&
args
.
param
)
{
state
.
appViews
[
args
.
tag
]
=
args
.
param
;
}
}
/**
* 删除顶层视图
*
* @param state
* @param args
*/
export
const
removeView
=
(
state
:
any
,
tag
:
string
)
=>
{
if
(
tag
&&
state
.
appViews
[
tag
])
{
delete
state
.
appViews
[
tag
];
}
}
\ No newline at end of file
src/store/state.ts
浏览文件 @
3d22165d
...
...
@@ -18,4 +18,6 @@ export const rootstate: any = {
depDataMap
:{},
viewMessage
:
{},
appGlobal
:{},
routeViewGlobal
:
{},
appViews
:
{}
}
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录