fix(接口测试): 解决场景对比数据没回显全的问题
--bug=1009769--user=郭雨琦 解决场景对比数据没回显全的问题
This commit is contained in:
parent
ea5375a3a9
commit
aa08f9fb18
|
@ -356,6 +356,10 @@
|
|||
:new-scenario-definition="newScenarioDefinition"
|
||||
:project-env-map="projectEnvMap"
|
||||
:new-project-env-map="newProjectEnvMap"
|
||||
:old-enable-cookie-share="enableCookieShare"
|
||||
:new-enable-cookie-share="newEnableCookieShare"
|
||||
:old-on-sample-error="onSampleError"
|
||||
:new-on-sample-error="newOnSampleError"
|
||||
:project-list="projectList"
|
||||
:type ="type"
|
||||
></scenario-diff>
|
||||
|
@ -427,6 +431,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
onSampleError: true,
|
||||
newOnSampleError: true,
|
||||
showConfigButtonWithOutPermission: false,
|
||||
props: {
|
||||
label: "label",
|
||||
|
@ -474,6 +479,7 @@ export default {
|
|||
debugData: {},
|
||||
reportId: "",
|
||||
enableCookieShare: false,
|
||||
newEnableCookieShare: false,
|
||||
globalOptions: {
|
||||
spacing: 30
|
||||
},
|
||||
|
@ -1767,6 +1773,12 @@ export default {
|
|||
obj.hashTree[i].requestResult = [{responseResult: {}}];
|
||||
}
|
||||
}
|
||||
this.newEnableCookieShare = obj.enableCookieShare;
|
||||
if (obj.onSampleError === undefined) {
|
||||
this.newOnSampleError = true;
|
||||
} else {
|
||||
this.newOnSampleError = obj.onSampleError;
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < this.scenarioDefinition.length; i++) {
|
||||
this.scenarioDefinition[i].disabled = true;
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
<el-col :span="3" class="ms-col-one ms-font">
|
||||
<el-link class="head">{{ $t('api_test.automation.scenario_total') }}
|
||||
</el-link>
|
||||
:{{ oldVariableSize }}
|
||||
:{{ getOldVariableSize() }}
|
||||
</el-col>
|
||||
<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>
|
||||
|
@ -269,7 +269,7 @@
|
|||
<el-col :span="3" class="ms-col-one ms-font">
|
||||
<el-link class="head" >{{ $t('api_test.automation.scenario_total') }}
|
||||
</el-link>
|
||||
:{{ newVariableSize }}
|
||||
:{{ getNewVariableSize() }}
|
||||
</el-col>
|
||||
<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>
|
||||
|
@ -620,10 +620,28 @@ export default{
|
|||
this.dialogVisible = true;
|
||||
}
|
||||
},
|
||||
|
||||
getOldVariableSize() {
|
||||
let size = 0;
|
||||
if (this.oldData.variables) {
|
||||
size += this.oldData.variables.length;
|
||||
}
|
||||
if (this.oldData.headers && this.oldData.headers.length > 1) {
|
||||
size += this.oldData.headers.length - 1;
|
||||
}
|
||||
return size;
|
||||
},
|
||||
getNewVariableSize(){
|
||||
let size = 0;
|
||||
if (this.newData.variables) {
|
||||
size += this.newData.variables.length;
|
||||
}
|
||||
if (this.newData.headers && this.newData.headers.length > 1) {
|
||||
size += this.newData.headers.length - 1;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(function () {
|
||||
|
|
Loading…
Reference in New Issue