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
d0ebbcde
Commit
d0ebbcde
authored
Jan 08, 2021
by
Maofei94
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 产品配置
parent
65381607
Pipeline
#21948
skipped with stages
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
101 additions
and
46 deletions
+101
-46
editForm.jsx
src/pages/webConfig/components/editForm.jsx
+25
-24
productForm.jsx
src/pages/webConfig/components/productForm.jsx
+22
-22
AddForm.jsx
src/pages/webConfig/menuconfig/AddForm.jsx
+21
-0
editForm.jsx
src/pages/webConfig/menuconfig/editForm.jsx
+20
-0
webMenu.jsx
src/pages/webConfig/menuconfig/webMenu.jsx
+13
-0
No files found.
src/pages/webConfig/components/editForm.jsx
View file @
d0ebbcde
...
...
@@ -14,16 +14,16 @@ const EditForm = props => {
wrapperCol
:
{
span
:
15
},
};
const
environmentList
=
[
{
value
:
'development'
,
label
:
'development'
,
key
:
'development'
,
},
{
value
:
'production'
,
label
:
'
production
'
,
label
:
'
生产环境
'
,
key
:
'production'
,
},
{
value
:
'development'
,
label
:
'开发环境'
,
key
:
'development'
,
},
];
useEffect
(()
=>
{
form
.
setFieldsValue
({
...
productObj
});
...
...
@@ -44,35 +44,36 @@ const EditForm = props => {
<
div
style=
{
{
minHeight
:
'calc(100vh - 252px)'
,
marginTop
:
'20px'
}
}
>
<
Form
form=
{
form
}
name=
"formEdit"
{
...
layout
}
onFinish=
{
finished
}
>
<
Item
label=
"
应用环境
:"
name=
"
Environment
"
label=
"
产品名称
:"
name=
"
ProductName
"
rules=
{
[
{
required
:
true
,
message
:
'请
选择应用环境
'
,
message
:
'请
输入产品名称
'
,
},
]
}
>
<
Select
placeholder=
"请选择应用环境"
>
{
environmentList
&&
environmentList
.
map
(
item
=>
(
<
Option
value=
{
item
.
value
}
key=
{
item
.
key
}
>
{
item
.
label
}
</
Option
>
))
}
</
Select
>
<
Input
placeholder=
"请输入产品名称"
allowClear
/>
</
Item
>
<
Item
label=
"
应用名称
:"
name=
"
ProductName
"
label=
"
产品环境
:"
name=
"
Environment
"
rules=
{
[
{
required
:
true
,
message
:
'请
输入应用名称
'
,
message
:
'请
选择产品环境
'
,
},
]
}
>
<
Input
placeholder=
"请输入应用名称"
allowClear
/>
<
Select
placeholder=
"请选择产品环境"
>
{
environmentList
&&
environmentList
.
map
(
item
=>
(
<
Option
value=
{
item
.
value
}
key=
{
item
.
key
}
>
{
item
.
label
}
</
Option
>
))
}
</
Select
>
</
Item
>
<
Item
label=
"入口url"
...
...
@@ -84,7 +85,7 @@ const EditForm = props => {
},
]
}
>
<
Input
addonBefore=
"
:
//"
placeholder=
"请输入入口url"
allowClear
/>
<
Input
addonBefore=
"//"
placeholder=
"请输入入口url"
allowClear
/>
</
Item
>
<
Item
label=
"默认配置"
...
...
@@ -107,7 +108,7 @@ const EditForm = props => {
提交
</
Button
>
</
Item
>
<
Item
wrapperCol=
{
{
span
:
8
,
offset
:
8
}
}
>
{
/*
<Item wrapperCol={{ span: 8, offset: 8 }}>
<Popconfirm
title="确实删除产品"
placement="right"
...
...
@@ -119,7 +120,7 @@ const EditForm = props => {
删除
</Button>
</Popconfirm>
</
Item
>
</Item>
*/
}
</
div
>
</
Form
>
</
div
>
...
...
src/pages/webConfig/components/productForm.jsx
View file @
d0ebbcde
...
...
@@ -14,16 +14,16 @@ const AddForm = props => {
wrapperCol
:
{
span
:
16
},
};
const
environmentList
=
[
{
value
:
'development'
,
label
:
'development'
,
key
:
'development'
,
},
{
value
:
'production'
,
label
:
'
production
'
,
label
:
'
生产环境
'
,
key
:
'production'
,
},
{
value
:
'development'
,
label
:
'开发环境'
,
key
:
'development'
,
},
];
// 提交选择
const
submit
=
value
=>
{};
...
...
@@ -59,35 +59,35 @@ const AddForm = props => {
<
div
style=
{
{
minHeight
:
'calc(100vh - 252px)'
,
marginTop
:
'20px'
}
}
>
<
Form
form=
{
form
}
name=
"formAdd"
{
...
layout
}
onFinish=
{
finished
}
>
<
Item
label=
"
应用环境
:"
name=
"
Environment
"
label=
"
产品名称
:"
name=
"
ProductName
"
rules=
{
[
{
required
:
true
,
message
:
'请
选择应用环境
'
,
message
:
'请
输入产品名称
'
,
},
]
}
>
<
Select
placeholder=
"请选择应用环境"
>
{
environmentList
&&
environmentList
.
map
(
item
=>
(
<
Option
value=
{
item
.
value
}
key=
{
item
.
key
}
>
{
item
.
label
}
</
Option
>
))
}
</
Select
>
<
Input
placeholder=
"请输入产品名称"
allowClear
/>
</
Item
>
<
Item
label=
"
应用名称
:"
name=
"
ProductName
"
label=
"
产品环境
:"
name=
"
Environment
"
rules=
{
[
{
required
:
true
,
message
:
'请
输入应用名称
'
,
message
:
'请
选择产品环境
'
,
},
]
}
>
<
Input
placeholder=
"请输入应用名称"
allowClear
/>
<
Select
placeholder=
"请选择产品环境"
>
{
environmentList
&&
environmentList
.
map
(
item
=>
(
<
Option
value=
{
item
.
value
}
key=
{
item
.
key
}
>
{
item
.
label
}
</
Option
>
))
}
</
Select
>
</
Item
>
<
Item
label=
"入口url"
...
...
@@ -99,7 +99,7 @@ const AddForm = props => {
},
]
}
>
<
Input
addonBefore=
"
:
//"
placeholder=
"请输入入口url"
allowClear
/>
<
Input
addonBefore=
"//"
placeholder=
"请输入入口url"
allowClear
/>
</
Item
>
<
Item
label=
"默认配置"
...
...
src/pages/webConfig/menuconfig/AddForm.jsx
View file @
d0ebbcde
...
...
@@ -5,6 +5,7 @@ import PicturesWall from '@/components/Upload/index';
import
EditeConfigWrapper
from
'./editConfigFileWrapper'
;
const
{
Item
}
=
Form
;
const
{
Option
}
=
Select
;
const
AddForm
=
props
=>
{
const
{
submitCallback
,
...
...
@@ -12,6 +13,7 @@ const AddForm = props => {
addType
,
submitLoading
,
configFiles
,
productList
,
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
[
otherForm
]
=
Form
.
useForm
();
...
...
@@ -59,6 +61,25 @@ const AddForm = props => {
<
Item
label=
"菜单别名"
name=
"shortName"
>
<
Input
placeholder=
"请输入菜单别名"
/>
</
Item
>
<
Item
label=
"产品类型:"
name=
"product"
rules=
{
[
{
required
:
true
,
message
:
'请选择产品类型'
,
},
]
}
>
<
Select
placeholder=
"请选择产品类型"
>
{
productList
&&
productList
.
map
(
item
=>
(
<
Option
value=
{
item
.
ProductName
}
key=
{
item
.
Id
}
>
{
item
.
ProductName
}
</
Option
>
))
}
</
Select
>
</
Item
>
<
Item
label=
"菜单图标"
name=
"imageUrl"
...
...
src/pages/webConfig/menuconfig/editForm.jsx
View file @
d0ebbcde
...
...
@@ -13,6 +13,7 @@ const EditForm = props => {
info
,
configFiles
,
valueCallback
=
()
=>
{},
productList
,
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
[
otherForm
]
=
Form
.
useForm
();
...
...
@@ -70,6 +71,25 @@ const EditForm = props => {
<
Item
label=
"菜单别名"
name=
"shortName"
>
<
Input
placeholder=
"请输入菜单别名"
/>
</
Item
>
<
Item
label=
"产品类型:"
name=
"product"
rules=
{
[
{
required
:
true
,
message
:
'请选择产品类型'
,
},
]
}
>
<
Select
placeholder=
"请选择产品类型"
>
{
productList
&&
productList
.
map
(
item
=>
(
<
Option
value=
{
item
.
ProductName
}
key=
{
item
.
Id
}
>
{
item
.
ProductName
}
</
Option
>
))
}
</
Select
>
</
Item
>
<
Item
label=
"菜单图标"
name=
"imageUrl"
...
...
src/pages/webConfig/menuconfig/webMenu.jsx
View file @
d0ebbcde
...
...
@@ -19,6 +19,7 @@ import {
editWebMenu
,
// 改
getWebMenuInfo
,
// 查
dragMenu
,
// 菜单拖拽
getProductList
,
}
from
'@/services/webConfig/api'
;
const
MiniMenu
=
props
=>
{
...
...
@@ -38,6 +39,7 @@ const MiniMenu = props => {
const
[
modalLoading
,
setModalLoading
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
[
newTreeList
,
setNewTreeList
]
=
useState
([]);
const
[
productList
,
setProductList
]
=
useState
([]);
/* ***************************************************** */
const
[
curMenuType
,
setCurMenuType
]
=
useState
(
''
);
...
...
@@ -46,6 +48,14 @@ const MiniMenu = props => {
useEffect
(()
=>
{
getInfo
();
},
[
menuID
]);
useEffect
(()
=>
{
getProductList
().
then
(
res
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
===
0
)
{
setProductList
(
data
);
}
});
},
[]);
useEffect
(()
=>
{
console
.
log
(
menu
,
'menu'
);
...
...
@@ -439,6 +449,7 @@ const MiniMenu = props => {
configFiles=
{
configFiles
}
submitCallback=
{
submitCallback
}
submitLoading=
{
submitLoading
}
productList=
{
productList
}
/>
</
Modal
>
<
Modal
...
...
@@ -459,6 +470,7 @@ const MiniMenu = props => {
nodeObj=
{
nodeObj
}
configFiles=
{
configFiles
}
addType=
{
addType
}
productList=
{
productList
}
submitCallback=
{
submitCallback
}
/>
</
Modal
>
...
...
@@ -489,6 +501,7 @@ const MiniMenu = props => {
nodeType=
{
nodeType
}
info=
{
info
}
configFiles=
{
configFiles
}
productList=
{
productList
}
submitCallback=
{
editSubmitCallback
}
valueCallback=
{
valueCallback
}
/>
...
...
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