fix: 首页接口数据统计、场景删除回收站数据

修复场景删除回收站数据异常的问题,首页接口数据统计增加情景接口的统计
This commit is contained in:
song.tianyang 2020-12-23 18:03:15 +08:00
parent 6625b77ad9
commit 45d9a21512
15 changed files with 132 additions and 73 deletions

View File

@ -254,7 +254,7 @@ public class APITestController {
* */
long dateCountByCreateInThisWeek = apiAutomationService.countScenarioByProjectIDAndCreatInThisWeek(projectId);
apiCountResult.setThisWeekAddedCount(dateCountByCreateInThisWeek);
long executedInThisWeekCountNumber = apiScenarioReportService.countByProjectIDAndCreateInThisWeek(projectId);
long executedInThisWeekCountNumber = apiScenarioReportService.countByProjectIdAndCreateInThisWeek(projectId);
apiCountResult.setThisWeekExecutedCount(executedInThisWeekCountNumber);
long executedCountNumber = apiScenarioReportService.countByProjectID(projectId);
apiCountResult.setExecutedCount(executedCountNumber);
@ -275,21 +275,27 @@ public class APITestController {
}
@GetMapping("/scheduleTaskInfoCount/{workSpaceID}")
public ApiDataCountDTO scheduleTaskInfoCount(@PathVariable String workSpaceID) {
@GetMapping("/scheduleTaskInfoCount/{projectId}")
public ApiDataCountDTO scheduleTaskInfoCount(@PathVariable String projectId) {
ApiDataCountDTO apiCountResult = new ApiDataCountDTO();
long allTaskCount = scheduleService.countTaskByWorkspaceIdAndGroup(workSpaceID,ScheduleGroup.API_TEST.name());
long allTaskCount = scheduleService.countTaskByProjectId(projectId);
apiCountResult.setAllApiDataCountNumber(allTaskCount);
long taskCountInThisWeek = scheduleService.countTaskByWorkspaceIdAndGroupInThisWeek(workSpaceID,ScheduleGroup.API_TEST.name());
long taskCountInThisWeek = scheduleService.countTaskByProjectIdInThisWeek(projectId);
apiCountResult.setThisWeekAddedCount(taskCountInThisWeek);
long executedInThisWeekCountNumber = apiReportService.countByWorkspaceIdAndGroupAndCreateInThisWeek(workSpaceID,ScheduleGroup.API_TEST.name());
long api_executedInThisWeekCountNumber = apiReportService.countByProjectIdAndCreateInThisWeek(projectId);
long scene_executedInThisWeekCountNumber = apiScenarioReportService.countByProjectIdAndCreateAndByScheduleInThisWeek(projectId);
long executedInThisWeekCountNumber = api_executedInThisWeekCountNumber+scene_executedInThisWeekCountNumber;
apiCountResult.setThisWeekExecutedCount(executedInThisWeekCountNumber);
//统计 失败 成功 以及总数
List<ApiDataCountResult> allExecuteResult = apiReportService.countByWorkspaceIdAndGroupGroupByExecuteResult(workSpaceID,ScheduleGroup.API_TEST.name());
List<ApiDataCountResult> api_allExecuteResult = apiReportService.countByProjectIdGroupByExecuteResult(projectId);
List<ApiDataCountResult> scene_allExecuteResult = apiScenarioReportService.countByProjectIdGroupByExecuteResult(projectId);
List<ApiDataCountResult> allExecuteResult = new ArrayList<>();
allExecuteResult.addAll(api_allExecuteResult);
allExecuteResult.addAll(scene_allExecuteResult);
apiCountResult.countScheduleExecute(allExecuteResult);
long allCount = apiCountResult.getExecutedCount();
@ -330,10 +336,10 @@ public class APITestController {
return returnList;
}
@GetMapping("/runningTask/{workspaceID}")
public List<TaskInfoResult> runningTask(@PathVariable String workspaceID) {
@GetMapping("/runningTask/{projectID}")
public List<TaskInfoResult> runningTask(@PathVariable String projectID) {
List<TaskInfoResult> resultList = scheduleService.findRunningTaskInfoByWorkspaceID(workspaceID);
List<TaskInfoResult> resultList = scheduleService.findRunningTaskInfoByProjectID(projectID);
for (TaskInfoResult taskInfo :
resultList) {
Date nextExecutionTime = CronUtils.getNextTriggerTime(taskInfo.getRule());

View File

@ -212,7 +212,7 @@ public class APIReportService {
apiTestReportMapper.deleteByExample(apiTestReportExample);
}
public long countByWorkspaceIdAndGroupAndCreateInThisWeek(String workspaceID, String group) {
public long countByProjectIdAndCreateInThisWeek(String projectId) {
Map<String, Date> startAndEndDateInWeek = DateUtils.getWeedFirstTimeAndLastTime(new Date());
Date firstTime = startAndEndDateInWeek.get("firstTime");
@ -221,11 +221,11 @@ public class APIReportService {
if(firstTime==null || lastTime == null){
return 0;
}else {
return extApiTestReportMapper.countByProjectIDAndCreateInThisWeek(workspaceID,group,firstTime.getTime(),lastTime.getTime());
return extApiTestReportMapper.countByProjectIDAndCreateInThisWeek(projectId,firstTime.getTime(),lastTime.getTime());
}
}
public List<ApiDataCountResult> countByWorkspaceIdAndGroupGroupByExecuteResult(String workspaceID, String group) {
return extApiTestReportMapper.countByWorkspaceIdAndGroupGroupByExecuteResult(workspaceID,group);
public List<ApiDataCountResult> countByProjectIdGroupByExecuteResult(String projectId) {
return extApiTestReportMapper.countByProjectIdGroupByExecuteResult(projectId);
}
}

View File

@ -161,6 +161,7 @@ public class ApiAutomationService {
}
public void preDelete(String scenarioID){
scheduleService.deleteByResourceId(scenarioID);
TestPlanApiScenarioExample example = new TestPlanApiScenarioExample();
example.createCriteria().andApiScenarioIdEqualTo(scenarioID);
@ -172,27 +173,34 @@ public class ApiAutomationService {
idList.add(api.getId());
}
example = new TestPlanApiScenarioExample();
example.createCriteria()
.andIdIn(idList);
testPlanApiScenarioMapper.deleteByExample(example);
if(!idList.isEmpty()){
example.createCriteria().andIdIn(idList);
testPlanApiScenarioMapper.deleteByExample(example);
}
}
public void preDelete(List<String> scenarioIDList){
List<String> idList = new ArrayList<>();
List<String> testPlanApiScenarioIdList = new ArrayList<>();
List<String> scheduleIdList = new ArrayList<>();
for (String id :scenarioIDList) {
TestPlanApiScenarioExample example = new TestPlanApiScenarioExample();
example.createCriteria().andApiScenarioIdEqualTo(id);
List<TestPlanApiScenario> testPlanApiScenarioList = testPlanApiScenarioMapper.selectByExample(example);
for (TestPlanApiScenario api :testPlanApiScenarioList) {
if(!idList.contains(api.getId())){
idList.add(api.getId());
if(!testPlanApiScenarioIdList.contains(api.getId())){
testPlanApiScenarioIdList.add(api.getId());
}
}
scheduleService.deleteByResourceId(id);
}
TestPlanApiScenarioExample example = new TestPlanApiScenarioExample();
example.createCriteria()
.andIdIn(idList);
testPlanApiScenarioMapper.deleteByExample(example);
if(!testPlanApiScenarioIdList.isEmpty()){
TestPlanApiScenarioExample example = new TestPlanApiScenarioExample();
example.createCriteria().andIdIn(testPlanApiScenarioIdList);
testPlanApiScenarioMapper.deleteByExample(example);
}
}
public void deleteBatch(List<String> ids) {
//及连删除外键表

View File

@ -6,6 +6,7 @@ import io.metersphere.api.dto.DeleteAPIReportRequest;
import io.metersphere.api.dto.QueryAPIReportRequest;
import io.metersphere.api.dto.automation.APIScenarioReportResult;
import io.metersphere.api.dto.automation.ExecuteType;
import io.metersphere.api.dto.datacount.ApiDataCountResult;
import io.metersphere.api.jmeter.ScenarioResult;
import io.metersphere.api.jmeter.TestResult;
import io.metersphere.base.domain.*;
@ -254,7 +255,7 @@ public class ApiScenarioReportService {
return extApiScenarioReportMapper.countByProjectID(projectId);
}
public long countByProjectIDAndCreateInThisWeek(String projectId) {
public long countByProjectIdAndCreateAndByScheduleInThisWeek(String projectId) {
Map<String, Date> startAndEndDateInWeek = DateUtils.getWeedFirstTimeAndLastTime(new Date());
Date firstTime = startAndEndDateInWeek.get("firstTime");
@ -263,7 +264,24 @@ public class ApiScenarioReportService {
if (firstTime == null || lastTime == null) {
return 0;
} else {
return extApiScenarioReportMapper.countByProjectIDAndCreateInThisWeek(projectId, firstTime.getTime(), lastTime.getTime());
return extApiScenarioReportMapper.countByProjectIdAndCreateAndByScheduleInThisWeek(projectId, firstTime.getTime(), lastTime.getTime());
}
}
public long countByProjectIdAndCreateInThisWeek(String projectId) {
Map<String, Date> startAndEndDateInWeek = DateUtils.getWeedFirstTimeAndLastTime(new Date());
Date firstTime = startAndEndDateInWeek.get("firstTime");
Date lastTime = startAndEndDateInWeek.get("lastTime");
if (firstTime == null || lastTime == null) {
return 0;
} else {
return extApiScenarioReportMapper.countByProjectIdAndCreateInThisWeek(projectId, firstTime.getTime(), lastTime.getTime());
}
}
public List<ApiDataCountResult> countByProjectIdGroupByExecuteResult(String projectId) {
return extApiScenarioReportMapper.countByProjectIdGroupByExecuteResult(projectId);
}
}

View File

@ -37,7 +37,8 @@
SELECT testCase.testCaseName AS caseName,testCase.testPlanName AS testPlan ,caseErrorCountData.dataCountNumber AS failureTimes,'apiCase' AS caseType
FROM (
SELECT apiCase.id AS testCaseID,apiCase.`name` AS testCaseName,group_concat(testPlan.`name`) AS testPlanName FROM api_test_case apiCase
LEFT JOIN test_plan testPlan ON testPlan.api_ids like concat('%"',apiCase.id,'"%')
LEFT JOIN test_plan_api_case testPlanCase ON testPlanCase.api_case_id = apiCase.id
LEFT JOIN test_plan testPlan ON testPlan.id = testPlanCase.test_plan_id
GROUP BY apiCase.id
ORDER BY apiCase.create_time DESC
)testCase

View File

@ -2,6 +2,7 @@ package io.metersphere.base.mapper.ext;
import io.metersphere.api.dto.QueryAPIReportRequest;
import io.metersphere.api.dto.automation.APIScenarioReportResult;
import io.metersphere.api.dto.datacount.ApiDataCountResult;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@ -14,6 +15,9 @@ public interface ExtApiScenarioReportMapper {
long countByProjectID(String projectId);
long countByProjectIDAndCreateInThisWeek(@Param("projectId") String projectId, @Param("firstDayTimestamp") long firstDayTimestamp, @Param("lastDayTimestamp") long lastDayTimestamp);
long countByProjectIdAndCreateInThisWeek(@Param("projectId") String projectId, @Param("firstDayTimestamp") long firstDayTimestamp, @Param("lastDayTimestamp") long lastDayTimestamp);
long countByProjectIdAndCreateAndByScheduleInThisWeek(@Param("projectId") String projectId, @Param("firstDayTimestamp") long firstDayTimestamp, @Param("lastDayTimestamp") long lastDayTimestamp);
List<ApiDataCountResult> countByProjectIdGroupByExecuteResult(String projectId);
}

View File

@ -169,9 +169,28 @@
<select id="countByProjectID" resultType="java.lang.Long">
SELECT count(id) AS countNumber FROM api_scenario_report WHERE project_id = #{0}
</select>
<select id="countByProjectIDAndCreateInThisWeek" resultType="java.lang.Long">
<select id="countByProjectIdAndCreateInThisWeek" resultType="java.lang.Long">
SELECT count(id) AS countNumber FROM api_scenario_report
WHERE project_id = #{projectId}
AND create_time BETWEEN #{firstDayTimestamp} AND #{lastDayTimestamp}
</select>
<select id="countByProjectIdAndCreateAndByScheduleInThisWeek" resultType="java.lang.Long">
SELECT count(acr.report_id) AS countNumber FROM api_scenario_report_detail acr
INNER JOIN api_scenario_report ar ON ar.id = acr.report_id
INNER JOIN (
SELECT acitem.id FROM api_scenario acitem INNER JOIN `schedule` sc ON acitem.id = sc.resource_id
) ac on acr.content like CONCAT('%', ac.id,'%')
WHERE acr.project_id = #{projectId} AND ar.create_time BETWEEN #{firstDayTimestamp} AND #{lastDayTimestamp}
</select>
<select id="countByProjectIdGroupByExecuteResult" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
SELECT count(acr.report_id) AS countNumber,ar.status AS groupField
FROM api_scenario_report_detail acr
INNER JOIN api_scenario_report ar ON ar.id = acr.report_id
INNER JOIN (
SELECT acitem.id FROM api_scenario acitem INNER JOIN `schedule` sc ON acitem.id = sc.resource_id
) ac on acr.content like CONCAT('%', ac.id,'%')
WHERE acr.project_id = #{projectId}
</select>
</mapper>

View File

@ -18,7 +18,7 @@ public interface ExtApiTestReportMapper {
List<DashboardTestDTO> selectDashboardTests(@Param("workspaceId") String workspaceId, @Param("startTimestamp") long startTimestamp);
List<ApiDataCountResult> countByWorkspaceIdAndGroupGroupByExecuteResult(@Param("workspaceID") String workspaceID, @Param("group")String group);
List<ApiDataCountResult> countByProjectIdGroupByExecuteResult(String projectId);
long countByProjectIDAndCreateInThisWeek(@Param("workspaceID") String workspaceID, @Param("group")String group, @Param("startTime") long startTime, @Param("endTime")long endTime);
long countByProjectIDAndCreateInThisWeek(@Param("projectId") String projectId, @Param("startTime") long startTime, @Param("endTime")long endTime);
}

View File

@ -152,19 +152,24 @@
GROUP BY x
</select>
<select id="countByWorkspaceIdAndGroupGroupByExecuteResult" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
<select id="countByProjectIdGroupByExecuteResult" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
SELECT testReport.`status` AS groupField,COUNT(testReportDetail.report_id) AS countNumber
FROM api_test_report_detail testReportDetail
INNER JOIN `schedule` sch ON sch.resource_id = testReportDetail.test_id
INNER JOIN api_test_report testReport ON testReportDetail.report_id = testReport.id
WHERE workspace_id = #{workspaceID} AND `group` = #{group}
WHERE sch.resource_id IN (
SELECT id FROM api_test WHERE project_id = #{projectId,jdbcType=VARCHAR}
)
AND `group` = #{group}
</select>
<select id="countByProjectIDAndCreateInThisWeek" resultType="java.lang.Long">
SELECT COUNT(testReportDetail.report_id) AS countNumber FROM api_test_report_detail testReportDetail
INNER JOIN `schedule` sch ON sch.resource_id = testReportDetail.test_id
INNER JOIN api_test_report testReport ON testReportDetail.report_id = testReport.id
WHERE workspace_id = #{workspaceID} AND `group` = #{group}
WHERE sch.resource_id IN (
SELECT id FROM api_test WHERE project_id = #{projectId,jdbcType=VARCHAR}
)
AND testReport.create_time BETWEEN #{startTime} and #{endTime}
</select>
</mapper>

View File

@ -10,9 +10,9 @@ import java.util.List;
public interface ExtScheduleMapper {
List<ScheduleDao> list(@Param("request") QueryScheduleRequest request);
long countTaskByWorkspaceIdAndGroup(@Param("workspaceId") String workspaceId,@Param("group") String group);
long countTaskByProjectId(String workspaceId);
long countTaskByWorkspaceIdAndGroupAndCreateTimeRange(@Param("workspaceId")String workspaceId,@Param("group") String group, @Param("startTime") long startTime, @Param("endTime") long endTime);
long countTaskByProjectIdAndCreateTimeRange(@Param("projectId")String projectId, @Param("startTime") long startTime, @Param("endTime") long endTime);
List<TaskInfoResult> findRunningTaskInfoByWorkspaceID(String workspaceID);
List<TaskInfoResult> findRunningTaskInfoByProjectID(String workspaceID);
}

View File

@ -36,26 +36,33 @@
</if>
</select>
<select id="countTaskByWorkspaceIdAndGroup" resultType="java.lang.Long">
SELECT COUNT(id) AS countNumber FROM `schedule` WHERE `workspace_id` = #{workspaceId} AND `group` = #{group}
<select id="countTaskByProjectId" resultType="java.lang.Long">
SELECT COUNT(id) AS countNumber FROM `schedule` WHERE resource_id IN (
SELECT id FROM api_test WHERE project_id = #{0,jdbcType=VARCHAR}
UNION
SELECT id FROM api_scenario WHERE project_id = #{0,jdbcType=VARCHAR}
)
</select>
<select id="countTaskByWorkspaceIdAndGroupAndCreateTimeRange" resultType="java.lang.Long">
<select id="countTaskByProjectIdAndCreateTimeRange" resultType="java.lang.Long">
SELECT COUNT(id) AS countNumber FROM `schedule`
WHERE workspace_id = #{workspaceId}
AND `group` = #{group}
WHERE resource_id IN (
SELECT id FROM api_test WHERE project_id = #{projectId,jdbcType=VARCHAR}
UNION
SELECT id FROM api_scenario WHERE project_id = #{projectId,jdbcType=VARCHAR}
)
AND create_time BETWEEN #{startTime} and #{endTime}
</select>
<select id="findRunningTaskInfoByWorkspaceID" resultType="io.metersphere.api.dto.datacount.response.TaskInfoResult">
<select id="findRunningTaskInfoByProjectID" resultType="io.metersphere.api.dto.datacount.response.TaskInfoResult">
SELECT apiTest.`name` AS scenario,sch.id AS taskID,sch.`value` AS rule,sch.`enable` AS `taskStatus`,u.`name` AS creator,sch.update_time AS updateTime
FROM api_test apiTest
INNER JOIN `schedule` sch ON apiTest.id = sch.resource_id
INNER JOIN `user` u ON u.id = sch.user_id
WHERE sch.`enable` = true AND sch.workspace_id = #{0,jdbcType=VARCHAR}
WHERE sch.`enable` = true AND apiTest.project_id = #{0,jdbcType=VARCHAR}
UNION
SELECT apiTest.`name` AS scenario,sch.id AS taskID,sch.`value` AS rule,sch.`enable` AS `taskStatus`,u.`name` AS creator,sch.update_time AS updateTime
FROM api_scenario apiTest
INNER JOIN `schedule` sch ON apiTest.id = sch.resource_id
SELECT apiScene.`name` AS scenario,sch.id AS taskID,sch.`value` AS rule,sch.`enable` AS `taskStatus`,u.`name` AS creator,sch.update_time AS updateTime
FROM api_scenario apiScene
INNER JOIN `schedule` sch ON apiScene.id = sch.resource_id
INNER JOIN `user` u ON u.id = sch.user_id
WHERE sch.`enable` = true AND sch.workspace_id = #{0,jdbcType=VARCHAR}
WHERE sch.`enable` = true AND apiScene.project_id = #{0,jdbcType=VARCHAR}
</select>
</mapper>

View File

@ -20,7 +20,6 @@ import io.metersphere.dto.ScheduleDao;
import io.metersphere.job.sechedule.ApiTestJob;
import io.metersphere.job.sechedule.ScheduleManager;
import org.apache.commons.lang3.StringUtils;
import org.quartz.JobDetail;
import org.quartz.JobKey;
import org.quartz.SchedulerException;
import org.quartz.TriggerKey;
@ -168,11 +167,11 @@ public class ScheduleService {
});
}
public long countTaskByWorkspaceIdAndGroup(String workspaceId,String group) {
return extScheduleMapper.countTaskByWorkspaceIdAndGroup(workspaceId,group);
public long countTaskByProjectId(String projectId) {
return extScheduleMapper.countTaskByProjectId(projectId);
}
public long countTaskByWorkspaceIdAndGroupInThisWeek(String workspaceID, String group) {
public long countTaskByProjectIdInThisWeek(String projectId) {
Map<String, Date> startAndEndDateInWeek = DateUtils.getWeedFirstTimeAndLastTime(new Date());
Date firstTime = startAndEndDateInWeek.get("firstTime");
@ -181,12 +180,12 @@ public class ScheduleService {
if(firstTime==null || lastTime == null){
return 0;
}else {
return extScheduleMapper.countTaskByWorkspaceIdAndGroupAndCreateTimeRange(workspaceID,group,firstTime.getTime(),lastTime.getTime());
return extScheduleMapper.countTaskByProjectIdAndCreateTimeRange(projectId,firstTime.getTime(),lastTime.getTime());
}
}
public List<TaskInfoResult> findRunningTaskInfoByWorkspaceID(String workspaceID) {
List<TaskInfoResult> runningTaskInfoList = extScheduleMapper.findRunningTaskInfoByWorkspaceID(workspaceID);
public List<TaskInfoResult> findRunningTaskInfoByProjectID(String projectID) {
List<TaskInfoResult> runningTaskInfoList = extScheduleMapper.findRunningTaskInfoByProjectID(projectID);
return runningTaskInfoList;
}
}

View File

@ -50,10 +50,12 @@ function defaultCustomValidate() {
}
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
const noticeTemplate = requireComponent.keys().length > 0 ? requireComponent("./notice/NoticeTemplate.vue") : {};
export default {
name: "MsScheduleMaintain",
components: {CrontabResult, Crontab, MsScheduleNotification},
components: {CrontabResult, Crontab, MsScheduleNotification,"NoticeTemplate": noticeTemplate.default},
props: {
customValidate: {

View File

@ -7,12 +7,8 @@
</div>
<div v-else-if="dateType==='2'">
<el-link href="https://github.com/metersphere/metersphere/issues" target="_blank" type="primary">😔觉得MeterSphere不好用就来https://github.com/metersphere/metersphere/issues</el-link>
<!-- <el-link href="https://jmeter.apache.org/usermanual/component_reference.html#BeanShell_PostProcessor"-->
<!-- type="primary">{{$t('commons.reference_documentation')}}-->
<!-- </el-link>-->
</div>
<div v-else-if="dateType==='3'">
<!-- <el-link :herf="'https://github.com/metersphere/metersphere/issues'" target="_blank"></el-link>-->
<el-link href="https://github.com/metersphere/metersphere" target="_blank" type="primary">😄觉得MeterSphere好用就来 https://github.com/metersphere/metersphere star</el-link>
</div>
<div v-else>
@ -58,21 +54,15 @@ import MsSceneInfoCard from "./components/SceneInfoCard";
import MsScheduleTaskInfoCard from "./components/ScheduleTaskInfoCard";
import MsTestCaseInfoCard from "./components/TestCaseInfoCard";
// import MsApiDetailCard from "./components/ApiDetailCard";
// import MsSceneDetailCard from "./components/SceneDetailCard";
// import MsScheduleTaskDetailCard from "./components/ScheduleTaskDetailCard";
// import MsTestCaseDetailCard from "./components/TestCaseDetailCard";
import MsFailureTestCaseList from "./components/FailureTestCaseList";
import MsRunningTaskList from "./components/RunningTaskList"
import {getCurrentProjectID,getCurrentWorkspaceId} from "@/common/js/utils";
import {getCurrentProjectID} from "@/common/js/utils";
export default {
name: "ApiTestHomePage",
components: {
MsApiInfoCard, MsSceneInfoCard, MsScheduleTaskInfoCard, MsTestCaseInfoCard,
// MsApiDetailCard, MsSceneDetailCard, MsScheduleTaskDetailCard, MsTestCaseDetailCard,
MsFailureTestCaseList,MsRunningTaskList,
MsMainContainer, MsContainer
},
@ -121,8 +111,8 @@ export default {
});
let workSpaceID = getCurrentWorkspaceId();
this.$get("/api/scheduleTaskInfoCount/"+workSpaceID, response => {
// let workSpaceID = getCurrentWorkspaceId();
this.$get("/api/scheduleTaskInfoCount/"+selectProjectId, response => {
this.scheduleTaskCountData = response.data;
});
},

View File

@ -39,7 +39,7 @@
</template>
<script>
import {getCurrentProjectID,getCurrentWorkspaceId} from "@/common/js/utils";
import {getCurrentProjectID} from "@/common/js/utils";
export default {
name: "MsRunningTaskList",
@ -56,8 +56,8 @@ export default {
methods: {
search() {
let workSpaceID = getCurrentWorkspaceId();
this.result = this.$get("/api/runningTask/"+workSpaceID, response => {
let projectID = getCurrentProjectID();
this.result = this.$get("/api/runningTask/"+projectID, response => {
this.tableData = response.data;
});
},