parent
ab918f0c94
commit
26c9e03fd3
|
@ -242,7 +242,10 @@ public class MsTCPSampler extends MsTestElement {
|
|||
value = this.formatMockValue(value);
|
||||
if(StringUtils.isNotEmpty(this.getConnectEncoding())){
|
||||
if(StringUtils.equalsIgnoreCase("utf-8",this.getConnectEncoding())){
|
||||
value = new String(value.getBytes(),StandardCharsets.UTF_8);
|
||||
try {
|
||||
value = new String(value.getBytes(),StandardCharsets.UTF_8);
|
||||
}catch (Exception e){
|
||||
}
|
||||
}else if(StringUtils.equalsIgnoreCase("gbk",this.getConnectEncoding())){
|
||||
try {
|
||||
value = new String(value.getBytes(),"GBK");
|
||||
|
|
|
@ -31,25 +31,33 @@
|
|||
<template v-slot:request>
|
||||
<customize-req-info :is-customize-req="isCustomizeReq" :request="request"/>
|
||||
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
||||
<legend style="width: 100%">
|
||||
|
||||
<ms-api-request-form v-if="request.protocol==='HTTP' || request.type==='HTTPSamplerProxy'"
|
||||
:isShowEnable="true"
|
||||
:referenced="true"
|
||||
:headers="request.headers "
|
||||
:is-read-only="isCompReadOnly"
|
||||
:request="request"/>
|
||||
<esb-definition v-if="showXpackCompnent&&request.esbDataStruct!=null"
|
||||
v-xpack
|
||||
:request="request"
|
||||
:showScript="false"
|
||||
:is-read-only="this.isCompReadOnly"
|
||||
ref="esbDefinition"/>
|
||||
<ms-tcp-basis-parameters v-if="(request.protocol==='TCP'|| request.type==='TCPSampler')&& request.esbDataStruct==null "
|
||||
:request="request"
|
||||
:is-read-only="isCompReadOnly"
|
||||
:showScript="false"/>
|
||||
<ms-sql-basis-parameters v-if="request.protocol==='SQL'|| request.type==='JDBCSampler'"
|
||||
:request="request"
|
||||
:is-read-only="isCompReadOnly"
|
||||
:showScript="false"/>
|
||||
<ms-dubbo-basis-parameters v-if="request.protocol==='DUBBO' || request.protocol==='dubbo://'|| request.type==='DubboSampler'"
|
||||
:request="request"
|
||||
:is-read-only="isCompReadOnly"
|
||||
:showScript="false"/>
|
||||
</legend>
|
||||
</template>
|
||||
<!-- 执行结果内容 -->
|
||||
<template v-slot:result>
|
||||
|
@ -192,6 +200,17 @@ export default {
|
|||
}
|
||||
return {};
|
||||
},
|
||||
isCompReadOnly(){
|
||||
if(this.request){
|
||||
if(this.request.disabled){
|
||||
return this.request.disabled;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
displayTitle() {
|
||||
if (this.isApiImport) {
|
||||
return this.$t('api_test.automation.api_list_import');
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
:show-btn="showBtn"
|
||||
:background-color="backgroundColor"
|
||||
:title="title" v-loading="loading">
|
||||
|
||||
<jsr233-processor-content
|
||||
:jsr223-processor="jsr223Processor"
|
||||
:is-pre-processor="isPreProcessor"
|
||||
:node="node"
|
||||
:is-read-only="isReadOnly"/>
|
||||
|
||||
<legend style="width: 100%">
|
||||
<jsr233-processor-content
|
||||
:jsr223-processor="jsr223Processor"
|
||||
:is-pre-processor="isPreProcessor"
|
||||
:node="node"
|
||||
:is-read-only="this.jsr223Processor.disabled"/>
|
||||
</legend>
|
||||
</api-base-component>
|
||||
</template>
|
||||
|
||||
|
|
Loading…
Reference in New Issue