mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-19 17:54:37 +00:00
[Update] 修改数据库授权详情用户、数据库页面table和card问题
This commit is contained in:
@@ -221,6 +221,9 @@ export default {
|
|||||||
},
|
},
|
||||||
addObjects() {
|
addObjects() {
|
||||||
const objects = this.$refs.select2.getOptionsByValues(this.select2.value)
|
const objects = this.$refs.select2.getOptionsByValues(this.select2.value)
|
||||||
|
if (objects.length === 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
this.performAdd(objects, this).then(
|
this.performAdd(objects, this).then(
|
||||||
() => this.onAddSuccess(objects, this)
|
() => this.onAddSuccess(objects, this)
|
||||||
)
|
)
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :md="14" :sm="24">
|
<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>
|
||||||
<el-col :md="10" :sm="24">
|
<el-col :md="10" :sm="24">
|
||||||
<RelationCard type="primary" v-bind="databaseAppRelationConfig" />
|
<RelationCard type="primary" v-bind="databaseAppRelationConfig" />
|
||||||
@@ -82,7 +82,7 @@ export default {
|
|||||||
that.iHasObjects = [...that.iHasObjects, ...objects]
|
that.iHasObjects = [...that.iHasObjects, ...objects]
|
||||||
that.$refs.select2.clearSelected()
|
that.$refs.select2.clearSelected()
|
||||||
this.$message.success(this.$t('common.updateSuccessMsg'))
|
this.$message.success(this.$t('common.updateSuccessMsg'))
|
||||||
setTimeout(() => location.reload(), 300)
|
this.$refs.ListTable.reloadTable()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
systemUserRelationConfig: {
|
systemUserRelationConfig: {
|
||||||
@@ -116,7 +116,7 @@ export default {
|
|||||||
that.iHasObjects = [...that.iHasObjects, ...objects]
|
that.iHasObjects = [...that.iHasObjects, ...objects]
|
||||||
that.$refs.select2.clearSelected()
|
that.$refs.select2.clearSelected()
|
||||||
this.$message.success(this.$t('common.updateSuccessMsg'))
|
this.$message.success(this.$t('common.updateSuccessMsg'))
|
||||||
setTimeout(() => location.reload(), 300)
|
this.$refs.ListTable.reloadTable()
|
||||||
},
|
},
|
||||||
performDelete: (item) => {
|
performDelete: (item) => {
|
||||||
const itemId = item.value
|
const itemId = item.value
|
||||||
@@ -133,7 +133,7 @@ export default {
|
|||||||
that.select2.disabledValues.splice(i, 1)
|
that.select2.disabledValues.splice(i, 1)
|
||||||
}
|
}
|
||||||
this.$message.success(this.$t('common.deleteSuccessMsg'))
|
this.$message.success(this.$t('common.deleteSuccessMsg'))
|
||||||
setTimeout(() => location.reload(), 300)
|
this.$refs.ListTable.reloadTable()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :md="14" :sm="24">
|
<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>
|
||||||
<el-col :md="10" :sm="24">
|
<el-col :md="10" :sm="24">
|
||||||
<RelationCard type="primary" v-bind="userRelationConfig" />
|
<RelationCard type="primary" v-bind="userRelationConfig" />
|
||||||
@@ -55,9 +55,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
headerActions: {
|
headerActions: {
|
||||||
hasSearch: false,
|
hasSearch: true,
|
||||||
hasLeftActions: false,
|
hasRefresh: true,
|
||||||
hasRightActions: false
|
hasLeftActions: true,
|
||||||
|
hasRightActions: true,
|
||||||
|
hasExport: false,
|
||||||
|
hasImport: false,
|
||||||
|
hasCreate: false,
|
||||||
|
hasBulkDelete: false,
|
||||||
|
hasBulkUpdate: false
|
||||||
},
|
},
|
||||||
userRelationConfig: {
|
userRelationConfig: {
|
||||||
icon: 'fa-user',
|
icon: 'fa-user',
|
||||||
@@ -86,7 +92,7 @@ export default {
|
|||||||
that.iHasObjects = [...that.iHasObjects, ...objects]
|
that.iHasObjects = [...that.iHasObjects, ...objects]
|
||||||
that.$refs.select2.clearSelected()
|
that.$refs.select2.clearSelected()
|
||||||
this.$message.success(this.$t('common.updateSuccessMsg'))
|
this.$message.success(this.$t('common.updateSuccessMsg'))
|
||||||
setTimeout(() => location.reload(), 300)
|
this.$refs.ListTable.reloadTable()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
groupRelationConfig: {
|
groupRelationConfig: {
|
||||||
@@ -112,7 +118,7 @@ export default {
|
|||||||
that.iHasObjects = [...that.iHasObjects, ...objects]
|
that.iHasObjects = [...that.iHasObjects, ...objects]
|
||||||
that.$refs.select2.clearSelected()
|
that.$refs.select2.clearSelected()
|
||||||
this.$message.success(this.$t('common.updateSuccessMsg'))
|
this.$message.success(this.$t('common.updateSuccessMsg'))
|
||||||
setTimeout(() => location.reload(), 300)
|
this.$refs.ListTable.reloadTable()
|
||||||
},
|
},
|
||||||
performDelete: (item) => {
|
performDelete: (item) => {
|
||||||
const objectId = this.object.id
|
const objectId = this.object.id
|
||||||
@@ -129,7 +135,7 @@ export default {
|
|||||||
that.select2.disabledValues.splice(i, 1)
|
that.select2.disabledValues.splice(i, 1)
|
||||||
}
|
}
|
||||||
this.$message.success(this.$t('common.deleteSuccessMsg'))
|
this.$message.success(this.$t('common.deleteSuccessMsg'))
|
||||||
setTimeout(() => location.reload(), 300)
|
this.$refs.ListTable.reloadTable()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user