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
e51dea1e
Commit
e51dea1e
authored
Sep 14, 2023
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '授权修复'
parent
fa8bf5b9
Pipeline
#78897
passed with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
7 deletions
+42
-7
productConfig.jsx
src/pages/productCenter/productConfig/productConfig.jsx
+40
-7
api.js
src/services/webConfig/api.js
+2
-0
No files found.
src/pages/productCenter/productConfig/productConfig.jsx
View file @
e51dea1e
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Card
,
List
,
Empty
,
Spin
,
notification
,
Switch
}
from
'antd'
;
import
{
Card
,
List
,
Empty
,
Spin
,
notification
,
Switch
,
Button
}
from
'antd'
;
import
{
modifyProduct
,
getProductList
,
delProductList
}
from
'@/services/webConfig/api'
;
import
{
modifyProduct
,
getProductList
,
delProductList
,
ProductRepair
,
}
from
'@/services/webConfig/api'
;
import
classnames
from
'classnames'
;
import
classnames
from
'classnames'
;
import
{
ToolOutlined
}
from
'@ant-design/icons'
;
import
EditForm
from
'./components/editForm'
;
import
EditForm
from
'./components/editForm'
;
import
styles
from
'./productConfig.less'
;
import
styles
from
'./productConfig.less'
;
...
@@ -61,11 +67,8 @@ const ProductConfig = props => {
...
@@ -61,11 +67,8 @@ const ProductConfig = props => {
data
:
{
AllProducts
,
UserProducts
},
data
:
{
AllProducts
,
UserProducts
},
}
=
res
;
}
=
res
;
// setProductList(AllProducts);
// setProductList(AllProducts);
console
.
log
(
res
.
data
.
IsAuthorize
);
setKeepData
(
res
.
data
.
IsAuthorize
);
setKeepData
(
res
.
data
.
IsAuthorize
);
setUserProductsList
(
UserProducts
);
setUserProductsList
(
UserProducts
);
console
.
log
(
UserProducts
);
console
.
log
(
userProductsList
);
if
(
!
productObj
&&
AllProducts
.
length
>
0
)
{
if
(
!
productObj
&&
AllProducts
.
length
>
0
)
{
setProductObj
(
AllProducts
[
0
]);
setProductObj
(
AllProducts
[
0
]);
}
}
...
@@ -74,7 +77,6 @@ const ProductConfig = props => {
...
@@ -74,7 +77,6 @@ const ProductConfig = props => {
list
.
add
(
i
.
ProductType
);
list
.
add
(
i
.
ProductType
);
});
});
let
a
=
[];
let
a
=
[];
console
.
log
(
list
,
'listsss'
);
[...
list
].
map
(
i
=>
{
[...
list
].
map
(
i
=>
{
a
.
push
(
i
);
a
.
push
(
i
);
});
});
...
@@ -219,11 +221,42 @@ const ProductConfig = props => {
...
@@ -219,11 +221,42 @@ const ProductConfig = props => {
))
}
))
}
</
div
>
</
div
>
);
);
const
repair
=
()
=>
{
setLoading
(
true
);
ProductRepair
().
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
code
===
0
)
{
setFlag
(
flag
+
1
);
notification
.
success
({
message
:
'提示'
,
description
:
'修复成功'
,
duration
:
3
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
description
:
res
.
msg
,
duration
:
3
,
});
}
});
};
return
(
return
(
<
Spin
spinning=
{
loading
}
tip=
"loading..."
>
<
Spin
spinning=
{
loading
}
tip=
"loading..."
>
<
div
className=
{
styles
.
box
}
>
<
div
className=
{
styles
.
box
}
>
<
Card
className=
{
classnames
(
`${styles.leftList}`
)
}
>
<
Card
className=
{
classnames
(
`${styles.leftList}`
)
}
>
<
div
className=
{
styles
.
listTop
}
>
可用产品:
</
div
>
<
div
className=
{
styles
.
listTop
}
>
<
div
>
可用产品:
</
div
>
<
Button
onClick=
{
()
=>
{
repair
();
}
}
>
<
ToolOutlined
/>
修复授权
</
Button
>
</
div
>
<
div
style=
{
{
height
:
'calc(100% - 50px)'
,
overflow
:
'scroll'
}
}
>
<
div
style=
{
{
height
:
'calc(100% - 50px)'
,
overflow
:
'scroll'
}
}
>
{
productList
&&
productList
.
length
>
0
?
(
{
productList
&&
productList
.
length
>
0
?
(
productList
.
map
(
item
=>
renderListItem
(
item
))
productList
.
map
(
item
=>
renderListItem
(
item
))
...
...
src/services/webConfig/api.js
View file @
e51dea1e
...
@@ -341,3 +341,5 @@ export const SortScheme = param => get(`${PANDA_GIS}/MapLayer/SortScheme`, param
...
@@ -341,3 +341,5 @@ export const SortScheme = param => get(`${PANDA_GIS}/MapLayer/SortScheme`, param
export
const
SortSchemePost
=
param
=>
post
(
`
${
PANDA_GIS
}
/MapLayer/SortSchemePost`
,
param
);
export
const
SortSchemePost
=
param
=>
post
(
`
${
PANDA_GIS
}
/MapLayer/SortSchemePost`
,
param
);
export
const
GetUserName
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/UserCenter/GetUserName`
,
param
);
export
const
GetUserName
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/UserCenter/GetUserName`
,
param
);
export
const
ProductRepair
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/DBManager/ProductRepair`
,
param
);
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