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
73c913e7
Commit
73c913e7
authored
4 years ago
by
张烨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复图片配置回显
parent
798fe789
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
7 deletions
+38
-7
index.tsx
src/components/Upload/index.tsx
+11
-2
index.js
src/pages/webConfig/index.js
+24
-5
api.js
src/services/webConfig/api.js
+3
-0
No files found.
src/components/Upload/index.tsx
View file @
73c913e7
...
...
@@ -36,7 +36,8 @@ interface PicturesWallType {
onChange
?:
(
v
:
any
)
=>
void
;
cropRate
?:
number
|
boolean
;
isCrop
?:
boolean
;
type
?:
'CityTemp'
|
'icon'
|
'androidMenu'
|
'menuNew'
type
?:
'CityTemp'
|
'icon'
|
'androidMenu'
|
'menuNew'
,
value
?:
string
,
}
class
PicturesWall
extends
React
.
Component
<
PicturesWallType
>
{
...
...
@@ -47,7 +48,12 @@ class PicturesWall extends React.Component<PicturesWallType> {
previewTitle
:
''
,
imgBed
:
[],
curSelectedImg
:
''
,
fileList
:
this
.
props
.
fileList
||
[],
fileList
:
this
.
props
.
value
?
[{
url
:
this
.
props
.
value
,
uid
:
uuid
(
8
,
16
),
name
:
'熊猫运维中台系统'
,
status
:
'done'
,
}]
:
[],
};
handleCancel
=
()
=>
this
.
setState
({
previewVisible
:
false
});
...
...
@@ -144,6 +150,9 @@ class PicturesWall extends React.Component<PicturesWallType> {
if
(
path
&&
path
.
indexOf
(
'data:'
)
===
0
)
{
return
path
}
if
(
path
&&
path
.
indexOf
(
'assets'
)
===
0
)
{
return
`
${
window
.
location
.
origin
}
/Web4/
${
path
}
`
.
replace
(
/
\\
/g
,
'/'
)
}
return
`
${
window
.
location
.
origin
}
/
${
path
}
`
.
replace
(
/
\\
/g
,
'/'
)
}
...
...
This diff is collapsed.
Click to expand it.
src/pages/webConfig/index.js
View file @
73c913e7
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
{
Tabs
}
from
'antd'
;
import
{
getWebModuleTree
,
getWebConfigByName
}
from
'@/services/webConfig/api'
;
import
{
getWebModuleTree
,
getWebConfigByName
,
getWebconfig
,
}
from
'@/services/webConfig/api'
;
import
styles
from
'./index.less'
;
import
SiteConfig
from
'./components/siteConfigDrawer'
;
import
{
appConnector
}
from
'@/containers/App/store'
;
...
...
@@ -12,8 +16,9 @@ const WebConfigPage = props => {
const
[
configVisible
,
setConfigVisible
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
webs
,
setWebs
]
=
useState
([]);
const
[
curWeb
,
setCurWeb
]
=
useState
(
null
);
// 当前展示的web配置
const
[
configObj
,
setConfigObj
]
=
useState
({});
const
[
curWeb
,
setCurWeb
]
=
useState
(
null
);
// 当前展示的web
const
[
configObj
,
setConfigObj
]
=
useState
({});
// 获取当前的web的配置
const
[
toEdit
,
setToEdit
]
=
useState
(
null
);
// 编辑展示用的配置
const
hasIntegerate
=
()
=>
webs
.
some
(
w
=>
w
.
webType
===
'integrate'
);
...
...
@@ -33,9 +38,23 @@ const WebConfigPage = props => {
});
},
[]);
useEffect
(()
=>
{
// eslint-disable-next-line no-unused-expressions
curWeb
&&
getWebconfig
(
curWeb
.
text
).
then
(
res
=>
setConfigObj
(
res
));
},
[
curWeb
]);
const
renderTabPane
=
tabPaneItem
=>
(
<
TabPane
key
=
{
tabPaneItem
.
text
}
tab
=
{
tabPaneItem
.
text
}
>
<><
/
>
<>
<
span
onClick
=
{()
=>
{
setToEdit
(
configObj
);
setConfigVisible
(
true
);
}}
>
查看配置
<
/span
>
<
/
>
<
/TabPane
>
);
...
...
@@ -68,7 +87,7 @@ const WebConfigPage = props => {
<
SiteConfig
visible
=
{
configVisible
}
onClose
=
{
onDrawerClose
}
config
=
{
configObj
}
config
=
{
toEdit
}
hasIntegerate
=
{
hasIntegerate
()}
/
>
<
/div
>
...
...
This diff is collapsed.
Click to expand it.
src/services/webConfig/api.js
View file @
73c913e7
...
...
@@ -22,3 +22,6 @@ export const getMapCofigs = () =>
`
${
CITY_SERVICE
}
/OMS.svc/GetAllConfigText?terminalType=scheme&isBaseMap=false`
,
{
query
:
''
},
);
export
const
getWebconfig
=
title
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc/W4_GetWebsite`
,
{
title
});
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