This commit is contained in:
shijing 2024-10-11 10:47:03 +08:00
commit 0735f5dbf7
11 changed files with 71 additions and 57 deletions

View File

@ -376,6 +376,7 @@ export default {
dataLoop() { dataLoop() {
let that = this; let that = this;
that.tableDatas = []; that.tableDatas = [];
that.tableDatas2 = [];
let _mgroup = [], let _mgroup = [],
_nameLength = [], _nameLength = [],
indexList = []; indexList = [];
@ -414,6 +415,7 @@ export default {
? item.nickname ? item.nickname
: item.name; : item.name;
obj.unit = item.unit; obj.unit = item.unit;
that.tableDatas2.push(obj); that.tableDatas2.push(obj);
that.getData(item.id, index); that.getData(item.id, index);
}); });

View File

@ -404,6 +404,7 @@ export default {
dataLoop() { dataLoop() {
let that = this; let that = this;
that.tableDatas = []; that.tableDatas = [];
that.tableDatas2 = [];
let _mgroup = [], let _mgroup = [],
_nameLength = [], _nameLength = [],
indexList = []; indexList = [];

View File

@ -357,6 +357,7 @@ export default {
dataLoop() { dataLoop() {
let that = this; let that = this;
that.tableDatas = []; that.tableDatas = [];
that.tableDatas2 = [];
let _mgroup = [], let _mgroup = [],
_nameLength = [], _nameLength = [],
indexList = []; indexList = [];

View File

@ -160,9 +160,9 @@ export default {
} }
if (tValue6 !== "/" && tValue6 !== 0 && wrapArr2[i].en_consume_unit !== 0) { if (tValue6 !== "/" && tValue6 !== 0 && wrapArr2[i].en_consume_unit !== 0) {
tPercent6 = tPercent6 =
((wrapArr2[i].en_consume_unit - tValue6) / (((wrapArr2[i].en_consume_unit - tValue6) /
tValue6) * tValue6) *
100; 100).toFixed(2);
} else { } else {
tPercent6 = "/"; tPercent6 = "/";
} }
@ -174,9 +174,8 @@ export default {
: "/"; : "/";
if (hValue6 !== "/" && hValue6 !== 0) { if (hValue6 !== "/" && hValue6 !== 0) {
hPercent6 = hPercent6 =
((wrapArr2[i].en_consume_unit - hValue6) / (((wrapArr2[i].en_consume_unit - hValue6) /
hValue6) * hValue6) * 100).toFixed(2);
100;
} else { } else {
hPercent6 = "/"; hPercent6 = "/";
} }
@ -202,10 +201,10 @@ export default {
}; };
if (tValue9 !== "/" && tValue9 !== 0) { if (tValue9 !== "/" && tValue9 !== 0) {
tPercent9 = tPercent9 =
((wrapArr2[i].en_add_consume_unit - (((wrapArr2[i].en_add_consume_unit -
tValue9) / tValue9) /
tValue9) * tValue9) *
100; 100).toFixed(2);
} else { } else {
tPercent9 = "/"; tPercent9 = "/";
}; };
@ -217,10 +216,10 @@ export default {
: "/"; : "/";
if (hValue9 !== "/" && hValue9 !== 0) { if (hValue9 !== "/" && hValue9 !== 0) {
hPercent9 = hPercent9 =
((wrapArr2[i].en_add_consume_unit - (((wrapArr2[i].en_add_consume_unit -
hValue9) / hValue9) /
hValue9) * hValue9) *
100; 100).toFixed(2);
} else { } else {
hPercent9 = "/"; hPercent9 = "/";
}; };

View File

@ -37,7 +37,7 @@
> >
<thead class="myTableHead"> <thead class="myTableHead">
<tr> <tr>
<th colspan="19">水泥磨工段班组月度对比分析</th> <th colspan="18">水泥磨工段班组月度对比分析</th>
</tr> </tr>
<tr> <tr>
<th rowspan="2">月份</th> <th rowspan="2">月份</th>
@ -46,7 +46,7 @@
<th>运转率</th> <th>运转率</th>
<th>成本</th> <th>成本</th>
<th colspan="3">质量</th> <th colspan="3">质量</th>
<th colspan="9">单位产品电耗</th> <th colspan="8">单位产品电耗</th>
<th rowspan="2">得分</th> <th rowspan="2">得分</th>
</tr> </tr>
<tr> <tr>
@ -59,7 +59,6 @@
<th>掺量%</th> <th>掺量%</th>
<th>循环风机1906KW·h/t</th> <th>循环风机1906KW·h/t</th>
<th>系统风机KW·h/t</th> <th>系统风机KW·h/t</th>
<th>水平涡流选粉机1915KW·h/t</th>
<th>目标值kW·h/t</th> <th>目标值kW·h/t</th>
<th>当期与目标值差值kW·h/t</th> <th>当期与目标值差值kW·h/t</th>
<th>环期值kW·h/t</th> <th>环期值kW·h/t</th>
@ -203,10 +202,10 @@ export default {
item.系统风机_consume_unit != null item.系统风机_consume_unit != null
? item.系统风机_consume_unit ? item.系统风机_consume_unit
: "/"; : "/";
arr[11] = // arr[11] =
item.水平涡流选粉机1915_consume_unit != null // item.1915_consume_unit != null
? item.水平涡流选粉机1915_consume_unit // ? item.1915_consume_unit
: "/"; // : "/";
// arr[12]=item._consume_unit!=null?item._consume_unit:'/'; // arr[12]=item._consume_unit!=null?item._consume_unit:'/';
// arr[13]=item.elec_consume_unit//KW·h/t // arr[13]=item.elec_consume_unit//KW·h/t
@ -215,11 +214,11 @@ export default {
if (goalData.length > 0){ if (goalData.length > 0){
goalData.forEach((item) => { goalData.forEach((item) => {
if (item.goal_cate_name == "单位产品分布电耗KW·h/t"){ if (item.goal_cate_name == "单位产品分布电耗KW·h/t"){
arr[12] = item[keyVale]; //KW·h/t// arr[11] = item[keyVale]; //KW·h/t//
} }
}); });
}; };
arr[13] = arr[12] - item.celec_consume_unit; //KW·h/t arr[12] = item.celec_consume_unit - arr[11]; //KW·h/t
let ind_pre = 0, let ind_pre = 0,
huanqi = 0, huanqi = 0,
huanqicha = 0, huanqicha = 0,
@ -238,14 +237,14 @@ export default {
} }
}) })
} }
arr[14] = huanqi; //KW·h/t arr[13] = huanqi; //KW·h/t
if (huanqi !== "/") { if (huanqi !== "/") {
huanqicha = item.celec_consume_unit - huanqi; huanqicha = item.celec_consume_unit - huanqi;
} else { } else {
huanqicha = item.celec_consume_unit; huanqicha = item.celec_consume_unit;
} }
arr[15] = huanqicha; //KW·h/t arr[14] = huanqicha; //KW·h/t
arr[16] = arr[15] =
huanqi != "/" ? (huanqicha / huanqi) * 100 : 0; //% huanqi != "/" ? (huanqicha / huanqi) * 100 : 0; //%
if (wrapArr0[n]) { if (wrapArr0[n]) {
tongqicha = tongqicha =
@ -257,9 +256,9 @@ export default {
tongqi = 0; tongqi = 0;
} }
arr[17] = tongqi; //%:-/ arr[16] = tongqi; //%:-/
// arr[18] = 0.0; //% // arr[18] = 0.0; //%
arr[18] = 0; arr[17] = 0;
if (month_obj[n]) { if (month_obj[n]) {
const monthData = month_obj[n]; const monthData = month_obj[n];
const itemValue = item.elec_consume_unit; // const itemValue = item.elec_consume_unit; //
@ -275,7 +274,7 @@ export default {
} else if (index === 3) { } else if (index === 3) {
elec_score= 0; elec_score= 0;
} }
arr[18] += elec_score; arr[17] += elec_score;
const run_rate_itemValue = item.run_rate; // const run_rate_itemValue = item.run_rate; //
const run_rate_sortedData = monthData.sort((a, b) => parseFloat(b.run_rate) - parseFloat(a.run_rate)); const run_rate_sortedData = monthData.sort((a, b) => parseFloat(b.run_rate) - parseFloat(a.run_rate));
@ -290,7 +289,7 @@ export default {
} else if (run_rate_index === 3) { } else if (run_rate_index === 3) {
run_rate_score= 0; run_rate_score= 0;
} }
arr[18] += run_rate_score; arr[17] += run_rate_score;
const production_hour_itemValue = item.production_hour; // const production_hour_itemValue = item.production_hour; //
const production_hour_sortedData = monthData.sort((a, b) => parseFloat(b.production_hour) - parseFloat(a.production_hour)); const production_hour_sortedData = monthData.sort((a, b) => parseFloat(b.production_hour) - parseFloat(a.production_hour));
@ -305,7 +304,7 @@ export default {
} else if (production_hour_index === 3) { } else if (production_hour_index === 3) {
production_hour_score= 0; production_hour_score= 0;
} }
arr[18] += production_hour_score; arr[17] += production_hour_score;
const production_cost_unit_itemValue = item.production_cost_unit; // const production_cost_unit_itemValue = item.production_cost_unit; //
const production_cost_unit_sortedData = monthData.sort((a, b) => parseFloat(b.production_cost_unit) - parseFloat(a.production_cost_unit)); const production_cost_unit_sortedData = monthData.sort((a, b) => parseFloat(b.production_cost_unit) - parseFloat(a.production_cost_unit));
@ -320,7 +319,7 @@ export default {
} else if (production_cost_unit_index === 3) { } else if (production_cost_unit_index === 3) {
production_cost_unit_score= 0; production_cost_unit_score= 0;
} }
arr[18] += production_cost_unit_score; arr[17] += production_cost_unit_score;
const surface_area_itemValue = item.出磨水泥_比表面积_rate_pass; // const surface_area_itemValue = item.出磨水泥_比表面积_rate_pass; //
const surface_area_sortedData = monthData.sort((a, b) => parseFloat(b.surface_area) - parseFloat(a.surface_area)); const surface_area_sortedData = monthData.sort((a, b) => parseFloat(b.surface_area) - parseFloat(a.surface_area));
@ -335,7 +334,7 @@ export default {
} else if (surface_area_index === 3) { } else if (surface_area_index === 3) {
surface_area_score= 0; surface_area_score= 0;
} }
arr[18] += surface_area_score; arr[17] += surface_area_score;
const SO3_itemValue = item.出磨水泥_SO3_rate_pass; // SO3 const SO3_itemValue = item.出磨水泥_SO3_rate_pass; // SO3
const SO3_sortedData = monthData.sort((a, b) => parseFloat(b.SO3) - parseFloat(a.SO3)); const SO3_sortedData = monthData.sort((a, b) => parseFloat(b.SO3) - parseFloat(a.SO3));
@ -350,7 +349,7 @@ export default {
} else if (SO3_index === 3) { } else if (SO3_index === 3) {
SO3_score= 0; SO3_score= 0;
} }
arr[18] += SO3_score; arr[17] += SO3_score;
const CLitemValue = item.出磨水泥_掺量_rate_pass; // SO3 const CLitemValue = item.出磨水泥_掺量_rate_pass; // SO3
const CL_sortedData = monthData.sort((a, b) => parseFloat(b.chanliang) - parseFloat(a.chanliang)); const CL_sortedData = monthData.sort((a, b) => parseFloat(b.chanliang) - parseFloat(a.chanliang));
@ -365,7 +364,7 @@ export default {
} else if (CL_index === 3) { } else if (CL_index === 3) {
CL_score= 0; CL_score= 0;
} }
arr[18] += CL_score; arr[17] += CL_score;
} }
wrapArr.push(arr); wrapArr.push(arr);
}); });

