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
70fe1612
Commit
70fe1612
authored
Jan 22, 2021
by
Maofei94
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 产品配置修改
parent
3dc3762f
Pipeline
#22917
passed with stages
in 19 minutes 36 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
34 deletions
+65
-34
SiteConfig.jsx
src/pages/mobileConfig/SiteConfig.jsx
+1
-0
addConfig.jsx
src/pages/mobileConfig/addConfig.jsx
+1
-0
editForm.jsx
src/pages/webConfig/components/editForm.jsx
+10
-10
productConfig.jsx
src/pages/webConfig/productConfig.jsx
+27
-4
productConfig.less
src/pages/webConfig/productConfig.less
+6
-0
utils.js
src/pages/webConfig/utils.js
+20
-20
No files found.
src/pages/mobileConfig/SiteConfig.jsx
View file @
70fe1612
...
...
@@ -22,6 +22,7 @@ const SiteConfig = props => {
]);
// 系统登陆页
const
[
styleList
,
setStyleList
]
=
useState
([
{
text
:
'默认风格'
,
value
:
'default'
},
{
text
:
'熊猫风格'
,
value
:
'熊猫风格'
},
]);
// 系统风格
const
[
themeList
,
setThemeList
]
=
useState
([
{
text
:
'默认皮肤'
,
value
:
'default'
},
...
...
src/pages/mobileConfig/addConfig.jsx
View file @
70fe1612
...
...
@@ -17,6 +17,7 @@ const AddConfig = props => {
]);
// 系统登陆页
const
[
styleList
,
setStyleList
]
=
useState
([
{
text
:
'默认风格'
,
value
:
'default'
},
{
text
:
'熊猫风格'
,
value
:
'熊猫风格'
},
]);
// 系统风格
const
[
themeList
,
setThemeList
]
=
useState
([
{
text
:
'默认皮肤'
,
value
:
'default'
},
...
...
src/pages/webConfig/components/editForm.jsx
View file @
70fe1612
...
...
@@ -17,12 +17,12 @@ const EditForm = props => {
const
environmentList
=
[
{
value
:
'production'
,
label
:
'
生产环境
'
,
label
:
'
已发布
'
,
key
:
'production'
,
},
{
value
:
'development'
,
label
:
'
开发环境
'
,
label
:
'
研发中
'
,
key
:
'development'
,
},
];
...
...
@@ -59,7 +59,7 @@ const EditForm = props => {
<
Input
placeholder=
"请输入产品名称"
allowClear
disabled
/>
</
Item
>
<
Item
label=
"产品
别
名:"
label=
"产品
包
名:"
name=
"ProductAlias"
// rules={[
// {
...
...
@@ -68,20 +68,20 @@ const EditForm = props => {
// },
// ]}
>
<
Input
placeholder=
"请输入产品
别名
"
allowClear
/>
<
Input
placeholder=
"请输入产品
包名:
"
allowClear
/>
</
Item
>
<
Item
label=
"
产品环境
:"
label=
"
发布状态
:"
name=
"Environment"
rules=
{
[
{
required
:
true
,
message
:
'请选择
产品环境
'
,
message
:
'请选择
发布状态:
'
,
},
]
}
>
<
Select
placeholder=
"请选择
产品环境
"
>
<
Select
placeholder=
"请选择
发布状态:
"
>
{
environmentList
&&
environmentList
.
map
(
item
=>
(
<
Option
value=
{
item
.
value
}
key=
{
item
.
key
}
>
...
...
@@ -91,16 +91,16 @@ const EditForm = props => {
</
Select
>
</
Item
>
<
Item
label=
"
入口url
"
label=
"
访问路由
"
name=
"StartUrl"
rules=
{
[
{
required
:
true
,
message
:
'请输入
入口url
'
,
message
:
'请输入
访问路由
'
,
},
]
}
>
<
Input
addonBefore=
"//"
placeholder=
"请输入
入口url
"
allowClear
/>
<
Input
addonBefore=
"//"
placeholder=
"请输入
访问路由
"
allowClear
/>
</
Item
>
<
Item
label=
"默认配置"
...
...
src/pages/webConfig/productConfig.jsx
View file @
70fe1612
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Card
,
List
,
Drawer
,
Button
,
Empty
,
Spin
,
notification
}
from
'antd'
;
import
{
Card
,
List
,
Drawer
,
Button
,
Empty
,
Spin
,
notification
,
Switch
,
}
from
'antd'
;
import
{
modifyProduct
,
getProductList
,
...
...
@@ -95,6 +104,9 @@ const ProductConfig = props => {
console
.
log
(
err
);
});
};
const
handleSwitchClick
=
(
e
,
id
)
=>
{
console
.
log
(
e
,
id
);
};
const
renderListItem
=
arr
=>
arr
.
map
(
item
=>
(
<
List
.
Item
...
...
@@ -105,7 +117,18 @@ const ProductConfig = props => {
})
}
onClick=
{
()
=>
setProductObt
(
item
)
}
>
{
item
.
ProductName
}
<
Switch
// size="small"
defaultChecked=
{
!
item
.
checked
}
checkedChildren=
"启用"
unCheckedChildren=
"关闭"
onClick=
{
e
=>
{
handleSwitchClick
(
e
,
item
.
Id
);
}
}
/>
<
span
className=
{
classnames
({
[
styles
.
itemspan
]:
true
})
}
>
{
item
.
ProductName
}
</
span
>
</
List
.
Item
>
));
return
(
...
...
@@ -114,9 +137,9 @@ const ProductConfig = props => {
<
Card
className=
{
classnames
(
`${styles.leftList}`
)
}
>
<
div
className=
{
styles
.
listTop
}
>
产品选择:
<
Button
type=
"primary"
onClick=
{
handleAdd
}
>
{
/*
<Button type="primary" onClick={handleAdd}>
新增
</
Button
>
</Button>
*/
}
{
/* <Button type="primary" danger onClick={handleDel}>
删除
</Button> */
}
...
...
src/pages/webConfig/productConfig.less
View file @
70fe1612
...
...
@@ -23,6 +23,12 @@
padding-left: 5px;
cursor: pointer;
font-size: 14px;
display: flex;
align-items: center;
justify-content: flex-start;
.itemspan{
margin-left: 10px;
}
}
.listItem:hover{
background-color: #f8f8f8 ;
...
...
src/pages/webConfig/utils.js
View file @
70fe1612
...
...
@@ -185,26 +185,26 @@ export const getDefaultGetWebconfig = ({
},
],
},
product
:
{
label
:
'产品类型'
,
formType
:
ITEM_TYPE
.
SELECT
,
placeholder
:
'请选择产品类型'
,
options
:
products
.
map
(
t
=>
({
value
:
t
.
ProductName
,
children
:
t
.
ProductAlias
,
key
:
t
.
Id
,
})),
onDropdownVisibleChange
:
onGetProduct
,
showSearch
:
false
,
filterOption
:
(
input
,
option
)
=>
option
.
children
.
toLowerCase
().
indexOf
(
input
.
toLowerCase
())
>=
0
,
rules
:
[
{
required
:
false
,
message
:
'产品类型必填'
,
},
],
},
//
product: {
//
label: '产品类型',
//
formType: ITEM_TYPE.SELECT,
//
placeholder: '请选择产品类型',
//
options: products.map(t => ({
//
value: t.ProductName,
//
children: t.ProductAlias,
//
key: t.Id,
//
})),
//
onDropdownVisibleChange: onGetProduct,
//
showSearch: false,
//
filterOption: (input, option) =>
//
option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
//
rules: [
//
{
//
required: false,
//
message: '产品类型必填',
//
},
//
],
//
},
theme
:
{
label
:
'系统皮肤'
,
formType
:
ITEM_TYPE
.
SELECT
,
...
...
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