fix(接口定义): 修复文档版本无法筛选的缺陷 (#17950)

--bug=1016793 --user=王孝刚 【接口测试】接口定义-API-按版本筛选-切换到文档,没进行筛选
https://www.tapd.cn/55049933/s/1244298

Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
MeterSphere Bot 2022-09-17 13:38:21 +08:00 committed by GitHub
parent 5e32f88acd
commit 510205a43f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 8 deletions

View File

@ -100,9 +100,7 @@
<script>
import {API_METHOD_COLOUR} from "@/business/components/api/definition/model/JsonData";
import MsCodeEdit from "@/business/components/common/components/MsCodeEdit";
import {formatJson,} from "@/common/js/format-utils";
import ApiStatus from "@/business/components/api/definition/components/list/ApiStatus";
import {calculate} from "@/business/components/api/definition/model/ApiTestModel";
import MsJsonCodeEdit from "@/business/components/common/json-schema/JsonSchemaEditor";
import Api from "@/business/components/api/router";
import {generateApiDocumentShareInfo} from "@/network/share";
@ -175,6 +173,7 @@ export default {
type: Boolean,
default: false,
},
versionId: String
},
activated() {
this.initApiDocSimpleList();
@ -220,8 +219,6 @@ export default {
},
},
methods: {
changeFixed(clientHeight) {
if (this.$refs.apiDocInfoDiv) {
let countPageHeight = 210;
@ -254,10 +251,8 @@ export default {
simpleRequest.moduleIds = [];
}
simpleRequest.trashEnable = this.trashEnable;
simpleRequest.verisonId = this.versionId;
let simpleInfoUrl = "/share/info/selectApiSimpleInfo";
this.$post(simpleInfoUrl, simpleRequest, response => {
this.apiInfoArray = response.data;
this.apiStepIndex = 0;

View File

@ -1,7 +1,7 @@
<template>
<div>
<api-document-anchor :is-share-page="isSharePage" :trash-enable="trashEnable"
:project-id="projectId" :module-ids="moduleIds"
:module-ids="moduleIds" :project-id="projectId" :version-id="versionId"
ref="documentAnchor"/>
</div>
</template>