View File

@ -345,7 +345,7 @@ export default {
: "/"; : "/";
} }
if (arrs[1] !== "/" && lastNum !== "/") { if (arrs[1] !== "/" && lastNum !== "/") {
lastDiff = arrs[1] - lastNum; lastDiff = (arrs[1] - lastNum).toFixed(2);
} else { } else {
lastDiff = "/"; lastDiff = "/";
} }
@ -357,7 +357,7 @@ export default {
lastNum !== "/" && lastNum !== "/" &&
lastNum !== 0 lastNum !== 0
) { ) {
lastRate = (lastDiff / lastNum) * 100; lastRate = ((lastDiff / lastNum) * 100).toFixed(2);
} else { } else {
lastRate = "/"; lastRate = "/";
} }
@ -419,7 +419,7 @@ export default {
lastNum2 !== "/" && lastNum2 !== "/" &&
lastNum2 !== 0 lastNum2 !== 0
) { ) {
lastRate2 = (lastDiff2 / lastNum2) * 100; lastRate2 = ((lastDiff2 / lastNum2) * 100).toFixed(2);
} else { } else {
lastRate2 = "/"; lastRate2 = "/";
} }

View File

@ -77,7 +77,7 @@
min-width="100" min-width="100"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="单位成本" label="单位成本(元/吨)"
prop="cost_unit" prop="cost_unit"
min-width="150" min-width="150"
></el-table-column> ></el-table-column>

