fix:日志详情添加停机时间,修正新增编辑的bug
This commit is contained in:
parent
979ad5870d
commit
ce9fdf52b4
|
@ -325,6 +325,10 @@
|
||||||
label="发生时间"
|
label="发生时间"
|
||||||
prop="start_time"
|
prop="start_time"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="结束时间"
|
||||||
|
prop="end_time"
|
||||||
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="原因类别"
|
label="原因类别"
|
||||||
prop="cate"
|
prop="cate"
|
||||||
|
@ -383,13 +387,27 @@
|
||||||
highlightCurrentRow
|
highlightCurrentRow
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="处理班组">
|
<el-table-column label="班组名称">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.sflog_">{{
|
<span v-if="scope.row.sflog_">{{
|
||||||
scope.row.sflog_.shift_name
|
scope.row.sflog_.shift_name
|
||||||
}}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="开始时间">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.sflog_">{{
|
||||||
|
scope.row.sflog_.start_time
|
||||||
|
}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="结束时间">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.sflog_">{{
|
||||||
|
scope.row.sflog_.end_time
|
||||||
|
}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="所在工段">
|
<el-table-column label="所在工段">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.sflog_">{{
|
<span v-if="scope.row.sflog_">{{
|
||||||
|
@ -550,11 +568,19 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-footer>
|
<el-footer>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-if="sflogExpVisiable"
|
||||||
type="primary"
|
type="primary"
|
||||||
:loading="isSaveing"
|
:loading="isSaveing"
|
||||||
@click="submit42"
|
@click="submit42"
|
||||||
>保存</el-button
|
>保存</el-button
|
||||||
>
|
>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
type="primary"
|
||||||
|
:loading="isSaveing"
|
||||||
|
@click="submit4"
|
||||||
|
>保存</el-button
|
||||||
|
>
|
||||||
<el-button @click="visible = false"
|
<el-button @click="visible = false"
|
||||||
>取消</el-button
|
>取消</el-button
|
||||||
>
|
>
|
||||||
|
@ -715,7 +741,7 @@ export default {
|
||||||
getStlog() {
|
getStlog() {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.page = 0;
|
obj.page = 0;
|
||||||
obj.sflog = this.form.id;
|
obj.mgroup = this.mgroupId;
|
||||||
this.$API.wpm.stlog.list.req(obj).then((res) => {
|
this.$API.wpm.stlog.list.req(obj).then((res) => {
|
||||||
this.stlogList = res;
|
this.stlogList = res;
|
||||||
});
|
});
|
||||||
|
@ -735,18 +761,22 @@ export default {
|
||||||
this.stlogForm.handler = this.$TOOL.data.get("USER_INFO").id;
|
this.stlogForm.handler = this.$TOOL.data.get("USER_INFO").id;
|
||||||
this.stlogForm.mgroup = this.mgroupId;
|
this.stlogForm.mgroup = this.mgroupId;
|
||||||
this.stlogTitle = "新增异常";
|
this.stlogTitle = "新增异常";
|
||||||
|
this.sflogExpVisiable = false;
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
},
|
},
|
||||||
//异常编辑
|
//异常编辑
|
||||||
editStlog(row) {
|
editStlog(row) {
|
||||||
this.stlogTitle = "编辑异常";
|
this.stlogTitle = "编辑异常";
|
||||||
this.stlogForm = row;
|
this.stlogForm = row;
|
||||||
|
this.stlogForm.current_sflog = row.sflog;
|
||||||
|
this.sflogExpVisiable = false;
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
},
|
},
|
||||||
handleStlog() {
|
handleStlog() {
|
||||||
this.stlogTitle = "异常处理";
|
this.stlogTitle = "异常处理";
|
||||||
this.stlogForm = row;
|
this.stlogForm = row;
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
this.sflogExpVisiable = true;
|
||||||
},
|
},
|
||||||
//新增异常提交
|
//新增异常提交
|
||||||
submit4() {
|
submit4() {
|
||||||
|
@ -767,6 +797,8 @@ export default {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
});
|
});
|
||||||
} else if (that.stlogTitle == "编辑异常") {
|
} else if (that.stlogTitle == "编辑异常") {
|
||||||
|
console.log("that.stlogForm", that.stlogForm);
|
||||||
|
console.log("that.stlogForm.id", that.stlogForm.id);
|
||||||
that.$API.wpm.stlog.update
|
that.$API.wpm.stlog.update
|
||||||
.req(that.stlogForm.id, that.stlogForm)
|
.req(that.stlogForm.id, that.stlogForm)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
@ -794,6 +826,7 @@ export default {
|
||||||
that.getSflogexp(that.clickItem.id);
|
that.getSflogexp(that.clickItem.id);
|
||||||
})
|
})
|
||||||
.catch((res) => {
|
.catch((res) => {
|
||||||
|
this.sflogExpVisiable = false;
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -818,7 +851,6 @@ export default {
|
||||||
console.log(row);
|
console.log(row);
|
||||||
this.clickItem = row;
|
this.clickItem = row;
|
||||||
this.getSflogexp(row.id);
|
this.getSflogexp(row.id);
|
||||||
this.sflogExpVisiable = true;
|
|
||||||
},
|
},
|
||||||
getSflogexp(id) {
|
getSflogexp(id) {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
|
|
Loading…
Reference in New Issue