fix:el-drawer缓存显示问题

This commit is contained in:
shijing 2024-05-29 10:27:41 +08:00
parent 13eb12434f
commit 1e930db135
2 changed files with 256 additions and 217 deletions

View File

@ -296,16 +296,20 @@
</el-container> </el-container>
</el-main> </el-main>
</el-container> </el-container>
<el-drawer title="进度详情" v-model="dialog.detail" :size="'90%'"> <showDrawer
<detail-dialog :mtaskId="mtaskId" ref="detailDialogs"> </detail-dialog> ref="showDrawer"
</el-drawer> v-if="visibleDrawer"
:mtaskId="mtaskId"
@closed="visibleDrawer = false"
>
</showDrawer>
</template> </template>
<script> <script>
import detailDialog from "./mlog_dept6_detail.vue"; import showDrawer from "./mlog_dept6_detail.vue";
export default { export default {
components: { components: {
detailDialog, showDrawer,
}, },
data() { data() {
return { return {
@ -345,6 +349,7 @@ export default {
state__in: "", state__in: "",
}, },
mtaskId: "", mtaskId: "",
visibleDrawer: false,
}; };
}, },
mounted() { mounted() {
@ -373,17 +378,10 @@ export default {
// //
itemClick(row) { itemClick(row) {
this.mtaskId = row.id; this.mtaskId = row.id;
this.dialog.detail = true; this.visibleDrawer = true;
// this.currentMtask = row; this.$nextTick(() => {
// this.mgroup = row.mgroup; this.$refs.showDrawer.open();
// this.material_out = row.material_out_.id; });
// this.handledate = row.start_date;
// this.paramsMlog.mtask = this.mtask;
// this.apiObjMlog = this.$API.wpm.mlog.list;
// this.$router.push({
// name: "mlogDept6Detail",
// query: { mtaskId: row.id },
// });
}, },
handleQueryMtask() { handleQueryMtask() {
if (this.queryMtaskState) { if (this.queryMtaskState) {

View File

@ -1,5 +1,12 @@
<template> <template>
<el-container> <el-container>
<el-drawer
v-model="visible"
title="进度详情"
:size="'90%'"
destroy-on-close
@closed="$emit('closed')"
>
<!-- 任务信息 --> <!-- 任务信息 -->
<el-header style="height: 20%; padding: 0"> <el-header style="height: 20%; padding: 0">
<el-card style="width: 100%; height: 100%"> <el-card style="width: 100%; height: 100%">
@ -86,10 +93,22 @@
prop="count_ok" prop="count_ok"
></el-table-column> ></el-table-column>
<el-table-column label="不合格数量" align="center"> <el-table-column label="不合格数量" align="center">
<el-table-column prop="count_n_hs" label="划伤" /> <el-table-column
<el-table-column prop="count_n_zs" label="挫伤" /> prop="count_n_hs"
<el-table-column prop="count_n_zz" label="杂质" /> label="划伤"
<el-table-column prop="count_n_tw" label="条纹" /> />
<el-table-column
prop="count_n_zs"
label="挫伤"
/>
<el-table-column
prop="count_n_zz"
label="杂质"
/>
<el-table-column
prop="count_n_tw"
label="条纹"
/>
<el-table-column <el-table-column
prop="count_n_zdd" prop="count_n_zdd"
label="锥度大" label="锥度大"
@ -97,7 +116,9 @@
<el-table-column prop="count_n_d" label="短" /> <el-table-column prop="count_n_d" label="短" />
<!-- --> <!-- -->
<!-- <template v-if="currentMtask.material_out_.name=='光纤预制棒'"> --> <!-- <template v-if="currentMtask.material_out_.name=='光纤预制棒'"> -->
<template v-if="material_name.indexOf('棒') > -1"> <template
v-if="material_name.indexOf('棒') > -1"
>
<el-table-column <el-table-column
prop="count_n_dl" prop="count_n_dl"
label="断裂" label="断裂"
@ -129,7 +150,9 @@
</template> </template>
<!-- --> <!-- -->
<!-- <template v-if="currentMtask.material_out_.name=='光纤预制管'"> --> <!-- <template v-if="currentMtask.material_out_.name=='光纤预制管'"> -->
<template v-if="material_name.indexOf('管') > -1"> <template
v-if="material_name.indexOf('管') > -1"
>
<el-table-column <el-table-column
prop="count_n_qx" prop="count_n_qx"
label="气线" label="气线"
@ -150,14 +173,21 @@
prop="count_n_bhpcd" prop="count_n_bhpcd"
label="壁厚偏差大" label="壁厚偏差大"
/> />
<el-table-column prop="count_n_wq" label="弯" /> <el-table-column
prop="count_n_wq"
label="弯"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="操作人" label="操作人"
prop="update_by_name" prop="update_by_name"
></el-table-column> ></el-table-column>
<el-table-column label="操作" fixed="right" width="130"> <el-table-column
label="操作"
fixed="right"
width="130"
>
<template #default="scope"> <template #default="scope">
<el-button <el-button
link link
@ -206,6 +236,7 @@
</el-main> </el-main>
</el-container> </el-container>
</el-main> </el-main>
</el-drawer>
<save-dialog <save-dialog
v-if="dialogSave" v-if="dialogSave"
ref="saveDialog" ref="saveDialog"
@ -260,6 +291,7 @@ export default {
}, },
mlogId: "", mlogId: "",
handledate: "", handledate: "",
visible: false,
dialogSave: false, dialogSave: false,
visibleDrawer: false, visibleDrawer: false,
}; };
@ -269,6 +301,11 @@ export default {
this.getMtask(); this.getMtask();
}, },
methods: { methods: {
open() {
this.visible = true;
this.params.mtask = this.mtaskId;
return this;
},
getMtask() { getMtask() {
let that = this; let that = this;
this.$API.pm.mtask.item.req(that.mtaskId).then((res) => { this.$API.pm.mtask.item.req(that.mtaskId).then((res) => {
@ -339,25 +376,29 @@ export default {
this.query = {}; this.query = {};
}, },
mlog_submit(row) { mlog_submit(row) {
let that = this;
this.$API.wpm.mlog.submit this.$API.wpm.mlog.submit
.req(row.id) .req(row.id)
.then((res) => { .then((res) => {
this.$message.success("操作成功"); that.$message.success("操作成功");
this.getMtask(row.mtask); that.getMtask(that.mtask);
that.$refs.mtaskMlogs.refresh();
}) })
.catch((err) => {}); .catch((err) => {});
}, },
mlog_revert(row) { mlog_revert(row) {
this.mlogHandleLoading = true; let that = this;
this.$API.wpm.mlog.revert that.mlogHandleLoading = true;
that.$API.wpm.mlog.revert
.req(row.id) .req(row.id)
.then((res) => { .then((res) => {
this.$message.success("撤回成功"); that.$message.success("撤回成功");
this.getMtask(row.mtask); that.$refs.mtaskMlogs.refresh();
this.mlogHandleLoading = false; that.getMtask(that.mtask);
that.mlogHandleLoading = false;
}) })
.catch((e) => { .catch((e) => {
this.mlogHandleLoading = false; that.mlogHandleLoading = false;
}); });
}, },
}, },