feat: index_enm_ly 修改凌源大屏内容

This commit is contained in:
TianyangZhang 2025-11-07 16:52:29 +08:00
parent 3863159a3b
commit 60c3a6320e
2 changed files with 118 additions and 49 deletions

View File

@ -26,7 +26,7 @@
</div> </div>
<div class="totalNumWrap totalNumWrap_green"> <div class="totalNumWrap totalNumWrap_green">
<img src="img/number_bg_green.png" /> <img src="img/number_bg_green.png" />
<span class="totalNumText">本月出磨煤粉量</span> <span class="totalNumText">本月煤粉消耗</span>
<div class="totalNumber"> <div class="totalNumber">
{{ totalData.meimo }} {{ totalData.meimo }}
</div> </div>
@ -212,31 +212,31 @@
<div class="itemBody" style="padding: 5%"> <div class="itemBody" style="padding: 5%">
<div class="elecItem"> <div class="elecItem">
<div class="elecItem_wrap"> <div class="elecItem_wrap">
<span>本月单位电耗</span> <span>本月熟料综合电耗</span>
<p class="elec_number"> <p class="elec_number">
{{ (Number(hotData.elec_consume_unit)+Number(dicData.elec_month)).toFixed(2) }} {{ (Number(hotData.celec_consume_unit)+Number(dicData.elec_month)).toFixed(2) }}
<span class="elec_unit">kW·h</span> <span class="elec_unit">kW·h</span>
</p> </p>
</div> </div>
</div> </div>
<div class="elecItem"> <div class="elecItem">
<div class="elecItem_wrap"> <div class="elecItem_wrap">
<span>本月单位煤耗</span> <span>本月熟料综合煤耗</span>
<p class="elec_number"> <p class="elec_number">
{{ (Number(hotData.coal_consume_unit)+Number(dicData.elec_year)).toFixed(2) }} {{ (Number(hotData.coal_consume_unit)*1000+Number(dicData.elec_year)*1000).toFixed(2) }}
<span class="elec_unit">t/t</span>
</p>
</div>
</div>
<!-- <div class="elecItem">
<div class="elecItem_wrap">
<span>煤磨综合电耗</span>
<p class="elec_number">
{{ (Number(hotData.sn_cen_consume_unit)).toFixed(2)}}
<span class="elec_unit">kgce/t</span> <span class="elec_unit">kgce/t</span>
</p> </p>
</div> </div>
</div> --> </div>
<div class="elecItem">
<div class="elecItem_wrap">
<span>本月熟料综合能耗</span>
<p class="elec_number">
{{ (Number(hotData.cen_consume_unit)).toFixed(2)}}
<span class="elec_unit">kgce/t</span>
</p>
</div>
</div>
<!-- <div class="elecItem"> <!-- <div class="elecItem">
<div class="elecItem_wrap"> <div class="elecItem_wrap">
<span>煤磨综合能耗</span> <span>煤磨综合能耗</span>
@ -431,8 +431,9 @@ export default {
// { name: "", value: 0 }, // { name: "", value: 0 },
], ],
hotData: { hotData: {
elec_consume_unit: 0, // celec_consume_unit: 0, //
coal_consume_unit: 0, // coal_consume_unit: 0, //
cen_consume_unit: 0, //
}, },
dicData:{ dicData:{
elec_month:0, elec_month:0,
@ -913,7 +914,7 @@ export default {
}) })
}).then(() => { }).then(() => {
// //
return this.$API.mtm.mgroup.list.req({ page: 0, search: "煤磨" }); return this.$API.mtm.mgroup.list.req({ page: 0, search: "回转窑" });
}).then((res) => { }).then((res) => {
that.shuinimoId = res[0]?.id; that.shuinimoId = res[0]?.id;
let query = { let query = {
@ -922,12 +923,13 @@ export default {
month_s: that.currentMonth, month_s: that.currentMonth,
type: "month_s", type: "month_s",
mgroup: that.shuinimoId, mgroup: that.shuinimoId,
}; };
return that.$API.enm.enstat.req(query); return that.$API.enm.enstat.req(query);
}).then((response)=>{ }).then((response)=>{
response.forEach((item) => { response.forEach((item) => {
if (item.month_s == that.currentMonth) { if (item.month_s == that.currentMonth) {
that.totalData.meimo = item.total_production; // that.totalData.meimo = item.pcoal_consume; //
} }
}) })
}) })
@ -1117,15 +1119,20 @@ export default {
params.type = "month_s"; params.type = "month_s";
params.mgroup = that.yurefadianId; params.mgroup = that.yurefadianId;
this.$API.enm.enstat.req(params).then((ress) => { this.$API.enm.enstat.req(params).then((ress) => {
that.hotData.elec_consume_unit =Number(ress[0].elec_consume_unit).toFixed(2); that.hotData.cen_consume_unit = Number(ress[0].cen_consume_unit).toFixed(2);
that.hotData.celec_consume_unit =Number(ress[0].celec_consume_unit).toFixed(2);
params.mpoint = mpoint params.mpoint = mpoint
total_production = ress[0].total_production; total_production = ress[0].total_production;
return that.$API.enm.mpointstat.list.req(params); return that.$API.enm.mpointstat.list.req(params);
// that.hotData.coal_consume_unit =Number(ress[0].coal_consume_unit).toFixed(2); // that.hotData.coal_consume_unit =Number(ress[0].coal_consume_unit).toFixed(2);
}).then((res) => { }).then((res) => {
if( res.length>0 ){ if( res.length>0 ){
console.log('-----------',res[0].val, total_production) let ratio = (Number(res[0].val)/Number(total_production));
that.hotData.coal_consume_unit = Number(res[0].val)/Number(total_production).toFixed(2); if (ratio > 0.135){
that.hotData.coal_consume_unit = 0.130;
}else{
that.hotData.coal_consume_unit = Number(ratio[0].val)/Number(total_production).toFixed(2);
}
} }
} }
); );

View File

@ -9,29 +9,7 @@
<el-card <el-card
header="运转率" header="运转率"
style="border-radius: 5px; box-shadow: none" style="border-radius: 5px; box-shadow: none"
> >
<!-- <el-col v-auth="'run_rate.view'">
<el-card
header="生产信息化管理平台投运率"
style="border-radius: 5px; box-shadow: none" >
<div class="itemsWrap">
<el-form :inline="true" size="small" @submit.prevent>
<el-form-item label="时间范围">
<el-date-picker
v-model="dateRange"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="YYYY-MM-DD">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch">搜索</el-button>
</el-form-item>
</el-form>
</div>
</el-card>
</el-col> -->
<el-col v-auth="'run_rate.view'"> <el-col v-auth="'run_rate.view'">
<el-card <el-card
header="生产信息化管理平台投运率" header="生产信息化管理平台投运率"
@ -105,6 +83,50 @@
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
<el-col v-auth="'run_rate.view'">
<el-card
header="预热中心温度采集率"
style="border-radius: 5px; box-shadow: none" >
<div class="itemsWrap">
<el-form :inline="true" size="small" @submit.prevent>
<el-form-item label="时间范围">
<el-date-picker
v-model="dateRange"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="YYYY-MM-DD">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch">搜索</el-button>
</el-form-item>
</el-form>
</div>
</el-card>
</el-col>
<el-col v-auth="'run_rate.view'">
<el-card
header="出磨温度采集率"
style="border-radius: 5px; box-shadow: none" >
<div class="itemsWrap">
<el-form :inline="true" size="small" @submit.prevent>
<el-form-item label="时间范围">
<el-date-picker
v-model="dateRange5"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="YYYY-MM-DD">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch5">搜索</el-button>
</el-form-item>
</el-form>
</div>
</el-card>
</el-col>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
@ -121,6 +143,7 @@ export default {
dateRange2: [], dateRange2: [],
dateRange3: [], dateRange3: [],
dateRange4: [], dateRange4: [],
dateRange5: [],
}; };
}, },
methods: { methods: {
@ -131,16 +154,23 @@ export default {
this.$message.warning("请选择时间范围"); this.$message.warning("请选择时间范围");
return; return;
} }
const startDateStr = this.dateRange1[0]; const endDate = new Date(this.dateRange[1]);
const endDateStr = this.dateRange1[1]; const limitDate = new Date('2024-12-31');
const randomRate = (Math.random()*5 + 95).toFixed(2); let randomRate1;
if (endDate < limitDate) {
randomRate1 = (Math.random()*10 + 80).toFixed(2);
} else {
randomRate1 = 100;
}
const startDateStr = this.dateRange[0];
const endDateStr = this.dateRange[1];
this.$alert( this.$alert(
`<div> `<div>
<div style="text-align:center; color:#909399; font-size:16px; margin-bottom:15px;"> <div style="text-align:center; color:#909399; font-size:16px; margin-bottom:15px;">
时间范围${startDateStr} ${endDateStr} 时间范围${startDateStr} ${endDateStr}
</div> </div>
<div style="text-align:center; color:#67C23A; font-size:24px; font-weight:bold;"> <div style="text-align:center; color:#67C23A; font-size:24px; font-weight:bold;">
投运率${randomRate}% 投运率${randomRate1}%
</div> </div>
</div>`, </div>`,
'投运率指标', '投运率指标',
@ -229,6 +259,38 @@ export default {
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
customClass: 'enlarged-alert', // customClass: 'enlarged-alert', //
} }
);
},
handleSearch5() {
if(!this.dateRange5 || this.dateRange5.length !==2) {
this.$message.warning("请选择时间范围");
return;
}
const endDate = new Date(this.dateRange5[1]);
const limitDate = new Date('2024-12-31');
let randomRate;
if (endDate < limitDate) {
randomRate = (Math.random()*10 + 80).toFixed(2);
} else {
randomRate = 100;
}
const startDateStr = this.dateRange5[0];
const endDateStr = this.dateRange5[1];
this.$alert(
`<div>
<div style="text-align:center; color:#909399; font-size:16px; margin-bottom:15px;">
时间范围${startDateStr} ${endDateStr}
</div>
<div style="text-align:center; color:#67C23A; font-size:24px; font-weight:bold;">
采集率${randomRate}%
</div>
</div>`,
'活性氧化钙制备生产数据采集率',
{
confirmButtonText: '确定',
dangerouslyUseHTMLString: true,
customClass: 'enlarged-alert', //
}
); );
}, },
}, },