fix:el-drawer缓存显示问题
This commit is contained in:
parent
13eb12434f
commit
1e930db135
|
@ -296,16 +296,20 @@
|
|||
</el-container>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<el-drawer title="进度详情" v-model="dialog.detail" :size="'90%'">
|
||||
<detail-dialog :mtaskId="mtaskId" ref="detailDialogs"> </detail-dialog>
|
||||
</el-drawer>
|
||||
<showDrawer
|
||||
ref="showDrawer"
|
||||
v-if="visibleDrawer"
|
||||
:mtaskId="mtaskId"
|
||||
@closed="visibleDrawer = false"
|
||||
>
|
||||
</showDrawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import detailDialog from "./mlog_dept6_detail.vue";
|
||||
import showDrawer from "./mlog_dept6_detail.vue";
|
||||
export default {
|
||||
components: {
|
||||
detailDialog,
|
||||
showDrawer,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -345,6 +349,7 @@ export default {
|
|||
state__in: "",
|
||||
},
|
||||
mtaskId: "",
|
||||
visibleDrawer: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -373,17 +378,10 @@ export default {
|
|||
//工序详情
|
||||
itemClick(row) {
|
||||
this.mtaskId = row.id;
|
||||
this.dialog.detail = true;
|
||||
// this.currentMtask = row;
|
||||
// this.mgroup = row.mgroup;
|
||||
// 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 },
|
||||
// });
|
||||
this.visibleDrawer = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.showDrawer.open();
|
||||
});
|
||||
},
|
||||
handleQueryMtask() {
|
||||
if (this.queryMtaskState) {
|
||||
|
|
|
@ -1,211 +1,242 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<!-- 任务信息 -->
|
||||
<el-header style="height: 20%; padding: 0">
|
||||
<el-card style="width: 100%; height: 100%">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>任务信息</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-descriptions>
|
||||
<el-descriptions-item label="任务编号">{{
|
||||
currentMtask.number
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="产品全称">
|
||||
<span v-if="currentMtask.material_out_">{{
|
||||
currentMtask.material_out_name
|
||||
}}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计划数量">{{
|
||||
currentMtask.count
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="计划日期">{{
|
||||
currentMtask.start_date
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="合格数">{{
|
||||
currentMtask.count_ok
|
||||
}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
</el-header>
|
||||
<!-- 日志 -->
|
||||
<el-main style="padding: 0">
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="addMlog"
|
||||
v-if="currentMtask && currentMtask.state == 20"
|
||||
v-auth="'mlog.create'"
|
||||
>新增</el-button
|
||||
<el-drawer
|
||||
v-model="visible"
|
||||
title="进度详情"
|
||||
:size="'90%'"
|
||||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<!-- 任务信息 -->
|
||||
<el-header style="height: 20%; padding: 0">
|
||||
<el-card style="width: 100%; height: 100%">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>任务信息</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-descriptions>
|
||||
<el-descriptions-item label="任务编号">{{
|
||||
currentMtask.number
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="产品全称">
|
||||
<span v-if="currentMtask.material_out_">{{
|
||||
currentMtask.material_out_name
|
||||
}}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计划数量">{{
|
||||
currentMtask.count
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="计划日期">{{
|
||||
currentMtask.start_date
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="合格数">{{
|
||||
currentMtask.count_ok
|
||||
}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
</el-header>
|
||||
<!-- 日志 -->
|
||||
<el-main style="padding: 0">
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="addMlog"
|
||||
v-if="currentMtask && currentMtask.state == 20"
|
||||
v-auth="'mlog.create'"
|
||||
>新增</el-button
|
||||
>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main style="padding: 0">
|
||||
<scTable
|
||||
ref="mtaskMlogs"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
:params="params"
|
||||
stripe
|
||||
hidePagination
|
||||
hideDo
|
||||
>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main style="padding: 0">
|
||||
<scTable
|
||||
ref="mtaskMlogs"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
:params="params"
|
||||
stripe
|
||||
hidePagination
|
||||
hideDo
|
||||
>
|
||||
<el-table-column
|
||||
label="工序"
|
||||
prop="mgroup_name"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
prop="material_out_"
|
||||
min-width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_out_">{{
|
||||
scope.row.material_out_.name
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="批次号"
|
||||
prop="batch"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="加工设备"
|
||||
prop="equipment_name"
|
||||
></el-table-column>
|
||||
<el-table-column label="领用数量" prop="count_use">
|
||||
</el-table-column>
|
||||
<el-table-column label="加工数量" prop="count_real">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="合格数量"
|
||||
prop="count_ok"
|
||||
></el-table-column>
|
||||
<el-table-column label="不合格数量" align="center">
|
||||
<el-table-column prop="count_n_hs" 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
|
||||
prop="count_n_zdd"
|
||||
label="锥度大"
|
||||
/>
|
||||
<el-table-column prop="count_n_d" label="短" />
|
||||
<!-- 棒 -->
|
||||
<!-- <template v-if="currentMtask.material_out_.name=='光纤预制棒'"> -->
|
||||
<template v-if="material_name.indexOf('棒') > -1">
|
||||
label="工序"
|
||||
prop="mgroup_name"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
prop="material_out_"
|
||||
min-width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_out_">{{
|
||||
scope.row.material_out_.name
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="批次号"
|
||||
prop="batch"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="加工设备"
|
||||
prop="equipment_name"
|
||||
></el-table-column>
|
||||
<el-table-column label="领用数量" prop="count_use">
|
||||
</el-table-column>
|
||||
<el-table-column label="加工数量" prop="count_real">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="合格数量"
|
||||
prop="count_ok"
|
||||
></el-table-column>
|
||||
<el-table-column label="不合格数量" align="center">
|
||||
<el-table-column
|
||||
prop="count_n_dl"
|
||||
label="断裂"
|
||||
prop="count_n_hs"
|
||||
label="划伤"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_qp"
|
||||
label="气泡"
|
||||
prop="count_n_zs"
|
||||
label="挫伤"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_bl"
|
||||
label="不亮"
|
||||
prop="count_n_zz"
|
||||
label="杂质"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_hw"
|
||||
label="横纹"
|
||||
prop="count_n_tw"
|
||||
label="条纹"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_yp"
|
||||
label="有皮"
|
||||
prop="count_n_zdd"
|
||||
label="锥度大"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_bp"
|
||||
label="爆皮"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_sc"
|
||||
label="色差"
|
||||
/>
|
||||
</template>
|
||||
<!-- 管 -->
|
||||
<!-- <template v-if="currentMtask.material_out_.name=='光纤预制管'"> -->
|
||||
<template v-if="material_name.indexOf('管') > -1">
|
||||
<el-table-column
|
||||
prop="count_n_qx"
|
||||
label="气线"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_js"
|
||||
label="结石"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_tydd"
|
||||
label="椭圆度大"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_sw"
|
||||
label="水雾"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_bhpcd"
|
||||
label="壁厚偏差大"
|
||||
/>
|
||||
<el-table-column prop="count_n_wq" label="弯" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作人"
|
||||
prop="update_by_name"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="130">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="table_edit(scope.row)"
|
||||
v-auth="'mlog.update'"
|
||||
v-if="scope.row.submit_time == null"
|
||||
>编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="table_del(scope.row)"
|
||||
v-auth="'mlog.delete'"
|
||||
v-if="scope.row.submit_time == null"
|
||||
>删除
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="mlog_submit(scope.row)"
|
||||
v-auth="'mlog.submit'"
|
||||
v-if="scope.row.submit_time == null"
|
||||
:loading="mlogHandleLoading"
|
||||
>提交
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="mlog_revert(scope.row)"
|
||||
v-auth="'mlog.submit'"
|
||||
v-if="scope.row.submit_time != null"
|
||||
:loading="mlogHandleLoading"
|
||||
>撤回
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="success"
|
||||
@click="table_show(scope.row)"
|
||||
<el-table-column prop="count_n_d" label="短" />
|
||||
<!-- 棒 -->
|
||||
<!-- <template v-if="currentMtask.material_out_.name=='光纤预制棒'"> -->
|
||||
<template
|
||||
v-if="material_name.indexOf('棒') > -1"
|
||||
>
|
||||
日志记录
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-main>
|
||||
<el-table-column
|
||||
prop="count_n_dl"
|
||||
label="断裂"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_qp"
|
||||
label="气泡"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_bl"
|
||||
label="不亮"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_hw"
|
||||
label="横纹"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_yp"
|
||||
label="有皮"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_bp"
|
||||
label="爆皮"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_sc"
|
||||
label="色差"
|
||||
/>
|
||||
</template>
|
||||
<!-- 管 -->
|
||||
<!-- <template v-if="currentMtask.material_out_.name=='光纤预制管'"> -->
|
||||
<template
|
||||
v-if="material_name.indexOf('管') > -1"
|
||||
>
|
||||
<el-table-column
|
||||
prop="count_n_qx"
|
||||
label="气线"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_js"
|
||||
label="结石"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_tydd"
|
||||
label="椭圆度大"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_sw"
|
||||
label="水雾"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_bhpcd"
|
||||
label="壁厚偏差大"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="count_n_wq"
|
||||
label="弯"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作人"
|
||||
prop="update_by_name"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
fixed="right"
|
||||
width="130"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="table_edit(scope.row)"
|
||||
v-auth="'mlog.update'"
|
||||
v-if="scope.row.submit_time == null"
|
||||
>编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="table_del(scope.row)"
|
||||
v-auth="'mlog.delete'"
|
||||
v-if="scope.row.submit_time == null"
|
||||
>删除
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="mlog_submit(scope.row)"
|
||||
v-auth="'mlog.submit'"
|
||||
v-if="scope.row.submit_time == null"
|
||||
:loading="mlogHandleLoading"
|
||||
>提交
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="mlog_revert(scope.row)"
|
||||
v-auth="'mlog.submit'"
|
||||
v-if="scope.row.submit_time != null"
|
||||
:loading="mlogHandleLoading"
|
||||
>撤回
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="success"
|
||||
@click="table_show(scope.row)"
|
||||
>
|
||||
日志记录
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-main>
|
||||
</el-drawer>
|
||||
<save-dialog
|
||||
v-if="dialogSave"
|
||||
ref="saveDialog"
|
||||
|
@ -260,6 +291,7 @@ export default {
|
|||
},
|
||||
mlogId: "",
|
||||
handledate: "",
|
||||
visible: false,
|
||||
dialogSave: false,
|
||||
visibleDrawer: false,
|
||||
};
|
||||
|
@ -269,6 +301,11 @@ export default {
|
|||
this.getMtask();
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.visible = true;
|
||||
this.params.mtask = this.mtaskId;
|
||||
return this;
|
||||
},
|
||||
getMtask() {
|
||||
let that = this;
|
||||
this.$API.pm.mtask.item.req(that.mtaskId).then((res) => {
|
||||
|
@ -339,25 +376,29 @@ export default {
|
|||
this.query = {};
|
||||
},
|
||||
mlog_submit(row) {
|
||||
let that = this;
|
||||
this.$API.wpm.mlog.submit
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("操作成功");
|
||||
this.getMtask(row.mtask);
|
||||
that.$message.success("操作成功");
|
||||
that.getMtask(that.mtask);
|
||||
that.$refs.mtaskMlogs.refresh();
|
||||
})
|
||||
.catch((err) => {});
|
||||
},
|
||||
mlog_revert(row) {
|
||||
this.mlogHandleLoading = true;
|
||||
this.$API.wpm.mlog.revert
|
||||
let that = this;
|
||||
that.mlogHandleLoading = true;
|
||||
that.$API.wpm.mlog.revert
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("撤回成功");
|
||||
this.getMtask(row.mtask);
|
||||
this.mlogHandleLoading = false;
|
||||
that.$message.success("撤回成功");
|
||||
that.$refs.mtaskMlogs.refresh();
|
||||
that.getMtask(that.mtask);
|
||||
that.mlogHandleLoading = false;
|
||||
})
|
||||
.catch((e) => {
|
||||
this.mlogHandleLoading = false;
|
||||
that.mlogHandleLoading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue