Compare commits

7 Commits
zjl ... master

Author SHA1 Message Date
zwq
025366bb65 更新折线图显示数值 2025-08-26 16:04:56 +08:00
gtz
aaa420822d 1 2025-08-25 15:33:01 +08:00
5feeded363 Merge pull request '改变链接位置,改成在每个页面链接' (#7) from zjl into master
Reviewed-on: #7
2025-03-06 08:29:19 +08:00
60786f59b8 Merge pull request '接口后面加随机数' (#6) from zjl into master
Reviewed-on: #6
2025-02-27 08:57:40 +08:00
bff87fbcee Merge pull request 'zjl' (#5) from zjl into master
Reviewed-on: #5
2025-02-21 16:04:53 +08:00
c12c0e72e9 Merge pull request 'zjl' (#4) from zjl into master
Reviewed-on: #4
2024-09-11 10:18:49 +08:00
5355d9f99b Merge pull request 'zjl' (#1) from zjl into master
Reviewed-on: #1
2024-08-27 15:49:13 +08:00
32 changed files with 282 additions and 275 deletions

View File

@@ -80,6 +80,11 @@ export default function getOptions(tempData: any) {
symbol: "circle", symbol: "circle",
symbolSize: 4, symbolSize: 4,
data: tempData.input, data: tempData.input,
label: {
show: true,
position: 'top',
color:'inherit'
},
}, },
{ {
name: "产出", name: "产出",
@@ -87,6 +92,11 @@ export default function getOptions(tempData: any) {
symbol: "circle", symbol: "circle",
symbolSize: 4, symbolSize: 4,
data: tempData.output, data: tempData.output,
label: {
show: true,
position: 'top',
color:'inherit'
},
}, },
], ],
tooltip: { tooltip: {

View File

@@ -155,8 +155,6 @@ function CenterDown() {
dataSource.month.xData = [] dataSource.month.xData = []
dataSource.month.series = [] dataSource.month.series = []
} }
console.log('activeName', activeName)
console.log('dataSource', dataSource)
let chartData = (dataSource as { [key: string]: any })[activeName]; let chartData = (dataSource as { [key: string]: any })[activeName];
const options = getOptions(chartData); const options = getOptions(chartData);
return ( return (

View File

@@ -34,7 +34,7 @@ function TitleBox(props: titleProps) {
case "right_up": case "right_up":
return { return {
img: Num, img: Num,
title: "各工段当日投入和产出", title: "各工段投入和产出",
}; };
default: default:
return { return {

View File

@@ -150,7 +150,7 @@ function LeftUp() {
} }
sum.push(sumIner) sum.push(sumIner)
} }
// dataSource.week.series.push({ //dataSource.week.series.push({
// data: sum, // data: sum,
// type: "bar", // type: "bar",
// stack: "a", // stack: "a",

View File

@@ -18,7 +18,6 @@ function LinePage() {
let msgData = event.data let msgData = event.data
try { try {
msgData = JSON.parse(event.data); msgData = JSON.parse(event.data);
console.log(msgData)
} catch (error) { } catch (error) {
console.log("websocket: [unable to msgData] : ", event.data); console.log("websocket: [unable to msgData] : ", event.data);
} }

View File

@@ -102,7 +102,7 @@ function CenterDown() {
// @ts-ignore // @ts-ignore
data.weekProductionRates[keys[0]].forEach((item,index)=>{ data.weekProductionRates[keys[0]].forEach((item,index)=>{
// @ts-ignore // @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)=>{ keys.forEach((item,index)=>{
let obj = { let obj = {

View File

@@ -34,7 +34,7 @@ function TitleBox(props: titleProps) {
case "right_up": case "right_up":
return { return {
img: Num, img: Num,
title: "各工段当日投入和产出", title: "各工段投入和产出",
}; };
default: default:
return { return {

View File

@@ -150,20 +150,20 @@ function LeftUp() {
} }
sum.push(sumIner) sum.push(sumIner)
} }
dataSource.week.series.push({ //dataSource.week.series.push({
data: sum, // data: sum,
type: "bar", // type: "bar",
stack: "a", // stack: "a",
name: "", // name: "",
label: { // label: {
show: true, // show: true,
position: "top", // position: "top",
color: "#fff", // color: "#fff",
formatter: function (params: any) { // formatter: function (params: any) {
return sum[params.dataIndex]; // return sum[params.dataIndex];
}, // },
}, // },
}) // })
}else{ }else{
dataSource.week.xData = [] dataSource.week.xData = []
dataSource.week.series = [] dataSource.week.series = []
@@ -218,20 +218,20 @@ function LeftUp() {
} }
sum.push(sumIner) sum.push(sumIner)
} }
dataSource.month.series.push({ // dataSource.month.series.push({
data: sum, // data: sum,
type: "bar", // type: "bar",
stack: "a", // stack: "a",
name: "", // name: "",
label: { // label: {
show: true, // show: true,
position: "top", // position: "top",
color: "#fff", // color: "#fff",
formatter: function (params: any) { // formatter: function (params: any) {
return sum[params.dataIndex]; // return sum[params.dataIndex];
}, // },
}, // },
}) // })
}else{ }else{
dataSource.month.xData = [] dataSource.month.xData = []
dataSource.month.series = [] dataSource.month.series = []

View File

@@ -102,7 +102,7 @@ function CenterDown() {
// @ts-ignore // @ts-ignore
data.weekProductionRates[keys[0]].forEach((item,index)=>{ data.weekProductionRates[keys[0]].forEach((item,index)=>{
// @ts-ignore // @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)=>{ keys.forEach((item,index)=>{
let obj = { let obj = {

View File

@@ -34,7 +34,7 @@ function TitleBox(props: titleProps) {
case "right_up": case "right_up":
return { return {
img: Num, img: Num,
title: "各工段当日投入和产出", title: "各工段投入和产出",
}; };
default: default:
return { return {

View File

@@ -150,20 +150,20 @@ function LeftUp() {
} }
sum.push(sumIner) sum.push(sumIner)
} }
dataSource.week.series.push({ //dataSource.week.series.push({
data: sum, // data: sum,
type: "bar", // type: "bar",
stack: "a", // stack: "a",
name: "", // name: "",
label: { // label: {
show: true, // show: true,
position: "top", // position: "top",
color: "#fff", // color: "#fff",
formatter: function (params: any) { // formatter: function (params: any) {
return sum[params.dataIndex]; // return sum[params.dataIndex];
}, // },
}, // },
}) // })
}else{ }else{
dataSource.week.xData = [] dataSource.week.xData = []
dataSource.week.series = [] dataSource.week.series = []
@@ -218,20 +218,20 @@ function LeftUp() {
} }
sum.push(sumIner) sum.push(sumIner)
} }
dataSource.month.series.push({ // dataSource.month.series.push({
data: sum, // data: sum,
type: "bar", // type: "bar",
stack: "a", // stack: "a",
name: "", // name: "",
label: { // label: {
show: true, // show: true,
position: "top", // position: "top",
color: "#fff", // color: "#fff",
formatter: function (params: any) { // formatter: function (params: any) {
return sum[params.dataIndex]; // return sum[params.dataIndex];
}, // },
}, // },
}) // })
}else{ }else{
dataSource.month.xData = [] dataSource.month.xData = []
dataSource.month.series = [] dataSource.month.series = []

View File

@@ -102,7 +102,7 @@ function CenterDown() {
// @ts-ignore // @ts-ignore
data.weekProductionRates[keys[0]].forEach((item,index)=>{ data.weekProductionRates[keys[0]].forEach((item,index)=>{
// @ts-ignore // @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)=>{ keys.forEach((item,index)=>{
let obj = { let obj = {

View File

@@ -34,7 +34,7 @@ function TitleBox(props: titleProps) {
case "right_up": case "right_up":
return { return {
img: Num, img: Num,
title: "各工段当日投入和产出", title: "各工段投入和产出",
}; };
default: default:
return { return {

View File

@@ -150,20 +150,20 @@ function LeftUp() {
} }
sum.push(sumIner) sum.push(sumIner)
} }
dataSource.week.series.push({ //dataSource.week.series.push({
data: sum, // data: sum,
type: "bar", // type: "bar",
stack: "a", // stack: "a",
name: "", // name: "",
label: { // label: {
show: true, // show: true,
position: "top", // position: "top",
color: "#fff", // color: "#fff",
formatter: function (params: any) { // formatter: function (params: any) {
return sum[params.dataIndex]; // return sum[params.dataIndex];
}, // },
}, // },
}) // })
}else{ }else{
dataSource.week.xData = [] dataSource.week.xData = []
dataSource.week.series = [] dataSource.week.series = []
@@ -218,20 +218,20 @@ function LeftUp() {
} }
sum.push(sumIner) sum.push(sumIner)
} }
dataSource.month.series.push({ // dataSource.month.series.push({
data: sum, // data: sum,
type: "bar", // type: "bar",
stack: "a", // stack: "a",
name: "", // name: "",
label: { // label: {
show: true, // show: true,
position: "top", // position: "top",
color: "#fff", // color: "#fff",
formatter: function (params: any) { // formatter: function (params: any) {
return sum[params.dataIndex]; // return sum[params.dataIndex];
}, // },
}, // },
}) // })
}else{ }else{
dataSource.month.xData = [] dataSource.month.xData = []
dataSource.month.series = [] dataSource.month.series = []

View File

@@ -102,7 +102,7 @@ function CenterDown() {
// @ts-ignore // @ts-ignore
data.weekProductionRates[keys[0]].forEach((item,index)=>{ data.weekProductionRates[keys[0]].forEach((item,index)=>{
// @ts-ignore // @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)=>{ keys.forEach((item,index)=>{
let obj = { let obj = {

View File

@@ -34,7 +34,7 @@ function TitleBox(props: titleProps) {
case "right_up": case "right_up":
return { return {
img: Num, img: Num,
title: "各工段当日投入和产出", title: "各工段投入和产出",
}; };
default: default:
return { return {

View File

@@ -150,20 +150,20 @@ function LeftUp() {
} }
sum.push(sumIner) sum.push(sumIner)
} }
dataSource.week.series.push({ //dataSource.week.series.push({
data: sum, // data: sum,
type: "bar", // type: "bar",
stack: "a", // stack: "a",
name: "", // name: "",
label: { // label: {
show: true, // show: true,
position: "top", // position: "top",
color: "#fff", // color: "#fff",
formatter: function (params: any) { // formatter: function (params: any) {
return sum[params.dataIndex]; // return sum[params.dataIndex];
}, // },
}, // },
}) // })
}else{ }else{
dataSource.week.xData = [] dataSource.week.xData = []
dataSource.week.series = [] dataSource.week.series = []
@@ -218,20 +218,20 @@ function LeftUp() {
} }
sum.push(sumIner) sum.push(sumIner)
} }
dataSource.month.series.push({ // dataSource.month.series.push({
data: sum, // data: sum,
type: "bar", // type: "bar",
stack: "a", // stack: "a",
name: "", // name: "",
label: { // label: {
show: true, // show: true,
position: "top", // position: "top",
color: "#fff", // color: "#fff",
formatter: function (params: any) { // formatter: function (params: any) {
return sum[params.dataIndex]; // return sum[params.dataIndex];
}, // },
}, // },
}) // })
}else{ }else{
dataSource.month.xData = [] dataSource.month.xData = []
dataSource.month.series = [] dataSource.month.series = []

View File

@@ -102,7 +102,7 @@ function CenterDown() {
// @ts-ignore // @ts-ignore
data.weekProductionRates[keys[0]].forEach((item,index)=>{ data.weekProductionRates[keys[0]].forEach((item,index)=>{
// @ts-ignore // @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)=>{ keys.forEach((item,index)=>{
let obj = { let obj = {

View File

@@ -34,7 +34,7 @@ function TitleBox(props: titleProps) {
case "right_up": case "right_up":
return { return {
img: Num, img: Num,
title: "各工段当日投入和产出", title: "各工段投入和产出",
}; };
default: default:
return { return {

View File

@@ -150,20 +150,20 @@ function LeftUp() {
} }
sum.push(sumIner) sum.push(sumIner)
} }
dataSource.week.series.push({ //dataSource.week.series.push({
data: sum, // data: sum,
type: "bar", // type: "bar",
stack: "a", // stack: "a",
name: "", // name: "",
label: { // label: {
show: true, // show: true,
position: "top", // position: "top",
color: "#fff", // color: "#fff",
formatter: function (params: any) { // formatter: function (params: any) {
return sum[params.dataIndex]; // return sum[params.dataIndex];
}, // },
}, // },
}) // })
}else{ }else{
dataSource.week.xData = [] dataSource.week.xData = []
dataSource.week.series = [] dataSource.week.series = []
@@ -218,20 +218,20 @@ function LeftUp() {
} }
sum.push(sumIner) sum.push(sumIner)
} }
dataSource.month.series.push({ // dataSource.month.series.push({
data: sum, // data: sum,
type: "bar", // type: "bar",
stack: "a", // stack: "a",
name: "", // name: "",
label: { // label: {
show: true, // show: true,
position: "top", // position: "top",
color: "#fff", // color: "#fff",
formatter: function (params: any) { // formatter: function (params: any) {
return sum[params.dataIndex]; // return sum[params.dataIndex];
}, // },
}, // },
}) // })
}else{ }else{
dataSource.month.xData = [] dataSource.month.xData = []
dataSource.month.series = [] dataSource.month.series = []

View File

@@ -102,7 +102,7 @@ function CenterDown() {
// @ts-ignore // @ts-ignore
data.weekProductionRates[keys[0]].forEach((item,index)=>{ data.weekProductionRates[keys[0]].forEach((item,index)=>{
// @ts-ignore // @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)=>{ keys.forEach((item,index)=>{
let obj = { let obj = {

View File

@@ -34,7 +34,7 @@ function TitleBox(props: titleProps) {
case "right_up": case "right_up":
return { return {
img: Num, img: Num,
title: "各工段当日投入和产出", title: "各工段投入和产出",
}; };
default: default:
return { return {

View File

@@ -150,20 +150,20 @@ function LeftUp() {
} }
sum.push(sumIner) sum.push(sumIner)
} }
dataSource.week.series.push({ //dataSource.week.series.push({
data: sum, // data: sum,
type: "bar", // type: "bar",
stack: "a", // stack: "a",
name: "", // name: "",
label: { // label: {
show: true, // show: true,
position: "top", // position: "top",
color: "#fff", // color: "#fff",
formatter: function (params: any) { // formatter: function (params: any) {
return sum[params.dataIndex]; // return sum[params.dataIndex];
}, // },
}, // },
}) // })
}else{ }else{
dataSource.week.xData = [] dataSource.week.xData = []
dataSource.week.series = [] dataSource.week.series = []
@@ -218,20 +218,20 @@ function LeftUp() {
} }
sum.push(sumIner) sum.push(sumIner)
} }
dataSource.month.series.push({ // dataSource.month.series.push({
data: sum, // data: sum,
type: "bar", // type: "bar",
stack: "a", // stack: "a",
name: "", // name: "",
label: { // label: {
show: true, // show: true,
position: "top", // position: "top",
color: "#fff", // color: "#fff",
formatter: function (params: any) { // formatter: function (params: any) {
return sum[params.dataIndex]; // return sum[params.dataIndex];
}, // },
}, // },
}) // })
}else{ }else{
dataSource.month.xData = [] dataSource.month.xData = []
dataSource.month.series = [] dataSource.month.series = []

View File

@@ -102,7 +102,7 @@ function CenterDown() {
// @ts-ignore // @ts-ignore
data.weekProductionRates[keys[0]].forEach((item,index)=>{ data.weekProductionRates[keys[0]].forEach((item,index)=>{
// @ts-ignore // @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)=>{ keys.forEach((item,index)=>{
let obj = { let obj = {

View File

@@ -34,7 +34,7 @@ function TitleBox(props: titleProps) {
case "right_up": case "right_up":
return { return {
img: Num, img: Num,
title: "各工段当日投入和产出", title: "各工段投入和产出",
}; };
default: default:
return { return {

View File

@@ -150,20 +150,20 @@ function LeftUp() {
} }
sum.push(sumIner) sum.push(sumIner)
} }
dataSource.week.series.push({ //dataSource.week.series.push({
data: sum, // data: sum,
type: "bar", // type: "bar",
stack: "a", // stack: "a",
name: "", // name: "",
label: { // label: {
show: true, // show: true,
position: "top", // position: "top",
color: "#fff", // color: "#fff",
formatter: function (params: any) { // formatter: function (params: any) {
return sum[params.dataIndex]; // return sum[params.dataIndex];
}, // },
}, // },
}) // })
}else{ }else{
dataSource.week.xData = [] dataSource.week.xData = []
dataSource.week.series = [] dataSource.week.series = []
@@ -218,20 +218,20 @@ function LeftUp() {
} }
sum.push(sumIner) sum.push(sumIner)
} }
dataSource.month.series.push({ // dataSource.month.series.push({
data: sum, // data: sum,
type: "bar", // type: "bar",
stack: "a", // stack: "a",
name: "", // name: "",
label: { // label: {
show: true, // show: true,
position: "top", // position: "top",
color: "#fff", // color: "#fff",
formatter: function (params: any) { // formatter: function (params: any) {
return sum[params.dataIndex]; // return sum[params.dataIndex];
}, // },
}, // },
}) // })
}else{ }else{
dataSource.month.xData = [] dataSource.month.xData = []
dataSource.month.series = [] dataSource.month.series = []

View File

@@ -102,7 +102,7 @@ function CenterDown() {
// @ts-ignore // @ts-ignore
data.weekProductionRates[keys[0]].forEach((item,index)=>{ data.weekProductionRates[keys[0]].forEach((item,index)=>{
// @ts-ignore // @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)=>{ keys.forEach((item,index)=>{
let obj = { let obj = {

View File

@@ -34,7 +34,7 @@ function TitleBox(props: titleProps) {
case "right_up": case "right_up":
return { return {
img: Num, img: Num,
title: "各工段当日投入和产出", title: "各工段投入和产出",
}; };
default: default:
return { return {

View File

@@ -150,20 +150,20 @@ function LeftUp() {
} }
sum.push(sumIner) sum.push(sumIner)
} }
dataSource.week.series.push({ //dataSource.week.series.push({
data: sum, // data: sum,
type: "bar", // type: "bar",
stack: "a", // stack: "a",
name: "", // name: "",
label: { // label: {
show: true, // show: true,
position: "top", // position: "top",
color: "#fff", // color: "#fff",
formatter: function (params: any) { // formatter: function (params: any) {
return sum[params.dataIndex]; // return sum[params.dataIndex];
}, // },
}, // },
}) // })
}else{ }else{
dataSource.week.xData = [] dataSource.week.xData = []
dataSource.week.series = [] dataSource.week.series = []
@@ -219,20 +219,20 @@ function LeftUp() {
sum.push(sumIner) sum.push(sumIner)
} }
dataSource.month.series.push({ // dataSource.month.series.push({
data: sum, // data: sum,
type: "bar", // type: "bar",
stack: "a", // stack: "a",
name: "", // name: "",
label: { // label: {
show: true, // show: true,
position: "top", // position: "top",
color: "#fff", // color: "#fff",
formatter: function (params: any) { // formatter: function (params: any) {
return sum[params.dataIndex]; // return sum[params.dataIndex];
}, // },
}, // },
}) // })
}else{ }else{
dataSource.month.xData = [] dataSource.month.xData = []
dataSource.month.series = [] dataSource.month.series = []

View File

@@ -102,7 +102,7 @@ function CenterDown() {
// @ts-ignore // @ts-ignore
data.weekProductionRates[keys[0]].forEach((item,index)=>{ data.weekProductionRates[keys[0]].forEach((item,index)=>{
// @ts-ignore // @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)=>{ keys.forEach((item,index)=>{
let obj = { let obj = {

View File

@@ -34,7 +34,7 @@ function TitleBox(props: titleProps) {
case "right_up": case "right_up":
return { return {
img: Num, img: Num,
title: "各工段当日投入和产出", title: "各工段投入和产出",
}; };
default: default:
return { return {

View File

@@ -150,20 +150,20 @@ function LeftUp() {
} }
sum.push(sumIner) sum.push(sumIner)
} }
dataSource.week.series.push({ //dataSource.week.series.push({
data: sum, // data: sum,
type: "bar", // type: "bar",
stack: "a", // stack: "a",
name: "", // name: "",
label: { // label: {
show: true, // show: true,
position: "top", // position: "top",
color: "#fff", // color: "#fff",
formatter: function (params: any) { // formatter: function (params: any) {
return sum[params.dataIndex]; // return sum[params.dataIndex];
}, // },
}, // },
}) // })
}else{ }else{
dataSource.week.xData = [] dataSource.week.xData = []
dataSource.week.series = [] dataSource.week.series = []
@@ -218,20 +218,20 @@ function LeftUp() {
} }
sum.push(sumIner) sum.push(sumIner)
} }
dataSource.month.series.push({ // dataSource.month.series.push({
data: sum, // data: sum,
type: "bar", // type: "bar",
stack: "a", // stack: "a",
name: "", // name: "",
label: { // label: {
show: true, // show: true,
position: "top", // position: "top",
color: "#fff", // color: "#fff",
formatter: function (params: any) { // formatter: function (params: any) {
return sum[params.dataIndex]; // return sum[params.dataIndex];
}, // },
}, // },
}) // })
}else{ }else{
dataSource.month.xData = [] dataSource.month.xData = []
dataSource.month.series = [] dataSource.month.series = []