fix: 模板&缺陷问题修复
This commit is contained in:
parent
bc342b92c3
commit
bda0fd6e43
|
@ -2,7 +2,7 @@
|
||||||
<div>
|
<div>
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<div v-if="showType === 'link'" class="flex">
|
<div v-if="showType === 'link'" class="flex">
|
||||||
<a-tooltip :disabled="!!linkPropsRes.data.length">
|
<a-tooltip v-if="!total">
|
||||||
<template #content>
|
<template #content>
|
||||||
{{ t('caseManagement.featureCase.noAssociatedDefect') }}
|
{{ t('caseManagement.featureCase.noAssociatedDefect') }}
|
||||||
<span v-permission="['PROJECT_BUG:READ+ADD']" class="text-[rgb(var(--primary-4))]" @click="createDefect">{{
|
<span v-permission="['PROJECT_BUG:READ+ADD']" class="text-[rgb(var(--primary-4))]" @click="createDefect">{{
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
</template>
|
</template>
|
||||||
<a-button
|
<a-button
|
||||||
v-permission="['FUNCTIONAL_CASE:READ+UPDATE']"
|
v-permission="['FUNCTIONAL_CASE:READ+UPDATE']"
|
||||||
:disabled="!linkPropsRes.data.length"
|
:disabled="total ? false : true"
|
||||||
class="mr-3"
|
class="mr-3"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="linkDefect"
|
@click="linkDefect"
|
||||||
|
@ -19,6 +19,15 @@
|
||||||
{{ t('caseManagement.featureCase.linkDefect') }}
|
{{ t('caseManagement.featureCase.linkDefect') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
|
<a-button
|
||||||
|
v-if="hasAnyPermission(['FUNCTIONAL_CASE:READ+UPDATE']) && total"
|
||||||
|
:disabled="total ? false : true"
|
||||||
|
class="mr-3"
|
||||||
|
type="primary"
|
||||||
|
@click="linkDefect"
|
||||||
|
>
|
||||||
|
{{ t('caseManagement.featureCase.linkDefect') }}
|
||||||
|
</a-button>
|
||||||
<a-button v-permission="['PROJECT_BUG:READ+ADD']" type="outline" @click="createDefect"
|
<a-button v-permission="['PROJECT_BUG:READ+ADD']" type="outline" @click="createDefect"
|
||||||
>{{ t('caseManagement.featureCase.createDefect') }}
|
>{{ t('caseManagement.featureCase.createDefect') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
|
@ -111,12 +120,9 @@
|
||||||
<template v-if="(keyword || '').trim() === ''" #empty>
|
<template v-if="(keyword || '').trim() === ''" #empty>
|
||||||
<div class="flex w-full items-center justify-center">
|
<div class="flex w-full items-center justify-center">
|
||||||
{{ t('caseManagement.featureCase.tableNoDataWidthComma') }}
|
{{ t('caseManagement.featureCase.tableNoDataWidthComma') }}
|
||||||
<span
|
<span v-if="!total && hasAnyPermission(['FUNCTIONAL_CASE:READ+UPDATE', 'PROJECT_BUG:READ+ADD'])">{{
|
||||||
v-if="
|
t('caseManagement.featureCase.please')
|
||||||
!linkPropsRes.data.length && hasAnyPermission(['FUNCTIONAL_CASE:READ+UPDATE', 'PROJECT_BUG:READ+ADD'])
|
}}</span>
|
||||||
"
|
|
||||||
>{{ t('caseManagement.featureCase.please') }}</span
|
|
||||||
>
|
|
||||||
<MsButton
|
<MsButton
|
||||||
v-if="linkPropsRes.data.length && hasAnyPermission(['FUNCTIONAL_CASE:READ+UPDATE'])"
|
v-if="linkPropsRes.data.length && hasAnyPermission(['FUNCTIONAL_CASE:READ+UPDATE'])"
|
||||||
class="ml-[8px]"
|
class="ml-[8px]"
|
||||||
|
@ -225,7 +231,7 @@
|
||||||
import LinkDefectDrawer from './linkDefectDrawer.vue';
|
import LinkDefectDrawer from './linkDefectDrawer.vue';
|
||||||
import TableFilter from '@/views/case-management/caseManagementFeature/components/tableFilter.vue';
|
import TableFilter from '@/views/case-management/caseManagementFeature/components/tableFilter.vue';
|
||||||
|
|
||||||
import { getCustomOptionHeader } from '@/api/modules/bug-management';
|
import { getBugList, getCustomOptionHeader } from '@/api/modules/bug-management';
|
||||||
import {
|
import {
|
||||||
associatedDrawerDebug,
|
associatedDrawerDebug,
|
||||||
cancelAssociatedDebug,
|
cancelAssociatedDebug,
|
||||||
|
@ -236,8 +242,9 @@
|
||||||
import useFeatureCaseStore from '@/store/modules/case/featureCase';
|
import useFeatureCaseStore from '@/store/modules/case/featureCase';
|
||||||
import { hasAnyPermission } from '@/utils/permission';
|
import { hasAnyPermission } from '@/utils/permission';
|
||||||
|
|
||||||
import { BugOptionItem } from '@/models/bug-management';
|
import { BugListItem, BugOptionItem } from '@/models/bug-management';
|
||||||
import type { TableQueryParams } from '@/models/common';
|
import type { TableQueryParams } from '@/models/common';
|
||||||
|
import { CommonList } from '@/models/common';
|
||||||
|
|
||||||
const featureCaseStore = useFeatureCaseStore();
|
const featureCaseStore = useFeatureCaseStore();
|
||||||
|
|
||||||
|
@ -512,10 +519,25 @@
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// );
|
// );
|
||||||
|
const total = ref<number>(0);
|
||||||
|
async function initBugList() {
|
||||||
|
const res = await getBugList({
|
||||||
|
current: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
sort: {},
|
||||||
|
filter: {},
|
||||||
|
keyword: '',
|
||||||
|
combine: {},
|
||||||
|
searchMode: 'AND',
|
||||||
|
projectId: appStore.currentProjectId,
|
||||||
|
});
|
||||||
|
total.value = res.total;
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getFetch();
|
getFetch();
|
||||||
initFilterOptions();
|
initFilterOptions();
|
||||||
|
initBugList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -103,10 +103,10 @@
|
||||||
@click="editField(formItem as DefinedFieldItem)"
|
@click="editField(formItem as DefinedFieldItem)"
|
||||||
/>
|
/>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<a-divider v-if="!formItem.internal" direction="vertical" class="!m-0 !mx-2" />
|
<a-divider v-if="!formItem.templateRequired" direction="vertical" class="!m-0 !mx-2" />
|
||||||
<a-tooltip :content="t('common.delete')">
|
<a-tooltip :content="t('common.delete')">
|
||||||
<MsIcon
|
<MsIcon
|
||||||
v-if="!formItem.internal"
|
v-if="!formItem.templateRequired"
|
||||||
type="icon-icon_delete-trash_outlined"
|
type="icon-icon_delete-trash_outlined"
|
||||||
size="16"
|
size="16"
|
||||||
@click="deleteSelectedField(formItem as DefinedFieldItem)"
|
@click="deleteSelectedField(formItem as DefinedFieldItem)"
|
||||||
|
|
|
@ -75,16 +75,16 @@
|
||||||
@confirm="handleOk(record)"
|
@confirm="handleOk(record)"
|
||||||
>
|
>
|
||||||
<MsButton
|
<MsButton
|
||||||
v-if="!record.templateRequired && hasAnyPermission(props.updatePermission)"
|
v-if="!record.internal && hasAnyPermission(props.updatePermission)"
|
||||||
:disabled="record.internal"
|
:disabled="record.internal"
|
||||||
class="!mr-0"
|
class="!mr-0"
|
||||||
>{{ t('system.orgTemplate.edit') }}</MsButton
|
>{{ t('system.orgTemplate.edit') }}</MsButton
|
||||||
></MsPopConfirm
|
></MsPopConfirm
|
||||||
>
|
>
|
||||||
|
|
||||||
<a-divider v-if="!record.templateRequired" class="h-[12px]" direction="vertical" />
|
<a-divider v-if="!record.internal" class="h-[12px]" direction="vertical" />
|
||||||
<MsTableMoreAction
|
<MsTableMoreAction
|
||||||
v-if="!record.templateRequired"
|
v-if="!record.internal"
|
||||||
v-permission="props.deletePermission"
|
v-permission="props.deletePermission"
|
||||||
:list="moreActions"
|
:list="moreActions"
|
||||||
@select="(item) => handleMoreActionSelect(item, record)"
|
@select="(item) => handleMoreActionSelect(item, record)"
|
||||||
|
|
Loading…
Reference in New Issue