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> </scTable>
</el-card> </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 <check-table
v-if="checkTableShow" v-if="checkTableShow"
ref="checkTable" ref="checkTable"
@ -386,6 +392,7 @@
style="width: 100%;height: 500px;" style="width: 100%;height: 500px;"
></check-table> ></check-table>
</el-card> </el-card>
<div style="height: 200px;"></div>
<save-dialog <save-dialog
v-if="dialog.save" v-if="dialog.save"
ref="saveDialog" ref="saveDialog"

View File

@ -32,24 +32,14 @@
:apiObj="$API.common.upload" :apiObj="$API.common.upload"
@success="upSuccess" @success="upSuccess"
></scFileImport><!-- :templateUrl="checkTemplate" --> ></scFileImport><!-- :templateUrl="checkTemplate" -->
<el-popover </div>
v-model:visible="columnSettingVisible" </div>
placement="bottom-end" <div v-if="columnSettingVisible" class="col-setting-float-panel" @click.stop>
:width="200" <div v-for="col in allColumnOptions" :key="col.key" class="col-setting-item">
trigger="click" <el-checkbox
> :model-value="isColVisible(col.key)"
<template #reference> @change="toggleColumn(col.key)"
<el-button size="small">列设置</el-button> >{{ col.label }}</el-checkbox>
</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> </div>
</div> </div>
@ -582,7 +572,14 @@ export default {
if (event.target && event.target.closest(".action-more")) { if (event.target && event.target.closest(".action-more")) {
return; return;
} }
if (event.target && event.target.closest(".col-setting-float-panel")) {
return;
}
this.openedActionMenu = null; this.openedActionMenu = null;
this.columnSettingVisible = false;
},
openColumnSetting() {
this.columnSettingVisible = !this.columnSettingVisible;
}, },
check_add(){ check_add(){
let that = this; let that = this;
@ -1471,7 +1468,17 @@ tbody tr:nth-child(odd) .sticky-cell{
.more-menu-btn:hover{ .more-menu-btn:hover{
background: #fef0f0; 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; max-height: 300px;
overflow-y: auto; overflow-y: auto;
} }