Merge remote-tracking branch 'origin/master'

yangwl
Yangwl 5 months ago
commit 9d70b0ba8b

@ -16,6 +16,14 @@ export function getMesBoardEquProductionToday(data) {
data: data data: data
}); });
} }
// 获取产量数据
export function getWhiteBoardEquPro7Days(data) {
return request({
url: '/mes/wcsInterface/getWhiteBoardEquPro7Days',
method: 'post',
data: data
});
}
// 获取班次 // 获取班次
export function getBoardShifts(data) { export function getBoardShifts(data) {
return request({ return request({

@ -0,0 +1,258 @@
<template>
<div class="chart-container">
<div class="chart" :class="{ activehide: isActive }" ref="chart"></div>
<!-- 底座背景 -->
</div>
</template>
<script>
import { getPie3D, getParametricEquation } from "../../../utils/echart.js"; //js
const color = ["#005aff", "#f8b551"];
import * as echarts from "echarts";
export default {
name: "chart",
props: ["xAxis4data", "yAxis4seriesMAX1", "yAxis4seriesMAX2", "series4data"],
data() {
return {
optionData: [],
statusChart: null,
option: {},
isActive: false,
// color:["#005aff", "#f8b551",'#7CDCAC'],
};
},
watch: {
xAxis4data: function (newVal, oldVal) {
this.initChart();
},
colorlist: function (newVal, oldVal) {},
},
created() {
// console.log(this.list);
// this.color = this.colorlist
},
mounted() {
// this.setLabel();
// this.initChart();
//
const that = this;
window.onresize = function () {
that.changeSize();
};
},
methods: {
// label
setLabel() {
const that = this;
this.optionData = this.list;
this.optionData.forEach((item, index) => {
// item.itemStyle = {
// color: that.color[index],
// };
item.label = {
normal: {
show: true,
// color: that.color[index],
formatter: ["{b|{b}}:", "{d|{d}%}"].join(""), // \n
rich: {
b: {
color: "#fff",
lineHeight: 25,
align: "left",
},
c: {
fontSize: 22,
color: "#fff",
textShadowColor: "#1c90a6",
textShadowOffsetX: 0,
textShadowOffsetY: 2,
textShadowBlur: 5,
},
d: {
color: "#fff",
align: "left",
textShadowOffsetX: 0,
textShadowOffsetY: 2,
textShadowBlur: 5,
},
},
},
};
item.labelLine = {
normal: {
lineStyle: {
width: 1,
color: "rgba(255,255,255,0.7)",
},
},
};
});
},
//
initChart() {
console.log(this.xAxisdata1,'w222111')
this.statusChart = echarts.init(this.$refs.chart);
// option, 3d,
this.option = {
tooltip: {
trigger: "item",
axisPointer: {
//
type: "shadow", // 线'line' | 'shadow'
},
},
grid: {
left: "4%",
right: "4%",
bottom: "2%",
top: "6%",
containLabel: true,
},
legend: {
// data: ["", "", "", ""],
// left: "7%",
// top: "5%",
// textStyle: {
// color: "#ffffff",
// },
// itemWidth: 15,
// itemHeight: 10,
// itemGap: 25,
},
xAxis: {
type: "category",
data: this.xAxis4data,
axisLine: {
lineStyle: {
color: "#cdd5e2",
},
},
axisLabel: {
textStyle: {
color: "#666666",
},
},
axisLabel: {
//show:false,
color: "#7785D9",
fontSize: 12,
rotate: "45",
},
},
yAxis: [
{
type: "value",
splitLine: {
show: false,
},
axisLabel: {
textStyle: {
color: "#ffffff",
},
},
axisLine: {
lineStyle: {
color: "#cdd5e2",
},
},
axisLine: {
show: false,
lineStyle: {
color: "#e0e7ff",
},
},
max: this.yAxis4seriesMAX1,
},
// {
// type: "value",
// name: "",
// nameTextStyle: {
// color: "#ffffff",
// },
// position: "right",
// axisLine: {
// lineStyle: {
// color: "#cdd5e2",
// },
// },
// splitLine: {
// show: false,
// },
// axisLabel: {
// show: true,
// formatter: "{value} %", //Y
// textStyle: {
// color: "#ffffff",
// },
// },
// max: this.yAxis2seriesMAX,
// },
],
series: [
{
name: "",
type: "bar",
barWidth: "12px",
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "#29acff",
},
{
offset: 1,
color: "#4bdfff",
},
]),
barBorderRadius: 6,
},
},
data: this.series4data,
},
],
};
this.statusChart.setOption(this.option);
},
//
// optionNameoptionopiton
//
changeSize() {
this.statusChart.resize();
},
},
};
</script>
<style lang='scss' scoped>
.chart-container {
position: relative;
width: 100%;
height: 100%;
.chart,
.bg {
width: 100%;
height: 100%;
}
.bg {
position: absolute;
bottom: 50px;
left: 50%;
z-index: -1;
width: 180px;
height: 73px;
background: no-repeat center;
background-image: url("https://ks3-cn-beijing.ksyun.com/sxjg-elevator/datav-platform-2.0/images/chart_opacity_bg.png");
background-size: 100% 100%;
transform: translateX(-50%);
}
}
.activehide {
display: none;
}
</style>

@ -0,0 +1,299 @@
<template>
<div class="chart-container">
<div class="chart" :class="{ activehide: isActive }" ref="chart"></div>
<!-- 底座背景 -->
</div>
</template>
<script>
import { getPie3D, getParametricEquation } from "../../../utils/echart.js"; //js
const color = ["#005aff", "#f8b551"];
import * as echarts from "echarts";
export default {
name: "chart",
props: ["xAxis1data", "yAxis1seriesMAX1", "yAxis1seriesMAX2", "series1data1", "series1data2", "series1data3"],
data() {
return {
optionData: [],
statusChart: null,
option: {},
isActive: false,
// color:["#005aff", "#f8b551",'#7CDCAC'],
};
},
watch: {
xAxis1data: function (newVal, oldVal) {
this.initChart();
},
colorlist: function (newVal, oldVal) {},
},
created() {
// console.log(this.list);
// this.color = this.colorlist
},
mounted() {
// this.setLabel();
// this.initChart();
//
const that = this;
window.onresize = function () {
that.changeSize();
};
},
methods: {
// label
setLabel() {
const that = this;
this.optionData = this.list;
this.optionData.forEach((item, index) => {
// item.itemStyle = {
// color: that.color[index],
// };
item.label = {
normal: {
show: true,
// color: that.color[index],
formatter: ["{b|{b}}:", "{d|{d}%}"].join(""), // \n
rich: {
b: {
color: "#fff",
lineHeight: 25,
align: "left",
},
c: {
fontSize: 22,
color: "#fff",
textShadowColor: "#1c90a6",
textShadowOffsetX: 0,
textShadowOffsetY: 2,
textShadowBlur: 5,
},
d: {
color: "#fff",
align: "left",
textShadowOffsetX: 0,
textShadowOffsetY: 2,
textShadowBlur: 5,
},
},
},
};
item.labelLine = {
normal: {
lineStyle: {
width: 1,
color: "rgba(255,255,255,0.7)",
},
},
};
});
},
//
initChart() {
console.log(this.xAxisdata1,'w222111')
this.statusChart = echarts.init(this.$refs.chart);
// option, 3d,
this.option = {
tooltip: {
trigger: "item",
axisPointer: {
//
type: "shadow", // 线'line' | 'shadow'
},
},
grid: {
left: "4%",
right: "4%",
bottom: "2%",
top: "6%",
containLabel: true,
},
legend: {
// data: ["", "", "", ""],
// left: "7%",
// top: "5%",
// textStyle: {
// color: "#ffffff",
// },
// itemWidth: 15,
// itemHeight: 10,
// itemGap: 25,
},
xAxis: {
type: "category",
data: this.xAxis1data,
axisLine: {
lineStyle: {
color: "#cdd5e2",
},
},
axisLabel: {
textStyle: {
color: "#666666",
},
},
axisLabel: {
//show:false,
color: "#7785D9",
fontSize: 12,
rotate: "45",
},
},
yAxis: [
{
type: "value",
splitLine: {
show: false,
},
axisLabel: {
textStyle: {
color: "#ffffff",
},
},
axisLine: {
lineStyle: {
color: "#cdd5e2",
},
},
axisLine: {
show: false,
lineStyle: {
color: "#e0e7ff",
},
},
max: this.yAxis1seriesMAX1,
},
{
type: "value",
name: "百分比",
nameTextStyle: {
color: "#ffffff",
},
position: "right",
axisLine: {
lineStyle: {
color: "#cdd5e2",
},
},
splitLine: {
show: false,
},
axisLabel: {
show: true,
formatter: "{value} %", //Y
textStyle: {
color: "#ffffff",
},
},
max: this.yAxis1seriesMAX2,
},
],
series: [
{
//name: "",
type: "bar",
barWidth: "12px",
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "#29acff",
},
{
offset: 1,
color: "#4bdfff",
},
]),
barBorderRadius: 6,
},
},
data: this.series1data1,
},
{
//name: "",
type: "bar",
barWidth: "12px",
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "#3d93f2",
},
{
offset: 1,
color: "#5dc1fd",
},
]),
barBorderRadius: 6,
},
},
data: this.series1data2,
},
{
//name: "",
type: "line",
yAxisIndex: 1, //使 y index y
smooth: false, //线
symbol: "circle", //
symbolSize: 8, //
itemStyle: {
normal: {
color: "#ffa43a",
borderColor: "rgba(255, 234, 0, 0.5)", //
borderWidth: 5,
},
},
lineStyle: {
color: "#ffa43a",
},
data: this.series1data3,
},
],
};
this.statusChart.setOption(this.option);
},
//
// optionNameoptionopiton
//
changeSize() {
this.statusChart.resize();
},
},
};
</script>
<style lang='scss' scoped>
.chart-container {
position: relative;
width: 100%;
height: 100%;
.chart,
.bg {
width: 100%;
height: 100%;
}
.bg {
position: absolute;
bottom: 50px;
left: 50%;
z-index: -1;
width: 180px;
height: 73px;
background: no-repeat center;
background-image: url("https://ks3-cn-beijing.ksyun.com/sxjg-elevator/datav-platform-2.0/images/chart_opacity_bg.png");
background-size: 100% 100%;
transform: translateX(-50%);
}
}
.activehide {
display: none;
}
</style>

