Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
f294aad0
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1426
Star
162
Fork
130
代码
文件
提交
分支
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看板
提交
f294aad0
编写于
6月 29, 2024
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 新增一键同步布局信息的功能
上级
5a93fc59
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
74 addition
and
10 deletion
+74
-10
base-server/src/main/resources/template/js/operate/operateList.js
...ver/src/main/resources/template/js/operate/operateList.js
+3
-4
common/src/main/resources/template/js/dsFormPage/dsFormPageDesign.js
...main/resources/template/js/dsFormPage/dsFormPageDesign.js
+67
-2
common/src/main/resources/template/js/dsFormPage/pageList.js
common/src/main/resources/template/js/dsFormPage/pageList.js
+3
-4
common/src/main/resources/template/tpl/dsFormPage/dsFormPageDesign.html
...n/resources/template/tpl/dsFormPage/dsFormPageDesign.html
+1
-0
未找到文件。
base-server/src/main/resources/template/js/operate/operateList.js
浏览文件 @
f294aad0
...
...
@@ -26,15 +26,14 @@ layui.config({
method
:
'
post
'
,
url
:
reqBasePath
+
'
queryOperateList
'
,
where
:
getTableParams
(),
even
:
tru
e
,
page
:
tru
e
,
even
:
fals
e
,
page
:
fals
e
,
overflow
:
{
type
:
'
tips
'
,
header
:
true
,
total
:
true
},
limits
:
getLimits
(),
limit
:
getLimit
(),
limit
:
100
,
cols
:
[[
{
title
:
systemLanguage
[
"
com.skyeye.serialNumber
"
][
languageType
],
type
:
'
numbers
'
},
{
field
:
'
name
'
,
title
:
'
名称
'
,
align
:
'
left
'
,
width
:
120
},
...
...
common/src/main/resources/template/js/dsFormPage/dsFormPageDesign.js
浏览文件 @
f294aad0
...
...
@@ -24,7 +24,6 @@ layui.config({
winui
.
renderColor
();
// 复制对象
var
clipboard
;
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
var
$
=
layui
.
$
;
layedit
=
layui
.
layedit
,
form
=
layui
.
form
;
...
...
@@ -102,16 +101,82 @@ layui.config({
btn
:
[
'
确定
'
,
'
取消
'
],
yes
:
function
(
ii
,
layero
){
var
shellCode
=
layero
.
find
(
'
#shellCode
'
).
val
();
if
(
isNull
(
shellCode
))
{
winui
.
window
.
msg
(
"
请输入脚本
"
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
let
itemContent
=
JSON
.
parse
(
decodeURIComponent
(
shellCode
));
itemContent
.
attrKey
=
''
;
itemContent
.
id
=
getRandomValueToString
();
itemContent
.
attrDefinition
=
null
;
loadNewControl
(
itemContent
);
layer
.
close
(
ii
);
// 关闭页面层
layer
.
close
(
ii
);
}
});
})
// 同步至其他布局
var
selOption
=
getFileContent
(
'
tpl/template/select-option.tpl
'
);
$
(
"
body
"
).
on
(
"
click
"
,
"
#syncOtherOage
"
,
function
(
e
)
{
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
queryDsFormPageList
"
,
params
:
{
className
:
className
},
type
:
'
json
'
,
method
:
'
POST
'
,
callback
:
function
(
json
)
{
let
syncPage
=
[]
$
.
each
(
json
.
rows
,
function
(
i
,
item
)
{
let
type
=
item
.
type
;
if
(
type
==
'
edit
'
||
type
==
'
create
'
||
type
==
'
processAttr
'
)
{
// 只有新增,编辑,流程属性布局之间可以互相同步
if
(
item
.
id
!=
pageId
)
{
// 不能往自身布局同步
syncPage
.
push
({
id
:
item
.
id
,
name
:
item
.
name
+
'
[
'
+
item
.
numCode
+
'
]
'
});
}
}
});
let
selHtml
=
getDataUseHandlebars
(
selOption
,
{
rows
:
syncPage
});
layer
.
open
({
type
:
1
,
title
:
'
同步至其他布局
'
,
area
:
[
'
50vw
'
,
'
50vh
'
],
content
:
'
<div style="padding: 20px;">
'
+
'
<form class="layui-form" action="" id="showOtherPageForm" autocomplete="off" style="height: 100%">
'
+
'
<select class="otherPageId" lay-filter="otherPageId" id="otherPageId" lay-search="" win-verify="required">
'
+
selHtml
+
'
</select>
'
+
'
</form>
'
+
'
</div>
'
,
btn
:
[
'
确定
'
,
'
取消
'
],
success
:
function
(
i
)
{
form
.
render
(
'
select
'
);
},
yes
:
function
(
ii
,
layero
)
{
var
otherPageId
=
layero
.
find
(
'
#otherPageId
'
).
val
();
if
(
isNull
(
otherPageId
))
{
winui
.
window
.
msg
(
"
请选择布局
"
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
for
(
var
i
=
0
;
i
<
contentList
.
length
;
i
++
)
{
var
item
=
contentList
[
i
];
if
(
isNull
(
item
.
attrKey
)
&&
$
.
inArray
(
'
attrKeyBox
'
,
item
.
dsFormComponent
.
attrKeys
)
>=
0
)
{
winui
.
window
.
msg
(
"
存在无关联属性的组件,请移除.
"
,
{
icon
:
2
,
time
:
2000
});
initFormItemClick
(
$
(
"
#showForm div[contentId='
"
+
item
.
id
+
"
']
"
));
return
false
;
}
}
sortDataIn
();
var
params
=
{
pageId
:
otherPageId
,
dsFormPageContentList
:
encodeURIComponent
(
JSON
.
stringify
(
contentList
))
}
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
writeDsFormPageContent
"
,
params
:
params
,
type
:
'
json
'
,
method
:
'
POST
'
,
callback
:
function
(
json
)
{
winui
.
window
.
msg
(
"
同步成功
"
,
{
icon
:
1
,
time
:
2000
});
layer
.
close
(
ii
);
}});
}
});
}});
})
function
loadPageMation
(
json
)
{
$
(
"
#attrBox
"
).
html
(
getDataUseHandlebars
(
$
(
"
#leftAttrBoxItem
"
).
html
(),
{
rows
:
attrList
}));
$
.
each
(
json
.
rows
,
function
(
i
,
item
)
{
...
...
common/src/main/resources/template/js/dsFormPage/pageList.js
浏览文件 @
f294aad0
...
...
@@ -26,15 +26,14 @@ layui.config({
method
:
'
post
'
,
url
:
reqBasePath
+
'
queryDsFormPageList
'
,
where
:
getTableParams
(),
even
:
tru
e
,
page
:
tru
e
,
even
:
fals
e
,
page
:
fals
e
,
overflow
:
{
type
:
'
tips
'
,
header
:
true
,
total
:
true
},
limits
:
getLimits
(),
limit
:
getLimit
(),
limit
:
100
,
cols
:
[[
{
title
:
systemLanguage
[
"
com.skyeye.serialNumber
"
][
languageType
],
type
:
'
numbers
'
},
{
field
:
'
name
'
,
title
:
'
名称
'
,
align
:
'
left
'
,
width
:
160
},
...
...
common/src/main/resources/template/tpl/dsFormPage/dsFormPageDesign.html
浏览文件 @
f294aad0
...
...
@@ -24,6 +24,7 @@
<div
class=
"winui-toolbar center-box-form-toolbar"
>
<div
class=
"winui-tool"
>
<button
id=
"paste"
class=
"winui-toolbtn"
><i
class=
"fa fa-paste"
aria-hidden=
"true"
></i>
粘贴
</button>
<button
id=
"syncOtherOage"
class=
"winui-toolbtn"
><i
class=
"fa fa-sync"
aria-hidden=
"true"
></i>
同步至其他布局
</button>
<button
id=
"save"
class=
"winui-toolbtn"
><i
class=
"fa fa-save"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.save"
></language></button>
</div>
</div>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录