|
|
|
@ -294,8 +294,16 @@ |
|
|
|
:height="300" |
|
|
|
:data="templateList" |
|
|
|
@row-dblclick="getRowData" |
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
ref="singleSelectTable" |
|
|
|
border |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
type="selection" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="50"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in templateDetailList" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
@ -314,7 +322,8 @@ |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<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-dialog> |
|
|
|
|
|
|
|
@ -954,7 +963,9 @@ |
|
|
|
typeOptions: [], |
|
|
|
currentRow: {}, |
|
|
|
shiftList: [], |
|
|
|
orderSelections: [] |
|
|
|
orderSelections: [], |
|
|
|
|
|
|
|
selectedTemplate: null, |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
@ -1282,6 +1293,27 @@ |
|
|
|
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) { |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(row)) |
|
|
|
|