Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
25d014e6
提交
25d014e6
编写于
12月 23, 2021
作者:
Shine-zwj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
5fcc7d67
变更
41
隐藏空白字符变更
内嵌
并排
正在显示
41 个修改的文件
包含
581 行增加
和
91 行删除
+581
-91
CtrlModel.java
...ore/src/main/java/cn/ibizlab/codegen/model/CtrlModel.java
+5
-0
form-group.hbs
.../main/resources/templ/r7/@macro/components/form-group.hbs
+5
-5
form-item.hbs
...c/main/resources/templ/r7/@macro/components/form-item.hbs
+4
-5
form-page.hbs
...c/main/resources/templ/r7/@macro/components/form-page.hbs
+5
-5
package.json
...ore/src/main/resources/templ/r7/app_{{apps}}/package.json
+3
-0
App.vue
...core/src/main/resources/templ/r7/app_{{apps}}/src/App.vue
+2
-3
DefaultIndexViewLayout.vue
.../layout/DefaultIndexViewLayout/DefaultIndexViewLayout.vue
+52
-0
index.ts
...s}}/src/components/layout/DefaultIndexViewLayout/index.ts
+3
-0
index.ts
...rces/templ/r7/app_{{apps}}/src/components/layout/index.ts
+2
-1
FormGroup.vue
...pp_{{apps}}/src/components/render/FormGroup/FormGroup.vue
+36
-0
index.ts
.../r7/app_{{apps}}/src/components/render/FormGroup/index.ts
+3
-0
FormItem.vue
.../app_{{apps}}/src/components/render/FormItem/FormItem.vue
+25
-0
index.ts
...l/r7/app_{{apps}}/src/components/render/FormItem/index.ts
+3
-0
MenuItem.vue
.../app_{{apps}}/src/components/render/MenuItem/MenuItem.vue
+36
-0
index.ts
...l/r7/app_{{apps}}/src/components/render/MenuItem/index.ts
+3
-0
index.ts
...rces/templ/r7/app_{{apps}}/src/components/render/index.ts
+4
-1
i-action-param.ts
...{{apps}}/src/ibiz-core/interface/common/i-action-param.ts
+2
-2
view-prop-base.ts
...}/src/ibiz-core/modules/views/view-base/view-prop-base.ts
+4
-3
view-state-base.ts
.../src/ibiz-core/modules/views/view-base/view-state-base.ts
+4
-4
control-prop-base.ts
...iz-core/modules/widgets/control-base/control-prop-base.ts
+4
-3
control-state-base.ts
...z-core/modules/widgets/control-base/control-state-base.ts
+5
-4
form-control-state.ts
...z-core/modules/widgets/form-control/form-control-state.ts
+19
-3
form-control.ts
...rc/ibiz-core/modules/widgets/form-control/form-control.ts
+5
-6
main-control-state.ts
...z-core/modules/widgets/main-control/main-control-state.ts
+2
-2
main.ts
...core/src/main/resources/templ/r7/app_{{apps}}/src/main.ts
+4
-2
{{pages@APPINDEXVIEW}}-config.ts.hbs
...pModules}}/{{pages}}/{{pages@APPINDEXVIEW}}-config.ts.hbs
+5
-0
{{pages@APPINDEXVIEW}}.vue.hbs
...e/{{appModules}}/{{pages}}/{{pages@APPINDEXVIEW}}.vue.hbs
+78
-0
{{pages@DEEDITVIEW}}-config.ts.hbs
...appModules}}/{{pages}}/{{pages@DEEDITVIEW}}-config.ts.hbs
+1
-1
{{pages@DEEDITVIEW}}.vue.hbs
...age/{{appModules}}/{{pages}}/{{pages@DEEDITVIEW}}.vue.hbs
+15
-15
index.ts
.../main/resources/templ/r7/app_{{apps}}/src/router/index.ts
+26
-0
index.ts.hbs
...dgets/{{appEntities}}/{{ctrls@APPMENU}}-menu/index.ts.hbs
+3
-0
{{ctrls@APPMENU}}-menu-config.ts.hbs
...ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu-config.ts.hbs
+5
-0
{{ctrls@APPMENU}}-menu.vue.hbs
...s}}/{{ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu.vue.hbs
+138
-0
index.ts.hbs
.../widgets/{{appEntities}}/{{ctrls@FORM}}-form/index.ts.hbs
+3
-0
{{ctrls@FORM}}-form-config.ts.hbs
...s}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form-config.ts.hbs
+5
-0
{{ctrls@FORM}}-form-service.ts.hbs
...}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form-service.ts.hbs
+0
-0
{{ctrls@FORM}}-form.vue.hbs
...ntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form.vue.hbs
+58
-0
{{ctrls@FORM}}-form.vue.hbs
...{appEntities}}/{{ctrls}}-form/{{ctrls@FORM}}-form.vue.hbs
+0
-25
tsconfig.json
...re/src/main/resources/templ/r7/app_{{apps}}/tsconfig.json
+2
-0
vite.config.ts
...e/src/main/resources/templ/r7/app_{{apps}}/vite.config.ts
+1
-0
vue.config.js.hbs
...rc/main/resources/templ/r7/app_{{apps}}/vue.config.js.hbs
+1
-1
未找到文件。
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/CtrlModel.java
浏览文件 @
25d014e6
...
@@ -6,6 +6,7 @@ import lombok.NoArgsConstructor;
...
@@ -6,6 +6,7 @@ import lombok.NoArgsConstructor;
import
lombok.Setter
;
import
lombok.Setter
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
net.ibizsys.model.control.IPSControl
;
import
net.ibizsys.model.control.IPSControl
;
import
net.ibizsys.model.control.layout.IPSGridLayoutPos
;
@Getter
@Getter
@Setter
@Setter
...
@@ -40,4 +41,8 @@ public class CtrlModel extends BaseModel{
...
@@ -40,4 +41,8 @@ public class CtrlModel extends BaseModel{
return
(
IPSControl
)
opt
;
return
(
IPSControl
)
opt
;
}
}
public
void
getGridOptions
(
IPSGridLayoutPos
layoutPos
)
{
System
.
out
.
println
(
layoutPos
);
}
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/components/form-group.hbs
浏览文件 @
25d014e6
{{#
eq
item
.
pSLayoutPos
'FLEX'
}}
{{#
eq
item
.
pSLayoutPos
'FLEX'
}}
<div
style=
"flex-grow:
{{#if
item
.
pSLayoutPos
.
grow
}}{{
item
.
pSLayoutPos
.
grow
}}{{else}}
0
{{/if}}
;"
>
<div
style=
"flex-grow:
{{#if
item
.
pSLayoutPos
.
grow
}}{{
item
.
pSLayoutPos
.
grow
}}{{else}}
0
{{/if}}
;"
>
<
App
FormGroup
name=
"
{{
item
.
codeName
}}
"
title=
"
{{
item
.
caption
}}
"
>
<
Ibiz
FormGroup
name=
"
{{
item
.
codeName
}}
"
title=
"
{{
item
.
caption
}}
"
>
{{#
each
item
.
psDEFormDetails
as
|
formDetail
|
}}
{{#
each
item
.
psDEFormDetails
as
|
formDetail
|
}}
{{>
(
lookup
.
'formDetail.detailType'
)
item
=
formDetail
}}
{{>
(
lookup
.
'formDetail.detailType'
)
item
=
formDetail
}}
{{/
each
}}
{{/
each
}}
</
App
FormGroup>
</
Ibiz
FormGroup>
</div>
</div>
{{else}}
{{else}}
<!-- 栅格样式需要方法计算" -->
{{
ctrl
.
getGridOptions
(
item
.
getPSLayoutPos
)
}}
<a-col
:span=
"24"
>
<a-col
:span=
"24"
>
<
App
FormGroup
name=
"
{{
item
.
codeName
}}
"
title=
"
{{
item
.
caption
}}
"
>
<
Ibiz
FormGroup
name=
"
{{
item
.
codeName
}}
"
title=
"
{{
item
.
caption
}}
"
>
{{#
each
item
.
psDEFormDetails
as
|
formDetail
|
}}
{{#
each
item
.
psDEFormDetails
as
|
formDetail
|
}}
{{>
(
lookup
.
'formDetail.detailType'
)
item
=
formDetail
}}
{{>
(
lookup
.
'formDetail.detailType'
)
item
=
formDetail
}}
{{/
each
}}
{{/
each
}}
</
App
FormGroup>
</
Ibiz
FormGroup>
</a-col>
</a-col>
{{/
eq
}}
{{/
eq
}}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/components/form-item.hbs
浏览文件 @
25d014e6
{{#
eq
item
.
pSLayoutPos
'FLEX'
}}
{{#
eq
item
.
pSLayoutPos
'FLEX'
}}
<div
style=
"flex-grow:
{{#if
item
.
pSLayoutPos
.
grow
}}{{
item
.
pSLayoutPos
.
grow
}}{{else}}
0
{{/if}}
;"
>
<div
style=
"flex-grow:
{{#if
item
.
pSLayoutPos
.
grow
}}{{
item
.
pSLayoutPos
.
grow
}}{{else}}
0
{{/if}}
;"
>
<
App
FormItem
name=
"
{{
item
.
codeName
}}
"
label=
"
{{
item
.
caption
}}
"
>
<
Ibiz
FormItem
name=
"
{{
item
.
codeName
}}
"
label=
"
{{
item
.
caption
}}
"
>
{{#if
item
.
psEditor
}}
{{#if
item
.
psEditor
}}
{{>
(
lookup
.
'item.psEditor.editorType'
)
item
=
item
}}
{{>
(
lookup
.
'item.psEditor.editorType'
)
item
=
item
}}
{{/if}}
{{/if}}
</
App
FormItem>
</
Ibiz
FormItem>
</div>
</div>
{{else}}
{{else}}
<!-- 栅格样式需要方法计算" -->
<a-col
:span=
"24"
>
<a-col
:span=
"24"
>
<
App
FormItem
name=
"
{{
item
.
codeName
}}
"
label=
"
{{
item
.
caption
}}
"
>
<
Ibiz
FormItem
name=
"
{{
item
.
codeName
}}
"
label=
"
{{
item
.
caption
}}
"
>
{{#if
item
.
psEditor
}}
{{#if
item
.
psEditor
}}
{{>
(
lookup
.
'item.psEditor.editorType'
)
item
=
item
}}
{{>
(
lookup
.
'item.psEditor.editorType'
)
item
=
item
}}
{{/if}}
{{/if}}
</
App
FormItem>
</
Ibiz
FormItem>
</a-col>
</a-col>
{{/
eq
}}
{{/
eq
}}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/components/form-page.hbs
浏览文件 @
25d014e6
<a-tab-pane
key=
"
{{
formPage
.
codeName
}}
"
tab=
"
{{
formPage
.
caption
}}
"
>
<a-tab-pane
key=
"
{{
item
.
codeName
}}
"
tab=
"
{{
item
.
caption
}}
"
>
{{#
eq
formPage
.
pSLayout
.
layout
"FLEX"
}}
{{#
eq
item
.
pSLayout
.
layout
"FLEX"
}}
<div
class=
"app-form-layout-flex"
style=
"
{{#if
formPage
.
pSLayout
.
dir
}}
flex-direction:
{{
formPage
.
pSLayout
.
dir
}}
;
{{/if}}{{#if
formPage
.
pSLayout
.
align
}}
justify-content:
{{
formPage
.
pSLayout
.
align
}}
;
{{/if}}{{#if
formPage
.
pSLayout
.
vAlign
}}
align-items:
{{
formPage
.
pSLayout
.
vAlign
}}
;
{{/if}}
"
>
<div
class=
"app-form-layout-flex"
style=
"
{{#if
item
.
pSLayout
.
dir
}}
flex-direction:
{{
item
.
pSLayout
.
dir
}}
;
{{/if}}{{#if
item
.
pSLayout
.
align
}}
justify-content:
{{
item
.
pSLayout
.
align
}}
;
{{/if}}{{#if
item
.
pSLayout
.
vAlign
}}
align-items:
{{
item
.
pSLayout
.
vAlign
}}
;
{{/if}}
"
>
{{#
each
formPage
.
psDEFormDetails
as
|
formDetail
|
}}
{{#
each
item
.
psDEFormDetails
as
|
formDetail
|
}}
{{>
(
lookup
.
'formDetail.detailType'
)
item
=
formDetail
}}
{{>
(
lookup
.
'formDetail.detailType'
)
item
=
formDetail
}}
{{/
each
}}
{{/
each
}}
</div>
</div>
{{else}}
{{else}}
<a-row>
<a-row>
{{#
each
formPage
.
psDEFormDetails
as
|
formDetail
|
}}
{{#
each
item
.
psDEFormDetails
as
|
formDetail
|
}}
{{>
(
lookup
.
'formDetail.detailType'
)
item
=
formDetail
}}
{{>
(
lookup
.
'formDetail.detailType'
)
item
=
formDetail
}}
{{/
each
}}
{{/
each
}}
</a-row>
</a-row>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/package.json
浏览文件 @
25d014e6
...
@@ -7,12 +7,15 @@
...
@@ -7,12 +7,15 @@
"preview"
:
"vite preview"
"preview"
:
"vite preview"
},
},
"dependencies"
:
{
"dependencies"
:
{
"@ant-design/icons-vue"
:
"^6.0.1"
,
"ant-design-vue"
:
"^3.0.0-alpha.14"
,
"element-plus"
:
"^1.2.0-beta.6"
,
"element-plus"
:
"^1.2.0-beta.6"
,
"font-awesome"
:
"^4.7.0"
,
"font-awesome"
:
"^4.7.0"
,
"qx-util"
:
"^0.0.10"
,
"qx-util"
:
"^0.0.10"
,
"ramda"
:
"^0.27.1"
,
"ramda"
:
"^0.27.1"
,
"rxjs"
:
"^7.4.0"
,
"rxjs"
:
"^7.4.0"
,
"vue"
:
"^3.2.23"
,
"vue"
:
"^3.2.23"
,
"vue-router"
:
"^4.0.12"
,
"vue-global-api"
:
"^0.4.1"
"vue-global-api"
:
"^0.4.1"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/App.vue
浏览文件 @
25d014e6
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
// This starter template is using Vue 3
<
script
setup
>
SFCs
// This starter template is using Vue 3
<
script
setup
>
SFCs
// Check out https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup
// Check out https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup
import
{
EditView
}
from
'./views/EditView'
import
{
JobsInfoEditView
}
from
'@page/jobs-info/jobs-info-edit-view'
;
</
script
>
</
script
>
<
template
>
<
template
>
<
EditView
:context=
"
{}"
/>
<
JobsInfoEditView
:context=
"
{}"
/>
</
template
>
</
template
>
<
style
>
<
style
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/layout/DefaultIndexViewLayout/DefaultIndexViewLayout.vue
0 → 100644
浏览文件 @
25d014e6
<
script
setup
lang=
"ts"
>
interface
LayoutProps
{
/**
* @description 菜单方向
*/
menuAlign
:
"LEFT"
|
"TOP"
|
"CENTER"
|
"TABEXP_LEFT"
|
"TABEXP_TOP"
|
"TABEXP_RIGHT"
|
"TABEXP_BOTTOM"
|
"NONE"
,
/**
* @description 收缩
*/
collapsed
:
boolean
,
}
const
props
=
withDefaults
(
defineProps
<
LayoutProps
>
(),
{
menuAlign
:
"LEFT"
,
collapsed
:
false
,
})
</
script
>
<
template
>
<a-layout
class=
"app-index-view"
>
<a-layout-header>
<slot
name=
"header"
></slot>
<slot
name=
"menu"
v-if=
"Object.is(menuAlign, 'TOP')"
></slot>
<slot
name=
"user"
></slot>
</a-layout-header>
<a-layout>
<a-layout-sider
v-if=
"Object.is(menuAlign, 'LEFT')"
theme=
"light"
collapsible
:trigger=
"null"
:collapsed=
"collapsed"
>
<slot
name=
"menu"
></slot>
</a-layout-sider>
<a-layout-content>
<slot
name=
"content"
></slot>
</a-layout-content>
</a-layout>
</a-layout>
</
template
>
<
style
lang=
"scss"
>
.app-index-view
{
width
:
100%
;
height
:
100%
;
.ant-layout-header
{
display
:
flex
;
background-color
:
#fff
;
justify-content
:
space-between
;
}
}
</
style
>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/layout/DefaultIndexViewLayout/index.ts
0 → 100644
浏览文件 @
25d014e6
import
DefaultIndexViewLayout
from
'./DefaultIndexViewLayout.vue'
export
const
IbizDefaultIndexViewLayout
=
DefaultIndexViewLayout
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/layout/index.ts
浏览文件 @
25d014e6
export
*
from
'./DefaultViewLayout'
export
*
from
'./DefaultViewLayout'
;
\ No newline at end of file
export
*
from
'./DefaultIndexViewLayout'
;
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/FormGroup/FormGroup.vue
0 → 100644
浏览文件 @
25d014e6
<
script
setup
lang=
"ts"
>
import
{
IActionParam
}
from
"@ibiz-core"
;
interface
FormGroupProps
{
name
:
string
;
title
:
string
;
}
interface
FormGroupEmit
{
(
name
:
'componentEvent'
,
value
:
IActionParam
):
void
}
const
props
=
withDefaults
(
defineProps
<
FormGroupProps
>
(),
{});
const
emit
=
defineEmits
<
FormGroupEmit
>
();
</
script
>
<
template
>
<a-card
:class=
"['app-form-group', `app-form-group-$
{name}`]"
:title="title"
:bordered="false">
<template
#
extra
>
<a
href=
"#"
>
行为
</a>
</
template
>
<slot></slot>
</a-card>
</template>
<
style
lang=
"scss"
>
.app-form-group
{
height
:
100%
;
width
:
100%
;
.ant-card-head
{
text-align
:
left
;
}
}
</
style
>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/FormGroup/index.ts
0 → 100644
浏览文件 @
25d014e6
import
FormGroup
from
'./FormGroup.vue'
export
const
IbizFormGroup
=
FormGroup
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/FormItem/FormItem.vue
0 → 100644
浏览文件 @
25d014e6
<
script
setup
lang=
"ts"
>
import
{
IActionParam
}
from
"@ibiz-core"
;
interface
FormGroupProps
{
name
:
string
;
error
:
string
;
label
:
string
;
}
interface
FormGroupEmit
{
(
name
:
'componentEvent'
,
value
:
IActionParam
):
void
}
const
props
=
withDefaults
(
defineProps
<
FormGroupProps
>
(),
{});
const
emit
=
defineEmits
<
FormGroupEmit
>
();
</
script
>
<
template
>
<a-form-item
:name=
"name"
:label=
"label"
:help=
"error"
:validateStatus=
"error ? 'error': 'validating'"
>
<slot></slot>
</a-form-item>
</
template
>
<
style
lang=
"scss"
>
</
style
>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/FormItem/index.ts
0 → 100644
浏览文件 @
25d014e6
import
FormItem
from
'./FormItem.vue'
export
const
IbizFormItem
=
FormItem
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/MenuItem/MenuItem.vue
0 → 100644
浏览文件 @
25d014e6
<
script
setup
lang=
"ts"
>
import
{
IParam
}
from
"@ibiz-core"
;
import
{
UserOutlined
,
}
from
'@ant-design/icons-vue'
;
interface
MenuItemProps
{
items
:
IParam
[];
}
const
props
=
withDefaults
(
defineProps
<
MenuItemProps
>
(),
{});
</
script
>
<
template
>
<template
v-for=
"item in items"
:key=
"item.id"
>
<template
v-if=
"!item.items"
>
<a-menu-item
v-if=
"!item.hidden"
:key=
"item.id"
>
<template
#
icon
>
<UserOutlined
/>
</
template
>
{{ item.title }}
</a-menu-item>
</template>
<
template
v-else
>
<a-sub-menu
v-if=
"!item.hidden"
:key=
"item.id"
>
<template
#
icon
>
<UserOutlined
/>
</
template
>
<
template
#
title
>
{{
item
.
title
}}
</
template
>
<app-menu-item
:items=
"item.items"
/>
</a-sub-menu>
</template>
</template>
</template>
<
style
lang=
"scss"
>
</
style
>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/MenuItem/index.ts
0 → 100644
浏览文件 @
25d014e6
import
MenuItem
from
'./MenuItem.vue'
export
const
IbizMenuItem
=
MenuItem
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/index.ts
浏览文件 @
25d014e6
export
*
from
'./IconText'
export
*
from
'./IconText'
;
\ No newline at end of file
export
*
from
'./FormItem'
;
export
*
from
'./FormGroup'
;
export
*
from
'./MenuItem'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/interface/common/i-action-param.ts
浏览文件 @
25d014e6
...
@@ -23,8 +23,8 @@ export interface IActionParam {
...
@@ -23,8 +23,8 @@ export interface IActionParam {
/**
/**
* @description 数据
* @description 数据
* @type {
IParam
}
* @type {
*
}
* @memberof IActionParam
* @memberof IActionParam
*/
*/
data
:
IParam
;
data
:
any
;
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/view-base/view-prop-base.ts
浏览文件 @
25d014e6
import
{
Subject
}
from
"rxjs"
;
import
{
Subject
}
from
"rxjs"
;
import
{
IActionParam
,
IParam
}
from
"@ibiz-core"
;
/**
/**
* 视图props的基类
* 视图props的基类
...
@@ -7,17 +8,17 @@ export interface ViewPropsBase {
...
@@ -7,17 +8,17 @@ export interface ViewPropsBase {
/**
/**
* 上下文参数(外部传入)
* 上下文参数(外部传入)
*/
*/
context
?:
any
;
context
?:
IParam
;
/**
/**
* 视图参数(外部传入)
* 视图参数(外部传入)
*/
*/
viewParams
?:
any
;
viewParams
?:
IParam
;
/**
/**
* 视图参数(外部传入)
* 视图参数(外部传入)
*/
*/
viewSubject
?:
Subject
<
any
>
;
viewSubject
?:
Subject
<
IActionParam
>
;
/**
/**
* 视图打开方式,路由、模态、内嵌,默认为路由方式
* 视图打开方式,路由、模态、内嵌,默认为路由方式
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/view-base/view-state-base.ts
浏览文件 @
25d014e6
import
{
Subject
}
from
"rxjs"
;
import
{
Subject
}
from
"rxjs"
;
import
{
IActionParam
,
IParam
}
from
'@ibiz-core'
;
/**
/**
* 视图基类状态
* 视图基类状态
*/
*/
...
@@ -17,17 +17,17 @@ export interface ViewStateBase {
...
@@ -17,17 +17,17 @@ export interface ViewStateBase {
/**
/**
* 上下文参数
* 上下文参数
*/
*/
context
:
any
;
context
:
IParam
;
/**
/**
* 视图参数
* 视图参数
*/
*/
viewParams
:
any
;
viewParams
:
IParam
;
/**
/**
* 视图参数(外部传入)
* 视图参数(外部传入)
*/
*/
viewSubject
:
Subject
<
any
>
;
viewSubject
:
Subject
<
IActionParam
>
;
// 声明任意属性
// 声明任意属性
[
propName
:
string
]:
any
;
[
propName
:
string
]:
any
;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/control-base/control-prop-base.ts
浏览文件 @
25d014e6
import
{
Subject
}
from
"rxjs"
;
import
{
Subject
}
from
"rxjs"
;
import
{
IActionParam
,
IParam
}
from
"@ibiz-core"
;
/**
/**
* 部件props的基类
* 部件props的基类
...
@@ -7,15 +8,15 @@ import { Subject } from "rxjs";
...
@@ -7,15 +8,15 @@ import { Subject } from "rxjs";
/**
/**
* 上下文参数(外部传入)
* 上下文参数(外部传入)
*/
*/
context
?:
any
;
context
?:
IParam
;
/**
/**
* 视图参数(外部传入)
* 视图参数(外部传入)
*/
*/
viewParams
?:
any
;
viewParams
?:
IParam
;
/**
/**
* 视图参数(外部传入)
* 视图参数(外部传入)
*/
*/
viewSubject
:
Subject
<
any
>
;
viewSubject
:
Subject
<
IActionParam
>
;
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/control-base/control-state-base.ts
浏览文件 @
25d014e6
import
{
IActionParam
,
IParam
}
from
"@ibiz-core"
;
import
{
Subject
}
from
"rxjs"
;
import
{
Subject
}
from
"rxjs"
;
/**
/**
...
@@ -17,18 +18,18 @@ import { Subject } from "rxjs";
...
@@ -17,18 +18,18 @@ import { Subject } from "rxjs";
/**
/**
* 上下文参数
* 上下文参数
*/
*/
context
:
any
;
context
:
IParam
;
/**
/**
* 视图参数
* 视图参数
*/
*/
viewParams
:
any
;
viewParams
:
IParam
;
/**
/**
* 视图参数(外部传入)
* 视图参数(外部传入)
*/
*/
viewSubject
:
Subject
<
any
>
;
viewSubject
:
Subject
<
IActionParam
>
;
// 声明任意属性
// 声明任意属性
//
[propName: string]: any;
[
propName
:
string
]:
any
;
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/form-control/form-control-state.ts
浏览文件 @
25d014e6
import
{
MainControlState
}
from
'@ibiz-core'
;
import
{
IParam
,
MainControlState
}
from
'@ibiz-core'
;
/**
/**
* 表单部件状态
* 表单部件状态
*/
*/
export
interface
FormControlState
extends
MainControlState
{
export
interface
FormControlState
extends
MainControlState
{
/**
/**
* 表单数据对象
* @description 表单数据对象
* @type {IParam}
* @memberof FormControlState
*/
*/
data
:
any
;
data
:
IParam
;
/**
* @description 表单成员模型集合
* @type {IParam}
* @memberof FormControlState
*/
detailsModel
:
IParam
;
/**
* @description 表单界面行为模型集合
* @type {IParam}
* @memberof FormControlState
*/
actionModel
:
IParam
;
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/form-control/form-control.ts
浏览文件 @
25d014e6
import
{
deepCopy
,
FormControlProps
,
FormControlState
,
MainControl
}
from
'@ibiz-core'
;
import
{
deepCopy
,
FormControlProps
,
FormControlState
,
IActionParam
,
MainControl
}
from
'@ibiz-core'
;
import
{
SyncSeriesHook
}
from
"qx-util"
;
/**
/**
* 表单部件
* 表单部件
* @export
* @export
* @class
ControlBase
* @class
FormControl
*/
*/
export
class
FormControl
extends
MainControl
{
export
class
FormControl
extends
MainControl
{
/**
/**
...
@@ -57,9 +56,9 @@ export class FormControl extends MainControl {
...
@@ -57,9 +56,9 @@ export class FormControl extends MainControl {
// 订阅viewSubject,监听load行为
// 订阅viewSubject,监听load行为
if
(
viewSubject
){
if
(
viewSubject
){
let
subscription
=
viewSubject
.
subscribe
((
args
:
any
)
=>
{
let
subscription
=
viewSubject
.
subscribe
((
{
tag
,
action
,
data
}:
IActionParam
)
=>
{
if
(
args
.
tag
==
controlName
&&
args
.
action
==
"load"
){
if
(
Object
.
is
(
controlName
,
tag
)
&&
Object
.
is
(
"load"
,
action
)
){
load
(
args
.
data
)
load
(
data
)
}
}
})
})
// 部件卸载时退订viewSubject
// 部件卸载时退订viewSubject
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/main-control/main-control-state.ts
浏览文件 @
25d014e6
import
{
ControlAction
,
ControlStateBase
}
from
"@ibiz-core"
;
import
{
ControlAction
,
ControlStateBase
,
IParam
}
from
"@ibiz-core"
;
/**
/**
* 实体部件状态
* 实体部件状态
...
@@ -17,5 +17,5 @@ import { ControlAction, ControlStateBase } from "@ibiz-core";
...
@@ -17,5 +17,5 @@ import { ControlAction, ControlStateBase } from "@ibiz-core";
/**
/**
* 部件服务
* 部件服务
*/
*/
controlService
:
any
controlService
:
IParam
;
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/main.ts
浏览文件 @
25d014e6
import
'font-awesome/css/font-awesome.min.css'
import
'font-awesome/css/font-awesome.min.css'
import
'@/style/index.scss'
import
'@/style/index.scss'
import
{
createApp
}
from
'vue'
import
Router
from
'@/router'
;
import
Antd
from
'ant-design-vue'
;
import
'ant-design-vue/dist/antd.css'
;
import
App
from
'./App.vue'
import
App
from
'./App.vue'
createApp
(
App
).
mount
(
'#app'
)
createApp
(
App
).
use
(
Router
).
use
(
Antd
).
mount
(
'#app'
)
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages}}/{{pages@APPINDEXVIEW}}-config.ts.hbs
0 → 100644
浏览文件 @
25d014e6
export const ViewConfig = {
viewCodeName: '
{{
page
.
codeName
}}
',
viewName: '
{{
page
.
name
}}
',
viewCaption: '
{{
page
.
caption
}}
',
};
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages}}/{{pages@APPINDEXVIEW}}.vue.hbs
0 → 100644
浏览文件 @
25d014e6
<script
setup
lang=
"ts"
>
import
{
Subject
}
from
'rxjs'
import
{
EditView
,
IActionParam
,
IParam
}
from
'@ibiz-core'
import
{
ViewConfig
}
from
'./
{{
page
.
codeName
.
spinalCase
}}
-config'
import
{
DefaultIndexViewLayout
}
from
'@components'
;
{{#
page
.
ctrls
}}
{{#
eq
controlType
"APPMENU"
}}
import
{
{{
codeName
}}
Menu
}
from
'@widgets/app/
{{
codeName
.
spinalCase
}}
-menu'
;
{{/
eq
}}
{{/
page
.
ctrls
}}
// props声明和默认值处理
interface
Props
{
context
:
IParam
;
viewParams
?:
IParam
;
openType
?:
"ROUTE"
|
"MODAL"
|
"EMBED"
;
viewSubject
?:
Subject
<
IActionParam
>
;
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
// 设定默认值,可选属性可以在这初始化
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
()
})
// emit声明
interface
ViewEmit
{
(
name
:
"CLOSE"
,
value
:
IActionParam
):
void
;
(
name
:
"VIEWCHANGE"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块,提供状态和能力方法
//const { state } = new EditView(ViewConfig).moduleInstall(props);
const
collapsed
:
Ref
<
boolean
>
=
ref
(
false
);
</script>
<template>
<DefaultIndexViewLayout
class=
"ibiz-index-view"
menuAlign=
"LEFT"
:collapsed=
"collapsed"
>
<template
#
header
>
<div
class=
"index-view-header"
>
<MenuUnfoldOutlined
v-if=
"collapsed"
class=
"trigger"
@
click=
"() => (collapsed = !collapsed)"
/>
<MenuFoldOutlined
v-else
class=
"trigger"
@
click=
"() => (collapsed = !collapsed)"
/>
</div>
</template>
<template
#
user
>
</template>
<template
#
menu
>
<
{{#
page
.
ctrls
}}{{#
eq
controlType
"APPMENU"
}}{{
codeName
}}
Menu
{{/
eq
}}{{/
page
.
ctrls
}}
ref=
"menu"
name=
"menu"
menuAlign=
"LEFT"
:viewState=
"viewState"
:contextProp=
"context"
:viewParamsProp=
"viewParams"
>
</
{{#
page
.
ctrls
}}{{#
eq
controlType
"APPMENU"
}}{{
codeName
}}
Menu
{{/
eq
}}{{/
page
.
ctrls
}}
>
</template>
<template
#
content
>
<router-view
/>
</template>
</DefaultIndexViewLayout>
</template>
<style
lang=
"scss"
>
.ibiz-index-view
{
.index-view-header
{
font-size
:
18px
;
>.
trigger
:
hover
{
color
:
#1890ff
;
}
}
}
</style>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages}}/{{pages@DEEDITVIEW}}-config.ts.hbs
浏览文件 @
25d014e6
...
@@ -20,7 +20,7 @@ export const ViewConfig = {
...
@@ -20,7 +20,7 @@ export const ViewConfig = {
action:{
action:{
'createAction': 'Create'
'createAction': 'Create'
}
}
}
}
,
{{/
eq
}}
{{/
eq
}}
{{/
page
.
ctrls
}}
{{/
page
.
ctrls
}}
};
};
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages}}/{{pages@DEEDITVIEW}}.vue.hbs
浏览文件 @
25d014e6
<script
setup
lang=
"ts"
>
<script
setup
lang=
"ts"
>
import
{
Subject
}
from
'rxjs'
import
{
Subject
}
from
'rxjs'
;
import
{
EditView
,
IActionParam
}
from
'@ibiz-core'
import
{
EditView
,
IActionParam
,
IParam
}
from
'@ibiz-core'
;
import
{
ViewConfig
}
from
'./
{{
page
.
codeName
.
spinalCase
}}
-config'
import
{
ViewConfig
}
from
'./
{{
page
.
codeName
.
spinalCase
}}
-config'
;
{{#
page
.
ctrls
}}
{{#
page
.
ctrls
}}
{{#
neq
controlType
"TOOLBAR
"
}}
{{#
eq
controlType
"FORM
"
}}
import
{
{{
codeName
}}
}
from
'@widgets/
{{
appEntity
.
codeName
.
spinalCase
}}
/
{{
codeName
.
spinalCase
}}
'
;
import
{
{{
codeName
}}
Form
}
from
'@widgets/
{{
appEntity
.
codeName
.
spinalCase
}}
/
{{
codeName
.
spinalCase
}}
-form
'
;
{{/
n
eq
}}
{{/
eq
}}
{{/
page
.
ctrls
}}
{{/
page
.
ctrls
}}
import
{
IbizDefaultViewLayout
,
IbizIconText
}
from
'@components'
;
import
{
IbizDefaultViewLayout
,
IbizIconText
}
from
'@components'
;
// props声明和默认值处理
// props声明和默认值处理
interface
Props
{
interface
Props
{
context
:
any
;
context
:
IParam
;
viewParams
?:
any
;
viewParams
?:
IParam
;
openType
?:
"ROUTE"
|
"MODAL"
|
"EMBED"
;
openType
?:
"ROUTE"
|
"MODAL"
|
"EMBED"
;
viewSubject
?:
Subject
<
any
>
;
viewSubject
?:
Subject
<
IActionParam
>
;
}
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
// 设定默认值,可选属性可以在这初始化
// 设定默认值,可选属性可以在这初始化
viewSubject
:
()
=>
new
Subject
<
any
>
()
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
()
})
})
// emit声明
// emit声明
...
@@ -43,18 +43,18 @@ const { state } = new EditView(ViewConfig).moduleInstall(props);
...
@@ -43,18 +43,18 @@ const { state } = new EditView(ViewConfig).moduleInstall(props);
<template
v-slot:header-right
>
<template
v-slot:header-right
>
<span>
工具栏部件
</span>
<span>
工具栏部件
</span>
</template>
</template>
<
EditForm
<
{{#
page
.
ctrls
}}{{#
eq
controlType
"FORM"
}}{{
codeName
}}
Form
{{/
eq
}}{{/
page
.
ctrls
}}
:showBusyIndicator=
"true"
:showBusyIndicator=
"true"
:context=
"state.context"
:context=
"state.context"
:viewParams=
"state.viewParams"
:viewParams=
"state.viewParams"
:controlAction=
"state.controlsAction"
:controlAction=
"state.controlsAction"
:viewSubject=
"state.viewSubject"
:viewSubject=
"state.viewSubject"
></
EditForm
>
></
{{#
page
.
ctrls
}}{{#
eq
controlType
"FORM"
}}{{
codeName
}}
Form
{{/
eq
}}{{/
page
.
ctrls
}}
>
</IbizDefaultViewLayout>
</IbizDefaultViewLayout>
</template>
</template>
<style
scoped
>
<style
lang=
"scss"
>
.ibiz-
view-container
{
.ibiz-
edit-view
{
height
:
100%
;
height
:
100%
;
width
:
100%
;
width
:
100%
;
}
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/router/index.ts
0 → 100644
浏览文件 @
25d014e6
import
{
createRouter
,
createWebHashHistory
}
from
'vue-router'
;
import
{
JobsInfoEditView
}
from
'@page/jobs-info/jobs-info-edit-view'
;
const
routes
=
[
{
path
:
'/JobsInfoEditView'
,
component
:
JobsInfoEditView
},
{
path
:
'/'
,
redirect
:
'JobsInfoEditView'
},
]
const
router
=
createRouter
({
history
:
createWebHashHistory
(),
routes
,
})
/**
* 全局路由守卫
*/
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
next
();
})
export
default
router
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@APPMENU}}-menu/index.ts.hbs
0 → 100644
浏览文件 @
25d014e6
import
{{
ctrl
.
codeName
}}
Menu from "./
{{
ctrl
.
codeName
.
spinalCase
}}
-menu.vue";
export {
{{
ctrl
.
codeName
}}
Menu };
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu-config.ts.hbs
0 → 100644
浏览文件 @
25d014e6
export const CtrlConfig = {
ctrlCodeName: '
{{
ctrl
.
codeName
}}
',
ctrlName: '
{{
ctrl
.
name
}}
',
ctrlCaption: '
{{
ctrl
.
caption
}}
',
};
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu.vue.hbs
0 → 100644
浏览文件 @
25d014e6
<script
setup
lang=
"ts"
>
import
{
getCurrentInstance
,
onBeforeMount
,
onUnmounted
,
Ref
,
ref
}
from
"vue"
;
import
{
Subject
,
Subscription
}
from
"rxjs"
;
import
{
CtrlConfig
}
from
'./
{{
ctrl
.
codeName
.
spinalCase
}}
-menu-config'
;
import
{
useContextParams
,
handleMenusResource
,
menuSelect
}
from
"@core"
;
import
{
IParam
,
IActionParam
}
from
"@ibiz-core"
;
import
{
IbizMenuItem
}
from
"@components"
;
import
{
useRoute
,
useRouter
}
from
"vue-router"
;
interface
MenuProps
{
/**
* @description 部件名称
*/
name
:
string
;
/**
* @description 传入上下文
*/
contextProp
:
IParam
;
/**
* @description 传入视图参数
*/
viewParamsProp
?:
IParam
;
/**
* @description 视图状态
*/
viewState
:
Subject
<
IActionParam
>
;
/**
* @description 菜单方向
*/
menuAlign
:
"LEFT"
|
"TOP"
|
"CENTER"
|
"TABEXP_LEFT"
|
"TABEXP_TOP"
|
"TABEXP_RIGHT"
|
"TABEXP_BOTTOM"
|
"NONE"
;
/**
* @description 默认视图
*/
defaultView
:
string
;
}
const
props
=
withDefaults
(
defineProps
<
MenuProps
>
(),
{
menuAlign
:
"LEFT"
,
});
const
{
context
,
viewParams
}
=
useContextParams
(
props
);
let
viewStateEvent
:
Subscription
|
undefined
;
const
menu
=
getCurrentInstance
()?.
vnode
;
defineExpose
({
menu
})
/**
* @description 菜单项集合
*/
const
menus
:
Ref
<
IParam
[]
>
=
ref
([
{
id
:
"1"
,
title
:
"菜单项1"
,
expanded
:
true
,
items
:
[
{
id
:
"3"
,
title
:
"菜单项3"
,
},
{
id
:
"4"
,
title
:
"编辑视图"
,
openDefault
:
true
,
funcTag
:
"1"
,
},
]
},
{
id
:
"2"
,
title
:
"菜单项2"
,
}
]);
const
defaultOpens
:
Ref
<
string
[]
>
=
ref
([]);
const
defaultSelect
:
Ref
<
string
[]
>=
ref
([]);
const
router
=
useRouter
();
const
route
=
useRoute
();
/**
* @description 应用功能集合
*/
const
funcs
:
IParam
[]
=
[{
funcTag
:
"1"
,
}];
const
modelParam
=
{
funcs
:
funcs
,
}
const
runtimeParam
=
{
menus
:
menus
,
context
:
context
,
defaultView
:
props
.
defaultView
,
authService
:
{},
defaultOpens
:
defaultOpens
,
defaultSelect
:
defaultSelect
,
viewParams
:
viewParams
,
mode
:
props
.
menuAlign
,
router
:
router
,
route
:
route
,
}
const
onSelect
=
(
item
:
any
,
key
:
any
,
selectedKeys
:
any
)
=>
{
menuSelect
(
modelParam
,
runtimeParam
);
}
onBeforeMount
(()
=>
{
if
(
props
.
viewState
)
{
viewStateEvent
=
props
.
viewState
.
subscribe
(({
tag
,
action
,
data
}:
IActionParam
)
=>
{
if
(
Object
.
is
(
tag
,
props
.
name
))
{
switch
(
action
)
{
case
'load'
:
handleMenusResource
(
modelParam
,
runtimeParam
);
break
;
}
}
});
}
})
onUnmounted
(()
=>
{
if
(
viewStateEvent
)
{
viewStateEvent
.
unsubscribe
();
}
})
</script>
<template>
<a-menu
v-model:openKeys=
"defaultOpens"
v-model:selectedKeys=
"defaultSelect"
:mode=
"Object.is('LEFT', menuAlign) ? 'inline' : 'horizontal'"
@
select=
"onSelect"
>
<IbizMenuItem
:items=
"menus"
/>
</a-menu>
</template>
<style
scoped
>
</style>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/index.ts.hbs
0 → 100644
浏览文件 @
25d014e6
import
{{
ctrl
.
codeName
}}
Form from "./
{{
ctrl
.
codeName
.
spinalCase
}}
-form.vue";
export {
{{
ctrl
.
codeName
}}
Form };
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form-config.ts.hbs
0 → 100644
浏览文件 @
25d014e6
export const CtrlConfig = {
ctrlCodeName: '
{{
ctrl
.
codeName
}}
',
ctrlName: '
{{
ctrl
.
name
}}
',
ctrlCaption: '
{{
ctrl
.
caption
}}
',
};
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls}}-form/{{ctrls@FORM}}-form-service.ts.hbs
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls
@FORM
}}-form/{{ctrls@FORM}}-form-service.ts.hbs
浏览文件 @
25d014e6
文件已移动
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form.vue.hbs
0 → 100644
浏览文件 @
25d014e6
{{>
@macro
/
components
/
include-ctrls
.
hbs
}}
<script
setup
lang=
"ts"
>
import
{
Subject
}
from
'rxjs'
;
import
{
CtrlConfig
}
from
'./
{{
ctrl
.
codeName
.
spinalCase
}}
-form-config'
;
import
{
FormControl
,
IActionParam
,
IParam
,
ControlAction
}
from
'@ibiz-core'
;
import
{
IbizFormItem
,
IbizFormGroup
}
from
'@components'
;
interface
Props
{
context
:
IParam
;
viewParams
?:
IParam
;
controlAction
:
ControlAction
;
showBusyIndicator
?:
boolean
;
viewSubject
?:
Subject
<
IActionParam
>
;
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
(),
showBusyIndicator
:
true
,
})
// emit声明
interface
CtrlEmit
{
(
name
:
"Ctrl"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
}
=
new
FormControl
(
CtrlConfig
).
moduleInstall
(
props
);
</script>
<template>
<a-form
name=
"
{{
ctrl
.
codeName
}}
"
class=
"ibiz-form
{{#if
ctrl
.
pSSysCss
}}
{{
ctrl
.
pSSysCss
.
cssName
}}{{/if}}{{#if
ctrl
.
infoFormMode
}}
ibiz-info-form
{{/if}}
"
style=
"
{{#if
ctrl
.
formWidth
}}
width:
{{
ctrl
.
formWidth
}}
px;
{{/if}}
"
:model=
"data"
:rules=
"rules"
>
{{#if
ctrl
.
noTabHeader
}}
{{#
each
ctrl
.
psDEFormPages
as
|
ctrlPage
|
}}
{{#
each
ctrlPage
.
pSDEFormDetails
as
|
formDetail
|
}}
{{>
(
lookup
.
'formDetail.detailType'
)
item
=
formDetail
}}
{{/
each
}}
{{/
each
}}
{{else}}
<a-tabs
class=
"app-form-page"
>
{{#
each
ctrl
.
psDEFormPages
as
|
ctrlPage
|
}}
{{>
(
lookup
.
'ctrlPage.detailType'
)
item
=
ctrlPage
}}
{{/
each
}}
</a-tabs>
{{/if}}
</a-form>
</template>
<style
lang=
"scss"
>
.ibiz-form
{
margin
:
20px
;
}
</style>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls}}-form/{{ctrls@FORM}}-form.vue.hbs
已删除
100644 → 0
浏览文件 @
5fcc7d67
{{!引用子模板注册器 include}}
{{>
@macro
/
components
/
include-ctrls
.
hbs
}}
<template>
<a-form
name=
"
{{
ctrl
.
codeName
}}
"
class=
"app-form
{{#if
ctrl
.
pSSysCss
}}
{{
ctrl
.
pSSysCss
.
cssName
}}{{/if}}{{#if
ctrl
.
infoFormMode
}}
info-form-mode
{{/if}}
"
style=
"
{{#if
ctrl
.
formWidth
}}
width:
{{
ctrl
.
formWidth
}}
px;
{{/if}}
"
:model=
"data"
:rules=
"rules"
>
{{#if
ctrl
.
noTabHeader
}}
{{#
each
ctrl
.
psDEFormPages
as
|
ctrlPage
|
}}
{{#
each
ctrlPage
.
pSDEFormDetails
as
|
formDetail
|
}}
{{>
(
lookup
.
'formDetail.detailType'
)
item
=
formDetail
}}
{{/
each
}}
{{/
each
}}
{{else}}
<a-tabs
class=
"app-form-page"
>
{{#
each
ctrl
.
psDEFormPages
as
|
ctrlPage
|
}}
{{>
(
lookup
.
'ctrlPage.detailType'
)
formPage
=
ctrlPage
}}
{{/
each
}}
</a-tabs>
{{/if}}
</a-form>
</template>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/tsconfig.json
浏览文件 @
25d014e6
...
@@ -21,6 +21,8 @@
...
@@ -21,6 +21,8 @@
"@components/*"
:[
"src/components/*"
],
"@components/*"
:[
"src/components/*"
],
"@views"
:[
"src/views"
],
"@views"
:[
"src/views"
],
"@views/*"
:[
"src/views/*"
],
"@views/*"
:[
"src/views/*"
],
"@page"
:[
"src/page"
],
"@page/*"
:[
"src/page/*"
],
"@widgets"
:[
"src/widgets"
],
"@widgets"
:[
"src/widgets"
],
"@widgets/*"
:[
"src/widgets/*"
],
"@widgets/*"
:[
"src/widgets/*"
],
"@static"
:[
"public"
],
"@static"
:[
"public"
],
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/vite.config.ts
浏览文件 @
25d014e6
...
@@ -15,6 +15,7 @@ export default defineConfig({
...
@@ -15,6 +15,7 @@ export default defineConfig({
'@service'
:
path
.
resolve
(
__dirname
,
'src/service'
),
'@service'
:
path
.
resolve
(
__dirname
,
'src/service'
),
'@components'
:
path
.
resolve
(
__dirname
,
'src/components'
),
'@components'
:
path
.
resolve
(
__dirname
,
'src/components'
),
'@views'
:
path
.
resolve
(
__dirname
,
'src/views'
),
'@views'
:
path
.
resolve
(
__dirname
,
'src/views'
),
'@page'
:
path
.
resolve
(
__dirname
,
'src/page'
),
'@widgets'
:
path
.
resolve
(
__dirname
,
'src/widgets'
),
'@widgets'
:
path
.
resolve
(
__dirname
,
'src/widgets'
),
'@static'
:
path
.
resolve
(
__dirname
,
'public'
),
'@static'
:
path
.
resolve
(
__dirname
,
'public'
),
'@'
:
path
.
resolve
(
__dirname
,
'src'
),
'@'
:
path
.
resolve
(
__dirname
,
'src'
),
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/vue.config.js.hbs
浏览文件 @
25d014e6
...
@@ -45,7 +45,7 @@ module.exports = {
...
@@ -45,7 +45,7 @@ module.exports = {
config.plugins.delete('prefetch-apiview')
config.plugins.delete('prefetch-apiview')
config.resolve.alias
config.resolve.alias
.set('@ibizsys', resolve('src/ibizsys'))
.set('@ibizsys', resolve('src/ibizsys'))
.set('@page
s', resolve('src/pages
'))
.set('@page
', resolve('src/page
'))
.set('@components', resolve('src/components'))
.set('@components', resolve('src/components'))
.set('@widgets', resolve('src/widgets'))
.set('@widgets', resolve('src/widgets'))
.set('@engine', resolve('src/engine'))
.set('@engine', resolve('src/engine'))
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录