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
73e66523
Commit
73e66523
authored
Aug 21, 2024
by
王纵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自定义数组参数改成数组类型
parent
cdb88618
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
34 deletions
+49
-34
DSelect.vue
src/Dynamic/ConfigRenderComponent/DForm/FormItem/DSelect.vue
+2
-1
index.vue
src/Dynamic/LayoutButtons/index.vue
+34
-20
index.vue
src/Dynamic/index.vue
+3
-3
dynamicDetail.vue
src/pages/dynamicTest/dynamicDetail.vue
+6
-6
testDynamic.vue
src/pages/dynamicTest/testDynamic.vue
+4
-4
No files found.
src/Dynamic/ConfigRenderComponent/DForm/FormItem/DSelect.vue
View file @
73e66523
...
...
@@ -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:55:39
* @LastEditTime: 2024-08-2
1 17:05:26
* @Version: 1.0.0
* @Description: 动态渲染-Select
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -160,6 +160,7 @@ export default {
getOptions
()
{
getSelectOptions
({
lovCode
:
this
.
fieldConfig
.
lookupCode
,
...
this
.
cascadesParams
}).
then
(
res
=>
{
this
.
options
=
res
.
map
(
item
=>
({...
item
,
_selected
:
false
}));
this
.
formatValue
();
});
},
formatValue
()
{
...
...
src/Dynamic/LayoutButtons/index.vue
View file @
73e66523
...
...
@@ -2,7 +2,7 @@
* @Author: zong.wang01@hand-china.com
* @Date: 2024-07-31 15:09:30
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-08-2
0 22:57:16
* @LastEditTime: 2024-08-2
1 17:03:58
* @Version: 1.0.0
* @Description: 页面按钮渲染
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -22,6 +22,7 @@
v-for=
"btn in hideBtns"
round
:key=
"btn.name"
:type=
"btn.name === 'save' ? 'info' : ''"
:icon=
"buttonIcon[btn.name]"
class=
"layout-button"
@
click=
"handlClick(btn)"
...
...
@@ -37,6 +38,7 @@
v-for=
"btn in defaultBtns"
round
:key=
"btn.name"
:type=
"btn.name === 'save' ? 'info' : ''"
:icon=
"buttonIcon[btn.name]"
class=
"layout-button"
@
click=
"handlClick(btn)"
...
...
@@ -64,8 +66,8 @@ export default {
default
:
()
=>
({})
},
layoutButtonsFun
:
{
// 自定义按钮方法
type
:
Object
,
default
:
()
=>
({})
type
:
Array
,
default
:
()
=>
[]
},
headerButtons
:
{
// 页面按钮渲染
type
:
Array
,
...
...
@@ -89,19 +91,31 @@ export default {
remove
:
'delete'
,
query
:
'search'
},
allFuns
:
{
save
:
this
.
saveFunction
,
query
:
this
.
query
,
reset
:
this
.
reset
,
remove
:
this
.
remove
,
}
allFuns
:
[
{
name
:
'save'
,
clickFunction
:
this
.
saveFunction
,
},
// {
// name: 'query',
// clickFunction: this.query,
// },
// {
// name: 'reset',
// clickFunction: this.reset,
// }, {
// name: 'remove',
// clickFunction: this.remove,
// },
]
}
},
mounted
()
{
this
.
configInfo
=
this
.
dynamicInfo
().
config
;
this
.
readOnly
=
this
.
dynamicInfo
().
queryParams
.
readOnly
;
this
.
allFuns
=
{...
this
.
allFuns
,
...
this
.
layoutButtonsFun
};
// 综合按钮方法
this
.
layoutButtons
=
(
this
.
configInfo
.
layoutButtons
||
[]).
concat
(
this
.
headerButtons
).
filter
(
o
=>
this
.
allFuns
[
o
.
name
]);
const
funcs
=
[...
this
.
allFuns
,
...
this
.
layoutButtonsFun
];
// 综合按钮方法
this
.
allFuns
=
[...
new
Map
(
funcs
.
map
(
item
=>
[
item
.
name
,
item
])).
values
()];
this
.
layoutButtons
=
(
this
.
configInfo
.
layoutButtons
||
[]).
concat
(
this
.
headerButtons
).
filter
(
o
=>
this
.
allFuns
.
some
(
e
=>
e
.
name
===
o
.
name
));
this
.
init
();
},
methods
:
{
...
...
@@ -114,23 +128,23 @@ export default {
}
},
getClickFunction
(
name
)
{
// 获取对应的点击事件
const
currentButtons
=
this
.
customizedButto
ns
.
filter
(
value
=>
value
.
name
===
name
);
return
currentButtons
.
length
>
0
?
currentButtons
[
0
].
clickFunction
:
this
.
dataSetFunction
[
name
]
;
const
currentButtons
=
this
.
allFu
ns
.
filter
(
value
=>
value
.
name
===
name
);
return
currentButtons
.
length
>
0
?
currentButtons
[
0
].
clickFunction
:
()
=>
{}
;
},
handlClick
(
btn
)
{
this
.
moreVisible
=
false
;
const
func
=
this
.
allFuns
[
btn
.
name
];
const
func
=
this
.
getClickFunction
[
btn
.
name
];
func
();
},
query
(){
//
query(){
},
reset
(){
//
},
//
reset(){
},
remove
()
{
//
},
//
remove() {
},
//
},
async
saveFunction
()
{
const
saveDataSet
=
this
.
dynamicInfo
().
dataSetObject
;
const
dataSets
=
{...
saveDataSet
};
...
...
src/Dynamic/index.vue
View file @
73e66523
...
...
@@ -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
0 22:55:00
* @LastEditTime: 2024-08-2
1 16:52:03
* @Version: 1.0.0
* @Description:
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -77,8 +77,8 @@ export default {
default
:
()
=>
[]
},
layoutButtons
:
{
// 布局按钮方法
type
:
Object
,
default
:
()
=>
({})
type
:
Array
,
default
:
()
=>
[]
},
componentButtons
:
{
// 组件按钮方法
type
:
Array
,
...
...
src/pages/dynamicTest/dynamicDetail.vue
View file @
73e66523
...
...
@@ -2,13 +2,13 @@
* @Author: zong.wang01@hand-china.com
* @Date: 2024-08-16 09:39:36
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-08-21 1
5:54:30
* @LastEditTime: 2024-08-21 1
7:03:39
* @Version: 1.0.0
* @Description: 商机维护详情
* @Copyright: Copyright (c) 2021, Hand-RongJing
-->
<
template
>
<div>
<div
style=
"height: 100vh"
>
<Dynamic
layoutCode=
"CN001F1"
:showTitle=
"false"
...
...
@@ -78,10 +78,10 @@ export default {
},
},
],
layoutButtons
:
{
submit
:
this
.
submit
,
save
:
this
.
save
,
}
,
layoutButtons
:
[
{
name
:
'submit'
,
clickFunction
:
this
.
submit
}
,
{
name
:
'save'
,
clickFunction
:
this
.
save
}
,
]
,
show
:
false
,
attachmentRecord
:
{}
}
...
...
src/pages/dynamicTest/testDynamic.vue
View file @
73e66523
...
...
@@ -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-21 16:
02:16
* @LastEditTime: 2024-08-21 16:
52:42
* @Version: 1.0.0
* @Description:
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
...
@@ -44,9 +44,9 @@ export default {
},
},
],
layoutButtons
:
{
create
:
this
.
create
,
},
layoutButtons
:
[
{
name
:
'create'
,
clickFunction
:
this
.
create
}
]
}
},
created
()
{
...
...
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