fix:日志测点录入
This commit is contained in:
parent
3827d3ce86
commit
c25c237cd6
|
@ -40,6 +40,7 @@
|
||||||
<el-form
|
<el-form
|
||||||
ref="teamForm"
|
ref="teamForm"
|
||||||
:model="form"
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
label-width="120px"
|
label-width="120px"
|
||||||
label-position="right"
|
label-position="right"
|
||||||
>
|
>
|
||||||
|
@ -87,20 +88,22 @@
|
||||||
v-model="form.pcoal_heat"
|
v-model="form.pcoal_heat"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
placeholder="煤粉热值"
|
placeholder="煤粉热值"
|
||||||
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 石灰石破碎 -->
|
<!-- 煤粉热值 -->
|
||||||
<el-col
|
<el-col
|
||||||
:md="12"
|
:md="12"
|
||||||
:sm="24"
|
:sm="24"
|
||||||
v-if="mgroupId == '3555859873776693248'"
|
v-if="form.mgroup_name == '回转窑'"
|
||||||
>
|
>
|
||||||
<el-form-item label="石灰石破碎产量">
|
<el-form-item label="煤粉热值">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.pcoal_heat"
|
v-model="form.pcoal_heat"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
placeholder="石灰石破碎产量"
|
placeholder="煤粉热值"
|
||||||
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -115,6 +118,80 @@
|
||||||
>
|
>
|
||||||
</el-footer>
|
</el-footer>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="测点录入" name="mpoint">
|
||||||
|
<el-row>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<scTable
|
||||||
|
ref="mpointStatTable"
|
||||||
|
:data="mpointStat"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
:height="300"
|
||||||
|
highlightCurrentRow
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column
|
||||||
|
label="名称"
|
||||||
|
prop="mpoint_nickname"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="录入值" prop="val">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
fixed="right"
|
||||||
|
align="center"
|
||||||
|
width="60"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
size="small"
|
||||||
|
@click="
|
||||||
|
mpointStat_del(scope.row)
|
||||||
|
"
|
||||||
|
type="danger"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" v-if="!mpFormVal">
|
||||||
|
<el-form
|
||||||
|
ref="mpointForm"
|
||||||
|
:model="mpForm"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="120px"
|
||||||
|
label-position="right"
|
||||||
|
v-if="form.mgroup_name == '石灰石破碎'"
|
||||||
|
>
|
||||||
|
<template
|
||||||
|
v-for="item in mpointOptions"
|
||||||
|
:key="item.id"
|
||||||
|
>
|
||||||
|
<!-- 石灰石破碎 -->
|
||||||
|
<el-form-item :label="item.name">
|
||||||
|
<el-input-number
|
||||||
|
v-model="mpForm.val"
|
||||||
|
controls-position="right"
|
||||||
|
placeholder="请输入"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-form>
|
||||||
|
<el-footer style="text-align: center">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
:loading="isSaveing"
|
||||||
|
@click="submit5"
|
||||||
|
>保存</el-button
|
||||||
|
>
|
||||||
|
</el-footer>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-tab-pane>
|
||||||
<el-tab-pane label="检验" name="second">
|
<el-tab-pane label="检验" name="second">
|
||||||
<el-form
|
<el-form
|
||||||
ref="dialogForm"
|
ref="dialogForm"
|
||||||
|
@ -611,11 +688,15 @@ export default {
|
||||||
visible: false,
|
visible: false,
|
||||||
hideDelete: true,
|
hideDelete: true,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
activeName: "fourth",
|
mpFormVal: false,
|
||||||
|
activeName: "first",
|
||||||
stlogTitle: "新增异常",
|
stlogTitle: "新增异常",
|
||||||
clickItem: {},
|
clickItem: {},
|
||||||
sflogItem: {},
|
sflogItem: {},
|
||||||
form: {},
|
form: {},
|
||||||
|
mpForm: {
|
||||||
|
val: null,
|
||||||
|
},
|
||||||
thirdForm: {
|
thirdForm: {
|
||||||
num: "",
|
num: "",
|
||||||
},
|
},
|
||||||
|
@ -647,8 +728,10 @@ export default {
|
||||||
sflogExpVisiable: false,
|
sflogExpVisiable: false,
|
||||||
checkList: [],
|
checkList: [],
|
||||||
stlogList: [],
|
stlogList: [],
|
||||||
|
mpointStat: [],
|
||||||
teamOptions: [],
|
teamOptions: [],
|
||||||
sflogexpList: [],
|
sflogexpList: [],
|
||||||
|
mpointOptions: [],
|
||||||
apiObj: this.$API.wpm.sflogexp.list,
|
apiObj: this.$API.wpm.sflogexp.list,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -657,6 +740,10 @@ export default {
|
||||||
this.mgroupId = this.$route.query.mgroupId;
|
this.mgroupId = this.$route.query.mgroupId;
|
||||||
let form = this.$TOOL.data.get("sflogItem");
|
let form = this.$TOOL.data.get("sflogItem");
|
||||||
this.form = JSON.parse(form);
|
this.form = JSON.parse(form);
|
||||||
|
if (this.form.mgroup_name == "石灰石破碎") {
|
||||||
|
this.getMpoint();
|
||||||
|
this.getMpointStat();
|
||||||
|
}
|
||||||
console.log(this.form);
|
console.log(this.form);
|
||||||
this.getTeam();
|
this.getTeam();
|
||||||
this.getStlog();
|
this.getStlog();
|
||||||
|
@ -678,6 +765,57 @@ export default {
|
||||||
that.teamOptions = res;
|
that.teamOptions = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getMpoint() {
|
||||||
|
let that = this;
|
||||||
|
let form = {};
|
||||||
|
form.page = 0;
|
||||||
|
form.type = 30;
|
||||||
|
form.enabled = 1;
|
||||||
|
form.mgroup = that.mgroupId;
|
||||||
|
that.$API.enm.mpoint.list.req(form).then((res) => {
|
||||||
|
that.mpointOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getMpointStat() {
|
||||||
|
let that = this;
|
||||||
|
let form = {};
|
||||||
|
form.mpoint__type = 30;
|
||||||
|
form.has_create_by = 1;
|
||||||
|
form.mgroup = that.mgroupId;
|
||||||
|
that.$API.enm.mpoint.stat.req(form).then((res) => {
|
||||||
|
that.mpointStat = res.results;
|
||||||
|
this.$refs.mpointStatTable.queryData(form);
|
||||||
|
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;
|
||||||
|
debugger;
|
||||||
|
console.log("work_date", work_date);
|
||||||
|
console.log("that.form.work_date", that.form.work_date);
|
||||||
|
if (work_date == that.form.work_date) {
|
||||||
|
that.mpForm.val = item.val;
|
||||||
|
this.mpFormVal = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
mpointStat_del(row) {
|
||||||
|
this.$confirm(`确定删除吗?`, "提示", {
|
||||||
|
type: "warning",
|
||||||
|
}).then(() => {
|
||||||
|
this.$API.enm.mpoint.statDelete
|
||||||
|
.req(row.id)
|
||||||
|
.then((res) => {
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
that.mpFormVal = false;
|
||||||
|
this.getMpointStat();
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
this.$message.success(err);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
teamChange(data) {
|
teamChange(data) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.teamOptions.forEach((item) => {
|
that.teamOptions.forEach((item) => {
|
||||||
|
@ -697,6 +835,8 @@ export default {
|
||||||
obj.team = that.form.team;
|
obj.team = that.form.team;
|
||||||
obj.shift = that.form.shift;
|
obj.shift = that.form.shift;
|
||||||
obj.leader = that.form.leader;
|
obj.leader = that.form.leader;
|
||||||
|
obj.val = that.form.val;
|
||||||
|
obj.mpoint = that.form.mpoint;
|
||||||
obj.pcoal_heat = that.form.pcoal_heat;
|
obj.pcoal_heat = that.form.pcoal_heat;
|
||||||
that.$API.wpm.sflog.update
|
that.$API.wpm.sflog.update
|
||||||
.req(that.form.id, obj)
|
.req(that.form.id, obj)
|
||||||
|
@ -876,6 +1016,25 @@ export default {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.sflogExpVisiable = false;
|
this.sflogExpVisiable = false;
|
||||||
},
|
},
|
||||||
|
submit5() {
|
||||||
|
let that = this;
|
||||||
|
that.isSaveing = true;
|
||||||
|
let obj = {};
|
||||||
|
obj.val = that.mpForm.val;
|
||||||
|
obj.sflog = that.form.id;
|
||||||
|
obj.mgroup = that.mgroupId;
|
||||||
|
obj.mpoint = that.mpointOptions[0].id;
|
||||||
|
that.$API.enm.mpoint.statCreate
|
||||||
|
.req(obj)
|
||||||
|
.then((res) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.$message.success("操作成功");
|
||||||
|
that.mpFormVal = true;
|
||||||
|
})
|
||||||
|
.catch((res) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
handlePrint() {
|
handlePrint() {
|
||||||
this.$PRINT("#myReport");
|
this.$PRINT("#myReport");
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue