Browse Source

2025.05.06 ipqc 查询结果列优化

master
jiayang yue 8 months ago
parent
commit
b545d852ea
  1. 36
      src/views/modules/qc/DoInspectionBySeqNo.vue

36
src/views/modules/qc/DoInspectionBySeqNo.vue

@ -294,8 +294,16 @@
:height="300" :height="300"
:data="templateList" :data="templateList"
@row-dblclick="getRowData" @row-dblclick="getRowData"
@selection-change="handleSelectionChange"
ref="singleSelectTable"
border border
style="width: 100%;"> style="width: 100%;">
<el-table-column
type="selection"
header-align="center"
align="center"
width="50">
</el-table-column>
<el-table-column <el-table-column
v-for="(item,index) in templateDetailList" :key="index" v-for="(item,index) in templateDetailList" :key="index"
:sortable="item.columnSortable" :sortable="item.columnSortable"
@ -314,7 +322,8 @@
</el-table> </el-table>
</div> </div>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="templateModelFlag=false">关闭</el-button>
<el-button type="primary" @click="confirmSelection">确认</el-button>
<el-button @click="templateModelFlag=false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -954,7 +963,9 @@
typeOptions: [], typeOptions: [],
currentRow: {}, currentRow: {},
shiftList: [], shiftList: [],
orderSelections: []
orderSelections: [],
selectedTemplate: null,
} }
}, },
@ -1282,6 +1293,27 @@
this.templateModelFlag = false this.templateModelFlag = false
}, },
//
handleSelectionChange(selection) {
if (selection.length > 1) {
//
const lastSelected = selection[selection.length - 1];
this.$refs.singleSelectTable.clearSelection();
this.$refs.singleSelectTable.toggleRowSelection(lastSelected, true);
this.selectedTemplate = lastSelected;
} else {
this.selectedTemplate = selection[0] || null;
}
},
confirmSelection() {
if (!this.selectedTemplate) {
this.$message.warning('请先选择一个模板');
return;
}
this.getRowData(this.selectedTemplate);
},
// //
clickRow (row) { clickRow (row) {
this.currentRow = JSON.parse(JSON.stringify(row)) this.currentRow = JSON.parse(JSON.stringify(row))

Loading…
Cancel
Save