fix : 测点录入和班组对不上
This commit is contained in:
parent
0fc3670bce
commit
f53b3ca29f
|
@ -202,10 +202,17 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="录入值" prop="val">
|
||||
</el-table-column>
|
||||
<el-table-column label="班组时间">
|
||||
<el-table-column label="班组开始时间">
|
||||
<template #default="scope">
|
||||
<span>
|
||||
{{ scope.row.year_s }}-{{scope.row.month_s}}-{{ scope.row.day_s }}
|
||||
{{ scope.row.sflog_start_time}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="班组结束时间">
|
||||
<template #default="scope">
|
||||
<span>
|
||||
{{ scope.row.sflog_end_time}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -687,6 +694,7 @@ export default {
|
|||
|
||||
let form = this.$TOOL.data.get("sflogItem");
|
||||
this.form = JSON.parse(form);
|
||||
console.log('----------------',this.form);
|
||||
this.querystlog.mgroup = this.mgroupId;
|
||||
this.querystlog.sflogs = this.form.id;
|
||||
this.apiObjStlog = this.$API.wpm.stlog.list;
|
||||
|
@ -728,9 +736,18 @@ export default {
|
|||
if (res.length > 0) {
|
||||
that.mpointOptions = [];
|
||||
res.forEach((item) => {
|
||||
item.mpFormVal = "";
|
||||
item.mpFormVal = null;
|
||||
|
||||
item.mpFormValAble = false;
|
||||
that.mpointOptions.push(item);
|
||||
that.$API.enm.mpoint.stat.req({mpoint: item.id, sflog: this.form.id, page: 0}).then(res=>{
|
||||
if(res.length>0){
|
||||
item.mpFormVal = res[0].val;
|
||||
}else{
|
||||
item.mpFormVal = 0;
|
||||
}
|
||||
that.mpointOptions.push(item);
|
||||
})
|
||||
|
||||
});
|
||||
that.getMpointStat();
|
||||
}
|
||||
|
@ -744,26 +761,6 @@ export default {
|
|||
form.mgroup = that.mgroupId;
|
||||
that.$API.enm.mpoint.stat.req(form).then((res) => {
|
||||
that.mpointStat = res.results;
|
||||
res.results.forEach((item) => {
|
||||
let month_s =
|
||||
item.month_s > 9 ? item.month_s : "0" + item.month_s;
|
||||
let day_s = item.day_s > 9 ? item.day_s : "0" + item.day_s;
|
||||
let work_date = item.year_s + "-" + month_s + "-" + day_s;
|
||||
that.mpointOptions.forEach((item2) => {
|
||||
let work_date =
|
||||
item.year_s + "-" + month_s + "-" + day_s;
|
||||
if (
|
||||
item2.name == item.mpoint_name &&
|
||||
work_date == this.form.work_date
|
||||
) {
|
||||
item2.mpFormValAble = true;
|
||||
item2.mpFormVal = item.val;
|
||||
}
|
||||
});
|
||||
// console.log(that.mpointOptions);
|
||||
that.updateKey = !that.updateKey;
|
||||
that.$forceUpdate();
|
||||
});
|
||||
});
|
||||
},
|
||||
mpointStat_del(row) {
|
||||
|
|
Loading…
Reference in New Issue