fix(接口测试): 修复引用的case仍可以编辑参数的缺陷

--bug=1020673 --user=王孝刚
【接口测试】场景引用case、场景复制场景下包含引用case、场景引用场景下包含复制api、复制和引用case时-case请求信息可编辑
{#_orginal_url#}
This commit is contained in:
wxg0103 2022-12-06 11:43:36 +08:00 committed by wxg0103
parent efbbf010ea
commit a5fd23503a
3 changed files with 14 additions and 2 deletions

View File

@ -8,6 +8,7 @@
type="primary"
size="mini"
style="margin: 10px 10px 0px"
:disabled="isReadOnly"
@click="openOneClickOperation">
{{ this.$t('commons.import') }}
</el-button>
@ -24,7 +25,7 @@
<json-schema-editor
v-if="reloadedApiVariable"
class="schema"
:disabled="jsonSchemaDisable"
:disabled="jsonSchemaDisable || isReadOnly"
:value="schema"
:show-mock-vars="showMockVars"
:scenario-definition="scenarioDefinition"
@ -82,6 +83,10 @@ export default {
return true;
},
},
isReadOnly: {
type: Boolean,
default: false,
},
},
created() {
if (!this.body.jsonSchema && this.body.raw && this.checkIsJson(this.body.raw)) {

View File

@ -81,6 +81,7 @@
size="small"
maxlength="200"
:placeholder="$t('commons.description')"
:disabled="isReadOnly"
show-word-limit>
</el-input>
</el-col>

View File

@ -47,13 +47,19 @@
</div>
<div v-if="body.type == 'JSON'">
<div style="padding: 10px">
<el-switch active-text="JSON-SCHEMA" v-model="body.format" @change="formatChange" active-value="JSON-SCHEMA" />
<el-switch
active-text="JSON-SCHEMA"
v-model="body.format"
@change="formatChange"
active-value="JSON-SCHEMA"
:disabled="isReadOnly" />
</div>
<ms-json-code-edit
v-if="body.format === 'JSON-SCHEMA'"
:body="body"
:scenario-definition="scenarioDefinition"
@editScenarioAdvance="editScenarioAdvance"
:is-read-only="isReadOnly"
ref="jsonCodeEdit" />
<ms-code-edit
v-else-if="codeEditActive"