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)]">
|
<div class="flex w-full items-center justify-center text-[var(--color-text-4)]">
|
||||||
<span
|
<span
|
||||||
v-if="
|
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') }}
|
{{ t('caseManagement.caseReview.tableNoData') }}
|
||||||
|
@ -32,7 +36,11 @@
|
||||||
<span v-else> {{ t('caseManagement.featureCase.tableNoData') }} </span>
|
<span v-else> {{ t('caseManagement.featureCase.tableNoData') }} </span>
|
||||||
<MsButton
|
<MsButton
|
||||||
v-if="
|
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]"
|
class="ml-[8px]"
|
||||||
@click="emit('associate')"
|
@click="emit('associate')"
|
||||||
|
@ -41,7 +49,11 @@
|
||||||
</MsButton>
|
</MsButton>
|
||||||
<span
|
<span
|
||||||
v-if="
|
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') }}
|
{{ t('caseManagement.featureCase.or') }}
|
||||||
|
@ -92,6 +104,7 @@
|
||||||
isShowOperation?: boolean; // 是否显示操作列
|
isShowOperation?: boolean; // 是否显示操作列
|
||||||
highlightName?: boolean; // 是否高亮名称
|
highlightName?: boolean; // 是否高亮名称
|
||||||
showEmpty?: boolean; // 是否显示自定义的空状态,否则显示表格的默认空状态
|
showEmpty?: boolean; // 是否显示自定义的空状态,否则显示表格的默认空状态
|
||||||
|
caseEnable?: boolean; // 项目是否配置三方需求
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
isShowOperation: true,
|
isShowOperation: true,
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="mb-4 flex items-center justify-between">
|
<div class="mb-4 flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
<a-button
|
<a-button
|
||||||
v-if="platformInfo.platform_key"
|
v-if="caseEnable"
|
||||||
v-permission="['FUNCTIONAL_CASE:READ+ADD', 'FUNCTIONAL_CASE:READ+UPDATE', 'FUNCTIONAL_CASE:READ+DELETE']"
|
v-permission="['FUNCTIONAL_CASE:READ+ADD', 'FUNCTIONAL_CASE:READ+UPDATE', 'FUNCTIONAL_CASE:READ+DELETE']"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="associatedDemand"
|
@click="associatedDemand"
|
||||||
|
@ -34,6 +34,7 @@
|
||||||
ref="demandRef"
|
ref="demandRef"
|
||||||
:fun-params="{ caseId: props.caseId, keyword, projectId: currentProjectId }"
|
:fun-params="{ caseId: props.caseId, keyword, projectId: currentProjectId }"
|
||||||
:show-empty="true"
|
:show-empty="true"
|
||||||
|
:case-enable="caseEnable"
|
||||||
@update="updateDemand"
|
@update="updateDemand"
|
||||||
@create="addDemand"
|
@create="addDemand"
|
||||||
@cancel="cancelLink"
|
@cancel="cancelLink"
|
||||||
|
@ -141,6 +142,8 @@
|
||||||
|
|
||||||
const showAddModel = ref<boolean>(false);
|
const showAddModel = ref<boolean>(false);
|
||||||
|
|
||||||
|
const caseEnable = ref<boolean>(false);
|
||||||
|
|
||||||
const initModelForm: DemandItem = {
|
const initModelForm: DemandItem = {
|
||||||
id: '',
|
id: '',
|
||||||
caseId: '', // 功能用例ID
|
caseId: '', // 功能用例ID
|
||||||
|
@ -350,6 +353,7 @@
|
||||||
const result = await getCaseRelatedInfo(currentProjectId.value);
|
const result = await getCaseRelatedInfo(currentProjectId.value);
|
||||||
if (result && result.platform_key) {
|
if (result && result.platform_key) {
|
||||||
platformInfo.value = { ...result };
|
platformInfo.value = { ...result };
|
||||||
|
caseEnable.value = platformInfo.value.case_enable !== 'false';
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|
Loading…
Reference in New Issue