Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
52d5ce41
提交
52d5ce41
编写于
1月 17, 2022
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新打包逻辑
上级
86857734
变更
7
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
33 行增加
和
8 行删除
+33
-8
CtrlModel.java
...ore/src/main/java/cn/ibizlab/codegen/model/CtrlModel.java
+19
-1
PageModel.java
...ore/src/main/java/cn/ibizlab/codegen/model/PageModel.java
+1
-1
package.json
...ore/src/main/resources/templ/r7/app_{{apps}}/package.json
+1
-0
index.ts.hbs
...n/resources/templ/r7/app_{{apps}}/src/router/index.ts.hbs
+2
-0
{{ctrls@FORM}}-form-state.ts.hbs
...es}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form-state.ts.hbs
+1
-1
{{ctrls@TREEEXPBAR}}-tree-exp-bar.vue.hbs
...}}-tree-exp-bar/{{ctrls@TREEEXPBAR}}-tree-exp-bar.vue.hbs
+4
-4
vite.config.ts
...e/src/main/resources/templ/r7/app_{{apps}}/vite.config.ts
+5
-1
未找到文件。
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/CtrlModel.java
浏览文件 @
52d5ce41
...
...
@@ -5,11 +5,13 @@ import lombok.Getter;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.experimental.Accessors
;
import
net.ibizsys.model.app.view.IPSAppViewRef
;
import
net.ibizsys.model.control.IPSControl
;
import
net.ibizsys.model.control.
layout.IPSGridLayoutPos
;
import
net.ibizsys.model.control.
IPSControlContainer
;
import
java.util.Collection
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
@Getter
...
...
@@ -32,6 +34,16 @@ public class CtrlModel extends BaseModel{
this
.
setId
(
String
.
format
(
"%1$s-%2$s-%3$s-%4$s"
,
app
.
getCodeName
(),
folder
,
psControl
.
getName
(),
psControl
.
getCodeName
()));
if
(
psControl
instanceof
IPSControlContainer
){
List
<
IPSAppViewRef
>
IPSAppViewRefs
=
((
IPSControlContainer
)
psControl
).
getPSAppViewRefs
();
if
(
IPSAppViewRefs
!=
null
&&
IPSAppViewRefs
.
size
()
>
0
){
IPSAppViewRefs
.
forEach
(
appViewRef
->{
if
(
viewRefMap
.
get
(
appViewRef
.
getRefPSAppView
().
getId
())
==
null
){
viewRefMap
.
put
(
appViewRef
.
getRefPSAppView
().
getId
(),
appViewRef
);
}
});
}
}
}
public
Map
<
String
,
CtrlModel
>
ctrlsMap
=
new
LinkedHashMap
();
...
...
@@ -42,6 +54,8 @@ public class CtrlModel extends BaseModel{
private
LabelExt
folder
;
private
Map
<
String
,
IPSAppViewRef
>
viewRefMap
=
new
LinkedHashMap
();
public
CtrlModel
addCtrl
(
String
codeName
,
CtrlModel
ctrlModel
)
{
if
(!
ctrlsMap
.
containsKey
(
codeName
))
...
...
@@ -68,4 +82,8 @@ public class CtrlModel extends BaseModel{
}
}
public
Collection
<
IPSAppViewRef
>
getAppViewRefs
(){
return
this
.
viewRefMap
.
values
();
}
}
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/PageModel.java
浏览文件 @
52d5ce41
...
...
@@ -59,7 +59,7 @@ public class PageModel extends BaseModel{
ctrlModel
.
setAppEntity
(
ctrlAppEntity
);
ctrlAppEntity
.
addCtrl
(
ctrlModel
.
getId
(),
ctrlModel
);
}
ctrl
.
addCtrl
(
ctrlModel
.
get
CodeName
().
toString
(),
ctrlModel
);
ctrl
.
addCtrl
(
ctrlModel
.
get
Id
(),
ctrlModel
);
if
(!
this
.
app
.
getCtrlsMap
().
containsKey
(
ctrlModel
.
getId
()))
{
this
.
app
.
getCtrlsMap
().
put
(
ctrlModel
.
getId
(),
ctrlModel
);
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/package.json
浏览文件 @
52d5ce41
{
"name"
:
"ibiz-vue3"
,
"version"
:
"0.0.0"
,
"license"
:
"MIT"
,
"scripts"
:
{
"dev"
:
"vite"
,
"build"
:
"vue-tsc --noEmit && vite build"
,
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/router/index.ts.hbs
浏览文件 @
52d5ce41
...
...
@@ -17,6 +17,7 @@ const routes = [
{{#
each
app
.
appEntityResources
as
|
appEntityResource
|
}}
{{#if
appEntityResource
.
appDataEntity
.
allPSAppViews
}}
{{#
each
appEntityResource
.
appDataEntity
.
allPSAppViews
as
|
appView
|
}}
{{#if
(
eq
appView
.
getRefFlag
true
)
}}
{{#if
(
or
(
eq
appView
.
viewType
'DEEDITVIEW'
)
(
eq
appView
.
viewType
'DEGRIDVIEW'
)
(
eq
appView
.
viewType
'DETREEEXPVIEW'
))
}}
{
path: "
{{
appEntityResource
.
path
}}
/views/
{{
lowerCase
appView
.
codeName
}}
",
...
...
@@ -26,6 +27,7 @@ const routes = [
component: () => import("@views/
{{
spinalCase
appView
.
psAppModule
.
codeName
}}
/
{{
spinalCase
appView
.
codeName
}}
"),
},
{{/if}}
{{/if}}
{{/
each
}}
{{/if}}
{{/
each
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form-state.ts.hbs
浏览文件 @
52d5ce41
{{>
@macro
/
front-end
/
widgets
/
form-detail
/
include-form
.
hbs
}}
import { ControlVOBase,
verifyRules,
EditFormService } from '@core';
import { ControlVOBase, EditFormService } from '@core';
import {
{{
pascalCase
ctrl
.
psAppDataEntity
.
codeName
}}
Service } from '@api/
{{
spinalCase
ctrl
.
psAppDataEntity
.
codeName
}}
/
{{
spinalCase
ctrl
.
psAppDataEntity
.
codeName
}}
-service';
/**
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@TREEEXPBAR}}-tree-exp-bar/{{ctrls@TREEEXPBAR}}-tree-exp-bar.vue.hbs
浏览文件 @
52d5ce41
...
...
@@ -7,11 +7,11 @@ import { ctrlState } from './{{spinalCase ctrl.codeName}}-tree-exp-bar-state';
import
{
{{
codeName
}}
Tree
}
from
'@widgets/
{{
spinalCase
appEntity
.
codeName
}}
/
{{
spinalCase
codeName
}}
-tree'
;
{{/
eq
}}
{{/
ctrl
.
ctrls
}}
{{
#
each
ctrl
.
ps
AppViewRefs
as
|
viewRef
|
}}
{{
!-- {{#each ctrl.get
AppViewRefs as | viewRef |}}
{{#if viewRef.refPSAppView}}
import {{viewRef.refPSAppView.name}} from '@views/{{spinalCase viewRef.refPSAppView.psAppModule.codeName}}/{{spinalCase viewRef.refPSAppView.codeName}}';
{{/if}}
{{/
each
}}
{{/each}}
--}}
interface
Props
{
context
:
IContext
;
...
...
@@ -59,7 +59,7 @@ defineExpose({ state, name: '{{ctrl.name}}' });
{{/
ctrl
.
ctrls
}}
</a-layout-sider>
<a-layout>
{{#
each
ctrl
.
psAppViewRefs
as
|
viewRef
|
}}
{{!--
{{#each ctrl.psAppViewRefs as | viewRef |}}
{{#if viewRef.refPSAppView}}
<{{viewRef.refPSAppView.name}}
v-if="state.selection.viewName && state.selection.viewName === '{{viewRef.refPSAppView.name}}'"
...
...
@@ -68,7 +68,7 @@ defineExpose({ state, name: '{{ctrl.name}}' });
:viewParams="JSON.stringify(state.selection.viewParams)">
</{{viewRef.refPSAppView.name}}>
{{/if}}
{{/
each
}}
{{/each}}
--}}
</a-layout>
</a-layout>
</template>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/vite.config.ts
浏览文件 @
52d5ce41
import
{
defineConfig
}
from
'vite'
;
import
vue
from
'@vitejs/plugin-vue'
;
import
path
from
'path'
;
const
{
resolve
}
=
path
;
// 自动导入element-plus
import
AutoImport
from
'unplugin-auto-import/vite'
...
...
@@ -10,7 +11,6 @@ import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
// 代码编辑器 代码提示插件
import
monacoEditorPlugin
from
"vite-plugin-monaco-editor"
;
// https://vitejs.dev/config/
export
default
defineConfig
({
resolve
:
{
alias
:
{
...
...
@@ -37,4 +37,8 @@ export default defineConfig({
}),
monacoEditorPlugin
(),
],
build
:
{
outDir
:
resolve
(
__dirname
,
'dist'
)
}
});
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录