fix(系统设置): 修复系统组织_组织列表控制进入组织

This commit is contained in:
xinxin.wu 2024-08-14 16:22:20 +08:00 committed by 刘瑞斌
parent 0d110b154f
commit 9061f5ac79
1 changed files with 25 additions and 18 deletions

View File

@ -35,37 +35,41 @@
v-if="hasAnyPermission(['SYSTEM_ORGANIZATION_PROJECT:READ+UPDATE'])"
class="primary-color"
@click="showProjectDrawer(record)"
>{{ record.projectCount }}</span
>
{{ record.projectCount }}
</span>
<span v-else>{{ record.projectCount }}</span>
</template>
<template #operation="{ record }">
<template v-if="record.deleted">
<MsButton v-permission="['SYSTEM_ORGANIZATION_PROJECT:READ+RECOVER']" @click="handleRevokeDelete(record)">{{
t('common.revokeDelete')
}}</MsButton>
<MsButton v-permission="['SYSTEM_ORGANIZATION_PROJECT:READ+RECOVER']" @click="handleRevokeDelete(record)">
{{ t('common.revokeDelete') }}
</MsButton>
</template>
<template v-else-if="!record.enable">
<MsButton v-permission="['SYSTEM_ORGANIZATION_PROJECT:READ+DELETE']" @click="handleDelete(record)">{{
t('common.delete')
}}</MsButton>
<MsButton v-permission="['SYSTEM_ORGANIZATION_PROJECT:READ+DELETE']" @click="handleDelete(record)">
{{ t('common.delete') }}
</MsButton>
</template>
<template v-else>
<MsButton v-permission="['SYSTEM_ORGANIZATION_PROJECT:READ+UPDATE']" @click="showOrganizationModal(record)">{{
t('common.edit')
}}</MsButton>
<MsButton v-permission="['SYSTEM_ORGANIZATION_PROJECT:READ+ADD_MEMBER']" @click="showAddUserModal(record)">{{
t('system.organization.addMember')
}}</MsButton>
<!-- TODO 后台缺少字段控制 -->
<MsButton v-xpack :disabled="appStore.currentOrgId === record.id" @click="enterOrganization(record.id)">{{
t('system.project.enterOrganization')
}}</MsButton>
<MsButton v-permission="['SYSTEM_ORGANIZATION_PROJECT:READ+UPDATE']" @click="showOrganizationModal(record)">
{{ t('common.edit') }}
</MsButton>
<MsButton v-permission="['SYSTEM_ORGANIZATION_PROJECT:READ+ADD_MEMBER']" @click="showAddUserModal(record)">
{{ t('system.organization.addMember') }}
</MsButton>
<MsButton
v-if="record.switchAndEnter && licenseStore.hasLicense()"
:disabled="appStore.currentOrgId === record.id"
@click="enterOrganization(record.id)"
>
{{ t('system.project.enterOrganization') }}
</MsButton>
<MsTableMoreAction
v-permission="['SYSTEM_ORGANIZATION_PROJECT:READ+DELETE']"
:list="tableActions"
@select="handleMoreAction($event, record)"
></MsTableMoreAction>
/>
</template>
</template>
</MsBaseTable>
@ -113,6 +117,7 @@
import useModal from '@/hooks/useModal';
import { useTableStore } from '@/store';
import useAppStore from '@/store/modules/app';
import useLicenseStore from '@/store/modules/setting/license';
import { characterLimit } from '@/utils';
import { hasAnyPermission } from '@/utils/permission';
@ -121,6 +126,8 @@
import { enterOrganization } from '@/views/setting/utils';
const licenseStore = useLicenseStore();
const appStore = useAppStore();
export interface SystemOrganizationProps {