巴林闲侠
2 years ago
28 changed files with 653 additions and 50 deletions
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 1.8 MiB |
@ -0,0 +1,14 @@ |
|||
'use strict'; |
|||
|
|||
import { ApiTable ,basicAction} from '$utils' |
|||
|
|||
// export function getMembers (orgId) {
|
|||
// return dispatch => basicAction({
|
|||
// type: 'get',
|
|||
// dispatch: dispatch,
|
|||
// actionType: 'GET_MEMBERS',
|
|||
// url: `${ApiTable.getEnterprisesMembers.replace('{enterpriseId}', orgId)}`,
|
|||
// msg: { error: '获取用户列表失败' },
|
|||
// reducer: { name: 'members' }
|
|||
// });
|
|||
// }
|
@ -0,0 +1,7 @@ |
|||
'use strict'; |
|||
|
|||
import * as console from './console' |
|||
|
|||
export default { |
|||
...console |
|||
} |
@ -0,0 +1,6 @@ |
|||
'use strict'; |
|||
|
|||
import ProblemData from './problemData'; |
|||
import OperationData from './operationData'; |
|||
import WorkorderData from './workorderData'; |
|||
export { ProblemData,OperationData ,WorkorderData}; |
@ -0,0 +1,49 @@ |
|||
import React, { useEffect } from 'react'; |
|||
import { connect } from 'react-redux'; |
|||
import { Spin, Card } from '@douyinfe/semi-ui'; |
|||
import '../style.less' |
|||
const { Meta } = Card; |
|||
|
|||
const Console = (props) => { |
|||
const { dispatch, actions, user, loading, socket } = props |
|||
|
|||
useEffect(() => { |
|||
// ACTION 示例 |
|||
// dispatch(actions.example.getMembers(user.orgId)) |
|||
}, []) |
|||
|
|||
// websocket 使用测试 |
|||
// useEffect(() => { |
|||
// console.log(socket) |
|||
// if (socket) { |
|||
// socket.on('TEST', function (msg) { |
|||
// console.info(msg); |
|||
// }); |
|||
// return () => { |
|||
// socket.off("TEST"); |
|||
// } |
|||
// } |
|||
|
|||
// }, [socket]) |
|||
|
|||
return ( |
|||
<> |
|||
<div> |
|||
<img src="/assets/images/install/watting.png" alt="" style={{ height: '100%', width: '100%', }} /> |
|||
</div> |
|||
</> |
|||
) |
|||
} |
|||
|
|||
function mapStateToProps (state) { |
|||
const { auth, global, members, webSocket } = state; |
|||
return { |
|||
// loading: members.isRequesting, |
|||
// user: auth.user, |
|||
// actions: global.actions, |
|||
// members: members.data, |
|||
// socket: webSocket.socket |
|||
}; |
|||
} |
|||
|
|||
export default connect(mapStateToProps)(Console); |
@ -0,0 +1,49 @@ |
|||
import React, { useEffect } from 'react'; |
|||
import { connect } from 'react-redux'; |
|||
import { Spin, Card } from '@douyinfe/semi-ui'; |
|||
import '../style.less' |
|||
const { Meta } = Card; |
|||
|
|||
const Console = (props) => { |
|||
const { dispatch, actions, user, loading, socket } = props |
|||
|
|||
useEffect(() => { |
|||
// ACTION 示例 |
|||
// dispatch(actions.example.getMembers(user.orgId)) |
|||
}, []) |
|||
|
|||
// websocket 使用测试 |
|||
// useEffect(() => { |
|||
// console.log(socket) |
|||
// if (socket) { |
|||
// socket.on('TEST', function (msg) { |
|||
// console.info(msg); |
|||
// }); |
|||
// return () => { |
|||
// socket.off("TEST"); |
|||
// } |
|||
// } |
|||
|
|||
// }, [socket]) |
|||
|
|||
return ( |
|||
<> |
|||
<div> |
|||
<img src="/assets/images/install/watting.png" alt="" style={{ height: '100%', width: '100%', }} /> |
|||
</div> |
|||
</> |
|||
) |
|||
} |
|||
|
|||
function mapStateToProps (state) { |
|||
const { auth, global, members, webSocket } = state; |
|||
return { |
|||
// loading: members.isRequesting, |
|||
// user: auth.user, |
|||
// actions: global.actions, |
|||
// members: members.data, |
|||
// socket: webSocket.socket |
|||
}; |
|||
} |
|||
|
|||
export default connect(mapStateToProps)(Console); |
@ -0,0 +1,49 @@ |
|||
import React, { useEffect } from 'react'; |
|||
import { connect } from 'react-redux'; |
|||
import { Spin, Card } from '@douyinfe/semi-ui'; |
|||
import '../style.less' |
|||
const { Meta } = Card; |
|||
|
|||
const Console = (props) => { |
|||
const { dispatch, actions, user, loading, socket } = props |
|||
|
|||
useEffect(() => { |
|||
// ACTION 示例 |
|||
// dispatch(actions.example.getMembers(user.orgId)) |
|||
}, []) |
|||
|
|||
// websocket 使用测试 |
|||
// useEffect(() => { |
|||
// console.log(socket) |
|||
// if (socket) { |
|||
// socket.on('TEST', function (msg) { |
|||
// console.info(msg); |
|||
// }); |
|||
// return () => { |
|||
// socket.off("TEST"); |
|||
// } |
|||
// } |
|||
|
|||
// }, [socket]) |
|||
|
|||
return ( |
|||
<> |
|||
<div> |
|||
<img src="/assets/images/install/watting.png" alt="" style={{ height: '100%', width: '100%', }} /> |
|||
</div> |
|||
</> |
|||
) |
|||
} |
|||
|
|||
function mapStateToProps (state) { |
|||
const { auth, global, members, webSocket } = state; |
|||
return { |
|||
// loading: members.isRequesting, |
|||
// user: auth.user, |
|||
// actions: global.actions, |
|||
// members: members.data, |
|||
// socket: webSocket.socket |
|||
}; |
|||
} |
|||
|
|||
export default connect(mapStateToProps)(Console); |
@ -0,0 +1,15 @@ |
|||
'use strict'; |
|||
|
|||
import reducers from './reducers'; |
|||
import routes from './routes'; |
|||
import actions from './actions'; |
|||
import { getNavItem } from './nav-item'; |
|||
|
|||
export default { |
|||
key: 'analysis', |
|||
name: '分析', |
|||
reducers: reducers, |
|||
routes: routes, |
|||
actions: actions, |
|||
getNavItem: getNavItem |
|||
}; |
@ -0,0 +1,41 @@ |
|||
import React from 'react'; |
|||
import { IconCode } from '@douyinfe/semi-icons'; |
|||
|
|||
export function getNavItem (user, dispatch) { |
|||
return ( |
|||
[ |
|||
{ |
|||
itemKey: 'analysis', |
|||
text: '分析', |
|||
icon: <IconCode />, |
|||
items: [ |
|||
{ |
|||
itemKey: 'problemAnalysis', |
|||
text: '问题分析', |
|||
icon: <iconpark-icon style={{ width: 20, height: 20 }} name="jq"></iconpark-icon>, |
|||
to: '/analysis/problemAnalysis/problemData', |
|||
items: [{ |
|||
itemKey: 'problemData', to: '/analysis/problemAnalysis/problemData', text: '问题数据' |
|||
}] |
|||
}, { |
|||
itemKey: 'operationAnalysis', |
|||
text: '运维分析', |
|||
icon: <iconpark-icon style={{ width: 20, height: 20 }} name="ys"></iconpark-icon>, |
|||
to: '/analysis/operationAnalysis/operationData', |
|||
items: [{ |
|||
itemKey: 'operationData', to: '/analysis/operationAnalysis/operationData', text: '运维数据' |
|||
}] |
|||
},{ |
|||
itemKey: 'workorderAnalysis', |
|||
text: '工单分析', |
|||
icon: <iconpark-icon style={{ width: 20, height: 20 }} name="ys"></iconpark-icon>, |
|||
to: '/analysis/workorderAnalysis/workorderData', |
|||
items: [{ |
|||
itemKey: 'workorderData', to: '/analysis/workorderAnalysis/workorderData', text: '工单数据' |
|||
}] |
|||
}, |
|||
] |
|||
}, |
|||
] |
|||
); |
|||
} |
@ -0,0 +1,5 @@ |
|||
'use strict'; |
|||
|
|||
export default { |
|||
|
|||
} |
@ -0,0 +1,42 @@ |
|||
import { ProblemData, OperationData, WorkorderData } from './containers'; |
|||
|
|||
export default [{ |
|||
type: 'inner', |
|||
route: { |
|||
path: '/analysis', |
|||
key: 'analysis', |
|||
breadcrumb: '分析', |
|||
// 不设置 component 则面包屑禁止跳转
|
|||
childRoutes: [{ |
|||
path: '/problemAnalysis', |
|||
key: 'problemAnalysis', |
|||
breadcrumb: '问题分析', |
|||
childRoutes: [{ |
|||
path: '/problemData', |
|||
key: 'problemData', |
|||
component: ProblemData, |
|||
breadcrumb: '分析数据', |
|||
}] |
|||
}, { |
|||
path: '/operationAnalysis', |
|||
key: 'operationAnalysis', |
|||
breadcrumb: '运维分析', |
|||
childRoutes: [{ |
|||
path: '/operationData', |
|||
key: 'operationData', |
|||
component: OperationData, |
|||
breadcrumb: '运维数据', |
|||
}] |
|||
}, { |
|||
path: '/workorderAnalysis', |
|||
key: 'workorderAnalysis', |
|||
breadcrumb: '工单分析', |
|||
childRoutes: [{ |
|||
path: '/workorderData', |
|||
key: 'workorderData', |
|||
component: WorkorderData, |
|||
breadcrumb: '工单数据', |
|||
}] |
|||
}] |
|||
} |
|||
}]; |
@ -0,0 +1,7 @@ |
|||
#example { |
|||
box-shadow: 3px 3px 2px black; |
|||
} |
|||
|
|||
#example:hover { |
|||
color: yellowgreen; |
|||
} |
@ -0,0 +1,14 @@ |
|||
'use strict'; |
|||
|
|||
import { ApiTable ,basicAction} from '$utils' |
|||
|
|||
// export function getMembers (orgId) {
|
|||
// return dispatch => basicAction({
|
|||
// type: 'get',
|
|||
// dispatch: dispatch,
|
|||
// actionType: 'GET_MEMBERS',
|
|||
// url: `${ApiTable.getEnterprisesMembers.replace('{enterpriseId}', orgId)}`,
|
|||
// msg: { error: '获取用户列表失败' },
|
|||
// reducer: { name: 'members' }
|
|||
// });
|
|||
// }
|
@ -0,0 +1,7 @@ |
|||
'use strict'; |
|||
|
|||
import * as console from './console' |
|||
|
|||
export default { |
|||
...console |
|||
} |
@ -0,0 +1,49 @@ |
|||
import React, { useEffect } from 'react'; |
|||
import { connect } from 'react-redux'; |
|||
import { Spin, Card } from '@douyinfe/semi-ui'; |
|||
import '../style.less' |
|||
const { Meta } = Card; |
|||
|
|||
const Console = (props) => { |
|||
const { dispatch, actions, user, loading, socket } = props |
|||
|
|||
useEffect(() => { |
|||
// ACTION 示例 |
|||
// dispatch(actions.example.getMembers(user.orgId)) |
|||
}, []) |
|||
|
|||
// websocket 使用测试 |
|||
// useEffect(() => { |
|||
// console.log(socket) |
|||
// if (socket) { |
|||
// socket.on('TEST', function (msg) { |
|||
// console.info(msg); |
|||
// }); |
|||
// return () => { |
|||
// socket.off("TEST"); |
|||
// } |
|||
// } |
|||
|
|||
// }, [socket]) |
|||
|
|||
return ( |
|||
<> |
|||
<div> |
|||
<img src="/assets/images/install/watting.png" alt="" style={{ height: '100%', width: '100%', }} /> |
|||
</div> |
|||
</> |
|||
) |
|||
} |
|||
|
|||
function mapStateToProps (state) { |
|||
const { auth, global, members, webSocket } = state; |
|||
return { |
|||
// loading: members.isRequesting, |
|||
// user: auth.user, |
|||
// actions: global.actions, |
|||
// members: members.data, |
|||
// socket: webSocket.socket |
|||
}; |
|||
} |
|||
|
|||
export default connect(mapStateToProps)(Console); |
@ -0,0 +1,49 @@ |
|||
import React, { useEffect } from 'react'; |
|||
import { connect } from 'react-redux'; |
|||
import { Spin, Card } from '@douyinfe/semi-ui'; |
|||
import '../style.less' |
|||
const { Meta } = Card; |
|||
|
|||
const Console = (props) => { |
|||
const { dispatch, actions, user, loading, socket } = props |
|||
|
|||
useEffect(() => { |
|||
// ACTION 示例 |
|||
// dispatch(actions.example.getMembers(user.orgId)) |
|||
}, []) |
|||
|
|||
// websocket 使用测试 |
|||
// useEffect(() => { |
|||
// console.log(socket) |
|||
// if (socket) { |
|||
// socket.on('TEST', function (msg) { |
|||
// console.info(msg); |
|||
// }); |
|||
// return () => { |
|||
// socket.off("TEST"); |
|||
// } |
|||
// } |
|||
|
|||
// }, [socket]) |
|||
|
|||
return ( |
|||
<> |
|||
<div> |
|||
<img src="/assets/images/install/watting.png" alt="" style={{ height: '100%', width: '100%', }} /> |
|||
</div> |
|||
</> |
|||
) |
|||
} |
|||
|
|||
function mapStateToProps (state) { |
|||
const { auth, global, members, webSocket } = state; |
|||
return { |
|||
// loading: members.isRequesting, |
|||
// user: auth.user, |
|||
// actions: global.actions, |
|||
// members: members.data, |
|||
// socket: webSocket.socket |
|||
}; |
|||
} |
|||
|
|||
export default connect(mapStateToProps)(Console); |
@ -0,0 +1,49 @@ |
|||
import React, { useEffect } from 'react'; |
|||
import { connect } from 'react-redux'; |
|||
import { Spin, Card } from '@douyinfe/semi-ui'; |
|||
import '../style.less' |
|||
const { Meta } = Card; |
|||
|
|||
const Console = (props) => { |
|||
const { dispatch, actions, user, loading, socket } = props |
|||
|
|||
useEffect(() => { |
|||
// ACTION 示例 |
|||
// dispatch(actions.example.getMembers(user.orgId)) |
|||
}, []) |
|||
|
|||
// websocket 使用测试 |
|||
// useEffect(() => { |
|||
// console.log(socket) |
|||
// if (socket) { |
|||
// socket.on('TEST', function (msg) { |
|||
// console.info(msg); |
|||
// }); |
|||
// return () => { |
|||
// socket.off("TEST"); |
|||
// } |
|||
// } |
|||
|
|||
// }, [socket]) |
|||
|
|||
return ( |
|||
<> |
|||
<div> |
|||
<img src="/assets/images/install/watting.png" alt="" style={{ height: '100%', width: '100%', }} /> |
|||
</div> |
|||
</> |
|||
) |
|||
} |
|||
|
|||
function mapStateToProps (state) { |
|||
const { auth, global, members, webSocket } = state; |
|||
return { |
|||
// loading: members.isRequesting, |
|||
// user: auth.user, |
|||
// actions: global.actions, |
|||
// members: members.data, |
|||
// socket: webSocket.socket |
|||
}; |
|||
} |
|||
|
|||
export default connect(mapStateToProps)(Console); |
@ -0,0 +1,6 @@ |
|||
'use strict'; |
|||
import DataQuery from './dataQuery'; |
|||
import DataComparison from './dataComparison'; |
|||
import DataAssociation from './dataAssociation'; |
|||
import Notebook from './notebook'; |
|||
export { DataQuery, DataComparison, DataAssociation,Notebook}; |
@ -0,0 +1,49 @@ |
|||
import React, { useEffect } from 'react'; |
|||
import { connect } from 'react-redux'; |
|||
import { Spin, Card } from '@douyinfe/semi-ui'; |
|||
import '../style.less' |
|||
const { Meta } = Card; |
|||
|
|||
const Console = (props) => { |
|||
const { dispatch, actions, user, loading, socket } = props |
|||
|
|||
useEffect(() => { |
|||
// ACTION 示例 |
|||
// dispatch(actions.example.getMembers(user.orgId)) |
|||
}, []) |
|||
|
|||
// websocket 使用测试 |
|||
// useEffect(() => { |
|||
// console.log(socket) |
|||
// if (socket) { |
|||
// socket.on('TEST', function (msg) { |
|||
// console.info(msg); |
|||
// }); |
|||
// return () => { |
|||
// socket.off("TEST"); |
|||
// } |
|||
// } |
|||
|
|||
// }, [socket]) |
|||
|
|||
return ( |
|||
<> |
|||
<div> |
|||
<img src="/assets/images/install/watting.png" alt="" style={{ height: '100%', width: '100%', }} /> |
|||
</div> |
|||
</> |
|||
) |
|||
} |
|||
|
|||
function mapStateToProps (state) { |
|||
const { auth, global, members, webSocket } = state; |
|||
return { |
|||
// loading: members.isRequesting, |
|||
// user: auth.user, |
|||
// actions: global.actions, |
|||
// members: members.data, |
|||
// socket: webSocket.socket |
|||
}; |
|||
} |
|||
|
|||
export default connect(mapStateToProps)(Console); |
@ -0,0 +1,15 @@ |
|||
'use strict'; |
|||
|
|||
import reducers from './reducers'; |
|||
import routes from './routes'; |
|||
import actions from './actions'; |
|||
import { getNavItem } from './nav-item'; |
|||
|
|||
export default { |
|||
key: 'data', |
|||
name: '数据', |
|||
reducers: reducers, |
|||
routes: routes, |
|||
actions: actions, |
|||
getNavItem: getNavItem |
|||
}; |
@ -0,0 +1,37 @@ |
|||
import React from 'react'; |
|||
import { IconCode } from '@douyinfe/semi-icons'; |
|||
|
|||
export function getNavItem (user, dispatch) { |
|||
return ( |
|||
[ |
|||
{ |
|||
itemKey: 'data', |
|||
text: '数据', |
|||
icon: <IconCode />, |
|||
items: [ |
|||
{ |
|||
itemKey: 'dataMonitoring', |
|||
text: '数据监控', |
|||
icon: <iconpark-icon style={{ width: 20, height: 20 }} name="jq"></iconpark-icon>, |
|||
to: '/data/dataMonitoring/dataQuery', |
|||
items: [{ |
|||
itemKey: 'dataQuery', to: '/data/dataMonitoring/dataQuery', text: '数据查询' |
|||
}] |
|||
}, { |
|||
itemKey: 'dataAnalysis', |
|||
text: '数据分析', |
|||
icon: <iconpark-icon style={{ width: 20, height: 20 }} name="ys"></iconpark-icon>, |
|||
to: '/data/dataAnalysis/dataComparison', |
|||
items: [{ |
|||
itemKey: 'dataComparison', to: '/data/dataAnalysis/dataComparison', text: '数据对比' |
|||
},{ |
|||
itemKey: 'dataAssociation', to: '/data/dataAnalysis/dataAssociation', text: '数据关联' |
|||
},{ |
|||
itemKey: 'notebook', to: '/data/dataAnalysis/notebook', text: 'notebook' |
|||
}] |
|||
}, |
|||
] |
|||
}, |
|||
] |
|||
); |
|||
} |
@ -0,0 +1,5 @@ |
|||
'use strict'; |
|||
|
|||
export default { |
|||
|
|||
} |
@ -0,0 +1,42 @@ |
|||
import { DataQuery, DataComparison, DataAssociation,Notebook } from './containers'; |
|||
|
|||
export default [{ |
|||
type: 'inner', |
|||
route: { |
|||
path: '/data', |
|||
key: 'data', |
|||
breadcrumb: '数据', |
|||
// 不设置 component 则面包屑禁止跳转
|
|||
childRoutes: [{ |
|||
path: '/dataMonitoring', |
|||
key: 'dataMonitoring', |
|||
breadcrumb: '数据监控', |
|||
childRoutes: [{ |
|||
path: '/dataQuery', |
|||
key: 'dataQuery', |
|||
component: DataQuery, |
|||
breadcrumb: '数据查询', |
|||
}] |
|||
}, { |
|||
path: '/dataAnalysis', |
|||
key: 'dataAnalysis', |
|||
breadcrumb: '数据分析', |
|||
childRoutes: [{ |
|||
path: '/dataComparison', |
|||
key: 'dataComparison', |
|||
component: DataComparison, |
|||
breadcrumb: '数据对比', |
|||
},{ |
|||
path: '/dataAssociation', |
|||
key: 'dataAssociation', |
|||
component: DataAssociation, |
|||
breadcrumb: '数据关联', |
|||
},{ |
|||
path: '/notebook', |
|||
key: 'notebook', |
|||
component: Notebook, |
|||
breadcrumb: 'notebook', |
|||
}] |
|||
}] |
|||
} |
|||
}]; |
@ -0,0 +1,7 @@ |
|||
#example { |
|||
box-shadow: 3px 3px 2px black; |
|||
} |
|||
|
|||
#example:hover { |
|||
color: yellowgreen; |
|||
} |
Loading…
Reference in new issue