Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hnyc-data
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
hnyc-data
Commits
adae09af
Commit
adae09af
authored
Sep 09, 2020
by
fanyongjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
youhua
parent
618c0e07
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
21 additions
and
25 deletions
+21
-25
App.jsx
src/App.jsx
+4
-5
index.js
src/layout/index.js
+1
-1
routes.js
src/routes.js
+1
-1
axios.js
src/util/axios.js
+1
-1
index.js
src/util/index.js
+3
-3
AssetList.js
src/view/Manage/Assets/components/AssetList.js
+6
-6
index.jsx
src/view/Manage/index.jsx
+1
-4
ListBox.jsx
src/view/User/Apply/components/ListBox.jsx
+4
-4
No files found.
src/App.jsx
View file @
adae09af
...
...
@@ -6,23 +6,22 @@ import {
import
Home
from
'./view/Home'
;
import
Manage
from
'./view/Manage'
;
import
{
ContextPath
,
Redirect
Home
}
from
'./util'
;
import
{
ContextPath
,
Redirect
Signin
}
from
'./util'
;
import
Signin
from
'./view/Signin'
;
export
default
class
App
extends
React
.
Component
{
render
()
{
return
(
return
(
<
React
.
Fragment
>
<
Router
>
<
Switch
>
<
Route
path=
{
`${ContextPath}/
sign
in`
}
component=
{
Signin
}
exact
/>
<
Route
path=
{
`${ContextPath}/
log
in`
}
component=
{
Signin
}
exact
/>
<
Route
path=
{
`${ContextPath}/manage`
}
exact
component=
{
()
=>
<
Redirect
to=
{
`${ContextPath}/manage/assets`
}
/>
}
/>
<
Route
path=
{
`${ContextPath}/user`
}
exact
component=
{
()
=>
<
Redirect
to=
{
`${ContextPath}/user/subscrible`
}
/>
}
/>
<
Route
path=
{
`${ContextPath}/home`
}
component=
{
Home
}
/>
<
Route
path=
{
`${ContextPath}/manage`
}
component=
{
Manage
}
/>
<
Route
path=
{
`${ContextPath}/user`
}
component=
{
Manage
}
/>
<
Route
component=
{
RedirectHome
}
/>
<
Route
component=
{
()
=>
<
Redirect
to=
{
`${ContextPath}/login`
}
/>
}
/>
</
Switch
>
</
Router
>
</
React
.
Fragment
>
...
...
src/layout/index.js
View file @
adae09af
...
...
@@ -32,7 +32,7 @@ const _Logout = ({session, isHome, location}) => session ?
<
Menu
.
Item
key
=
"SignOut"
onClick
=
{
e
=>
dispatchLatest
({
type
:
'user.signout'
,
callback
:
e
=>
{
message
.
success
(
'退出成功!'
)
window
.
setTimeout
(
e
=>
Open
(
`
${
ContextPath
}
/
sign
in`
,
{
target
:
'_self'
}),
1000
);
window
.
setTimeout
(
e
=>
Open
(
`
${
ContextPath
}
/
log
in`
,
{
target
:
'_self'
}),
1000
);
}})}
>
<
Icon
type
=
"logout"
/>
<
span
>
退出登录
<
/span
>
...
...
src/routes.js
View file @
adae09af
...
...
@@ -37,7 +37,7 @@ export const routes = [
// }
{
name
:
'file'
,
text
:
'
文档下载
'
text
:
'
规范文档
'
},
]
},
...
...
src/util/axios.js
View file @
adae09af
...
...
@@ -89,7 +89,7 @@ export const SetSource = function (source) {
const
callback
=
resp
=>
{
if
(
resp
.
status
===
401
)
{
message
.
warning
(
"session过期,请重新登录!"
);
window
.
setTimeout
(
args
=>
Open
(
`
${
ContextPath
}
/
sign
in`
,
{
target
:
'_self'
}),
2000
);
window
.
setTimeout
(
args
=>
Open
(
`
${
ContextPath
}
/
log
in`
,
{
target
:
'_self'
}),
2000
);
return
null
;
}
else
if
(
resp
.
status
!==
200
)
{
...
...
src/util/index.js
View file @
adae09af
...
...
@@ -28,7 +28,7 @@ export const ConvertToRouteMap = function (routes, pPath, pRoute) {
export
const
RedirectHome
=
()
=>
<
Redirect
to
=
{
`
${
ContextPath
}
/home`
}
/
>
export
const
RedirectSignin
=
()
=>
<
Redirect
to
=
{
`
${
ContextPath
}
/
sign
in`
}
/
>
export
const
RedirectSignin
=
()
=>
<
Redirect
to
=
{
`
${
ContextPath
}
/
log
in`
}
/
>
export
const
Open
=
function
(
url
,
args
)
{
const
{
target
=
'_blank'
}
=
args
||
{};
...
...
@@ -57,12 +57,12 @@ export class GetSession extends React.Component {
action
({
type
:
set_sess_state
,
args
:
session
})
}
else
{
action
({
type
:
set_sess_state
,
args
:
{
referer
:
location
.
pathname
}
})
history
.
push
(
`
${
ContextPath
}
/
sign
in`
);
history
.
push
(
`
${
ContextPath
}
/
log
in`
);
}
},
error
:
()
=>
{
action
({
type
:
set_sess_state
,
args
:
{
referer
:
location
.
pathname
}
})
history
.
push
(
`
${
ContextPath
}
/
sign
in`
);
history
.
push
(
`
${
ContextPath
}
/
log
in`
);
}
})
}
...
...
src/view/Manage/Assets/components/AssetList.js
View file @
adae09af
...
...
@@ -149,19 +149,19 @@ class AssetListCOM extends Component {
const
ListContent
=
({
item
})
=>
(
<
React
.
Fragment
>
<
Row
>
<
Col
md
=
{
6
}
>
<
Col
md
=
{
8
}
>
<
Text
>
所属部门:
<
/Text
>
{
item
.
depart
M
ent
}
{
item
.
depart
m
ent
}
<
/Col
>
<
Col
md
=
{
6
}
>
<
Col
md
=
{
8
}
>
<
Text
>
更新周期:
<
/Text
>
{
item
.
updateCycle
}
<
/Col
>
<
Col
md
=
{
6
}
>
{
/*
<Col md={6}>
<Text>发布时间:</Text>
{item.createTime_str}
<
/Col
>
<
Col
md
=
{
6
}
>
</Col>
*/
}
<
Col
md
=
{
8
}
>
<
Text
>
所属系统:
<
/Text
>
{
item
.
system
}
<
/Col
>
...
...
src/view/Manage/index.jsx
View file @
adae09af
...
...
@@ -35,10 +35,7 @@ class Manage extends Component {
content=
{
session
&&
session
.
userId
?
(
<
Switch
>
<
Route
path=
{
`${match.path}/search`
}
component=
{
Search
}
/>
<
Route
path=
{
`${match.path}/search`
}
component=
{
Search
}
/>
<
Route
path=
{
`${match.path}/assets`
}
component=
{
Assets
}
/>
<
Route
path=
{
`${match.path}/metadata`
}
component=
{
Metadata
}
/>
<
Route
path=
{
`${match.path}/indicator`
}
component=
{
Indicator
}
/>
...
...
src/view/User/Apply/components/ListBox.jsx
View file @
adae09af
...
...
@@ -134,10 +134,10 @@ export default class ListBox extends Component {
const
ListContent
=
({
item
})
=>
(
<
React
.
Fragment
>
<
Row
>
<
Col
md=
{
6
}
>
<
Text
>
所属部门:
</
Text
>
{
item
.
departM
ent
}
</
Col
>
<
Col
md=
{
6
}
>
<
Text
>
更新周期:
</
Text
>
{
item
.
updateCycle
}
</
Col
>
<
Col
md=
{
6
}
>
<
Text
>
发布时间:
</
Text
>
{
item
.
createTime_str
}
</
Col
>
<
Col
md=
{
6
}
>
<
Text
>
所属系统:
</
Text
>
{
item
.
system
}
</
Col
>
<
Col
md=
{
8
}
>
<
Text
>
所属部门:
</
Text
>
{
item
.
departm
ent
}
</
Col
>
<
Col
md=
{
8
}
>
<
Text
>
更新周期:
</
Text
>
{
item
.
updateCycle
}
</
Col
>
{
/* <Col md={6}> <Text>发布时间:</Text> {item.createTime_str} </Col> */
}
<
Col
md=
{
8
}
>
<
Text
>
所属系统:
</
Text
>
{
item
.
system
}
</
Col
>
</
Row
>
<
Row
>
<
Col
md=
{
18
}
>
<
Text
>
资产名称:
</
Text
>
<
span
dangerouslySetInnerHTML=
{
{
__html
:
item
.
name
}
}
/>
</
Col
>
...
...
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