fix(接口测试): 修复保存为新用例提示错误的缺陷

--bug=1037290 --user=王孝刚 【接口测试】接口定义-调试-保存为新用例-当前项目下有该url接口-保存为新用例提示错误
https://www.tapd.cn/55049933/s/1477562
This commit is contained in:
wxg0103 2024-03-19 15:35:31 +08:00 committed by 刘瑞斌
parent 0bbfa425da
commit 002e44f680
1 changed files with 19 additions and 12 deletions

View File

@ -472,7 +472,11 @@
<a-select v-model:model-value="saveCaseModalForm.priority" :options="casePriorityOptions"></a-select> <a-select v-model:model-value="saveCaseModalForm.priority" :options="casePriorityOptions"></a-select>
</a-form-item> </a-form-item>
<a-form-item field="status" :label="t('common.status')"> <a-form-item field="status" :label="t('common.status')">
<a-select v-model:model-value="saveCaseModalForm.status" :options="caseStatusOptions"></a-select> <a-select v-model:model-value="saveCaseModalForm.status">
<a-option v-for="item in caseStatusOptions" :key="item.value" :value="item.value">
{{ t(item.label) }}
</a-option>
</a-select>
</a-form-item> </a-form-item>
<a-form-item field="tags" :label="t('common.tag')"> <a-form-item field="tags" :label="t('common.tag')">
<MsTagsInput <MsTagsInput
@ -493,6 +497,7 @@
import { FormInstance, Message, SelectOptionData } from '@arco-design/web-vue'; import { FormInstance, Message, SelectOptionData } from '@arco-design/web-vue';
import { cloneDeep, debounce } from 'lodash-es'; import { cloneDeep, debounce } from 'lodash-es';
import { statusCodeOptions } from '@/components/pure/ms-advance-filter/index';
import { TabItem } from '@/components/pure/ms-editable-tab/types'; import { TabItem } from '@/components/pure/ms-editable-tab/types';
import MsFormCreate from '@/components/pure/ms-form-create/formCreate.vue'; import MsFormCreate from '@/components/pure/ms-form-create/formCreate.vue';
import MsIcon from '@/components/pure/ms-icon-font/index.vue'; import MsIcon from '@/components/pure/ms-icon-font/index.vue';
@ -1375,6 +1380,7 @@
// //
await realSave(definitionParams, true); await realSave(definitionParams, true);
} }
if (!requestVModel.value.isNew) {
const params: AddApiCaseParams = { const params: AddApiCaseParams = {
...definitionParams, ...definitionParams,
...saveCaseModalForm.value, ...saveCaseModalForm.value,
@ -1386,6 +1392,7 @@
emit('addDone'); emit('addDone');
Message.success(t('common.saveSuccess')); Message.success(t('common.saveSuccess'));
saveCaseModalVisible.value = false; saveCaseModalVisible.value = false;
}
} catch (error) { } catch (error) {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.log(error); console.log(error);