refactor: 前端传入当前工作空间ID进行数据查询

This commit is contained in:
shiziyuan9527 2021-06-15 14:45:23 +08:00 committed by 刘瑞斌
parent 0ddb35e5bd
commit b045c16304
2 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@
import MsDialogFooter from '../../../../../common/components/MsDialogFooter'
import SelectMenu from "../../../../common/SelectMenu";
import RelevanceDialog from "./RelevanceDialog";
import {getCurrentProjectID, getCurrentUserId} from "@/common/js/utils";
import {getCurrentProjectID, getCurrentUserId, getCurrentWorkspaceId} from "@/common/js/utils";
export default {
name: "TestCaseRelevanceBase",
@ -91,7 +91,7 @@
},
getProject() {
this.result = this.$post("/project/list/related", {userId: getCurrentUserId()}, res => {
this.result = this.$post("/project/list/related", {userId: getCurrentUserId(), workspaceId: getCurrentWorkspaceId()}, res => {
let data = res.data;
if (data) {
const index = data.findIndex(d => d.id === getCurrentProjectID());

View File

@ -108,7 +108,7 @@ import ReviewStatus from "@/business/components/track/case/components/ReviewStat
import elTableInfiniteScroll from 'el-table-infinite-scroll';
import SelectMenu from "../../../common/SelectMenu";
import {_filter} from "@/common/js/tableUtils";
import {getCurrentProjectID, getCurrentUserId} from "@/common/js/utils";
import {getCurrentProjectID, getCurrentUserId, getCurrentWorkspaceId} from "@/common/js/utils";
export default {
@ -313,7 +313,7 @@ export default {
},
getProject() {
if (this.reviewId) {
this.$post("/project/list/related", {userId: getCurrentUserId()}, res => {
this.$post("/project/list/related", {userId: getCurrentUserId(), workspaceId: getCurrentWorkspaceId()}, res => {
let data = res.data;
if (data) {
this.projects = data;