fix(项目管理): Mock环境禁止编辑

--bug=1037449 --user=宋昌昌 环境管理-mock环境不支持编辑和删除 https://www.tapd.cn/55049933/s/1482052
This commit is contained in:
song-cc-rock 2024-03-27 17:05:42 +08:00 committed by Craftsman
parent e5f660eb71
commit 76f342fd97
3 changed files with 5 additions and 4 deletions

View File

@ -12,7 +12,6 @@
<a-input
v-model="form.name"
:max-length="255"
class="w-[732px]"
:placeholder="t('project.environmental.envNamePlaceholder')"
@blur="store.currentEnvDetailInfo.name = form.name"
/>

View File

@ -7,8 +7,8 @@
</div>
<div class="flex items-center justify-between">
<a-button
v-if="!store.currentEnvDetailInfo.mock"
v-permission="['PROJECT_ENVIRONMENT:READ+UPDATE']"
:disabled="store.currentEnvDetailInfo.mock"
type="outline"
@click="handleAddHttp"
>{{ t('project.environmental.addHttp') }}</a-button
@ -50,7 +50,9 @@
t('common.copy')
}}</MsButton>
<a-divider class="h-[16px]" direction="vertical" />
<MsButton class="!mr-0" :disabled="isDisabled" @click="handleEdit(record)">{{ t('common.edit') }}</MsButton>
<MsButton class="!mr-0" :disabled="isDisabled || store.currentEnvDetailInfo.mock" @click="handleEdit(record)">{{
t('common.edit')
}}</MsButton>
<a-divider class="h-[16px]" direction="vertical" />
<MsTableMoreAction
v-permission="['PROJECT_ENVIRONMENT:READ+UPDATE']"
@ -92,7 +94,6 @@
import type { ModuleTreeNode } from '@/models/common';
import type { CommonParams } from '@/models/projectManagement/environmental';
import { HttpForm } from '@/models/projectManagement/environmental';
import { TableKeyEnum } from '@/enums/tableEnum';
const appStore = useAppStore();
const { t } = useI18n();

View File

@ -323,6 +323,7 @@
{
label: t('common.rename'),
eventTag: 'rename',
disabled: isMock,
permission: ['PROJECT_ENVIRONMENT:READ+UPDATE'],
},
{