This commit is contained in:
gtz 2025-08-25 15:33:01 +08:00
parent 5feeded363
commit aaa420822d
31 changed files with 326 additions and 326 deletions

View File

@ -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 = {

View File

@ -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 = []

View File

@ -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

View File

@ -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 = {

View File

@ -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 = []

View File

@ -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

View File

@ -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 = {

View File

@ -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 = []

View File

@ -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

View File

@ -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 = {

View File

@ -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 = []

View File

@ -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

View File

@ -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 = {

View File

@ -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 = []

View File

@ -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

View File

@ -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 = {

View File

@ -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 = []

View File

@ -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

View File

@ -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 = {

View File

@ -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 = []

View File

@ -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

View File

@ -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 = {

View File

@ -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 = []

View File

@ -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

View File

@ -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 = {

View File

@ -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 = []

View File

@ -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

View File

@ -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 = {

View File

@ -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 = []

View File

@ -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

View File

@ -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;