Commit adae09af by fanyongjun

youhua

parent 618c0e07
......@@ -6,23 +6,22 @@ import {
import Home from './view/Home';
import Manage from './view/Manage';
import { ContextPath, RedirectHome } from './util';
import { ContextPath, RedirectSignin } from './util';
import Signin from './view/Signin';
export default class App extends React.Component {
render() {
return (
return (
<React.Fragment>
<Router>
<Switch>
<Route path={`${ContextPath}/signin`} component={Signin} exact />
<Route path={`${ContextPath}/login`} 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>
......
......@@ -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}/signin`, { target: '_self' }), 1000);
window.setTimeout(e => Open(`${ContextPath}/login`, { target: '_self' }), 1000);
}})}>
<Icon type="logout" />
<span>退出登录</span>
......
......@@ -37,7 +37,7 @@ export const routes = [
// }
{
name: 'file',
text: '文档下载'
text: '规范文档'
},
]
},
......
......@@ -89,7 +89,7 @@ export const SetSource = function (source) {
const callback = resp => {
if (resp.status === 401) {
message.warning("session过期,请重新登录!");
window.setTimeout(args => Open(`${ContextPath}/signin`, { target: '_self' }), 2000);
window.setTimeout(args => Open(`${ContextPath}/login`, { target: '_self' }), 2000);
return null;
}
else if (resp.status !== 200) {
......
......@@ -28,7 +28,7 @@ export const ConvertToRouteMap = function (routes, pPath, pRoute) {
export const RedirectHome = () => <Redirect to={`${ContextPath}/home`} />
export const RedirectSignin = () => <Redirect to={`${ContextPath}/signin`} />
export const RedirectSignin = () => <Redirect to={`${ContextPath}/login`} />
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}/signin`);
history.push(`${ContextPath}/login`);
}
},
error: () => {
action({ type: set_sess_state, args: { referer: location.pathname } })
history.push(`${ContextPath}/signin`);
history.push(`${ContextPath}/login`);
}
})
}
......
......@@ -149,19 +149,19 @@ class AssetListCOM extends Component {
const ListContent = ({ item }) => (
<React.Fragment>
<Row>
<Col md={6}>
<Col md={8}>
<Text>所属部门:</Text>
{item.departMent}
{item.department}
</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>
......
......@@ -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} />
......
......@@ -134,10 +134,10 @@ export default class ListBox extends Component {
const ListContent = ({ item }) => (
<React.Fragment>
<Row>
<Col md={6}> <Text>所属部门:</Text> {item.departMent} </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.department} </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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment