fix(项目管理): 环境前后置参数问题调整和修复
This commit is contained in:
parent
407bee3d26
commit
93cd178388
|
@ -150,6 +150,8 @@ export enum RequestConditionProcessor {
|
||||||
SQL = 'SQL', // SQL操作
|
SQL = 'SQL', // SQL操作
|
||||||
TIME_WAITING = 'TIME_WAITING', // 等待时间
|
TIME_WAITING = 'TIME_WAITING', // 等待时间
|
||||||
EXTRACT = 'EXTRACT', // 参数提取
|
EXTRACT = 'EXTRACT', // 参数提取
|
||||||
|
SCENARIO_SCRIPT = 'ENV_SCENARIO_SCRIPT', // 场景脚本
|
||||||
|
REQUEST_SCRIPT = 'ENV_REQUEST_SCRIPT', // 请求脚本
|
||||||
}
|
}
|
||||||
// 接口请求-前后置条件-脚本处理器语言
|
// 接口请求-前后置条件-脚本处理器语言
|
||||||
export enum RequestConditionScriptLanguage {
|
export enum RequestConditionScriptLanguage {
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="condition-content">
|
<div class="condition-content">
|
||||||
<!-- 脚本操作 -->
|
<!-- 脚本操作 -->
|
||||||
<template v-if="condition.processorType === RequestConditionProcessor.SCRIPT">
|
<template
|
||||||
|
v-if="
|
||||||
|
condition.processorType === RequestConditionProcessor.SCRIPT ||
|
||||||
|
condition.processorType === RequestConditionProcessor.SCENARIO_SCRIPT ||
|
||||||
|
condition.processorType === RequestConditionProcessor.REQUEST_SCRIPT
|
||||||
|
"
|
||||||
|
>
|
||||||
<!-- 前后置请求开始 -->
|
<!-- 前后置请求开始 -->
|
||||||
<div v-if="props.showPrePostRequest" class="mt-4">
|
<div v-if="props.showPrePostRequest" class="mt-4">
|
||||||
<a-radio-group v-model="condition.beforeStepScript" type="button" size="small" :default-value="true">
|
<a-radio-group v-model="condition.beforeStepScript" type="button" size="small" :default-value="true">
|
||||||
|
|
|
@ -112,10 +112,17 @@
|
||||||
function addCondition(value: ConditionType) {
|
function addCondition(value: ConditionType) {
|
||||||
const id = new Date().getTime();
|
const id = new Date().getTime();
|
||||||
switch (value) {
|
switch (value) {
|
||||||
|
// 脚本执行类型
|
||||||
case RequestConditionProcessor.SCRIPT:
|
case RequestConditionProcessor.SCRIPT:
|
||||||
|
let type = RequestConditionProcessor.SCRIPT;
|
||||||
|
if (props.showAssociatedScene) {
|
||||||
|
type = RequestConditionProcessor.SCENARIO_SCRIPT;
|
||||||
|
} else if (props.showPrePostRequest) {
|
||||||
|
type = RequestConditionProcessor.REQUEST_SCRIPT;
|
||||||
|
}
|
||||||
data.value.push({
|
data.value.push({
|
||||||
id,
|
id,
|
||||||
processorType: RequestConditionProcessor.SCRIPT,
|
processorType: type,
|
||||||
scriptName: t('apiTestDebug.preconditionScriptName'),
|
scriptName: t('apiTestDebug.preconditionScriptName'),
|
||||||
enableCommonScript: false,
|
enableCommonScript: false,
|
||||||
associateScenarioResult: false,
|
associateScenarioResult: false,
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue