style(接口测试): 修改前后置SQL脚本样式问题

This commit is contained in:
fit2-zhao 2022-06-22 18:32:15 +08:00 committed by f2c-ci-robot[bot]
parent 961c5ca7a6
commit b2d5a618b9
1 changed files with 14 additions and 8 deletions

View File

@ -50,15 +50,20 @@
<el-input v-model="request.variableNames" maxlength="500" show-word-limit size="small"/> <el-input v-model="request.variableNames" maxlength="500" show-word-limit size="small"/>
</el-form-item> </el-form-item>
<el-tabs v-model="activeName"> <el-tabs v-model="activeName" class="ms-sql-tabs">
<el-tab-pane :label="$t('api_test.scenario.variables')" name="variables"> <el-tab-pane :label="$t('api_test.scenario.variables')" name="variables">
<ms-api-scenario-variables :is-read-only="isReadOnly" :items="request.variables" <ms-api-scenario-variables :is-read-only="isReadOnly" :items="request.variables"
:description="$t('api_test.scenario.kv_description')"/> :description="$t('api_test.scenario.kv_description')"/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('api_test.request.sql.sql_script')" name="sql"> <el-tab-pane :label="$t('api_test.request.sql.sql_script')" name="sql">
<div class="sql-content"> <ms-code-edit
<ms-code-edit mode="sql" :read-only="isReadOnly" :modes="['sql']" :data.sync="request.query" theme="eclipse" ref="codeEdit"/> :height="120"
</div> :read-only="isReadOnly"
:modes="['sql']"
:data.sync="request.query"
theme="eclipse"
mode="sql"
ref="codeEdit"/>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-form> </el-form>
@ -206,7 +211,7 @@ export default {
let id = this.request.projectId ? this.request.projectId : this.projectId; let id = this.request.projectId ? this.request.projectId : this.projectId;
let scenarioEnvId = this.scenarioId !== "" ? (this.scenarioId + "_" + id) : id; let scenarioEnvId = this.scenarioId !== "" ? (this.scenarioId + "_" + id) : id;
if (this.$store.state.scenarioEnvMap && this.$store.state.scenarioEnvMap instanceof Map if (this.$store.state.scenarioEnvMap && this.$store.state.scenarioEnvMap instanceof Map
&& this.$store.state.scenarioEnvMap.has(scenarioEnvId)) { && this.$store.state.scenarioEnvMap.has(scenarioEnvId)) {
envId = this.$store.state.scenarioEnvMap.get(scenarioEnvId); envId = this.$store.state.scenarioEnvMap.get(scenarioEnvId);
} }
if (!this.scenarioId && !this.request.customizeReq) { if (!this.scenarioId && !this.request.customizeReq) {
@ -226,7 +231,7 @@ export default {
envId = this.request.refEevMap.get(id); envId = this.request.refEevMap.get(id);
} }
} }
if(envId === this.request.originalEnvironmentId && this.request.originalDataSourceId) { if (envId === this.request.originalEnvironmentId && this.request.originalDataSourceId) {
this.request.dataSourceId = this.request.originalDataSourceId; this.request.dataSourceId = this.request.originalDataSourceId;
} }
let targetDataSourceName = ""; let targetDataSourceName = "";
@ -326,8 +331,9 @@ export default {
</script> </script>
<style scoped> <style scoped>
.sql-content {
height: calc(100vh - 570px); .ms-sql-tabs {
min-height: 160px;
} }
.one-row .el-form-item { .one-row .el-form-item {