@ -60,14 +60,14 @@
<div class="content"> <div class="content">
<div class="item"> <div class="item">
<div class="titlebox"> <div class="titlebox">
<div class="titlename">湿料罐总产量</div> <div class="titlename">下料口接料次数</div>
</div> </div>
<div class="item-num"> <div class="item-num">
<img src="../../../assets/images/bg-zongchaliang.png" alt="" /> <img src="../../../assets/images/bg-zongchaliang.png" alt="" />
<div class="number">{{ number4 }}</div> <div class="number">{{ number4 }}</div>
</div> </div>
<div class="titlebox"> <div class="titlebox">
<div class="titlename">湿料罐产量</div> <div class="titlename">接料次数</div>
</div> </div>
<div class="echartsbox"> <div class="echartsbox">
<div <div
@ -76,14 +76,24 @@
></div> ></div>
</div> </div>
<div class="titlebox"> <div class="titlebox">
<div class="titlename">湿料罐产量占比</div> <div class="titlename">下料口放料次数</div>
</div> </div>
<div class="echartsbox echartspie"> <div class="echartsbox echartspie">
<Echarts3D <!-- <Echarts3D
:list="optionDatalist4" :list="optionDatalist4"
:colorlist="colorlist" :colorlist="colorlist"
style="margin: auto; width: 409.17px; height: 173px" style="margin: auto; width: 409.17px; height: 173px"
></Echarts3D> ></Echarts3D> -->
<!-- <div
id="echartbar1"
style="margin: auto; width: 409.17px; height: 173px"
></div> -->
<Echarts3dbar
:xAxis4data="xAxis4data"
:yAxis4seriesMAX1="yAxis4seriesMAX1"
:series4data="series4data"
style="margin: auto; width: 409.17px; height: 173px"
></Echarts3dbar>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
@ -104,14 +114,18 @@
></div> ></div>
</div> </div>
<div class="titlebox"> <div class="titlebox">
<div class="titlename">成型机产量占比</div> <div class="titlename">成型机计划达成率</div>
</div> </div>
<div class="echartsbox echartspie"> <div class="echartsbox echartspie">
<Echarts3D <Echarts3dbar2
:list="optionDatalist1" :xAxis1data="xAxis1data"
:colorlist="colorlist" :yAxis1seriesMAX1="yAxis1seriesMAX1"
style="margin: auto; width: 439.17px; height: 183px" :yAxis1seriesMAX2="yAxis1seriesMAX2"
></Echarts3D> :series1data1="series1data1"
:series1data2="series1data2"
:series1data3="series1data3"
style="margin: auto; width: 409.17px; height: 173px"
></Echarts3dbar2>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
@ -132,14 +146,18 @@
></div> ></div>
</div> </div>
<div class="titlebox"> <div class="titlebox">
<div class="titlename">烘房产量占比</div> <div class="titlename">烘房产量及达成率</div>
</div> </div>
<div class="echartsbox echartspie"> <div class="echartsbox echartspie">
<Echarts3D <Echarts3dbar2
:list="optionDatalist2" :xAxis1data="xAxis2data"
:colorlist="colorlist" :yAxis1seriesMAX1="yAxis2seriesMAX1"
:yAxis1seriesMAX2="yAxis2seriesMAX2"
:series1data1="series2data1"
:series1data2="series2data2"
:series1data3="series2data3"
style="margin: auto; width: 409.17px; height: 173px" style="margin: auto; width: 409.17px; height: 173px"
></Echarts3D> ></Echarts3dbar2>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
@ -160,14 +178,18 @@
></div> ></div>
</div> </div>
<div class="titlebox"> <div class="titlebox">
<div class="titlename">收坯机产量占比</div> <div class="titlename">收坯机产量及达成率</div>
</div> </div>
<div class="echartsbox echartspie"> <div class="echartsbox echartspie">
<Echarts3D <Echarts3dbar2
:list="optionDatalist3" :xAxis1data="xAxis3data"
:colorlist="colorlist" :yAxis1seriesMAX1="yAxis3seriesMAX1"
:yAxis1seriesMAX2="yAxis3seriesMAX2"
:series1data1="series3data1"
:series1data2="series3data2"
:series1data3="series3data3"
style="margin: auto; width: 409.17px; height: 173px" style="margin: auto; width: 409.17px; height: 173px"
></Echarts3D> ></Echarts3dbar2>
</div> </div>
</div> </div>
@ -182,20 +204,23 @@
import { import {
getBoardFactory, getBoardFactory,
getMesBoardEquProductionToday, getMesBoardEquProductionToday,
getWhiteBoardEquPro7Days,
getBoardShifts, getBoardShifts,
} from "@/api/kanban/dailyoutput"; } from "@/api/kanban/dailyoutput";
import { import { getDeviceRefreshTime } from "@/api/kanban/equipment";
getDeviceRefreshTime,
} from "@/api/kanban/equipment";
import * as echarts from "echarts"; import * as echarts from "echarts";
import moment from "moment"; import moment from "moment";
import Echarts3D from "./echarts3d.vue"; import Echarts3D from "./echarts3d.vue";
import Echarts3D2 from "./echarts3d2.vue"; import Echarts3D2 from "./echarts3d2.vue";
import Echarts3dbar from "./echarts3dbar.vue";
import Echarts3dbar2 from "./echarts3dbar2.vue";
export default { export default {
name: "Index", name: "Index",
components: { components: {
Echarts3D, Echarts3D,
Echarts3D2, Echarts3D2,
Echarts3dbar,
Echarts3dbar2,
}, },
data() { data() {
return { return {
@ -226,10 +251,37 @@ export default {
colorlist: ["#005aff", "#f8b551"], colorlist: ["#005aff", "#f8b551"],
datetime: null, datetime: null,
time1: null, time1: null,
RefreshTime:null, RefreshTime: null,
Chart2yAxisMAX1: "",
Chart2yAxisMAX2: 100,
Chart2seriesdata: [],
Chart2seriesMAX: [],
Chart2xAxisname: [],
xAxis1data: [],
yAxis1seriesMAX1: 0,
yAxis1seriesMAX2: 0,
series1data1: [],
series1data2: [],
series1data3: [],
xAxis2data: [],
yAxis2seriesMAX1: 0,
yAxis2seriesMAX2: 0,
series2data1: [],
series2data2: [],
series2data3: [],
xAxis3data: [],
yAxis3seriesMAX1: 0,
yAxis3seriesMAX2: 0,
series3data1: [],
series3data2: [],
series3data3: [],
xAxis4data: [],
yAxis4seriesMAX1: 0,
series4data: [],
}; };
}, },
created() {}, created() {},
destroyed() { destroyed() {
clearInterval(this.time1); clearInterval(this.time1);
this.time1 = null; this.time1 = null;
@ -252,6 +304,7 @@ export default {
}, },
selectFactorylist() { selectFactorylist() {
const _this = this; const _this = this;
getBoardFactory({ getBoardFactory({
factory: null, factory: null,
}).then((response) => { }).then((response) => {
@ -266,7 +319,7 @@ export default {
_this.classesList = response.data; _this.classesList = response.data;
_this.selectxtclasses = _this.classesList[0].shiftId; _this.selectxtclasses = _this.classesList[0].shiftId;
_this.initChart1(); _this.initChart1();
_this.getDeviceRefreshTime() _this.getDeviceRefreshTime();
} }
}); });
} }
@ -276,11 +329,11 @@ export default {
const _this = this; const _this = this;
getDeviceRefreshTime().then((response) => { getDeviceRefreshTime().then((response) => {
if (response.data) { if (response.data) {
console.log(response.data) console.log(response.data);
this.RefreshTime = response.data this.RefreshTime = response.data;
this.time1 = setInterval(() => { this.time1 = setInterval(() => {
_this.initChart1(); _this.initChart1();
}, 1000*60*this.RefreshTime); }, 1000 * 60 * this.RefreshTime);
} }
}); });
}, },
@ -307,7 +360,7 @@ export default {
}, },
xAxis: { xAxis: {
name: "辆", name: "辆",
max: '100', max: "100",
splitLine: { splitLine: {
show: false, show: false,
}, },
@ -388,6 +441,31 @@ export default {
], ],
}; };
myChart1.setOption(option1); myChart1.setOption(option1);
getWhiteBoardEquPro7Days({
factory: _this.selectxt,
shiftId: _this.selectxtclasses,
ymd: _this.datetime,
equTypeCode: "equ_type_cxj",
}).then((response) => {
if (response) {
if (response.data) {
_this.xAxis1data = response.data.dayNames;
_this.series1data1 = response.data.plans;
_this.series1data2 = response.data.acts;
_this.series1data3 = response.data.finishRatio;
let MAX1 = 0;
let MAX2 = 0;
MAX1 = Math.max(..._this.series1data1);
MAX2 = Math.max(..._this.series1data2);
if (MAX1 > MAX2) {
_this.yAxis1seriesMAX1 = MAX1;
} else {
_this.yAxis1seriesMAX1 = MAX2;
}
_this.yAxis1seriesMAX2 = Math.max(..._this.series1data3);
}
}
});
getMesBoardEquProductionToday({ getMesBoardEquProductionToday({
factory: _this.selectxt, factory: _this.selectxt,
shiftId: _this.selectxtclasses, shiftId: _this.selectxtclasses,
@ -415,41 +493,10 @@ export default {
dataoption.push(a); dataoption.push(a);
numberlist.push(item.totalNum); numberlist.push(item.totalNum);
}); });
// response.data.everyNum.forEach((item) => {
// let a = {}; // dataoption.sort((a, b) => {
// a.name = item.equName; // return a.value - b.value;
// a.value = item.totalNum;
// a.code = item.equCode;
// dataoption.push(a);
// _this.optionDatalist1.push(a);
// });
// response.data.everyNum.forEach((item) => {
// let a = {};
// a.name = item.equName;
// a.value = item.totalNum;
// a.code = item.equCode;
// dataoption.push(a);
// _this.optionDatalist1.push(a);
// });
// response.data.everyNum.forEach((item) => {
// let a = {};
// a.name = item.equName;
// a.value = item.totalNum;
// a.code = item.equCode;
// dataoption.push(a);
// _this.optionDatalist1.push(a);
// });
// response.data.everyNum.forEach((item) => {
// let a = {};
// a.name = item.equName;
// a.value = item.totalNum;
// a.code = item.equCode;
// dataoption.push(a);
// _this.optionDatalist1.push(a);
// }); // });
dataoption.sort((a, b) => {
return a.value - b.value;
});
let max = Math.max(...numberlist); let max = Math.max(...numberlist);
max = max + 100; max = max + 100;
dataoption.forEach((item) => { dataoption.forEach((item) => {
@ -621,6 +668,32 @@ export default {
], ],
}; };
myChart2.setOption(option2); myChart2.setOption(option2);
getWhiteBoardEquPro7Days({
factory: _this.selectxt,
shiftId: _this.selectxtclasses,
ymd: _this.datetime,
equTypeCode: "equ_type_hf",
}).then((response) => {
if (response) {
if (response.data) {
_this.xAxis2data = response.data.dayNames;
_this.series2data1 = response.data.plans;
_this.series2data2 = response.data.acts;
_this.series2data3 = response.data.finishRatio;
let MAX1 = 0;
let MAX2 = 0;
MAX1 = Math.max(..._this.series2data1);
MAX2 = Math.max(..._this.series2data2);
if (MAX1 > MAX2) {
_this.yAxis2seriesMAX1 = MAX1;
} else {
_this.yAxis2seriesMAX1 = MAX2;
}
_this.yAxis2seriesMAX2 = Math.max(..._this.series2data3);
}
}
});
getMesBoardEquProductionToday({ getMesBoardEquProductionToday({
factory: _this.selectxt, factory: _this.selectxt,
shiftId: _this.selectxtclasses, shiftId: _this.selectxtclasses,
@ -646,9 +719,9 @@ export default {
dataoption.push(a); dataoption.push(a);
numberlist.push(item.totalNum); numberlist.push(item.totalNum);
}); });
dataoption.sort((a, b) => { // dataoption.sort((a, b) => {
return a.value - b.value; // return a.value - b.value;
}); // });
let max = Math.max(...numberlist); let max = Math.max(...numberlist);
max = max + 100; max = max + 100;
dataoption.forEach((item) => { dataoption.forEach((item) => {
@ -814,6 +887,31 @@ export default {
], ],
}; };
myChart3.setOption(option3); myChart3.setOption(option3);
getWhiteBoardEquPro7Days({
factory: _this.selectxt,
shiftId: _this.selectxtclasses,
ymd: _this.datetime,
equTypeCode: "equ_type_spj",
}).then((response) => {
if (response) {
if (response.data) {
_this.xAxis3data = response.data.dayNames;
_this.series3data1 = response.data.plans;
_this.series3data2 = response.data.acts;
_this.series3data3 = response.data.finishRatio;
let MAX1 = 0;
let MAX2 = 0;
MAX1 = Math.max(..._this.series3data1);
MAX2 = Math.max(..._this.series3data2);
if (MAX1 > MAX2) {
_this.yAxis3seriesMAX1 = MAX1;
} else {
_this.yAxis3seriesMAX1 = MAX2;
}
_this.yAxis3seriesMAX2 = Math.max(..._this.series3data3);
}
}
});
getMesBoardEquProductionToday({ getMesBoardEquProductionToday({
factory: _this.selectxt, factory: _this.selectxt,
shiftId: _this.selectxtclasses, shiftId: _this.selectxtclasses,
@ -840,9 +938,9 @@ export default {
dataoption.push(a); dataoption.push(a);
numberlist.push(item.totalNum); numberlist.push(item.totalNum);
}); });
dataoption.sort((a, b) => { // dataoption.sort((a, b) => {
return a.value - b.value; // return a.value - b.value;
}); // });
let max = Math.max(...numberlist); let max = Math.max(...numberlist);
max = max + 100; max = max + 100;
dataoption.forEach((item) => { dataoption.forEach((item) => {
@ -926,8 +1024,8 @@ export default {
}, },
}, },
xAxis: { xAxis: {
name: "", name: "次数",
max: 30, max: 100,
splitLine: { splitLine: {
show: false, show: false,
}, },
@ -1020,11 +1118,15 @@ export default {
let dataoption = []; let dataoption = [];
let totalArr = []; let totalArr = [];
_this.optionDatalist4 = []; _this.optionDatalist4 = [];
_this.series4data = [];
_this.xAxis4data = [];
if (response.data.totalNum.length > 0) { if (response.data.totalNum.length > 0) {
_this.number4 = response.data.totalNum[0].totalNum; _this.number4 = response.data.totalNum[0].totalNum;
} }
if (response.data.everyNum.length > 0) { if (response.data.everyNum.length > 0) {
response.data.everyNum.forEach((item) => { response.data.everyNum.forEach((item) => {
this.series4data.push(item.totalNum);
this.xAxis4data.push(item.equName);
let a = {}; let a = {};
a.name = item.equName; a.name = item.equName;
a.value = item.totalNum; a.value = item.totalNum;
@ -1033,9 +1135,10 @@ export default {
dataoption.push(a); dataoption.push(a);
numberlist.push(item.totalNum); numberlist.push(item.totalNum);
}); });
dataoption.sort((a, b) => { this.yAxis4seriesMAX1 = Math.max(...this.series4data);
return a.value - b.value; // dataoption.sort((a, b) => {
}); // return a.value - b.value;
// });
let max = Math.max(...numberlist); let max = Math.max(...numberlist);
max = max + 100; max = max + 100;
dataoption.forEach((item) => { dataoption.forEach((item) => {

@ -438,8 +438,8 @@
:show-overflow-tooltip="true" :formatter="productCodeFormate" /> :show-overflow-tooltip="true" :formatter="productCodeFormate" />
<el-table-column label="物料名称" width="280" align="left" prop="materialName" <el-table-column label="物料名称" width="280" align="left" prop="materialName"
:show-overflow-tooltip="true" /> :show-overflow-tooltip="true" />
<el-table-column label="BOM组件用量" width="110" align="left" prop="planQuantity" />
<el-table-column label="单位数量" align="center" prop="erfmg" :show-overflow-tooltip="true"/> <el-table-column label="Bom用量" width="100" align="left" prop="quantitySplitBom" />
<el-table-column label="条目单位" align="center" prop="erfme" /> <el-table-column label="条目单位" align="center" prop="erfme" />
<el-table-column label="实际用量" width="150" align="left" prop="quantity" <el-table-column label="实际用量" width="150" align="left" prop="quantity"
:show-overflow-tooltip="true"> :show-overflow-tooltip="true">
@ -452,7 +452,8 @@
<el-table-column label="单位" width="50" align="center" prop="unit" /> <el-table-column label="单位" width="50" align="center" prop="unit" />
<el-table-column label="反冲标识" align="center" prop="recoil" /> <el-table-column label="反冲标识" align="center" prop="recoil" />
<el-table-column label="订单数量" width="80" align="left" prop="quantitySplit" /> <el-table-column label="订单数量" width="80" align="left" prop="quantitySplit" />
<el-table-column label="Bom用量" width="100" align="left" prop="quantitySplitBom" /> <el-table-column label="单位数量" align="center" prop="erfmg" :show-overflow-tooltip="true"/>
<el-table-column label="BOM组件用量" width="110" align="left" prop="planQuantity" />
<el-table-column label="sap项目编码" width="100" align="center" prop="rspos" /> <el-table-column label="sap项目编码" width="100" align="center" prop="rspos" />
<el-table-column label="仓库" width="150" align="center" prop="warehouseCode"> <el-table-column label="仓库" width="150" align="center" prop="warehouseCode">
<template slot-scope="scope"> <template slot-scope="scope">

Loading…
Cancel
Save