feat: 修改大屏内容和生产报告查询
This commit is contained in:
parent
fd770c2562
commit
b84d64b2f4
|
@ -431,12 +431,12 @@ export default {
|
|||
{ name: "水泥磨", value: 0 , rate:0 },
|
||||
],
|
||||
elecData: [
|
||||
{ name: "电石渣", value: 0 },
|
||||
{ name: "原料磨", value: 0 },
|
||||
{ name: "煤磨", value: 0 },
|
||||
{ name: "回转窑", value: 0 },
|
||||
{ name: "水泥磨", value: 0 },
|
||||
{ name: "水泥包装", value: 0 },
|
||||
{ name: "电石渣工序", value: 0 },
|
||||
{ name: "生料辅料工序", value: 0 },
|
||||
{ name: "煤磨工序", value: 0 },
|
||||
{ name: "烧成工序", value: 0 },
|
||||
{ name: "水泥粉磨工序", value: 0 },
|
||||
{ name: "水泥包装工序", value: 0 },
|
||||
],
|
||||
hotData: {
|
||||
celec_consume_unit: 0, //综合电耗
|
||||
|
@ -544,16 +544,16 @@ export default {
|
|||
radarOption: {
|
||||
radar: {
|
||||
indicator: [
|
||||
{ name: "电石渣" },
|
||||
{ name: "原料磨" },
|
||||
{ name: "煤磨" },
|
||||
{ name: "回转窑" },
|
||||
{ name: "水泥磨" },
|
||||
{ name: "水泥包装" },
|
||||
{ name: "电石渣工序" },
|
||||
{ name: "生料辅料工序" },
|
||||
{ name: "煤磨工序" },
|
||||
{ name: "烧成工序" },
|
||||
{ name: "水泥粉磨工序" },
|
||||
{ name: "水泥包装工序" },
|
||||
],
|
||||
name: {
|
||||
textStyle: {
|
||||
padding: [20, 20], // 控制文字padding
|
||||
padding: [15, 15], // 控制文字padding
|
||||
},
|
||||
},
|
||||
nameGap: 2,
|
||||
|
@ -2227,11 +2227,11 @@ export default {
|
|||
.bodyListItem_name {
|
||||
width: 60px;
|
||||
padding: 0.5vh 0;
|
||||
font-size: 14px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.bodyListItem_num {
|
||||
width: 65px;
|
||||
font-size: 14px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.itemBodyFlex {
|
||||
display: flex;
|
||||
|
|
|
@ -290,6 +290,90 @@ let yAxis = [
|
|||
},
|
||||
},
|
||||
];
|
||||
let yAxis_month = [
|
||||
{
|
||||
type: "value",
|
||||
name: "产量 (t)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[0],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "台时(t/h)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 50,
|
||||
offset: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[1],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "煤磨运转率 (%)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
offset: 50,
|
||||
nameRotate: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[2],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "煤磨分布电耗(kW·h/t)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
nameRotate: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[3],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "分布电耗目标值",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
nameRotate: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[3],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
];
|
||||
let yAxis_hour = [
|
||||
{
|
||||
type: "value",
|
||||
|
@ -341,6 +425,7 @@ export default {
|
|||
myOption: null,
|
||||
optionHour: {},
|
||||
optionDay: {},
|
||||
goal_list: [],
|
||||
optionMonth: {},
|
||||
year: 2023,
|
||||
month: 1,
|
||||
|
@ -459,7 +544,7 @@ export default {
|
|||
tooltip: tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
legend: Object.assign(legend, {data: ["煤磨总产量", "煤磨台时产量", "煤磨运转率", "煤磨分布电耗", "分布电耗目标值"]}),
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
|
@ -481,7 +566,7 @@ export default {
|
|||
"十二月",
|
||||
],
|
||||
},
|
||||
yAxis: yAxis,
|
||||
yAxis: yAxis_month,
|
||||
series: [
|
||||
{
|
||||
name: "煤磨总产量",
|
||||
|
@ -507,6 +592,12 @@ export default {
|
|||
yAxisIndex: 3,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "分布电耗目标值",
|
||||
type: "line",
|
||||
yAxisIndex: 4,
|
||||
data: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
@ -854,7 +945,26 @@ export default {
|
|||
//获取月数据
|
||||
getMonthData(year) {
|
||||
let that = this;
|
||||
let query2 = {};
|
||||
let params5 = {};
|
||||
params5.page = 0;
|
||||
params5.year = year;
|
||||
params5.mgroup = that.query.mgroup;
|
||||
this.$API.mtm.goal.list
|
||||
.req(params5)
|
||||
.then((res5) => {
|
||||
if (res5.length > 0) {
|
||||
let data5 = res5;
|
||||
data5.forEach((item5) => {
|
||||
if (
|
||||
item5.goal_cate_name ==
|
||||
"单位产品分布电耗(kW·h/t)"
|
||||
) {
|
||||
that.goal_list.push(item5);
|
||||
}
|
||||
});
|
||||
}
|
||||
}).then(() => {
|
||||
let query2 = {};
|
||||
query2.page = 0;
|
||||
query2.year_s = year;
|
||||
query2.type = "month_s";
|
||||
|
@ -863,21 +973,28 @@ export default {
|
|||
let seriesData0 = [],
|
||||
seriesData1 = [],
|
||||
seriesData2 = [],
|
||||
seriesData3 = [];
|
||||
seriesData3 = [],
|
||||
seriesData4 = [];
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let goal_index = 'goal_val_' + item.month_s;
|
||||
let ind = item.month_s - 1;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.production_hour;
|
||||
seriesData2[ind] = item.run_rate;
|
||||
seriesData3[ind] = item.elec_consume_unit;
|
||||
seriesData4[ind] = that.goal_list[0][goal_index];
|
||||
});
|
||||
let options = { ...that.option3 };
|
||||
options.series[0].data = seriesData0;
|
||||
options.series[1].data = seriesData1;
|
||||
options.series[2].data = seriesData2;
|
||||
options.series[3].data = seriesData3;
|
||||
options.series[4].data = seriesData4;
|
||||
let monthXAxis = [];
|
||||
if (year < that.year){
|
||||
that.month = 12;
|
||||
}
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i + "月";
|
||||
monthXAxis.push(item);
|
||||
|
@ -885,6 +1002,8 @@ export default {
|
|||
options.xAxis.data = monthXAxis;
|
||||
that.optionMonth = options;
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
itemClick(type, item) {
|
||||
this.type = type;
|
||||
|
|
|
@ -115,7 +115,7 @@ import * as echarts from 'echarts';
|
|||
tableDatas_range:[],
|
||||
daterange:[],
|
||||
headers: ['生料立磨','循环风机','高温风机','尾排风机','回转窑','水泥磨','水泥循环风机','水泥系统风机','电石渣','原料磨','煤磨','水泥粉磨','水泥包装'],
|
||||
mpoint_name: ['原料立磨主电机','循环风机-原料磨','高温风机','尾排风机','回转窑合计','水泥高压进线','循环风机-水泥磨','系统风机','电石渣合计','原料磨合计','煤磨合计','水泥磨主电机','包装进线'],
|
||||
mpoint_name: ['原料立磨主电机','循环风机-原料磨','高温风机','尾排风机','烧成工序用电合计','水泥高压进线','循环风机-水泥磨','系统风机','电石渣用电合计','生料辅料工序用电量','煤磨合计','水泥磨主电机','包装进线'],
|
||||
tableData: [
|
||||
['用电峰','用电尖峰','','','','','','','','','','','','',''],
|
||||
['用电峰','用电高峰','','','','','','','','','','','','',''],
|
||||
|
@ -123,7 +123,7 @@ import * as echarts from 'echarts';
|
|||
['用电谷','用电深谷','','','','','','','','','','','','',''],
|
||||
['用电平','用电平谷','','','','','','','','','','','','',''],
|
||||
],
|
||||
mpointList:["3631338253279723520,3631338547577257984,3631332708552392704,3631333116071026688,3631877739432493056,3631344327579828224,3631853750379200512,3631853436771090432,3631869508278722560,3631875738288111616,3631878174063050752,3631852596106797056,3631854361455820800"],
|
||||
mpointList:["3631338253279723520,3631338547577257984,3631332708552392704,3631333116071026688,3631877739432493056,3631344327579828224,3631853750379200512,3631853436771090432,3631869508278722560,3745109632247812096,3631878174063050752,3631852596106797056,3631854361455820800"],
|
||||
tableName:'峰谷平',
|
||||
options:[
|
||||
{id:0,name:'日统计'},
|
||||
|
|
|
@ -83,13 +83,14 @@
|
|||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th rowspan="3">日期</th>
|
||||
<th v-if="deptName=='原料车间'" colspan="11">原料车间</th>
|
||||
<th v-if="deptName=='原料车间'" colspan="15">原料车间</th>
|
||||
<th v-if="deptName=='烧成车间'" colspan="16">烧成车间</th>
|
||||
<th v-if="deptName=='水泥车间'" colspan="10">水泥车间</th>
|
||||
</tr>
|
||||
<tr v-if="deptName=='原料车间'">
|
||||
<th colspan="4">电石渣</th>
|
||||
<th colspan="4">原料磨</th>
|
||||
<th colspan="4">生料辅料</th>
|
||||
<th colspan="4">生料</th>
|
||||
<th rowspan="2">压缩空气(m3)</th>
|
||||
<th rowspan="2">单位压缩空气(m3/t)</th>
|
||||
</tr>
|
||||
|
@ -120,10 +121,13 @@
|
|||
<th v-else>单位产品能耗(tce/t)</th>
|
||||
<th>电量(kW·h)</th>
|
||||
<th>电量折标煤(tce)</th>
|
||||
<!-- <th v-if="deptName=='原料车间'">水(t)</th> -->
|
||||
<!-- <th v-if="deptName=='原料车间'">窑尾余热利用(tce)</th> -->
|
||||
<th>产品产量(t)</th>
|
||||
<th>单位产品能耗(tce/t)</th>
|
||||
<th v-if="deptName=='原料车间'">电量(kW·h)</th>
|
||||
<th v-if="deptName=='原料车间'">电量折标煤(tce)</th>
|
||||
<th v-if="deptName=='原料车间'">产品产量(t)</th>
|
||||
<th v-if="deptName=='原料车间'">单位产品能耗(tce/t)</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas3" :key="index">
|
||||
|
@ -237,6 +241,8 @@
|
|||
wrapArr[ind][0]=item
|
||||
}else if(item.mgroup_name=='原料磨'){
|
||||
wrapArr[ind][1]=item
|
||||
}else if(item.mgroup_name=='生料工序(二次配料)'){
|
||||
wrapArr[ind][4]=item
|
||||
}else if(item.mgroup_name=='原料压缩空气'){
|
||||
wrapArr[ind][2]=item
|
||||
wrapArr[ind][3]=item
|
||||
|
@ -262,7 +268,7 @@
|
|||
}
|
||||
});
|
||||
// debugger;
|
||||
// console.log(wrapArr);
|
||||
console.log(wrapArr, "-----------wrapArr");
|
||||
wrapArr.forEach((item1)=>{
|
||||
//item1------一天的数据
|
||||
if(item1!=undefined){
|
||||
|
@ -330,6 +336,12 @@
|
|||
itemArr.push(0)
|
||||
}
|
||||
}
|
||||
if (item1[4]){
|
||||
itemArr.push( item1[4].elec_consume)
|
||||
itemArr.push( item1[4].elec_coal_consume)
|
||||
itemArr.push( item1[4].total_production)
|
||||
itemArr.push( item1[4].en_consume_unit)
|
||||
}
|
||||
innerArr.push(itemArr)
|
||||
}
|
||||
})
|
||||
|
|
|
@ -2,6 +2,19 @@
|
|||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-date-picker
|
||||
v-model="query.year_s"
|
||||
type="year"
|
||||
value-format="YYYY"
|
||||
format="YYYY"
|
||||
placeholder="查询年份"
|
||||
class="headerSearch"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
|
@ -125,6 +138,7 @@ export default {
|
|||
year_s: "",
|
||||
tableDatas: [],
|
||||
optionMonth:{},
|
||||
query: {"year_s":""},
|
||||
option1: {
|
||||
color: colors,
|
||||
tooltip: tooltip,
|
||||
|
@ -156,30 +170,40 @@ export default {
|
|||
let that = this;
|
||||
var myDate = new Date();
|
||||
let year = myDate.getFullYear();
|
||||
that.year_s = year;
|
||||
that.query.year_s = year;
|
||||
this.getData();
|
||||
let month = (that.month = myDate.getMonth() + 1);
|
||||
},
|
||||
methods: {
|
||||
handleQuery() {
|
||||
this.tableDatas = [];
|
||||
this.getData();
|
||||
},
|
||||
getData() {
|
||||
let that = this;
|
||||
let wrapArr = [],
|
||||
wrapArr2 = [];
|
||||
let obj = {};
|
||||
obj.year_s = this.year_s - 1;
|
||||
obj.year_s = that.query.year_s - 1;
|
||||
obj.page = 0;
|
||||
obj.type = 'month_s';
|
||||
that.$API.enm.enstat2.req(obj).then((res) => {
|
||||
if (res.length > 0) {
|
||||
res.forEach((item) => {
|
||||
let ind = item.month_s - 1;
|
||||
wrapArr[ind] = item; //上年
|
||||
let ind = 0;
|
||||
if (item.month_s == 1){
|
||||
ind = 12;
|
||||
wrapArr[ind] = item; //上年
|
||||
}else{
|
||||
ind = item.month_s;
|
||||
wrapArr[ind] = item
|
||||
}
|
||||
});
|
||||
} else {
|
||||
wrapArr = [];
|
||||
}
|
||||
let obj2 = {};
|
||||
obj2.year_s = this.year_s;
|
||||
obj2.year_s = that.query.year_s;
|
||||
obj2.page = 0;
|
||||
obj2.type = 'month_s';
|
||||
that.$API.enm.enstat2.req(obj2).then((res2) => {
|
||||
|
@ -212,6 +236,7 @@ export default {
|
|||
hValue3 = 0,
|
||||
tPercent3 = 0,
|
||||
hPercent3 = 0;
|
||||
console.log(wrapArr2[i].month_s, ".month_s")
|
||||
if (wrapArr2[i].month_s > 1 && i>0) {
|
||||
tValue3 = wrapArr2[i - 1]
|
||||
? wrapArr2[i - 1].en_consume
|
||||
|
@ -327,7 +352,7 @@ export default {
|
|||
let options = { ...that.option1 };
|
||||
options.series[0].data = seriesData0;
|
||||
let monthXAxis = [];
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
for (let i = 1; i <= 12; i++) {
|
||||
let item = i + "月";
|
||||
monthXAxis.push(item);
|
||||
}
|
||||
|
|
|
@ -759,9 +759,10 @@ export default {
|
|||
}
|
||||
seriesData[index][ind] = item.elec_consume_unit;
|
||||
});
|
||||
|
||||
let options = { ...that.option3 };
|
||||
options.legend.data = [];
|
||||
options.series = [];
|
||||
let options = { ...that.option3 };
|
||||
for (let j = 0; j < that.mpoints.length; j++) {
|
||||
let chartItem = {};
|
||||
chartItem.name = that.mpoints[j];
|
||||
|
|
|
@ -288,7 +288,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const colors = ["#5b9bd5", "#ed7d31", "#70ad47", "#ffc000", "#5f6694", "#cb9bff"];
|
||||
const colors = ["#5b9bd5", "#ed7d31", "#70ad47", "#ffc000", "#5f6694", "#cb9bff", "#7DDA58"];
|
||||
// 产量/台时/运转率/分布电耗/单位产品标煤耗/成本
|
||||
let tooltip = {
|
||||
show: true,
|
||||
|
@ -438,6 +438,184 @@ let yAxis = [
|
|||
// },
|
||||
},
|
||||
];
|
||||
let yAxis_hour = [
|
||||
{
|
||||
type: "value",
|
||||
name: "产量 (t)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[0],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "熟料分布电耗(kW·h/t)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
nameRotate: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[3],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "熟料标煤耗(kgce/t)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
nameRotate: 50,
|
||||
offset: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[4],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "熟料单位成本(元/吨)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 50,
|
||||
offset: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[5],
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
let yAxis_month = [
|
||||
{
|
||||
type: "value",
|
||||
name: "产量 (t)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[0],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "台时产量 (t/h)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[1],
|
||||
},
|
||||
},
|
||||
offset: 100,
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "回转窑运转率(%) ",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
nameRotate: 50,
|
||||
offset: 100,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[2],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "熟料分布电耗(kW·h/t)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
nameRotate: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[3],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "熟料标煤耗(kgce/t)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
nameRotate: 50,
|
||||
offset: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[4],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "熟料单位成本(元/吨)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 50,
|
||||
offset: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[5],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "分布电耗目标值",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 50,
|
||||
offset: 150,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[6],
|
||||
},
|
||||
},
|
||||
}
|
||||
];
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from "vue";
|
||||
export default {
|
||||
|
@ -457,6 +635,7 @@ export default {
|
|||
timeStamp: null,
|
||||
optionHour: {},
|
||||
optionDay: {},
|
||||
goal_list: [],
|
||||
optionMonth: {},
|
||||
year: 2023,
|
||||
month: 1,
|
||||
|
@ -502,7 +681,7 @@ export default {
|
|||
},
|
||||
data: [],
|
||||
},
|
||||
yAxis: yAxis,
|
||||
yAxis: yAxis_hour,
|
||||
series: [
|
||||
{
|
||||
name: "回转窑总产量",
|
||||
|
@ -510,34 +689,22 @@ export default {
|
|||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "台时产量",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "回转窑运转率",
|
||||
type: "line",
|
||||
yAxisIndex: 1,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "熟料分布电耗",
|
||||
type: "bar",
|
||||
yAxisIndex: 2,
|
||||
yAxisIndex: 1,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "熟料标煤耗",
|
||||
type: "bar",
|
||||
yAxisIndex: 3,
|
||||
yAxisIndex: 2,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "熟料单位成本",
|
||||
type: "bar",
|
||||
yAxisIndex: 4,
|
||||
yAxisIndex: 3,
|
||||
data: [],
|
||||
},
|
||||
],
|
||||
|
@ -547,7 +714,7 @@ export default {
|
|||
tooltip: tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
legend: Object.assign(legend, {data: ["回转窑总产量", "台时产量", "回转窑运转率", "熟料分布电耗", "熟料标煤耗", "熟料单位成本"]}),
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
|
@ -615,7 +782,7 @@ export default {
|
|||
tooltip: tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
legend: Object.assign(legend, {data: ["回转窑总产量", "台时产量", "回转窑运转率", "熟料分布电耗", "熟料标煤耗", "熟料单位成本","分布电耗目标值"]}),
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
|
@ -624,7 +791,7 @@ export default {
|
|||
},
|
||||
data: [],
|
||||
},
|
||||
yAxis: yAxis,
|
||||
yAxis: yAxis_month,
|
||||
series: [
|
||||
{
|
||||
name: "回转窑总产量",
|
||||
|
@ -662,6 +829,12 @@ export default {
|
|||
yAxisIndex: 5,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "分布电耗目标值",
|
||||
type: "line",
|
||||
yAxisIndex: 6,
|
||||
data: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
@ -1063,9 +1236,9 @@ export default {
|
|||
options.series[0].data = seriesData0;
|
||||
// options.series[1].data = seriesData1;
|
||||
// options.series[2].data = seriesData2;
|
||||
options.series[3].data = seriesData3;
|
||||
options.series[4].data = seriesData4;
|
||||
options.series[5].data = seriesData5;
|
||||
options.series[1].data = seriesData3;
|
||||
options.series[2].data = seriesData4;
|
||||
options.series[3].data = seriesData5;
|
||||
let hourXAxis = [];
|
||||
for (let i = 0; i < 24; i++) {
|
||||
let item = i + "时";
|
||||
|
@ -1120,6 +1293,26 @@ export default {
|
|||
//获取月数据
|
||||
getMonthData(year) {
|
||||
let that = this;
|
||||
let params5 = {};
|
||||
params5.page = 0;
|
||||
params5.year = year;
|
||||
params5.mgroup = that.query.mgroup;
|
||||
this.$API.mtm.goal.list
|
||||
.req(params5)
|
||||
.then((res5) => {
|
||||
if (res5.length > 0) {
|
||||
let data5 = res5;
|
||||
data5.forEach((item5) => {
|
||||
if (
|
||||
item5.goal_cate_name ==
|
||||
"单位产品分布电耗(kW·h/t)"
|
||||
) {
|
||||
that.goal_list.push(item5);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}).then(() => {
|
||||
let query2 = {};
|
||||
query2.page = 0;
|
||||
query2.year_s = year;
|
||||
|
@ -1131,9 +1324,11 @@ export default {
|
|||
seriesData2 = [],
|
||||
seriesData3 = [],
|
||||
seriesData4 = [],
|
||||
seriesData5 = [];
|
||||
seriesData5 = [],
|
||||
seriesData6 = [];
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let goal_index = 'goal_val_' + item.month_s;
|
||||
let ind = item.month_s - 1;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.production_hour;
|
||||
|
@ -1141,6 +1336,7 @@ export default {
|
|||
seriesData3[ind] = item.elec_consume_unit;
|
||||
seriesData4[ind] = item.coal_consume_unit;
|
||||
seriesData5[ind] = item.production_cost_unit;
|
||||
seriesData6[ind] = that.goal_list[0][goal_index];
|
||||
});
|
||||
let options = { ...that.option3 };
|
||||
options.series[0].data = seriesData0;
|
||||
|
@ -1149,7 +1345,11 @@ export default {
|
|||
options.series[3].data = seriesData3;
|
||||
options.series[4].data = seriesData4;
|
||||
options.series[5].data = seriesData5;
|
||||
options.series[6].data = seriesData6;
|
||||
let monthXAxis = [];
|
||||
if (year < that.year){
|
||||
that.month = 12;
|
||||
}
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i + "月";
|
||||
monthXAxis.push(item);
|
||||
|
@ -1157,6 +1357,8 @@ export default {
|
|||
options.xAxis.data = monthXAxis;
|
||||
that.optionMonth = options;
|
||||
});
|
||||
})
|
||||
|
||||
},
|
||||
itemClick(type, item) {
|
||||
this.type = type;
|
||||
|
|
|
@ -274,7 +274,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const colors = ["#5b9bd5", "#ed7d31", "#70ad47", "#ffc000", "#cb9bff"];
|
||||
const colors = ["#5b9bd5", "#ed7d31", "#70ad47", "#ffc000", "#cb9bff", "#7DDA58"];
|
||||
let tooltip = {
|
||||
show: true,
|
||||
trigger: "axis",
|
||||
|
@ -308,8 +308,9 @@ let legend = {
|
|||
title: '反选'
|
||||
}
|
||||
],
|
||||
width: "500px",
|
||||
top: "2%",
|
||||
data: ["水泥磨总产量", "水泥磨台时产量", "水泥磨运转率", "分布电耗", "水泥单位成本"],
|
||||
data: ["水泥磨总产量", "分布电耗", "水泥单位成本"],
|
||||
};
|
||||
let yAxis = [
|
||||
{
|
||||
|
@ -380,6 +381,178 @@ let yAxis = [
|
|||
},
|
||||
},
|
||||
];
|
||||
let yAxis_month = [
|
||||
{
|
||||
type: "value",
|
||||
name: "产量 (t)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[0],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "水泥磨运转率(%)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
offset: 80,
|
||||
max:100,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[1],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},{
|
||||
type: "value",
|
||||
name: "水泥磨台时产量",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
offset: 80,
|
||||
max:100,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[2],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "水泥磨运转率(%)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
offset: 80,
|
||||
max:100,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[3],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "分布电耗(kW·h/t)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[3],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "水泥单位成本(元/吨)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
offset: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[4],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "分布电耗目标值",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
offset: 90,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[5],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
];
|
||||
let yAxis_hour = [
|
||||
{
|
||||
type: "value",
|
||||
name: "产量 (t)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[0],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "分布电耗(kW·h/t)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[3],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "水泥单位成本(元/吨)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
offset: 70,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[4],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
];
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from "vue";
|
||||
export default {
|
||||
|
@ -400,6 +573,7 @@ export default {
|
|||
optionHour: {},
|
||||
optionDay: {},
|
||||
optionMonth: {},
|
||||
goal_list : [],
|
||||
year: 2023,
|
||||
month: 1,
|
||||
days: 1,
|
||||
|
@ -440,7 +614,7 @@ export default {
|
|||
},
|
||||
data: [],
|
||||
},
|
||||
yAxis: yAxis,
|
||||
yAxis: yAxis_hour,
|
||||
series: [
|
||||
{
|
||||
name: "水泥磨总产量",
|
||||
|
@ -448,28 +622,16 @@ export default {
|
|||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "水泥磨台时产量",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "水泥磨运转率",
|
||||
type: "line",
|
||||
yAxisIndex: 1,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "分布电耗",
|
||||
type: "bar",
|
||||
yAxisIndex: 2,
|
||||
yAxisIndex: 1,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "水泥单位成本",
|
||||
type: "bar",
|
||||
yAxisIndex: 3,
|
||||
yAxisIndex: 2,
|
||||
data: [],
|
||||
},
|
||||
],
|
||||
|
@ -479,7 +641,7 @@ export default {
|
|||
tooltip: tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
legend: Object.assign(legend, {data: ["水泥磨总产量", "水泥磨台时产量", "水泥磨运转率","分布电耗","水泥单位成本"]}),
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
|
@ -527,7 +689,7 @@ export default {
|
|||
tooltip: tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
legend: Object.assign(legend, {data: ["水泥磨总产量", "水泥磨台时产量", "水泥磨运转率","分布电耗","水泥单位成本", "分布电耗目标值"]}),
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
|
@ -549,7 +711,7 @@ export default {
|
|||
"十二月",
|
||||
],
|
||||
},
|
||||
yAxis: yAxis,
|
||||
yAxis: yAxis_month,
|
||||
series: [
|
||||
{
|
||||
name: "水泥磨总产量",
|
||||
|
@ -560,25 +722,31 @@ export default {
|
|||
{
|
||||
name: "水泥磨台时产量",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
yAxisIndex: 1,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "水泥磨运转率",
|
||||
type: "line",
|
||||
yAxisIndex: 1,
|
||||
yAxisIndex: 2,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "分布电耗",
|
||||
type: "bar",
|
||||
yAxisIndex: 2,
|
||||
yAxisIndex: 3,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "水泥单位成本",
|
||||
type: "bar",
|
||||
yAxisIndex: 3,
|
||||
yAxisIndex: 4,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "分布电耗目标值",
|
||||
type: "line",
|
||||
yAxisIndex: 5,
|
||||
data: [],
|
||||
},
|
||||
],
|
||||
|
@ -921,8 +1089,8 @@ export default {
|
|||
options.series[0].data = seriesData0;
|
||||
// options.series[1].data = seriesData1;
|
||||
// options.series[2].data = seriesData2;
|
||||
options.series[3].data = seriesData4;
|
||||
options.series[4].data = seriesData3;
|
||||
options.series[1].data = seriesData4;
|
||||
options.series[2].data = seriesData3;
|
||||
let hourXAxis = [];
|
||||
for (let i = 0; i < 24; i++) {
|
||||
let item = i + "时";
|
||||
|
@ -974,7 +1142,27 @@ export default {
|
|||
//获取月数据
|
||||
getMonthData(year) {
|
||||
let that = this;
|
||||
let query2 = {};
|
||||
let params5 = {};
|
||||
params5.page = 0;
|
||||
params5.year = year;
|
||||
params5.mgroup = that.query.mgroup;
|
||||
this.$API.mtm.goal.list
|
||||
.req(params5)
|
||||
.then((res5) => {
|
||||
if (res5.length > 0) {
|
||||
let data5 = res5;
|
||||
data5.forEach((item5) => {
|
||||
if (
|
||||
item5.goal_cate_name ==
|
||||
"单位产品分布电耗(kW·h/t)"
|
||||
) {
|
||||
that.goal_list.push(item5);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}).then(() => {
|
||||
let query2 = {};
|
||||
query2.page = 0;
|
||||
query2.year_s = year;
|
||||
query2.type = "month_s";
|
||||
|
@ -984,15 +1172,18 @@ export default {
|
|||
seriesData1 = [],
|
||||
seriesData2 = [],
|
||||
seriesData3 = [],
|
||||
seriesData4 = [];
|
||||
seriesData4 = [],
|
||||
seriesData5 = [];
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let goal_index = 'goal_val_' + item.month_s;
|
||||
let ind = item.month_s - 1;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.production_hour;
|
||||
seriesData2[ind] = item.run_rate;
|
||||
seriesData3[ind] = item.production_cost_unit;
|
||||
seriesData4[ind] = item.elec_consume_unit;
|
||||
seriesData5[ind] = that.goal_list[0][goal_index];
|
||||
});
|
||||
let options = { ...that.option3 };
|
||||
options.series[0].data = seriesData0;
|
||||
|
@ -1000,7 +1191,11 @@ export default {
|
|||
options.series[2].data = seriesData2;
|
||||
options.series[3].data = seriesData4;
|
||||
options.series[4].data = seriesData3;
|
||||
options.series[5].data = seriesData5;
|
||||
let monthXAxis = [];
|
||||
if (year < that.year){
|
||||
that.month = 12;
|
||||
}
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i + "月";
|
||||
monthXAxis.push(item);
|
||||
|
@ -1008,6 +1203,8 @@ export default {
|
|||
options.xAxis.data = monthXAxis;
|
||||
that.optionMonth = options;
|
||||
});
|
||||
})
|
||||
|
||||
},
|
||||
itemClick(type, item) {
|
||||
this.type = type;
|
||||
|
@ -1018,7 +1215,7 @@ export default {
|
|||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec.req("3322567213885833216").then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
|
||||
console.log(this.myOption);
|
||||
this.chartShow = true;
|
||||
});
|
||||
|
|
|
@ -244,7 +244,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const colors = ["#5b9bd5", "#cbd3fe", "#91CC75", "#EE6666", "#CC00CC", "#551e13"];
|
||||
const colors = ["#5b9bd5", "#cbd3fe", "#91CC75", "#EE6666", "#CC00CC", "#7DDA58"];
|
||||
let tooltip = {
|
||||
show: true,
|
||||
trigger: "axis",
|
||||
|
@ -335,6 +335,7 @@ export default {
|
|||
myOption: null,
|
||||
optionDay: {},
|
||||
optionMonth: {},
|
||||
goal_list:[],
|
||||
year: 2023,
|
||||
month: 1,
|
||||
days: 1,
|
||||
|
@ -387,15 +388,11 @@ export default {
|
|||
},
|
||||
yAxis: yAxis,
|
||||
selector:[{
|
||||
// 全选
|
||||
type: 'all',
|
||||
// 可以是任意你喜欢的标题
|
||||
title: '全选'
|
||||
title: '全选'
|
||||
},
|
||||
{
|
||||
// 反选
|
||||
type: 'inverse',
|
||||
// 可以是任意你喜欢的标题
|
||||
title: '反选'
|
||||
}],
|
||||
selector: true,
|
||||
|
@ -431,12 +428,13 @@ export default {
|
|||
data: [],
|
||||
},
|
||||
|
||||
|
||||
],
|
||||
},
|
||||
option2: {
|
||||
color: colors,
|
||||
tooltip: tooltip,
|
||||
legend: legend,
|
||||
legend: Object.assign(legend, {data:["袋装合计", "散装合计", "熟料出厂合计", "出厂水泥合计", "复合水泥合计", "分布电耗目标值"]}),
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
xAxis: {
|
||||
|
@ -492,6 +490,12 @@ export default {
|
|||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "分布电耗目标值",
|
||||
type: "line",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
@ -772,7 +776,27 @@ export default {
|
|||
//获取月数据-图表
|
||||
getMonthData(year) {
|
||||
let that = this;
|
||||
let query2 = {};
|
||||
let params5 = {};
|
||||
params5.page = 0;
|
||||
params5.year = year;
|
||||
params5.mgroup = that.query.mgroup;
|
||||
this.$API.mtm.goal.list
|
||||
.req(params5)
|
||||
.then((res5) => {
|
||||
if (res5.length > 0) {
|
||||
let data5 = res5;
|
||||
data5.forEach((item5) => {
|
||||
if (
|
||||
item5.goal_cate_name ==
|
||||
"单位产品分布电耗(kW·h/t)"
|
||||
) {
|
||||
that.goal_list.push(item5);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}).then(() => {
|
||||
let query2 = {};
|
||||
query2.page = 0;
|
||||
query2.year_s = year;
|
||||
query2.type = "month_s";
|
||||
|
@ -783,10 +807,12 @@ export default {
|
|||
seriesData2 = [],
|
||||
seriesData3 = [],
|
||||
seriesData4 = [],
|
||||
seriesData5 = [];
|
||||
seriesData5 = [],
|
||||
seriesData6 = [];
|
||||
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let goal_index = 'goal_val_' + item.month_s;
|
||||
let ind = item.month_s - 1;
|
||||
if (item.mpoint_name == "袋装水泥总和") {
|
||||
seriesData1[ind] = item.val;
|
||||
|
@ -800,6 +826,7 @@ export default {
|
|||
console.log(item.mpoint_name, item.val);
|
||||
seriesData5[ind] = item.val;
|
||||
}
|
||||
seriesData6[ind] = that.goal_list[0][goal_index];
|
||||
});
|
||||
let options = { ...that.option2 };
|
||||
options.series[0].data = seriesData1;
|
||||
|
@ -807,8 +834,12 @@ export default {
|
|||
options.series[2].data = seriesData3;
|
||||
options.series[3].data = seriesData4;
|
||||
options.series[4].data = seriesData5;
|
||||
options.series[5].data = seriesData6;
|
||||
|
||||
let monthXAxis = [];
|
||||
if (year < that.year){
|
||||
that.month = 12;
|
||||
}
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i + "月";
|
||||
monthXAxis.push(item);
|
||||
|
@ -816,6 +847,8 @@ export default {
|
|||
options.xAxis.data = monthXAxis;
|
||||
that.optionMonth = options;
|
||||
});
|
||||
})
|
||||
|
||||
},
|
||||
itemClick(type, item) {
|
||||
this.type = type;
|
||||
|
|
|
@ -136,9 +136,11 @@ export default {
|
|||
if (data0.length > 0) {
|
||||
data0.forEach((item0) => {
|
||||
//先按月份排序,再按班组排序
|
||||
let n0 = item0.month_s;
|
||||
let ind0 = 0;
|
||||
wrapArr0[ind0] = item0;
|
||||
let month = item0.month_s;
|
||||
if (!wrapArr0[month]) {
|
||||
wrapArr0[month] = [];
|
||||
}
|
||||
wrapArr0[month].push(item0);
|
||||
});
|
||||
} else {}
|
||||
|
||||
|
@ -178,22 +180,30 @@ export default {
|
|||
arr[3] = item.elec_consume_unit; //当期值(kW·h/t)
|
||||
|
||||
let keyVale = "goal_val_" + n;
|
||||
arr[4] = goalData[keyVale]; //目标值(kW·h/t)//需要接口获取
|
||||
if (goalData && goalData[keyVale]){
|
||||
arr[4] = goalData[keyVale].goal_val_1;
|
||||
}else{arr[4] = 0; // 或者其他默认值
|
||||
}
|
||||
|
||||
arr[5] = (arr[3] - arr[4]).toFixed(2); //当期与目标差值(kW·h/t)
|
||||
let ind_pre = 0,
|
||||
huanbi = 0;
|
||||
if (item.month_s == 1) {
|
||||
ind_pre = 12;
|
||||
huanbi = wrapArr0[ind_pre]
|
||||
? wrapArr0[ind_pre].elec_consume_unit
|
||||
: "/";
|
||||
} else {
|
||||
// 如果 wrapArr数组长度大于0,那么循环遍历wrapArr数组,找到与item.month_s相差1的元素 而 item.name相同,并赋值给huanbi
|
||||
compareArr0.forEach((item0) => {
|
||||
if (item0[0] == item.month_s - 1 && item0[1] == item.team_name) {
|
||||
huanbi = item0[2];
|
||||
if (n == 1) {
|
||||
ind_pre = 12;
|
||||
if (wrapArr0[ind_pre]) {
|
||||
wrapArr0[ind_pre].forEach((item0) => {
|
||||
if (item0.team_name == item.team_name) {
|
||||
huanbi = item0.elec_consume_unit;
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
// 如果 wrapArr数组长度大于0,那么循环遍历wrapArr数组,找到与item.month_s相差1的元素 而 item.name相同,并赋值给huanbi
|
||||
compareArr0.forEach((item0) => {
|
||||
if (item0[0] == item.month_s - 1 && item0[1] == item.team_name) {
|
||||
huanbi = item0[2];
|
||||
}
|
||||
})
|
||||
}
|
||||
arr[6] =Number(huanbi); //环期值(kW·h/t)上个月的值\
|
||||
if (arr[6] !== "/"){
|
||||
|
|
|
@ -312,7 +312,8 @@ let legend = {
|
|||
}
|
||||
],
|
||||
top: "2%",
|
||||
data: ["立磨总产量", "立磨台时产量", "立磨运转率", "分布电耗"],
|
||||
width: "500px",
|
||||
data: ["立磨总产量", "立磨台时产量", "立磨运转率", "分布电耗", "分布电耗目标值"],
|
||||
};
|
||||
let yAxis = [
|
||||
{
|
||||
|
@ -380,6 +381,90 @@ let yAxis = [
|
|||
formatter: "{value}",
|
||||
},
|
||||
nameRotate: 50
|
||||
}
|
||||
];
|
||||
let yAxis_month = [
|
||||
{
|
||||
type: "value",
|
||||
name: "产量 (t)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[0],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
nameRotate: 50
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "立磨台时产量 (t/h)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[1],
|
||||
},
|
||||
},
|
||||
offset: 50,
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "立磨运转率 (%)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
offset: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[2],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
nameRotate: 50
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "分布电耗(kW·h)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[3],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
nameRotate: 50
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "分布电耗目标值",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[4],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
nameRotate: 50
|
||||
},
|
||||
];
|
||||
import * as echarts from "echarts";
|
||||
|
@ -497,7 +582,7 @@ export default {
|
|||
tooltip: tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
legend: Object.assign(legend, {data: ["立磨总产量", "立磨台时产量", "立磨运转率", "分布电耗"]}),
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
|
@ -531,19 +616,19 @@ export default {
|
|||
{
|
||||
name: "立磨台时产量",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
yAxisIndex: 1,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "立磨运转率",
|
||||
type: "line",
|
||||
yAxisIndex: 1,
|
||||
yAxisIndex: 2,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "分布电耗",
|
||||
type: "bar",
|
||||
yAxisIndex: 2,
|
||||
yAxisIndex: 3,
|
||||
data: [],
|
||||
},
|
||||
],
|
||||
|
@ -553,7 +638,7 @@ export default {
|
|||
tooltip: tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
legend: Object.assign(legend, {data: ["立磨总产量", "立磨台时产量", "立磨运转率", "分布电耗", "分布电耗目标值"]}),
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
|
@ -576,7 +661,7 @@ export default {
|
|||
"十二月",
|
||||
],
|
||||
},
|
||||
yAxis: yAxis,
|
||||
yAxis: yAxis_month,
|
||||
series: [
|
||||
{
|
||||
name: "立磨总产量",
|
||||
|
@ -587,26 +672,33 @@ export default {
|
|||
{
|
||||
name: "立磨台时产量",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
yAxisIndex: 1,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "立磨运转率",
|
||||
type: "line",
|
||||
yAxisIndex: 1,
|
||||
yAxisIndex: 2,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "分布电耗",
|
||||
type: "bar",
|
||||
yAxisIndex: 2,
|
||||
yAxisIndex: 3,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "分布电耗目标值",
|
||||
type: "line",
|
||||
yAxisIndex: 4,
|
||||
data: [],
|
||||
}
|
||||
],
|
||||
},
|
||||
dataX: [],
|
||||
dataY: [],
|
||||
dataY2: [],
|
||||
goal_list: [],
|
||||
option: {
|
||||
color: [
|
||||
"#647bfe",
|
||||
|
@ -1131,30 +1223,58 @@ export default {
|
|||
//获取月数据
|
||||
getMonthData(year) {
|
||||
let that = this;
|
||||
let query2 = {};
|
||||
let params5 = {};
|
||||
params5.page = 0;
|
||||
params5.year = year;
|
||||
params5.mgroup = that.query.mgroup;
|
||||
this.$API.mtm.goal.list
|
||||
.req(params5)
|
||||
.then((res5) => {
|
||||
if (res5.length > 0) {
|
||||
let data5 = res5;
|
||||
data5.forEach((item5) => {
|
||||
if (
|
||||
item5.goal_cate_name ==
|
||||
"单位产品分布电耗(kW·h/t)"
|
||||
) {
|
||||
that.goal_list.push(item5);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}).then(() => {
|
||||
let query2 = {};
|
||||
query2.page = 0;
|
||||
query2.year_s = year;
|
||||
query2.type = "month_s";
|
||||
query2.mgroup = that.query.mgroup;
|
||||
|
||||
this.$API.enm.enstat.req(query2).then((response) => {
|
||||
let seriesData0 = [],
|
||||
seriesData1 = [],
|
||||
seriesData2 = [],
|
||||
seriesData3 = [];
|
||||
seriesData3 = [],
|
||||
seriesData4 = [];
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let goal_index = 'goal_val_' + item.month_s;
|
||||
let ind = item.month_s - 1;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = Number(item.production_hour).toFixed(2);
|
||||
seriesData2[ind] = item.run_rate;
|
||||
seriesData3[ind] = item.elec_consume_unit;
|
||||
seriesData4[ind] = that.goal_list[0][goal_index];
|
||||
});
|
||||
let options = { ...that.option3 };
|
||||
options.series[0].data = seriesData0;
|
||||
options.series[1].data = seriesData1;
|
||||
options.series[2].data = seriesData2;
|
||||
options.series[3].data = seriesData3;
|
||||
options.series[4].data = seriesData4;
|
||||
let monthXAxis = [];
|
||||
if (year < that.year){
|
||||
that.month = 12;
|
||||
}
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i + "月";
|
||||
monthXAxis.push(item);
|
||||
|
@ -1162,6 +1282,8 @@ export default {
|
|||
options.xAxis.data = monthXAxis;
|
||||
that.optionMonth = options;
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
itemClick(type, item) {
|
||||
this.type = type;
|
||||
|
|
|
@ -275,7 +275,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const colors = ["#5b9bd5", "#ed7d31", "#70ad47", "#ffc000", "#cb9bff"];
|
||||
const colors = ["#5b9bd5", "#ed7d31", "#70ad47", "#ffc000", "#cb9bff", "#7DDA58"];
|
||||
let tooltip = {
|
||||
show: true,
|
||||
trigger: "axis",
|
||||
|
@ -301,6 +301,16 @@ let toolbox = {
|
|||
orient: "vertical",
|
||||
};
|
||||
let legend = {
|
||||
selector: [
|
||||
{
|
||||
type: 'all',
|
||||
title: '全选'
|
||||
},
|
||||
{
|
||||
type: 'inverse',
|
||||
title: '反选'
|
||||
}
|
||||
],
|
||||
top: "2%",
|
||||
data: ["生料总产量", "生料台时产量", "生料运转率", "分布电耗", "成本"],
|
||||
};
|
||||
|
@ -389,6 +399,108 @@ let yAxis = [
|
|||
nameRotate: 50
|
||||
},
|
||||
];
|
||||
let yAxis_month = [
|
||||
{
|
||||
type: "value",
|
||||
name: "产量 (t)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[0],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
nameRotate: 50
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "生料台时产量 (t/h)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[1],
|
||||
},
|
||||
},
|
||||
offset: 100,
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "生料运转率 (%)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
offset: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[2],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
nameRotate: 50
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "分布电耗(kW·h)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[3],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
nameRotate: 50
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "成本(元/吨)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
offset: 50,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[4],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
nameRotate: 50
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "分布电耗目标值",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
offset: 150,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[5],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
nameRotate: 50
|
||||
},
|
||||
];
|
||||
import * as echarts from "echarts";
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from "vue";
|
||||
|
@ -410,6 +522,7 @@ export default {
|
|||
optionHour: {},
|
||||
optionDay: {},
|
||||
optionMonth: {},
|
||||
goal_list: [],
|
||||
year: 2023,
|
||||
month: 1,
|
||||
days: 1,
|
||||
|
@ -492,7 +605,7 @@ export default {
|
|||
tooltip: tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
legend: Object.assign(legend, {data: ["生料总产量", "生料台时产量", "生料运转率", "分布电耗", "成本", "分布电耗目标值"]}),
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
|
@ -577,7 +690,7 @@ export default {
|
|||
"十二月",
|
||||
],
|
||||
},
|
||||
yAxis: yAxis,
|
||||
yAxis: yAxis_month,
|
||||
series: [
|
||||
{
|
||||
name: "生料总产量",
|
||||
|
@ -609,6 +722,12 @@ export default {
|
|||
yAxisIndex: 3,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "分布电耗目标值",
|
||||
type: "line",
|
||||
yAxisIndex: 4,
|
||||
data: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
dataX: [],
|
||||
|
@ -1174,7 +1293,27 @@ export default {
|
|||
//获取月数据
|
||||
getMonthData(year) {
|
||||
let that = this;
|
||||
let query2 = {};
|
||||
let params5 = {};
|
||||
params5.page = 0;
|
||||
params5.year = year;
|
||||
params5.mgroup = that.query.mgroup;
|
||||
this.$API.mtm.goal.list
|
||||
.req(params5)
|
||||
.then((res5) => {
|
||||
if (res5.length > 0) {
|
||||
let data5 = res5;
|
||||
data5.forEach((item5) => {
|
||||
if (
|
||||
item5.goal_cate_name ==
|
||||
"单位产品分布电耗(kW·h/t)"
|
||||
) {
|
||||
that.goal_list.push(item5);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}).then(() => {
|
||||
let query2 = {};
|
||||
query2.page = 0;
|
||||
query2.year_s = year;
|
||||
query2.type = "month_s";
|
||||
|
@ -1184,15 +1323,18 @@ export default {
|
|||
seriesData1 = [],
|
||||
seriesData2 = [],
|
||||
seriesData3 = [],
|
||||
seriesData5 = [],
|
||||
seriesData4 = [];
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let goal_index = 'goal_val_' + item.month_s;
|
||||
let ind = item.month_s - 1;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = Number(item.production_hour).toFixed(2);
|
||||
seriesData2[ind] = item.run_rate;
|
||||
seriesData3[ind] = item.elec_consume_unit;
|
||||
seriesData4[ind] = item.production_cost_unit;
|
||||
seriesData5[ind] = that.goal_list[0][goal_index];
|
||||
});
|
||||
let options = { ...that.option3 };
|
||||
options.series[0].data = seriesData0;
|
||||
|
@ -1200,7 +1342,11 @@ export default {
|
|||
options.series[2].data = seriesData2;
|
||||
options.series[3].data = seriesData3;
|
||||
options.series[4].data = seriesData4;
|
||||
options.series[5].data = seriesData5;
|
||||
let monthXAxis = [];
|
||||
if (year < that.year){
|
||||
that.month = 12;
|
||||
}
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i + "月";
|
||||
monthXAxis.push(item);
|
||||
|
@ -1208,6 +1354,7 @@ export default {
|
|||
options.xAxis.data = monthXAxis;
|
||||
that.optionMonth = options;
|
||||
});
|
||||
});
|
||||
},
|
||||
itemClick(type, item) {
|
||||
this.type = type;
|
||||
|
|
|
@ -847,33 +847,6 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
//获取年度目标值
|
||||
getGoalData(year) {
|
||||
let params5 = {};
|
||||
let goal_list = [];
|
||||
let that = this;
|
||||
params5.page = 0;
|
||||
params5.year = year;
|
||||
params5.mgroup = that.query.mgroup;
|
||||
this.$API.mtm.goal.list
|
||||
.req(params5)
|
||||
.then((res5) => {
|
||||
if (res5.length > 0) {
|
||||
let data5 = res5;
|
||||
data5.forEach((item5) => {
|
||||
if (
|
||||
item5.goal_cate_name ==
|
||||
"单位产品分布电耗(kW·h/t)"
|
||||
) {
|
||||
goal_list.push(item5);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
return res5;
|
||||
})
|
||||
|
||||
},
|
||||
//获取天数据
|
||||
getDayData(year, month) {
|
||||
let that = this;
|
||||
|
@ -946,7 +919,7 @@ export default {
|
|||
|
||||
}
|
||||
}).then(() => {
|
||||
let query2 = {};
|
||||
let query2 = {};
|
||||
query2.page = 0;
|
||||
query2.year_s = year;
|
||||
query2.type = "month_s";
|
||||
|
|
Loading…
Reference in New Issue