mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-14 16:02:34 +08:00
* Change of main functions of api from the application to the grpc library * Create entity. * Update entity. * Delete entity. * Request entity. * Request entities list. * Rollback entity. * Run process. * Browser search. * Convert API functions to get values. * migrate CRUD and Browser Search. * migrate process control and callout control. * migrate print formats. * migrate recent items, references, context info value, private access * migrate pending documents, favorites, language and translations. * migrate lookups. * fix: Drill table empty name. * Change report output. * Refactor dashboard and language. * Fix dashboard component. * Fix dashboards unsupported, and refactor and remove getting values
74 lines
1.8 KiB
JavaScript
74 lines
1.8 KiB
JavaScript
import { runCallOutRequest } from '@/api/ADempiere/data'
|
|
import { showMessage } from '@/utils/ADempiere/notification'
|
|
|
|
const callOutControl = {
|
|
actions: {
|
|
getCallout({ rootGetters, dispatch }, {
|
|
parentUuid,
|
|
containerUuid,
|
|
callout,
|
|
tableName,
|
|
columnName,
|
|
withOutColumnNames = [],
|
|
inTable = false,
|
|
row,
|
|
value,
|
|
oldValue
|
|
}) {
|
|
const window = rootGetters.getWindow(parentUuid)
|
|
let attributesList = []
|
|
if (inTable) {
|
|
attributesList = rootGetters.getParametersToServer({
|
|
containerUuid,
|
|
row
|
|
})
|
|
} else {
|
|
attributesList = rootGetters.getParametersToServer({
|
|
containerUuid
|
|
})
|
|
}
|
|
|
|
return runCallOutRequest({
|
|
windowUuid: parentUuid,
|
|
tabUuid: containerUuid,
|
|
tableName,
|
|
columnName,
|
|
value,
|
|
oldValue,
|
|
callout,
|
|
attributesList,
|
|
windowNo: window.windowIndex
|
|
})
|
|
.then(calloutResponse => {
|
|
if (inTable) {
|
|
dispatch('notifyRowTableChange', {
|
|
parentUuid,
|
|
containerUuid,
|
|
row: calloutResponse.values,
|
|
isEdit: true
|
|
})
|
|
} else {
|
|
dispatch('notifyPanelChange', {
|
|
parentUuid,
|
|
containerUuid,
|
|
panelType: 'window',
|
|
newValues: calloutResponse.values,
|
|
isSendToServer: false,
|
|
withOutColumnNames,
|
|
isSendCallout: false
|
|
})
|
|
}
|
|
})
|
|
.catch(error => {
|
|
showMessage({
|
|
message: error.message,
|
|
type: 'error'
|
|
})
|
|
console.warn(`Field ${columnName} error callout`, error.message)
|
|
})
|
|
}
|
|
}
|
|
}
|
|
|
|
export default callOutControl
|