fix: Multiple requests block the browser. (#313)

pull/3759/head
EdwinBetanc0urt 2020-02-05 19:16:40 -04:00 committed by GitHub
parent 4bcb532d2d
commit 29ced53bcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 254 additions and 215 deletions

View File

@ -78,7 +78,7 @@ export function getEntity({ tableName, recordId, recordUuid }) {
* @param {string} whereClause * @param {string} whereClause
* @param {array} conditionsList * @param {array} conditionsList
* @param {string} orderByClause * @param {string} orderByClause
* @param {string} nextPageToken * @param {string} pageToken
*/ */
export function getEntitiesList({ export function getEntitiesList({
tableName, tableName,
@ -86,7 +86,7 @@ export function getEntitiesList({
whereClause, whereClause,
conditionsList = [], conditionsList = [],
orderByClause, orderByClause,
nextPageToken: pageToken, pageToken,
pageSize pageSize
}) { }) {
return Instance.call(this).requestListEntities({ return Instance.call(this).requestListEntities({

View File

@ -304,19 +304,21 @@ export default {
} }
}, },
data() { data() {
const activeName = []
if (this.$route.query.action) {
activeName.push('1')
}
return { return {
top: 0, top: 0,
left: 0, left: 0,
isOption: {}, isOption: {},
focusTable: false,
currentRow: null, currentRow: null,
currentTable: 0, currentTable: 0,
visible: this.getShowContextMenuTable, visible: this.getShowContextMenuTable,
searchTable: '', // text from search searchTable: '', // text from search
defaultMaxPagination: 50, defaultMaxPagination: 50,
menuTable: '1', menuTable: '1',
activeName: this.$route.query.action === 'advancedQuery' ? ['1'] : [], activeName,
isFixed: false,
isLoadPanelFromServer: false, isLoadPanelFromServer: false,
rowStyle: { height: '52px' }, rowStyle: { height: '52px' },
sortable: null, sortable: null,
@ -552,11 +554,11 @@ export default {
}, },
methods: { methods: {
actionAdvancedQuery() { actionAdvancedQuery() {
if (this.activeName.length) { const activeNames = []
this.activeName = [] if (!this.activeName.length) {
} else { activeNames.push('1')
this.activeName = ['1']
} }
this.activeName = activeNames
}, },
setCurrent(row) { setCurrent(row) {
this.$refs.multipleTable.setCurrentRow(row) this.$refs.multipleTable.setCurrentRow(row)
@ -625,9 +627,6 @@ export default {
}) })
}, },
sortFields, sortFields,
handleChange(val) {
val = !val
},
headerLabel(field) { headerLabel(field) {
if (field.isMandatory || field.isMandatoryFromLogic) { if (field.isMandatory || field.isMandatoryFromLogic) {
return '* ' + field.name return '* ' + field.name
@ -763,10 +762,6 @@ export default {
}) })
} }
}, },
fixedPanel() {
this.showTableSearch = false
this.isFixed = !this.isFixed
},
async getList() { async getList() {
this.oldgetDataDetail = this.getterDataRecords.map(v => v.id) this.oldgetDataDetail = this.getterDataRecords.map(v => v.id)
this.newgetDataDetail = this.oldgetDataDetail.slice() this.newgetDataDetail = this.oldgetDataDetail.slice()
@ -807,7 +802,7 @@ export default {
classReturn += 'cell-no-edit' classReturn += 'cell-no-edit'
} }
if (field.componentPath === 'FieldNumber') { if (field.componentPath === 'FieldNumber') {
classReturn += 'cell-align-right' classReturn += ' cell-align-right'
} }
// return 'cell-edit' // return 'cell-edit'
return classReturn return classReturn

View File

@ -71,7 +71,6 @@ export const fieldMixin = {
isSendCallout = false isSendCallout = false
} }
if (this.metadata.isAdvancedQuery) { if (this.metadata.isAdvancedQuery) {
isSendToServer = false
isSendCallout = false isSendCallout = false
} }

View File

@ -136,14 +136,17 @@ export default {
}, },
'metadata.value'(value) { 'metadata.value'(value) {
if (!this.metadata.inTable) { if (!this.metadata.inTable) {
if (this.metadata.displayed) {
if (!this.options.some(option => option.key === value)) { if (!this.options.some(option => option.key === value)) {
this.value = value this.value = value
this.getDataLookupItem() this.getDataLookupItem()
} }
}
this.value = value this.value = value
} }
}, },
'metadata.displayColumn'(value) { 'metadata.displayColumn'(value) {
if (this.metadata.displayed) {
if (!this.isEmptyValue(this.value)) { if (!this.isEmptyValue(this.value)) {
if (!this.isEmptyValue(value)) { if (!this.isEmptyValue(value)) {
// verify if exists to add // verify if exists to add
@ -156,8 +159,10 @@ export default {
} }
} }
} }
}
}, },
beforeMount() { beforeMount() {
if (this.metadata.displayed) {
this.options = this.getterLookupAll this.options = this.getterLookupAll
if (!this.isEmptyValue(this.value) && this.metadata.panelType !== 'table') { if (!this.isEmptyValue(this.value) && this.metadata.panelType !== 'table') {
if (!this.findLabel(this.value)) { if (!this.findLabel(this.value)) {
@ -175,6 +180,7 @@ export default {
} }
} }
} }
}
}, },
methods: { methods: {
preHandleChange(value) { preHandleChange(value) {

View File

@ -4,8 +4,8 @@
v-model="value" v-model="value"
:inactive-text="$t('components.switchInactiveText')" :inactive-text="$t('components.switchInactiveText')"
:active-text="$t('components.switchActiveText')" :active-text="$t('components.switchActiveText')"
true-value="true" :true-value="true"
false-value="false" :false-value="false"
:disabled="isDisabled" :disabled="isDisabled"
@change="preHandleChange" @change="preHandleChange"
/> />
@ -42,6 +42,9 @@ export default {
}, },
value(value, oldValue) { value(value, oldValue) {
if (typeof value !== 'boolean') { if (typeof value !== 'boolean') {
if (value === 'N' || value === 'n') {
value = false
}
this.value = Boolean(value) this.value = Boolean(value)
} }
this.preHandleChange('NotSend') this.preHandleChange('NotSend')
@ -58,16 +61,21 @@ export default {
} }
}, },
isReadOnlyForm(value) { isReadOnlyForm(value) {
var fieldReadOnlyForm = FIELD_READ_ONLY_FORM.find(item => item.columnName === this.metadata.columnName) const fieldReadOnlyForm = FIELD_READ_ONLY_FORM.find(item => item.columnName === this.metadata.columnName)
// columnName: IsActive, Processed, Processing // columnName: IsActive, Processed, Processing
if (fieldReadOnlyForm && fieldIsDisplayed(this.metadata)) { if (fieldReadOnlyForm && fieldIsDisplayed(this.metadata)) {
const fieldsExcludes = []
// if isChangedAllForm it does not exclude anything, otherwise it excludes this columnName
if (fieldReadOnlyForm.isChangedAllForm) {
fieldsExcludes.push(this.metadata.columnName)
}
this.$store.dispatch('changeFieldAttributesBoolean', { this.$store.dispatch('changeFieldAttributesBoolean', {
containerUuid: this.metadata.containerUuid, containerUuid: this.metadata.containerUuid,
fieldsIncludes: [], fieldsIncludes: [],
attribute: 'isReadOnlyFromForm', attribute: 'isReadOnlyFromForm',
valueAttribute: Boolean(fieldReadOnlyForm.valueIsReadOnlyForm !== value), valueAttribute: Boolean(fieldReadOnlyForm.valueIsReadOnlyForm !== value),
// if isChangedAllForm it does not exclude anything, otherwise it excludes this columnName fieldsExcludes,
fieldsExcludes: fieldReadOnlyForm.isChangedAllForm ? [] : [this.metadata.columnName],
currenValue: value currenValue: value
}) })
} }

View File

@ -278,10 +278,13 @@ export default {
} }
// edit mode is diferent to create new // edit mode is diferent to create new
const editMode = (!this.inTable && this.field.optionCRUD !== 'create-new') || (this.inTable && !this.isEmptyValue(this.field.recordUuid)) let isWithRecord = this.field.optionCRUD !== 'create-new'
return (!this.field.isUpdateable && editMode) || (isUpdateableAllFields || this.field.isReadOnlyFromForm) if (this.inTable) {
isWithRecord = !this.isEmptyValue(this.field.recordUuid)
} }
if (this.panelType === 'browser') {
return (!this.field.isUpdateable && isWithRecord) || (isUpdateableAllFields || this.field.isReadOnlyFromForm)
} else if (this.panelType === 'browser') {
if (this.inTable) { if (this.inTable) {
// browser result // browser result
return this.field.isReadOnly return this.field.isReadOnly

View File

@ -53,9 +53,10 @@
</div> </div>
</div> </div>
</template> </template>
<div :class="cards()"> <div :class="classCards">
<draggable <draggable
v-if="!isMobile" v-if="!isMobile"
key="draggable-loaded"
:list="fieldGroups" :list="fieldGroups"
v-bind="$attrs" v-bind="$attrs"
:set-data="setData" :set-data="setData"
@ -283,12 +284,20 @@ export default {
} }
} }
return false return false
},
classCards() {
if (this.isMobile || this.fieldGroups.length < 2 || this.getterIsShowedRecordNavigation) {
return 'cards-not-group'
}
return 'cards-in-group'
} }
}, },
watch: { watch: {
// used only panel modal (process associated in browser or window) // used only panel modal (process associated in browser or window)
containerUuid() { containerUuid() {
if (['report', 'process'].includes(this.panelType)) {
this.generatePanel(this.metadata.fieldList) this.generatePanel(this.metadata.fieldList)
}
}, },
// used if the first load contains a uuid // used if the first load contains a uuid
isLoadRecord(value) { isLoadRecord(value) {
@ -317,12 +326,6 @@ export default {
this.getPanel() this.getPanel()
}, },
methods: { methods: {
cards() {
if (this.isMobile || this.fieldGroups.length < 2 || this.getterIsShowedRecordNavigation) {
return 'cards-not-group'
}
return 'cards-in-group'
},
/** /**
* Get the tab object with all its attributes as well as the fields it contains * Get the tab object with all its attributes as well as the fields it contains
*/ */
@ -564,31 +567,31 @@ export default {
/** /**
* Group the arrangement into groups of columns that they contain, it must * Group the arrangement into groups of columns that they contain, it must
* be grouped after having the order * be grouped after having the order
* @param {array} array * @param {array} fieldsList
* @return {array} res * @return {array} groupsList
*/ */
sortAndGroup(arr) { sortAndGroup(fieldsList) {
if (arr === undefined) { if (this.isEmptyValue(fieldsList)) {
return return
} }
let res = [{ let groupsList = [{
groupFinal: '', groupFinal: '',
metadataFields: arr metadataFields: fieldsList
}] }]
// reduce, create array with number groupAssigned element comun // reduce, create array with number groupAssigned element comun
if (this.isPanelWindow) { if (this.isPanelWindow) {
res = arr groupsList = fieldsList
.reduce((res, currentValue) => { .reduce((groupsList, currentValue) => {
if (!res.includes(currentValue.groupAssigned)) { if (!groupsList.includes(currentValue.groupAssigned)) {
res.push(currentValue.groupAssigned) groupsList.push(currentValue.groupAssigned)
} }
return res return groupsList
}, []) }, [])
.map(itemGroup => { .map(itemGroup => {
return { return {
groupFinal: itemGroup, groupFinal: itemGroup,
metadataFields: arr.filter(itemField => { metadataFields: fieldsList.filter(itemField => {
return itemField.groupAssigned === itemGroup return itemField.groupAssigned === itemGroup
}) })
} }
@ -596,26 +599,21 @@ export default {
} }
// count and add the field numbers according to your group // count and add the field numbers according to your group
Object.keys(res).forEach(key => { groupsList.forEach(groupFields => {
let count = 0 const typeG = groupFields.metadataFields[0].typeGroupAssigned
const typeG = res[key].metadataFields[0].typeGroupAssigned groupFields.typeGroup = typeG
res[key].numberFields = res[key].metadataFields.length
res[key].typeGroup = typeG
res[key].numberFields = res[key].metadataFields.length
res[key].metadataFields.forEach((element, index) => { const fieldsDisplayed = groupFields.metadataFields.filter(field => {
if (element.isDisplayed) { return fieldIsDisplayed(field)
count++
}
}) })
if ((this.groupTab.groupType === 'T' && this.groupTab.groupName === res[key].groupFinal) || if ((this.groupTab.groupType === 'T' && this.groupTab.groupName === groupFields.groupFinal) ||
(this.groupTab.groupType !== 'T' && res[key].typeGroup !== 'T')) { (this.groupTab.groupType !== 'T' && groupFields.typeGroup !== 'T')) {
this.groupsView = this.groupsView + 1 this.groupsView = this.groupsView + 1
} }
res[key].activeFields = count groupFields.activeFields = fieldsDisplayed.length
}) })
return res return groupsList
}, },
setTagsViewTitle(actionValue) { setTagsViewTitle(actionValue) {
if (actionValue === 'create-new' || actionValue === '') { if (actionValue === 'create-new' || actionValue === '') {
@ -623,7 +621,7 @@ export default {
} else if (actionValue === 'advancedQuery') { } else if (actionValue === 'advancedQuery') {
this.tagTitle.action = this.$t('tagsView.advancedQuery') this.tagTitle.action = this.$t('tagsView.advancedQuery')
} else { } else {
var field = this.fieldList.find(fieldItem => fieldItem.isIdentifier) const field = this.fieldList.find(fieldItem => fieldItem.isIdentifier)
if (field) { if (field) {
if (this.dataRecords[field.columnName]) { if (this.dataRecords[field.columnName]) {
this.tagTitle.action = this.dataRecords[field.columnName] this.tagTitle.action = this.dataRecords[field.columnName]
@ -635,7 +633,7 @@ export default {
} }
} }
if (this.isPanelWindow) { if (this.isPanelWindow) {
var tempRoute = Object.assign({}, this.$route, { title: `${this.tagTitle.base} - ${this.tagTitle.action}` }) const tempRoute = Object.assign({}, this.$route, { title: `${this.tagTitle.base} - ${this.tagTitle.action}` })
this.$store.dispatch('tagsView/updateVisitedView', tempRoute) this.$store.dispatch('tagsView/updateVisitedView', tempRoute)
} }
}, },
@ -645,8 +643,8 @@ export default {
dataTransfer.setData('Text', '') dataTransfer.setData('Text', '')
}, },
changePanelRecord(uuidRecord) { changePanelRecord(uuidRecord) {
if (uuidRecord !== 'create-new' && uuidRecord !== 'reference' && uuidRecord !== 'advancedQuery' && uuidRecord !== 'criteria') { if (!['create-new', 'reference', 'advancedQuery', 'criteria'].includes(uuidRecord)) {
var recordSelected = this.$store.getters.getDataRecordsList(this.containerUuid).find(record => record.UUID === uuidRecord) const recordSelected = this.$store.getters.getDataRecordsList(this.containerUuid).find(record => record.UUID === uuidRecord)
if (recordSelected) { if (recordSelected) {
this.dataRecords = recordSelected this.dataRecords = recordSelected
this.$store.dispatch('notifyPanelChange', { this.$store.dispatch('notifyPanelChange', {

View File

@ -498,7 +498,7 @@ const data = {
whereClause, whereClause,
conditionsList, conditionsList,
orderByClause, orderByClause,
nextPageToken pageToken: nextPageToken
}) })
.then(dataResponse => { .then(dataResponse => {
const recordsList = dataResponse.recordsList.map(itemRecord => { const recordsList = dataResponse.recordsList.map(itemRecord => {

View File

@ -24,18 +24,10 @@ const panel = {
payload.panel = payload.newPanel payload.panel = payload.newPanel
}, },
changeFieldLogic(state, payload) { changeFieldLogic(state, payload) {
if (payload.isDisplayedFromLogic !== undefined) { payload.field.isDisplayedFromLogic = Boolean(payload.isDisplayedFromLogic)
payload.field.isDisplayedFromLogic = payload.isDisplayedFromLogic payload.field.isMandatoryFromLogic = Boolean(payload.isMandatoryFromLogic)
} payload.field.isReportFromLogic = Boolean(payload.isReportFromLogic)
if (payload.isMandatoryFromLogic !== undefined) {
payload.field.isMandatoryFromLogic = payload.isMandatoryFromLogic
}
if (payload.isReportFromLogic !== undefined) {
payload.field.isReportFromLogic = payload.isReportFromLogic
}
if (payload.parsedDefaultValue !== undefined) {
payload.field.parsedDefaultValue = payload.parsedDefaultValue payload.field.parsedDefaultValue = payload.parsedDefaultValue
}
}, },
dictionaryResetCache(state) { dictionaryResetCache(state) {
state.panel = [] state.panel = []
@ -550,8 +542,57 @@ const panel = {
} }
if (isSendToServer) { if (isSendToServer) {
if (panelType === 'table' || isAdvancedQuery) {
if (field.isShowedFromUser && (field.oldValue !== field.value ||
['NULL', 'NOT_NULL'].includes(field.operator) ||
field.operator !== field.oldOperator)) {
// change action to advanced query on field value is changed in this panel
if (router.currentRoute.query.action !== 'advancedQuery') {
router.push({
query: {
...router.currentRoute.query,
action: 'advancedQuery'
}
})
}
dispatch('getObjectListFromCriteria', {
parentUuid,
containerUuid,
tableName: panel.tableName,
query: panel.query,
whereClause: panel.whereClause,
conditionsList: getters.getParametersToServer({
containerUuid,
isAdvancedQuery: true,
isEvaluateMandatory: false
})
})
.then(response => {
commit('changeField', {
field,
newField: {
...field,
oldOperator: field.operator
}
})
if (response && response.length) {
dispatch('notifyPanelChange', {
parentUuid,
containerUuid,
isAdvancedQuery: false,
newValues: response[0],
isSendToServer: false,
isSendCallout: true,
panelType: 'window'
})
}
})
.catch(error => {
console.warn(`Error getting Advanced Query (notifyFieldChange): ${error.message}. Code: ${error.code}.`)
})
}
} else if (!getters.isNotReadyForSubmit(containerUuid)) {
// TODO: refactory for it and change for a standard method // TODO: refactory for it and change for a standard method
if (!getters.isNotReadyForSubmit(containerUuid)) {
if (field.panelType === 'browser' && fieldIsDisplayed(field)) { if (field.panelType === 'browser' && fieldIsDisplayed(field)) {
dispatch('getBrowserSearch', { dispatch('getBrowserSearch', {
containerUuid, containerUuid,
@ -621,57 +662,6 @@ const panel = {
type: 'info' type: 'info'
}) })
} }
} else {
if (panelType === 'table' || isAdvancedQuery) {
if (field.isShowedFromUser && (field.oldValue !== field.value ||
['NULL', 'NOT_NULL'].includes(field.operator) ||
field.operator !== field.oldOperator)) {
// change action to advanced query on field value is changed in this panel
if (router.currentRoute.query.action !== 'advancedQuery') {
router.push({
query: {
...router.currentRoute.query,
action: 'advancedQuery'
}
})
}
dispatch('getObjectListFromCriteria', {
parentUuid,
containerUuid,
tableName: panel.tableName,
query: panel.query,
whereClause: panel.whereClause,
conditionsList: getters.getParametersToServer({
containerUuid,
isAdvancedQuery: true,
isEvaluateMandatory: false
})
})
.then(response => {
commit('changeField', {
field,
newField: {
...field,
oldOperator: field.operator
}
})
if (response && response.length) {
dispatch('notifyPanelChange', {
parentUuid,
containerUuid,
isAdvancedQuery: false,
newValues: response[0],
isSendToServer: false,
isSendCallout: true,
panelType: 'window'
})
}
})
.catch(error => {
console.warn(`Error getting Advanced Query (notifyFieldChange): ${error.message}. Code: ${error.code}.`)
})
}
}
} }
}, },
changeDependentFieldsList({ commit, dispatch, getters }, { changeDependentFieldsList({ commit, dispatch, getters }, {

View File

@ -230,7 +230,7 @@ const window = {
message: language.t('login.unexpectedError'), message: language.t('login.unexpectedError'),
type: 'error' type: 'error'
}) })
console.warn(`Dictionary Window (State Window) - Error ${error.code}: ${error.message}`) console.warn(`Dictionary Window (State Window) - Error ${error.code}: ${error.message}.`)
}) })
}, },
getTabAndFieldFromServer({ dispatch, getters }, { getTabAndFieldFromServer({ dispatch, getters }, {
@ -271,12 +271,13 @@ const window = {
return fieldItem return fieldItem
}) })
if (!isAdvancedQuery) {
// Get dependent fields // Get dependent fields
fieldsList fieldsList
.filter(field => field.parentFieldsList && field.isActive) .filter(field => field.parentFieldsList && field.isActive)
.forEach((field, index, list) => { .forEach((field, index, list) => {
field.parentFieldsList.forEach(parentColumnName => { field.parentFieldsList.forEach(parentColumnName => {
var parentField = list.find(parentField => { const parentField = list.find(parentField => {
return parentField.columnName === parentColumnName && parentColumnName !== field.columnName return parentField.columnName === parentColumnName && parentColumnName !== field.columnName
}) })
if (parentField) { if (parentField) {
@ -284,6 +285,7 @@ const window = {
} }
}) })
}) })
}
if (!fieldsList.find(field => field.columnName === 'UUID')) { if (!fieldsList.find(field => field.columnName === 'UUID')) {
const attributesOverwrite = { const attributesOverwrite = {
@ -321,7 +323,7 @@ const window = {
message: language.t('login.unexpectedError'), message: language.t('login.unexpectedError'),
type: 'error' type: 'error'
}) })
console.warn(`Dictionary Tab (State Window) - Error ${error.code}: ${error.message}`) console.warn(`Dictionary Tab (State Window) - Error ${error.code}: ${error.message}.`)
}) })
}, },
changeShowedDetailWindow({ commit, state }, { changeShowedDetailWindow({ commit, state }, {

View File

@ -101,11 +101,11 @@ export function generateField(fieldToGenerate, moreAttributes, typeRange = false
parsedDefaultValue, parsedDefaultValue,
parsedDefaultValueTo, parsedDefaultValueTo,
// logics to app // logics to app
isDisplayedFromLogic: fieldToGenerate.isDisplayed, isDisplayedFromLogic: Boolean(fieldToGenerate.isDisplayed),
isReadOnlyFromLogic: undefined, isReadOnlyFromLogic: Boolean(fieldToGenerate.isReadOnly),
isMandatoryFromLogic: undefined, isMandatoryFromLogic: Boolean(fieldToGenerate.isMandatory),
// //
parentFieldsList: getParentFields(fieldToGenerate), parentFieldsList: [],
dependentFieldsList: [], dependentFieldsList: [],
// TODO: Add support on server // TODO: Add support on server
// app attributes // app attributes
@ -124,21 +124,28 @@ export function generateField(fieldToGenerate, moreAttributes, typeRange = false
} }
// evaluate simple logics without context // evaluate simple logics without context
if (!field.isAdvancedQuery) {
field.parentFieldsList = getParentFields(fieldToGenerate)
if (field.displayLogic.trim() !== '' && !field.displayLogic.includes('@')) { if (field.displayLogic.trim() !== '' && !field.displayLogic.includes('@')) {
field.isDisplayedFromLogic = evaluator.evaluateLogic({ field.isDisplayedFromLogic = evaluator.evaluateLogic({
type: 'displayed', type: 'displayed',
logic: field.displayLogic logic: field.displayLogic
}) })
field.isDisplayedFromLogic = Boolean(field.isDisplayedFromLogic)
} }
if (field.mandatoryLogic.trim() !== '' && !field.mandatoryLogic.includes('@')) { if (field.mandatoryLogic.trim() !== '' && !field.mandatoryLogic.includes('@')) {
field.isMandatoryFromLogic = evaluator.evaluateLogic({ field.isMandatoryFromLogic = evaluator.evaluateLogic({
logic: field.mandatoryLogic logic: field.mandatoryLogic
}) })
field.isMandatoryFromLogic = Boolean(field.isMandatoryFromLogic)
} }
if (field.readOnlyLogic.trim() !== '' && !field.readOnlyLogic.includes('@')) { if (field.readOnlyLogic.trim() !== '' && !field.readOnlyLogic.includes('@')) {
field.isReadOnlyFromLogic = evaluator.evaluateLogic({ field.isReadOnlyFromLogic = evaluator.evaluateLogic({
logic: field.readOnlyLogic logic: field.readOnlyLogic
}) })
field.isReadOnlyFromLogic = Boolean(field.isReadOnlyFromLogic)
}
} }
// Sizes from panel and groups // Sizes from panel and groups

View File

@ -5,7 +5,7 @@
> >
<el-container style="height: 86vh;"> <el-container style="height: 86vh;">
<Split> <Split>
<SplitArea :size="!show ? 100 : 50" :min-size="100"> <SplitArea :size="show ? 50 : 100" :min-size="100">
<el-aside width="100%"> <el-aside width="100%">
<split-pane :min-percent="10" :default-percent="defaultPorcentSplitPane" split="vertical"> <split-pane :min-percent="10" :default-percent="defaultPorcentSplitPane" split="vertical">
<template> <template>
@ -53,7 +53,7 @@
<i <i
v-if="isMobile" v-if="isMobile"
class="el-icon-close" class="el-icon-close"
style="position: fixed;padding-top: 15px; color: #000000;font-size: 121%;font-weight: 615!important;padding-left: 9px;" style="position: fixed; padding-top: 15px; color: #000000; font-size: 121%; font-weight: 615 !important; padding-left: 9px;"
@click="handleChangeShowedRecordNavigation()" @click="handleChangeShowedRecordNavigation()"
/> />
</el-aside> </el-aside>
@ -79,7 +79,7 @@
:tabs-list="windowMetadata.tabsListParent" :tabs-list="windowMetadata.tabsListParent"
class="tab-window" class="tab-window"
/> />
<div style="right: 0%;top: 40%;position: absolute;"> <div style="right: 0%; top: 40%; position: absolute;">
<el-button v-show="!show" type="info" icon="el-icon-info" circle style="float: right;" class="el-button-window" @click="conteInfo" /> <el-button v-show="!show" type="info" icon="el-icon-info" circle style="float: right;" class="el-button-window" @click="conteInfo" />
</div> </div>
<div class="small-4 columns"> <div class="small-4 columns">
@ -122,7 +122,7 @@
<SplitArea v-show="isShowedTabChildren" :size="50"> <SplitArea v-show="isShowedTabChildren" :size="50">
<el-header <el-header
v-if="isShowedTabChildren && windowMetadata.tabsListChildren && windowMetadata.tabsListChildren.length" v-if="isShowedTabChildren && windowMetadata.tabsListChildren && windowMetadata.tabsListChildren.length"
style="height: auto; padding-right: 35px !important;padding-bottom: 33px;" style="height: auto; padding-right: 35px !important; padding-bottom: 33px;"
> >
<div class="w-33"> <div class="w-33">
<div class="center"> <div class="center">
@ -150,7 +150,7 @@
</SplitArea> </SplitArea>
<SplitArea :size="show ? 50 : 0"> <SplitArea :size="show ? 50 : 0">
<el-main> <el-main>
<div style="top: 40%;position: absolute;"> <div style="top: 40%; position: absolute;">
<el-button v-show="show" type="info" icon="el-icon-info" circle style="float: right;" class="el-button-window" @click="conteInfo" /> <el-button v-show="show" type="info" icon="el-icon-info" circle style="float: right;" class="el-button-window" @click="conteInfo" />
</div> </div>
<div id="example-1"> <div id="example-1">
@ -161,7 +161,10 @@
<el-tab-pane <el-tab-pane
name="listChatEntries" name="listChatEntries"
> >
<span slot="label"><i class="el-icon-s-comment" /> {{ $t('window.containerInfo.notes') }} </span> <span slot="label">
<i class="el-icon-s-comment" />
{{ $t('window.containerInfo.notes') }}
</span>
<div <div
v-if="getIsChat" v-if="getIsChat"
> >
@ -206,9 +209,13 @@
<el-tab-pane <el-tab-pane
name="listRecordLogs" name="listRecordLogs"
> >
<span slot="label"><svg-icon icon-class="tree-table" /> {{ $t('window.containerInfo.changeLog') }} </span> <span slot="label">
<svg-icon icon-class="tree-table" />
{{ $t('window.containerInfo.changeLog') }}
</span>
<div <div
v-if="getIsChangeLog" v-if="getIsChangeLog"
key="change-log-loaded"
> >
<el-scrollbar wrap-class="scroll-window-log-change"> <el-scrollbar wrap-class="scroll-window-log-change">
<el-timeline> <el-timeline>
@ -240,6 +247,7 @@
</div> </div>
<div <div
v-else v-else
key="change-log-loading"
v-loading="true" v-loading="true"
:element-loading-text="$t('notifications.loading')" :element-loading-text="$t('notifications.loading')"
element-loading-spinner="el-icon-loading" element-loading-spinner="el-icon-loading"
@ -251,9 +259,13 @@
v-if="getIsWorkflowLog" v-if="getIsWorkflowLog"
name="listWorkflowLogs" name="listWorkflowLogs"
> >
<span slot="label"><i class="el-icon-s-help" /> {{ $t('window.containerInfo.workflowLog') }} </span> <span slot="label">
<i class="el-icon-s-help" />
{{ $t('window.containerInfo.workflowLog') }}
</span>
<div <div
v-if="getIsWorkflowLog" v-if="getIsWorkflowLog"
key="workflow-log-loaded"
> >
<el-card <el-card
class="box-card" class="box-card"
@ -287,11 +299,25 @@
trigger="hover" trigger="hover"
> >
<p><b> {{ $t('login.userName') }}:</b> {{ nodeList.userName }} </p> <p><b> {{ $t('login.userName') }}:</b> {{ nodeList.userName }} </p>
<p v-if="!isEmptyValue(nodeList.textMessage)"><b> {{ $t('window.containerInfo.logWorkflow.message') }}:</b> {{ nodeList.textMessage }} </p> <p v-if="!isEmptyValue(nodeList.textMessage)">
<p><b> {{ $t('window.containerInfo.logWorkflow.responsible') }}:</b> {{ nodeList.responsibleName }} </p> <b> {{ $t('window.containerInfo.logWorkflow.message') }}:</b>
<p><b> {{ $t('window.containerInfo.logWorkflow.workflowName') }}:</b> {{ nodeList.workflowStateName }} </p> {{ nodeList.textMessage }}
<p><b> {{ $t('window.containerInfo.logWorkflow.timeElapsed') }}:</b> {{ nodeList.timeElapsed }} </p> </p>
<el-button slot="reference" type="text"> {{ nodeList.nodeName }} </el-button> <p>
<b> {{ $t('window.containerInfo.logWorkflow.responsible') }}:</b>
{{ nodeList.responsibleName }}
</p>
<p>
<b> {{ $t('window.containerInfo.logWorkflow.workflowName') }}:</b>
{{ nodeList.workflowStateName }}
</p>
<p>
<b> {{ $t('window.containerInfo.logWorkflow.timeElapsed') }}:</b>
{{ nodeList.timeElapsed }}
</p>
<el-button slot="reference" type="text">
{{ nodeList.nodeName }}
</el-button>
</el-popover> </el-popover>
</span> </span>
</el-step> </el-step>
@ -305,6 +331,7 @@
</div> </div>
<div <div
v-else v-else
key="workflow-log-loading"
v-loading="true" v-loading="true"
:element-loading-text="$t('notifications.loading')" :element-loading-text="$t('notifications.loading')"
element-loading-spinner="el-icon-loading" element-loading-spinner="el-icon-loading"
@ -409,9 +436,8 @@ export default {
classIsMobile() { classIsMobile() {
if (this.isMobile) { if (this.isMobile) {
return 'open-table-detail-mobile' return 'open-table-detail-mobile'
} else {
return 'open-table-detail'
} }
return 'open-table-detail'
}, },
getterIsShowedRecordNavigation() { getterIsShowedRecordNavigation() {
return this.$store.getters.getIsShowedRecordNavigation(this.windowUuid) return this.$store.getters.getIsShowedRecordNavigation(this.windowUuid)
@ -419,37 +445,42 @@ export default {
iconIsShowedRecordNavigation() { iconIsShowedRecordNavigation() {
if (this.isShowedRecordNavigation) { if (this.isShowedRecordNavigation) {
return 'el-icon-caret-left' return 'el-icon-caret-left'
} else {
return 'el-icon-caret-right'
} }
return 'el-icon-caret-right'
}, },
iconIsShowedAside() { iconIsShowedAside() {
if (this.isShowedRecordPanel) { if (this.isShowedRecordPanel) {
return 'el-icon-caret-left' return 'el-icon-caret-left'
} else {
return 'el-icon-caret-right'
} }
return 'el-icon-caret-right'
}, },
styleMainIsShowedTabChildren() { styleMainIsShowedTabChildren() {
if (this.isShowedTabChildren) { if (this.isShowedTabChildren) {
return { height: 'initial', overflow: 'auto' } return {
} else { height: 'initial',
return { height: 'initial', overflow: 'hidden' } overflow: 'auto'
}
}
return {
height: 'initial',
overflow: 'hidden'
} }
}, },
splitAreaStyle() { splitAreaStyle() {
if (this.isShowedTabChildren) { if (this.isShowedTabChildren) {
return { overflow: 'auto' } return {
} else { overflow: 'auto'
return { overflow: 'hidden' } }
}
return {
overflow: 'hidden'
} }
}, },
sizeAreaStyle() { sizeAreaStyle() {
if (this.isShowedTabChildren) { if (this.isShowedTabChildren) {
return 50 return 50
} else {
return 100
} }
return 100
}, },
// //
getterWindow() { getterWindow() {
@ -920,7 +951,7 @@ export default {
.splitter-pane-resizer.vertical { .splitter-pane-resizer.vertical {
width: 11px; width: 11px;
height: 100%; height: 100%;
background: gray!important; background: gray !important;
margin-left: -5px; margin-left: -5px;
border-left: 5px solid hsla(0,0%,100%,0); border-left: 5px solid hsla(0,0%,100%,0);
border-right: 5px solid hsla(0,0%,100%,0); border-right: 5px solid hsla(0,0%,100%,0);