Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
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
zhaochengxiang
szse
Commits
4b3260a7
Commit
4b3260a7
authored
Oct 18, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产运营
parent
01639ec7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
325 additions
and
0 deletions
+325
-0
App.js
src/App.js
+2
-0
routes.js
src/routes.js
+4
-0
index.jsx
src/view/Manage/AssetOperation/index.jsx
+311
-0
index.less
src/view/Manage/AssetOperation/index.less
+6
-0
index.jsx
src/view/Manage/index.jsx
+2
-0
No files found.
src/App.js
View file @
4b3260a7
...
@@ -21,6 +21,7 @@ const AssetResourceBrowse = loadable(()=> import('./view/Manage/AssetResourceBro
...
@@ -21,6 +21,7 @@ const AssetResourceBrowse = loadable(()=> import('./view/Manage/AssetResourceBro
const
AssetBrowse
=
loadable
(()
=>
import
(
'./view/Manage/AssetBrowse'
));
const
AssetBrowse
=
loadable
(()
=>
import
(
'./view/Manage/AssetBrowse'
));
const
TaskManage
=
loadable
(()
=>
import
(
'./view/Manage/AssetTask'
));
const
TaskManage
=
loadable
(()
=>
import
(
'./view/Manage/AssetTask'
));
const
AssetRecycle
=
loadable
(()
=>
import
(
'./view/Manage/AssetRecycle'
));
const
AssetRecycle
=
loadable
(()
=>
import
(
'./view/Manage/AssetRecycle'
));
const
AssetOperation
=
loadable
(()
=>
import
(
'./view/Manage/AssetOperation'
));
const
DatasourceManage
=
loadable
(()
=>
import
(
'./view/Manage/DatasourceManage'
));
const
DatasourceManage
=
loadable
(()
=>
import
(
'./view/Manage/DatasourceManage'
));
const
AssetDetailPage
=
loadable
(()
=>
import
(
'./view/Manage/AssetManage/Component/AssetDetailPage'
));
const
AssetDetailPage
=
loadable
(()
=>
import
(
'./view/Manage/AssetManage/Component/AssetDetailPage'
));
const
AssetDetail
=
loadable
(()
=>
import
(
'./view/Manage/AssetManage/Component/AssetDetail'
));
const
AssetDetail
=
loadable
(()
=>
import
(
'./view/Manage/AssetManage/Component/AssetDetail'
));
...
@@ -161,6 +162,7 @@ export class App extends React.Component {
...
@@ -161,6 +162,7 @@ export class App extends React.Component {
<
Route
path
=
{
'/center-home/menu/asset-browse'
}
component
=
{
AssetBrowse
}
exact
/>
<
Route
path
=
{
'/center-home/menu/asset-browse'
}
component
=
{
AssetBrowse
}
exact
/>
<
Route
path
=
{
'/center-home/menu/task-manage'
}
component
=
{
TaskManage
}
exact
/>
<
Route
path
=
{
'/center-home/menu/task-manage'
}
component
=
{
TaskManage
}
exact
/>
<
Route
path
=
{
'/center-home/menu/asset-recycle'
}
component
=
{
AssetRecycle
}
exact
/>
<
Route
path
=
{
'/center-home/menu/asset-recycle'
}
component
=
{
AssetRecycle
}
exact
/>
<
Route
path
=
{
'/center-home/menu/asset-operation'
}
component
=
{
AssetOperation
}
exact
/>
<
Route
path
=
{
'/center-home/menu/msd-define'
}
component
=
{
DataMasterDefine
}
exact
/>
<
Route
path
=
{
'/center-home/menu/msd-define'
}
component
=
{
DataMasterDefine
}
exact
/>
<
Route
path
=
{
'/center-home/menu/msd-manage'
}
component
=
{
DataMasterManage
}
exact
/>
<
Route
path
=
{
'/center-home/menu/msd-manage'
}
component
=
{
DataMasterManage
}
exact
/>
<
Route
path
=
{
'/center-home/menu/metadata-harvester'
}
component
=
{
MetadataHarvester
}
exact
/>
<
Route
path
=
{
'/center-home/menu/metadata-harvester'
}
component
=
{
MetadataHarvester
}
exact
/>
...
...
src/routes.js
View file @
4b3260a7
...
@@ -48,6 +48,10 @@ export const routes = [
...
@@ -48,6 +48,10 @@ export const routes = [
text
:
'未挂载资产'
,
text
:
'未挂载资产'
,
},
},
{
{
name
:
'asset-operation'
,
text
:
'资产运营'
,
},
{
name
:
'msd-define'
,
name
:
'msd-define'
,
text
:
'主数据定义'
text
:
'主数据定义'
},
},
...
...
src/view/Manage/AssetOperation/index.jsx
0 → 100644
View file @
4b3260a7
import
React
from
'react'
import
*
as
echarts
from
'echarts'
import
{
Row
,
Col
,
Card
,
Space
,
Divider
,
Badge
}
from
'antd'
import
Table
from
'../../../util/Component/Table'
import
{
dispatch
}
from
'../../../model'
import
'./index.less'
const
mockStatisticInfo
=
[
{
title
:
'内部资源'
,
value
:
12112
},
{
title
:
'外部资源'
,
value
:
5609
},
{
title
:
'已发布资产'
,
value
:
7174
},
{
title
:
'未发布资产'
,
value
:
1309
},
{
title
:
'梳理任务'
,
value
:
122
},
]
const
FC
=
(
props
)
=>
{
return
(
<
div
className=
'asset-operation p-3'
>
<
Header
title=
'资产数据概览'
/>
<
Summary
data=
{
mockStatisticInfo
}
/>
<
div
className=
'my-3'
>
<
Row
gutter=
{
10
}
>
<
Col
span=
{
12
}
>
<
ResourceStatistic
/>
</
Col
>
<
Col
span=
{
12
}
>
<
AssetStatistic
/>
</
Col
>
</
Row
>
</
div
>
<
div
className=
'my-3'
>
<
Row
gutter=
{
10
}
>
<
Col
span=
{
12
}
>
<
AssetBrowseRank
/>
</
Col
>
<
Col
span=
{
12
}
>
<
AssetNewest
/>
</
Col
>
</
Row
>
</
div
>
</
div
>
)
}
export
default
FC
export
const
Header
=
({
title
})
=>
(
<
Space
size=
'small'
align=
'center'
>
<
Divider
style=
{
{
width
:
2
,
height
:
15
,
backgroundColor
:
'#196AD2'
,
margin
:
'15px 0'
}
}
/>
<
span
style=
{
{
fontWeight
:
500
,
fontSize
:
16
}
}
>
{
title
}
</
span
>
</
Space
>
)
const
Summary
=
({
data
})
=>
{
return
(
<
Row
gutter=
{
10
}
>
{
data
?.
map
((
item
,
index
)
=>
{
return
(
<
Col
key=
{
index
}
span=
{
4
}
>
<
Card
>
<
div
className=
'flex'
style=
{
{
justifyContent
:
'space-between'
,
alignItems
:
'center'
}
}
>
<
span
style=
{
{
color
:
'rgba(0, 0, 0, 0.45)'
}
}
>
{
item
.
title
}
</
span
>
<
span
style=
{
{
color
:
'rgba(0, 0, 0, 0.85)'
,
fontSize
:
24
}
}
>
{
item
.
value
||
0
}
</
span
>
</
div
>
</
Card
>
</
Col
>
);
})
}
</
Row
>
)
}
const
ResourceStatistic
=
()
=>
{
return
(
<
Card
>
<
Header
title=
'数据资源统计'
/>
<
StackedLine
/>
</
Card
>
)
}
const
AssetStatistic
=
()
=>
{
return
(
<
Card
>
<
Header
title=
'数据资产统计'
/>
<
StackedLine
/>
</
Card
>
)
}
const
AssetBrowseRank
=
()
=>
{
const
[
loading
,
setLoading
]
=
React
.
useState
(
false
)
const
[
data
,
setData
]
=
React
.
useState
()
const
cols
=
[
{
title
:
'名次'
,
dataIndex
:
'index'
,
render
:
(
_
,
__
,
index
)
=>
{
let
color
=
'#c7000b'
if
(
index
===
0
)
{
color
=
'#FD6161'
}
else
if
(
index
===
1
){
color
=
'#F0864F'
}
else
if
(
index
===
2
){
color
=
'#F9C22E'
}
return
(
<
Badge
style=
{
{
marginBottom
:
2
,
backgroundColor
:
color
}
}
count=
{
index
+
1
}
/>
)
}
},
{
title
:
'英文名'
,
dataIndex
:
'name'
,
ellipsis
:
true
,
},
{
title
:
'中文名'
,
dataIndex
:
'cnName'
,
ellipsis
:
true
,
},
{
title
:
'浏览次数'
,
dataIndex
:
'count'
,
ellipsis
:
true
,
},
]
React
.
useEffect
(()
=>
{
getRanks
()
},
[])
const
getRanks
=
()
=>
{
setLoading
(
true
)
setTimeout
(()
=>
{
setLoading
(
false
)
setData
(
Array
.
from
({
length
:
10
}).
map
((
_
,
i
)
=>
({
})))
},
1000
)
}
return
(
<
Card
>
<
Header
title=
'资产浏览排行榜'
/>
<
Table
loading=
{
loading
}
size=
'small'
columns=
{
cols
}
dataSource=
{
data
}
pagination=
{
false
}
/>
</
Card
>
)
}
const
AssetNewest
=
()
=>
{
const
[
loading
,
setLoading
]
=
React
.
useState
(
false
)
const
[
data
,
setData
]
=
React
.
useState
()
const
cols
=
[
{
title
:
'名次'
,
dataIndex
:
'index'
,
render
:
(
_
,
__
,
index
)
=>
{
let
color
=
'#c7000b'
if
(
index
===
0
)
{
color
=
'#FD6161'
}
else
if
(
index
===
1
){
color
=
'#F0864F'
}
else
if
(
index
===
2
){
color
=
'#F9C22E'
}
return
(
<
Badge
style=
{
{
marginBottom
:
2
,
backgroundColor
:
color
}
}
count=
{
index
+
1
}
/>
)
}
},
{
title
:
'英文名'
,
dataIndex
:
'name'
,
ellipsis
:
true
,
},
{
title
:
'中文名'
,
dataIndex
:
'cnName'
,
ellipsis
:
true
,
},
{
title
:
'发布时间'
,
dataIndex
:
'time'
,
ellipsis
:
true
,
},
]
React
.
useEffect
(()
=>
{
getRanks
()
},
[])
const
getRanks
=
()
=>
{
setLoading
(
true
)
setTimeout
(()
=>
{
setLoading
(
false
)
setData
(
Array
.
from
({
length
:
10
}).
map
((
_
,
i
)
=>
({
})))
},
1000
)
}
return
(
<
Card
>
<
Header
title=
'最新发布资产'
/>
<
Table
loading=
{
loading
}
size=
'small'
columns=
{
cols
}
dataSource=
{
data
}
pagination=
{
false
}
/>
</
Card
>
)
}
const
StackedLine
=
({
data
})
=>
{
const
ref
=
React
.
useRef
()
const
echartsRef
=
React
.
useRef
()
React
.
useEffect
(()
=>
{
echartsRef
.
current
=
echarts
.
init
(
ref
.
current
)
},
[])
React
.
useEffect
(()
=>
{
setOption
()
},
[
data
])
const
setOption
=
()
=>
{
let
option
=
{
tooltip
:
{
trigger
:
'axis'
},
legend
:
{
bottom
:
0
,
data
:
[
'Email'
,
'Union Ads'
,
'Video Ads'
,
'Direct'
,
'Search Engine'
]
},
grid
:
{
left
:
'3%'
,
right
:
'4%'
,
top
:
'3%'
,
bottom
:
'10%'
,
containLabel
:
true
},
xAxis
:
{
type
:
'category'
,
boundaryGap
:
false
,
data
:
[
'Mon'
,
'Tue'
,
'Wed'
,
'Thu'
,
'Fri'
,
'Sat'
,
'Sun'
]
},
yAxis
:
{
type
:
'value'
},
series
:
[
{
name
:
'Email'
,
type
:
'line'
,
stack
:
'Total'
,
data
:
[
120
,
132
,
101
,
134
,
90
,
230
,
210
]
},
{
name
:
'Union Ads'
,
type
:
'line'
,
stack
:
'Total'
,
data
:
[
220
,
182
,
191
,
234
,
290
,
330
,
310
]
},
{
name
:
'Video Ads'
,
type
:
'line'
,
stack
:
'Total'
,
data
:
[
150
,
232
,
201
,
154
,
190
,
330
,
410
]
},
{
name
:
'Direct'
,
type
:
'line'
,
stack
:
'Total'
,
data
:
[
320
,
332
,
301
,
334
,
390
,
330
,
320
]
},
{
name
:
'Search Engine'
,
type
:
'line'
,
stack
:
'Total'
,
data
:
[
820
,
932
,
901
,
934
,
1290
,
1330
,
1320
]
}
]
}
echartsRef
.
current
?.
setOption
(
option
)
}
return
(
<
div
ref=
{
ref
}
style=
{
{
width
:
'100%'
,
height
:
'300px'
}
}
/>
)
}
\ No newline at end of file
src/view/Manage/AssetOperation/index.less
0 → 100644
View file @
4b3260a7
.asset-operation {
height: 100%;
background-color: white;
overflow: auto;
}
\ No newline at end of file
src/view/Manage/index.jsx
View file @
4b3260a7
...
@@ -13,6 +13,7 @@ import AssetManage from './AssetManage';
...
@@ -13,6 +13,7 @@ import AssetManage from './AssetManage';
import
AssetResourceBrowse
from
'./AssetResourceBrowse'
;
import
AssetResourceBrowse
from
'./AssetResourceBrowse'
;
import
AssetBrowse
from
'./AssetBrowse'
;
import
AssetBrowse
from
'./AssetBrowse'
;
import
AssetRecycle
from
'./AssetRecycle'
;
import
AssetRecycle
from
'./AssetRecycle'
;
import
AssetOperation
from
'./AssetOperation'
;
import
TaskManage
from
'./AssetTask'
;
import
TaskManage
from
'./AssetTask'
;
import
DataMasterDefine
from
"./DataMaster/Define"
;
import
DataMasterDefine
from
"./DataMaster/Define"
;
import
DataMasterManage
from
"./DataMaster/Manage"
;
import
DataMasterManage
from
"./DataMaster/Manage"
;
...
@@ -40,6 +41,7 @@ class Manage extends Component {
...
@@ -40,6 +41,7 @@ class Manage extends Component {
<
Route
path=
{
`${match.path}/asset-browse`
}
component=
{
AssetBrowse
}
/>
<
Route
path=
{
`${match.path}/asset-browse`
}
component=
{
AssetBrowse
}
/>
<
Route
path=
{
`${match.path}/task-manage`
}
component=
{
TaskManage
}
/>
<
Route
path=
{
`${match.path}/task-manage`
}
component=
{
TaskManage
}
/>
<
Route
path=
{
`${match.path}/asset-recycle`
}
component=
{
AssetRecycle
}
/>
<
Route
path=
{
`${match.path}/asset-recycle`
}
component=
{
AssetRecycle
}
/>
<
Route
path=
{
`${match.path}/asset-operation`
}
component=
{
AssetOperation
}
/>
<
Route
path=
{
`${match.path}/msd-define`
}
component=
{
DataMasterDefine
}
/>
<
Route
path=
{
`${match.path}/msd-define`
}
component=
{
DataMasterDefine
}
/>
<
Route
path=
{
`${match.path}/msd-manage`
}
component=
{
DataMasterManage
}
/>
<
Route
path=
{
`${match.path}/msd-manage`
}
component=
{
DataMasterManage
}
/>
<
Route
path=
{
`${match.path}/metadata-harvester`
}
component=
{
MetadataHarvester
}
/>
<
Route
path=
{
`${match.path}/metadata-harvester`
}
component=
{
MetadataHarvester
}
/>
...
...
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