fix(系统设置): 修复系统组织_组织列表控制进入组织
This commit is contained in:
parent
0d110b154f
commit
9061f5ac79
|
@ -35,37 +35,41 @@
|
||||||
v-if="hasAnyPermission(['SYSTEM_ORGANIZATION_PROJECT:READ+UPDATE'])"
|
v-if="hasAnyPermission(['SYSTEM_ORGANIZATION_PROJECT:READ+UPDATE'])"
|
||||||
class="primary-color"
|
class="primary-color"
|
||||||
@click="showProjectDrawer(record)"
|
@click="showProjectDrawer(record)"
|
||||||
>{{ record.projectCount }}</span
|
|
||||||
>
|
>
|
||||||
|
{{ record.projectCount }}
|
||||||
|
</span>
|
||||||
<span v-else>{{ record.projectCount }}</span>
|
<span v-else>{{ record.projectCount }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #operation="{ record }">
|
<template #operation="{ record }">
|
||||||
<template v-if="record.deleted">
|
<template v-if="record.deleted">
|
||||||
<MsButton v-permission="['SYSTEM_ORGANIZATION_PROJECT:READ+RECOVER']" @click="handleRevokeDelete(record)">{{
|
<MsButton v-permission="['SYSTEM_ORGANIZATION_PROJECT:READ+RECOVER']" @click="handleRevokeDelete(record)">
|
||||||
t('common.revokeDelete')
|
{{ t('common.revokeDelete') }}
|
||||||
}}</MsButton>
|
</MsButton>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="!record.enable">
|
<template v-else-if="!record.enable">
|
||||||
<MsButton v-permission="['SYSTEM_ORGANIZATION_PROJECT:READ+DELETE']" @click="handleDelete(record)">{{
|
<MsButton v-permission="['SYSTEM_ORGANIZATION_PROJECT:READ+DELETE']" @click="handleDelete(record)">
|
||||||
t('common.delete')
|
{{ t('common.delete') }}
|
||||||
}}</MsButton>
|
</MsButton>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<MsButton v-permission="['SYSTEM_ORGANIZATION_PROJECT:READ+UPDATE']" @click="showOrganizationModal(record)">{{
|
<MsButton v-permission="['SYSTEM_ORGANIZATION_PROJECT:READ+UPDATE']" @click="showOrganizationModal(record)">
|
||||||
t('common.edit')
|
{{ t('common.edit') }}
|
||||||
}}</MsButton>
|
</MsButton>
|
||||||
<MsButton v-permission="['SYSTEM_ORGANIZATION_PROJECT:READ+ADD_MEMBER']" @click="showAddUserModal(record)">{{
|
<MsButton v-permission="['SYSTEM_ORGANIZATION_PROJECT:READ+ADD_MEMBER']" @click="showAddUserModal(record)">
|
||||||
t('system.organization.addMember')
|
{{ t('system.organization.addMember') }}
|
||||||
}}</MsButton>
|
</MsButton>
|
||||||
<!-- TODO 后台缺少字段控制 -->
|
<MsButton
|
||||||
<MsButton v-xpack :disabled="appStore.currentOrgId === record.id" @click="enterOrganization(record.id)">{{
|
v-if="record.switchAndEnter && licenseStore.hasLicense()"
|
||||||
t('system.project.enterOrganization')
|
:disabled="appStore.currentOrgId === record.id"
|
||||||
}}</MsButton>
|
@click="enterOrganization(record.id)"
|
||||||
|
>
|
||||||
|
{{ t('system.project.enterOrganization') }}
|
||||||
|
</MsButton>
|
||||||
<MsTableMoreAction
|
<MsTableMoreAction
|
||||||
v-permission="['SYSTEM_ORGANIZATION_PROJECT:READ+DELETE']"
|
v-permission="['SYSTEM_ORGANIZATION_PROJECT:READ+DELETE']"
|
||||||
:list="tableActions"
|
:list="tableActions"
|
||||||
@select="handleMoreAction($event, record)"
|
@select="handleMoreAction($event, record)"
|
||||||
></MsTableMoreAction>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</MsBaseTable>
|
</MsBaseTable>
|
||||||
|
@ -113,6 +117,7 @@
|
||||||
import useModal from '@/hooks/useModal';
|
import useModal from '@/hooks/useModal';
|
||||||
import { useTableStore } from '@/store';
|
import { useTableStore } from '@/store';
|
||||||
import useAppStore from '@/store/modules/app';
|
import useAppStore from '@/store/modules/app';
|
||||||
|
import useLicenseStore from '@/store/modules/setting/license';
|
||||||
import { characterLimit } from '@/utils';
|
import { characterLimit } from '@/utils';
|
||||||
import { hasAnyPermission } from '@/utils/permission';
|
import { hasAnyPermission } from '@/utils/permission';
|
||||||
|
|
||||||
|
@ -121,6 +126,8 @@
|
||||||
|
|
||||||
import { enterOrganization } from '@/views/setting/utils';
|
import { enterOrganization } from '@/views/setting/utils';
|
||||||
|
|
||||||
|
const licenseStore = useLicenseStore();
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
|
|
||||||
export interface SystemOrganizationProps {
|
export interface SystemOrganizationProps {
|
||||||
|
|
Loading…
Reference in New Issue