bugfix 20240111
This commit is contained in:
parent
c8d392ce51
commit
b16ee86def
@ -21,7 +21,7 @@ function Chart1(props) {
|
|||||||
evenRowBGC: "#0b549970",
|
evenRowBGC: "#0b549970",
|
||||||
columnWidth: [128],
|
columnWidth: [128],
|
||||||
headerHeight: 40,
|
headerHeight: 40,
|
||||||
hoverPause: false,
|
hoverPause: true,
|
||||||
data: replaceStyle(filterData(rawData), 0.7),
|
data: replaceStyle(filterData(rawData), 0.7),
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -39,7 +39,20 @@ function Chart1(props) {
|
|||||||
<span className={cls.CenterFormitemDetailBorderLine1}></span>
|
<span className={cls.CenterFormitemDetailBorderLine1}></span>
|
||||||
<span className={cls.CenterFormitemDetailBorderLine2}></span>
|
<span className={cls.CenterFormitemDetailBorderLine2}></span>
|
||||||
<span className={cls.CenterFormitemDetailBorderLine3}></span>
|
<span className={cls.CenterFormitemDetailBorderLine3}></span>
|
||||||
<ScrollBoard config={config} style={{}} />
|
{config.data.length !== 0 && <ScrollBoard config={config} style={{}} />}
|
||||||
|
{config.data.length === 0 && (
|
||||||
|
<p
|
||||||
|
style={{
|
||||||
|
color: "#cccf",
|
||||||
|
fontSize: "24px",
|
||||||
|
userSelect: "none",
|
||||||
|
textAlign: "center",
|
||||||
|
paddingTop: "72px",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
暂无数据
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</BottomBarItem>
|
</BottomBarItem>
|
||||||
);
|
);
|
||||||
@ -124,13 +137,13 @@ function filterData(rawData) {
|
|||||||
|
|
||||||
// let header = ["产线名", "原板宽度", "净板宽", "玻璃厚度"];
|
// let header = ["产线名", "原板宽度", "净板宽", "玻璃厚度"];
|
||||||
|
|
||||||
function replaceStyle(Arr, opencity) {
|
function replaceStyle(Arr, opacity) {
|
||||||
let temp = [];
|
let temp = [];
|
||||||
|
|
||||||
for (let i = 0; i < Arr.length; i++) {
|
for (let i = 0; i < Arr.length; i++) {
|
||||||
temp[i] = [];
|
temp[i] = [];
|
||||||
for (let j = 0; j < Arr[i].length; j++) {
|
for (let j = 0; j < Arr[i].length; j++) {
|
||||||
temp[i][j] = `<span style="color:rgba(255, 255, 255,${opencity})">${
|
temp[i][j] = `<span style="color:rgba(255, 255, 255,${opacity})">${
|
||||||
Arr[i][j]
|
Arr[i][j]
|
||||||
} ${j == 0 ? "" : "mm"}<span/>`;
|
} ${j == 0 ? "" : "mm"}<span/>`;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
|
|
||||||
background-color: rgba(4, 44, 76, 0.2);
|
// background-color: rgba(4, 44, 76, 0.2);
|
||||||
.CenterChart1itemTXT {
|
.CenterChart1itemTXT {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 10%;
|
height: 10%;
|
||||||
|
@ -185,7 +185,7 @@ function WindFrequence(props) {
|
|||||||
<div className={cls.areaPureContent}>
|
<div className={cls.areaPureContent}>
|
||||||
<div
|
<div
|
||||||
className="hint"
|
className="hint"
|
||||||
style={{ position: "absolute", top: "0", right: "0" }}
|
style={{ position: "absolute", top: "3px", right: "3px" }}
|
||||||
>
|
>
|
||||||
<Tooltip title="红外温度">
|
<Tooltip title="红外温度">
|
||||||
<Button
|
<Button
|
||||||
@ -212,7 +212,7 @@ function WindFrequence(props) {
|
|||||||
<div className={cls.areaPureContent}>
|
<div className={cls.areaPureContent}>
|
||||||
<div
|
<div
|
||||||
className="hint"
|
className="hint"
|
||||||
style={{ position: "absolute", top: "0", right: "0" }}
|
style={{ position: "absolute", top: "3px", right: "3px" }}
|
||||||
>
|
>
|
||||||
<Tooltip title="压延机冷却水温度 | 过度辊台冷却水温度 | 唇砖冷却水温度">
|
<Tooltip title="压延机冷却水温度 | 过度辊台冷却水温度 | 唇砖冷却水温度">
|
||||||
<Button
|
<Button
|
||||||
|
@ -47,7 +47,7 @@ function FanInfo(props) {
|
|||||||
// columnWidth: data.length > 12 ? [50, 136] : [88, 256],
|
// columnWidth: data.length > 12 ? [50, 136] : [88, 256],
|
||||||
columnWidth: [50, 136],
|
columnWidth: [50, 136],
|
||||||
rowNum,
|
rowNum,
|
||||||
hoverPause: false,
|
hoverPause: true,
|
||||||
data: attachStyle(data),
|
data: attachStyle(data),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ function FanInfo(props) {
|
|||||||
// columnWidth: data.length > 12 ? [50, 136] : [88, 256],
|
// columnWidth: data.length > 12 ? [50, 136] : [88, 256],
|
||||||
columnWidth: [50, 136],
|
columnWidth: [50, 136],
|
||||||
rowNum: 6,
|
rowNum: 6,
|
||||||
hoverPause: false,
|
hoverPause: true,
|
||||||
data: [],
|
data: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -87,7 +87,22 @@ function getOptions(showChart, hisState, runState) {
|
|||||||
|
|
||||||
options = {
|
options = {
|
||||||
color: colors,
|
color: colors,
|
||||||
grid: { top: 32, right: 12, bottom: 20, left: 48 },
|
grid: { top: 36, right: 12, bottom: 20, left: 48 },
|
||||||
|
legend: {
|
||||||
|
show: true,
|
||||||
|
icon: "roundRect",
|
||||||
|
top: 10,
|
||||||
|
right: 10,
|
||||||
|
padding: 0,
|
||||||
|
itemWidth: 8,
|
||||||
|
itemHeight: 8,
|
||||||
|
itemGap: 3,
|
||||||
|
height: 8,
|
||||||
|
textStyle: {
|
||||||
|
color: "#DFF1FE",
|
||||||
|
fontSize: 10,
|
||||||
|
},
|
||||||
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: "category",
|
type: "category",
|
||||||
data: Array(7)
|
data: Array(7)
|
||||||
@ -140,7 +155,7 @@ function getOptions(showChart, hisState, runState) {
|
|||||||
// max: 100,
|
// max: 100,
|
||||||
},
|
},
|
||||||
series: seriesData.map((v, i) => ({
|
series: seriesData.map((v, i) => ({
|
||||||
name: i + 1 + "#助燃风流量",
|
name: i + 1 + "#流量",
|
||||||
data: v,
|
data: v,
|
||||||
type: "line",
|
type: "line",
|
||||||
symbol: "circle",
|
symbol: "circle",
|
||||||
|
@ -103,7 +103,12 @@ const SmokeTrendChart = (props) => {
|
|||||||
export default SmokeTrendChart;
|
export default SmokeTrendChart;
|
||||||
|
|
||||||
function getOptions(source, period, trend) {
|
function getOptions(source, period, trend) {
|
||||||
if (trend[source].length === 0) return null;
|
if (
|
||||||
|
trend[source].length === 0 ||
|
||||||
|
trend[source].filter((item) => item.value).length == 0
|
||||||
|
)
|
||||||
|
return null;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
color: ["#FFD160", "#12FFF5", "#2760FF"],
|
color: ["#FFD160", "#12FFF5", "#2760FF"],
|
||||||
grid: {
|
grid: {
|
||||||
|
@ -120,7 +120,12 @@ function preHandleStatisticData(data, legend) {
|
|||||||
function getOptions(series, isra, currentStatistic) {
|
function getOptions(series, isra, currentStatistic) {
|
||||||
return {
|
return {
|
||||||
color: ["#2760FF", "#8167F6", "#5B9BFF", "#99D66C", "#FFD160", "#FF8A40"],
|
color: ["#2760FF", "#8167F6", "#5B9BFF", "#99D66C", "#FFD160", "#FF8A40"],
|
||||||
grid: { top: 80, right: 12, bottom: 20, left: 48 },
|
grid: {
|
||||||
|
top: (isra.checkType || []).length <= 10 ? 80 : 100,
|
||||||
|
right: 12,
|
||||||
|
bottom: 20,
|
||||||
|
left: 48,
|
||||||
|
},
|
||||||
legend: {
|
legend: {
|
||||||
top: 10,
|
top: 10,
|
||||||
left: 60,
|
left: 60,
|
||||||
|
@ -145,6 +145,7 @@ function getOptions(data, chart_type) {
|
|||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: "shadow",
|
type: "shadow",
|
||||||
},
|
},
|
||||||
|
symbol: 'rect',
|
||||||
className: "xc-chart-tooltip",
|
className: "xc-chart-tooltip",
|
||||||
// backgroundColor: ''
|
// backgroundColor: ''
|
||||||
},
|
},
|
||||||
@ -208,7 +209,7 @@ function getOptions(data, chart_type) {
|
|||||||
color: "#fffc",
|
color: "#fffc",
|
||||||
},
|
},
|
||||||
data: (dataList || []).map((item) =>
|
data: (dataList || []).map((item) =>
|
||||||
item.value == null || isNaN(+item.value) ? null : (+item.value).toFixed(2)
|
item.value == null || isNaN(+item.value) ? null : (+item.value).toFixed(0)
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -70,7 +70,20 @@ const GoodRateChart = (props) => {
|
|||||||
</Radio.Button>
|
</Radio.Button>
|
||||||
</Radio.Group>
|
</Radio.Group>
|
||||||
</div>
|
</div>
|
||||||
<ReactECharts key={updateKey} option={options} />
|
{options && <ReactECharts key={updateKey} option={options} />}
|
||||||
|
{!options && (
|
||||||
|
<p
|
||||||
|
style={{
|
||||||
|
paddingTop: "88px",
|
||||||
|
color: "#fffc",
|
||||||
|
textAlign: "center",
|
||||||
|
fontSize: "24px",
|
||||||
|
userSelect: "none",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
暂无数据
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@ -79,6 +92,13 @@ export default GoodRateChart;
|
|||||||
|
|
||||||
function getOptions(dataList, showMore, dateType) {
|
function getOptions(dataList, showMore, dateType) {
|
||||||
const list = [...dataList].sort((a, b) => a.dataTime - b.dataTime);
|
const list = [...dataList].sort((a, b) => a.dataTime - b.dataTime);
|
||||||
|
|
||||||
|
console.log(
|
||||||
|
"list ",
|
||||||
|
list.filter((item) => item.sum)
|
||||||
|
);
|
||||||
|
if (list.length === 0 || list.filter((item) => item.sum).length == 0)
|
||||||
|
return null;
|
||||||
// data: Array(7)
|
// data: Array(7)
|
||||||
// .fill(1)
|
// .fill(1)
|
||||||
// .map((_, index) => {
|
// .map((_, index) => {
|
||||||
@ -140,7 +160,7 @@ function getOptions(dataList, showMore, dateType) {
|
|||||||
};
|
};
|
||||||
const seriesTeam = [
|
const seriesTeam = [
|
||||||
{
|
{
|
||||||
name: '白班',
|
name: "白班",
|
||||||
data: list.map((item) => (item.day * 100).toFixed(2)),
|
data: list.map((item) => (item.day * 100).toFixed(2)),
|
||||||
type: "line",
|
type: "line",
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
@ -153,7 +173,7 @@ function getOptions(dataList, showMore, dateType) {
|
|||||||
// smooth: true,
|
// smooth: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '夜班',
|
name: "夜班",
|
||||||
data: list.map((item) => (item.night * 100).toFixed(2)),
|
data: list.map((item) => (item.night * 100).toFixed(2)),
|
||||||
type: "line",
|
type: "line",
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
@ -175,7 +195,9 @@ function getOptions(dataList, showMore, dateType) {
|
|||||||
trigger: "axis",
|
trigger: "axis",
|
||||||
color: "#fff",
|
color: "#fff",
|
||||||
// formatter: "{b} {c}%",
|
// formatter: "{b} {c}%",
|
||||||
formatter: showMore ? "{a0} {c0}%<br />{a1} {c1}%<br />{a2} {c2}%" : "{b} {c}%",
|
formatter: showMore
|
||||||
|
? "{a0} {c0}%<br />{a1} {c1}%<br />{a2} {c2}%"
|
||||||
|
: "{b} {c}%",
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: "shadow",
|
type: "shadow",
|
||||||
},
|
},
|
||||||
@ -187,10 +209,12 @@ function getOptions(dataList, showMore, dateType) {
|
|||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '总量',
|
name: "总量",
|
||||||
data: list.map((item) => (item.sum * 100).toFixed(2)),
|
data: list.map((item) =>
|
||||||
|
item.sum != null ? (item.sum * 100).toFixed(2) : "-- "
|
||||||
|
),
|
||||||
type: "line",
|
type: "line",
|
||||||
symbol: 'circle',
|
symbol: "circle",
|
||||||
symbolSize: 6,
|
symbolSize: 6,
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
|
@ -4,7 +4,7 @@ import { ScrollBoard } from "@jiaminghi/data-view-react";
|
|||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
|
|
||||||
function getRate(decimal) {
|
function getRate(decimal) {
|
||||||
return (decimal.toFixed(2) * 100).toFixed(2) + "%";
|
return decimal != null ? (decimal.toFixed(2) * 100).toFixed(2) + "%" : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
const TodayTableData = (props) => {
|
const TodayTableData = (props) => {
|
||||||
@ -57,14 +57,14 @@ const TodayTableData = (props) => {
|
|||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<div className={cls.todayTableData}>
|
<div className={cls.todayTableData}>
|
||||||
{config.data.lenght != 0 && (
|
{config.data.length != 0 && (
|
||||||
<ScrollBoard
|
<ScrollBoard
|
||||||
className={cls.paddingCeil}
|
className={cls.paddingCeil}
|
||||||
config={config}
|
config={config}
|
||||||
style={{ width: "100%", color: "#fffc" }}
|
style={{ width: "100%", color: "#fffc" }}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{config.data.lenght == 0 && (
|
{config.data.length == 0 && (
|
||||||
<p
|
<p
|
||||||
style={{
|
style={{
|
||||||
color: "#cccf",
|
color: "#cccf",
|
||||||
|
@ -82,7 +82,11 @@ function NO(props) {
|
|||||||
export default NO;
|
export default NO;
|
||||||
|
|
||||||
function getOptions(source, period, trend) {
|
function getOptions(source, period, trend) {
|
||||||
if (trend[source].length == 0) return null;
|
if (
|
||||||
|
trend[source].length == 0 ||
|
||||||
|
trend[source].filter((item) => item.value).length == 0
|
||||||
|
)
|
||||||
|
return null;
|
||||||
return {
|
return {
|
||||||
color: ["#FFD160", "#12FFF5", "#2760FF"],
|
color: ["#FFD160", "#12FFF5", "#2760FF"],
|
||||||
grid: { top: 40, right: 12, bottom: 20, left: 64 },
|
grid: { top: 40, right: 12, bottom: 20, left: 64 },
|
||||||
@ -141,7 +145,11 @@ function getOptions(source, period, trend) {
|
|||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
data: trend[source].map((item) => !(item.value == null || isNaN(+item.value)) ? (+item.value).toFixed(2) : null),
|
data: trend[source].map((item) =>
|
||||||
|
!(item.value == null || isNaN(+item.value))
|
||||||
|
? (+item.value).toFixed(2)
|
||||||
|
: null
|
||||||
|
),
|
||||||
type: "line",
|
type: "line",
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
|
@ -82,7 +82,11 @@ function Dust(props) {
|
|||||||
export default Dust;
|
export default Dust;
|
||||||
|
|
||||||
function getOptions(source, period, trend) {
|
function getOptions(source, period, trend) {
|
||||||
if (trend[source].length == 0) return null;
|
if (
|
||||||
|
trend[source].length == 0 ||
|
||||||
|
trend[source].filter((item) => item.value).length == 0
|
||||||
|
)
|
||||||
|
return null;
|
||||||
return {
|
return {
|
||||||
color: ["#FFD160", "#12FFF5", "#2760FF"],
|
color: ["#FFD160", "#12FFF5", "#2760FF"],
|
||||||
grid: { top: 40, right: 12, bottom: 20, left: 64 },
|
grid: { top: 40, right: 12, bottom: 20, left: 64 },
|
||||||
@ -142,7 +146,11 @@ function getOptions(source, period, trend) {
|
|||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
// (isNaN((+"f")) ? 0 : (+"f")).toFixed(2)
|
// (isNaN((+"f")) ? 0 : (+"f")).toFixed(2)
|
||||||
data: trend[source].map((item) => !(item.value == null || isNaN(+item.value)) ? (+item.value).toFixed(2) : null),
|
data: trend[source].map((item) =>
|
||||||
|
!(item.value == null || isNaN(+item.value))
|
||||||
|
? (+item.value).toFixed(2)
|
||||||
|
: null
|
||||||
|
),
|
||||||
type: "line",
|
type: "line",
|
||||||
symbol: "circle",
|
symbol: "circle",
|
||||||
symbolSize: 6,
|
symbolSize: 6,
|
||||||
|
@ -82,7 +82,11 @@ function Oxygen(props) {
|
|||||||
export default Oxygen;
|
export default Oxygen;
|
||||||
|
|
||||||
function getOptions(source, period, trend) {
|
function getOptions(source, period, trend) {
|
||||||
if (trend[source].length == 0) return null;
|
if (
|
||||||
|
trend[source].length == 0 ||
|
||||||
|
trend[source].filter((item) => item.value).length == 0
|
||||||
|
)
|
||||||
|
return null;
|
||||||
return {
|
return {
|
||||||
color: ["#FFD160", "#12FFF5", "#2760FF"],
|
color: ["#FFD160", "#12FFF5", "#2760FF"],
|
||||||
grid: { top: 40, right: 12, bottom: 20, left: 80 },
|
grid: { top: 40, right: 12, bottom: 20, left: 80 },
|
||||||
@ -143,7 +147,11 @@ function getOptions(source, period, trend) {
|
|||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
data: trend[source].map((item) => !(item.value == null || isNaN(+item.value)) ? (+item.value).toFixed(2) : null),
|
data: trend[source].map((item) =>
|
||||||
|
!(item.value == null || isNaN(+item.value))
|
||||||
|
? (+item.value).toFixed(2)
|
||||||
|
: null
|
||||||
|
),
|
||||||
type: "line",
|
type: "line",
|
||||||
symbol: "circle",
|
symbol: "circle",
|
||||||
symbolSize: 6,
|
symbolSize: 6,
|
||||||
|
@ -81,7 +81,11 @@ function SO2(props) {
|
|||||||
export default SO2;
|
export default SO2;
|
||||||
|
|
||||||
function getOptions(source, period, trend) {
|
function getOptions(source, period, trend) {
|
||||||
if (trend[source].length == 0) return null;
|
if (
|
||||||
|
trend[source].length == 0 ||
|
||||||
|
trend[source].filter((item) => item.value).length == 0
|
||||||
|
)
|
||||||
|
return null;
|
||||||
return {
|
return {
|
||||||
color: ["#FFD160", "#12FFF5", "#2760FF"],
|
color: ["#FFD160", "#12FFF5", "#2760FF"],
|
||||||
grid: { top: 40, right: 12, bottom: 20, left: 64 },
|
grid: { top: 40, right: 12, bottom: 20, left: 64 },
|
||||||
|
@ -28,7 +28,20 @@ function CurrentSpec(props) {
|
|||||||
<div className={cls.CenterChart1itemDetailBorder} style={{ opacity: 0.75 }}>
|
<div className={cls.CenterChart1itemDetailBorder} style={{ opacity: 0.75 }}>
|
||||||
<h2 className={cls.CenterChart1itemTXT}>当前产线生产规格</h2>
|
<h2 className={cls.CenterChart1itemTXT}>当前产线生产规格</h2>
|
||||||
<div className={cls.TableContainer}>
|
<div className={cls.TableContainer}>
|
||||||
<ScrollBoard config={config} />
|
{config.data.length !== 0 && <ScrollBoard config={config} style={{}} />}
|
||||||
|
{config.data.length === 0 && (
|
||||||
|
<p
|
||||||
|
style={{
|
||||||
|
color: "#cccf",
|
||||||
|
fontSize: "24px",
|
||||||
|
userSelect: "none",
|
||||||
|
textAlign: "center",
|
||||||
|
paddingTop: "36px",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
暂无数据
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -3,6 +3,7 @@ import { createSlice } from "@reduxjs/toolkit";
|
|||||||
export const initialState = {
|
export const initialState = {
|
||||||
table: [],
|
table: [],
|
||||||
productData: [],
|
productData: [],
|
||||||
|
productHourData: [],
|
||||||
chart: {
|
chart: {
|
||||||
year: [],
|
year: [],
|
||||||
week: [],
|
week: [],
|
||||||
@ -17,6 +18,8 @@ const cuttingSlice = createSlice({
|
|||||||
reducers: {
|
reducers: {
|
||||||
setCuttingTable: (state, action) => {
|
setCuttingTable: (state, action) => {
|
||||||
if ("data" in action.payload) state.table = action.payload.data;
|
if ("data" in action.payload) state.table = action.payload.data;
|
||||||
|
if ("productHourData" in action.payload)
|
||||||
|
state.productHourData = action.payload.productHourData;
|
||||||
if ("productData" in action.payload)
|
if ("productData" in action.payload)
|
||||||
state.productData = action.payload.productData;
|
state.productData = action.payload.productData;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user