fix(接口自动化): 修复自定义接口显示问题

This commit is contained in:
fit2-zhao 2021-05-31 13:54:31 +08:00 committed by fit2-zhao
parent 37c9dfb5df
commit 808c430839

View File

@ -15,10 +15,10 @@
:title="displayTitle">
<template v-slot:behindHeaderLeft>
<el-tag size="mini" class="ms-tag" v-if="request.referenced==='Deleted'" type="danger">{{$t('api_test.automation.reference_deleted')}}</el-tag>
<el-tag size="mini" class="ms-tag" v-if="request.referenced==='Deleted'" type="danger">{{ $t('api_test.automation.reference_deleted') }}</el-tag>
<el-tag size="mini" class="ms-tag" v-if="request.referenced==='Copy'">{{ $t('commons.copy') }}</el-tag>
<el-tag size="mini" class="ms-tag" v-if="request.referenced ==='REF'">{{ $t('api_test.scenario.reference') }}</el-tag>
<span class="ms-tag">{{getProjectName(request.projectId)}}</span>
<span class="ms-tag">{{ getProjectName(request.projectId) }}</span>
</template>
<template v-slot:button>
@ -83,22 +83,22 @@
</template>
<script>
import MsSqlBasisParameters from "../../../definition/components/request/database/BasisParameters";
import MsTcpBasisParameters from "../../../definition/components/request/tcp/TcpBasisParameters";
import MsDubboBasisParameters from "../../../definition/components/request/dubbo/BasisParameters";
import MsApiRequestForm from "../../../definition/components/request/http/ApiHttpRequestForm";
import MsRequestResultTail from "../../../definition/components/response/RequestResultTail";
import MsRun from "../../../definition/components/Run";
import {getUUID, getCurrentProjectID} from "@/common/js/utils";
import ApiBaseComponent from "../common/ApiBaseComponent";
import ApiResponseComponent from "./ApiResponseComponent";
import CustomizeReqInfo from "@/business/components/api/automation/scenario/common/CustomizeReqInfo";
import MsSqlBasisParameters from "../../../definition/components/request/database/BasisParameters";
import MsTcpBasisParameters from "../../../definition/components/request/tcp/TcpBasisParameters";
import MsDubboBasisParameters from "../../../definition/components/request/dubbo/BasisParameters";
import MsApiRequestForm from "../../../definition/components/request/http/ApiHttpRequestForm";
import MsRequestResultTail from "../../../definition/components/response/RequestResultTail";
import MsRun from "../../../definition/components/Run";
import {getUUID, getCurrentProjectID} from "@/common/js/utils";
import ApiBaseComponent from "../common/ApiBaseComponent";
import ApiResponseComponent from "./ApiResponseComponent";
import CustomizeReqInfo from "@/business/components/api/automation/scenario/common/CustomizeReqInfo";
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
const esbDefinition = (requireComponent != null && requireComponent.keys().length) > 0 ? requireComponent("./apidefinition/EsbDefinition.vue") : {};
const esbDefinitionResponse = (requireComponent != null && requireComponent.keys().length) > 0 ? requireComponent("./apidefinition/EsbDefinitionResponse.vue") : {};
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
const esbDefinition = (requireComponent != null && requireComponent.keys().length) > 0 ? requireComponent("./apidefinition/EsbDefinition.vue") : {};
const esbDefinitionResponse = (requireComponent != null && requireComponent.keys().length) > 0 ? requireComponent("./apidefinition/EsbDefinitionResponse.vue") : {};
export default {
export default {
name: "MsApiComponent",
props: {
request: {},
@ -284,6 +284,7 @@
if (response.data) {
Object.assign(this.request, JSON.parse(response.data.request));
this.request.name = response.data.name;
this.request.referenced = "REF";
this.request.enable = enable;
if (response.data.path && response.data.path != null) {
this.request.path = response.data.path;
@ -397,48 +398,48 @@
}
}
}
}
</script>
<style scoped>
.ms-api-col-ot-import-button {
.ms-api-col-ot-import-button {
background-color: #EEF5FE;
margin-right: 20px;
color: #409EFF;
}
}
/deep/ .el-card__body {
/deep/ .el-card__body {
padding: 10px;
}
}
.tip {
.tip {
padding: 3px 5px;
font-size: 16px;
border-radius: 4px;
border-left: 4px solid #783887;
margin: 20px 0;
}
}
.icon.is-active {
.icon.is-active {
transform: rotate(90deg);
}
}
.ms-tabs >>> .el-icon-close:before {
.ms-tabs >>> .el-icon-close:before {
content: "";
}
}
.ms-btn {
.ms-btn {
background-color: #409EFF;
color: white;
}
}
.ms-btn-flot {
.ms-btn-flot {
margin: 20px;
float: right;
}
}
.ms-tag {
.ms-tag {
margin-left: 20px;
}
}
</style>