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
8008b371
Commit
8008b371
authored
Jan 27, 2021
by
Maofei94
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: web菜单配置增加隐藏字段
parent
a01b8a62
Pipeline
#23123
skipped with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
12 deletions
+16
-12
AddForm.jsx
src/pages/webConfig/menuconfig/AddForm.jsx
+7
-2
editForm.jsx
src/pages/webConfig/menuconfig/editForm.jsx
+9
-2
webMenu.jsx
src/pages/webConfig/menuconfig/webMenu.jsx
+0
-4
productConfig.jsx
src/pages/webConfig/productConfig.jsx
+0
-4
No files found.
src/pages/webConfig/menuconfig/AddForm.jsx
View file @
8008b371
import
React
from
'react'
;
import
{
Form
,
Input
,
Button
,
Select
}
from
'antd'
;
import
{
Form
,
Input
,
Button
,
Select
,
Radio
}
from
'antd'
;
import
styles
from
'./addForm.less'
;
import
PicturesWall
from
'@/components/Upload/index'
;
import
EditeConfigWrapper
from
'./editConfigFileWrapper'
;
...
...
@@ -15,7 +15,6 @@ const AddForm = props => {
configFiles
,
productList
,
}
=
props
;
console
.
log
(
productList
);
const
[
form
]
=
Form
.
useForm
();
const
[
otherForm
]
=
Form
.
useForm
();
const
layout
=
{
...
...
@@ -85,6 +84,12 @@ const AddForm = props => {
>
<
PicturesWall
picType=
"menuNew"
/>
</
Item
>
<
Item
label=
"菜单隐藏"
name=
"hideInMenu"
initialValue=
{
false
}
>
<
Radio
.
Group
>
<
Radio
value
>
是
</
Radio
>
<
Radio
value=
{
false
}
>
否
</
Radio
>
</
Radio
.
Group
>
</
Item
>
<
Item
label=
"功能路径"
name=
"pageUrl"
...
...
src/pages/webConfig/menuconfig/editForm.jsx
View file @
8008b371
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Form
,
Input
,
Button
,
Row
,
Col
,
Select
}
from
'antd'
;
import
{
Form
,
Input
,
Button
,
Row
,
Col
,
Select
,
Radio
}
from
'antd'
;
import
styles
from
'./addForm.less'
;
import
PicturesWall
from
'@/components/Upload/index'
;
import
EditeConfigWrapper
from
'./editConfigFileWrapper'
;
...
...
@@ -44,9 +44,10 @@ const EditForm = props => {
submitCallback
(
obj
);
};
const
onFinish
=
()
=>
{
const
onFinish
=
val
=>
{
submit
();
};
const
radioChange
=
e
=>
{};
return
(
<
div
style=
{
{
marginTop
:
'10px'
}
}
>
{
nodeType
===
1
&&
(
...
...
@@ -95,6 +96,12 @@ const EditForm = props => {
>
<
PicturesWall
picType=
"menuNew"
/>
</
Item
>
<
Item
label=
"菜单隐藏"
name=
"hideInMenu"
initialValue=
{
false
}
>
<
Radio
.
Group
onChange=
{
radioChange
}
>
<
Radio
value
>
是
</
Radio
>
<
Radio
value=
{
false
}
>
否
</
Radio
>
</
Radio
.
Group
>
</
Item
>
<
Item
label=
"功能路径"
name=
"pageUrl"
...
...
src/pages/webConfig/menuconfig/webMenu.jsx
View file @
8008b371
...
...
@@ -76,7 +76,6 @@ const MiniMenu = props => {
getWebModuleTree
(
userMode
||
'super'
)
.
then
(
res
=>
{
setLoading
(
false
);
console
.
log
(
res
);
const
{
code
,
data
}
=
res
;
if
(
code
===
0
)
{
let
arr
=
data
...
...
@@ -87,7 +86,6 @@ const MiniMenu = props => {
arr
[
0
].
children
.
find
(
item
=>
item
.
text
===
'菜单管理'
).
children
||
[];
setMenuList
(
arr2
||
[]);
console
.
log
(
arr
,
webid
,
arr2
);
}
})
.
catch
(
err
=>
{
...
...
@@ -98,7 +96,6 @@ const MiniMenu = props => {
};
},
[
flag
,
webid
]);
useEffect
(()
=>
{
console
.
log
(
menu
,
'menu'
);
setNewTreeList
(
menuList
||
[]);
},
[
menuList
]);
...
...
@@ -392,7 +389,6 @@ const MiniMenu = props => {
_version
:
9999
,
_dc
:
Date
.
now
(),
}).
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
.
success
)
{
// updateMenuTree();
setFlag
(
flag
+
1
);
...
...
src/pages/webConfig/productConfig.jsx
View file @
8008b371
...
...
@@ -35,7 +35,6 @@ const ProductConfig = props => {
const
{
data
:
{
AllProducts
,
UserProducts
},
}
=
res
;
console
.
log
(
AllProducts
,
UserProducts
);
setProductList
(
AllProducts
);
setUserProductsList
(
UserProducts
);
// if (!productObj && data.length > 0) {
...
...
@@ -115,7 +114,6 @@ const ProductConfig = props => {
setLoading
(
true
);
modifyProduct
({
...
item
})
.
then
(
res
=>
{
console
.
log
(
res
);
setLoading
(
false
);
if
(
res
.
code
===
0
)
{
notification
.
success
({
...
...
@@ -141,12 +139,10 @@ const ProductConfig = props => {
let
obj
=
userlist
.
find
(
i
=>
i
.
PackageName
===
item
.
PackageName
);
handleDel
(
obj
);
}
console
.
log
(
e
,
item
);
};
const
handleClickItem
=
value
=>
{
if
(
userProductsList
.
length
>
0
)
{
let
obj
=
userProductsList
.
find
(
i
=>
i
.
PackageName
===
value
.
PackageName
);
console
.
log
(
obj
);
if
(
obj
)
{
setProductObt
(
obj
);
}
else
{
...
...
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