Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
5a29d346
S
Skyeye
项目概览
doc_wei
/
Skyeye
通知
1173
Star
154
Fork
127
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Skyeye
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
5a29d346
编写于
1月 22, 2023
作者:
doc_wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
表单布局设计界面新增属性的展示
上级
bbdf5d6c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
103 addition
and
38 deletion
+103
-38
common/src/main/resources/template/js/dsFormPage/dsFormPageDesign.js
...main/resources/template/js/dsFormPage/dsFormPageDesign.js
+58
-31
common/src/main/resources/template/js/dsFormPage/pageList.js
common/src/main/resources/template/js/dsFormPage/pageList.js
+1
-1
common/src/main/resources/template/tpl/dsFormPage/dsFormPageDesign.css
...in/resources/template/tpl/dsFormPage/dsFormPageDesign.css
+20
-1
common/src/main/resources/template/tpl/dsFormPage/dsFormPageDesign.html
...n/resources/template/tpl/dsFormPage/dsFormPageDesign.html
+22
-3
web/src/main/resources/template/assets/lib/fontawesome-free-5.11.2/css/all.css
...s/template/assets/lib/fontawesome-free-5.11.2/css/all.css
+2
-2
未找到文件。
common/src/main/resources/template/js/dsFormPage/dsFormPageDesign.js
浏览文件 @
5a29d346
...
...
@@ -18,12 +18,18 @@ layui.config({
form
=
layui
.
form
;
authBtn
(
'
1567732055673
'
);
//保存控件
var
className
=
GetUrlParam
(
"
className
"
);
if
(
isNull
(
className
))
{
winui
.
window
.
msg
(
"
请传入适用对象信息
"
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
// 加载表单控件
loadLeftBoxItem
();
// 加载属性
loadClassAttr
();
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
dsformpage004
"
,
params
:
{
pageId
:
parent
.
rowId
},
type
:
'
json
'
,
method
:
'
GET
'
,
callback
:
function
(
json
)
{
// 加载表单控件
loadLeftBoxItem
();
// 加载拖拽
setup_draggable
();
// 加载页面内容
loadPageMation
(
json
);
}});
...
...
@@ -80,7 +86,7 @@ layui.config({
}
// 加载表单控件
function
loadLeftBoxItem
(){
function
loadLeftBoxItem
()
{
showGrid
({
id
:
"
btnBox
"
,
url
:
reqBasePath
+
"
queryAllDsFormComponentList
"
,
...
...
@@ -98,36 +104,57 @@ layui.config({
},
ajaxSendAfter
:
function
(
json
)
{
form
.
render
();
$
(
"
.draggable
"
).
draggable
({
appendTo
:
"
body
"
,
helper
:
"
clone
"
,
drag
:
function
(
event
,
ui
)
{},
stop
:
function
()
{}
});
$
(
"
.droppable
"
).
droppable
({
accept
:
"
.draggable
"
,
helper
:
"
clone
"
,
hoverClass
:
"
droppable-active
"
,
drop
:
function
(
event
,
ui
)
{
$
(
"
.empty-form
"
).
remove
();
var
_this
=
$
(
ui
.
draggable
);
if
(
!
_this
.
hasClass
(
"
dropped
"
))
{
getFormPageControlContent
(
_this
.
attr
(
"
rowid
"
));
}
else
{
if
(
$
(
this
)[
0
]
!=
_this
.
parent
()[
0
])
{
var
$el
=
_this
.
clone
().
appendTo
(
this
);
_this
.
remove
()
}
}
}
}).
sortable
();
}
});
}
// 加载属性
function
loadClassAttr
()
{
showGrid
({
id
:
"
attrBox
"
,
url
:
reqBasePath
+
"
queryAttrDefinitionList
"
,
params
:
{
className
:
className
},
pagination
:
false
,
method
:
'
POST
'
,
template
:
$
(
"
#leftAttrBoxItem
"
).
html
(),
ajaxSendLoadBefore
:
function
(
hdb
,
json
)
{
$
.
each
(
json
.
rows
,
function
(
i
,
item
)
{
if
(
isNull
(
item
.
dsFormComponent
))
{
item
.
class
=
"
no-choose
"
;
}
else
{
item
.
iLabelClass
=
"
i-label-class
"
;
}
});
},
ajaxSendAfter
:
function
(
json
)
{
}
});
}
var
setup_draggable
=
function
()
{
$
(
"
.draggable
"
).
draggable
({
appendTo
:
"
body
"
,
helper
:
"
clone
"
,
drag
:
function
(
event
,
ui
)
{},
stop
:
function
()
{}
});
$
(
"
.droppable
"
).
droppable
({
accept
:
"
.draggable
"
,
helper
:
"
clone
"
,
hoverClass
:
"
droppable-active
"
,
drop
:
function
(
event
,
ui
)
{
$
(
"
.empty-form
"
).
remove
();
var
_this
=
$
(
ui
.
draggable
);
if
(
!
_this
.
hasClass
(
"
dropped
"
))
{
getFormPageControlContent
(
_this
.
attr
(
"
rowid
"
));
}
else
{
if
(
$
(
this
)[
0
]
!=
_this
.
parent
()[
0
])
{
var
$el
=
_this
.
clone
().
appendTo
(
this
);
_this
.
remove
()
}
}
}
}).
sortable
();
};
function
getFormPageControlContent
(
id
)
{
var
linkedData
;
//控件关联的数据
var
defaultData
;
//选择事件的默认数据
...
...
common/src/main/resources/template/js/dsFormPage/pageList.js
浏览文件 @
5a29d346
...
...
@@ -84,7 +84,7 @@ layui.config({
function
control
(
data
)
{
rowId
=
data
.
id
;
parent
.
parent
.
_openNewWindows
({
url
:
"
../../tpl/dsFormPage/dsFormPageDesign.html
"
,
url
:
"
../../tpl/dsFormPage/dsFormPageDesign.html
?className=
"
+
objectId
,
title
:
"
表单设计
"
,
pageId
:
"
dsFormPageDesign
"
,
area
:
[
'
100vw
'
,
'
100vh
'
],
...
...
common/src/main/resources/template/tpl/dsFormPage/dsFormPageDesign.css
浏览文件 @
5a29d346
...
...
@@ -10,7 +10,6 @@
display
:
inline-block
;
background
:
#fff
;
color
:
#000
;
width
:
85px
;
height
:
70px
;
line-height
:
1
;
text-align
:
center
;
...
...
@@ -18,6 +17,26 @@
z-index
:
2
;
}
.attr-mation
{
height
:
28px
;
line-height
:
28px
;
text-align
:
left
;
padding
:
0px
10px
;
}
.no-choose
{
cursor
:
not-allowed
;
color
:
grey
;
}
.attr-mation
.fa
{
margin-right
:
5px
;
}
.attr-mation
.i-label-class
{
cursor
:
move
;
}
.btntext
:hover
{
background-color
:
#2e73ff
;
color
:
#ffffff
;
...
...
common/src/main/resources/template/tpl/dsFormPage/dsFormPageDesign.html
浏览文件 @
5a29d346
...
...
@@ -9,13 +9,22 @@
<link
href=
"dsFormPageDesign.css"
rel=
"stylesheet"
/>
</head>
<body
style=
"background-color: rgb(234, 234, 234)"
>
<div
class=
"winui-toolbar"
style=
"position: fixed; width:
100%; z-index: 100;
"
>
<div
class=
"winui-toolbar"
style=
"position: fixed; width:
calc(100% - 10px); z-index: 100; text-align: right
"
>
<div
class=
"winui-tool"
>
<button
id=
"save"
class=
"winui-toolbtn"
auth=
"1567732055673"
><i
class=
"fa fa-save"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.save"
></language></button>
</div>
</div>
<div
class=
"left-box-form"
id=
"btnBox"
>
<div
class=
"left-box-form"
>
<div
class=
"layui-tab layui-tab-brief"
>
<ul
class=
"layui-tab-title"
>
<li
class=
"layui-this"
>
基本组件
</li>
<li
class=
""
>
属性
</li>
</ul>
<div
class=
"layui-tab-content"
>
<div
class=
"layui-tab-item layui-show"
id=
"btnBox"
></div>
<div
class=
"layui-tab-item"
id=
"attrBox"
></div>
</div>
</div>
</div>
<div
class=
"center-box-form"
>
<form
class=
"layui-form droppable sortable ui-droppable ui-sortable"
action=
""
id=
"showForm"
autocomplete=
"off"
>
...
...
@@ -47,6 +56,16 @@
{{
/
each
}}
</script>
<script
type=
"text/html"
id=
"leftAttrBoxItem"
>
{{
#
each
rows
}}
<
div
class
=
"
form-group draggable ui-draggable btntext attr-mation layui-col-xs12 {{class}}
"
rowid
=
"
{{attrKey}}
"
>
<
label
class
=
"
col-sm-12 {{class}}
"
>
<
i
class
=
"
fa fa-arrows fa-fw {{iLabelClass}}
"
><
/i>{{name}
}
<
/label
>
<
/div
>
{{
/
each
}}
</script>
<script
type=
"text/html"
id=
"controlItemEdit"
>
{{
#
bean
}}
<
div
class
=
"
layui-form-item layui-col-xs12
"
>
...
...
web/src/main/resources/template/assets/lib/fontawesome-free-5.11.2/css/all.css
浏览文件 @
5a29d346
...
...
@@ -73,8 +73,8 @@
.fa-fw
{
text-align
:
center
;
width
:
1
.25
em
;
height
:
1
.25
em
;
width
:
1em
;
height
:
1em
;
}
.fa-ul
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录