[Update] 修改数据库授权详情用户、数据库页面table和card问题

This commit is contained in:
Bai
2020-06-16 11:04:17 +08:00
parent ab974d5967
commit 8ebd0b4807
3 changed files with 20 additions and 11 deletions

View File

@@ -221,6 +221,9 @@ export default {
},
addObjects() {
const objects = this.$refs.select2.getOptionsByValues(this.select2.value)
if (objects.length === 0) {
return
}
this.performAdd(objects, this).then(
() => this.onAddSuccess(objects, this)
)

View File

@@ -1,7 +1,7 @@
<template>
<el-row :gutter="20">
<el-col :md="14" :sm="24">
<ListTable ref="listTable" :table-config="tableConfig" :header-actions="headerActions" />
<ListTable ref="ListTable" :table-config="tableConfig" :header-actions="headerActions" />
</el-col>
<el-col :md="10" :sm="24">
<RelationCard type="primary" v-bind="databaseAppRelationConfig" />
@@ -82,7 +82,7 @@ export default {
that.iHasObjects = [...that.iHasObjects, ...objects]
that.$refs.select2.clearSelected()
this.$message.success(this.$t('common.updateSuccessMsg'))
setTimeout(() => location.reload(), 300)
this.$refs.ListTable.reloadTable()
}
},
systemUserRelationConfig: {
@@ -116,7 +116,7 @@ export default {
that.iHasObjects = [...that.iHasObjects, ...objects]
that.$refs.select2.clearSelected()
this.$message.success(this.$t('common.updateSuccessMsg'))
setTimeout(() => location.reload(), 300)
this.$refs.ListTable.reloadTable()
},
performDelete: (item) => {
const itemId = item.value
@@ -133,7 +133,7 @@ export default {
that.select2.disabledValues.splice(i, 1)
}
this.$message.success(this.$t('common.deleteSuccessMsg'))
setTimeout(() => location.reload(), 300)
this.$refs.ListTable.reloadTable()
}
}
}

View File

@@ -1,7 +1,7 @@
<template>
<el-row :gutter="20">
<el-col :md="14" :sm="24">
<ListTable ref="listTable" :table-config="tableConfig" :header-actions="headerActions" />
<ListTable ref="ListTable" :table-config="tableConfig" :header-actions="headerActions" />
</el-col>
<el-col :md="10" :sm="24">
<RelationCard type="primary" v-bind="userRelationConfig" />
@@ -55,9 +55,15 @@ export default {
}
},
headerActions: {
hasSearch: false,
hasLeftActions: false,
hasRightActions: false
hasSearch: true,
hasRefresh: true,
hasLeftActions: true,
hasRightActions: true,
hasExport: false,
hasImport: false,
hasCreate: false,
hasBulkDelete: false,
hasBulkUpdate: false
},
userRelationConfig: {
icon: 'fa-user',
@@ -86,7 +92,7 @@ export default {
that.iHasObjects = [...that.iHasObjects, ...objects]
that.$refs.select2.clearSelected()
this.$message.success(this.$t('common.updateSuccessMsg'))
setTimeout(() => location.reload(), 300)
this.$refs.ListTable.reloadTable()
}
},
groupRelationConfig: {
@@ -112,7 +118,7 @@ export default {
that.iHasObjects = [...that.iHasObjects, ...objects]
that.$refs.select2.clearSelected()
this.$message.success(this.$t('common.updateSuccessMsg'))
setTimeout(() => location.reload(), 300)
this.$refs.ListTable.reloadTable()
},
performDelete: (item) => {
const objectId = this.object.id
@@ -129,7 +135,7 @@ export default {
that.select2.disabledValues.splice(i, 1)
}
this.$message.success(this.$t('common.deleteSuccessMsg'))
setTimeout(() => location.reload(), 300)
this.$refs.ListTable.reloadTable()
}
}
}