fix(测试计划): 测试计划单独执行不允许重复执行

This commit is contained in:
xinxin.wu 2024-06-26 12:06:24 +08:00 committed by 刘瑞斌
parent 230809296f
commit 77f49d7cf4
1 changed files with 8 additions and 4 deletions

View File

@ -321,6 +321,7 @@
title-align="start"
:mask="true"
:mask-closable="false"
:on-before-cancel="handleBeforeCancel"
@close="cancelHandler"
>
<template #title>
@ -332,7 +333,7 @@
</a-radio-group>
<template #footer>
<div class="flex justify-end">
<a-button type="secondary" @click="cancelHandler">
<a-button :disabled="confirmLoading" type="secondary" @click="cancelHandler">
{{ t('common.cancel') }}
</a-button>
<a-button class="ml-3" type="primary" :loading="confirmLoading" @click="executeHandler">
@ -377,7 +378,7 @@
<script setup lang="ts">
import { ref } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { useRouter } from 'vue-router';
import { FormInstance, Message } from '@arco-design/web-vue';
import { cloneDeep } from 'lodash-es';
import dayjs from 'dayjs';
@ -960,17 +961,20 @@
executeVisible.value = true;
}
const confirmLoading = ref<boolean>(false);
function cancelHandler() {
executeVisible.value = false;
executeForm.value = cloneDeep(initExecuteForm);
}
const handleBeforeCancel = () => {
return !confirmLoading.value;
};
/**
* 批量执行
*/
const confirmLoading = ref<boolean>(false);
async function batchHandleExecute() {
confirmLoading.value = true;
try {