View File

@ -256,7 +256,7 @@ export default {
let lastDiff = 0; let lastDiff = 0;
if (arrs[1] !== "/" && arrs[4] !== "/") { if (arrs[1] !== "/" && arrs[4] !== "/") {
lastDiff = arrs[1] - arrs[4]; lastDiff = (arrs[1] - arrs[4]).toFixed(2);
} else { } else {
lastDiff = "/"; lastDiff = "/";
} }

View File

@ -41,22 +41,22 @@
<!-- <th rowspan="3">总成本</th> --> <!-- <th rowspan="3">总成本</th> -->
<th rowspan="3">单位成本/</th> <th rowspan="3">单位成本/</th>
<th :colspan="materialList.length">直接材料</th> <th :colspan="materialList.length">直接材料</th>
<th colspan="2">直接人工</th> <th colspan="10">制造费用</th>
<th colspan="8">制造费用</th>
</tr> </tr>
<tr> <tr>
<th v-if="data1 > 0" :colspan="data1">原材料</th> <th v-if="data1 > 0" :colspan="data1">原材料</th>
<th v-if="data3 > 0" :colspan="data3">辅助材料</th> <th v-if="data3 > 0" :colspan="data3">辅助材料</th>
<th v-if="data2 > 0" :colspan="data2">/</th> <th v-if="data2 > 0" :colspan="data2">/</th>
<th>车间人员工资</th>
<th>劳务工资</th>
<th>倒运费用</th>
<th>材料出库</th>
<th colspan="2">维修费用</th>
<th>装卸费</th>
<th>差旅费</th>
<th>折旧</th>
<th>摊销</th> <th>摊销</th>
<th>职工薪酬</th>
<th>其他费用</th>
<th>折旧</th>
<th>差旅费</th>
<th>装卸费</th>
<th>修理费</th>
<th>材料出库</th>
<th>倒运费用</th>
<th>直接人工</th>
</tr> </tr>
<tr> <tr>
<th v-for="(item, index) in materialList" :key="index">{{ item }}</th> <th v-for="(item, index) in materialList" :key="index">{{ item }}</th>
@ -64,12 +64,12 @@
<th>单位成本/</th> <th>单位成本/</th>
<th>单位成本/</th> <th>单位成本/</th>
<th>单位成本/</th> <th>单位成本/</th>
<th>检修单位成本/</th>
<th>外协施工费用单位成本/</th>
<th>单位成本/</th> <th>单位成本/</th>
<th>单位成本/</th> <th>单位成本/</th>
<th>单位成本/</th> <th>单位成本/</th>
<th>无形资产摊销单位成本/</th> <th>单位成本/</th>
<th>单位成本/</th>
<th>单位成本/</th>
</tr> </tr>
</thead> </thead>
<tr v-for="(item, index) in tableData1" :key="index"> <tr v-for="(item, index) in tableData1" :key="index">
@ -209,16 +209,20 @@ export default {
// Skip adding item details to arr for "湿" // Skip adding item details to arr for "湿"
return; return;
} }
if (item.material_name === "入磨原煤" || item.material_name === "蒸汽" ) {
return;
}
if (item.material_type == 30 || item.material_type == 20) {// if (item.material_type == 30 || item.material_type == 20) {//
that.data1 = that.data1 + 4; that.data1 = that.data1 + 4;
} else if (item.material_type == 40) {// } else if (item.material_type == 40) {//
that.data3 = that.data3 + 4; that.data3 = that.data3 + 4;
} }
let materialName = item.material_name let materialName = item.material_name
if (materialName === "入窑生料") { if (materialName === "入窑生料") {
materialName = "生料"; materialName = "生料";
} else if (materialName === "入窑煤粉") { } else if (materialName === "入窑煤粉") {
materialName = "原煤"; materialName = "入磨原煤";
} }
arr.push(materialName) arr.push(materialName)
arr.push('单价(元/吨)') arr.push('单价(元/吨)')
@ -267,12 +271,16 @@ export default {
for (let i = 0; i < sub1data.length; i++) { for (let i = 0; i < sub1data.length; i++) {
if (sub1data[i].material_name === '湿电石渣进厂'|| sub1data[i].material_name === '动力电'|| sub1data[i].material_name === '工业水'){ if (sub1data[i].material_name === '湿电石渣进厂'|| sub1data[i].material_name === '动力电'|| sub1data[i].material_name === '工业水'){
continue; continue;
} } else if (sub1data[i].material_name === '入磨原煤'|| sub1data[i].material_name === '蒸汽'){
continue;
};
dataArr.push((sub1data[i].amount_consume).toFixed(2)) dataArr.push((sub1data[i].amount_consume).toFixed(2))
dataArr.push((sub1data[i].price_unit).toFixed(2)) dataArr.push((sub1data[i].price_unit).toFixed(2))
dataArr.push((sub1data[i].cost).toFixed(2)) dataArr.push((sub1data[i].cost).toFixed(2))
dataArr.push((sub1data[i].cost_unit).toFixed(2)) dataArr.push((sub1data[i].cost_unit).toFixed(2))
} }
for (let i = 0; i < sub1data.length; i++) { for (let i = 0; i < sub1data.length; i++) {
if (sub1data[i].material_name == '动力电') { if (sub1data[i].material_name == '动力电') {
dataArr.push((sub1data[i].amount_consume).toFixed(2)); dataArr.push((sub1data[i].amount_consume).toFixed(2));

View File

@ -68,7 +68,6 @@
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="异常类别" label="异常类别"
prop="duration"
> >
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.is_shutdown" <span v-if="scope.row.is_shutdown"
@ -102,9 +101,12 @@
prop="measure" prop="measure"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="停机时长" label="停机时长(h)"
prop="duration" >
></el-table-column> <template #default="scope">
<span>{{Number((scope.row.duration_sec/3600).toFixed(2))}}</span>
</template>
</el-table-column>
</scTable> </scTable>
</el-main> </el-main>
<el-aside width="600px"> <el-aside width="600px">

View File

@ -461,9 +461,11 @@
prop="measure" prop="measure"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="停机时长(s)" label="停机时长(h)">
prop="duration_sec" <template #default="scope">
></el-table-column> <span>{{Number((scope.row.duration_sec/3600).toFixed(2))}}</span>
</template>
</el-table-column>
<el-table-column <el-table-column
label="操作" label="操作"
fixed="right" fixed="right"