From aaa420822d4b02a6a018e27529efdc5aac07c3c1 Mon Sep 17 00:00:00 2001 From: gtz <535262213@qq.com> Date: Mon, 25 Aug 2025 15:33:01 +0800 Subject: [PATCH] 1 --- src/page/LinePage1-1/Center/CenterDown.tsx | 2 +- src/page/LinePage1-1/Left/LeftUp.tsx | 84 +++++++++++----------- src/page/LinePage1-1/index.tsx | 4 +- src/page/LinePage1-2/Center/CenterDown.tsx | 2 +- src/page/LinePage1-2/Left/LeftUp.tsx | 56 +++++++-------- src/page/LinePage1-2/index.tsx | 4 +- src/page/LinePage2-1/Center/CenterDown.tsx | 2 +- src/page/LinePage2-1/Left/LeftUp.tsx | 56 +++++++-------- src/page/LinePage2-1/index.tsx | 4 +- src/page/LinePage2-2/Center/CenterDown.tsx | 2 +- src/page/LinePage2-2/Left/LeftUp.tsx | 56 +++++++-------- src/page/LinePage2-2/index.tsx | 4 +- src/page/LinePage3-1/Center/CenterDown.tsx | 2 +- src/page/LinePage3-1/Left/LeftUp.tsx | 56 +++++++-------- src/page/LinePage3-1/index.tsx | 4 +- src/page/LinePage3-2/Center/CenterDown.tsx | 2 +- src/page/LinePage3-2/Left/LeftUp.tsx | 56 +++++++-------- src/page/LinePage3-2/index.tsx | 4 +- src/page/LinePage4-1/Center/CenterDown.tsx | 2 +- src/page/LinePage4-1/Left/LeftUp.tsx | 56 +++++++-------- src/page/LinePage4-1/index.tsx | 4 +- src/page/LinePage4-2/Center/CenterDown.tsx | 2 +- src/page/LinePage4-2/Left/LeftUp.tsx | 56 +++++++-------- src/page/LinePage4-2/index.tsx | 4 +- src/page/LinePage5-1/Center/CenterDown.tsx | 2 +- src/page/LinePage5-1/Left/LeftUp.tsx | 56 +++++++-------- src/page/LinePage5-1/index.tsx | 4 +- src/page/LinePage5-2/Center/CenterDown.tsx | 2 +- src/page/LinePage5-2/Left/LeftUp.tsx | 56 +++++++-------- src/page/LinePage5-2/index.tsx | 4 +- src/store/UpdateData.tsx | 4 +- 31 files changed, 326 insertions(+), 326 deletions(-) diff --git a/src/page/LinePage1-1/Center/CenterDown.tsx b/src/page/LinePage1-1/Center/CenterDown.tsx index 71623fd..d5de448 100644 --- a/src/page/LinePage1-1/Center/CenterDown.tsx +++ b/src/page/LinePage1-1/Center/CenterDown.tsx @@ -102,7 +102,7 @@ function CenterDown() { // @ts-ignore data.weekProductionRates[keys[0]].forEach((item,index)=>{ // @ts-ignore - dataSource.week.xData.push(dayjs(item.recTime).format("HH:mm")) + dataSource.week.xData.push(dayjs(item.recTime).format("MM-DD")) }) keys.forEach((item,index)=>{ let obj = { diff --git a/src/page/LinePage1-1/Left/LeftUp.tsx b/src/page/LinePage1-1/Left/LeftUp.tsx index b69229d..e9c6a88 100644 --- a/src/page/LinePage1-1/Left/LeftUp.tsx +++ b/src/page/LinePage1-1/Left/LeftUp.tsx @@ -82,20 +82,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.day.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + // dataSource.day.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.day.xData = [] dataSource.day.series = [] @@ -150,20 +150,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.week.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + //dataSource.week.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.week.xData = [] dataSource.week.series = [] @@ -218,20 +218,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.month.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + // dataSource.month.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.month.xData = [] dataSource.month.series = [] diff --git a/src/page/LinePage1-1/index.tsx b/src/page/LinePage1-1/index.tsx index 27907ae..c8a96c1 100644 --- a/src/page/LinePage1-1/index.tsx +++ b/src/page/LinePage1-1/index.tsx @@ -9,8 +9,8 @@ import { useDispatch } from 'react-redux'; import { UpdateLine1Before } from "../../store/LinePageSlice"; function LinePage() { const dispatch = useDispatch(); - // const myUrl = "192.168.8.22" - const myUrl = window.location.host; + const myUrl = "192.168.8.22" + // const myUrl = window.location.host; useEffect(() => { let websocket1_1 = new WebSocket("ws://" + myUrl + "/websocket/message?userId=1-1-" + Date.now()); // @ts-ignore diff --git a/src/page/LinePage1-2/Center/CenterDown.tsx b/src/page/LinePage1-2/Center/CenterDown.tsx index eadc48f..f406180 100644 --- a/src/page/LinePage1-2/Center/CenterDown.tsx +++ b/src/page/LinePage1-2/Center/CenterDown.tsx @@ -102,7 +102,7 @@ function CenterDown() { // @ts-ignore data.weekProductionRates[keys[0]].forEach((item,index)=>{ // @ts-ignore - dataSource.week.xData.push(dayjs(item.recTime).format("HH:mm")) + dataSource.week.xData.push(dayjs(item.recTime).format("MM-DD")) }) keys.forEach((item,index)=>{ let obj = { diff --git a/src/page/LinePage1-2/Left/LeftUp.tsx b/src/page/LinePage1-2/Left/LeftUp.tsx index aeb4eb8..81f7dce 100644 --- a/src/page/LinePage1-2/Left/LeftUp.tsx +++ b/src/page/LinePage1-2/Left/LeftUp.tsx @@ -150,20 +150,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.week.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + //dataSource.week.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.week.xData = [] dataSource.week.series = [] @@ -218,20 +218,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.month.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + // dataSource.month.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.month.xData = [] dataSource.month.series = [] diff --git a/src/page/LinePage1-2/index.tsx b/src/page/LinePage1-2/index.tsx index c01f689..ca9d2bc 100644 --- a/src/page/LinePage1-2/index.tsx +++ b/src/page/LinePage1-2/index.tsx @@ -9,8 +9,8 @@ import { useDispatch } from 'react-redux'; import { UpdateLine1After } from "../../store/LinePageSlice"; function LinePage() { const dispatch = useDispatch(); - // const myUrl = "192.168.8.22" - const myUrl = window.location.host; + const myUrl = "192.168.8.22" + // const myUrl = window.location.host; useEffect(() => { let websocket1_2 = new WebSocket("ws://" + myUrl + "/websocket/message?userId=1-2-" + Date.now()); // @ts-ignore diff --git a/src/page/LinePage2-1/Center/CenterDown.tsx b/src/page/LinePage2-1/Center/CenterDown.tsx index cb82b06..b3cac4b 100644 --- a/src/page/LinePage2-1/Center/CenterDown.tsx +++ b/src/page/LinePage2-1/Center/CenterDown.tsx @@ -102,7 +102,7 @@ function CenterDown() { // @ts-ignore data.weekProductionRates[keys[0]].forEach((item,index)=>{ // @ts-ignore - dataSource.week.xData.push(dayjs(item.recTime).format("HH:mm")) + dataSource.week.xData.push(dayjs(item.recTime).format("MM-DD")) }) keys.forEach((item,index)=>{ let obj = { diff --git a/src/page/LinePage2-1/Left/LeftUp.tsx b/src/page/LinePage2-1/Left/LeftUp.tsx index e046b00..bf20940 100644 --- a/src/page/LinePage2-1/Left/LeftUp.tsx +++ b/src/page/LinePage2-1/Left/LeftUp.tsx @@ -150,20 +150,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.week.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + //dataSource.week.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.week.xData = [] dataSource.week.series = [] @@ -218,20 +218,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.month.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + // dataSource.month.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.month.xData = [] dataSource.month.series = [] diff --git a/src/page/LinePage2-1/index.tsx b/src/page/LinePage2-1/index.tsx index 09501ac..69df568 100644 --- a/src/page/LinePage2-1/index.tsx +++ b/src/page/LinePage2-1/index.tsx @@ -9,8 +9,8 @@ import { useDispatch } from 'react-redux'; import { UpdateLine2Before } from "../../store/LinePageSlice"; function LinePage() { const dispatch = useDispatch(); - // const myUrl = "192.168.8.22" - const myUrl = window.location.host; + const myUrl = "192.168.8.22" + // const myUrl = window.location.host; useEffect(() => { let websocket2_1 = new WebSocket("ws://" + myUrl + "/websocket/message?userId=2-1-" + Date.now()); // @ts-ignore diff --git a/src/page/LinePage2-2/Center/CenterDown.tsx b/src/page/LinePage2-2/Center/CenterDown.tsx index 581b09b..517d1fc 100644 --- a/src/page/LinePage2-2/Center/CenterDown.tsx +++ b/src/page/LinePage2-2/Center/CenterDown.tsx @@ -102,7 +102,7 @@ function CenterDown() { // @ts-ignore data.weekProductionRates[keys[0]].forEach((item,index)=>{ // @ts-ignore - dataSource.week.xData.push(dayjs(item.recTime).format("HH:mm")) + dataSource.week.xData.push(dayjs(item.recTime).format("MM-DD")) }) keys.forEach((item,index)=>{ let obj = { diff --git a/src/page/LinePage2-2/Left/LeftUp.tsx b/src/page/LinePage2-2/Left/LeftUp.tsx index bc5aba0..f5ae451 100644 --- a/src/page/LinePage2-2/Left/LeftUp.tsx +++ b/src/page/LinePage2-2/Left/LeftUp.tsx @@ -150,20 +150,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.week.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + //dataSource.week.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.week.xData = [] dataSource.week.series = [] @@ -218,20 +218,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.month.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + // dataSource.month.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.month.xData = [] dataSource.month.series = [] diff --git a/src/page/LinePage2-2/index.tsx b/src/page/LinePage2-2/index.tsx index 3a84ed4..83678b1 100644 --- a/src/page/LinePage2-2/index.tsx +++ b/src/page/LinePage2-2/index.tsx @@ -9,8 +9,8 @@ import { useDispatch } from 'react-redux'; import { UpdateLine2After } from "../../store/LinePageSlice"; function LinePage() { const dispatch = useDispatch(); - // const myUrl = "192.168.8.22" - const myUrl = window.location.host; + const myUrl = "192.168.8.22" + // const myUrl = window.location.host; useEffect(() => { let websocket2_2 = new WebSocket("ws://" + myUrl + "/websocket/message?userId=2-2-" + Date.now()); // @ts-ignore diff --git a/src/page/LinePage3-1/Center/CenterDown.tsx b/src/page/LinePage3-1/Center/CenterDown.tsx index 2472cc6..5258fff 100644 --- a/src/page/LinePage3-1/Center/CenterDown.tsx +++ b/src/page/LinePage3-1/Center/CenterDown.tsx @@ -102,7 +102,7 @@ function CenterDown() { // @ts-ignore data.weekProductionRates[keys[0]].forEach((item,index)=>{ // @ts-ignore - dataSource.week.xData.push(dayjs(item.recTime).format("HH:mm")) + dataSource.week.xData.push(dayjs(item.recTime).format("MM-DD")) }) keys.forEach((item,index)=>{ let obj = { diff --git a/src/page/LinePage3-1/Left/LeftUp.tsx b/src/page/LinePage3-1/Left/LeftUp.tsx index 1989462..5094eff 100644 --- a/src/page/LinePage3-1/Left/LeftUp.tsx +++ b/src/page/LinePage3-1/Left/LeftUp.tsx @@ -150,20 +150,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.week.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + //dataSource.week.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.week.xData = [] dataSource.week.series = [] @@ -218,20 +218,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.month.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + // dataSource.month.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.month.xData = [] dataSource.month.series = [] diff --git a/src/page/LinePage3-1/index.tsx b/src/page/LinePage3-1/index.tsx index 4176e61..d50ab32 100644 --- a/src/page/LinePage3-1/index.tsx +++ b/src/page/LinePage3-1/index.tsx @@ -9,8 +9,8 @@ import { useDispatch } from 'react-redux'; import { UpdateLine3Before } from "../../store/LinePageSlice"; function LinePage() { const dispatch = useDispatch(); - // const myUrl = "192.168.8.22" - const myUrl = window.location.host; + const myUrl = "192.168.8.22" + // const myUrl = window.location.host; useEffect(() => { let websocket3_1 = new WebSocket("ws://" + myUrl + "/websocket/message?userId=3-1-" + Date.now()); // @ts-ignore diff --git a/src/page/LinePage3-2/Center/CenterDown.tsx b/src/page/LinePage3-2/Center/CenterDown.tsx index f9aed4a..7dd3134 100644 --- a/src/page/LinePage3-2/Center/CenterDown.tsx +++ b/src/page/LinePage3-2/Center/CenterDown.tsx @@ -102,7 +102,7 @@ function CenterDown() { // @ts-ignore data.weekProductionRates[keys[0]].forEach((item,index)=>{ // @ts-ignore - dataSource.week.xData.push(dayjs(item.recTime).format("HH:mm")) + dataSource.week.xData.push(dayjs(item.recTime).format("MM-DD")) }) keys.forEach((item,index)=>{ let obj = { diff --git a/src/page/LinePage3-2/Left/LeftUp.tsx b/src/page/LinePage3-2/Left/LeftUp.tsx index e01e947..3e61206 100644 --- a/src/page/LinePage3-2/Left/LeftUp.tsx +++ b/src/page/LinePage3-2/Left/LeftUp.tsx @@ -150,20 +150,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.week.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + //dataSource.week.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.week.xData = [] dataSource.week.series = [] @@ -218,20 +218,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.month.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + // dataSource.month.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.month.xData = [] dataSource.month.series = [] diff --git a/src/page/LinePage3-2/index.tsx b/src/page/LinePage3-2/index.tsx index d67114a..20383be 100644 --- a/src/page/LinePage3-2/index.tsx +++ b/src/page/LinePage3-2/index.tsx @@ -9,8 +9,8 @@ import { useDispatch } from 'react-redux'; import { UpdateLine3After } from "../../store/LinePageSlice"; function LinePage() { const dispatch = useDispatch(); - // const myUrl = "192.168.8.22" - const myUrl = window.location.host; + const myUrl = "192.168.8.22" + // const myUrl = window.location.host; useEffect(() => { let websocket3_2 = new WebSocket("ws://" + myUrl + "/websocket/message?userId=3-2-" + Date.now()); // @ts-ignore diff --git a/src/page/LinePage4-1/Center/CenterDown.tsx b/src/page/LinePage4-1/Center/CenterDown.tsx index f3289fd..c95252b 100644 --- a/src/page/LinePage4-1/Center/CenterDown.tsx +++ b/src/page/LinePage4-1/Center/CenterDown.tsx @@ -102,7 +102,7 @@ function CenterDown() { // @ts-ignore data.weekProductionRates[keys[0]].forEach((item,index)=>{ // @ts-ignore - dataSource.week.xData.push(dayjs(item.recTime).format("HH:mm")) + dataSource.week.xData.push(dayjs(item.recTime).format("MM-DD")) }) keys.forEach((item,index)=>{ let obj = { diff --git a/src/page/LinePage4-1/Left/LeftUp.tsx b/src/page/LinePage4-1/Left/LeftUp.tsx index a955462..cd83629 100644 --- a/src/page/LinePage4-1/Left/LeftUp.tsx +++ b/src/page/LinePage4-1/Left/LeftUp.tsx @@ -150,20 +150,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.week.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + //dataSource.week.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.week.xData = [] dataSource.week.series = [] @@ -218,20 +218,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.month.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + // dataSource.month.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.month.xData = [] dataSource.month.series = [] diff --git a/src/page/LinePage4-1/index.tsx b/src/page/LinePage4-1/index.tsx index 12eba4b..7e704b2 100644 --- a/src/page/LinePage4-1/index.tsx +++ b/src/page/LinePage4-1/index.tsx @@ -9,8 +9,8 @@ import { useDispatch } from 'react-redux'; import { UpdateLine4Before } from "../../store/LinePageSlice"; function LinePage() { const dispatch = useDispatch(); - // const myUrl = "192.168.8.22" - const myUrl = window.location.host; + const myUrl = "192.168.8.22" + // const myUrl = window.location.host; useEffect(() => { let websocket4_1 = new WebSocket("ws://" + myUrl + "/websocket/message?userId=4-1-" + Date.now()); // @ts-ignore diff --git a/src/page/LinePage4-2/Center/CenterDown.tsx b/src/page/LinePage4-2/Center/CenterDown.tsx index 6586201..8b2b483 100644 --- a/src/page/LinePage4-2/Center/CenterDown.tsx +++ b/src/page/LinePage4-2/Center/CenterDown.tsx @@ -102,7 +102,7 @@ function CenterDown() { // @ts-ignore data.weekProductionRates[keys[0]].forEach((item,index)=>{ // @ts-ignore - dataSource.week.xData.push(dayjs(item.recTime).format("HH:mm")) + dataSource.week.xData.push(dayjs(item.recTime).format("MM-DD")) }) keys.forEach((item,index)=>{ let obj = { diff --git a/src/page/LinePage4-2/Left/LeftUp.tsx b/src/page/LinePage4-2/Left/LeftUp.tsx index 72dcc5f..b9cd2b4 100644 --- a/src/page/LinePage4-2/Left/LeftUp.tsx +++ b/src/page/LinePage4-2/Left/LeftUp.tsx @@ -150,20 +150,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.week.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + //dataSource.week.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.week.xData = [] dataSource.week.series = [] @@ -218,20 +218,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.month.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + // dataSource.month.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.month.xData = [] dataSource.month.series = [] diff --git a/src/page/LinePage4-2/index.tsx b/src/page/LinePage4-2/index.tsx index 9482f2b..31b37cf 100644 --- a/src/page/LinePage4-2/index.tsx +++ b/src/page/LinePage4-2/index.tsx @@ -9,8 +9,8 @@ import { useDispatch } from 'react-redux'; import { UpdateLine4After } from "../../store/LinePageSlice"; function LinePage() { const dispatch = useDispatch(); - // const myUrl = "192.168.8.22" - const myUrl = window.location.host; + const myUrl = "192.168.8.22" + // const myUrl = window.location.host; useEffect(() => { let websocket4_2 = new WebSocket("ws://" + myUrl + "/websocket/message?userId=4-2-" + Date.now()); // @ts-ignore diff --git a/src/page/LinePage5-1/Center/CenterDown.tsx b/src/page/LinePage5-1/Center/CenterDown.tsx index 632b12b..524ba17 100644 --- a/src/page/LinePage5-1/Center/CenterDown.tsx +++ b/src/page/LinePage5-1/Center/CenterDown.tsx @@ -102,7 +102,7 @@ function CenterDown() { // @ts-ignore data.weekProductionRates[keys[0]].forEach((item,index)=>{ // @ts-ignore - dataSource.week.xData.push(dayjs(item.recTime).format("HH:mm")) + dataSource.week.xData.push(dayjs(item.recTime).format("MM-DD")) }) keys.forEach((item,index)=>{ let obj = { diff --git a/src/page/LinePage5-1/Left/LeftUp.tsx b/src/page/LinePage5-1/Left/LeftUp.tsx index 88371da..6bfc0d7 100644 --- a/src/page/LinePage5-1/Left/LeftUp.tsx +++ b/src/page/LinePage5-1/Left/LeftUp.tsx @@ -150,20 +150,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.week.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + //dataSource.week.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.week.xData = [] dataSource.week.series = [] @@ -219,20 +219,20 @@ function LeftUp() { sum.push(sumIner) } - dataSource.month.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + // dataSource.month.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.month.xData = [] dataSource.month.series = [] diff --git a/src/page/LinePage5-1/index.tsx b/src/page/LinePage5-1/index.tsx index e8a585e..227df0f 100644 --- a/src/page/LinePage5-1/index.tsx +++ b/src/page/LinePage5-1/index.tsx @@ -9,8 +9,8 @@ import { useDispatch } from 'react-redux'; import { UpdateLine5Before } from "../../store/LinePageSlice"; function LinePage() { const dispatch = useDispatch(); - // const myUrl = "192.168.8.22" - const myUrl = window.location.host; + const myUrl = "192.168.8.22" + // const myUrl = window.location.host; useEffect(() => { let websocket5_1 = new WebSocket("ws://" + myUrl + "/websocket/message?userId=5-1-" + Date.now()); // @ts-ignore diff --git a/src/page/LinePage5-2/Center/CenterDown.tsx b/src/page/LinePage5-2/Center/CenterDown.tsx index 1dc9d5c..39324c3 100644 --- a/src/page/LinePage5-2/Center/CenterDown.tsx +++ b/src/page/LinePage5-2/Center/CenterDown.tsx @@ -102,7 +102,7 @@ function CenterDown() { // @ts-ignore data.weekProductionRates[keys[0]].forEach((item,index)=>{ // @ts-ignore - dataSource.week.xData.push(dayjs(item.recTime).format("HH:mm")) + dataSource.week.xData.push(dayjs(item.recTime).format("MM-DD")) }) keys.forEach((item,index)=>{ let obj = { diff --git a/src/page/LinePage5-2/Left/LeftUp.tsx b/src/page/LinePage5-2/Left/LeftUp.tsx index 793e46b..ca5de09 100644 --- a/src/page/LinePage5-2/Left/LeftUp.tsx +++ b/src/page/LinePage5-2/Left/LeftUp.tsx @@ -150,20 +150,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.week.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + //dataSource.week.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.week.xData = [] dataSource.week.series = [] @@ -218,20 +218,20 @@ function LeftUp() { } sum.push(sumIner) } - dataSource.month.series.push({ - data: sum, - type: "bar", - stack: "a", - name: "", - label: { - show: true, - position: "top", - color: "#fff", - formatter: function (params: any) { - return sum[params.dataIndex]; - }, - }, - }) + // dataSource.month.series.push({ + // data: sum, + // type: "bar", + // stack: "a", + // name: "", + // label: { + // show: true, + // position: "top", + // color: "#fff", + // formatter: function (params: any) { + // return sum[params.dataIndex]; + // }, + // }, + // }) }else{ dataSource.month.xData = [] dataSource.month.series = [] diff --git a/src/page/LinePage5-2/index.tsx b/src/page/LinePage5-2/index.tsx index 3874cad..747c130 100644 --- a/src/page/LinePage5-2/index.tsx +++ b/src/page/LinePage5-2/index.tsx @@ -9,8 +9,8 @@ import { useDispatch } from 'react-redux'; import { UpdateLine5After } from "../../store/LinePageSlice"; function LinePage() { const dispatch = useDispatch(); - // const myUrl = "192.168.8.22" - const myUrl = window.location.host; + const myUrl = "192.168.8.22" + // const myUrl = window.location.host; useEffect(() => { let websocket5_2 = new WebSocket("ws://" + myUrl + "/websocket/message?userId=5-2-" + Date.now()); // @ts-ignore diff --git a/src/store/UpdateData.tsx b/src/store/UpdateData.tsx index 8d0d9dc..a19d52a 100644 --- a/src/store/UpdateData.tsx +++ b/src/store/UpdateData.tsx @@ -21,8 +21,8 @@ function UpdateData() { // .then((r) => { // setUrl(r.data.url) // }) - // const myUrl = "192.168.8.22" - const myUrl = window.location.host; + const myUrl = "192.168.8.22" + // const myUrl = window.location.host; let websocketAllLine = null; // let websocket1_1 = null; // let websocket1_2 = null;