1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-13 23:20:12 +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: { computed: {
getterContextMenu() { getterContextMenu() {
const process = this.$store.getters.getContextMenu(this.containerUuid).actions const process = this.$store.getters.getContextMenu(this.containerUuid)
if (process) { if (process) {
return process.filter(menu => { return process.actions.filter(menu => {
if (menu.type === 'process') { if (menu.type === 'process' || menu.type === 'application') {
return menu return menu
} }
}) })

View File

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

View File

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

View File

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