Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-easy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
easyUI
hls-easy-ui
Commits
8baea3e6
Commit
8baea3e6
authored
Sep 19, 2024
by
王纵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
低代码组件增加iOS安全区域、弹出框在ios上无法显示、页面保存后刷新数据
parent
cbd6cce2
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
145 additions
and
150 deletions
+145
-150
DDate.vue
src/Dynamic/ConfigRenderComponent/DForm/FormItem/DDate.vue
+2
-2
DLov.vue
src/Dynamic/ConfigRenderComponent/DForm/FormItem/DLov.vue
+2
-2
DSelect.vue
src/Dynamic/ConfigRenderComponent/DForm/FormItem/DSelect.vue
+2
-2
index.vue
src/Dynamic/ConfigRenderComponent/QueryForm/index.vue
+3
-3
index.vue
src/Dynamic/LayoutButtons/index.vue
+82
-75
index.vue
src/Dynamic/LayoutComponents/DContent/index.vue
+3
-3
index.vue
src/Dynamic/LayoutComponents/DView/index.vue
+6
-57
index.vue
src/Dynamic/index.vue
+15
-3
utils.js
src/Dynamic/utils/utils.js
+28
-2
dynamicDetail.vue
src/pages/dynamicTest/dynamicDetail.vue
+2
-1
No files found.
src/Dynamic/ConfigRenderComponent/DForm/FormItem/DDate.vue
View file @
8baea3e6
...
...
@@ -2,7 +2,7 @@
* @Author: zong.wang01@hand-china.com
* @Date: 2024-08-01 09:55:12
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-0
8-19 11:20:56
* @LastEditTime: 2024-0
9-19 15:34:42
* @Version: 1.0.0
* @Description: 动态渲染-日期组件
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -39,7 +39,7 @@
</
template
>
</van-field>
<van-popup
v-model=
"visible"
round
position=
"bottom"
class=
"d-date-popup"
>
<van-popup
v-model=
"visible"
round
position=
"bottom"
class=
"d-date-popup"
get-container=
"body"
>
<van-datetime-picker
v-model=
"pickerValue"
:type=
"dateType[type]"
...
...
src/Dynamic/ConfigRenderComponent/DForm/FormItem/DLov.vue
View file @
8baea3e6
...
...
@@ -2,7 +2,7 @@
* @Author: zong.wang01@hand-china.com
* @Date: 2024-08-01 09:55:12
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-09-19 15:
26:43
* @LastEditTime: 2024-09-19 15:
34:48
* @Version: 1.0.0
* @Description: 动态渲染-Lov
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -47,7 +47,7 @@
</
template
>
</van-field>
<van-popup
v-model=
"visible"
round
position=
"bottom"
class=
"d-lov-popup"
>
<van-popup
v-model=
"visible"
round
position=
"bottom"
class=
"d-lov-popup"
get-container=
"body"
>
<div
class=
"title"
>
<span></span>
<span
class=
"title-label"
>
{{fieldConfig.description}}
</span>
...
...
src/Dynamic/ConfigRenderComponent/DForm/FormItem/DSelect.vue
View file @
8baea3e6
...
...
@@ -2,7 +2,7 @@
* @Author: zong.wang01@hand-china.com
* @Date: 2024-08-01 09:55:12
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-0
8-27 17:45:39
* @LastEditTime: 2024-0
9-19 15:34:53
* @Version: 1.0.0
* @Description: 动态渲染-Select
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -45,7 +45,7 @@
</van-field>
<van-popup
v-model=
"visible"
round
position=
"bottom"
class=
"d-select-popup"
>
<van-popup
v-model=
"visible"
round
position=
"bottom"
class=
"d-select-popup"
get-container=
"body"
>
<div
class=
"title"
>
<span
class=
"cancel"
@
click=
"showSelectOption(false)"
>
取消
</span>
<span
class=
"title-label"
>
请选择{{fieldConfig.description}}
</span>
...
...
src/Dynamic/ConfigRenderComponent/QueryForm/index.vue
View file @
8baea3e6
...
...
@@ -2,7 +2,7 @@
* @Author: zong.wang01@hand-china.com
* @Date: 2024-07-29 10:51:56
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-0
8-20 22:51:4
7
* @LastEditTime: 2024-0
9-19 15:37:0
7
* @Version: 1.0.0
* @Description: 查询表单渲染
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -22,7 +22,7 @@
</
template
>
</van-search>
<van-popup
v-model=
"show"
position=
"top"
class=
"query-form-popup"
>
<van-popup
v-model=
"show"
position=
"top"
class=
"query-form-popup"
get-container=
"body"
safe-area-inset-top
safe-area-inset-bottom
>
<div
class=
"query-form"
>
<DForm
:fields=
"fields"
:originFields=
"originFields"
ref=
"dformRef"
formType=
"query"
:showTitle=
"false"
/>
</div>
...
...
@@ -126,7 +126,7 @@ export default {
}
</
script
>
<
style
scoped
lang=
"less"
>
<
style
lang=
"less"
>
.query-form-popup {
max-height: 60%;
display: flex;
...
...
src/Dynamic/LayoutButtons/index.vue
View file @
8baea3e6
...
...
@@ -2,47 +2,48 @@
* @Author: zong.wang01@hand-china.com
* @Date: 2024-07-31 15:09:30
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-09-
06 15:15:19
* @LastEditTime: 2024-09-
19 15:40:34
* @Version: 1.0.0
* @Description: 页面按钮渲染
* @Copyright: Copyright (c) 2021, Hand-RongJing
-->
<
template
>
<div
class=
"layout-buttons"
:id=
"id"
v-if=
"!readOnly && layoutButtons.length"
>
<van-popover
v-if=
"layoutButtons.length > num"
v-model=
"moreVisible"
trigger=
"click"
placement=
"top-start"
class=
"test"
:get-container=
"`#$
{id}`"
>
<div
class=
"layout-button-more-content"
>
<van-button
v-for=
"btn in hideBtns"
round
:key=
"btn.name"
:type=
"btn.name === 'save' ? 'info' : ''"
:icon=
"buttonIcon[btn.name]"
class=
"layout-button"
@
click=
"handlClick(btn)"
>
{{
btn
.
description
}}
</van-button>
</div>
<div
:class=
"safeArea ? 'van-safe-area-bottom layout-buttons' : 'layout-buttons'"
v-if=
"!readOnly && layoutButtons.length"
>
<div
class=
"layout-buttons-content"
:id=
"id"
>
<van-popover
v-if=
"layoutButtons.length > num"
v-model=
"moreVisible"
trigger=
"click"
placement=
"top-start"
class=
"test"
:get-container=
"`#$
{id}`"
>
<div
class=
"layout-button-more-content"
>
<van-button
v-for=
"btn in hideBtns"
round
:key=
"btn.name"
:type=
"btn.name === 'save' ? 'info' : ''"
:icon=
"buttonIcon[btn.name]"
class=
"layout-button"
@
click=
"handlClick(btn)"
>
{{
btn
.
description
}}
</van-button>
</div>
<template
#
reference
>
<span
class=
"layout-button-more"
><van-icon
name=
"more-o"
/>
更多
</span>
</
template
>
</van-popover>
<template
#
reference
>
<span
class=
"layout-button-more"
><van-icon
name=
"more-o"
/>
更多
</span>
</
template
>
</van-popover>
<van-button
v-for=
"btn in defaultBtns"
round
:key=
"btn.name"
:type=
"btn.name === 'save'
? 'info' : ''"
:icon=
"buttonIcon[btn.name]
"
class=
"layout-button
"
@
click=
"handlClick(btn)"
>
{{btn.description}}
</van-button
>
<van-button
v-for=
"btn in defaultBtns"
round
:key=
"btn.name"
:type=
"(btn.name==='save' || defaultBtns.length === 1)
? 'info' : ''"
class=
"layout-button
"
@
click=
"handlClick(btn)
"
>
{{btn.description}}
</van-button>
</div
>
</div>
</template>
...
...
@@ -64,6 +65,10 @@ export default {
parentContext
:
{
// 是否需要返回键
type
:
Object
,
default
:
()
=>
({})
},
safeArea
:
{
type
:
Boolean
,
default
:
true
},
layoutButtonsFun
:
{
// 自定义按钮方法
type
:
Array
,
...
...
@@ -226,53 +231,55 @@ export default {
<
style
scoped
lang=
"less"
>
.layout-buttons {
padding: 10px;
display: flex;
position: relative;
align-items: center;
justify-content: space-around;
background: #FAFAFA;
box-shadow: 0px -2px 9px 0px rgba(226,226,226,1);
.layout-button {
min-width: 90px;
margin: 0 6px;
font-family: PingFangSC-Semibold;
font-size: 16px;
font-weight: 600;
flex: 1;
}
.layout-button-more {
color: #666666;
font-size: 12px;
line-height: 17px;
.layout-buttons-content {
padding: 10px;
display: flex;
color: #666;
margin: 0 6px;
flex-direction: column;
position: relative;
align-items: center;
.van-icon-more-o {
justify-content: space-around;
.layout-button {
min-width: 90px;
margin: 0 6px;
font-family: PingFangSC-Semibold;
font-size: 16px;
font-weight: 600;
flex: 1;
}
}
.layout-button-more-content {
z-index: 1;
position: absolute;
left: -12px;
bottom: 100%;
display: flex;
flex-direction: column;
padding: 0 12px;
margin-bottom: 24px;
.layout-button {
margin-top: 12px;
min-width: 120px;
box-shadow: 0px 0px 18px 0px rgba(0,0,0,0.2);
border-radius: 20px;
white-space: nowrap;
padding: 10px;
// margin: 6px 0;
// box-shadow: 0px 2px 2px 0px #3789ff;
.layout-button-more {
color: #666666;
font-size: 12px;
line-height: 17px;
display: flex;
color: #666;
margin: 0 6px;
flex-direction: column;
align-items: center;
.van-icon-more-o {
font-size: 16px;
}
}
.layout-button-more-content {
z-index: 1;
position: absolute;
left: -12px;
bottom: 100%;
display: flex;
flex-direction: column;
padding: 0 12px;
margin-bottom: 24px;
.layout-button {
margin-top: 12px;
min-width: 120px;
box-shadow: 0px 0px 18px 0px rgba(0,0,0,0.2);
border-radius: 20px;
white-space: nowrap;
padding: 10px;
// margin: 6px 0;
// box-shadow: 0px 2px 2px 0px #3789ff;
}
}
}
}
...
...
src/Dynamic/LayoutComponents/DContent/index.vue
View file @
8baea3e6
...
...
@@ -24,9 +24,9 @@ export default {
}
},
mounted
()
{
if
(
this
.
calContent
)
{
this
.
resizeHeight
()
}
//
if (this.calContent) {
//
this.resizeHeight()
//
}
},
update
()
{
// if (this.calContent) {
...
...
src/Dynamic/LayoutComponents/DView/index.vue
View file @
8baea3e6
...
...
@@ -2,52 +2,24 @@
* @Author: zong.wang01@hand-china.com
* @Date: 2024-08-16 11:26:14
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-0
8-16 11:30:2
7
* @LastEditTime: 2024-0
9-19 15:42:4
7
* @Version: 1.0.0
* @Description:
* @Copyright: Copyright (c) 2021, Hand-RongJing
-->
<
template
>
<div
:class=
"
{'h-ios': isIos}" class="h
-view">
<div
class=
"d
-view"
>
<slot/>
</div>
</
template
>
<
script
>
import
{
detectOS
}
from
'../../utils/utils'
;
export
default
{
name
:
'DView'
,
props
:
{
fullScreen
:
{
// 是否为全屏应用,全屏子应用此项需设为true
type
:
Boolean
,
default
:
true
,
},
title
:
{
type
:
String
,
default
:
''
,
},
},
data
()
{
return
{
isIos
:
false
,
}
},
mounted
()
{
if
(
this
.
title
)
{
document
.
title
=
this
.
title
}
},
activated
()
{
if
(
this
.
title
)
{
document
.
title
=
this
.
title
}
},
created
()
{
this
.
fullScreen
&&
detectOS
()
===
'ios'
&&
(
this
.
isIos
=
true
)
document
.
body
.
classList
.
add
(
'platform-'
+
detectOS
())
},
}
</
script
>
...
...
@@ -59,37 +31,14 @@ export default {
input:hover ,input:focus{
caret-color: #3367d6;
}
.
h
-view {
.
d
-view {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
overflow: hidden;
//
overflow: hidden;
// padding-bottom: 44px;
// background-color: $bgColor;
}
.platform-ios {
.h-view {
// padding-bottom: 64px;
}
}
// iPhoneX适配
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
.platform-ios {
.h-view {
// padding-bottom: 120px;
}
}
}
// iPhoneX Max适配
@media only screen and (device-width: 414px) and (device-height: 896px) {
.platform-ios {
.h-view {
// padding-bottom: 120px;
}
}
background-color: #fafafa;
box-sizing: border-box;
}
</
style
>
src/Dynamic/index.vue
View file @
8baea3e6
...
...
@@ -2,7 +2,7 @@
* @Author: zong.wang01@hand-china.com
* @Date: 2024-07-29 10:51:56
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-09-
06 15:53:19
* @LastEditTime: 2024-09-
19 15:52:43
* @Version: 1.0.0
* @Description:
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -31,6 +31,7 @@
:layoutButtonsFun=
"layoutButtons"
:headerButtons=
"headerButtons"
:layoutButtonsDefaultFun=
"layoutButtonsDefaultFun"
:safeArea=
"safeArea"
/>
</d-view>
</
template
>
...
...
@@ -43,7 +44,7 @@ import ConfigRenderComponent from './ConfigRenderComponent/index.jsx';
import
{
query
,
queryRoute
,
save
}
from
'./service'
import
'./index.less'
import
EventBus
from
'./utils/eventBus'
;
import
{
getLayoutSaveData
}
from
'./utils/utils'
;
import
{
getLayoutSaveData
,
reloadData
}
from
'./utils/utils'
;
export
default
{
name
:
'Dynamic'
,
...
...
@@ -99,6 +100,10 @@ export default {
type
:
Function
,
default
:
()
=>
{}
},
safeArea
:
{
// 是否显示安全区域
type
:
Boolean
,
default
:
true
},
routeParams
:
{
type
:
Object
,
default
:
null
...
...
@@ -213,16 +218,23 @@ export default {
}
},
// 布局按钮保存
async
layoutSave
()
{
async
layoutSave
(
needReload
=
true
)
{
const
data
=
await
getLayoutSaveData
(
this
.
getDynamicInfo
());
try
{
const
res
=
await
save
(
data
);
Toast
.
success
(
'保存成功!'
);
if
(
needReload
)
{
reloadData
(
this
.
dataSetObject
,
'Form'
)
}
return
true
;
}
catch
(
err
)
{
throw
new
Error
(
"保存失败"
);
}
},
// 整个页面数据重加载
reload
(
type
)
{
reloadData
(
this
.
dataSetObject
,
type
)
},
backClick
()
{
if
(
this
.
$attrs
[
'onGoBack'
])
{
this
.
$emit
(
'goBack'
);
...
...
src/Dynamic/utils/utils.js
View file @
8baea3e6
...
...
@@ -2,7 +2,7 @@
* @Author: zong.wang01@hand-china.com
* @Date: 2024-07-30 14:39:47
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-09-
06 15:24:17
* @LastEditTime: 2024-09-
19 15:45:12
* @Version: 1.0.0
* @Description: 工具类
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -259,6 +259,31 @@ const getDataSets = (dynamicInfo, dataSetTree) => {
}
}
const
reloadData
=
(
dataSets
,
type
=
'all'
)
=>
{
for
(
let
key
in
dataSets
)
{
if
(
dataSets
.
hasOwnProperty
(
key
))
{
const
{
instanceRef
}
=
dataSets
[
key
];
if
(
instanceRef
)
{
if
(
type
===
'all'
)
{
if
(
dataSets
[
key
].
tabType
===
'Form'
)
{
instanceRef
.
loadData
();
}
else
if
(
dataSets
[
key
].
tabType
===
'Table'
)
{
instanceRef
.
refresh
();
}
}
else
{
if
(
type
===
'Form'
&&
dataSets
[
key
].
tabType
===
'Form'
)
{
instanceRef
.
loadData
();
}
if
(
type
===
'Table'
&&
dataSets
[
key
].
tabType
===
'Table'
)
{
instanceRef
.
refresh
();
}
}
}
}
}
}
export
{
getCustomizedProp
,
...
...
@@ -272,5 +297,6 @@ export {
getOrganizationId
,
getCurrentUser
,
isTenantRoleLevel
,
getLayoutSaveData
getLayoutSaveData
,
reloadData
};
src/pages/dynamicTest/dynamicDetail.vue
View file @
8baea3e6
...
...
@@ -2,7 +2,7 @@
* @Author: zong.wang01@hand-china.com
* @Date: 2024-08-16 09:39:36
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-0
8-21 17:37:33
* @LastEditTime: 2024-0
9-19 15:35:34
* @Version: 1.0.0
* @Description: 商机维护详情
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -24,6 +24,7 @@
style=
"width: 100%; height: 50%; padding: 15px; box-sizing: border-box;"
position=
"bottom"
closeable
get-container=
"body"
>
<div
style=
"text-align: center;margin-bottom: 15px"
>
附件信息
</div>
<DAttachment
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment