1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-11 13:39:48 +08:00

bugfix with criteria filter (#273)

This commit is contained in:
Leonel Matos 2020-01-29 10:14:36 -04:00 committed by GitHub
parent 99d49b91fc
commit fde8d64a40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 3 deletions

View File

@ -487,13 +487,27 @@ export default {
.then(response => { .then(response => {
if (response.length && !parameters.isNewRecord) { if (response.length && !parameters.isNewRecord) {
this.dataRecords = response[0] this.dataRecords = response[0]
if (this.$route.query.action === 'create-new') { if (this.$route.query.action === 'criteria') {
this.$router.push({ this.$router.push({
name: this.$route.name, name: this.$route.name,
query: { query: {
...this.$route.query ...this.$route.query,
action: this.dataRecordsq
},
params: {
tableName: this.metadata.tableName,
recordId: this.dataRecords[`${this.metadata.tableName}_ID`]
} }
}) })
this.$store.dispatch('notifyPanelChange', {
parentUuid: this.parentUuid,
containerUuid: this.containerUuid,
newValues: this.dataRecords,
isSendToServer: false,
isSendCallout: false,
fieldList: this.fieldList,
panelType: this.panelType
})
} else if (this.$route.query.action === 'reference') { } else if (this.$route.query.action === 'reference') {
this.$router.push({ this.$router.push({
name: this.$route.name, name: this.$route.name,

View File

@ -647,7 +647,7 @@ const panel = {
} }
} else { } else {
if (panelType === 'table' || isAdvancedQuery) { if (panelType === 'table' || isAdvancedQuery) {
if (field.isShowedFromUser) { if (field.isShowedFromUser && field.oldValue !== field.value) {
// change action to advanced query on field value is changed in this panel // change action to advanced query on field value is changed in this panel
if (router.currentRoute.query.action !== 'advancedQuery') { if (router.currentRoute.query.action !== 'advancedQuery') {
router.push({ router.push({