Merge branch 'master' of https://github.com/metersphere/metersphere
This commit is contained in:
commit
bd0a6132e6
|
@ -20,4 +20,5 @@ public class ApiDocumentRequest {
|
|||
private String type;
|
||||
private String orderCondition;
|
||||
private List<String> apiIdList;
|
||||
private boolean trashEnable;
|
||||
}
|
||||
|
|
|
@ -269,6 +269,9 @@ public class ApiAutomationService {
|
|||
}
|
||||
|
||||
private void deleteApiScenarioReport(List<String> scenarioIds) {
|
||||
if(scenarioIds == null || scenarioIds.isEmpty()){
|
||||
return;
|
||||
}
|
||||
ApiScenarioReportExample scenarioReportExample = new ApiScenarioReportExample();
|
||||
scenarioReportExample.createCriteria().andScenarioIdIn(scenarioIds);
|
||||
List<ApiScenarioReport> list = apiScenarioReportMapper.selectByExample(scenarioReportExample);
|
||||
|
|
|
@ -2,7 +2,13 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.metersphere.base.mapper.ext.ExtApiDocumentMapper">
|
||||
<select id="findApiDocumentSimpleInfoByRequest" resultType="io.metersphere.api.dto.document.ApiDocumentInfoDTO">
|
||||
SELECT api.id,api.name FROM Api_definition api WHERE api.protocol = 'HTTP' AND api.status != 'Trash'
|
||||
SELECT api.id,api.name FROM Api_definition api WHERE api.protocol = 'HTTP'
|
||||
<if test="request.trashEnable == true">
|
||||
AND api.status = 'Trash'
|
||||
</if>
|
||||
<if test="request.trashEnable == false">
|
||||
AND api.status != 'Trash'
|
||||
</if>
|
||||
<if test="request.projectId != null">
|
||||
AND api.project_Id = #{request.projectId}
|
||||
</if>
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
<api-documents-page class="api-doc-page"
|
||||
v-if="activeDom==='right'"
|
||||
:project-id="projectId"
|
||||
:trash-enable="trashEnable"
|
||||
:module-ids="selectNodeIds"/>
|
||||
</ms-tab-button>
|
||||
<!-- 添加/编辑测试窗口-->
|
||||
|
|
|
@ -369,6 +369,10 @@ export default {
|
|||
moduleIds: Array,
|
||||
sharePage:Boolean,
|
||||
pageHeaderHeight:Number,
|
||||
trashEnable: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
activated() {
|
||||
this.initApiDocSimpleList();
|
||||
|
@ -409,6 +413,9 @@ export default {
|
|||
},
|
||||
clientHeight() { //如果clientHeight 发生改变,这个函数就会运行
|
||||
this.changeFixed(this.clientHeight);
|
||||
},
|
||||
trashEnable() {
|
||||
this.initApiDocSimpleList();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -441,7 +448,10 @@ export default {
|
|||
}
|
||||
if (this.moduleIds.length > 0) {
|
||||
simpleRequest.moduleIds = this.moduleIds;
|
||||
} else {
|
||||
simpleRequest.moduleIds = [];
|
||||
}
|
||||
simpleRequest.trashEnable = this.trashEnable;
|
||||
|
||||
let simpleInfoUrl = "/api/document/selectApiSimpleInfo";
|
||||
this.apiInfoArray = [];
|
||||
|
@ -533,9 +543,6 @@ export default {
|
|||
//检查数据
|
||||
this.checkApiInfoNode(this.apiStepIndex,true);
|
||||
},
|
||||
stepClick(stepIndex) {
|
||||
this.apiStepIndex = stepIndex;
|
||||
},
|
||||
getColor(enable, method) {
|
||||
return this.methodColorMap.get(method);
|
||||
},
|
||||
|
@ -642,8 +649,6 @@ export default {
|
|||
for(let i = 0;i<this.apiShowArray.length;i++){
|
||||
names += this.apiShowArray[i].name+";";
|
||||
}
|
||||
|
||||
console.log("["+apiDocDivScrollTop+":"+this.apiStepIndex+"]:["+lastIndex+":"+this.currentApiIndexInApiShowArray+"]-------->"+names);
|
||||
if(lastIndex < this.currentApiIndexInApiShowArray){
|
||||
//上移
|
||||
if(this.needAsyncSelect){
|
||||
|
@ -684,10 +689,6 @@ export default {
|
|||
}
|
||||
this.apiStepIndex ++;
|
||||
}
|
||||
|
||||
// this.apiStepIndex = lastIndex;
|
||||
// //检查上下文 2个以内的节点有没有查询出来
|
||||
// this.checkApiInfoNode(this.apiStepIndex);
|
||||
},
|
||||
redirectScroll(){
|
||||
//滚动条跳转:将滚动条下拉到显示对应对api接口的位置
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div>
|
||||
<!-- <api-document-item :project-id="projectId" :module-ids="moduleIds"/>-->
|
||||
<api-document-anchor :is-share-page="isSharePage" :project-id="projectId" :module-ids="moduleIds"></api-document-anchor>
|
||||
<api-document-anchor :is-share-page="isSharePage" :trash-enable="trashEnable" :project-id="projectId" :module-ids="moduleIds"></api-document-anchor>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -23,6 +23,10 @@ export default {
|
|||
projectId:String,
|
||||
moduleIds:Array,
|
||||
activeDom:String,
|
||||
trashEnable: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
created: function () {
|
||||
},
|
||||
|
|
|
@ -43,16 +43,6 @@ export default {
|
|||
name: "ApiReportView",
|
||||
component: () => import('@/business/components/api/report/ApiReportView'),
|
||||
},
|
||||
{
|
||||
path: "definition/:redirectID?/:dataType?/:dataSelectRange?",
|
||||
name: "ApiDefinition",
|
||||
component: () => import('@/business/components/api/definition/ApiDefinition'),
|
||||
},
|
||||
{
|
||||
path: "automation/:redirectID?/:dataType?/:dataSelectRange?",
|
||||
name: "ApiAutomation",
|
||||
component: () => import('@/business/components/api/automation/ApiAutomation'),
|
||||
},
|
||||
{
|
||||
path: "automation/report",
|
||||
name: "ApiReportList",
|
||||
|
@ -64,6 +54,16 @@ export default {
|
|||
component: () => import('@/business/components/api/automation/report/ApiReportView'),
|
||||
|
||||
},
|
||||
{
|
||||
path: "definition/:redirectID?/:dataType?/:dataSelectRange?",
|
||||
name: "ApiDefinition",
|
||||
component: () => import('@/business/components/api/definition/ApiDefinition'),
|
||||
},
|
||||
{
|
||||
path: "automation/:redirectID?/:dataType?/:dataSelectRange?",
|
||||
name: "ApiAutomation",
|
||||
component: () => import('@/business/components/api/automation/ApiAutomation'),
|
||||
},
|
||||
{
|
||||
path: 'monitor/view',
|
||||
name: 'ApiMonitor',
|
||||
|
|
Loading…
Reference in New Issue