Compare commits

...

5 Commits

Author SHA1 Message Date
Orange
fd10551de1 fix: 修复加载用户详情页面会有概率加载失败的问题 2020-12-23 11:10:41 +08:00
Orange
8438defcf1 perf: 恢复Web终端入口 2020-11-26 12:37:35 +08:00
ibuler
00bc6d96a1 fix(list): 修复列表克隆的bug 2020-11-26 11:24:52 +08:00
Orange
dd7c492965 fix: 修复批量更新组件的问题 2020-11-23 14:01:07 +08:00
Orange
7c21a6f156 fix: 修复批量批量更新组件的问题 2020-11-22 16:53:52 +08:00
8 changed files with 35 additions and 11 deletions

View File

@@ -44,11 +44,31 @@ export default {
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() {
const config = deepmerge(this.tableConfig, { extraQuery: this.extraQuery })
let hasClone = _.get(config, 'columnsMeta.actions.formatterArgs.hasClone', null)
hasClone = !!(this.headerActions.hasCreate && hasClone == null)
_.set(config, 'columnsMeta.actions.formatterArgs.hasClone', hasClone)
this.$log.debug('Header actions', this.headerActions)
_.set(config, 'columnsMeta.actions.formatterArgs.hasClone', this.hasCloneAction)
this.$log.debug('ListTable: iTableConfig change', config)
return config
}

View File

@@ -1,6 +1,5 @@
<template>
<Dialog
v-if="dialogSetting.dialogVisible"
:title="this.$t('common.updateSelected')"
:visible.sync="dialogSetting.dialogVisible"
width="70%"
@@ -99,6 +98,7 @@ export default {
const url = this.url
const msg = this.updateSuccessMsg
this.$axios.patch(url, validValues).then((res) => {
vm.$emit('update')
this.$message.success(msg)
vm.dialogSetting.dialogVisible = false
}).catch(error => {

View File

@@ -27,8 +27,8 @@ export default [
path: `${BASE_URL}/luna/?_=${Date.now()}`,
name: 'WebTerminal',
// component: () => window.open(`/luna/?_=${Date.now()}`),
meta: { title: i18n.t('route.WebTerminal') },
hidden: true
meta: { title: i18n.t('route.WebTerminal') }
// hidden: true
},
{
path: `${BASE_URL}/koko/elfinder/sftp/?`,

View File

@@ -18,7 +18,7 @@ export default {
data() {
return {
tableConfig: {
url: `/api/v1/perms/application-permissions/?user_id=${this.object.id}&draw=1`,
url: `/api/v1/perms/application-permissions/?user_id=${this.$route.params.id}&draw=1`,
columns: [
'name', 'category_display', 'users_amount', 'user_groups_amount',
'applications_amount', 'system_users_amount',

View File

@@ -19,7 +19,7 @@ export default {
data() {
return {
tableConfig: {
url: `/api/v1/perms/asset-permissions/?user_id=${this.object.id}`,
url: `/api/v1/perms/asset-permissions/?user_id=${this.$route.params.id}`,
hasSelection: false,
hasTree: true,
columns: [

View File

@@ -18,7 +18,7 @@ export default {
data() {
return {
tableConfig: {
url: `/api/v1/perms/users/${this.object.id}/applications/`,
url: `/api/v1/perms/users/${this.$route.params.id}/applications/`,
columns: ['name', 'category_display', 'type', 'asset', 'comment'],
columnsMeta: {
name: {

View File

@@ -18,8 +18,8 @@ export default {
},
data() {
return {
treeUrl: `/api/v1/perms/users/${this.object.id}/nodes/children/tree/?cache_policy=1`,
tableUrl: `/api/v1/perms/users/${this.object.id}/assets/?cache_policy=1&all=1`
treeUrl: `/api/v1/perms/users/${this.$route.params.id}/nodes/children/tree/?cache_policy=1`,
tableUrl: `/api/v1/perms/users/${this.$route.params.id}/assets/?cache_policy=1&all=1`
}
}
}

View File

@@ -9,6 +9,7 @@
:selected-rows="updateSelectedDialogSetting.selectedRows"
:form-setting="updateSelectedDialogSetting.formSetting"
:dialog-setting="updateSelectedDialogSetting.dialogSetting"
@update="handleDialogUpdate"
/>
<InviteUsersDialog :setting="InviteDialogSetting" @close="handleInviteDialogClose" />
</div>
@@ -288,6 +289,9 @@ export default {
handleInviteDialogClose() {
this.InviteDialogSetting.InviteDialogVisible = false
this.$refs.GenericListPage.$refs.ListTable.reloadTable()
},
handleDialogUpdate() {
this.$refs.GenericListPage.$refs.ListTable.reloadTable()
}
}
}