mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-09-27 17:20:02 +08:00
bugfix print format selection after report (#255)
This commit is contained in:
parent
68d8a1f55b
commit
f1dc173558
@ -518,6 +518,12 @@ export const contextMixin = {
|
|||||||
reportType: this.$store.getters.getReportType,
|
reportType: this.$store.getters.getReportType,
|
||||||
option: action.option
|
option: action.option
|
||||||
}
|
}
|
||||||
|
if (this.isEmptyValue(updateReportParams.instanceUuid)) {
|
||||||
|
updateReportParams.instanceUuid = this.$route.params.instanceUuid
|
||||||
|
}
|
||||||
|
if (this.isEmptyValue(updateReportParams.processId)) {
|
||||||
|
updateReportParams.processId = this.$route.params.processId
|
||||||
|
}
|
||||||
this.$store.dispatch('getReportOutputFromServer', updateReportParams)
|
this.$store.dispatch('getReportOutputFromServer', updateReportParams)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (!response.isError) {
|
if (!response.isError) {
|
||||||
|
@ -449,7 +449,7 @@ const processControl = {
|
|||||||
if (reportType !== 'pdf' && reportType !== 'html') {
|
if (reportType !== 'pdf' && reportType !== 'html') {
|
||||||
link.click()
|
link.click()
|
||||||
}
|
}
|
||||||
|
const contextMenuMetadata = rootGetters.getContextMenu(processResult.processUuid)
|
||||||
// Report views List to context menu
|
// Report views List to context menu
|
||||||
const reportViewList = {
|
const reportViewList = {
|
||||||
name: language.t('views.reportView'),
|
name: language.t('views.reportView'),
|
||||||
@ -472,7 +472,6 @@ const processControl = {
|
|||||||
reportViewList.childs = responseReportView
|
reportViewList.childs = responseReportView
|
||||||
if (reportViewList.childs.length) {
|
if (reportViewList.childs.length) {
|
||||||
// Get contextMenu metadata and concat print report views with contextMenu actions
|
// Get contextMenu metadata and concat print report views with contextMenu actions
|
||||||
const contextMenuMetadata = rootGetters.getContextMenu(processResult.processUuid)
|
|
||||||
contextMenuMetadata.actions.push(reportViewList)
|
contextMenuMetadata.actions.push(reportViewList)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -500,10 +499,14 @@ const processControl = {
|
|||||||
printFormatList.childs = printFormarResponse
|
printFormatList.childs = printFormarResponse
|
||||||
if (printFormatList.childs.length) {
|
if (printFormatList.childs.length) {
|
||||||
// Get contextMenu metadata and concat print Format List with contextMenu actions
|
// Get contextMenu metadata and concat print Format List with contextMenu actions
|
||||||
const contextMenuMetadata = rootGetters.getContextMenu(processResult.processUuid)
|
|
||||||
contextMenuMetadata.actions.push(printFormatList)
|
contextMenuMetadata.actions.push(printFormatList)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
var index = contextMenuMetadata.actions.findIndex(action => action.option === 'printFormat')
|
||||||
|
if (index !== -1) {
|
||||||
|
contextMenuMetadata.actions[index] = printFormatList
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Drill Tables to context menu
|
// Drill Tables to context menu
|
||||||
@ -529,7 +532,6 @@ const processControl = {
|
|||||||
drillTablesList.childs = drillTablesResponse
|
drillTablesList.childs = drillTablesResponse
|
||||||
if (drillTablesList.childs.length) {
|
if (drillTablesList.childs.length) {
|
||||||
// Get contextMenu metadata and concat print Format List with contextMenu actions
|
// Get contextMenu metadata and concat print Format List with contextMenu actions
|
||||||
const contextMenuMetadata = rootGetters.getContextMenu(processResult.processUuid)
|
|
||||||
contextMenuMetadata.actions.push(drillTablesList)
|
contextMenuMetadata.actions.push(drillTablesList)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -252,6 +252,7 @@ export function generateProcess({ processToGenerate, containerUuidAssociated = u
|
|||||||
type: 'summary',
|
type: 'summary',
|
||||||
action: '',
|
action: '',
|
||||||
childs: [],
|
childs: [],
|
||||||
|
option: 'printFormat',
|
||||||
uuid: processToGenerate.uuid,
|
uuid: processToGenerate.uuid,
|
||||||
id: processToGenerate.id,
|
id: processToGenerate.id,
|
||||||
description: processToGenerate.description,
|
description: processToGenerate.description,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user