mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-07 18:25:45 +08:00
fix: Load Smart Browser. (#889)
Co-authored-by: EdwinBetanc0urt <EdwinBetanco0urt@outlook.com>
This commit is contained in:
parent
6436b33479
commit
a30551d156
@ -47,14 +47,15 @@ export function requestBrowserSearch({
|
||||
}) {
|
||||
const filters = parametersList.map(parameter => {
|
||||
return {
|
||||
key: parameter.columnName,
|
||||
column_name: parameter.columnName,
|
||||
value: parameter.value,
|
||||
values: parameter.values
|
||||
value_to: parameter.valueTo
|
||||
}
|
||||
})
|
||||
|
||||
return request({
|
||||
url: '/user-interface/smart-browser/browser-items',
|
||||
method: 'post',
|
||||
data: {
|
||||
// Running Parameters
|
||||
uuid,
|
||||
|
@ -357,12 +357,11 @@ export default {
|
||||
})
|
||||
},
|
||||
headerLabel(field) {
|
||||
if (field.isMandatory || field.isMandatoryFromLogic && field.isDisplayedGrid) {
|
||||
if (field.isMandatory || field.isMandatoryFromLogic) {
|
||||
return '* ' + field.name
|
||||
}
|
||||
if (field.isDisplayedGrid) {
|
||||
return field.name
|
||||
}
|
||||
|
||||
return field.name
|
||||
},
|
||||
/**
|
||||
* @param {object} row, row data
|
||||
|
@ -1,3 +1,19 @@
|
||||
// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
|
||||
// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
|
||||
// Contributor(s): Edwin Betancourt EdwinBetanc0urt@outlook.com www.erpya.com
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import { requestBrowserMetadata } from '@/api/ADempiere/dictionary/smart-browser.js'
|
||||
import { showMessage } from '@/utils/ADempiere/notification'
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||
@ -50,8 +66,7 @@ const browser = {
|
||||
}
|
||||
const {
|
||||
query,
|
||||
whereClause,
|
||||
process
|
||||
whereClause
|
||||
} = browserResponse
|
||||
|
||||
// Convert from gRPC
|
||||
@ -132,7 +147,8 @@ const browser = {
|
||||
|
||||
// Convert from gRPC process list
|
||||
const actions = []
|
||||
if (process) {
|
||||
if (!isEmptyValue(browserResponse.process)) {
|
||||
const { process } = browserResponse
|
||||
actions.push({
|
||||
type: 'process',
|
||||
panelType: 'process',
|
||||
|
@ -20,10 +20,13 @@ import {
|
||||
} from '@/utils/ADempiere/apiConverts/field.js'
|
||||
import { convertContextInfo } from '@/utils/ADempiere/apiConverts/core.js'
|
||||
import { camelizeObjectKeys } from '../transformObject'
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js'
|
||||
|
||||
export function convertProcess(process) {
|
||||
const convertedProcess = camelizeObjectKeys(process)
|
||||
convertedProcess.parameters = process.parameters.map(parameter => convertField(parameter))
|
||||
if (!isEmptyValue(process.parameters)) {
|
||||
convertedProcess.parameters = process.parameters.map(parameter => convertField(parameter))
|
||||
}
|
||||
return convertedProcess
|
||||
}
|
||||
|
||||
@ -35,7 +38,9 @@ export function convertReportExportType(reportExportType) {
|
||||
export function convertBrowser(browser) {
|
||||
const convertedBrowser = camelizeObjectKeys(browser)
|
||||
convertedBrowser.window = convertWindow(browser.window)
|
||||
convertedBrowser.process = convertProcess(browser.process)
|
||||
if (!isEmptyValue(browser.process)) {
|
||||
convertedBrowser.process = convertProcess(browser.process)
|
||||
}
|
||||
convertedBrowser.fields = browser.fields.map(fieldItem => convertField(fieldItem))
|
||||
return convertedBrowser
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user