fix(用例管理): 修复项目应用未开启关联需求,功能用例关联需求页面显示关联需求按钮问题
--bug=1036126 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001036126
This commit is contained in:
parent
cbab810c8f
commit
55871dfd9d
|
@ -24,7 +24,11 @@
|
|||
<div class="flex w-full items-center justify-center text-[var(--color-text-4)]">
|
||||
<span
|
||||
v-if="
|
||||
hasAnyPermission(['FUNCTIONAL_CASE:READ+ADD', 'FUNCTIONAL_CASE:READ+UPDATE', 'FUNCTIONAL_CASE:READ+DELETE'])
|
||||
hasAnyPermission([
|
||||
'FUNCTIONAL_CASE:READ+ADD',
|
||||
'FUNCTIONAL_CASE:READ+UPDATE',
|
||||
'FUNCTIONAL_CASE:READ+DELETE',
|
||||
]) && caseEnable
|
||||
"
|
||||
>
|
||||
{{ t('caseManagement.caseReview.tableNoData') }}
|
||||
|
@ -32,7 +36,11 @@
|
|||
<span v-else> {{ t('caseManagement.featureCase.tableNoData') }} </span>
|
||||
<MsButton
|
||||
v-if="
|
||||
hasAnyPermission(['FUNCTIONAL_CASE:READ+ADD', 'FUNCTIONAL_CASE:READ+UPDATE', 'FUNCTIONAL_CASE:READ+DELETE'])
|
||||
hasAnyPermission([
|
||||
'FUNCTIONAL_CASE:READ+ADD',
|
||||
'FUNCTIONAL_CASE:READ+UPDATE',
|
||||
'FUNCTIONAL_CASE:READ+DELETE',
|
||||
]) && caseEnable
|
||||
"
|
||||
class="ml-[8px]"
|
||||
@click="emit('associate')"
|
||||
|
@ -41,7 +49,11 @@
|
|||
</MsButton>
|
||||
<span
|
||||
v-if="
|
||||
hasAnyPermission(['FUNCTIONAL_CASE:READ+ADD', 'FUNCTIONAL_CASE:READ+UPDATE', 'FUNCTIONAL_CASE:READ+DELETE'])
|
||||
hasAnyPermission([
|
||||
'FUNCTIONAL_CASE:READ+ADD',
|
||||
'FUNCTIONAL_CASE:READ+UPDATE',
|
||||
'FUNCTIONAL_CASE:READ+DELETE',
|
||||
]) && caseEnable
|
||||
"
|
||||
>
|
||||
{{ t('caseManagement.featureCase.or') }}
|
||||
|
@ -92,6 +104,7 @@
|
|||
isShowOperation?: boolean; // 是否显示操作列
|
||||
highlightName?: boolean; // 是否高亮名称
|
||||
showEmpty?: boolean; // 是否显示自定义的空状态,否则显示表格的默认空状态
|
||||
caseEnable?: boolean; // 项目是否配置三方需求
|
||||
}>(),
|
||||
{
|
||||
isShowOperation: true,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="mb-4 flex items-center justify-between">
|
||||
<div>
|
||||
<a-button
|
||||
v-if="platformInfo.platform_key"
|
||||
v-if="caseEnable"
|
||||
v-permission="['FUNCTIONAL_CASE:READ+ADD', 'FUNCTIONAL_CASE:READ+UPDATE', 'FUNCTIONAL_CASE:READ+DELETE']"
|
||||
type="primary"
|
||||
@click="associatedDemand"
|
||||
|
@ -34,6 +34,7 @@
|
|||
ref="demandRef"
|
||||
:fun-params="{ caseId: props.caseId, keyword, projectId: currentProjectId }"
|
||||
:show-empty="true"
|
||||
:case-enable="caseEnable"
|
||||
@update="updateDemand"
|
||||
@create="addDemand"
|
||||
@cancel="cancelLink"
|
||||
|
@ -141,6 +142,8 @@
|
|||
|
||||
const showAddModel = ref<boolean>(false);
|
||||
|
||||
const caseEnable = ref<boolean>(false);
|
||||
|
||||
const initModelForm: DemandItem = {
|
||||
id: '',
|
||||
caseId: '', // 功能用例ID
|
||||
|
@ -350,6 +353,7 @@
|
|||
const result = await getCaseRelatedInfo(currentProjectId.value);
|
||||
if (result && result.platform_key) {
|
||||
platformInfo.value = { ...result };
|
||||
caseEnable.value = platformInfo.value.case_enable !== 'false';
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
|
Loading…
Reference in New Issue