fix: 1592 预报废审核无法进行导出

This commit is contained in:
binbin_pan 2024-05-15 12:09:37 +08:00
parent 04553ab094
commit 4964d48407
6 changed files with 22 additions and 6 deletions

View File

@ -5,7 +5,7 @@ export const config = {
isFormShow: true, // 是否显示表单查询组件
handleWidth: '', // 操作列宽度
formLabel: [
{ f_label: '关键字', f_model: 'keywords', f_type: 'ipt' },
{ f_label: '关键字', f_model: 'keyword', f_type: 'ipt' },
{ f_label: '单位名称', f_model: 'backUnit', f_type: 'sel', f_selList: [] },
{ f_label: '工程名称', f_model: 'backPro', f_type: 'sel', f_selList: [] },
{ f_label: '工机具类型', f_model: 'type', f_type: 'selCas', f_selList: [], optionProps: { value: 'id', } },

View File

@ -15,7 +15,7 @@ export const config = {
isFormShow: true, // 是否显示表单查询组件
handleWidth: '', // 操作列宽度
formLabel: [
{ f_label: '关键字', f_model: 'keywords', f_type: 'ipt' },
{ f_label: '关键字', f_model: 'keyword', f_type: 'ipt' },
{ f_label: '单位名称', f_model: 'backUnit', f_type: 'sel', f_selList: [] },
{ f_label: '工程名称', f_model: 'backPro', f_type: 'sel', f_selList: [] },
{ f_label: '工机具类型', f_model: 'type', f_type: 'selCas', f_selList: [], optionProps: { value: 'id', } },

View File

@ -5,6 +5,7 @@
ref="tbRef"
:config="config"
:sendApi="getForecastWasteListApi"
@getTableSelectionChange="getTableSelectionList"
>
<template slot="export" slot-scope="{ pageParams }">
<el-row :gutter="10" class="mb8">
@ -195,6 +196,7 @@
scrapDetailList: [],
},
tbAllChecked: false, //
dataCondition: [], // taskId
}
},
created() {
@ -227,6 +229,12 @@
getDialogTbSelList(list) {
this.selAuditingList = list
},
getTableSelectionList(list) {
this.dataCondition = []
if (list.length > 0) list.forEach(ele => {
this.dataCondition.push(ele.taskId)
});
},
/* 审核通过 */
async auditingPass() {
if (this.selAuditingList.length < 1) {
@ -301,7 +309,15 @@
},
/* 数据导出 */
handleExport(data) {
console.log(data, '导出的参数')
console.log('🚀 ~ 导出 ~ this.dataCondition:', data, this.dataCondition)
if (this.dataCondition.length > 0) data.dataCondition = this.dataCondition
this.download(
'material/scrap/exportForecastWaste',
{
...data
},
`预报废审核列表_${new Date().getTime()}.xlsx`,
)
},
},
watch: {

View File

@ -17,7 +17,7 @@ export const config = {
isFormShow: true, // 是否显示表单查询组件
handleWidth: '180px', // 操作列宽度
formLabel: [
{ f_label: '关键字', f_model: 'keywords', f_type: 'ipt' },
{ f_label: '关键字', f_model: 'keyword', f_type: 'ipt' },
{ f_label: '单位名称', f_model: 'backUnit', f_type: 'sel', f_selList: [] },
{ f_label: '工程名称', f_model: 'backPro', f_type: 'sel', f_selList: [] },
{ f_label: '工机具类型', f_model: 'type', f_type: 'selCas', f_selList: [], optionProps: { value: 'id', } },

View File

@ -5,7 +5,7 @@ export const config = {
isFormShow: true, // 是否显示表单查询组件
handleWidth: '', // 操作列宽度
formLabel: [
{ f_label: '关键字', f_model: 'keywords', f_type: 'ipt' },
{ f_label: '关键字', f_model: 'keyword', f_type: 'ipt' },
{ f_label: '单位名称', f_model: 'backUnit', f_type: 'sel', f_selList: [] },
{ f_label: '工程名称', f_model: 'backPro', f_type: 'sel', f_selList: [] },
{ f_label: '工机具类型', f_model: 'type', f_type: 'selCas', f_selList: [], optionProps: { value: 'id', } },

View File

@ -5,7 +5,7 @@ export const config = {
isFormShow: true, // 是否显示表单查询组件
handleWidth: '160px', // 操作列宽度
formLabel: [
{ f_label: '关键字', f_model: 'keywords', f_type: 'ipt' },
{ f_label: '关键字', f_model: 'keyword', f_type: 'ipt' },
{ f_label: '单位名称', f_model: 'backUnit', f_type: 'sel', f_selList: [] },
{ f_label: '工程名称', f_model: 'backPro', f_type: 'sel', f_selList: [] },
{ f_label: '工机具类型', f_model: 'type', f_type: 'selCas', f_selList: [], optionProps: { value: 'id', } },