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 79ee25dbf5
commit a540700075
3 changed files with 14 additions and 2 deletions

View File

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

View File

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

View File

@ -47,13 +47,19 @@
</div> </div>
<div v-if="body.type == 'JSON'"> <div v-if="body.type == 'JSON'">
<div style="padding: 10px"> <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> </div>
<ms-json-code-edit <ms-json-code-edit
v-if="body.format === 'JSON-SCHEMA'" v-if="body.format === 'JSON-SCHEMA'"
:body="body" :body="body"
:scenario-definition="scenarioDefinition" :scenario-definition="scenarioDefinition"
@editScenarioAdvance="editScenarioAdvance" @editScenarioAdvance="editScenarioAdvance"
:is-read-only="isReadOnly"
ref="jsonCodeEdit" /> ref="jsonCodeEdit" />
<ms-code-edit <ms-code-edit
v-else-if="codeEditActive" v-else-if="codeEditActive"