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
0e5f7bb5
Commit
0e5f7bb5
authored
1 year ago
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '修复产品授权接口调用三次bug,web配置,moblie配置覆盖导入强提醒'
parent
2fbb33e6
Pipeline
#82825
failed with stages
Changes
8
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
55 additions
and
141 deletions
+55
-141
global.less
src/global.less
+4
-0
ImportOrExport.jsx
.../productCenter/mobileConfig/menuconfig/ImportOrExport.jsx
+15
-1
ImportOrExport.less
...productCenter/mobileConfig/menuconfig/ImportOrExport.less
+5
-0
editForm.jsx
...pages/productCenter/productConfig/components/editForm.jsx
+9
-100
productConfig.jsx
src/pages/productCenter/productConfig/productConfig.jsx
+0
-37
productConfig.less
src/pages/productCenter/productConfig/productConfig.less
+0
-0
ImportOrExport.jsx
...ges/productCenter/webConfig/menuconfig/ImportOrExport.jsx
+17
-3
ImportOrExport.less
...es/productCenter/webConfig/menuconfig/ImportOrExport.less
+5
-0
No files found.
src/global.less
View file @
0e5f7bb5
...
...
@@ -105,6 +105,10 @@ iframe {
}
}
.ant-popover-message {
display: flex;
}
.ant-table-cell {
overflow: hidden;
white-space: nowrap;
...
...
This diff is collapsed.
Click to expand it.
src/pages/productCenter/mobileConfig/menuconfig/ImportOrExport.jsx
View file @
0e5f7bb5
...
...
@@ -3,6 +3,8 @@ import { Modal, Upload, Button, Form, Input, message, Popconfirm } from 'antd';
import
{
UploadOutlined
,
DownloadOutlined
}
from
'@ant-design/icons'
;
import
{
UpLoadWebModuleTree
,
DownLoadWebModuleTree
}
from
'@/services/webConfig/api'
;
import
icon
from
'@/assets/images/common/警告.png'
;
import
styles
from
'./ImportOrExport.less'
;
const
ImportOrExport
=
props
=>
{
const
{
visible
,
onFinish
,
onCancel
,
nodeObj
,
subSystemValue
}
=
props
;
...
...
@@ -101,13 +103,23 @@ const ImportOrExport = props => {
增量导入
</
Button
>
<
Popconfirm
overlayClassName=
{
styles
.
ImportOrExport
}
title=
{
<
span
>
<
span
style=
{
{
color
:
'red'
}
}
>
导入操作会覆盖所有菜单配置并且使
<
br
/>
角色菜单权限失效是否继续导入?
</
span
>
}
icon=
{
<
img
src=
{
icon
}
alt=
""
width=
"18px"
height=
"18px"
style=
{
{
marginTop
:
'3px'
}
}
/>
}
onConfirm=
{
()
=>
handleUpload
(
1
)
}
onVisibleChange=
{
()
=>
console
.
log
(
'visible change'
)
}
>
...
...
@@ -116,6 +128,8 @@ const ImportOrExport = props => {
style=
{
{
marginLeft
:
'10px'
,
display
:
nodeObj
?
'none'
:
'block'
,
backgroundColor
:
'#ff8f18'
,
borderColor
:
'#ff8f18'
,
}
}
>
覆盖导入
...
...
This diff is collapsed.
Click to expand it.
src/pages/productCenter/mobileConfig/menuconfig/ImportOrExport.less
0 → 100644
View file @
0e5f7bb5
.ImportOrExport {
.ant-popover-message-title {
padding-left: 12px;
}
}
This diff is collapsed.
Click to expand it.
src/pages/productCenter/productConfig/components/editForm.jsx
View file @
0e5f7bb5
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Form
,
Select
,
Input
,
Button
,
Popconfirm
,
Spin
}
from
'antd'
;
import
{
modifyProduct
,
getProductList
}
from
'@/services/webConfig/api'
;
import
{
Form
,
Select
,
Input
,
Button
}
from
'antd'
;
const
{
Item
}
=
Form
;
const
{
Option
}
=
Select
;
const
{
TextArea
}
=
Input
;
const
EditForm
=
props
=>
{
const
{
productObj
,
editCallback
,
handleDel
,
userProductsList
}
=
props
;
const
[
config
,
setConfig
]
=
useState
(
''
);
// 网站配置信息
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
but
,
setBut
]
=
useState
(
false
);
const
[
form
]
=
Form
.
useForm
();
const
layout
=
{
...
...
@@ -28,56 +25,24 @@ const EditForm = props => {
},
];
useEffect
(()
=>
{
getProductList
().
then
(
res
=>
{
const
{
code
}
=
res
;
if
(
code
===
0
)
{
const
{
data
:
{
AllProducts
,
UserProducts
},
}
=
res
;
console
.
log
(
UserProducts
);
console
.
log
(
productObj
);
let
aa
=
UserProducts
.
find
(
i
=>
i
.
ProductName
==
productObj
.
ProductName
);
if
(
productObj
)
{
let
aa
=
userProductsList
.
find
(
i
=>
i
.
ProductName
==
productObj
.
ProductName
);
getData
(
aa
);
}
});
},
[
productObj
]);
const
getData
=
aa
=>
{
if
(
!
productObj
.
IsUsed
)
{
console
.
log
(
12
);
setBut
(
true
);
form
.
setFieldsValue
({
...
productObj
});
if
(
aa
)
{
form
.
setFieldsValue
({
DefaultSetting
:
aa
.
DefaultSetting
,
RouteUrl
:
aa
.
RouteUrl
});
}
}
else
{
console
.
log
(
34
);
setBut
(
false
);
}
form
.
setFieldsValue
({
...
productObj
});
if
(
aa
)
{
form
.
setFieldsValue
({
DefaultSetting
:
aa
.
DefaultSetting
,
RouteUrl
:
aa
.
RouteUrl
});
}
}
};
// useEffect(() => {
// if (!productObj.IsUsed) {
// console.log(12);
// setBut(true);
// form.setFieldsValue({ ...productObj });
// // if (aa) {
// // form.setFieldsValue({ DefaultSetting: aa.DefaultSetting });
// // }
// } else {
// console.log(34);
// setBut(false);
// form.setFieldsValue({ ...productObj });
// // if (aa) {
// // form.setFieldsValue({ DefaultSetting: aa.DefaultSetting });
// // }
// }
// }, [productObj]);
// 提交选择
const
submit
=
value
=>
{};
// 提交
const
finished
=
value
=>
{
let
params
=
{
...
...
@@ -87,59 +52,18 @@ const EditForm = props => {
editCallback
(
params
);
};
return
(
<
Spin
spinning=
{
loading
}
tip=
"loading..."
>
{
/* <div style={{ marginLeft: '5%', marginTop: '-5px' }}>配置详情</div> */
}
<
div
style=
{
{
minHeight
:
'calc(100vh - 252px)'
,
marginTop
:
'35px'
}
}
>
<
Form
form=
{
form
}
name=
"formEdit"
{
...
layout
}
onFinish=
{
finished
}
>
<
Item
label=
"产品包名:"
name=
"PackageName"
// rules={[
// {
// required: true,
// pattern: new RegExp(/^[a-z0-9A-Z]+$/),
// message: '产品包名必须是英文或者数字',
// },
// ]}
>
<
Item
label=
"产品包名:"
name=
"PackageName"
>
<
Input
placeholder=
"请输入产品包名"
allowClear
disabled
/>
</
Item
>
<
Item
label=
"产品名称:"
name=
"ProductName"
// rules={[
// {
// required: true,
// pattern: new RegExp(/^[a-z0-9A-Z]+$/),
// message: '产品名称必须是英文或者数字',
// },
// ]}
>
<
Item
label=
"产品名称:"
name=
"ProductName"
>
<
Input
placeholder=
"请输入产品名称"
allowClear
disabled
/>
</
Item
>
<
Item
label=
"产品说明:"
name=
"Description"
// rules={[
// {
// required: true,
// pattern: new RegExp(/^[a-z0-9A-Z]+$/),
// message: '产品名称必须是英文或者数字',
// },
// ]}
>
<
Item
label=
"产品说明:"
name=
"Description"
>
<
Input
placeholder=
"请输入产品说明"
disabled
/>
</
Item
>
<
Item
label=
"发布状态:"
name=
"PublishState"
// rules={[
// {
// required: true,
// message: '请选择发布状态',
// },
// ]}
>
<
Item
label=
"发布状态:"
name=
"PublishState"
>
<
Select
placeholder=
"请选择发布状态"
disabled
>
{
environmentList
&&
environmentList
.
map
(
item
=>
(
...
...
@@ -163,7 +87,6 @@ const EditForm = props => {
},
]
}
>
{
/* <Input addonBefore="//" placeholder="请输入访问路由" allowClear /> */
}
<
Input
placeholder=
"请输入访问路由,ip加端口号,示例//localhost:3001"
allowClear
/>
</
Item
>
...
...
@@ -191,23 +114,9 @@ const EditForm = props => {
提交
</
Button
>
</
Item
>
{
/* <Item wrapperCol={{ span: 8, offset: 8 }}>
<Popconfirm
title="确实删除产品"
placement="right"
okText="确认"
cancelText="取消"
onConfirm={handleDel}
>
<Button type="primary" danger>
删除
</Button>
</Popconfirm>
</Item> */
}
</
div
>
</
Form
>
</
div
>
</
Spin
>
);
};
export
default
EditForm
;
This diff is collapsed.
Click to expand it.
src/pages/productCenter/productConfig/productConfig.jsx
View file @
0e5f7bb5
...
...
@@ -19,43 +19,6 @@ const ProductConfig = props => {
const
[
flag
,
setFlag
]
=
useState
(
1
);
const
[
list
,
setList
]
=
useState
(
new
Set
());
const
[
keepData
,
setKeepData
]
=
useState
(
false
);
// 默认展示第一项
// useEffect(() => {
// setLoading(true);
// getProductList()
// .then(res => {
// const { code } = res;
// if (code === 0) {
// const {
// data: { AllProducts, UserProducts },
// } = res;
// // setProductList(AllProducts);
// setUserProductsList(UserProducts);
// setProductObj(AllProducts[0]);
// AllProducts.map(i => {
// list.add(i.ProductType);
// });
// let a = [];
// list.map(i => {
// a.push(i);
// });
// let aa = [];
// a.map((i, j) => {
// let ad = [];
// AllProducts.map(k => {
// if (k.ProductType == i) {
// ad.push(k);
// }
// });
// aa.push(ad);
// });
// setProductList(aa);
// }
// })
// .finally(() => {
// setLoading(false);
// });
// }, []);
useEffect
(()
=>
{
setLoading
(
true
);
...
...
This diff is collapsed.
Click to expand it.
src/pages/productCenter/productConfig/productConfig.less
View file @
0e5f7bb5
This diff is collapsed.
Click to expand it.
src/pages/productCenter/webConfig/menuconfig/ImportOrExport.jsx
View file @
0e5f7bb5
...
...
@@ -3,6 +3,8 @@ import { Modal, Upload, Button, Form, Input, message, Popconfirm } from 'antd';
import
{
UploadOutlined
,
DownloadOutlined
}
from
'@ant-design/icons'
;
import
{
UpLoadWebModuleTree
,
DownLoadWebModuleTree
}
from
'@/services/webConfig/api'
;
import
icon
from
'@/assets/images/common/警告.png'
;
import
styles
from
'./ImportOrExport.less'
;
const
ImportOrExport
=
props
=>
{
const
{
visible
,
onFinish
,
onCancel
,
nodeObj
,
subSystemValue
}
=
props
;
...
...
@@ -100,13 +102,23 @@ const ImportOrExport = props => {
增量导入
</
Button
>
<
Popconfirm
overlayClassName=
{
styles
.
ImportOrExport
}
title=
{
<
span
>
导入操作会覆盖所有菜单配置并且
使
<
span
style=
{
{
color
:
'red'
}
}
>
覆盖导入操作会覆盖所有菜单配置并
使
<
br
/>
角色菜单权限失效是否继续导入?
角色菜单权限失效
!!!
是否继续导入?
</
span
>
}
icon=
{
<
img
src=
{
icon
}
alt=
""
width=
"18px"
height=
"18px"
style=
{
{
marginTop
:
'3px'
}
}
/>
}
onConfirm=
{
()
=>
handleUpload
(
1
)
}
onVisibleChange=
{
()
=>
console
.
log
(
'visible change'
)
}
>
...
...
@@ -115,6 +127,8 @@ const ImportOrExport = props => {
style=
{
{
marginLeft
:
'10px'
,
display
:
nodeObj
?
'none'
:
'block'
,
backgroundColor
:
'#ff8f18'
,
borderColor
:
'#ff8f18'
,
}
}
>
覆盖导入
...
...
This diff is collapsed.
Click to expand it.
src/pages/productCenter/webConfig/menuconfig/ImportOrExport.less
0 → 100644
View file @
0e5f7bb5
.ImportOrExport {
.ant-popover-message-title {
padding-left: 12px;
}
}
This diff is collapsed.
Click to expand it.
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