From 023aae8ff6a3d98dc17afa03cb9f7dec582ba6d3 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Thu, 15 Jun 2023 19:57:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=8D=95=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/.vscode/launch.json | 22 ++- .../analysis/containers/workorderData.jsx | 185 ++++++++++++++---- 2 files changed, 160 insertions(+), 47 deletions(-) diff --git a/api/.vscode/launch.json b/api/.vscode/launch.json index 3b6039f..2d6af4f 100644 --- a/api/.vscode/launch.json +++ b/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", diff --git a/web/client/src/sections/analysis/containers/workorderData.jsx b/web/client/src/sections/analysis/containers/workorderData.jsx index 003eb46..52ebff6 100644 --- a/web/client/src/sections/analysis/containers/workorderData.jsx +++ b/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 ( - <> -
- +const WorkOrderData = (props) => { + const { dispatch, actions, user, clientHeight } = props + + useEffect(() => { + + }, []) + + let value = 88 + return ( + <> +
+
+
+
+
工单数据统计 +
+
WORK ORDER DATA STATISTICS
+
+
+ +
+ + { + [{ + 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) => ( + + + + + )) + } +
- - ) +
+ + ) } 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);