Commit f46ff2d4 authored by 仇晓婷's avatar 仇晓婷

ff

parent cacadce6
......@@ -7,4 +7,10 @@ export default {
getpaged(params) {
return Api.post(`${workflowUrl}/instance/getpaged`, params);
},
planorderstatuscount(params) {
return Api.post(`${PlanUrl}/mesplan/planorderstatuscount`, params);
},
orderstatuscount(params) {
return Api.post(`${PlanUrl}/mesorders/orderstatuscount`, params); //订单各车间下各状态的数量
},
}
\ No newline at end of file
......@@ -39,6 +39,7 @@
</div>
</template>
<script>
import Api from "../api";
import ECharts from "vue-echarts";
import echarts from "echarts/lib/echarts";
// import "echarts/lib/chart/pie";
......@@ -50,13 +51,13 @@ import "echarts/lib/component/grid";
export default {
name: "echarts",
components: {
"v-chart": ECharts
"v-chart": ECharts,
},
data() {
return {
value2: "",
braking: {},
braking1: {}
braking1: {},
};
},
mounted() {
......@@ -65,212 +66,239 @@ export default {
},
methods: {
statistics() {
this.braking = {
xAxis: {
// type: "category",
data: ["计划数量", "已完成", "执行中", "暂停中", "未开工"],
axisTick: {
show: false
},
axisLine: {
show: false
let conditions = [
{
fieldName: "status",
fieldValue: "1",
conditionalType: "Equal"
}
];
let data = {
conditions: conditions,
};
Api.planorderstatuscount(data).then((r) => {
var allTotal = "";
var listData = [];
var status = ["计划数量"];
r.result.chidren.map((e) => {
status.push(e.status);
});
allTotal = r.result.allTotal;
listData = r.result.chidren;
this.braking = {
xAxis: {
// type: "category",
data: ['计划数量',],
axisTick: {
show: false,
},
axisLine: {
show: false,
},
axisLabel: {
textStyle: {
color: "#515A6E",
},
},
},
axisLabel: {
textStyle: {
color: "#515A6E"
}
}
},
yAxis: {
splitLine: {
show: true,
lineStyle: {
color: "#eee",
type: "solid"
}
yAxis: {
splitLine: {
show: true,
lineStyle: {
color: "#eee",
type: "solid",
},
},
axisTick: {
show: false,
},
axisLine: {
show: false,
},
axisLabel: {
textStyle: {
color: "#515A6E",
},
},
},
axisTick: {
show: false
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
},
axisLine: {
show: false
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
},
},
axisLabel: {
textStyle: {
color: "#515A6E"
}
}
},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true
},
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow"
}
},
color: ["#73DDFF"],
series: [
{
data: [
{
value: 120,
itemStyle: {
normal: {
color: "#2680EB",
barBorderRadius: [30, 30, 0, 0]
}
}
},
{
value: 60,
itemStyle: {
normal: {
color: "#0DD78D",
barBorderRadius: [30, 30, 0, 0]
}
}
},
{
value: 210,
itemStyle: {
normal: {
color: "#FFA000",
barBorderRadius: [30, 30, 0, 0]
}
}
},
{
value: 210,
itemStyle: {
normal: {
color: "#FE7777",
barBorderRadius: [30, 30, 0, 0]
}
}
},
{
value: 210,
itemStyle: {
normal: {
color: "#515A6E",
barBorderRadius: [30, 30, 0, 0]
}
}
}
],
type: "bar",
barWidth: 10, //柱图宽度
barGap: "-20%" //柱图间距
}
]
};
color: ["#73DDFF"],
series: [
{
data: [
{
value: allTotal,
itemStyle: {
normal: {
color: "#2680EB",
barBorderRadius: [30, 30, 0, 0],
},
},
},
{
value: listData[0].count,
itemStyle: {
normal: {
color: "#0DD78D",
barBorderRadius: [30, 30, 0, 0],
},
},
},
{
value: listData[1].count,
itemStyle: {
normal: {
color: "#FFA000",
barBorderRadius: [30, 30, 0, 0],
},
},
},
{
value: listData[2].count,
itemStyle: {
normal: {
color: "#FE7777",
barBorderRadius: [30, 30, 0, 0],
},
},
},
],
type: "bar",
barWidth: 10, //柱图宽度
barGap: "-20%", //柱图间距
},
],
};
});
},
statistics1() {
this.braking1 = {
color: ["#2680EB", "#0DD78D", "#FFA000", "#FE7777", "#515A6E"],
legend: {
data: ["计划数量", "已完成", "执行中", "暂停中", "未开工"],
top: 12
// textStyle: {
// color: "#515A6E"
// },
// itemWidth: 12,
// itemHeight: 10
},
tooltip: {
trigger: "axis",
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
}
},
grid: {
left: "0",
right: "4%",
bottom: "3%",
containLabel: true
},
let conditions = [];
let data = {
conditions: conditions,
};
Api.orderstatuscount(data).then((r) => {
let listData = [];
let name = [];
let allTotal=[]
listData = r.result;
r.result.map((e) => {
name.push(e.name);
allTotal.push(e.allTotal)
});
xAxis: {
// type: "category",
data: ["三车间", "五车间", "六车间", "七车间"],
axisTick: {
show: false
},
axisLine: {
show: false
this.braking1 = {
color: ["#2680EB", "#0DD78D", "#FFA000", "#FE7777", "#515A6E"],
legend: {
data: ["计划数量", "已完成", "执行中", "暂停中", "未开工"],
top: 12,
// textStyle: {
// color: "#515A6E"
// },
// itemWidth: 12,
// itemHeight: 10
},
axisLabel: {
textStyle: {
color: "#515A6E"
}
}
},
yAxis: {
// type: "value",
splitLine: {
show: true,
lineStyle: {
color: "#eee",
type: "solid"
}
},
axisTick: {
show: false
},
axisLine: {
show: false
},
axisLabel: {
textStyle: {
color: "#515A6E"
}
}
},
series: [
{
name: "计划数量",
type: "bar",
barWidth: 20, //柱图宽度
barGap: "100%", //柱图间距
data: [110, 40, 100, 70, 50]
tooltip: {
trigger: "axis",
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
},
},
{
name: "已完成",
type: "bar",
barWidth: 20, //柱图宽度
data: [5, 40, 70, 50, 20]
grid: {
left: "0",
right: "4%",
bottom: "3%",
containLabel: true,
},
{
name: "执行中",
type: "bar",
barWidth: 20, //柱图宽度
data: [50, 40, 60, 110, 40]
xAxis: {
// type: "category",
data: name,
axisTick: {
show: false,
},
axisLine: {
show: false,
},
axisLabel: {
textStyle: {
color: "#515A6E",
},
},
},
{
name: "暂停中",
type: "bar",
barWidth: 20, //柱图宽度
data: [60, 110, 90, 50, 20]
yAxis: {
// type: "value",
splitLine: {
show: true,
lineStyle: {
color: "#eee",
type: "solid",
},
},
axisTick: {
show: false,
},
axisLine: {
show: false,
},
axisLabel: {
textStyle: {
color: "#515A6E",
},
},
},
{
name: "未开工",
type: "bar",
barWidth: 20, //柱图宽度
data: [50, 68, 40, 100, 55]
}
]
};
}
}
series: [
{
name: "计划数量",
type: "bar",
barWidth: 20, //柱图宽度
barGap: "100%", //柱图间距
data:allTotal,
},
{
name: "已完成",
type: "bar",
barWidth: 20, //柱图宽度
data: [5, 40, 70, 50, 20],
},
{
name: "执行中",
type: "bar",
barWidth: 20, //柱图宽度
data: [50, 40, 60, 110, 40],
},
{
name: "暂停中",
type: "bar",
barWidth: 20, //柱图宽度
data: [60, 110, 90, 50, 20],
},
{
name: "未开工",
type: "bar",
barWidth: 20, //柱图宽度
data: [50, 68, 40, 100, 55],
},
],
};
});
},
},
};
</script>
<style lang="less" scoped>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment