Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
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
ReactWeb5
CivManage
Commits
317391c8
Commit
317391c8
authored
Nov 20, 2020
by
Maofei94
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: a perf
parent
7b1a217c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
181 additions
and
171 deletions
+181
-171
SiteConfig.jsx
src/pages/mobileConfig/SiteConfig.jsx
+101
-99
LeftPart.jsx
src/pages/mobileConfig/menuconfig/LeftPart.jsx
+0
-0
LeftPart.less
src/pages/mobileConfig/menuconfig/LeftPart.less
+66
-65
MenuConfig.jsx
src/pages/mobileConfig/menuconfig/MenuConfig.jsx
+2
-2
SiteManage.jsx
src/pages/userCenter/siteManage/SiteManage.jsx
+8
-5
api.js
src/services/mobileConfig/api.js
+4
-0
No files found.
src/pages/mobileConfig/SiteConfig.jsx
View file @
317391c8
...
...
@@ -21,8 +21,8 @@ const SiteConfig = props => {
const
[
form
]
=
Form
.
useForm
();
const
layout
=
{
layout
:
'horizontal'
,
labelCol
:
{
span
:
3
},
wrapperCol
:
{
span
:
14
},
labelCol
:
{
span
:
7
},
wrapperCol
:
{
span
:
6
},
};
useEffect
(()
=>
{
console
.
log
(
miniTitle
,
'miniTitle'
);
...
...
@@ -88,105 +88,107 @@ const SiteConfig = props => {
};
return
(
<
Spin
spinning=
{
loading
}
tip=
"loading..."
>
<
Form
form=
{
form
}
{
...
layout
}
>
<
Item
label=
"应用名称:"
name=
"title"
rules=
{
[
{
required
:
true
,
message
:
'请输入应用名称'
,
},
]
}
>
<
Input
placeholder=
"请输入应用名称"
allowClear
/>
</
Item
>
<
div
style=
{
{
minHeight
:
'calc(100vh - 172px)'
,
marginTop
:
'20px'
}
}
>
<
Form
form=
{
form
}
{
...
layout
}
>
<
Item
label=
"应用名称:"
name=
"title"
rules=
{
[
{
required
:
true
,
message
:
'请输入应用名称'
,
},
]
}
>
<
Input
placeholder=
"请输入应用名称"
allowClear
/>
</
Item
>
<
Item
label=
"系统图标:"
name=
"shortcutIcon"
rules=
{
[
{
required
:
true
,
message
:
'请选择系统图标'
,
},
]
}
>
<
Input
placeholder=
"请输入系统图标名称"
allowClear
/>
</
Item
>
<
Item
label=
"系统图标:"
name=
"shortcutIcon"
rules=
{
[
{
required
:
true
,
message
:
'请选择系统图标'
,
},
]
}
>
<
Input
placeholder=
"请输入系统图标名称"
allowClear
/>
</
Item
>
<
Item
label=
"系统图标预览:"
>
<
PicturesWall
/>
</
Item
>
<
Item
label=
"登陆页面:"
name=
"loginTemplate"
rules=
{
[
{
required
:
true
,
message
:
'请选择登陆页面'
,
},
]
}
>
<
Select
placeholder=
"请选择登陆页面"
>
{
loginList
&&
loginList
.
map
((
item
,
index
)
=>
(
<
Option
value=
{
item
.
value
}
key=
{
`item${index}`
}
>
{
item
.
text
}
</
Option
>
))
}
</
Select
>
</
Item
>
<
Item
label=
"系统皮肤:"
name=
"theme"
rules=
{
[
{
required
:
true
,
message
:
'请选择系统皮肤'
,
},
]
}
>
<
Select
placeholder=
"请选择系统皮肤"
>
{
themeList
&&
themeList
.
map
((
item
,
index
)
=>
(
<
Option
value=
{
item
.
value
}
key=
{
`item${index}`
}
>
{
item
.
text
}
</
Option
>
))
}
</
Select
>
</
Item
>
<
Item
label=
"系统风格:"
name=
"style"
rules=
{
[
{
required
:
true
,
message
:
'请选择系统风格'
,
},
]
}
>
<
Select
placeholder=
"请选择系统风格"
>
{
styleList
&&
styleList
.
map
((
item
,
index
)
=>
(
<
Option
value=
{
item
.
value
}
key=
{
`item${index}`
}
>
{
item
.
text
}
</
Option
>
))
}
</
Select
>
</
Item
>
<
Item
label=
"开启云登陆:"
name=
"cloudLogin"
>
<
Radio
.
Group
onChange=
{
radioChange
}
>
<
Radio
value
>
是
</
Radio
>
<
Radio
value=
{
false
}
>
否
</
Radio
>
</
Radio
.
Group
>
</
Item
>
<
Item
style=
{
{
textAlign
:
'center'
}
}
>
<
Button
type=
"primary"
onClick=
{
submit
}
>
提交
</
Button
>
</
Item
>
</
Form
>
<
Item
label=
"系统图标预览:"
>
<
PicturesWall
/>
</
Item
>
<
Item
label=
"登陆页面:"
name=
"loginTemplate"
rules=
{
[
{
required
:
true
,
message
:
'请选择登陆页面'
,
},
]
}
>
<
Select
placeholder=
"请选择登陆页面"
>
{
loginList
&&
loginList
.
map
((
item
,
index
)
=>
(
<
Option
value=
{
item
.
value
}
key=
{
`item${index}`
}
>
{
item
.
text
}
</
Option
>
))
}
</
Select
>
</
Item
>
<
Item
label=
"系统皮肤:"
name=
"theme"
rules=
{
[
{
required
:
true
,
message
:
'请选择系统皮肤'
,
},
]
}
>
<
Select
placeholder=
"请选择系统皮肤"
>
{
themeList
&&
themeList
.
map
((
item
,
index
)
=>
(
<
Option
value=
{
item
.
value
}
key=
{
`item${index}`
}
>
{
item
.
text
}
</
Option
>
))
}
</
Select
>
</
Item
>
<
Item
label=
"系统风格:"
name=
"style"
rules=
{
[
{
required
:
true
,
message
:
'请选择系统风格'
,
},
]
}
>
<
Select
placeholder=
"请选择系统风格"
>
{
styleList
&&
styleList
.
map
((
item
,
index
)
=>
(
<
Option
value=
{
item
.
value
}
key=
{
`item${index}`
}
>
{
item
.
text
}
</
Option
>
))
}
</
Select
>
</
Item
>
<
Item
label=
"开启云登陆:"
name=
"cloudLogin"
>
<
Radio
.
Group
onChange=
{
radioChange
}
>
<
Radio
value
>
是
</
Radio
>
<
Radio
value=
{
false
}
>
否
</
Radio
>
</
Radio
.
Group
>
</
Item
>
<
Item
wrapperCol=
{
{
span
:
6
,
offset
:
7
}
}
>
<
Button
type=
"primary"
onClick=
{
submit
}
>
提交
</
Button
>
</
Item
>
</
Form
>
</
div
>
</
Spin
>
);
};
...
...
src/pages/mobileConfig/menuconfig/LeftPart.jsx
View file @
317391c8
This diff is collapsed.
Click to expand it.
src/pages/mobileConfig/menuconfig/LeftPart.less
View file @
317391c8
.contentContainer{
max-height: calc(100vh - 300
px);
overflow-x: auto;
display: flex;
.menuContainer{
min-width: 300px;
border:1px solid #abaeb1
;
// min-height:calc(100vh - 300
px);
overflow-y:auto;
.ant-tree-list{
padding: 10px;
height:calc(100vh - 330px);
.ant-tree-switcher{
line-height: 1;
color:#1890FF;
}
.ant-tree-iconEle{
line-height: 1.2;
color:#1890FF;
}
}
}
.editContainer{
margin-left: 12px;
flex: 1;
padding: 16px;
float: left;
min-width: 500px;
border:1px solid #abaeb1
;
.ant-table-pagination-right{
padding-right: 12px;
}
}
.previewContainer{
margin-left: 12px;
// flex: 1;
float: left;
min-width: 4
00px;
border:1px solid #abaeb1
;
.ant-table-pagination-right{
padding-right: 12px;
}
}
.ant-tree-treenode{
width: 100% !important;
.ant-tree-node-content-wrapper{
display: inline-block;
width: 100%;
}
.iconWraper1{
float: right;
span{
display: none;
}
}
}
.ant-tree-treenode:hover{
.iconWraper1>span{
margin-left: 12px;
font-size: 18px;
display: inline-block;
}
}
// min-height: calc(100vh - 48
px);
overflow-x: auto;
display: flex;
.menuContainer{
min-width: 300px;
border:2px solid #eee
;
min-height:calc(100vh - 172
px);
overflow-y:auto;
.ant-tree-list{
padding: 10px;
height:calc(100vh - 330px);
.ant-tree-switcher{
line-height: 1;
color:#1890FF;
}
.ant-tree-iconEle{
line-height: 1.2;
color:#1890FF;
}
}
}
.editContainer{
margin-left: 12px;
flex: 1;
padding: 16px;
float: left;
min-width: 500px;
border:2px solid #eee
;
.ant-table-pagination-right{
padding-right: 12px;
}
}
.previewContainer{
margin-left: 12px;
// flex: 1;
float: left;
min-width: 7
00px;
border:2px solid #eee
;
.ant-table-pagination-right{
padding-right: 12px;
}
}
.ant-tree-treenode{
width: 100% !important;
.ant-tree-node-content-wrapper{
display: inline-block;
width: 100%;
}
.iconWraper1{
float: right;
span{
display: none;
}
}
}
.ant-tree-treenode:hover{
.iconWraper1>span{
margin-left: 12px;
font-size: 18px;
display: inline-block;
}
}
}
.redText{
color: red;
cursor: pointer;
color: red;
cursor: pointer;
}
\ No newline at end of file
src/pages/mobileConfig/menuconfig/MenuConfig.jsx
View file @
317391c8
...
...
@@ -6,10 +6,10 @@ import LeftPart from './LeftPart';
const
MenuConfig
=
props
=>
{
const
[
flag
,
setFlag
]
=
useState
(
1
);
return
(
<
ProCard
split=
"vertical"
>
<
div
split=
"vertical"
>
<
LeftPart
/>
{
/* <ProCard><AddForm /></ProCard> */
}
</
ProCard
>
</
div
>
);
};
export
default
MenuConfig
;
src/pages/userCenter/siteManage/SiteManage.jsx
View file @
317391c8
...
...
@@ -102,11 +102,13 @@ const SiteManage = () => {
setValueList
(
finalList
.
map
(
l
=>
checkChildrenByCondition
(
l
,
it
=>
(
it
.
isChecked
?
[
getId
(
it
)]
:
[]),
'map'
,
).
flat
(
Infinity
),
l
.
children
.
map
(
item
=>
checkChildrenByCondition
(
item
,
it
=>
(
it
.
isChecked
?
[
getId
(
it
)]
:
[]),
'map'
,
).
flat
(
Infinity
),
),
)
.
flat
(
Infinity
)
.
filter
(
Boolean
),
...
...
@@ -129,6 +131,7 @@ const SiteManage = () => {
let
arr
=
list
.
map
(
item
=>
{
item
.
id
=
item
.
OUID
*
10000
;
item
.
text
=
item
.
OUName
;
item
.
isChecked
=
false
;
item
.
type
=
'widgetGroup'
;
item
.
children
=
item
.
userList
.
map
(
u
=>
({
...
u
,
...
...
src/services/mobileConfig/api.js
View file @
317391c8
...
...
@@ -37,3 +37,7 @@ export const editWebsite = (params, options) => {
options
,
);
};
/**
* @获取菜单配置
*/
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