Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
5712264d
提交
5712264d
编写于
1月 04, 2022
作者:
sq3536
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master'
上级
47435cd0
aa17e8d3
变更
8
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
46 行增加
和
14 行删除
+46
-14
form-details-model.hbs
...ources/templ/r7/@macro/form-detail/form-details-model.hbs
+1
-1
view-base.ts
...apps}}/src/ibiz-core/modules/views/view-base/view-base.ts
+38
-7
{{pages@APPINDEXVIEW}}.vue.hbs
...s}}/{{pages@APPINDEXVIEW}}/{{pages@APPINDEXVIEW}}.vue.hbs
+1
-0
{{pages@DEEDITVIEW}}.vue.hbs
...dules}}/{{pages@DEEDITVIEW}}/{{pages@DEEDITVIEW}}.vue.hbs
+1
-1
{{pages@DEGRIDVIEW}}.vue.hbs
...dules}}/{{pages@DEGRIDVIEW}}/{{pages@DEGRIDVIEW}}.vue.hbs
+1
-1
{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
...ges@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
+1
-1
{{pages@DEPICKUPVIEW}}.vue.hbs
...s}}/{{pages@DEPICKUPVIEW}}/{{pages@DEPICKUPVIEW}}.vue.hbs
+1
-1
index.ts.hbs
...n/resources/templ/r7/app_{{apps}}/src/router/index.ts.hbs
+2
-2
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/form-detail/form-details-model.hbs
浏览文件 @
5712264d
...
...
@@ -22,7 +22,7 @@
notMode: '
{{
groupLogic
.
notMode
}}
',
Logics: [
{{#
each
groupLogic
.
psDEFDLogics
as
|
logic
|
}}
{condOP: '
{{
logic
.
condOP
}}
',dEFDName: '
{{
logic
.
dEFDName
}}
',logicType: '
{{
logic
.
logicType
}}
',name: '
{{
logic
.
name
}}
'
,}
{condOP: '
{{
logic
.
condOP
}}
',dEFDName: '
{{
logic
.
dEFDName
}}
',logicType: '
{{
logic
.
logicType
}}
',name: '
{{
logic
.
name
}}
'
},
{{/
each
}}
],
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/view-base/view-base.ts
浏览文件 @
5712264d
import
{
ViewPropsBase
,
ViewStateBase
,
toOneWayRef
}
from
'@ibiz-core'
;
import
{
Ref
}
from
'vue'
;
import
{
useRoute
}
from
'vue-router'
;
import
{
ViewPropsBase
,
ViewStateBase
,
toOneWayRef
,
IParam
}
from
'@ibiz-core'
;
/**
* @description 视图基类
...
...
@@ -35,6 +37,36 @@ export class ViewBase {
this
.
viewState
.
viewSubject
=
toRef
(
props
,
'viewSubject'
)
as
any
;
}
/**
* @description 处理视图导航参数
* @param props 输入属性
* @param context 应用上下文
* @param viewParams 视图参数
*/
public
handleViewContextParams
(
props
:
ViewPropsBase
,
context
:
Ref
<
IParam
|
undefined
>
,
viewParams
:
Ref
<
IParam
|
undefined
>
)
{
if
(
!
context
.
value
)
context
.
value
=
{};
if
(
!
viewParams
.
value
)
viewParams
.
value
=
{};
if
(
Object
.
is
(
props
.
openType
,
'ROUTE'
))
{
const
appContext
=
{};
Object
.
assign
(
context
.
value
,
appContext
);
const
pageContext
=
useRoute
().
params
;
Object
.
assign
(
context
.
value
,
pageContext
);
const
pageCustomContext
=
{};
Object
.
assign
(
context
.
value
,
pageCustomContext
);
console
.
log
(
context
);
const
pageViewParams
=
useRoute
().
query
;
Object
.
assign
(
viewParams
.
value
,
pageViewParams
);
const
pageCustomViewParams
=
{};
Object
.
assign
(
viewParams
.
value
,
pageCustomViewParams
);
console
.
log
(
viewParams
);
}
else
{
const
customContext
=
{};
Object
.
assign
(
context
.
value
,
customContext
);
const
pageCustomViewParams
=
{};
Object
.
assign
(
viewParams
.
value
,
pageCustomViewParams
);
}
}
/**
* @description 使用视图上下文参数逻辑块
* @param {ViewPropsBase} props 传入的Props
...
...
@@ -44,15 +76,14 @@ export class ViewBase {
public
useViewContextParams
(
props
:
ViewPropsBase
)
{
const
context
=
toOneWayRef
(
props
,
'context'
);
const
viewParams
=
toOneWayRef
(
props
,
'viewParams'
);
// 导航视图参数处理
this
.
handleViewContextParams
(
props
,
context
,
viewParams
);
watch
(
context
,
(
newVal
:
any
,
oldVal
:
any
)
=>
{
this
.
handleViewContextParams
(
props
,
newVal
,
viewParams
);
});
// 把Ref赋值到State上进行解包
this
.
viewState
.
context
=
context
;
this
.
viewState
.
viewParams
=
viewParams
;
// 视图部分额外处理
// todo 导航参数处理,自定义参数处理。
// todo viewparams 视图级隔离,如果没有用导航参数这些指定,则把上一层的都消除。
return
{
context
,
viewParams
};
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages@APPINDEXVIEW}}/{{pages@APPINDEXVIEW}}.vue.hbs
浏览文件 @
5712264d
...
...
@@ -20,6 +20,7 @@ interface Props {
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
openType
:
'ROUTE'
,
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
()
})
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages@DEEDITVIEW}}/{{pages@DEEDITVIEW}}.vue.hbs
浏览文件 @
5712264d
...
...
@@ -17,7 +17,7 @@ interface Props {
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
// 设定默认值,可选属性可以在这初始化
openType
:
'ROUTE'
,
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
()
})
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages@DEGRIDVIEW}}/{{pages@DEGRIDVIEW}}.vue.hbs
浏览文件 @
5712264d
...
...
@@ -17,7 +17,7 @@ interface Props {
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
// 设定默认值,可选属性可以在这初始化
openType
:
'ROUTE'
,
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
()
})
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages@DEPICKUPGRIDVIEW}}/{{pages@DEPICKUPGRIDVIEW}}.vue.hbs
浏览文件 @
5712264d
...
...
@@ -17,7 +17,7 @@ interface Props {
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
// 设定默认值,可选属性可以在这初始化
openType
:
'ROUTE'
,
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
()
})
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages@DEPICKUPVIEW}}/{{pages@DEPICKUPVIEW}}.vue.hbs
浏览文件 @
5712264d
...
...
@@ -12,7 +12,7 @@ interface Props {
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
// 设定默认值,可选属性可以在这初始化
openType
:
'ROUTE'
,
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
()
})
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/router/index.ts.hbs
浏览文件 @
5712264d
...
...
@@ -16,7 +16,7 @@ const routes = [
{{/if}}
requireAuth:
{{#
eq
app
.
defaultPSAppIndexView
.
accUserMode
0
}}
false
{{else}}{{#
eq
app
.
defaultPSAppIndexView
.
accUserMode
3
}}
false
{{else}}
true
{{/
eq
}}{{/
eq
}}
,
},
component: () => import("@page/
default
/
{{
spinalCase
app
.
defaultPSAppIndexView
.
codeName
}}
"),
component: () => import("@page/
{{
spinalCase
app
.
defaultPSAppIndexView
.
psAppModule
.
codeName
}}
/
{{
spinalCase
app
.
defaultPSAppIndexView
.
codeName
}}
"),
children: [
{{#
each
app
.
appEntityResources
as
|
appEntityResource
|
}}
{{#if
appEntityResource
.
appDataEntity
.
allPSAppViews
}}
...
...
@@ -43,7 +43,7 @@ const routes = [
],
requireAuth: false,
},
component: () => import("@page/
{{
#if
psAppDataEntity
}}{{
spinalCase
psAppDataEntity
.
codeName
}}{{else}}
default
{{/if
}}
/
{{
spinalCase
appView
.
codeName
}}
"),
component: () => import("@page/
{{
spinalCase
appView
.
psAppModule
.
codeName
}}
/
{{
spinalCase
appView
.
codeName
}}
"),
},
{{/if}}
{{/
each
}}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录