mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-13 23:20:12 +08:00
change tabs from the path (#376)
This commit is contained in:
parent
c9b53bd536
commit
278fad1bfa
@ -618,7 +618,8 @@ export default {
|
|||||||
if (!this.isEmptyValue(this.$route.params.recordId)) {
|
if (!this.isEmptyValue(this.$route.params.recordId)) {
|
||||||
this.$store.dispatch('listDocumentStatus', {
|
this.$store.dispatch('listDocumentStatus', {
|
||||||
recordUuid: this.$route.query.action,
|
recordUuid: this.$route.query.action,
|
||||||
recordId: this.$route.params.recordId
|
recordId: this.$route.params.recordId,
|
||||||
|
tableName: this.$route.params.tableName
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (actionValue === 'create-new' || this.isEmptyValue(actionValue)) {
|
if (actionValue === 'create-new' || this.isEmptyValue(actionValue)) {
|
||||||
@ -678,11 +679,9 @@ export default {
|
|||||||
async setFocus() {
|
async setFocus() {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
const fieldFocus = this.getterFieldList.find(itemField => {
|
const fieldFocus = this.getterFieldList.find(itemField => {
|
||||||
if (itemField.componentPath !== 'FieldSelect' && itemField.isDisplayed) {
|
if (this.$refs.hasOwnProperty(itemField.columnName)) {
|
||||||
if (this.$refs.hasOwnProperty(itemField.columnName)) {
|
if (fieldIsDisplayed(itemField) && !itemField.isReadOnly && itemField.isUpdateable) {
|
||||||
if (fieldIsDisplayed(itemField) && !itemField.isReadOnly && itemField.isUpdateable) {
|
return true
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -55,11 +55,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// TODO: Remove watchers of action, and pased as props from window
|
'$route.query.tabParent'(actionValue) {
|
||||||
'$route.query.action'(actionValue) {
|
|
||||||
if (this.isEmptyValue(actionValue) || actionValue === 'create-new') {
|
if (this.isEmptyValue(actionValue) || actionValue === 'create-new') {
|
||||||
this.currentTab = '0'
|
this.currentTab = '0'
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
this.currentTab = actionValue
|
||||||
},
|
},
|
||||||
currentTab(newValue, oldValue) {
|
currentTab(newValue, oldValue) {
|
||||||
if (newValue !== oldValue) {
|
if (newValue !== oldValue) {
|
||||||
|
@ -60,6 +60,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
'$route.query.tabChild'(actionValue) {
|
||||||
|
if (this.isEmptyValue(actionValue) || actionValue === 'create-new') {
|
||||||
|
this.currentTabChild = '0'
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.currentTabChild = actionValue
|
||||||
|
},
|
||||||
// Current TabChildren
|
// Current TabChildren
|
||||||
currentTabChild(newValue, oldValue) {
|
currentTabChild(newValue, oldValue) {
|
||||||
if (newValue !== oldValue) {
|
if (newValue !== oldValue) {
|
||||||
|
@ -83,12 +83,16 @@ export default {
|
|||||||
return this.$store.getters.getPanel(this.containerUuid)
|
return this.$store.getters.getPanel(this.containerUuid)
|
||||||
},
|
},
|
||||||
getValueStatus() {
|
getValueStatus() {
|
||||||
if (!this.isEmptyValue(this.getterPanel)) {
|
const panel = this.getterPanel
|
||||||
var status = this.getterPanel.fieldList.find(field => {
|
var status
|
||||||
|
if (!this.isEmptyValue(panel)) {
|
||||||
|
status = panel.fieldList.find(field => {
|
||||||
if (field.columnName === 'DocStatus') {
|
if (field.columnName === 'DocStatus') {
|
||||||
return field
|
return field
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
if (!this.isEmptyValue(status)) {
|
||||||
return status.value
|
return status.value
|
||||||
}
|
}
|
||||||
return 'CL'
|
return 'CL'
|
||||||
|
@ -85,7 +85,7 @@ const contextMenu = {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
listDocumentStatus({ commit }, {
|
listDocumentStatus({ commit }, {
|
||||||
tableName = 'C_Order',
|
tableName,
|
||||||
recordId,
|
recordId,
|
||||||
recordUuid,
|
recordUuid,
|
||||||
documentAction,
|
documentAction,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user