refactor(系统设置): 隐藏任务中心不需要的按钮

This commit is contained in:
wxg0103 2024-03-23 12:26:33 +08:00 committed by wxg0103
parent fde19736dd
commit 5f7fa0fd6f
3 changed files with 10 additions and 8 deletions

View File

@ -5,6 +5,7 @@ import io.metersphere.api.dto.definition.*;
import io.metersphere.api.dto.report.ApiReportListDTO; import io.metersphere.api.dto.report.ApiReportListDTO;
import io.metersphere.api.mapper.*; import io.metersphere.api.mapper.*;
import io.metersphere.api.utils.ApiDataUtils; import io.metersphere.api.utils.ApiDataUtils;
import io.metersphere.sdk.constants.ApiExecuteResourceType;
import io.metersphere.sdk.dto.api.result.RequestResult; import io.metersphere.sdk.dto.api.result.RequestResult;
import io.metersphere.sdk.exception.MSException; import io.metersphere.sdk.exception.MSException;
import io.metersphere.sdk.mapper.EnvironmentMapper; import io.metersphere.sdk.mapper.EnvironmentMapper;
@ -205,6 +206,7 @@ public class ApiReportService {
ApiReportStepDTO apiReportStepDTO = new ApiReportStepDTO(); ApiReportStepDTO apiReportStepDTO = new ApiReportStepDTO();
BeanUtils.copyBean(apiReportStepDTO, apiReportDTO); BeanUtils.copyBean(apiReportStepDTO, apiReportDTO);
apiReportStepDTO.setStepId(apiTestCaseRecords.getFirst().getApiTestCaseId()); apiReportStepDTO.setStepId(apiTestCaseRecords.getFirst().getApiTestCaseId());
apiReportStepDTO.setStepType(ApiExecuteResourceType.API_CASE.name());
List<ApiReportStepDTO> apiReportSteps = new ArrayList<>(); List<ApiReportStepDTO> apiReportSteps = new ArrayList<>();
apiReportSteps.add(apiReportStepDTO); apiReportSteps.add(apiReportStepDTO);
apiReportDTO.setChildren(apiReportSteps); apiReportDTO.setChildren(apiReportSteps);

View File

@ -63,9 +63,9 @@
@click="stop(record)" @click="stop(record)"
>{{ t('project.taskCenter.stop') }}</MsButton >{{ t('project.taskCenter.stop') }}</MsButton
> >
<a-divider v-if="['PENDING', 'RUNNING', 'RERUNNING'].includes(record.status)" direction="vertical" /> <!-- <a-divider v-if="['PENDING', 'RUNNING', 'RERUNNING'].includes(record.status)" direction="vertical" />
<MsButton class="!mr-0" @click="execution(record)">{{ t('project.taskCenter.execution') }}</MsButton> <MsButton class="!mr-0" @click="execution(record)">{{ t('project.taskCenter.execution') }}</MsButton>
<a-divider direction="vertical" /> <a-divider direction="vertical" />-->
<MsButton class="!mr-0">{{ t('project.taskCenter.viewReport') }}</MsButton> <MsButton class="!mr-0">{{ t('project.taskCenter.viewReport') }}</MsButton>
</template> </template>
</ms-base-table> </ms-base-table>
@ -248,10 +248,10 @@
label: 'project.taskCenter.batchStop', label: 'project.taskCenter.batchStop',
eventTag: 'batchStop', eventTag: 'batchStop',
}, },
{ // {
label: 'project.taskCenter.batchExecution', // label: 'project.taskCenter.batchExecution',
eventTag: 'batchExecution', // eventTag: 'batchExecution',
}, // },
], ],
}; };
const batchParams = ref<BatchApiParams>({ const batchParams = ref<BatchApiParams>({

View File

@ -2,9 +2,9 @@
<div class="p-4 pt-0"> <div class="p-4 pt-0">
<div class="mb-4 flex items-center justify-between"> <div class="mb-4 flex items-center justify-between">
<!-- TODO这个版本不上 --> <!-- TODO这个版本不上 -->
<a-button type="primary"> <!-- <a-button type="primary">
{{ t('project.taskCenter.createTask') }} {{ t('project.taskCenter.createTask') }}
</a-button> </a-button>-->
<a-input-search <a-input-search
v-model:model-value="keyword" v-model:model-value="keyword"
:placeholder="t('caseManagement.featureCase.searchByNameAndId')" :placeholder="t('caseManagement.featureCase.searchByNameAndId')"