1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 20:39:48 +08:00

fix: Report change print format. (#695)

Co-authored-by: EdwinBetanc0urt <EdwinBetanco0urt@outlook.com>
This commit is contained in:
Edwin Betancourt 2021-03-26 17:33:29 -04:00 committed by GitHub
parent 97830cdb47
commit 0d30213637
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 7 deletions

View File

@ -37,7 +37,8 @@ const process = {
let printFormatsAvailable = []
if (responseProcess.isReport) {
printFormatsAvailable = await dispatch('getListPrintFormats', {
processUuid: containerUuid
processUuid: containerUuid,
processId: responseProcess.id
})
}

View File

@ -40,6 +40,7 @@ const reportControl = {
}) {
},
getListPrintFormats({ commit }, {
processId,
processUuid,
@ -70,6 +71,7 @@ const reportControl = {
})
})
},
getReportViewsFromServer({ commit }, {
processId,
processUuid,
@ -103,6 +105,7 @@ const reportControl = {
})
})
},
getDrillTablesFromServer({ commit }, {
processId,
processUuid,
@ -140,7 +143,8 @@ const reportControl = {
})
})
},
getReportOutputFromServer({ commit, getters, rootGetters }, {
getReportOutputFromServer({ state, commit, getters, rootGetters }, {
tableName,
printFormatUuid,
reportViewUuid,
@ -154,8 +158,12 @@ const reportControl = {
}) {
return new Promise(resolve => {
if (isEmptyValue(printFormatUuid)) {
printFormatUuid = getters.getDefaultPrintFormat(processUuid).printFormatUuid
const printFormat = getters.getDefaultPrintFormat(processUuid)
if (!isEmptyValue(printFormat)) {
printFormatUuid = printFormat.printFormatUuid
}
}
const parametersList = rootGetters.getParametersToServer({
containerUuid: processUuid
})

View File

@ -10,16 +10,15 @@ export function convertListPrintFormats(listPrintFormatsToConvert) {
}
export function convertPrintFormat(printFormatToConvert) {
const { id, uuid, name, description } = printFormatToConvert
const { name, description } = printFormatToConvert
return {
id,
uuid,
name,
description,
tableName: printFormatToConvert.table_name,
isDefault: printFormatToConvert.is_default,
reportViewUuid: printFormatToConvert.report_view_uuid
reportViewUuid: printFormatToConvert.report_view_uuid,
printFormatUuid: printFormatToConvert.print_format_uuid
}
}