feat: 电石渣工序车间单耗异常填写

This commit is contained in:
caoqianming 2024-12-13 18:14:37 +08:00
parent c43e670eb1
commit b3ca98680d
2 changed files with 26 additions and 3 deletions

View File

@ -209,7 +209,7 @@ export default {
},
},
enstat: {
name: "测点原始记录",
name: "工段统计记录",
req: async function(data){
return await http.get(
`${config.API_URL}/enm/enstat/`,
@ -217,6 +217,15 @@ export default {
);
}
},
enstat_update: {
name: "工段统计记录编辑备注",
req: async function(id, data){
return await http.put(
`${config.API_URL}/enm/enstat/${id}/`,
data
);
}
},
analyze: {
name: "一段时间范围的工段分析数据",
req: async function(data){

View File

@ -38,7 +38,7 @@
>
<thead class="myTableHead">
<tr>
<th colspan="8">车间单位产品电耗月度分析表</th>
<th colspan="9">车间单位产品电耗月度分析表</th>
</tr>
<tr>
<th>月份</th>
@ -49,6 +49,7 @@
<th>当期与环期差值KW·h/t</th>
<th>环比增长率%</th>
<th>同比增长率%</th>
<th>分析说明</th>
</tr>
</thead>
<tbody>
@ -57,8 +58,9 @@
v-for="(item1, ind) in item"
:key="ind"
class="numCell"
:style="{width: ind == 8 ? '300px' : '100px',display: ind == 9 ? 'none' : 'table-cell'}"
>
<div :class="bindClass(item1, ind)">
<div :class="bindClass(item1, ind)" v-if="ind !=8 && ind !=9">
<span v-if="item1 > 0 && ind == 3"
></span
>
@ -73,6 +75,7 @@
>
{{ item1 }}
</div>
<el-input v-else-if="ind == 8" @change="((val)=>{enstatNoteChange(val, item)})" v-model="item[ind]"></el-input>
</td>
</tr>
</tbody>
@ -218,6 +221,8 @@ export default {
that.monthGoal[ind] !== undefined
? that.monthGoal[ind]
: "/";
arr[3] = item.note;
arr[4] = item.id;
wrapArr[ind] = arr;
});
wrapArr.forEach((item, index) => {
@ -288,6 +293,8 @@ export default {
sameRate = "/";
}
arrs[7] = sameRate;
arrs[8] = item[3];
arrs[9] = item[4];
wrapArrs.push(arrs);
});
that.tableDatas = wrapArrs;
@ -311,6 +318,12 @@ export default {
this.$XLSX("#myTable", this.tableName);
this.exportLoading = false;
},
enstatNoteChange(val, item){
this.$API.enm.enstat_update.req(item[9], {"note": val}).then((res)=>{
this.$message.success("修改成功");
}
)
}
},
};
</script>
@ -319,4 +332,5 @@ export default {
width: 100%;
overflow-x: auto;
}
</style>