mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 20:39:48 +08:00
error requests when advanced query (#424)
* current record request in the container info * Delete unnecessary console
This commit is contained in:
parent
24a2a09762
commit
ee9feded0c
@ -675,6 +675,8 @@ export default {
|
||||
}
|
||||
this.setTagsViewTitle(uuidRecord)
|
||||
this.setFocus()
|
||||
const currentRecord = this.getterDataStore.record.find(record => record.UUID === uuidRecord)
|
||||
this.$store.dispatch('currentRecord', currentRecord)
|
||||
},
|
||||
async setFocus() {
|
||||
return new Promise(resolve => {
|
||||
|
@ -28,7 +28,8 @@ const initStateUtils = {
|
||||
isReaded: false,
|
||||
isLoaded: false
|
||||
},
|
||||
panelRight: ''
|
||||
panelRight: '',
|
||||
currentRecord: {}
|
||||
}
|
||||
|
||||
const utils = {
|
||||
@ -97,6 +98,9 @@ const utils = {
|
||||
},
|
||||
resetStateUtils(state) {
|
||||
state = initStateUtils
|
||||
},
|
||||
setCurrentRecor(state, payload) {
|
||||
state.currentRecord = payload
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
@ -160,6 +164,9 @@ const utils = {
|
||||
},
|
||||
setPanelRight({ commit }, panelRight) {
|
||||
commit('setPanelRight', panelRight)
|
||||
},
|
||||
currentRecord({ commit }, record) {
|
||||
commit('setCurrentRecor', record)
|
||||
}
|
||||
},
|
||||
getters: {
|
||||
@ -232,6 +239,9 @@ const utils = {
|
||||
},
|
||||
getPanelRight: (state) => {
|
||||
return state.panelRight
|
||||
},
|
||||
getCurrentRecord: (state) => {
|
||||
return state.currentRecord
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -289,12 +289,6 @@ const windowControl = {
|
||||
}
|
||||
return true
|
||||
})
|
||||
// if (rootGetters.getShowContainerInfo) {
|
||||
// dispatch('listRecordLogs', {
|
||||
// tableName: panel.tableName,
|
||||
// recordId
|
||||
// })
|
||||
// }
|
||||
return updateEntity({
|
||||
tableName: panel.tableName,
|
||||
recordUuid,
|
||||
@ -327,12 +321,12 @@ const windowControl = {
|
||||
recordUuid,
|
||||
eventType: 'UPDATE'
|
||||
})
|
||||
// if (containerInfo) {
|
||||
dispatch('listRecordLogs', {
|
||||
tableName: panel.tableName,
|
||||
recordId
|
||||
})
|
||||
// }
|
||||
if (rootGetters.getShowContainerInfo) {
|
||||
dispatch('listRecordLogs', {
|
||||
tableName: panel.tableName,
|
||||
recordId
|
||||
})
|
||||
}
|
||||
return newValues
|
||||
})
|
||||
.catch(error => {
|
||||
|
@ -529,6 +529,12 @@ export default {
|
||||
})
|
||||
return record
|
||||
},
|
||||
getCurrentRecord() {
|
||||
if (this.isEmptyValue(this.$store.getters.getCurrentRecord)) {
|
||||
return this.getterDataRecords[0]
|
||||
}
|
||||
return this.$store.getters.getCurrentRecord
|
||||
},
|
||||
isWorkflowBarStatus() {
|
||||
const panel = this.$store.getters.getPanel(this.windowMetadata.currentTabUuid)
|
||||
if (!this.isEmptyValue(panel) && panel.isDocument && this.$route.meta.type === 'window' && this.$route.query.action !== 'create-new') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user