fix(测试计划): 测试计划单独执行不允许重复执行
This commit is contained in:
parent
230809296f
commit
77f49d7cf4
|
@ -321,6 +321,7 @@
|
||||||
title-align="start"
|
title-align="start"
|
||||||
:mask="true"
|
:mask="true"
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
|
:on-before-cancel="handleBeforeCancel"
|
||||||
@close="cancelHandler"
|
@close="cancelHandler"
|
||||||
>
|
>
|
||||||
<template #title>
|
<template #title>
|
||||||
|
@ -332,7 +333,7 @@
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<a-button type="secondary" @click="cancelHandler">
|
<a-button :disabled="confirmLoading" type="secondary" @click="cancelHandler">
|
||||||
{{ t('common.cancel') }}
|
{{ t('common.cancel') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button class="ml-3" type="primary" :loading="confirmLoading" @click="executeHandler">
|
<a-button class="ml-3" type="primary" :loading="confirmLoading" @click="executeHandler">
|
||||||
|
@ -377,7 +378,7 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { FormInstance, Message } from '@arco-design/web-vue';
|
import { FormInstance, Message } from '@arco-design/web-vue';
|
||||||
import { cloneDeep } from 'lodash-es';
|
import { cloneDeep } from 'lodash-es';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
@ -960,17 +961,20 @@
|
||||||
executeVisible.value = true;
|
executeVisible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const confirmLoading = ref<boolean>(false);
|
||||||
function cancelHandler() {
|
function cancelHandler() {
|
||||||
executeVisible.value = false;
|
executeVisible.value = false;
|
||||||
executeForm.value = cloneDeep(initExecuteForm);
|
executeForm.value = cloneDeep(initExecuteForm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleBeforeCancel = () => {
|
||||||
|
return !confirmLoading.value;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量执行
|
* 批量执行
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const confirmLoading = ref<boolean>(false);
|
|
||||||
|
|
||||||
async function batchHandleExecute() {
|
async function batchHandleExecute() {
|
||||||
confirmLoading.value = true;
|
confirmLoading.value = true;
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue