mirror of
https://github.com/jumpserver/lina.git
synced 2025-11-13 23:21:00 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8438defcf1 | ||
|
|
00bc6d96a1 | ||
|
|
dd7c492965 | ||
|
|
7c21a6f156 |
@@ -44,11 +44,31 @@ export default {
|
|||||||
dataTable() {
|
dataTable() {
|
||||||
return this.$refs.dataTable.$refs.dataTable
|
return this.$refs.dataTable.$refs.dataTable
|
||||||
},
|
},
|
||||||
|
hasCreateAction() {
|
||||||
|
const hasLeftAction = this.headerActions.hasLeftActions
|
||||||
|
if (hasLeftAction === false) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
const hasCreate = this.headerActions.hasCreate
|
||||||
|
if (hasCreate === false) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
hasCloneAction() {
|
||||||
|
const hasClone = _.get(this.tableConfig, 'columnsMeta.actions.formatterArgs.hasClone', null)
|
||||||
|
if (hasClone) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if (this.hasCreateAction && hasClone == null) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
},
|
||||||
iTableConfig() {
|
iTableConfig() {
|
||||||
const config = deepmerge(this.tableConfig, { extraQuery: this.extraQuery })
|
const config = deepmerge(this.tableConfig, { extraQuery: this.extraQuery })
|
||||||
let hasClone = _.get(config, 'columnsMeta.actions.formatterArgs.hasClone', null)
|
this.$log.debug('Header actions', this.headerActions)
|
||||||
hasClone = !!(this.headerActions.hasCreate && hasClone == null)
|
_.set(config, 'columnsMeta.actions.formatterArgs.hasClone', this.hasCloneAction)
|
||||||
_.set(config, 'columnsMeta.actions.formatterArgs.hasClone', hasClone)
|
|
||||||
this.$log.debug('ListTable: iTableConfig change', config)
|
this.$log.debug('ListTable: iTableConfig change', config)
|
||||||
return config
|
return config
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog
|
<Dialog
|
||||||
v-if="dialogSetting.dialogVisible"
|
|
||||||
:title="this.$t('common.updateSelected')"
|
:title="this.$t('common.updateSelected')"
|
||||||
:visible.sync="dialogSetting.dialogVisible"
|
:visible.sync="dialogSetting.dialogVisible"
|
||||||
width="70%"
|
width="70%"
|
||||||
@@ -99,6 +98,7 @@ export default {
|
|||||||
const url = this.url
|
const url = this.url
|
||||||
const msg = this.updateSuccessMsg
|
const msg = this.updateSuccessMsg
|
||||||
this.$axios.patch(url, validValues).then((res) => {
|
this.$axios.patch(url, validValues).then((res) => {
|
||||||
|
vm.$emit('update')
|
||||||
this.$message.success(msg)
|
this.$message.success(msg)
|
||||||
vm.dialogSetting.dialogVisible = false
|
vm.dialogSetting.dialogVisible = false
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ export default [
|
|||||||
path: `${BASE_URL}/luna/?_=${Date.now()}`,
|
path: `${BASE_URL}/luna/?_=${Date.now()}`,
|
||||||
name: 'WebTerminal',
|
name: 'WebTerminal',
|
||||||
// component: () => window.open(`/luna/?_=${Date.now()}`),
|
// component: () => window.open(`/luna/?_=${Date.now()}`),
|
||||||
meta: { title: i18n.t('route.WebTerminal') },
|
meta: { title: i18n.t('route.WebTerminal') }
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: `${BASE_URL}/koko/elfinder/sftp/?`,
|
path: `${BASE_URL}/koko/elfinder/sftp/?`,
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
:selected-rows="updateSelectedDialogSetting.selectedRows"
|
:selected-rows="updateSelectedDialogSetting.selectedRows"
|
||||||
:form-setting="updateSelectedDialogSetting.formSetting"
|
:form-setting="updateSelectedDialogSetting.formSetting"
|
||||||
:dialog-setting="updateSelectedDialogSetting.dialogSetting"
|
:dialog-setting="updateSelectedDialogSetting.dialogSetting"
|
||||||
|
@update="handleDialogUpdate"
|
||||||
/>
|
/>
|
||||||
<InviteUsersDialog :setting="InviteDialogSetting" @close="handleInviteDialogClose" />
|
<InviteUsersDialog :setting="InviteDialogSetting" @close="handleInviteDialogClose" />
|
||||||
</div>
|
</div>
|
||||||
@@ -288,6 +289,9 @@ export default {
|
|||||||
handleInviteDialogClose() {
|
handleInviteDialogClose() {
|
||||||
this.InviteDialogSetting.InviteDialogVisible = false
|
this.InviteDialogSetting.InviteDialogVisible = false
|
||||||
this.$refs.GenericListPage.$refs.ListTable.reloadTable()
|
this.$refs.GenericListPage.$refs.ListTable.reloadTable()
|
||||||
|
},
|
||||||
|
handleDialogUpdate() {
|
||||||
|
this.$refs.GenericListPage.$refs.ListTable.reloadTable()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user