fix:日志输出物料添加列控制

This commit is contained in:
shijing 2026-06-01 16:31:45 +08:00
parent 0d458be6da
commit 1ee913c8cc
2 changed files with 34 additions and 20 deletions

View File

@ -364,7 +364,13 @@
</scTable>
</el-card>
<!-- 输出物料 输出物料追踪类型为单个-->
<el-card v-else style="width: 100%;margin-bottom:1vh" header="输出物料" shadow="never">
<el-card v-else style="width: 100%;margin-bottom:1vh" shadow="never">
<template #header>
<div style="display:flex;align-items:center;justify-content:space-between;">
<span>输出物料</span>
<el-button size="small" v-if="checkTableShow" @click="$refs.checkTable.openColumnSetting()">列设置</el-button>
</div>
</template>
<check-table
v-if="checkTableShow"
ref="checkTable"
@ -386,6 +392,7 @@
style="width: 100%;height: 500px;"
></check-table>
</el-card>
<div style="height: 200px;"></div>
<save-dialog
v-if="dialog.save"
ref="saveDialog"

View File

@ -32,24 +32,14 @@
:apiObj="$API.common.upload"
@success="upSuccess"
></scFileImport><!-- :templateUrl="checkTemplate" -->
<el-popover
v-model:visible="columnSettingVisible"
placement="bottom-end"
:width="200"
trigger="click"
>
<template #reference>
<el-button size="small">列设置</el-button>
</template>
<div class="col-setting-panel">
<div v-for="col in allColumnOptions" :key="col.key" class="col-setting-item">
<el-checkbox
:model-value="isColVisible(col.key)"
@change="toggleColumn(col.key)"
>{{ col.label }}</el-checkbox>
</div>
</div>
</el-popover>
</div>
</div>
<div v-if="columnSettingVisible" class="col-setting-float-panel" @click.stop>
<div v-for="col in allColumnOptions" :key="col.key" class="col-setting-item">
<el-checkbox
:model-value="isColVisible(col.key)"
@change="toggleColumn(col.key)"
>{{ col.label }}</el-checkbox>
</div>
</div>
</div>
@ -582,7 +572,14 @@ export default {
if (event.target && event.target.closest(".action-more")) {
return;
}
if (event.target && event.target.closest(".col-setting-float-panel")) {
return;
}
this.openedActionMenu = null;
this.columnSettingVisible = false;
},
openColumnSetting() {
this.columnSettingVisible = !this.columnSettingVisible;
},
check_add(){
let that = this;
@ -1471,7 +1468,17 @@ tbody tr:nth-child(odd) .sticky-cell{
.more-menu-btn:hover{
background: #fef0f0;
}
.col-setting-panel{
.col-setting-float-panel{
position: absolute;
right: 0;
top: 35px;
z-index: 100;
background: #fff;
border: 1px solid #ebeef5;
border-radius: 4px;
box-shadow: 0 2px 12px rgba(0,0,0,0.12);
padding: 8px 12px;
min-width: 150px;
max-height: 300px;
overflow-y: auto;
}