Merge pull request #1506 from jumpserver/pr@dev@org_detail_del_bug

fix: 组织管理 详情bug
This commit is contained in:
feng626 2022-03-15 19:45:55 +08:00 committed by GitHub
commit 57b80ef3fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,9 +9,8 @@
<script> <script>
import { GenericDetailPage, TabPage } from '@/layout/components' import { GenericDetailPage, TabPage } from '@/layout/components'
import OrganizationDetail from './OrganizationDetail' import OrganizationDetail from './OrganizationDetail'
import { getApiPath } from '@/utils/common'
const performDelete = function() { const performDelete = function() {
const url = getApiPath(this) const url = `${this.url}/${this.$route.params.id}/`
return this.$axios.delete(url) return this.$axios.delete(url)
} }
export default { export default {
@ -33,6 +32,9 @@ export default {
} }
], ],
actions: { actions: {
deleteApiUrl: `${this.url}/${this.$route.params.id}/`,
canUpdate: this.$hasPerm('orgs.change_organization'),
canDelete: this.$hasPerm('orgs.delete_organization'),
deleteCallback: function() { deleteCallback: function() {
const msg = this.$t('xpack.Organization.DeleteOrgMsg') const msg = this.$t('xpack.Organization.DeleteOrgMsg')
const title = this.$t('xpack.Organization.DeleteOrgTitle') const title = this.$t('xpack.Organization.DeleteOrgTitle')