fix:日志信息测点录入

This commit is contained in:
shijing 2024-05-14 09:42:40 +08:00
parent 85eb08dfb1
commit 2f0401534d
1 changed files with 38 additions and 11 deletions

View File

@ -123,9 +123,12 @@
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<scTable <scTable
ref="mpointStatTable" ref="mpointStatTable"
:data="mpointStat" :apiObj="apiObj"
:query="querymplogX"
:params="querymplogX"
row-key="id" row-key="id"
stripe stripe
hideSetting
:height="300" :height="300"
highlightCurrentRow highlightCurrentRow
> >
@ -135,7 +138,19 @@
prop="mpoint_nickname" prop="mpoint_nickname"
> >
</el-table-column> </el-table-column>
<el-table-column label="录入值" prop="val"> <el-table-column label="班组时间">
<template #default="scope">
<span
>{{ scope.row.year_s }}-{{
scope.row.month_s
}}-{{ scope.row.day_s }}</span
>
</template>
</el-table-column>
<el-table-column
label="录入时间"
prop="create_time"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="操作" label="操作"
@ -725,6 +740,11 @@ export default {
sflogExpForm: { sflogExpForm: {
note: "", note: "",
}, },
querymplogX: {
page: 0,
mpoint__type: 30,
has_create_by: 1,
},
sflogExpVisiable: false, sflogExpVisiable: false,
checkList: [], checkList: [],
stlogList: [], stlogList: [],
@ -732,12 +752,14 @@ export default {
teamOptions: [], teamOptions: [],
sflogexpList: [], sflogexpList: [],
mpointOptions: [], mpointOptions: [],
apiObj: this.$API.wpm.sflogexp.list, apiObj: null,
}; };
}, },
mounted() { mounted() {
this.deptId = this.$route.query.deptId; this.deptId = this.$route.query.deptId;
this.mgroupId = this.$route.query.mgroupId; this.mgroupId = this.$route.query.mgroupId;
this.querymplogX.mgroup = this.mgroupId;
this.apiObj = this.$API.enm.mpoint.stat;
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 == "石灰石破碎") { if (this.form.mgroup_name == "石灰石破碎") {
@ -783,16 +805,18 @@ export default {
form.has_create_by = 1; form.has_create_by = 1;
form.mgroup = that.mgroupId; form.mgroup = that.mgroupId;
that.$API.enm.mpoint.stat.req(form).then((res) => { that.$API.enm.mpoint.stat.req(form).then((res) => {
console.log("res", res);
that.mpointStat = res.results; that.mpointStat = res.results;
this.$refs.mpointStatTable.queryData(form);
// this.$refs.mpointStatTable.queryData(form);
res.results.forEach((item) => { res.results.forEach((item) => {
let month_s = let month_s =
item.month_s > 9 ? item.month_s : "0" + item.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 day_s = item.day_s > 9 ? item.day_s : "0" + item.day_s;
let work_date = item.year_s + "-" + month_s + "-" + day_s; let work_date = item.year_s + "-" + month_s + "-" + day_s;
debugger; // debugger;
console.log("work_date", work_date); // console.log("work_date", work_date);
console.log("that.form.work_date", that.form.work_date); // console.log("that.form.work_date", that.form.work_date);
if (work_date == that.form.work_date) { if (work_date == that.form.work_date) {
that.mpForm.val = item.val; that.mpForm.val = item.val;
this.mpFormVal = true; this.mpFormVal = true;
@ -801,15 +825,17 @@ export default {
}); });
}, },
mpointStat_del(row) { mpointStat_del(row) {
this.$confirm(`确定删除吗?`, "提示", { let that = this;
that.$confirm(`确定删除吗?`, "提示", {
type: "warning", type: "warning",
}).then(() => { }).then(() => {
this.$API.enm.mpoint.statDelete that.$API.enm.mpoint.statDelete
.req(row.id) .req(row.id)
.then((res) => { .then((res) => {
this.$message.success("删除成功"); that.$message.success("删除成功");
that.mpFormVal = false; that.mpFormVal = false;
this.getMpointStat(); that.getMpointStat();
that.$refs.mpointStatTable.refresh();
}) })
.catch((err) => { .catch((err) => {
this.$message.success(err); this.$message.success(err);
@ -1030,6 +1056,7 @@ export default {
that.isSaveing = false; that.isSaveing = false;
that.$message.success("操作成功"); that.$message.success("操作成功");
that.mpFormVal = true; that.mpFormVal = true;
that.$refs.mpointStatTable.refresh();
}) })
.catch((res) => { .catch((res) => {
that.isSaveing = false; that.isSaveing = false;