mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-13 23:20:12 +08:00
fix: Reset parameters after run Process. (#415)
* fix: Reset panel after run Process. * Minimal changes.
This commit is contained in:
parent
f47dea22df
commit
c0c758d7ff
@ -341,6 +341,7 @@ const panel = {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatch('notifyPanelChange', {
|
dispatch('notifyPanelChange', {
|
||||||
parentUuid,
|
parentUuid,
|
||||||
containerUuid,
|
containerUuid,
|
||||||
@ -352,6 +353,21 @@ const panel = {
|
|||||||
isSendCallout: isNewRecord,
|
isSendCallout: isNewRecord,
|
||||||
isPrivateAccess: false
|
isPrivateAccess: false
|
||||||
})
|
})
|
||||||
|
.then(() => {
|
||||||
|
if (['process', 'report'].includes(panelType)) {
|
||||||
|
const fieldsUser = panel.fieldList.filter(itemField => {
|
||||||
|
return itemField.isShowedFromUserDefault || !isEmptyValue(itemField.value)
|
||||||
|
}).map(itemField => {
|
||||||
|
return itemField.columnName
|
||||||
|
})
|
||||||
|
|
||||||
|
dispatch('changeFieldShowedFromUser', {
|
||||||
|
containerUuid,
|
||||||
|
fieldsUser,
|
||||||
|
groupField: ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
resolve(defaultAttributes)
|
resolve(defaultAttributes)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -440,6 +456,7 @@ const panel = {
|
|||||||
|
|
||||||
Promise.all(promisessList)
|
Promise.all(promisessList)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
|
resolve()
|
||||||
const calloutsToExecute = []
|
const calloutsToExecute = []
|
||||||
if (isSendCallout) {
|
if (isSendCallout) {
|
||||||
response.forEach(item => {
|
response.forEach(item => {
|
||||||
|
@ -188,24 +188,18 @@ const processControl = {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const timeInitialized = (new Date()).getTime()
|
const timeInitialized = (new Date()).getTime()
|
||||||
let processResult
|
let processResult = {
|
||||||
if (!isEmptyValue(isActionDocument)) {
|
|
||||||
processResult = {
|
|
||||||
// panel attributes from where it was executed
|
// panel attributes from where it was executed
|
||||||
parentUuid,
|
parentUuid,
|
||||||
containerUuid,
|
containerUuid,
|
||||||
panelType,
|
panelType,
|
||||||
lastRun: timeInitialized,
|
lastRun: timeInitialized,
|
||||||
processUuid: action.uuid,
|
|
||||||
processId: action.id,
|
|
||||||
processName: 'Procesar Orden',
|
|
||||||
parameters: parametersList,
|
|
||||||
parametersList,
|
parametersList,
|
||||||
|
logs: [],
|
||||||
isError: false,
|
isError: false,
|
||||||
isProcessing: true,
|
isProcessing: true,
|
||||||
summary: '',
|
summary: '',
|
||||||
resultTableName: '',
|
resultTableName: '',
|
||||||
logs: [],
|
|
||||||
output: {
|
output: {
|
||||||
uuid: '',
|
uuid: '',
|
||||||
name: '',
|
name: '',
|
||||||
@ -216,20 +210,23 @@ const processControl = {
|
|||||||
reportType: ''
|
reportType: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!isEmptyValue(isActionDocument)) {
|
||||||
|
processResult = {
|
||||||
|
...processResult,
|
||||||
|
processUuid: action.uuid,
|
||||||
|
processId: action.id,
|
||||||
|
processName: 'Procesar Orden',
|
||||||
|
parameters: parametersList
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
const timeInitialized = (new Date()).getTime()
|
|
||||||
// Run process on server and wait for it for notify
|
// Run process on server and wait for it for notify
|
||||||
// uuid of process
|
// uuid of process
|
||||||
processResult = {
|
processResult = {
|
||||||
// panel attributes from where it was executed
|
...processResult,
|
||||||
parentUuid,
|
|
||||||
containerUuid,
|
|
||||||
panelType,
|
|
||||||
menuParentUuid,
|
menuParentUuid,
|
||||||
processIdPath: routeToDelete.path,
|
processIdPath: routeToDelete.path,
|
||||||
printFormatUuid: action.printFormatUuid,
|
printFormatUuid: action.printFormatUuid,
|
||||||
// process attributes
|
// process attributes
|
||||||
lastRun: timeInitialized,
|
|
||||||
action: processDefinition.name,
|
action: processDefinition.name,
|
||||||
name: processDefinition.name,
|
name: processDefinition.name,
|
||||||
description: processDefinition.description,
|
description: processDefinition.description,
|
||||||
@ -238,21 +235,7 @@ const processControl = {
|
|||||||
processId: processDefinition.id,
|
processId: processDefinition.id,
|
||||||
processName: processDefinition.processName,
|
processName: processDefinition.processName,
|
||||||
parameters: finalParameters,
|
parameters: finalParameters,
|
||||||
isError: false,
|
isReport: processDefinition.isReport
|
||||||
isProcessing: true,
|
|
||||||
isReport: processDefinition.isReport,
|
|
||||||
summary: '',
|
|
||||||
resultTableName: '',
|
|
||||||
logs: [],
|
|
||||||
output: {
|
|
||||||
uuid: '',
|
|
||||||
name: '',
|
|
||||||
description: '',
|
|
||||||
fileName: '',
|
|
||||||
output: '',
|
|
||||||
outputStream: '',
|
|
||||||
reportType: ''
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
commit('addInExecution', processResult)
|
commit('addInExecution', processResult)
|
||||||
@ -272,6 +255,14 @@ const processControl = {
|
|||||||
// close view if is process, report.
|
// close view if is process, report.
|
||||||
router.push({ path: '/dashboard' })
|
router.push({ path: '/dashboard' })
|
||||||
dispatch('tagsView/delView', routeToDelete)
|
dispatch('tagsView/delView', routeToDelete)
|
||||||
|
|
||||||
|
// reset panel and set defalt isShowedFromUser
|
||||||
|
if (!processDefinition.isReport) {
|
||||||
|
dispatch('resetPanelToNew', {
|
||||||
|
containerUuid,
|
||||||
|
panelType
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isProcessTableSelection) {
|
if (isProcessTableSelection) {
|
||||||
const windowSelectionProcess = getters.getProcessSelect
|
const windowSelectionProcess = getters.getProcessSelect
|
||||||
@ -853,7 +844,8 @@ const processControl = {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Show modal dialog with process/report, tab (sequence) metadata
|
* Show modal dialog with process/report, tab (sequence) metadata
|
||||||
* @param {object} params
|
* @param {String} type of panel or panelType ('process', 'report', 'window')
|
||||||
|
* @param {Object} action
|
||||||
*/
|
*/
|
||||||
setShowDialog({ state, commit, dispatch, rootGetters }, {
|
setShowDialog({ state, commit, dispatch, rootGetters }, {
|
||||||
type,
|
type,
|
||||||
|
@ -175,6 +175,7 @@ export function generateField({
|
|||||||
// TODO: Add support on server
|
// TODO: Add support on server
|
||||||
// app attributes
|
// app attributes
|
||||||
isShowedFromUser,
|
isShowedFromUser,
|
||||||
|
isShowedFromUserDefault: isShowedFromUser, // set this value when reset panel
|
||||||
isShowedTableFromUser: fieldToGenerate.isDisplayed,
|
isShowedTableFromUser: fieldToGenerate.isDisplayed,
|
||||||
isFixedTableColumn: false,
|
isFixedTableColumn: false,
|
||||||
isSQLValue,
|
isSQLValue,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user