This commit is contained in:
chenjianxing 2021-01-28 10:25:43 +08:00
commit 7a4f33f743
3 changed files with 41 additions and 24 deletions

View File

@ -134,7 +134,9 @@ public class HistoricalDataUpgradeService {
request1.getBody().setType(Body.FORM_DATA); request1.getBody().setType(Body.FORM_DATA);
} }
if ("json".equals(request1.getBody().getFormat())) { if ("json".equals(request1.getBody().getFormat())) {
request1.getBody().setType(Body.JSON); if ("Raw".equals(request1.getBody().getType())) {
request1.getBody().setType(Body.JSON);
}
if (CollectionUtils.isEmpty(request1.getHeaders())) { if (CollectionUtils.isEmpty(request1.getHeaders())) {
List<KeyValue> headers = new LinkedList<>(); List<KeyValue> headers = new LinkedList<>();
headers.add(new KeyValue("Content-Type", "application/json")); headers.add(new KeyValue("Content-Type", "application/json"));

View File

@ -137,7 +137,7 @@
</div> </div>
<!-- 场景步骤内容 --> <!-- 场景步骤内容 -->
<div v-loading="loading"> <div v-loading="loading">
<el-tree node-key="resourceId" :props="props" :data="scenarioDefinition" <el-tree node-key="resourceId" :props="props" :data="scenarioDefinition" class="ms-tree"
:default-expanded-keys="expandedNode" :default-expanded-keys="expandedNode"
:expand-on-click-node="false" :expand-on-click-node="false"
highlight-current highlight-current
@ -848,7 +848,7 @@
if (this.currentScenario.tags instanceof String) { if (this.currentScenario.tags instanceof String) {
this.currentScenario.tags = JSON.parse(this.currentScenario.tags); this.currentScenario.tags = JSON.parse(this.currentScenario.tags);
} }
this.$emit('refresh',this.currentScenario); this.$emit('refresh', this.currentScenario);
}) })
} }
}) })
@ -1037,15 +1037,27 @@
z-index: 1; z-index: 1;
} }
.ms-expanded >>> .el-tree-node__expand-icon.expanded { .ms-tree >>> .el-tree-node__expand-icon.expanded {
color: #7C3985; -webkit-transform: rotate(0deg);
transform: rotate(0deg);
} }
.ms-el-icon-caret-right .el-icon-caret-right { .ms-tree >>> .el-icon-caret-right:before {
color: #7C3985; content: '\e723';
font-size: 18px;
} }
.ms-is-leaf >>> .is-leaf { .ms-tree >>> .el-tree-node__expand-icon.is-leaf {
color: transparent; color: transparent;
} }
.ms-tree >>> .el-tree-node__expand-icon {
color: #7C3985;
}
.ms-tree >>> .el-tree-node__expand-icon.expanded.el-icon-caret-right:before {
color: #7C3985;
content: "\e722";
font-size: 18px;
}
</style> </style>

View File

@ -64,22 +64,22 @@
</el-form> </el-form>
</div> </div>
<!--<div v-if="showScript">--> <!--<div v-if="showScript">-->
<!--<div v-for="row in request.hashTree" :key="row.id" v-loading="isReloadData" style="margin-left: 20px;width: 100%">--> <!--<div v-for="row in request.hashTree" :key="row.id" v-loading="isReloadData" style="margin-left: 20px;width: 100%">-->
<!--&lt;!&ndash; 前置脚本 &ndash;&gt;--> <!--&lt;!&ndash; 前置脚本 &ndash;&gt;-->
<!--<ms-jsr233-processor v-if="row.label ==='JSR223 PreProcessor'" @copyRow="copyRow" @remove="remove" :is-read-only="false" :title="$t('api_test.definition.request.pre_script')" style-type="color: #B8741A;background-color: #F9F1EA"--> <!--<ms-jsr233-processor v-if="row.label ==='JSR223 PreProcessor'" @copyRow="copyRow" @remove="remove" :is-read-only="false" :title="$t('api_test.definition.request.pre_script')" style-type="color: #B8741A;background-color: #F9F1EA"-->
<!--:jsr223-processor="row"/>--> <!--:jsr223-processor="row"/>-->
<!--&lt;!&ndash;后置脚本&ndash;&gt;--> <!--&lt;!&ndash;后置脚本&ndash;&gt;-->
<!--<ms-jsr233-processor v-if="row.label ==='JSR223 PostProcessor'" @copyRow="copyRow" @remove="remove" :is-read-only="false" :title="$t('api_test.definition.request.post_script')" style-type="color: #783887;background-color: #F2ECF3"--> <!--<ms-jsr233-processor v-if="row.label ==='JSR223 PostProcessor'" @copyRow="copyRow" @remove="remove" :is-read-only="false" :title="$t('api_test.definition.request.post_script')" style-type="color: #783887;background-color: #F2ECF3"-->
<!--:jsr223-processor="row"/>--> <!--:jsr223-processor="row"/>-->
<!--&lt;!&ndash;断言规则&ndash;&gt;--> <!--&lt;!&ndash;断言规则&ndash;&gt;-->
<!--<div style="margin-top: 10px">--> <!--<div style="margin-top: 10px">-->
<!--<ms-api-assertions v-if="row.type==='Assertions'" @copyRow="copyRow" @remove="remove" :is-read-only="isReadOnly" :assertions="row"/>--> <!--<ms-api-assertions v-if="row.type==='Assertions'" @copyRow="copyRow" @remove="remove" :is-read-only="isReadOnly" :assertions="row"/>-->
<!--</div>--> <!--</div>-->
<!--&lt;!&ndash;提取规则&ndash;&gt;--> <!--&lt;!&ndash;提取规则&ndash;&gt;-->
<!--<div style="margin-top: 10px">--> <!--<div style="margin-top: 10px">-->
<!--<ms-api-extract :is-read-only="isReadOnly" @copyRow="copyRow" @remove="remove" v-if="row.type==='Extract'" :extract="row"/>--> <!--<ms-api-extract :is-read-only="isReadOnly" @copyRow="copyRow" @remove="remove" v-if="row.type==='Extract'" :extract="row"/>-->
<!--</div>--> <!--</div>-->
<!--</div>--> <!--</div>-->
<!--</div>--> <!--</div>-->
</el-col> </el-col>
<el-col :span="3" class="ms-left-cell" v-if="showScript"> <el-col :span="3" class="ms-left-cell" v-if="showScript">
@ -225,6 +225,9 @@
if (!hasEnvironment) { if (!hasEnvironment) {
this.request.environmentId = undefined; this.request.environmentId = undefined;
} }
if (!this.request.environmentId) {
this.request.dataSourceId = undefined;
}
this.initDataSource(); this.initDataSource();
}); });
}, },