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
47298b37
Commit
47298b37
authored
Aug 27, 2024
by
王纵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表格只显示6行,lov滑动问题
parent
04c6ab6b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
21 deletions
+35
-21
DLov.vue
src/Dynamic/ConfigRenderComponent/DForm/FormItem/DLov.vue
+6
-3
DSelect.vue
src/Dynamic/ConfigRenderComponent/DForm/FormItem/DSelect.vue
+3
-1
index.vue
src/Dynamic/ConfigRenderComponent/DTable/index.vue
+24
-15
testDynamic.vue
src/pages/dynamicTest/testDynamic.vue
+2
-2
No files found.
src/Dynamic/ConfigRenderComponent/DForm/FormItem/DLov.vue
View file @
47298b37
...
...
@@ -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-08-2
0 09:56:05
* @LastEditTime: 2024-08-2
7 17:46:20
* @Version: 1.0.0
* @Description: 动态渲染-Lov
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -59,7 +59,7 @@
placeholder=
"搜索"
@
search=
"onSearch"
/>
<scroll
<
d-
scroll
ref=
"scroll"
:pullUp=
"true"
@
pullingUp=
"getLovData"
>
...
...
@@ -86,7 +86,7 @@
</div>
</li>
</ul>
</scroll>
</
d-
scroll>
<div
class=
"footer"
v-if=
"multiple"
>
<van-checkbox
shape=
"square"
v-model=
"selectAllFlag"
@
change=
"selectAllData"
>
全选
</van-checkbox>
<button
type=
"primary"
@
click=
"confirm"
>
确定
</button>
...
...
@@ -98,12 +98,15 @@
<
script
>
import
{
Cell
,
Switch
,
Icon
,
Popup
,
Search
,
Checkbox
,
Tag
,
Field
}
from
'vant'
;
import
DLabel
from
'./DLabel'
;
import
{
DScroll
}
from
'../../../LayoutComponents'
;
import
{
getLovConfig
,
getLovData
}
from
'../../../service'
;
import
{
DScroll
}
from
'../../../LayoutComponents'
;
export
default
{
name
:
'DLov'
,
components
:
{
DLabel
,
DScroll
,
[
Cell
.
name
]:
Cell
,
[
Switch
.
name
]:
Switch
,
[
Icon
.
name
]:
Icon
,
...
...
src/Dynamic/ConfigRenderComponent/DForm/FormItem/DSelect.vue
View file @
47298b37
...
...
@@ -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-08-2
1 17:05:26
* @LastEditTime: 2024-08-2
7 17:45:39
* @Version: 1.0.0
* @Description: 动态渲染-Select
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -237,6 +237,8 @@ export default {
@import '../../../index.less';
.d-select-popup {
max-height: 60%;
display: flex;
flex-direction: column;
.title{
padding: 13px;
display: flex;
...
...
src/Dynamic/ConfigRenderComponent/DTable/index.vue
View file @
47298b37
...
...
@@ -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-08-2
1 17:36:07
* @LastEditTime: 2024-08-2
7 17:50:40
* @Version: 1.0.0
* @Description: 表格渲染
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -22,7 +22,7 @@
>
<van-checkbox-group
v-model=
"checkResult"
>
<div
v-for=
"(item, pIndex) in tableData"
:key=
"item[tabInfo.primaryKey]"
class=
"d-table"
>
<fragment
v-for=
"(column, index) in
c
olumns"
:key=
"column.columnName"
>
<fragment
v-for=
"(column, index) in
showC
olumns"
:key=
"column.columnName"
>
<div
v-if=
"index === 0"
class=
"d-table-th"
>
<van-checkbox
:name=
"item[tabInfo.primaryKey]"
>
{{
column
.
description
}}
:
...
...
@@ -32,7 +32,7 @@
:index=
"pIndex"
:record=
"item"
/>
</van-checkbox>
<van-icon
name=
"records-o"
v-if=
"showEdit"
@
click=
"showRecord(item, pIndex)"
/>
<van-icon
name=
"records-o"
@
click=
"showRecord(item, pIndex)"
/>
</div>
<div
v-else
class=
"d-table-tr"
>
<span>
{{
column
.
description
}}
</span>
...
...
@@ -74,9 +74,10 @@
<van-button
round
@
click
.
native=
"cancelRecord"
>
取消
</van-button>
>
{{showEdit ? "取消" : "关闭"}}
</van-button>
<van-button
type=
"info"
v-if=
"showEdit"
round
@
click
.
native=
"saveRecord"
>
保存
</van-button>
...
...
@@ -147,6 +148,7 @@ export default {
},
page
:
0
,
size
:
10
,
showColumns
:
[],
queryParams
:
{},
tableData
:
[],
// 表格数据
checkResult
:
[],
...
...
@@ -180,7 +182,7 @@ export default {
EventBus
.
$on
(
'tableQuery'
,
this
.
listenHandle
);
}
this
.
refresh
();
this
.
showColumns
=
this
.
columns
.
length
>
6
?
this
.
columns
.
slice
(
0
,
6
)
:
this
.
columns
;
this
.
readOnly
=
this
.
dynamicConfigInfo
.
queryParams
.
readOnly
;
// 设置是否可以编辑
if
(
this
.
dynamicConfigInfo
.
queryParams
.
readOnly
)
{
...
...
@@ -222,14 +224,9 @@ export default {
})
},
showRecord
(
res
,
index
)
{
if
(
this
.
tabInfo
.
createUrl
)
{
this
.
record
=
{...
res
};
this
.
recordIndex
=
index
;
this
.
visible
=
true
;
// console.log('this.record', this.record)
}
else
{
Toast
.
fail
(
'保存接口未配置,请检查配置'
);
}
this
.
record
=
{...
res
};
this
.
recordIndex
=
index
;
this
.
visible
=
true
;
},
dateDescription
(
type
,
val
)
{
if
(
val
)
{
...
...
@@ -239,6 +236,10 @@ export default {
return
val
;
},
async
saveRecord
()
{
//表格数据保存
if
(
!
this
.
tabInfo
.
createUrl
)
{
Toast
.
fail
(
'保存接口未配置,请检查配置'
);
return
;
}
const
{
allValues
}
=
await
this
.
$refs
.
dformRef
.
validate
();
let
method
=
saveTableRecord
;
// 默认新增
let
url
=
this
.
tabInfo
.
createUrl
;
...
...
@@ -275,7 +276,11 @@ export default {
}
else
{
switch
(
btn
.
name
)
{
case
'create'
:
this
.
showRecord
({},
-
1
);
if
(
this
.
tabInfo
.
createUrl
)
{
this
.
showRecord
({},
-
1
);
}
else
{
Toast
.
fail
(
'保存接口未配置,请检查配置'
);
}
break
;
case
'query'
:
this
.
refresh
();
...
...
@@ -356,9 +361,13 @@ export default {
background: #fafafa;
box-shadow: 0 -.533vw 2.4vw 0 #e2e2e2;
.van-button {
width: 48%;
// width: 48%;
flex-grow: 1;
font-size: 16px;
font-weight: 600;
& + .van-button {
margin-left: 12px;
}
}
}
}
...
...
src/pages/dynamicTest/testDynamic.vue
View file @
47298b37
...
...
@@ -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-08-2
1 16:52:4
2
* @LastEditTime: 2024-08-2
6 09:55:2
2
* @Version: 1.0.0
* @Description:
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -50,7 +50,7 @@ export default {
}
},
created
()
{
window
.
localStorage
.
access_token
=
'
5a9de092-e1ad-42b7-9240-90c2d5acb3
4e'
window
.
localStorage
.
access_token
=
'
3e4ed606-6b81-40c2-8ba3-54f7383250
4e'
},
methods
:
{
configLoadHandle
(
config
)
{
// 查询配置信息之后的回调
...
...
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