mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 12:01:57 +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 => {
|
const filters = parametersList.map(parameter => {
|
||||||
return {
|
return {
|
||||||
key: parameter.columnName,
|
column_name: parameter.columnName,
|
||||||
value: parameter.value,
|
value: parameter.value,
|
||||||
values: parameter.values
|
value_to: parameter.valueTo
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
return request({
|
return request({
|
||||||
url: '/user-interface/smart-browser/browser-items',
|
url: '/user-interface/smart-browser/browser-items',
|
||||||
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
// Running Parameters
|
// Running Parameters
|
||||||
uuid,
|
uuid,
|
||||||
|
@ -357,12 +357,11 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
headerLabel(field) {
|
headerLabel(field) {
|
||||||
if (field.isMandatory || field.isMandatoryFromLogic && field.isDisplayedGrid) {
|
if (field.isMandatory || field.isMandatoryFromLogic) {
|
||||||
return '* ' + field.name
|
return '* ' + field.name
|
||||||
}
|
}
|
||||||
if (field.isDisplayedGrid) {
|
|
||||||
return field.name
|
return field.name
|
||||||
}
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @param {object} row, row data
|
* @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 { requestBrowserMetadata } from '@/api/ADempiere/dictionary/smart-browser.js'
|
||||||
import { showMessage } from '@/utils/ADempiere/notification'
|
import { showMessage } from '@/utils/ADempiere/notification'
|
||||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||||
@ -50,8 +66,7 @@ const browser = {
|
|||||||
}
|
}
|
||||||
const {
|
const {
|
||||||
query,
|
query,
|
||||||
whereClause,
|
whereClause
|
||||||
process
|
|
||||||
} = browserResponse
|
} = browserResponse
|
||||||
|
|
||||||
// Convert from gRPC
|
// Convert from gRPC
|
||||||
@ -132,7 +147,8 @@ const browser = {
|
|||||||
|
|
||||||
// Convert from gRPC process list
|
// Convert from gRPC process list
|
||||||
const actions = []
|
const actions = []
|
||||||
if (process) {
|
if (!isEmptyValue(browserResponse.process)) {
|
||||||
|
const { process } = browserResponse
|
||||||
actions.push({
|
actions.push({
|
||||||
type: 'process',
|
type: 'process',
|
||||||
panelType: 'process',
|
panelType: 'process',
|
||||||
|
@ -20,10 +20,13 @@ import {
|
|||||||
} from '@/utils/ADempiere/apiConverts/field.js'
|
} from '@/utils/ADempiere/apiConverts/field.js'
|
||||||
import { convertContextInfo } from '@/utils/ADempiere/apiConverts/core.js'
|
import { convertContextInfo } from '@/utils/ADempiere/apiConverts/core.js'
|
||||||
import { camelizeObjectKeys } from '../transformObject'
|
import { camelizeObjectKeys } from '../transformObject'
|
||||||
|
import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js'
|
||||||
|
|
||||||
export function convertProcess(process) {
|
export function convertProcess(process) {
|
||||||
const convertedProcess = camelizeObjectKeys(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
|
return convertedProcess
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,7 +38,9 @@ export function convertReportExportType(reportExportType) {
|
|||||||
export function convertBrowser(browser) {
|
export function convertBrowser(browser) {
|
||||||
const convertedBrowser = camelizeObjectKeys(browser)
|
const convertedBrowser = camelizeObjectKeys(browser)
|
||||||
convertedBrowser.window = convertWindow(browser.window)
|
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))
|
convertedBrowser.fields = browser.fields.map(fieldItem => convertField(fieldItem))
|
||||||
return convertedBrowser
|
return convertedBrowser
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user