Browse Source

工单统计

dev
巴林闲侠 2 years ago
parent
commit
023aae8ff6
  1. 22
      api/.vscode/launch.json
  2. 185
      web/client/src/sections/analysis/containers/workorderData.jsx

22
api/.vscode/launch.json

@ -17,9 +17,9 @@
"-f http://localhost:4600",
//
// "-g postgres://postgres:123@10.8.30.32:5432/orational_service",
"-g postgres://postgres:123@10.8.30.166:5432/POMS_2306",
// "-g postgres://postgres:123@10.8.30.166:5432/POMS_2306",
//
// "-g postgres://FashionAdmin:123456@10.8.30.156:5432/POMS",
"-g postgres://FashionAdmin:123456@10.8.30.156:5432/POMS",
"-k 10.8.30.72:29092,10.8.30.73:29092,10.8.30.74:29092",
"--iotaProxy http://10.8.30.157:17007",
"--redisHost localhost",
@ -28,7 +28,9 @@
"--axyApiUrl http://127.0.0.1:4100",
// "--apiEmisUrl http://10.8.30.112:14000",
//
"--apiEmisUrl http://10.8.30.161:1111",
// "--apiEmisUrl http://10.8.30.161:1111",
// "--apiEmisUrl http://10.8.30.161:31111/",
"--apiEmisUrl http://localhost:14000",
"--apiVcmpUrl http://localhost:4000",
"--apiIotAuth http://localhost:4200",
"--godUrl https://restapi.amap.com/v3",
@ -44,12 +46,14 @@
// "--clickHouseUrl http://10.8.30.71",
// "--clickHousePort 8123",
// click
// "--clickHouseUrl http://10.8.30.161",
// "--clickHousePort 30123",
"--clickHouseUrl http://10.8.30.161",
"--clickHousePort 30123",
// "--clickHouseUrl https://clickhouse01.anxinyun.cn/play",
// click
"--clickHouseUrl http://10.8.30.156",
"--clickHousePort 8123",
// "--clickHouseUrl http://10.8.30.156",
// "--clickHousePort 8123",
// * 2
// "--clickHouseUser ",
// "--clickHousePassword ",
@ -61,8 +65,8 @@
// "--clickHouseDataAlarm default",
// "--clickHouseIot iot",
//
"--clickHouseAnxincloud Anxinyun101",
"--clickHousePepEmis pepca10",
"--clickHouseAnxincloud anxinyun1",
"--clickHousePepEmis pepca8",
"--clickHouseProjectManage peppm8",
"--clickHouseVcmp video_access_dev",
"--clickHouseDataAlarm default",

185
web/client/src/sections/analysis/containers/workorderData.jsx

@ -1,49 +1,158 @@
import React, { useEffect } from 'react';
import { connect } from 'react-redux';
import { Spin, Card } from '@douyinfe/semi-ui';
import ReactECharts from 'echarts-for-react';
import echarts from 'echarts';
import { Spin, Card, CardGroup } 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={{ width: 'calc(100% + 16px)', position: "relative",top: -12, left: -8, }} />
const WorkOrderData = (props) => {
const { dispatch, actions, user, clientHeight } = props
useEffect(() => {
}, [])
let value = 88
return (
<>
<div style={{ background: '#FFFFFF', margin: '8px 12px', padding: '20px 20px 0px 20px', minHeight: clientHeight - 32, display: 'flex', flexDirection: 'column' }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ width: 0, height: 20, borderLeft: '3px solid #005ABD', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div>
<div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#101531', marginLeft: 8 }}>工单数据统计
</div>
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>WORK ORDER DATA STATISTICS</div>
</div>
</div>
<div style={{ margin: '20px 0', flex: 1, display: 'flex', }}>
<CardGroup type='grid' style={{ width: '100%' }}>
{
[{
t: '工单项目分析',
echartOption: {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value',
name: "单位:次数",
nameLocation: "end",
nameGap: 20
},
legend: {},
grid: {
left: '3%',
right: '4%',
bottom: '1%',
// top: '24%',
containLabel: true
},
series: [
{
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar',
name: '异常数'
}
]
},
}, {
t: '工单完成情况分析',
echartOption: {
series: [
{
name: 'xx',
type: 'gauge',
progress: {
show: true
},
detail: {
valueAnimation: true,
formatter: '{value}'
},
data: [
{
value: 50,
name: '工单完成率'
}
]
},
{
name: 'YY',
type: 'gauge',
progress: {
show: true
},
detail: {
valueAnimation: true,
formatter: '{value}'
},
data: [
{
value: 50,
name: '延期数'
}
]
},
],
media: [
{
query: { minAspectRatio: 1 },
option: {
series: [
{ center: ['25%', '50%'] },
{ center: ['75%', '50%'] }
]
}
},
]
},
}, {
t: '工单处理分析',
echartOption: {},
}, {
t: '工单类型分析',
echartOption: {},
},].map((c, idx) => (
<Card
key={idx}
shadows='hover'
title={c.t}
bordered={false}
headerLine={false}
headerStyle={{
padding: '12px',
}}
bodyStyle={{
padding: '12px',
}}
style={{ width: '50%', height: '50%' }}
>
<ReactECharts
notMerge={true}
lazyUpdate={true}
option={c.echartOption}
/>
</Card>
))
}
</CardGroup>
</div>
</>
)
</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
};
const { auth, global, members, webSocket } = state;
return {
user: auth.user,
actions: global.actions,
clientHeight: global.clientHeight
};
}
export default connect(mapStateToProps)(Console);
export default connect(mapStateToProps)(WorkOrderData);

Loading…
Cancel
Save