Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
c235e785
提交
c235e785
编写于
1月 20, 2022
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:新增登录界面,调整树导航,忽略png
上级
8be0ecd3
变更
11
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
697 行增加
和
20 行删除
+697
-20
.ibizlab-generator-ignore
...ore/src/main/resources/templ/r7/.ibizlab-generator-ignore
+2
-1
background.png
...urces/templ/r7/app_{{apps}}/src/assets/img/background.png
+0
-0
dingding.svg
...sources/templ/r7/app_{{apps}}/src/assets/img/dingding.svg
+1
-0
qiyeweixin.svg
...urces/templ/r7/app_{{apps}}/src/assets/img/qiyeweixin.svg
+1
-0
login.vue
...ces/templ/r7/app_{{apps}}/src/components/common/login.vue
+571
-0
exp-bar-control.ts
...c/core/modules/widgets/exp-bar-control/exp-bar-control.ts
+63
-4
tree-control-state.ts
...c/core/modules/widgets/tree-control/tree-control-state.ts
+2
-2
tree-control.ts
...s}}/src/core/modules/widgets/tree-control/tree-control.ts
+24
-7
tree-exp-bar-control.ts
...ules/widgets/tree-exp-bar-control/tree-exp-bar-control.ts
+22
-1
index.ts.hbs
...n/resources/templ/r7/app_{{apps}}/src/router/index.ts.hbs
+5
-0
{{ctrls@TREEEXPBAR}}-tree-exp-bar.vue.hbs
...}}-tree-exp-bar/{{ctrls@TREEEXPBAR}}-tree-exp-bar.vue.hbs
+6
-5
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/.ibizlab-generator-ignore
浏览文件 @
c235e785
**.ibizlab-generator-ignore
**.DS_Store
**@macro/**
\ No newline at end of file
**@macro/**
**.png
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/assets/img/background.png
0 → 100644
浏览文件 @
c235e785
145.0 KB
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/assets/img/dingding.svg
0 → 100644
浏览文件 @
c235e785
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
t=
"1616652640756"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"651"
width=
"48"
height=
"48"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
><defs><style
type=
"text/css"
></style></defs><path
d=
"M512 2C230.2 2 2 230.2 2 512s228.2 510 510 510 510-228.2 510-510S793.3 2 512 2z m235.9 442c-1 4.6-3.6 10.8-7.2 19.1l-0.5 0.5c-21.6 45.8-77.3 135.5-77.3 135.5l-0.5-0.5-16.5 28.3h78.8L574.3 826.8l34-136h-61.8l21.6-90.2c-17.5 4.1-38.1 9.8-62.3 18 0 0-33 19.1-94.8-37.1 0 0-41.7-37.1-17.5-45.8 10.3-4.1 50-8.8 81.4-12.9 42.2-5.7 68.5-8.8 68.5-8.8s-130.3 2.1-161.2-3.1c-30.9-4.6-70.1-56.7-78.3-102 0 0-12.9-24.7 27.8-12.9 40.2 11.8 209.2 45.8 209.2 45.8S321.4 375 307 358.5c-14.4-16.5-42.8-89.6-39.2-134.5 0 0 1.5-11.3 12.9-8.2 0 0 161.8 74.2 272.5 114.4C664.5 371.4 760.8 392 747.9 444z"
fill=
"#3296FA"
p-id=
"652"
></path></svg>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/assets/img/qiyeweixin.svg
0 → 100644
浏览文件 @
c235e785
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
t=
"1616652700601"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"973"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"48"
height=
"48"
><defs><style
type=
"text/css"
></style></defs><path
d=
"M512 2c281.7 0 510 228.3 510 510s-228.3 510-510 510S2 793.7 2 512 230.3 2 512 2z m159.8 680.3c-4 3.9-4 10.2-0.2 14.1 0.4 0.5 0.9 0.9 1.5 1.2 22.1 20.4 36.4 47.9 40.4 77.7 6.2 22.4 29.7 35.7 52.4 29.5 22.5-5.9 35.9-28.9 30-51.3 0-0.1-0.1-0.2-0.1-0.4-4.7-16.8-19.3-29.1-36.7-30.8-28-5.1-53.5-19.2-72.8-40.1-4.1-3.8-10.5-3.8-14.5 0.1z m-225.7-483c-76.4 8.3-145.8 40.6-195.6 91-19.4 19.4-35.5 41.8-47.8 66.3-37.7 74.9-31.4 164.4 16.5 233.2 13.5 20.2 35.8 45.4 56.1 63.3l-9.2 71.3-1 3c-0.3 0.9-0.3 1.9-0.4 2.8l-0.2 2.3 0.2 2.3c1.2 12.7 12.5 22 25.2 20.9 3.5-0.3 6.8-1.4 9.8-3.1h0.4l1.4-1 22-10.8 65.5-32.5c31.1 8.8 63.4 13.2 95.8 13 40 0.1 79.8-6.7 117.5-20.2-18.8-6-30.9-24.3-29-44-39 12.4-80.2 16.4-120.8 11.9l-6.5-0.9c-14.7-1.9-29.2-4.9-43.4-8.9-7.8-2.4-16.1-1.5-23.3 2.4l-1.8 0.9-53.9 31.3-2.3 1.4c-1.3 0.7-1.9 1-2.6 1-2-0.1-3.5-1.8-3.4-3.8l2-8.2 2.4-8.9 3.9-14.7 4.5-16.4c3-9.2-0.3-19.2-8.2-24.8-21.1-15.5-39.5-34.4-54.4-56-37.9-54.2-43-124.8-13.3-183.8 9.9-19.5 22.9-37.4 38.4-52.9 40.9-41.6 98.3-68.1 161.9-74.9 22-2.4 44.2-2.4 66.2 0 63.2 7.2 120.4 34 161.1 75.4 15.4 15.7 28.2 33.6 37.9 53.2 12.5 24.8 19 52.3 19.1 80.1 0 2.9-0.3 5.8-0.4 8.6 16.8-10.2 38.4-7.7 52.4 6.1l1.9 2.3c3.3-41.2-4.8-82.5-23.3-119.5-12.1-24.5-28.1-46.8-47.3-66.3-52.5-52-121.4-84.3-194.9-91.7-26.4-3.4-52.9-3.5-79.1-0.7z m418.2 405.4c-7.2 1.9-13.8 5.7-19.2 11h-0.1c-6.9 6.8-11.2 15.7-12.2 25.3-5.2 27.8-19.5 53.1-40.5 72-4 3.8-4.1 10.1-0.3 14.1l0.1 0.1c4 4 10.5 4.1 14.6 0.1 0.5-0.5 0.9-0.9 1.2-1.5 20.9-21.9 48.7-36 78.7-39.8 22.8-6.1 36.2-29.2 30.1-51.6-6.2-22.5-29.6-35.8-52.4-29.7z m-160.4-42l-0.7 0.7c-20.9 22.7-49.2 37.3-79.9 41.2-22.6 5.9-36.2 28.7-30.2 51.1 1.9 7.3 5.9 14 11.3 19.3 16.7 16.4 43.7 16.4 60.4-0.1 6.8-6.8 11.1-15.7 12.2-25.2 5.3-27.8 19.6-53.1 40.7-72 4.1-3.7 4.5-10 0.9-14.1l-0.1-0.1c-4-4.2-10.4-4.5-14.6-0.8z m39.6-76.6c-7.1 1.9-13.6 5.7-18.7 10.8-16.4 16.2-16.6 42.6-0.4 59l0.5 0.5c6.9 6.8 15.9 11 25.5 12.1 28 5.1 53.6 19.1 72.9 39.9 4 4 10.4 4 14.4 0.1 4-3.8 4.1-10.1 0.3-14.1-0.5-0.5-1.1-1-1.7-1.4-22.1-20.4-36.4-47.8-40.4-77.6-6.1-22.4-29.6-35.5-52.4-29.3z"
fill=
"#0082EF"
p-id=
"974"
></path></svg>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/login.vue
0 → 100644
浏览文件 @
c235e785
此差异已折叠。
点击以展开。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/exp-bar-control/exp-bar-control.ts
浏览文件 @
c235e785
import
{
IActionParam
,
MainControl
}
from
"@core"
;
import
{
IActionParam
,
IParam
,
MainControl
}
from
"@core"
;
import
{
ExpBarControlProps
}
from
"./exp-bar-control-prop"
;
import
{
ExpBarControlState
}
from
"./exp-bar-control-state"
;
...
...
@@ -16,6 +16,40 @@ export class ExpBarControl extends MainControl {
*/
public
declare
state
:
ExpBarControlState
;
/**
* 当前视图表格部件
*
* @type {IParam}
* @memberof GridView
*/
public
declare
xData
:
IParam
;
/**
* 通知状态
*
* @param { tag: string, action: string, data: any } { tag, action, data }
* @memberof ViewEngine
*/
public
next
({
tag
,
action
,
data
}:
{
tag
:
string
,
action
:
string
,
data
:
any
}):
void
{
const
{
viewSubject
}
=
this
.
props
;
viewSubject
.
next
({
tag
:
tag
,
action
:
action
,
data
:
data
})
}
/**
* @description 导航部件初始化
* @protected
* @memberof ExpBarControl
*/
protected
useExpCtrlInit
()
{
this
.
xData
=
ref
(
null
);
onMounted
(()
=>
{
const
xDataControl
=
this
.
getXDataCtrl
();
if
(
xDataControl
)
{
this
.
next
({
tag
:
xDataControl
.
name
,
action
:
'load'
,
data
:
null
});
}
})
}
/**
* @description 处理部件事件
* @param {IActionParam} actionParam
...
...
@@ -31,10 +65,19 @@ export class ExpBarControl extends MainControl {
}
}
protected
onSelectionChange
(
data
:
any
[])
{
console
.
log
(
"处理选中事件"
,
data
);
}
/**
* @description 处理选中事件
* @protected
* @param {any[]} data
* @memberof ExpBarControl
*/
protected
onSelectionChange
(
data
:
any
[])
{
}
/**
* @description 计算工具栏权限
* @param {boolean} state
* @memberof ExpBarControl
*/
public
calcToolbarItemState
(
state
:
boolean
)
{
// TODO 计算工具栏权限
// let _this: any = this;
...
...
@@ -57,6 +100,10 @@ export class ExpBarControl extends MainControl {
// }
}
/**
* @description 计算导航栏工具栏权限
* @memberof ExpBarControl
*/
public
calcNavigationToolbarState
()
{
let
_this
:
any
=
this
;
if
(
_this
.
toolbarModels
)
{
...
...
@@ -64,6 +111,16 @@ export class ExpBarControl extends MainControl {
}
}
/**
* @description 获取多数据部件
* @private
* @return {*}
* @memberof ExpBarControl
*/
private
getXDataCtrl
()
{
return
unref
(
this
.
xData
);
}
/**
* @description 安装部件所有功能模块的方法
* @return {*}
...
...
@@ -71,8 +128,10 @@ export class ExpBarControl extends MainControl {
*/
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
this
.
useExpCtrlInit
();
return
{
...
superParams
,
xData
:
this
.
xData
,
onCtrlEvent
:
this
.
onCtrlEvent
.
bind
(
this
)
};
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/tree-control/tree-control-state.ts
浏览文件 @
c235e785
import
{
M
ain
ControlState
}
from
"@core"
;
import
{
M
D
ControlState
}
from
"@core"
;
/**
* @description 树部件通讯对象
...
...
@@ -6,6 +6,6 @@ import { MainControlState } from "@core";
* @interface TreeControlState
* @extends {MainControlState}
*/
export
interface
TreeControlState
extends
M
ain
ControlState
{
export
interface
TreeControlState
extends
M
D
ControlState
{
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/tree-control/tree-control.ts
浏览文件 @
c235e785
import
{
deepCopy
,
deepObjectMerge
,
IActionParam
,
M
ain
Control
}
from
"@core"
;
import
{
deepCopy
,
deepObjectMerge
,
IActionParam
,
M
D
Control
}
from
"@core"
;
import
{
TreeControlProps
}
from
"./tree-control-prop"
;
import
{
TreeControlState
}
from
"./tree-control-state"
;
...
...
@@ -8,7 +8,7 @@ import { TreeControlState } from "./tree-control-state";
* @class TreeControl
* @extends {MainControl}
*/
export
class
TreeControl
extends
M
ain
Control
{
export
class
TreeControl
extends
M
D
Control
{
/**
* @description 部件状态
* @type {TreeControlState}
...
...
@@ -68,6 +68,16 @@ export class TreeControl extends MainControl {
return
tempContext
;
}
/**
* @description 加载数据
* @protected
* @param {*} node 树节点
* @param {boolean} [isFirst]
* @return {*} {Promise<any>}
* @memberof TreeControl
*/
protected
async
load
(
node
:
any
,
isFirst
?:
boolean
):
Promise
<
any
>
{}
/**
* @description 使用加载功能模块
* @return {*}
...
...
@@ -75,7 +85,7 @@ export class TreeControl extends MainControl {
*/
public
useLoad
()
{
const
{
viewSubject
,
controlName
}
=
this
.
state
;
const
load
=
async
(
node
:
any
,
isFirst
:
boolean
=
false
)
=>
{
const
load
=
async
(
node
?:
any
,
isFirst
:
boolean
=
false
):
Promise
<
any
>
=>
{
if
(
node
?.
dataRef
?.
children
)
{
return
null
;
}
...
...
@@ -86,7 +96,7 @@ export class TreeControl extends MainControl {
let
curNode
:
any
=
{};
curNode
=
deepObjectMerge
(
curNode
,
node
);
const
params
:
any
=
{
srfnodeid
:
node
.
dataRef
&&
node
.
dataRef
.
id
?
node
.
dataRef
.
id
:
'#'
,
srfnodeid
:
node
?
.
dataRef
&&
node
.
dataRef
.
id
?
node
.
dataRef
.
id
:
'#'
,
srfnodefilter
:
srfnodefilter
,
parentData
:
curNode
.
dataRef
?.
curData
}
...
...
@@ -113,7 +123,7 @@ export class TreeControl extends MainControl {
// TODO 展开
// this.formatExpanded(items);
// this.formatAppendCaption(items);
const
isRoot
=
Object
.
is
(
node
.
level
,
0
);
const
isRoot
=
Object
.
is
(
node
?
.
level
,
0
);
if
(
isFirst
)
{
data
.
splice
(
0
,
data
.
length
);
items
.
forEach
((
item
:
any
)
=>
{
...
...
@@ -122,7 +132,7 @@ export class TreeControl extends MainControl {
}
else
{
node
.
dataRef
.
children
=
items
;
}
const
isSelectedAll
=
node
.
checked
;
const
isSelectedAll
=
node
?
.
checked
;
// TODO 默认选中
// this.setDefaultSelection(items, isRoot, isSelectedAll);
this
.
emit
(
"ctrlEvent"
,
{
tag
:
this
.
props
.
name
,
action
:
"load"
,
data
:
items
});
...
...
@@ -130,10 +140,17 @@ export class TreeControl extends MainControl {
console
.
error
(
error
);
}
}
// 在类里绑定能力方法
this
.
load
=
load
;
// 订阅viewSubject,监听load行为
if
(
viewSubject
)
{
let
subscription
=
viewSubject
.
subscribe
(({
tag
,
action
,
data
}:
IActionParam
)
=>
{
if
(
Object
.
is
(
controlName
,
tag
)
&&
Object
.
is
(
"load"
,
action
))
{
if
(
!
Object
.
is
(
controlName
,
tag
))
{
return
;
}
if
(
Object
.
is
(
"load"
,
action
))
{
load
(
data
,
true
);
}
})
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/tree-exp-bar-control/tree-exp-bar-control.ts
浏览文件 @
c235e785
...
...
@@ -15,6 +15,13 @@ export class TreeExpBarControl extends ExpBarControl {
*/
public
declare
state
:
TreeExpBarControlState
;
/**
* @description 选中数据变化
* @protected
* @param {any[]} args
* @return {*}
* @memberof TreeExpBarControl
*/
protected
onSelectionChange
(
args
:
any
[])
{
if
(
args
.
length
==
0
)
{
this
.
calcToolbarItemState
(
true
);
...
...
@@ -26,7 +33,7 @@ export class TreeExpBarControl extends ExpBarControl {
return
;
}
const
nodeType
=
arg
.
id
.
split
(
';'
)[
0
];
//
const refView: any = this.get
//
获取导航视图
const
refView
=
this
.
getExpItemView
({
nodeType
:
nodeType
});
// TODO 选择视图面板支持
if
(
refView
)
{
...
...
@@ -45,6 +52,13 @@ export class TreeExpBarControl extends ExpBarControl {
}
}
/**
* @description 获取导航视图
* @protected
* @param {*} [arg={}]
* @return {*} {(IParam | null)}
* @memberof TreeExpBarControl
*/
protected
getExpItemView
(
arg
:
any
=
{}):
IParam
|
null
{
const
expMode
:
string
=
`EXPITEM:
${
arg
.
nodeType
}
`
;
const
{
viewRefs
}
=
this
.
state
;
...
...
@@ -56,6 +70,13 @@ export class TreeExpBarControl extends ExpBarControl {
}
}
/**
* @description 计算导航参数
* @protected
* @param {*} arg
* @return {*} \{{ tempContext: any, tempViewParams: any }}
* @memberof TreeExpBarControl
*/
protected
computeNavParams
(
arg
:
any
):
{
tempContext
:
any
,
tempViewParams
:
any
}
{
const
tempContext
:
any
=
{};
const
tempViewParams
:
any
=
{};
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/router/index.ts.hbs
浏览文件 @
c235e785
...
...
@@ -37,6 +37,11 @@ const routes = [
path: "/",
redirect: "/apps/
{{
lowerCase
app
.
codeName
}}
"
},
{
path: '/login',
name: 'login',
component: () => import("@components/common/login.vue")
}
]
const router = createRouter({
history: createWebHashHistory(),
...
...
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
浏览文件 @
c235e785
...
...
@@ -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.getAppViewRefs as | viewRef |}}
{{#
each
ctrl
.
getAppViewRefs
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
;
...
...
@@ -35,7 +35,7 @@ interface CtrlEmit {
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
onCtrlEvent
}
=
new
TreeExpBarControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
state
,
onCtrlEvent
,
xData
}
=
new
TreeExpBarControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
...
...
@@ -49,6 +49,7 @@ defineExpose({ state, name: '{{ctrl.name}}' });
{{#
ctrl
.
ctrls
}}
{{#
eq
controlType
"TREEVIEW"
}}
<
{{
codeName
}}
Tree
ref=
"xData"
:context=
"state.context"
:viewParams=
"state.viewParams"
:viewSubject=
"state.viewSubject"
...
...
@@ -59,7 +60,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 +69,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
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录