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

Show sequence options in the table menu (#388)

* Show sequence options in the table menu

* Open sequence modal
This commit is contained in:
elsiosanchez 2020-03-11 21:28:20 -04:00 committed by GitHub
parent 876b51cce3
commit acedbb88de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 6 deletions

View File

@ -326,10 +326,10 @@ export default {
},
computed: {
getterContextMenu() {
const process = this.$store.getters.getContextMenu(this.containerUuid).actions
const process = this.$store.getters.getContextMenu(this.containerUuid)
if (process) {
return process.filter(menu => {
if (menu.type === 'process') {
return process.actions.filter(menu => {
if (menu.type === 'process' || menu.type === 'application') {
return menu
}
})

View File

@ -26,9 +26,9 @@
v-for="(process, key) in processMenu"
v-show="isPanelWindow && processMenu"
:key="key"
:disabled="Boolean(getDataSelection.length < 1)"
:disabled="process.type === 'application' ? false : Boolean(getDataSelection.length < 1)"
index="process"
@click="showModalTable(process)"
@click="process.type === 'application' ? sortTab(process) : showModalTable(process)"
>
{{ process.name }}
</el-menu-item>

View File

@ -157,6 +157,14 @@ export const menuTableMixin = {
},
methods: {
showNotification,
sortTab(actionSequence) {
// TODO: Refactor and remove redundant dispatchs
this.$store.dispatch('setShowDialog', {
type: 'window',
action: actionSequence,
parentRecordUuid: this.$route.query.action
})
},
closeMenu() {
// TODO: Validate to dispatch one action
this.$store.dispatch('showMenuTable', {

View File

@ -197,7 +197,9 @@ const window = {
parentTabs.push(tab)
return tab
}
childrenTabs.push(tab)
if (!tab.isSortTab) {
childrenTabs.push(tab)
}
return tab
})