fix(接口定义): 修改加载引用页面,禁用执行按钮,优化加载后显示
This commit is contained in:
parent
7edd9799b6
commit
a199d9f139
|
@ -77,7 +77,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
<span @click.stop>
|
<span @click.stop v-if="!loaded">
|
||||||
<ms-tip-button @click="singleRun(apiCase)" :tip="$t('api_test.run')" icon="el-icon-video-play" v-permission="['PROJECT_API_DEFINITION:READ+RUN']"
|
<ms-tip-button @click="singleRun(apiCase)" :tip="$t('api_test.run')" icon="el-icon-video-play" v-permission="['PROJECT_API_DEFINITION:READ+RUN']"
|
||||||
class="run-button" size="mini" :disabled="!apiCase.id || loaded" circle v-if="!loading"/>
|
class="run-button" size="mini" :disabled="!apiCase.id || loaded" circle v-if="!loading"/>
|
||||||
<el-tooltip :content="$t('report.stop_btn')" placement="top" :enterable="false" v-else>
|
<el-tooltip :content="$t('report.stop_btn')" placement="top" :enterable="false" v-else>
|
||||||
|
@ -88,11 +88,14 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<ms-tip-button @click="copyCase(apiCase)" :tip="$t('commons.copy')" icon="el-icon-document-copy" v-permission="['PROJECT_API_DEFINITION:READ+COPY_CASE']"
|
<ms-tip-button @click="copyCase(apiCase)" :tip="$t('commons.copy')" icon="el-icon-document-copy" v-permission="['PROJECT_API_DEFINITION:READ+COPY_CASE']"
|
||||||
size="mini" :disabled="!apiCase.id || isCaseEdit || loaded" circle/>
|
size="mini" :disabled="!apiCase.id || isCaseEdit || loaded" circle v-if="!loaded"/>
|
||||||
<ms-tip-button @click="deleteCase(index,apiCase)" :tip="$t('commons.delete')" icon="el-icon-delete" v-permission="['PROJECT_API_SCENARIO:READ+DELETE_CASE']"
|
<ms-tip-button @click="deleteCase(index,apiCase)" :tip="$t('commons.delete')" icon="el-icon-delete" v-permission="['PROJECT_API_SCENARIO:READ+DELETE_CASE']"
|
||||||
size="mini" :disabled="!apiCase.id || isCaseEdit" circle/>
|
size="mini" :disabled="!apiCase.id || isCaseEdit" circle/>
|
||||||
<ms-api-extend-btns :is-case-edit="isCaseEdit" :environment="environment" :row="apiCase"/>
|
<ms-api-extend-btns :is-case-edit="isCaseEdit" :environment="environment" :row="apiCase"/>
|
||||||
</span>
|
</span>
|
||||||
|
<span @click.stop>
|
||||||
|
<ms-api-extend-btns :is-case-edit="isCaseEdit" :environment="environment" :row="apiCase"/>
|
||||||
|
</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
|
@ -352,6 +355,7 @@ export default {
|
||||||
this.selectedEvent.currentTarget = $event.currentTarget;
|
this.selectedEvent.currentTarget = $event.currentTarget;
|
||||||
$event.currentTarget.className = "el-card is-always-shadow is-selected";
|
$event.currentTarget.className = "el-card is-always-shadow is-selected";
|
||||||
this.currentApi.request = item.request;
|
this.currentApi.request = item.request;
|
||||||
|
this.currentApi.request.changeId = getUUID();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
changePriority(row) {
|
changePriority(row) {
|
||||||
|
|
|
@ -187,6 +187,20 @@ export default {
|
||||||
}
|
}
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'request.changeId'() {
|
||||||
|
if (this.request.headers && this.request.headers.length > 1) {
|
||||||
|
this.activeName = 'headers';
|
||||||
|
}
|
||||||
|
if (this.request.rest && this.request.rest.length > 1) {
|
||||||
|
this.activeName = 'rest';
|
||||||
|
}
|
||||||
|
if (this.request.arguments && this.request.arguments.length > 1) {
|
||||||
|
this.activeName = 'parameters';
|
||||||
|
}
|
||||||
|
this.reload();
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
hasPermission,
|
hasPermission,
|
||||||
hasLicense,
|
hasLicense,
|
||||||
|
|
Loading…
Reference in New Issue