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

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

@ -1,49 +1,158 @@
import React, { useEffect } from 'react'; import React, { useEffect } from 'react';
import { connect } from 'react-redux'; 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' import '../style.less'
const { Meta } = Card; const { Meta } = Card;
const Console = (props) => { const WorkOrderData = (props) => {
const { dispatch, actions, user, loading, socket } = props const { dispatch, actions, user, clientHeight } = props
useEffect(() => { useEffect(() => {
// ACTION
// dispatch(actions.example.getMembers(user.orgId)) }, [])
}, [])
let value = 88
// websocket 使 return (
// useEffect(() => { <>
// console.log(socket) <div style={{ background: '#FFFFFF', margin: '8px 12px', padding: '20px 20px 0px 20px', minHeight: clientHeight - 32, display: 'flex', flexDirection: 'column' }}>
// if (socket) { <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
// socket.on('TEST', function (msg) { <div style={{ display: 'flex', alignItems: 'center' }}>
// console.info(msg); <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 }}>工单数据统计
// return () => { </div>
// socket.off("TEST"); <div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>WORK ORDER DATA STATISTICS</div>
// } </div>
// } </div>
// }, [socket]) <div style={{ margin: '20px 0', flex: 1, display: 'flex', }}>
<CardGroup type='grid' style={{ width: '100%' }}>
return ( {
<> [{
<div> t: '工单项目分析',
<img src="/assets/images/install/watting.png" alt="" style={{ width: 'calc(100% + 16px)', position: "relative",top: -12, left: -8, }} /> 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>
</> </div >
) </>
)
} }
function mapStateToProps (state) { function mapStateToProps (state) {
const { auth, global, members, webSocket } = state; const { auth, global, members, webSocket } = state;
return { return {
// loading: members.isRequesting, user: auth.user,
// user: auth.user, actions: global.actions,
// actions: global.actions, clientHeight: global.clientHeight
// members: members.data, };
// socket: webSocket.socket
};
} }
export default connect(mapStateToProps)(Console); export default connect(mapStateToProps)(WorkOrderData);

Loading…
Cancel
Save