parent
0d77113760
commit
f9a7fd8a42
|
@ -354,7 +354,8 @@
|
||||||
:new-scenario-definition="newScenarioDefinition"
|
:new-scenario-definition="newScenarioDefinition"
|
||||||
:project-env-map="projectEnvMap"
|
:project-env-map="projectEnvMap"
|
||||||
:new-project-env-map="newProjectEnvMap"
|
:new-project-env-map="newProjectEnvMap"
|
||||||
:type="type"
|
:project-list="projectList"
|
||||||
|
:type ="type"
|
||||||
></scenario-diff>
|
></scenario-diff>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
@ -1740,33 +1741,38 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
compare(row) {
|
compare(row) {
|
||||||
this.$get('/api/automation/get/' + row.id + "/" + this.currentScenario.refId, response => {
|
this.$get('/api/automation/get/' + row.id+"/"+this.currentScenario.refId, response => {
|
||||||
this.$get("/api/automation/getApiScenario/" + response.data.id, res => {
|
this.$get("/api/automation/getApiScenario/" + response.data.id, res => {
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
if (res.data.scenarioDefinition != null) {
|
if(res.data.scenarioDefinition != null){
|
||||||
let obj = JSON.parse(res.data.scenarioDefinition);
|
let obj = JSON.parse(res.data.scenarioDefinition);
|
||||||
if (obj) {
|
if(obj){
|
||||||
if (obj.hashTree) {
|
if(obj.hashTree){
|
||||||
for (let i = 0; i < obj.hashTree.length; i++) {
|
for (let i = 0; i < obj.hashTree.length; i++) {
|
||||||
obj.hashTree[i].disabled = true;
|
obj.hashTree[i].disabled = true;
|
||||||
|
if (!obj.hashTree[i].requestResult) {
|
||||||
|
obj.hashTree[i].requestResult = [{responseResult: {}}];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (let i = 0; i < this.scenarioDefinition.length; i++) {
|
||||||
|
this.scenarioDefinition[i].disabled = true;
|
||||||
|
}
|
||||||
|
this.newScenarioDefinition = obj.hashTree;
|
||||||
|
|
||||||
|
if (response.data.environmentJson) {
|
||||||
|
this.newProjectEnvMap = objToStrMap(JSON.parse(response.data.environmentJson));
|
||||||
|
} else {
|
||||||
|
// 兼容历史数据
|
||||||
|
this.newProjectEnvMap.set(this.projectId, obj.environmentId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (let i = 0; i < this.scenarioDefinition.length; i++) {
|
|
||||||
this.scenarioDefinition[i].disabled = true;
|
|
||||||
}
|
|
||||||
this.newScenarioDefinition = obj.hashTree;
|
|
||||||
if (response.data.environmentJson) {
|
|
||||||
this.newProjectEnvMap = objToStrMap(JSON.parse(response.data.environmentJson));
|
|
||||||
} else {
|
|
||||||
// 兼容历史数据
|
|
||||||
this.newProjectEnvMap.set(this.projectId, obj.environmentId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
res.data.userName = response.data.userName
|
||||||
|
this.newData = res.data;
|
||||||
|
this.dialogVisible = true;
|
||||||
}
|
}
|
||||||
this.newData = res.data;
|
});
|
||||||
this.dialogVisible = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
checkout(row) {
|
checkout(row) {
|
||||||
|
|
|
@ -1,149 +1,158 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="compare-class">
|
<div>
|
||||||
<el-card ref="old">
|
<el-row>
|
||||||
<el-card>
|
<el-col :span="12">
|
||||||
<div class="card-content">
|
<el-tag>当前{{oldData.versionName }}</el-tag><span style="margin-left: 10px">{{oldData.userName}}</span><span style="margin-left: 10px">{{oldData.updateTime | timestampFormatDate }}</span>
|
||||||
<div class="ms-main-div" @click="showAll" >
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-tag>{{ newData.versionName }}</el-tag><span style="margin-left: 10px">{{newData.userName}}</span><span style="margin-left: 10px">{{newData.updateTime | timestampFormatDate }}</span>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div class="compare-class" v-loading="isReloadData">
|
||||||
|
<el-card ref="old" style="width: 50%">
|
||||||
|
<el-card>
|
||||||
|
<div class="card-content">
|
||||||
|
<div class="ms-main-div" @click="showAll" >
|
||||||
|
|
||||||
<!--操作按钮-->
|
<!--操作按钮-->
|
||||||
<div class="ms-opt-btn">
|
<div class="ms-opt-btn">
|
||||||
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!showFollow">
|
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!showFollow">
|
||||||
<i class="el-icon-star-off" style="color: #783987; font-size: 25px; margin-right: 5px;cursor: pointer;position: relative; top: 5px; " />
|
<i class="el-icon-star-off" style="color: #783987; font-size: 25px; margin-right: 5px;cursor: pointer;position: relative; top: 5px; " />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-if="showFollow">
|
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-if="showFollow">
|
||||||
<i class="el-icon-star-on" style="color: #783987; font-size: 28px; margin-right: 5px;cursor: pointer;position: relative; top: 5px; " />
|
<i class="el-icon-star-on" style="color: #783987; font-size: 28px; margin-right: 5px;cursor: pointer;position: relative; top: 5px; " />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tip">{{ $t('test_track.plan_view.base_info') }}</div>
|
||||||
|
<el-form :model="oldData" label-position="right" label-width="80px" size="small" :rules="rules" :disabled="true"
|
||||||
|
ref="currentScenario" style="margin-right: 20px">
|
||||||
|
<!-- 基础信息 -->
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item :label="$t('commons.name')" prop="name">
|
||||||
|
<el-input class="ms-scenario-input" size="small" v-model="oldData.name"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item :label="$t('test_track.module.module')" prop="apiScenarioModuleId">
|
||||||
|
<ms-select-tree size="small" :data="moduleOptions" :defaultKey="oldData.apiScenarioModuleId" :obj="moduleObj" clearable checkStrictly/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item :label="$t('commons.status')" prop="status">
|
||||||
|
<el-select class="ms-scenario-input" size="small" v-model="oldData.status">
|
||||||
|
<el-option v-for="item in options" :key="item.id" :label="$t(item.label)" :value="item.id"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item :label="$t('api_test.definition.request.responsible')" prop="principal">
|
||||||
|
<el-select v-model="oldData.principal"
|
||||||
|
:placeholder="$t('api_test.definition.request.responsible')" filterable size="small"
|
||||||
|
class="ms-scenario-input">
|
||||||
|
<el-option
|
||||||
|
v-for="item in maintainerOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name + ' (' + item.id + ')'"
|
||||||
|
:value="item.id">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item :label="$t('test_track.case.priority')" prop="level">
|
||||||
|
<el-select class="ms-scenario-input" size="small" v-model="oldData.level">
|
||||||
|
<el-option v-for="item in levels" :key="item.id" :label="item.label" :value="item.id"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item :label="$t('api_test.automation.tag')" prop="tags">
|
||||||
|
<ms-input-tag :currentScenario="oldData" ref="tag"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item :label="$t('commons.description')" prop="description">
|
||||||
|
<el-input class="ms-http-textarea"
|
||||||
|
v-model="oldData.description"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 1, maxRows: 10}"
|
||||||
|
:rows="1" size="small"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7" v-if="customNum">
|
||||||
|
<el-form-item label="ID" prop="customNum">
|
||||||
|
<el-input v-model.trim="oldData.customNum" size="small"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 场景步骤-->
|
||||||
<div class="tip">{{ $t('test_track.plan_view.base_info') }}</div>
|
<div v-loading="loading">
|
||||||
<el-form :model="oldData" label-position="right" label-width="80px" size="small" :rules="rules" :disabled="true"
|
<div @click="showAll">
|
||||||
ref="currentScenario" style="margin-right: 20px">
|
<p class="tip">{{ $t('api_test.automation.scenario_step') }} </p>
|
||||||
<!-- 基础信息 -->
|
</div>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="7">
|
<el-col :span="21">
|
||||||
<el-form-item :label="$t('commons.name')" prop="name">
|
<!-- 调试部分 -->
|
||||||
<el-input class="ms-scenario-input" size="small" v-model="oldData.name"/>
|
<div class="ms-debug-div" @click="showAll" :class="{'is-top' : isTop}" ref="debugHeader">
|
||||||
</el-form-item>
|
<el-row style="margin: 5px">
|
||||||
</el-col>
|
<el-col :span="4" class="ms-col-one ms-font">
|
||||||
<el-col :span="7">
|
<el-tooltip placement="top" effect="light">
|
||||||
<el-form-item :label="$t('test_track.module.module')" prop="apiScenarioModuleId">
|
<template v-slot:content>
|
||||||
<ms-select-tree size="small" :data="moduleOptions" :defaultKey="oldData.apiScenarioModuleId" :obj="moduleObj" clearable checkStrictly/>
|
<div>{{
|
||||||
</el-form-item>
|
oldData.name === undefined || '' ? $t('api_test.scenario.name') : oldData.name
|
||||||
</el-col>
|
}}
|
||||||
<el-col :span="7">
|
</div>
|
||||||
<el-form-item :label="$t('commons.status')" prop="status">
|
</template>
|
||||||
<el-select class="ms-scenario-input" size="small" v-model="oldData.status">
|
<span class="scenario-name">
|
||||||
<el-option v-for="item in options" :key="item.id" :label="$t(item.label)" :value="item.id"/>
|
{{
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="7">
|
|
||||||
<el-form-item :label="$t('api_test.definition.request.responsible')" prop="principal">
|
|
||||||
<el-select v-model="oldData.principal"
|
|
||||||
:placeholder="$t('api_test.definition.request.responsible')" filterable size="small"
|
|
||||||
class="ms-scenario-input">
|
|
||||||
<el-option
|
|
||||||
v-for="item in maintainerOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name + ' (' + item.id + ')'"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="7">
|
|
||||||
<el-form-item :label="$t('test_track.case.priority')" prop="level">
|
|
||||||
<el-select class="ms-scenario-input" size="small" v-model="oldData.level">
|
|
||||||
<el-option v-for="item in levels" :key="item.id" :label="item.label" :value="item.id"/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="7">
|
|
||||||
<el-form-item :label="$t('api_test.automation.tag')" prop="tags">
|
|
||||||
<ms-input-tag :currentScenario="oldData" ref="tag"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="7">
|
|
||||||
<el-form-item :label="$t('commons.description')" prop="description">
|
|
||||||
<el-input class="ms-http-textarea"
|
|
||||||
v-model="oldData.description"
|
|
||||||
type="textarea"
|
|
||||||
:autosize="{ minRows: 1, maxRows: 10}"
|
|
||||||
:rows="1" size="small"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="7" v-if="customNum">
|
|
||||||
<el-form-item label="ID" prop="customNum">
|
|
||||||
<el-input v-model.trim="oldData.customNum" size="small"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<!-- 场景步骤-->
|
|
||||||
<div v-loading="loading">
|
|
||||||
<div @click="showAll">
|
|
||||||
<p class="tip">{{ $t('api_test.automation.scenario_step') }} </p>
|
|
||||||
</div>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="21">
|
|
||||||
<!-- 调试部分 -->
|
|
||||||
<div class="ms-debug-div" @click="showAll" :class="{'is-top' : isTop}" ref="debugHeader">
|
|
||||||
<el-row style="margin: 5px">
|
|
||||||
<el-col :span="4" class="ms-col-one ms-font">
|
|
||||||
<el-tooltip placement="top" effect="light">
|
|
||||||
<template v-slot:content>
|
|
||||||
<div>{{
|
|
||||||
oldData.name === undefined || '' ? $t('api_test.scenario.name') : oldData.name
|
oldData.name === undefined || '' ? $t('api_test.scenario.name') : oldData.name
|
||||||
}}
|
}}
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<span class="scenario-name">
|
|
||||||
{{
|
|
||||||
oldData.name === undefined || '' ? $t('api_test.scenario.name') : oldData.name
|
|
||||||
}}
|
|
||||||
</span>
|
</span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" class="ms-col-one ms-font">
|
<el-col :span="3" class="ms-col-one ms-font">
|
||||||
{{ $t('api_test.automation.step_total') }}:{{ 0}}
|
{{ $t('api_test.automation.step_total') }}:{{ 0}}
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" class="ms-col-one ms-font">
|
<el-col :span="3" class="ms-col-one ms-font">
|
||||||
<el-link class="head">{{ $t('api_test.automation.scenario_total') }}
|
<el-link class="head">{{ $t('api_test.automation.scenario_total') }}
|
||||||
</el-link>
|
</el-link>
|
||||||
:{{ oldVariableSize }}
|
:{{ oldVariableSize }}
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" class="ms-col-one ms-font">
|
<el-col :span="3" class="ms-col-one ms-font">
|
||||||
<el-checkbox v-model="oldEnableCookieShare"><span style="font-size: 13px;">{{ $t('api_test.scenario.share_cookie') }}</span></el-checkbox>
|
<el-checkbox v-model="oldEnableCookieShare"><span style="font-size: 13px;">{{ $t('api_test.scenario.share_cookie') }}</span></el-checkbox>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" class="ms-col-one ms-font">
|
<el-col :span="3" class="ms-col-one ms-font">
|
||||||
<el-checkbox v-model="oldOnSampleError"><span style="font-size: 13px;">{{ $t('commons.failure_continues') }}</span></el-checkbox>
|
<el-checkbox v-model="oldOnSampleError"><span style="font-size: 13px;">{{ $t('commons.failure_continues') }}</span></el-checkbox>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 场景步骤内容 -->
|
<!-- 场景步骤内容 -->
|
||||||
<div ref="stepInfo">
|
<div ref="stepInfo">
|
||||||
<el-tooltip :content="$t('api_test.automation.open_expansion')" placement="top" effect="light">
|
<el-tooltip :content="$t('api_test.automation.open_expansion')" placement="top" effect="light">
|
||||||
<i class="el-icon-circle-plus-outline ms-open-btn ms-open-btn-left" @click="openExpansion('old')"/>
|
<i class="el-icon-circle-plus-outline ms-open-btn ms-open-btn-left" @click="openExpansion('old')"/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip :content="$t('api_test.automation.close_expansion')" placement="top" effect="light">
|
<el-tooltip :content="$t('api_test.automation.close_expansion')" placement="top" effect="light">
|
||||||
<i class="el-icon-remove-outline ms-open-btn" size="mini" @click="closeExpansion('old')"/>
|
<i class="el-icon-remove-outline ms-open-btn" size="mini" @click="closeExpansion('old')"/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tree node-key="resourceId" :props="props" :data="oldScenarioDefinition" class="ms-tree"
|
<el-tree node-key="resourceId" :props="props" :data="oldScenarioDefinition" class="ms-tree"
|
||||||
:default-expanded-keys="oldExpandedNode"
|
:default-expanded-keys="oldExpandedNode"
|
||||||
:expand-on-click-node="false"
|
:expand-on-click-node="false"
|
||||||
highlight-current
|
highlight-current
|
||||||
@node-expand="nodeExpand(oldScenarioDefinition,null,'old')"
|
@node-expand="nodeExpand(oldScenarioDefinition,null,'old')"
|
||||||
@node-collapse="nodeCollapse(oldScenarioDefinition,null,'old')"
|
@node-collapse="nodeCollapse(oldScenarioDefinition,null,'old')"
|
||||||
@node-click="oldNodeClick"
|
@node-click="oldNodeClick"
|
||||||
draggable ref="stepTree">
|
draggable ref="stepTree">
|
||||||
<span class="custom-tree-node father" slot-scope="{ node, data}" style="width: 96%">
|
<span class="custom-tree-node father" slot-scope="{ node, data}" style="width: 96%">
|
||||||
<!-- 步骤组件-->
|
<!-- 步骤组件-->
|
||||||
<ms-component-config
|
<ms-component-config
|
||||||
|
@ -151,162 +160,163 @@
|
||||||
:scenario="data"
|
:scenario="data"
|
||||||
:node="node"
|
:node="node"
|
||||||
:env-map="projectEnvMap"
|
:env-map="projectEnvMap"
|
||||||
|
:project-list="projectList"
|
||||||
:show-version="false"
|
:show-version="false"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<el-backtop target=".card-content" :visibility-height="100" :right="50"></el-backtop>
|
||||||
</div>
|
</div>
|
||||||
<el-backtop target=".card-content" :visibility-height="100" :right="50"></el-backtop>
|
</el-card>
|
||||||
</div>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-card>
|
<el-card ref="new" style="width: 50%">
|
||||||
<el-card ref="new">
|
<el-card>
|
||||||
<el-card>
|
<div class="card-content">
|
||||||
<div class="card-content">
|
<div class="ms-main-div" @click="showAll" v-if="type!=='detail'">
|
||||||
<div class="ms-main-div" @click="showAll" v-if="type!=='detail'">
|
|
||||||
|
|
||||||
<!--操作按钮-->
|
<!--操作按钮-->
|
||||||
<div class="ms-opt-btn">
|
<div class="ms-opt-btn">
|
||||||
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!newShowFollow">
|
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!newShowFollow">
|
||||||
<i class="el-icon-star-off" style="color: #783987; font-size: 25px; margin-right: 5px;cursor: pointer;position: relative; top: 5px; " />
|
<i class="el-icon-star-off" style="color: #783987; font-size: 25px; margin-right: 5px;cursor: pointer;position: relative; top: 5px; " />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-if="newShowFollow">
|
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-if="newShowFollow">
|
||||||
<i class="el-icon-star-on" style="color: #783987; font-size: 28px; margin-right: 5px;cursor: pointer;position: relative; top: 5px; " />
|
<i class="el-icon-star-on" style="color: #783987; font-size: 28px; margin-right: 5px;cursor: pointer;position: relative; top: 5px; " />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tip">{{ $t('test_track.plan_view.base_info') }}</div>
|
||||||
|
<el-form :model="newData" label-position="right" label-width="80px" size="small" :rules="rules" :disabled="true"
|
||||||
|
ref="currentScenario" style="margin-right: 20px">
|
||||||
|
<!-- 基础信息 -->
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item :label="$t('commons.name')" prop="name">
|
||||||
|
<el-input class="ms-scenario-input" size="small" v-model="newData.name"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item :label="$t('test_track.module.module')" prop="apiScenarioModuleId">
|
||||||
|
<ms-select-tree size="small" :data="moduleOptions" :defaultKey="newData.apiScenarioModuleId" :obj="moduleObj" clearable checkStrictly/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item :label="$t('commons.status')" prop="status">
|
||||||
|
<el-select class="ms-scenario-input" size="small" v-model="newData.status">
|
||||||
|
<el-option v-for="item in options" :key="item.id" :label="$t(item.label)" :value="item.id"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item :label="$t('api_test.definition.request.responsible')" prop="principal">
|
||||||
|
<el-select v-model="newData.principal"
|
||||||
|
:placeholder="$t('api_test.definition.request.responsible')" filterable size="small"
|
||||||
|
class="ms-scenario-input">
|
||||||
|
<el-option
|
||||||
|
v-for="item in maintainerOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name + ' (' + item.id + ')'"
|
||||||
|
:value="item.id">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item :label="$t('test_track.case.priority')" prop="level">
|
||||||
|
<el-select class="ms-scenario-input" size="small" v-model="newData.level">
|
||||||
|
<el-option v-for="item in levels" :key="item.id" :label="item.label" :value="item.id"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item :label="$t('api_test.automation.tag')" prop="tags">
|
||||||
|
<ms-input-tag :currentScenario="newData" ref="tag"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item :label="$t('commons.description')" prop="description">
|
||||||
|
<el-input class="ms-http-textarea"
|
||||||
|
v-model="newData.description"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 1, maxRows: 10}"
|
||||||
|
:rows="1" size="small"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7" v-if="customNum">
|
||||||
|
<el-form-item label="ID" prop="customNum">
|
||||||
|
<el-input v-model.trim="newData.customNum" size="small"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 场景步骤-->
|
||||||
<div class="tip">{{ $t('test_track.plan_view.base_info') }}</div>
|
<div v-loading="loading">
|
||||||
<el-form :model="newData" label-position="right" label-width="80px" size="small" :rules="rules" :disabled="true"
|
<div @click="showAll">
|
||||||
ref="currentScenario" style="margin-right: 20px">
|
<p class="tip">{{ $t('api_test.automation.scenario_step') }} </p>
|
||||||
<!-- 基础信息 -->
|
</div>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="7">
|
<el-col :span="21">
|
||||||
<el-form-item :label="$t('commons.name')" prop="name">
|
<!-- 调试部分 -->
|
||||||
<el-input class="ms-scenario-input" size="small" v-model="newData.name"/>
|
<div class="ms-debug-div" @click="showAll" :class="{'is-top' : isTop}" ref="debugHeader">
|
||||||
</el-form-item>
|
<el-row style="margin: 5px">
|
||||||
</el-col>
|
<el-col :span="4" class="ms-col-one ms-font">
|
||||||
<el-col :span="7">
|
<el-tooltip placement="top" effect="light">
|
||||||
<el-form-item :label="$t('test_track.module.module')" prop="apiScenarioModuleId">
|
<template v-slot:content>
|
||||||
<ms-select-tree size="small" :data="moduleOptions" :defaultKey="newData.apiScenarioModuleId" :obj="moduleObj" clearable checkStrictly/>
|
<div>{{
|
||||||
</el-form-item>
|
newData.name === undefined || '' ? $t('api_test.scenario.name') : newData.name
|
||||||
</el-col>
|
}}
|
||||||
<el-col :span="7">
|
</div>
|
||||||
<el-form-item :label="$t('commons.status')" prop="status">
|
</template>
|
||||||
<el-select class="ms-scenario-input" size="small" v-model="newData.status">
|
<span class="scenario-name">
|
||||||
<el-option v-for="item in options" :key="item.id" :label="$t(item.label)" :value="item.id"/>
|
{{
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="7">
|
|
||||||
<el-form-item :label="$t('api_test.definition.request.responsible')" prop="principal">
|
|
||||||
<el-select v-model="newData.principal"
|
|
||||||
:placeholder="$t('api_test.definition.request.responsible')" filterable size="small"
|
|
||||||
class="ms-scenario-input">
|
|
||||||
<el-option
|
|
||||||
v-for="item in maintainerOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name + ' (' + item.id + ')'"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="7">
|
|
||||||
<el-form-item :label="$t('test_track.case.priority')" prop="level">
|
|
||||||
<el-select class="ms-scenario-input" size="small" v-model="newData.level">
|
|
||||||
<el-option v-for="item in levels" :key="item.id" :label="item.label" :value="item.id"/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="7">
|
|
||||||
<el-form-item :label="$t('api_test.automation.tag')" prop="tags">
|
|
||||||
<ms-input-tag :currentScenario="newData" ref="tag"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="7">
|
|
||||||
<el-form-item :label="$t('commons.description')" prop="description">
|
|
||||||
<el-input class="ms-http-textarea"
|
|
||||||
v-model="newData.description"
|
|
||||||
type="textarea"
|
|
||||||
:autosize="{ minRows: 1, maxRows: 10}"
|
|
||||||
:rows="1" size="small"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="7" v-if="customNum">
|
|
||||||
<el-form-item label="ID" prop="customNum">
|
|
||||||
<el-input v-model.trim="newData.customNum" size="small"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<!-- 场景步骤-->
|
|
||||||
<div v-loading="loading">
|
|
||||||
<div @click="showAll">
|
|
||||||
<p class="tip">{{ $t('api_test.automation.scenario_step') }} </p>
|
|
||||||
</div>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="21">
|
|
||||||
<!-- 调试部分 -->
|
|
||||||
<div class="ms-debug-div" @click="showAll" :class="{'is-top' : isTop}" ref="debugHeader">
|
|
||||||
<el-row style="margin: 5px">
|
|
||||||
<el-col :span="4" class="ms-col-one ms-font">
|
|
||||||
<el-tooltip placement="top" effect="light">
|
|
||||||
<template v-slot:content>
|
|
||||||
<div>{{
|
|
||||||
newData.name === undefined || '' ? $t('api_test.scenario.name') : newData.name
|
newData.name === undefined || '' ? $t('api_test.scenario.name') : newData.name
|
||||||
}}
|
}}
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<span class="scenario-name">
|
|
||||||
{{
|
|
||||||
newData.name === undefined || '' ? $t('api_test.scenario.name') : newData.name
|
|
||||||
}}
|
|
||||||
</span>
|
</span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" class="ms-col-one ms-font">
|
<el-col :span="3" class="ms-col-one ms-font">
|
||||||
{{ $t('api_test.automation.step_total') }}:{{ 0 }}
|
{{ $t('api_test.automation.step_total') }}:{{ 0 }}
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" class="ms-col-one ms-font">
|
<el-col :span="3" class="ms-col-one ms-font">
|
||||||
<el-link class="head" >{{ $t('api_test.automation.scenario_total') }}
|
<el-link class="head" >{{ $t('api_test.automation.scenario_total') }}
|
||||||
</el-link>
|
</el-link>
|
||||||
:{{ newVariableSize }}
|
:{{ newVariableSize }}
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" class="ms-col-one ms-font">
|
<el-col :span="3" class="ms-col-one ms-font">
|
||||||
<el-checkbox v-model="newEnableCookieShare"><span style="font-size: 13px;">{{ $t('api_test.scenario.share_cookie') }}</span></el-checkbox>
|
<el-checkbox v-model="newEnableCookieShare"><span style="font-size: 13px;">{{ $t('api_test.scenario.share_cookie') }}</span></el-checkbox>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" class="ms-col-one ms-font">
|
<el-col :span="3" class="ms-col-one ms-font">
|
||||||
<el-checkbox v-model="newOnSampleError"><span style="font-size: 13px;">{{ $t('commons.failure_continues') }}</span></el-checkbox>
|
<el-checkbox v-model="newOnSampleError"><span style="font-size: 13px;">{{ $t('commons.failure_continues') }}</span></el-checkbox>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 场景步骤内容 -->
|
<!-- 场景步骤内容 -->
|
||||||
<div ref="stepInfo">
|
<div ref="stepInfo">
|
||||||
<el-tooltip :content="$t('api_test.automation.open_expansion')" placement="top" effect="light">
|
<el-tooltip :content="$t('api_test.automation.open_expansion')" placement="top" effect="light">
|
||||||
<i class="el-icon-circle-plus-outline ms-open-btn ms-open-btn-left" @click="openExpansion('new')"/>
|
<i class="el-icon-circle-plus-outline ms-open-btn ms-open-btn-left" @click="openExpansion('new')"/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip :content="$t('api_test.automation.close_expansion')" placement="top" effect="light">
|
<el-tooltip :content="$t('api_test.automation.close_expansion')" placement="top" effect="light">
|
||||||
<i class="el-icon-remove-outline ms-open-btn" size="mini" @click="closeExpansion('new')"/>
|
<i class="el-icon-remove-outline ms-open-btn" size="mini" @click="closeExpansion('new')"/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tree node-key="newResourceId" :props="props" :data="newScenarioDefinition" class="ms-tree"
|
<el-tree node-key="newResourceId" :props="props" :data="newScenarioDefinition" class="ms-tree"
|
||||||
:expand-on-click-node="false"
|
:expand-on-click-node="false"
|
||||||
:default-expanded-keys="newExpandedNode"
|
:default-expanded-keys="newExpandedNode"
|
||||||
highlight-current
|
highlight-current
|
||||||
@node-expand="nodeExpand"
|
@node-expand="nodeExpand"
|
||||||
@node-collapse="nodeCollapse"
|
@node-collapse="nodeCollapse"
|
||||||
@node-click="nodeClick"
|
@node-click="nodeClick"
|
||||||
draggable ref="stepTree" >
|
draggable ref="stepTree" >
|
||||||
<span class="custom-tree-node father" slot-scope="{ node, data}" style="width: 96%">
|
<span class="custom-tree-node father" slot-scope="{ node, data}" style="width: 96%">
|
||||||
<!-- 步骤组件-->
|
<!-- 步骤组件-->
|
||||||
<ms-component-config
|
<ms-component-config
|
||||||
|
@ -314,36 +324,38 @@
|
||||||
:scenario="data"
|
:scenario="data"
|
||||||
:node="node"
|
:node="node"
|
||||||
:env-map="newProjectEnvMap"
|
:env-map="newProjectEnvMap"
|
||||||
|
:project-list="projectList"
|
||||||
:show-version="false"
|
:show-version="false"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-backtop target=".card-content" :visibility-height="100" :right="50"></el-backtop>
|
<el-backtop target=".card-content" :visibility-height="100" :right="50"></el-backtop>
|
||||||
</div>
|
</div>
|
||||||
|
</el-card>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-card>
|
<el-dialog
|
||||||
<el-dialog
|
:fullscreen="true"
|
||||||
:fullscreen="true"
|
:visible.sync="dialogVisible"
|
||||||
:visible.sync="dialogVisible"
|
append-to-body
|
||||||
append-to-body
|
width="100%"
|
||||||
width="100%"
|
>
|
||||||
>
|
<scenario-child-diff
|
||||||
<scenario-child-diff
|
:old-data="leftChildData"
|
||||||
:old-data="leftChildData"
|
:new-data="rightChildData"
|
||||||
:new-data="rightChildData"
|
:old-node="leftChildNode"
|
||||||
:old-node="leftChildNode"
|
:new-node="rightChildNode"
|
||||||
:new-node="rightChildNode"
|
:old-project-env-map="projectEnvMap"
|
||||||
:old-project-env-map="projectEnvMap"
|
:new-project-env-map="newProjectEnvMap"
|
||||||
:new-project-env-map="newProjectEnvMap"
|
:old-v-node="leftChildVnode"
|
||||||
:old-v-node="leftChildVnode"
|
:new-v-node="rightChildVnode"
|
||||||
:new-v-node="rightChildVnode"
|
></scenario-child-diff>
|
||||||
></scenario-child-diff>
|
</el-dialog>
|
||||||
</el-dialog>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -399,7 +411,10 @@ export default{
|
||||||
newOnSampleError:{},
|
newOnSampleError:{},
|
||||||
projectEnvMap: {},
|
projectEnvMap: {},
|
||||||
newProjectEnvMap: {},
|
newProjectEnvMap: {},
|
||||||
type:{}
|
type:{},
|
||||||
|
projectList:{
|
||||||
|
type: Array,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components:{
|
components:{
|
||||||
ScenarioChildDiff,
|
ScenarioChildDiff,
|
||||||
|
@ -427,6 +442,7 @@ export default{
|
||||||
options: API_STATUS,
|
options: API_STATUS,
|
||||||
levels: PRIORITY,
|
levels: PRIORITY,
|
||||||
loading: false,
|
loading: false,
|
||||||
|
isReloadData:true,
|
||||||
moduleObj: {
|
moduleObj: {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
label: 'name',
|
label: 'name',
|
||||||
|
@ -439,7 +455,6 @@ export default{
|
||||||
},
|
},
|
||||||
showHideTree: true,
|
showHideTree: true,
|
||||||
environmentType: ENV_TYPE.JSON,
|
environmentType: ENV_TYPE.JSON,
|
||||||
projectList:[],
|
|
||||||
props: {
|
props: {
|
||||||
label: "label",
|
label: "label",
|
||||||
children: "hashTree"
|
children: "hashTree"
|
||||||
|
@ -455,7 +470,7 @@ export default{
|
||||||
rightChildNode:{},
|
rightChildNode:{},
|
||||||
leftChildVnode:{},
|
leftChildVnode:{},
|
||||||
rightChildVnode:{},
|
rightChildVnode:{},
|
||||||
dialogVisible:false
|
dialogVisible:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
@ -466,6 +481,7 @@ export default{
|
||||||
console.log(this.$refs.old)
|
console.log(this.$refs.old)
|
||||||
console.log(this.$refs.new)
|
console.log(this.$refs.new)
|
||||||
diff(oldVnode,vnode);
|
diff(oldVnode,vnode);
|
||||||
|
this.isReloadData = false
|
||||||
},
|
},
|
||||||
showAll() {
|
showAll() {
|
||||||
// 控制当有弹出页面操作时禁止刷新按钮列表
|
// 控制当有弹出页面操作时禁止刷新按钮列表
|
||||||
|
@ -493,11 +509,6 @@ export default{
|
||||||
this.newEnvResult.loading = false;
|
this.newEnvResult.loading = false;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getWsProjects() {
|
|
||||||
this.$get("/project/listAll", res => {
|
|
||||||
this.projectList = res.data;
|
|
||||||
})
|
|
||||||
},
|
|
||||||
changeNodeStatus(nodes,source) {
|
changeNodeStatus(nodes,source) {
|
||||||
for (let i in nodes) {
|
for (let i in nodes) {
|
||||||
if (nodes[i]) {
|
if (nodes[i]) {
|
||||||
|
@ -622,7 +633,7 @@ export default{
|
||||||
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getWsProjects();
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
|
|
|
@ -1,107 +1,117 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="compare-class" v-loading="isReloadData">
|
<div>
|
||||||
<el-card style="width: 50%;" ref="old">
|
<el-row>
|
||||||
<div style="background-color: white;">
|
<el-col :span="12">
|
||||||
<el-row>
|
<el-tag>当前{{oldData.versionName }}</el-tag><span style="margin-left: 10px">{{oldData.userName}}</span><span style="margin-left: 10px">{{oldData.updateTime | timestampFormatDate }}</span>
|
||||||
<el-col>
|
</el-col>
|
||||||
<!--操作按钮-->
|
<el-col :span="12">
|
||||||
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!showFollow">
|
<el-tag>{{ newData.versionName }}</el-tag><span style="margin-left: 10px">{{newData.userName}}</span><span style="margin-left: 10px">{{newData.updateTime | timestampFormatDate }}</span>
|
||||||
<i class="el-icon-star-off"
|
</el-col>
|
||||||
style="color: #783987; font-size: 25px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
</el-row>
|
||||||
</el-tooltip>
|
<div class="compare-class" v-loading="isReloadData">
|
||||||
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-if="showFollow">
|
<el-card style="width: 50%;" ref="old">
|
||||||
<i class="el-icon-star-on"
|
<div style="background-color: white;">
|
||||||
style="color: #783987; font-size: 28px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
<el-row>
|
||||||
</el-tooltip>
|
<el-col>
|
||||||
|
<!--操作按钮-->
|
||||||
|
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!showFollow">
|
||||||
|
<i class="el-icon-star-off"
|
||||||
|
style="color: #783987; font-size: 25px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-if="showFollow">
|
||||||
|
<i class="el-icon-star-on"
|
||||||
|
style="color: #783987; font-size: 28px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
||||||
|
</el-tooltip>
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 基础信息 -->
|
<!-- 基础信息 -->
|
||||||
<p class="tip">{{ $t('test_track.plan_view.base_info') }} </p>
|
<p class="tip">{{ $t('test_track.plan_view.base_info') }} </p>
|
||||||
<br/>
|
<br/>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col>
|
<el-col>
|
||||||
<ms-basis-api :moduleOptions="moduleOptions" :is-read-only="true"
|
<ms-basis-api :moduleOptions="moduleOptions" :is-read-only="true"
|
||||||
:basisData="oldData" ref="basicForm"
|
:basisData="oldData" ref="basicForm"
|
||||||
/>
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 请求参数 -->
|
<!-- 请求参数 -->
|
||||||
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
||||||
<ms-basis-parameters :showScript="false" :request="oldRequest" :is-read-only="true"/>
|
<ms-basis-parameters :showScript="false" :request="oldRequest" :is-read-only="true"/>
|
||||||
|
|
||||||
<ms-form-divider :title="$t('test_track.case.other_info')"/>
|
<ms-form-divider :title="$t('test_track.case.other_info')"/>
|
||||||
<api-info-container>
|
<api-info-container>
|
||||||
<el-form :model="oldData" ref="api-form" label-width="100px">
|
<el-form :model="oldData" ref="api-form" label-width="100px">
|
||||||
<el-collapse-transition>
|
<el-collapse-transition>
|
||||||
<el-tabs v-model="activeName" style="margin: 20px">
|
<el-tabs v-model="activeName" style="margin: 20px">
|
||||||
<el-tab-pane :label="$t('commons.remark')" name="remark" class="pane">
|
<el-tab-pane :label="$t('commons.remark')" name="remark" class="pane">
|
||||||
<form-rich-text-item class="remark-item" :disabled="true" :data="oldData" prop="remark" label-width="0"/>
|
<form-rich-text-item class="remark-item" :disabled="true" :data="oldData" prop="remark" label-width="0"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="$t('commons.relationship.name')" name="dependencies" class="pane">
|
<el-tab-pane :label="$t('commons.relationship.name')" name="dependencies" class="pane">
|
||||||
<template v-slot:label>
|
<template v-slot:label>
|
||||||
<tab-pane-count :title="$t('commons.relationship.name')" :count="oldRelationshipCount"/>
|
<tab-pane-count :title="$t('commons.relationship.name')" :count="oldRelationshipCount"/>
|
||||||
</template>
|
</template>
|
||||||
<dependencies-list @setCount="setOldCount" :read-only="true" :resource-id="oldData.id" resource-type="API" ref="oldDependencies"/>
|
<dependencies-list @setCount="setOldCount" :read-only="true" :resource-id="oldData.id" resource-type="API" ref="oldDependencies"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-collapse-transition>
|
</el-collapse-transition>
|
||||||
</el-form>
|
</el-form>
|
||||||
</api-info-container>
|
</api-info-container>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="width: 50%;" ref="new">
|
<el-card style="width: 50%;" ref="new">
|
||||||
<div style="background-color: white;">
|
<div style="background-color: white;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col>
|
<el-col>
|
||||||
<!--操作按钮-->
|
<!--操作按钮-->
|
||||||
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!newShowFollow">
|
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!newShowFollow">
|
||||||
<i class="el-icon-star-off"
|
<i class="el-icon-star-off"
|
||||||
style="color: #783987; font-size: 25px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
style="color: #783987; font-size: 25px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-if="newShowFollow">
|
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-if="newShowFollow">
|
||||||
<i class="el-icon-star-on"
|
<i class="el-icon-star-on"
|
||||||
style="color: #783987; font-size: 28px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
style="color: #783987; font-size: 28px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 基础信息 -->
|
<!-- 基础信息 -->
|
||||||
<p class="tip">{{ $t('test_track.plan_view.base_info') }} </p>
|
<p class="tip">{{ $t('test_track.plan_view.base_info') }} </p>
|
||||||
<br/>
|
<br/>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col>
|
<el-col>
|
||||||
<ms-basis-api :moduleOptions="moduleOptions" :is-read-only="true"
|
<ms-basis-api :moduleOptions="moduleOptions" :is-read-only="true"
|
||||||
:basisData="newData" ref="basicForm"/>
|
:basisData="newData" ref="basicForm"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 请求参数 -->
|
<!-- 请求参数 -->
|
||||||
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
||||||
<ms-basis-parameters :showScript="false" :request="request" :is-read-only="true"/>
|
<ms-basis-parameters :showScript="false" :request="request" :is-read-only="true"/>
|
||||||
|
|
||||||
<!-- 其他信息-->
|
<!-- 其他信息-->
|
||||||
<ms-form-divider :title="$t('test_track.case.other_info')"/>
|
<ms-form-divider :title="$t('test_track.case.other_info')"/>
|
||||||
<api-info-container>
|
<api-info-container>
|
||||||
<el-form :model="newData" ref="api-form" label-width="100px">
|
<el-form :model="newData" ref="api-form" label-width="100px">
|
||||||
<el-collapse-transition>
|
<el-collapse-transition>
|
||||||
<el-tabs v-model="activeName" style="margin: 20px">
|
<el-tabs v-model="activeName" style="margin: 20px">
|
||||||
<el-tab-pane :label="$t('commons.remark')" name="remark" class="pane">
|
<el-tab-pane :label="$t('commons.remark')" name="remark" class="pane">
|
||||||
<form-rich-text-item class="remark-item" :disabled="true" :data="newData" prop="remark" label-width="0"/>
|
<form-rich-text-item class="remark-item" :disabled="true" :data="newData" prop="remark" label-width="0"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="$t('commons.relationship.name')" name="dependencies" class="pane">
|
<el-tab-pane :label="$t('commons.relationship.name')" name="dependencies" class="pane">
|
||||||
<template v-slot:label>
|
<template v-slot:label>
|
||||||
<tab-pane-count :title="$t('commons.relationship.name')" :count="relationshipCount"/>
|
<tab-pane-count :title="$t('commons.relationship.name')" :count="relationshipCount"/>
|
||||||
</template>
|
</template>
|
||||||
<dependencies-list @setCount="setCount" :read-only="true" :resource-id="newData.id" resource-type="API" ref="newDependencies"/>
|
<dependencies-list @setCount="setCount" :read-only="true" :resource-id="newData.id" resource-type="API" ref="newDependencies"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-collapse-transition>
|
</el-collapse-transition>
|
||||||
</el-form>
|
</el-form>
|
||||||
</api-info-container>
|
</api-info-container>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,8 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="compare-class" v-loading="isReloadData">
|
<div>
|
||||||
<el-card style="width: 50%;" ref="old">
|
<el-row>
|
||||||
<el-form :model="oldData" :rules="rule" ref="httpForm" label-width="80px" label-position="right" :disabled="true">
|
<el-col :span="12">
|
||||||
<!-- 操作按钮 -->
|
<el-tag>当前{{oldData.versionName }}</el-tag><span style="margin-left: 10px">{{oldData.userName}}</span><span style="margin-left: 10px">{{oldData.updateTime | timestampFormatDate }}</span>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-tag>{{ newData.versionName }}</el-tag><span style="margin-left: 10px">{{newData.userName}}</span><span style="margin-left: 10px">{{newData.updateTime | timestampFormatDate }}</span>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div class="compare-class" v-loading="isReloadData">
|
||||||
|
<el-card style="width: 50%;" ref="old">
|
||||||
|
<el-form :model="oldData" :rules="rule" ref="httpForm" label-width="80px" label-position="right" :disabled="true">
|
||||||
|
<!-- 操作按钮 -->
|
||||||
|
|
||||||
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!showFollow">
|
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!showFollow">
|
||||||
<i class="el-icon-star-off"
|
<i class="el-icon-star-off"
|
||||||
|
@ -13,127 +22,127 @@
|
||||||
style="color: #783987; font-size: 28px; margin-right: 5px; position: relative; top: 5px; float: right; cursor: pointer "/>
|
style="color: #783987; font-size: 28px; margin-right: 5px; position: relative; top: 5px; float: right; cursor: pointer "/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<ms-form-divider :title="$t('test_track.plan_view.base_info')"/>
|
<ms-form-divider :title="$t('test_track.plan_view.base_info')"/>
|
||||||
|
|
||||||
<!-- 基础信息 -->
|
<!-- 基础信息 -->
|
||||||
<div class="base-info">
|
<div class="base-info">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="$t('commons.name')" prop="name">
|
<el-form-item :label="$t('commons.name')" prop="name">
|
||||||
<el-input class="ms-http-input" size="small" v-model="oldData.name"/>
|
<el-input class="ms-http-input" size="small" v-model="oldData.name"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<el-form-item :label="$t('api_report.request')" prop="path">
|
<el-form-item :label="$t('api_report.request')" prop="path">
|
||||||
<el-input :placeholder="$t('api_test.definition.request.path_info')" v-model="oldData.path"
|
<el-input :placeholder="$t('api_test.definition.request.path_info')" v-model="oldData.path"
|
||||||
class="ms-http-input" size="small" style="margin-top: 5px" >
|
class="ms-http-input" size="small" style="margin-top: 5px" >
|
||||||
<el-select v-model="oldData.method" slot="prepend" style="width: 100px" size="small">
|
<el-select v-model="oldData.method" slot="prepend" style="width: 100px" size="small">
|
||||||
<el-option v-for="item in reqOptions" :key="item.id" :label="item.label" :value="item.id"/>
|
<el-option v-for="item in reqOptions" :key="item.id" :label="item.label" :value="item.id"/>
|
||||||
|
</el-select>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item :label="$t('api_test.definition.request.responsible')" prop="userId">
|
||||||
|
<el-select v-model="oldData.userId"
|
||||||
|
:placeholder="$t('api_test.definition.request.responsible')" filterable size="small"
|
||||||
|
class="ms-http-select">
|
||||||
|
<el-option
|
||||||
|
v-for="item in maintainerOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name + ' (' + item.id + ')'"
|
||||||
|
:value="item.id">
|
||||||
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-input>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="8">
|
||||||
</el-row>
|
<el-form-item :label="$t('test_track.module.module')" prop="moduleId">
|
||||||
|
<ms-select-tree size="small" :data="moduleOptions" :defaultKey="oldData.moduleId"
|
||||||
|
:obj="moduleObj" clearable checkStrictly/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
<el-row>
|
<el-col :span="8">
|
||||||
<el-col :span="8">
|
<el-form-item :label="$t('commons.status')" prop="status">
|
||||||
<el-form-item :label="$t('api_test.definition.request.responsible')" prop="userId">
|
<el-select class="ms-http-select" size="small" v-model="oldData.status">
|
||||||
<el-select v-model="oldData.userId"
|
<el-option v-for="item in options" :key="item.id" :label="$t(item.label)" :value="item.id"/>
|
||||||
:placeholder="$t('api_test.definition.request.responsible')" filterable size="small"
|
</el-select>
|
||||||
class="ms-http-select">
|
</el-form-item>
|
||||||
<el-option
|
</el-col>
|
||||||
v-for="item in maintainerOptions"
|
</el-row>
|
||||||
:key="item.id"
|
<el-row>
|
||||||
:label="item.name + ' (' + item.id + ')'"
|
<el-col :span="8">
|
||||||
:value="item.id">
|
<el-form-item :label="$t('commons.tag')" prop="tag">
|
||||||
</el-option>
|
<ms-input-tag :currentScenario="oldData" ref="tag" v-model="oldData.tags"/>
|
||||||
</el-select>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="8">
|
||||||
<el-col :span="8">
|
<el-form-item :label="$t('commons.description')" prop="description">
|
||||||
<el-form-item :label="$t('test_track.module.module')" prop="moduleId">
|
<el-input class="ms-http-textarea"
|
||||||
<ms-select-tree size="small" :data="moduleOptions" :defaultKey="oldData.moduleId"
|
v-model="oldData.description"
|
||||||
:obj="moduleObj" clearable checkStrictly/>
|
type="textarea"
|
||||||
</el-form-item>
|
:autosize="{ minRows: 1, maxRows: 10}"
|
||||||
</el-col>
|
:rows="1" size="small"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-col :span="8">
|
<!-- MOCK信息 -->
|
||||||
<el-form-item :label="$t('commons.status')" prop="status">
|
<ms-form-divider :title="$t('test_track.plan_view.mock_info')"/>
|
||||||
<el-select class="ms-http-select" size="small" v-model="oldData.status">
|
<div class="base-info mock-info">
|
||||||
<el-option v-for="item in options" :key="item.id" :label="$t(item.label)" :value="item.id"/>
|
<el-row>
|
||||||
</el-select>
|
<el-col :span="20">
|
||||||
</el-form-item>
|
Mock地址:
|
||||||
</el-col>
|
<el-link target="_blank" style="color: black"
|
||||||
</el-row>
|
type="primary">{{ this.oldMockUrl }}
|
||||||
<el-row>
|
</el-link>
|
||||||
<el-col :span="8">
|
</el-col>
|
||||||
<el-form-item :label="$t('commons.tag')" prop="tag">
|
</el-row>
|
||||||
<ms-input-tag :currentScenario="oldData" ref="tag" v-model="oldData.tags"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item :label="$t('commons.description')" prop="description">
|
|
||||||
<el-input class="ms-http-textarea"
|
|
||||||
v-model="oldData.description"
|
|
||||||
type="textarea"
|
|
||||||
:autosize="{ minRows: 1, maxRows: 10}"
|
|
||||||
:rows="1" size="small"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- MOCK信息 -->
|
</div>
|
||||||
<ms-form-divider :title="$t('test_track.plan_view.mock_info')"/>
|
|
||||||
<div class="base-info mock-info">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="20">
|
|
||||||
Mock地址:
|
|
||||||
<el-link target="_blank" style="color: black"
|
|
||||||
type="primary">{{ this.oldMockUrl }}
|
|
||||||
</el-link>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
</div>
|
<!-- 请求参数 -->
|
||||||
|
<div>
|
||||||
|
<ms-form-divider :title="$t('api_test.definition.request.req_param')"/>
|
||||||
|
<ms-api-request-form :showScript="false" :request="request" :headers="request.headers"
|
||||||
|
:isShowEnable="isShowEnable"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 请求参数 -->
|
|
||||||
<div>
|
|
||||||
<ms-form-divider :title="$t('api_test.definition.request.req_param')"/>
|
|
||||||
<ms-api-request-form :showScript="false" :request="request" :headers="request.headers"
|
|
||||||
:isShowEnable="isShowEnable"/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<!-- 响应内容-->
|
|
||||||
<ms-form-divider :title="$t('api_test.definition.request.res_param')"/>
|
|
||||||
<ms-response-text :response="response"/>
|
|
||||||
|
|
||||||
<ms-form-divider :title="$t('test_track.case.other_info')"/>
|
|
||||||
<api-info-container>
|
|
||||||
<el-form :model="oldData" ref="api-form" label-width="100px">
|
|
||||||
<el-collapse-transition>
|
|
||||||
<el-tabs v-model="activeName" style="margin: 20px">
|
|
||||||
<el-tab-pane :label="$t('commons.remark')" name="remark" class="pane">
|
|
||||||
<form-rich-text-item class="remark-item" :disabled="true" :data="oldData" prop="remark" label-width="0"/>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane :label="$t('commons.relationship.name')" name="dependencies" class="pane">
|
|
||||||
<template v-slot:label>
|
|
||||||
<tab-pane-count :title="$t('commons.relationship.name')" :count="oldRelationshipCount"/>
|
|
||||||
</template>
|
|
||||||
<dependencies-list @setCount="setOldCount" :read-only="true" :resource-id="oldData.id" resource-type="API" ref="oldDependencies"/>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</el-collapse-transition>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</api-info-container>
|
|
||||||
|
|
||||||
</el-card>
|
<!-- 响应内容-->
|
||||||
<el-card style="width: 50%;" ref="new">
|
<ms-form-divider :title="$t('api_test.definition.request.res_param')"/>
|
||||||
<el-form :model="newData" :rules="rule" ref="httpForm" label-width="80px" label-position="right" :disabled="true">
|
<ms-response-text :response="response"/>
|
||||||
<!-- 操作按钮 -->
|
|
||||||
|
<ms-form-divider :title="$t('test_track.case.other_info')"/>
|
||||||
|
<api-info-container>
|
||||||
|
<el-form :model="oldData" ref="api-form" label-width="100px">
|
||||||
|
<el-collapse-transition>
|
||||||
|
<el-tabs v-model="activeName" style="margin: 20px">
|
||||||
|
<el-tab-pane :label="$t('commons.remark')" name="remark" class="pane">
|
||||||
|
<form-rich-text-item class="remark-item" :disabled="true" :data="oldData" prop="remark" label-width="0"/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="$t('commons.relationship.name')" name="dependencies" class="pane">
|
||||||
|
<template v-slot:label>
|
||||||
|
<tab-pane-count :title="$t('commons.relationship.name')" :count="oldRelationshipCount"/>
|
||||||
|
</template>
|
||||||
|
<dependencies-list @setCount="setOldCount" :read-only="true" :resource-id="oldData.id" resource-type="API" ref="oldDependencies"/>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-collapse-transition>
|
||||||
|
</el-form>
|
||||||
|
</api-info-container>
|
||||||
|
|
||||||
|
</el-card>
|
||||||
|
<el-card style="width: 50%;" ref="new">
|
||||||
|
<el-form :model="newData" :rules="rule" ref="httpForm" label-width="80px" label-position="right" :disabled="true">
|
||||||
|
<!-- 操作按钮 -->
|
||||||
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!newShowFollow">
|
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!newShowFollow">
|
||||||
<i class="el-icon-star-off"
|
<i class="el-icon-star-off"
|
||||||
style="color: #783987; font-size: 25px; margin-right: 5px; position: relative; top: 5px; float: right; cursor: pointer "/>
|
style="color: #783987; font-size: 25px; margin-right: 5px; position: relative; top: 5px; float: right; cursor: pointer "/>
|
||||||
|
@ -143,126 +152,127 @@
|
||||||
style="color: #783987; font-size: 28px; margin-right: 5px; position: relative; top: 5px; float: right; cursor: pointer "/>
|
style="color: #783987; font-size: 28px; margin-right: 5px; position: relative; top: 5px; float: right; cursor: pointer "/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
<ms-form-divider :title="$t('test_track.plan_view.base_info')"/>
|
<ms-form-divider :title="$t('test_track.plan_view.base_info')"/>
|
||||||
|
|
||||||
<!-- 基础信息 -->
|
<!-- 基础信息 -->
|
||||||
<div class="base-info">
|
<div class="base-info">
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="$t('commons.name')" prop="name">
|
<el-form-item :label="$t('commons.name')" prop="name">
|
||||||
<el-input class="ms-http-input" size="small" v-model="newData.name"/>
|
<el-input class="ms-http-input" size="small" v-model="newData.name"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<el-form-item :label="$t('api_report.request')" prop="path">
|
<el-form-item :label="$t('api_report.request')" prop="path">
|
||||||
<el-input :placeholder="$t('api_test.definition.request.path_info')" v-model="newData.path"
|
<el-input :placeholder="$t('api_test.definition.request.path_info')" v-model="newData.path"
|
||||||
class="ms-http-input" size="small" style="margin-top: 5px" >
|
class="ms-http-input" size="small" style="margin-top: 5px" >
|
||||||
<el-select v-model="newData.method" slot="prepend" style="width: 100px" size="small">
|
<el-select v-model="newData.method" slot="prepend" style="width: 100px" size="small">
|
||||||
<el-option v-for="item in reqOptions" :key="item.id" :label="item.label" :value="item.id"/>
|
<el-option v-for="item in reqOptions" :key="item.id" :label="item.label" :value="item.id"/>
|
||||||
|
</el-select>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item :label="$t('api_test.definition.request.responsible')" prop="userId">
|
||||||
|
<el-select v-model="newData.userId"
|
||||||
|
:placeholder="$t('api_test.definition.request.responsible')" filterable size="small"
|
||||||
|
class="ms-http-select">
|
||||||
|
<el-option
|
||||||
|
v-for="item in maintainerOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name + ' (' + item.id + ')'"
|
||||||
|
:value="item.id">
|
||||||
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-input>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="8">
|
||||||
</el-row>
|
<el-form-item :label="$t('test_track.module.module')" prop="moduleId">
|
||||||
|
<ms-select-tree size="small" :data="moduleOptions" :defaultKey="newData.moduleId"
|
||||||
|
:obj="moduleObj" clearable checkStrictly/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
<el-row>
|
<el-col :span="8">
|
||||||
<el-col :span="8">
|
<el-form-item :label="$t('commons.status')" prop="status">
|
||||||
<el-form-item :label="$t('api_test.definition.request.responsible')" prop="userId">
|
<el-select class="ms-http-select" size="small" v-model="newData.status">
|
||||||
<el-select v-model="newData.userId"
|
<el-option v-for="item in options" :key="item.id" :label="$t(item.label)" :value="item.id"/>
|
||||||
:placeholder="$t('api_test.definition.request.responsible')" filterable size="small"
|
</el-select>
|
||||||
class="ms-http-select">
|
</el-form-item>
|
||||||
<el-option
|
</el-col>
|
||||||
v-for="item in maintainerOptions"
|
</el-row>
|
||||||
:key="item.id"
|
<el-row>
|
||||||
:label="item.name + ' (' + item.id + ')'"
|
<el-col :span="8">
|
||||||
:value="item.id">
|
<el-form-item :label="$t('commons.tag')" prop="tag">
|
||||||
</el-option>
|
<ms-input-tag :currentScenario="newData" ref="tag" v-model="newData.tags"/>
|
||||||
</el-select>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="8">
|
||||||
<el-col :span="8">
|
<el-form-item :label="$t('commons.description')" prop="description">
|
||||||
<el-form-item :label="$t('test_track.module.module')" prop="moduleId">
|
<el-input class="ms-http-textarea"
|
||||||
<ms-select-tree size="small" :data="moduleOptions" :defaultKey="newData.moduleId"
|
v-model="newData.description"
|
||||||
:obj="moduleObj" clearable checkStrictly/>
|
type="textarea"
|
||||||
</el-form-item>
|
:autosize="{ minRows: 1, maxRows: 10}"
|
||||||
</el-col>
|
:rows="1" size="small"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-col :span="8">
|
<!-- MOCK信息 -->
|
||||||
<el-form-item :label="$t('commons.status')" prop="status">
|
<ms-form-divider :title="$t('test_track.plan_view.mock_info')"/>
|
||||||
<el-select class="ms-http-select" size="small" v-model="newData.status">
|
<div class="base-info mock-info">
|
||||||
<el-option v-for="item in options" :key="item.id" :label="$t(item.label)" :value="item.id"/>
|
<el-row>
|
||||||
</el-select>
|
<el-col :span="20">
|
||||||
</el-form-item>
|
Mock地址:
|
||||||
</el-col>
|
<el-link target="_blank" style="color: black"
|
||||||
</el-row>
|
type="primary">{{ this.newMockUrl }}
|
||||||
<el-row>
|
</el-link>
|
||||||
<el-col :span="8">
|
</el-col>
|
||||||
<el-form-item :label="$t('commons.tag')" prop="tag">
|
</el-row>
|
||||||
<ms-input-tag :currentScenario="newData" ref="tag" v-model="newData.tags"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item :label="$t('commons.description')" prop="description">
|
|
||||||
<el-input class="ms-http-textarea"
|
|
||||||
v-model="newData.description"
|
|
||||||
type="textarea"
|
|
||||||
:autosize="{ minRows: 1, maxRows: 10}"
|
|
||||||
:rows="1" size="small"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- MOCK信息 -->
|
</div>
|
||||||
<ms-form-divider :title="$t('test_track.plan_view.mock_info')"/>
|
|
||||||
<div class="base-info mock-info">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="20">
|
|
||||||
Mock地址:
|
|
||||||
<el-link target="_blank" style="color: black"
|
|
||||||
type="primary">{{ this.newMockUrl }}
|
|
||||||
</el-link>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
</div>
|
<!-- 请求参数 -->
|
||||||
|
<div>
|
||||||
|
<ms-form-divider :title="$t('api_test.definition.request.req_param')"/>
|
||||||
|
<ms-api-request-form :showScript="false" :request="oldRequest" :headers="oldRequest.headers"
|
||||||
|
:isShowEnable="isShowEnable"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 请求参数 -->
|
|
||||||
<div>
|
|
||||||
<ms-form-divider :title="$t('api_test.definition.request.req_param')"/>
|
|
||||||
<ms-api-request-form :showScript="false" :request="oldRequest" :headers="oldRequest.headers"
|
|
||||||
:isShowEnable="isShowEnable"/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<!-- 响应内容-->
|
|
||||||
<ms-form-divider :title="$t('api_test.definition.request.res_param')"/>
|
|
||||||
<ms-response-text :response="oldResponse"/>
|
|
||||||
|
|
||||||
<!-- 其他信息-->
|
|
||||||
<ms-form-divider :title="$t('test_track.case.other_info')"/>
|
|
||||||
<api-info-container>
|
|
||||||
<el-form :model="newData" ref="api-form" label-width="100px">
|
|
||||||
<el-collapse-transition>
|
|
||||||
<el-tabs v-model="activeName" style="margin: 20px">
|
|
||||||
<el-tab-pane :label="$t('commons.remark')" name="remark" class="pane">
|
|
||||||
<form-rich-text-item class="remark-item" :disabled="true" :data="newData" prop="remark" label-width="0"/>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane :label="$t('commons.relationship.name')" name="dependencies" class="pane">
|
|
||||||
<template v-slot:label>
|
|
||||||
<tab-pane-count :title="$t('commons.relationship.name')" :count="relationshipCount"/>
|
|
||||||
</template>
|
|
||||||
<dependencies-list @setCount="setCount" :read-only="true" :resource-id="newData.id" resource-type="API" ref="newDependencies"/>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</el-collapse-transition>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</api-info-container>
|
|
||||||
</el-card>
|
<!-- 响应内容-->
|
||||||
|
<ms-form-divider :title="$t('api_test.definition.request.res_param')"/>
|
||||||
|
<ms-response-text :response="oldResponse"/>
|
||||||
|
|
||||||
|
<!-- 其他信息-->
|
||||||
|
<ms-form-divider :title="$t('test_track.case.other_info')"/>
|
||||||
|
<api-info-container>
|
||||||
|
<el-form :model="newData" ref="api-form" label-width="100px">
|
||||||
|
<el-collapse-transition>
|
||||||
|
<el-tabs v-model="activeName" style="margin: 20px">
|
||||||
|
<el-tab-pane :label="$t('commons.remark')" name="remark" class="pane">
|
||||||
|
<form-rich-text-item class="remark-item" :disabled="true" :data="newData" prop="remark" label-width="0"/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="$t('commons.relationship.name')" name="dependencies" class="pane">
|
||||||
|
<template v-slot:label>
|
||||||
|
<tab-pane-count :title="$t('commons.relationship.name')" :count="relationshipCount"/>
|
||||||
|
</template>
|
||||||
|
<dependencies-list @setCount="setCount" :read-only="true" :resource-id="newData.id" resource-type="API" ref="newDependencies"/>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-collapse-transition>
|
||||||
|
</el-form>
|
||||||
|
</api-info-container>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,106 +1,116 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="compare-class" v-loading="isReloadData">
|
<div>
|
||||||
<el-card style="width: 50%;" ref="old">
|
<el-row>
|
||||||
<div style="background-color: white;">
|
<el-col :span="12">
|
||||||
<el-row>
|
<el-tag>当前{{oldData.versionName }}</el-tag><span style="margin-left: 10px">{{oldData.userName}}</span><span style="margin-left: 10px">{{oldData.updateTime | timestampFormatDate }}</span>
|
||||||
<el-col>
|
</el-col>
|
||||||
<!--操作按钮-->
|
<el-col :span="12">
|
||||||
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!showFollow">
|
<el-tag>{{ newData.versionName }}</el-tag><span style="margin-left: 10px">{{newData.userName}}</span><span style="margin-left: 10px">{{newData.updateTime | timestampFormatDate }}</span>
|
||||||
<i class="el-icon-star-off"
|
</el-col>
|
||||||
style="color: #783987; font-size: 25px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
</el-row>
|
||||||
</el-tooltip>
|
<div class="compare-class" v-loading="isReloadData">
|
||||||
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-if="showFollow">
|
<el-card style="width: 50%;" ref="old">
|
||||||
<i class="el-icon-star-on"
|
<div style="background-color: white;">
|
||||||
style="color: #783987; font-size: 28px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
<el-row>
|
||||||
</el-tooltip>
|
<el-col>
|
||||||
</el-col>
|
<!--操作按钮-->
|
||||||
</el-row>
|
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!showFollow">
|
||||||
<!-- 基础信息 -->
|
<i class="el-icon-star-off"
|
||||||
<p class="tip">{{ $t('test_track.plan_view.base_info') }} </p>
|
style="color: #783987; font-size: 25px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
||||||
<br/>
|
</el-tooltip>
|
||||||
<el-row>
|
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-if="showFollow">
|
||||||
<el-col>
|
<i class="el-icon-star-on"
|
||||||
<ms-basis-api :moduleOptions="moduleOptions" :is-read-only="true"
|
style="color: #783987; font-size: 28px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
||||||
:basisData="oldData" ref="basicForm"
|
</el-tooltip>
|
||||||
/>
|
</el-col>
|
||||||
</el-col>
|
</el-row>
|
||||||
</el-row>
|
<!-- 基础信息 -->
|
||||||
<!-- 请求参数 -->
|
<p class="tip">{{ $t('test_track.plan_view.base_info') }} </p>
|
||||||
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
<br/>
|
||||||
<ms-basis-parameters :showScript="false" :request="oldRequest" :is-read-only="true"/>
|
<el-row>
|
||||||
|
<el-col>
|
||||||
|
<ms-basis-api :moduleOptions="moduleOptions" :is-read-only="true"
|
||||||
|
:basisData="oldData" ref="basicForm"
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<!-- 请求参数 -->
|
||||||
|
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
||||||
|
<ms-basis-parameters :showScript="false" :request="oldRequest" :is-read-only="true"/>
|
||||||
|
|
||||||
<ms-form-divider :title="$t('test_track.case.other_info')"/>
|
<ms-form-divider :title="$t('test_track.case.other_info')"/>
|
||||||
<api-info-container>
|
<api-info-container>
|
||||||
<el-form :model="oldData" ref="api-form" label-width="100px">
|
<el-form :model="oldData" ref="api-form" label-width="100px">
|
||||||
<el-collapse-transition>
|
<el-collapse-transition>
|
||||||
<el-tabs v-model="activeName" style="margin: 20px">
|
<el-tabs v-model="activeName" style="margin: 20px">
|
||||||
<el-tab-pane :label="$t('commons.remark')" name="remark" class="pane">
|
<el-tab-pane :label="$t('commons.remark')" name="remark" class="pane">
|
||||||
<form-rich-text-item class="remark-item" :disabled="true" :data="oldData" prop="remark" label-width="0"/>
|
<form-rich-text-item class="remark-item" :disabled="true" :data="oldData" prop="remark" label-width="0"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="$t('commons.relationship.name')" name="dependencies" class="pane">
|
<el-tab-pane :label="$t('commons.relationship.name')" name="dependencies" class="pane">
|
||||||
<template v-slot:label>
|
<template v-slot:label>
|
||||||
<tab-pane-count :title="$t('commons.relationship.name')" :count="oldRelationshipCount"/>
|
<tab-pane-count :title="$t('commons.relationship.name')" :count="oldRelationshipCount"/>
|
||||||
</template>
|
</template>
|
||||||
<dependencies-list @setCount="setOldCount" :read-only="true" :resource-id="oldData.id" resource-type="API" ref="oldDependencies"/>
|
<dependencies-list @setCount="setOldCount" :read-only="true" :resource-id="oldData.id" resource-type="API" ref="oldDependencies"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-collapse-transition>
|
</el-collapse-transition>
|
||||||
</el-form>
|
</el-form>
|
||||||
</api-info-container>
|
</api-info-container>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="width: 50%;" ref="new">
|
<el-card style="width: 50%;" ref="new">
|
||||||
<div style="background-color: white;">
|
<div style="background-color: white;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col>
|
<el-col>
|
||||||
<!--操作按钮-->
|
<!--操作按钮-->
|
||||||
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!newShowFollow">
|
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!newShowFollow">
|
||||||
<i class="el-icon-star-off"
|
<i class="el-icon-star-off"
|
||||||
style="color: #783987; font-size: 25px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
style="color: #783987; font-size: 25px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-if="newShowFollow">
|
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-if="newShowFollow">
|
||||||
<i class="el-icon-star-on"
|
<i class="el-icon-star-on"
|
||||||
style="color: #783987; font-size: 28px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
style="color: #783987; font-size: 28px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 基础信息 -->
|
<!-- 基础信息 -->
|
||||||
<p class="tip">{{ $t('test_track.plan_view.base_info') }} </p>
|
<p class="tip">{{ $t('test_track.plan_view.base_info') }} </p>
|
||||||
<br/>
|
<br/>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col>
|
<el-col>
|
||||||
<ms-basis-api :moduleOptions="moduleOptions" :is-read-only="true"
|
<ms-basis-api :moduleOptions="moduleOptions" :is-read-only="true"
|
||||||
:basisData="newData" ref="basicForm"
|
:basisData="newData" ref="basicForm"
|
||||||
/>
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 请求参数 -->
|
<!-- 请求参数 -->
|
||||||
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
||||||
<ms-basis-parameters :showScript="false" :request="request" :is-read-only="true"/>
|
<ms-basis-parameters :showScript="false" :request="request" :is-read-only="true"/>
|
||||||
|
|
||||||
<!-- 其他信息-->
|
<!-- 其他信息-->
|
||||||
<ms-form-divider :title="$t('test_track.case.other_info')"/>
|
<ms-form-divider :title="$t('test_track.case.other_info')"/>
|
||||||
<api-info-container>
|
<api-info-container>
|
||||||
<el-form :model="newData" ref="api-form" label-width="100px">
|
<el-form :model="newData" ref="api-form" label-width="100px">
|
||||||
<el-collapse-transition>
|
<el-collapse-transition>
|
||||||
<el-tabs v-model="activeName" style="margin: 20px">
|
<el-tabs v-model="activeName" style="margin: 20px">
|
||||||
<el-tab-pane :label="$t('commons.remark')" name="remark" class="pane">
|
<el-tab-pane :label="$t('commons.remark')" name="remark" class="pane">
|
||||||
<form-rich-text-item class="remark-item" :disabled="true" :data="newData" prop="remark" label-width="0"/>
|
<form-rich-text-item class="remark-item" :disabled="true" :data="newData" prop="remark" label-width="0"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="$t('commons.relationship.name')" name="dependencies" class="pane">
|
<el-tab-pane :label="$t('commons.relationship.name')" name="dependencies" class="pane">
|
||||||
<template v-slot:label>
|
<template v-slot:label>
|
||||||
<tab-pane-count :title="$t('commons.relationship.name')" :count="relationshipCount"/>
|
<tab-pane-count :title="$t('commons.relationship.name')" :count="relationshipCount"/>
|
||||||
</template>
|
</template>
|
||||||
<dependencies-list @setCount="setCount" :read-only="true" :resource-id="newData.id" resource-type="API" ref="newDependencies"/>
|
<dependencies-list @setCount="setCount" :read-only="true" :resource-id="newData.id" resource-type="API" ref="newDependencies"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-collapse-transition>
|
</el-collapse-transition>
|
||||||
</el-form>
|
</el-form>
|
||||||
</api-info-container>
|
</api-info-container>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,162 +1,172 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="compare-class" v-loading="isReloadData">
|
<div>
|
||||||
<el-card style="width: 50%;" ref="old">
|
<el-row>
|
||||||
<div style="background-color: white;">
|
<el-col :span="12">
|
||||||
<el-row>
|
<el-tag>当前{{oldData.versionName }}</el-tag><span style="margin-left: 10px">{{oldData.userName}}</span><span style="margin-left: 10px">{{oldData.updateTime | timestampFormatDate }}</span>
|
||||||
<el-col>
|
</el-col>
|
||||||
<!--操作按钮-->
|
<el-col :span="12">
|
||||||
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!showFollow">
|
<el-tag>{{ newData.versionName }}</el-tag><span style="margin-left: 10px">{{newData.userName}}</span><span style="margin-left: 10px">{{newData.updateTime | timestampFormatDate }}</span>
|
||||||
<i class="el-icon-star-off"
|
</el-col>
|
||||||
style="color: #783987; font-size: 25px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
</el-row>
|
||||||
</el-tooltip>
|
<div class="compare-class" v-loading="isReloadData">
|
||||||
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-if="showFollow">
|
<el-card style="width: 50%;" ref="old">
|
||||||
<i class="el-icon-star-on"
|
<div style="background-color: white;">
|
||||||
style="color: #783987; font-size: 28px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
|
||||||
</el-tooltip>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<!-- 基础信息 -->
|
|
||||||
<p class="tip">{{ $t('test_track.plan_view.base_info') }} </p>
|
|
||||||
<br/>
|
|
||||||
<el-row>
|
|
||||||
<el-col>
|
|
||||||
<ms-tcp-basic-api
|
|
||||||
:is-diff = true
|
|
||||||
:method-types="methodTypes"
|
|
||||||
:moduleOptions="moduleOptions"
|
|
||||||
:basisData="oldData" ref="basicForm"/>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<!-- MOCK信息 -->
|
|
||||||
<p class="tip">{{ $t('test_track.plan_view.mock_info') }} </p>
|
|
||||||
<div class="mock-info">
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="20">
|
<el-col>
|
||||||
Mock地址:
|
<!--操作按钮-->
|
||||||
<el-link v-if="this.mockInfo !== '' " target="_blank" style="color: black"
|
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!showFollow">
|
||||||
type="primary">{{ this.mockInfo }}
|
<i class="el-icon-star-off"
|
||||||
</el-link>
|
style="color: #783987; font-size: 25px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
||||||
<el-link v-else target="_blank" style="color: darkred"
|
</el-tooltip>
|
||||||
type="primary">当前项目未开启Mock服务
|
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-if="showFollow">
|
||||||
</el-link>
|
<i class="el-icon-star-on"
|
||||||
|
style="color: #783987; font-size: 28px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
||||||
|
</el-tooltip>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
<!-- 基础信息 -->
|
||||||
<!-- 请求参数 -->
|
<p class="tip">{{ $t('test_track.plan_view.base_info') }} </p>
|
||||||
<div v-if="oldApiProtocol==='TCP'">
|
<br/>
|
||||||
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
|
||||||
|
|
||||||
<ms-tcp-format-parameters :show-script="false" :request="oldRequest" :is-read-only="true" ref="tcpFormatParameter"/>
|
|
||||||
</div>
|
|
||||||
<div v-else-if="oldApiProtocol==='ESB'">
|
|
||||||
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
|
||||||
<esb-definition v-xpack v-if="showXpackCompnent" :show-script="false" :is-read-only="true" :request="oldRequest" ref="esbDefinition"/>
|
|
||||||
<p class="tip">{{ $t('api_test.definition.request.res_param') }}</p>
|
|
||||||
<esb-definition-response v-xpack v-if="showXpackCompnent" :is-api-component="true" :is-read-only="true"
|
|
||||||
:request="oldRequest"/>
|
|
||||||
<!-- <api-response-component :currentProtocol="apiCase.request.protocol" :api-item="apiCase"/>-->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ms-form-divider :title="$t('test_track.case.other_info')"/>
|
|
||||||
<api-info-container>
|
|
||||||
<el-form :model="oldData" ref="api-form" label-width="100px">
|
|
||||||
<el-collapse-transition>
|
|
||||||
<el-tabs v-model="activeName" style="margin: 20px">
|
|
||||||
<el-tab-pane :label="$t('commons.remark')" name="remark" class="pane">
|
|
||||||
<form-rich-text-item class="remark-item" :disabled="true" :data="oldData" prop="remark" label-width="0"/>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane :label="$t('commons.relationship.name')" name="dependencies" class="pane">
|
|
||||||
<template v-slot:label>
|
|
||||||
<tab-pane-count :title="$t('commons.relationship.name')" :count="oldRelationshipCount"/>
|
|
||||||
</template>
|
|
||||||
<dependencies-list @setCount="setOldCount" :read-only="true" :resource-id="oldData.id" resource-type="API" ref="oldDependencies"/>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</el-collapse-transition>
|
|
||||||
</el-form>
|
|
||||||
</api-info-container>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
<el-card style="width: 50%;" ref="new">
|
|
||||||
<div style="background-color: white;">
|
|
||||||
<el-row>
|
|
||||||
<el-col>
|
|
||||||
<!--操作按钮-->
|
|
||||||
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!newShowFollow">
|
|
||||||
<i class="el-icon-star-off"
|
|
||||||
style="color: #783987; font-size: 25px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-if="newShowFollow">
|
|
||||||
<i class="el-icon-star-on"
|
|
||||||
style="color: #783987; font-size: 28px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
|
||||||
</el-tooltip>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<!-- 基础信息 -->
|
|
||||||
<p class="tip">{{ $t('test_track.plan_view.base_info') }} </p>
|
|
||||||
<br/>
|
|
||||||
<el-row>
|
|
||||||
<el-col>
|
|
||||||
<ms-tcp-basic-api
|
|
||||||
:is-diff = true
|
|
||||||
:method-types="methodTypes"
|
|
||||||
:moduleOptions="moduleOptions"
|
|
||||||
:basisData="newData" ref="basicForm"/>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<!-- MOCK信息 -->
|
|
||||||
<p class="tip">{{ $t('test_track.plan_view.mock_info') }} </p>
|
|
||||||
<div class="mock-info">
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="20">
|
<el-col>
|
||||||
Mock地址:
|
<ms-tcp-basic-api
|
||||||
<el-link v-if="this.mockInfo !== '' " target="_blank" style="color: black"
|
:is-diff = true
|
||||||
type="primary">{{ this.mockInfo }}
|
:method-types="methodTypes"
|
||||||
</el-link>
|
:moduleOptions="moduleOptions"
|
||||||
<el-link v-else target="_blank" style="color: darkred"
|
:basisData="oldData" ref="basicForm"/>
|
||||||
type="primary">当前项目未开启Mock服务
|
|
||||||
</el-link>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
<!-- MOCK信息 -->
|
||||||
<!-- 请求参数 -->
|
<p class="tip">{{ $t('test_track.plan_view.mock_info') }} </p>
|
||||||
<div v-if="apiProtocol=='TCP'">
|
<div class="mock-info">
|
||||||
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
<el-row>
|
||||||
<ms-tcp-format-parameters :show-script="false" :request="request" :is-read-only="true" ref="tcpFormatParameter"/>
|
<el-col :span="20">
|
||||||
</div>
|
Mock地址:
|
||||||
<div v-else-if="apiProtocol=='ESB'">
|
<el-link v-if="this.mockInfo !== '' " target="_blank" style="color: black"
|
||||||
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
type="primary">{{ this.mockInfo }}
|
||||||
<esb-definition v-xpack v-if="showXpackCompnent" :show-script="false" :is-read-only="true" :request="request" ref="esbDefinition"/>
|
</el-link>
|
||||||
<p class="tip">{{ $t('api_test.definition.request.res_param') }}</p>
|
<el-link v-else target="_blank" style="color: darkred"
|
||||||
<esb-definition-response v-xpack v-if="showXpackCompnent" :is-api-component="true" :is-read-only="true"
|
type="primary">当前项目未开启Mock服务
|
||||||
:request="request"/>
|
</el-link>
|
||||||
<!-- <api-response-component :currentProtocol="apiCase.request.protocol" :api-item="apiCase"/>-->
|
</el-col>
|
||||||
</div>
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<!-- 请求参数 -->
|
||||||
|
<div v-if="oldApiProtocol==='TCP'">
|
||||||
|
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
||||||
|
|
||||||
<!-- 其他信息-->
|
<ms-tcp-format-parameters :show-script="false" :request="oldRequest" :is-read-only="true" ref="tcpFormatParameter"/>
|
||||||
<ms-form-divider :title="$t('test_track.case.other_info')"/>
|
</div>
|
||||||
<api-info-container>
|
<div v-else-if="oldApiProtocol==='ESB'">
|
||||||
<el-form :model="newData" ref="api-form" label-width="100px">
|
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
||||||
<el-collapse-transition>
|
<esb-definition v-xpack v-if="showXpackCompnent" :show-script="false" :is-read-only="true" :request="oldRequest" ref="esbDefinition"/>
|
||||||
<el-tabs v-model="activeName" style="margin: 20px">
|
<p class="tip">{{ $t('api_test.definition.request.res_param') }}</p>
|
||||||
<el-tab-pane :label="$t('commons.remark')" name="remark" class="pane">
|
<esb-definition-response v-xpack v-if="showXpackCompnent" :is-api-component="true" :is-read-only="true"
|
||||||
<form-rich-text-item class="remark-item" :disabled="true" :data="newData" prop="remark" label-width="0"/>
|
:request="oldRequest"/>
|
||||||
</el-tab-pane>
|
<!-- <api-response-component :currentProtocol="apiCase.request.protocol" :api-item="apiCase"/>-->
|
||||||
<el-tab-pane :label="$t('commons.relationship.name')" name="dependencies" class="pane">
|
</div>
|
||||||
<template v-slot:label>
|
|
||||||
<tab-pane-count :title="$t('commons.relationship.name')" :count="relationshipCount"/>
|
<ms-form-divider :title="$t('test_track.case.other_info')"/>
|
||||||
</template>
|
<api-info-container>
|
||||||
<dependencies-list @setCount="setCount" :read-only="true" :resource-id="newData.id" resource-type="API" ref="newDependencies"/>
|
<el-form :model="oldData" ref="api-form" label-width="100px">
|
||||||
</el-tab-pane>
|
<el-collapse-transition>
|
||||||
</el-tabs>
|
<el-tabs v-model="activeName" style="margin: 20px">
|
||||||
</el-collapse-transition>
|
<el-tab-pane :label="$t('commons.remark')" name="remark" class="pane">
|
||||||
</el-form>
|
<form-rich-text-item class="remark-item" :disabled="true" :data="oldData" prop="remark" label-width="0"/>
|
||||||
</api-info-container>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="$t('commons.relationship.name')" name="dependencies" class="pane">
|
||||||
|
<template v-slot:label>
|
||||||
|
<tab-pane-count :title="$t('commons.relationship.name')" :count="oldRelationshipCount"/>
|
||||||
|
</template>
|
||||||
|
<dependencies-list @setCount="setOldCount" :read-only="true" :resource-id="oldData.id" resource-type="API" ref="oldDependencies"/>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-collapse-transition>
|
||||||
|
</el-form>
|
||||||
|
</api-info-container>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card style="width: 50%;" ref="new">
|
||||||
|
<div style="background-color: white;">
|
||||||
|
<el-row>
|
||||||
|
<el-col>
|
||||||
|
<!--操作按钮-->
|
||||||
|
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-if="!newShowFollow">
|
||||||
|
<i class="el-icon-star-off"
|
||||||
|
style="color: #783987; font-size: 25px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-if="newShowFollow">
|
||||||
|
<i class="el-icon-star-on"
|
||||||
|
style="color: #783987; font-size: 28px; margin-right: 5px; position: relative; top: 5px; cursor: pointer "/>
|
||||||
|
</el-tooltip>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<!-- 基础信息 -->
|
||||||
|
<p class="tip">{{ $t('test_track.plan_view.base_info') }} </p>
|
||||||
|
<br/>
|
||||||
|
<el-row>
|
||||||
|
<el-col>
|
||||||
|
<ms-tcp-basic-api
|
||||||
|
:is-diff = true
|
||||||
|
:method-types="methodTypes"
|
||||||
|
:moduleOptions="moduleOptions"
|
||||||
|
:basisData="newData" ref="basicForm"/>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<!-- MOCK信息 -->
|
||||||
|
<p class="tip">{{ $t('test_track.plan_view.mock_info') }} </p>
|
||||||
|
<div class="mock-info">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="20">
|
||||||
|
Mock地址:
|
||||||
|
<el-link v-if="this.mockInfo !== '' " target="_blank" style="color: black"
|
||||||
|
type="primary">{{ this.mockInfo }}
|
||||||
|
</el-link>
|
||||||
|
<el-link v-else target="_blank" style="color: darkred"
|
||||||
|
type="primary">当前项目未开启Mock服务
|
||||||
|
</el-link>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<!-- 请求参数 -->
|
||||||
|
<div v-if="apiProtocol=='TCP'">
|
||||||
|
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
||||||
|
<ms-tcp-format-parameters :show-script="false" :request="request" :is-read-only="true" ref="tcpFormatParameter"/>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="apiProtocol=='ESB'">
|
||||||
|
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
||||||
|
<esb-definition v-xpack v-if="showXpackCompnent" :show-script="false" :is-read-only="true" :request="request" ref="esbDefinition"/>
|
||||||
|
<p class="tip">{{ $t('api_test.definition.request.res_param') }}</p>
|
||||||
|
<esb-definition-response v-xpack v-if="showXpackCompnent" :is-api-component="true" :is-read-only="true"
|
||||||
|
:request="request"/>
|
||||||
|
<!-- <api-response-component :currentProtocol="apiCase.request.protocol" :api-item="apiCase"/>-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 其他信息-->
|
||||||
|
<ms-form-divider :title="$t('test_track.case.other_info')"/>
|
||||||
|
<api-info-container>
|
||||||
|
<el-form :model="newData" ref="api-form" label-width="100px">
|
||||||
|
<el-collapse-transition>
|
||||||
|
<el-tabs v-model="activeName" style="margin: 20px">
|
||||||
|
<el-tab-pane :label="$t('commons.remark')" name="remark" class="pane">
|
||||||
|
<form-rich-text-item class="remark-item" :disabled="true" :data="newData" prop="remark" label-width="0"/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="$t('commons.relationship.name')" name="dependencies" class="pane">
|
||||||
|
<template v-slot:label>
|
||||||
|
<tab-pane-count :title="$t('commons.relationship.name')" :count="relationshipCount"/>
|
||||||
|
</template>
|
||||||
|
<dependencies-list @setCount="setCount" :read-only="true" :resource-id="newData.id" resource-type="API" ref="newDependencies"/>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-collapse-transition>
|
||||||
|
</el-form>
|
||||||
|
</api-info-container>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
<div v-loading="isReloadData">
|
<div v-loading="isReloadData">
|
||||||
<div class="caall">
|
<div class="caall"></div>
|
||||||
|
<el-row>
|
||||||
</div>
|
<el-col :span="12">
|
||||||
|
<el-tag>当前{{oldData.versionName }}</el-tag><span style="margin-left: 10px">{{oldData.userName}}</span><span style="margin-left: 10px">{{oldData.updateTime | timestampFormatDate }}</span>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-tag>{{ newData.versionName }}</el-tag><span style="margin-left: 10px">{{newData.userName}}</span><span style="margin-left: 10px">{{newData.updateTime | timestampFormatDate }}</span>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<div class="compare-class" id="vdiff" ref="all" >
|
<div class="compare-class" id="vdiff" ref="all" >
|
||||||
<el-card style="width: 50%;" ref="old" id="old" >
|
<el-card style="width: 50%;" ref="old" id="old" >
|
||||||
<ms-form-divider :title="$t('test_track.plan_view.base_info')"/>
|
<ms-form-divider :title="$t('test_track.plan_view.base_info')"/>
|
||||||
|
|
Loading…
Reference in New Issue