fix(场景自动化): 修复引用场景查看问题
This commit is contained in:
parent
614acd2ed3
commit
96f6d854ce
|
@ -148,7 +148,7 @@
|
|||
<!-- 步骤组件-->
|
||||
<ms-component-config :type="data.type" :scenario="data" :response="response" :currentScenario="currentScenario"
|
||||
:currentEnvironmentId="currentEnvironmentId" :node="node"
|
||||
@remove="remove" @copyRow="copyRow" @suggestClick="suggestClick"/>
|
||||
@remove="remove" @copyRow="copyRow" @suggestClick="suggestClick" @refReload="reload"/>
|
||||
</span>
|
||||
</el-tree>
|
||||
</div>
|
||||
|
@ -423,7 +423,6 @@
|
|||
document.removeEventListener("keydown", this.createCtrlSHandle);
|
||||
},
|
||||
createCtrlSHandle(event) {
|
||||
console.log("create ctrl + s");
|
||||
handleCtrlSEvent(event, this.editScenario);
|
||||
},
|
||||
getIdx(index) {
|
||||
|
@ -884,7 +883,6 @@
|
|||
}
|
||||
this.enableCookieShare = obj.enableCookieShare;
|
||||
this.scenarioDefinition = obj.hashTree;
|
||||
console.log(this.scenarioDefinition)
|
||||
}
|
||||
}
|
||||
if (this.currentScenario.copy) {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<span @click.stop>
|
||||
<slot name="headerLeft">
|
||||
<i class="icon el-icon-arrow-right" :class="{'is-active': data.active}"
|
||||
@click="active(data)"/>
|
||||
@click="active(data)" v-if="data.type!='scenario'"/>
|
||||
<el-input :draggable="draggable" v-if="isShowInput && isShowNameInput" size="small" v-model="data.name" class="name-input"
|
||||
@blur="isShowInput = false" :placeholder="$t('commons.input_name')" ref="nameEdit"/>
|
||||
<span v-else>
|
||||
|
|
|
@ -38,11 +38,15 @@
|
|||
},
|
||||
watch: {},
|
||||
created() {
|
||||
if (this.scenario.id && this.scenario.referenced === 'REF') {
|
||||
if (this.scenario.id && this.scenario.referenced === 'REF' && !this.scenario.loaded) {
|
||||
this.result = this.$get("/api/automation/getApiScenario/" + this.scenario.id, response => {
|
||||
if (response.data) {
|
||||
this.scenario.loaded = true;
|
||||
if (response.data.scenarioDefinition) {
|
||||
this.scenario.hashTree = JSON.parse(response.data.scenarioDefinition).hashTree;
|
||||
}
|
||||
this.scenario.name = response.data.name;
|
||||
this.reload();
|
||||
this.$emit('refReload');
|
||||
} else {
|
||||
this.scenario.referenced = "Deleted";
|
||||
}
|
||||
|
@ -58,7 +62,7 @@
|
|||
},
|
||||
computed: {
|
||||
isDeletedOrRef() {
|
||||
if (this.scenario.referenced!= undefined && this.scenario.referenced === 'Deleted' || this.scenario.referenced === 'REF') {
|
||||
if (this.scenario.referenced != undefined && this.scenario.referenced === 'Deleted' || this.scenario.referenced === 'REF') {
|
||||
return true
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="request-form">
|
||||
<component :is="component" :scenario="scenario" :controller="scenario" :timer="scenario" :assertions="scenario" :extract="scenario" :jsr223-processor="scenario" :request="scenario" :currentScenario="currentScenario" :currentEnvironmentId="currentEnvironmentId" :node="node"
|
||||
:draggable="true" :title="title" :color="titleColor" :background-color="backgroundColor" @suggestClick="suggestClick(node)" :response="response"
|
||||
@remove="remove" @copyRow="copyRow"/>
|
||||
@remove="remove" @copyRow="copyRow" @refReload="refReload"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -107,6 +107,9 @@
|
|||
suggestClick(node) {
|
||||
this.$emit('suggestClick', node);
|
||||
},
|
||||
refReload(){
|
||||
this.$emit('refReload');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue