fix(测试跟踪): 测试计划关联场景用例不展示运行结果
--bug=1020230 --user=宋天阳 【测试跟踪】测试计划关联接口场景弹框,执行结果列没显示结果 https://www.tapd.cn/55049933/s/1304598
This commit is contained in:
parent
ee6a1fd245
commit
a61386cb89
|
@ -185,6 +185,7 @@ export default {
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
|
minAngle: 3,
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
radius: [75, 100],
|
radius: [75, 100],
|
||||||
center: ['104px', '50%'],
|
center: ['104px', '50%'],
|
||||||
|
|
|
@ -1,27 +1,63 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dialog :close-on-click-modal="false" :visible.sync="visible" width="900px"
|
<el-dialog
|
||||||
@close="saveAndClose" destroy-on-close ref="editFile">
|
:close-on-click-modal="false"
|
||||||
<span slot="title" class="dialog-footer">
|
:visible.sync="visible"
|
||||||
<span>{{ data.name }}</span>
|
width="900px"
|
||||||
<i class="el-icon-download ms-header-menu" @click="download" v-permission="['PROJECT_FILE:READ+DOWNLOAD+JAR']"/>
|
@close="saveAndClose"
|
||||||
<i class="el-icon-delete ms-header-menu" @click="deleteData" v-permission="['PROJECT_FILE:READ+DELETE+JAR']"/>
|
destroy-on-close
|
||||||
<el-button v-if="isRepositoryFile()" :loading="isPullBtnLoading" class="ms-header-menu" size="mini"
|
ref="editFile"
|
||||||
@click="filePull"
|
>
|
||||||
style="padding: 2px;font-size: 12px">pull</el-button>
|
<span slot="title" class="dialog-footer">
|
||||||
</span>
|
<span>{{ data.name }}</span>
|
||||||
|
<i
|
||||||
|
class="el-icon-download ms-header-menu"
|
||||||
|
@click="download"
|
||||||
|
v-permission="['PROJECT_FILE:READ+DOWNLOAD+JAR']"
|
||||||
|
/>
|
||||||
|
<i
|
||||||
|
class="el-icon-delete ms-header-menu"
|
||||||
|
@click="deleteData"
|
||||||
|
v-permission="['PROJECT_FILE:READ+DELETE+JAR']"
|
||||||
|
/>
|
||||||
|
<el-button
|
||||||
|
v-if="isRepositoryFile()"
|
||||||
|
:loading="isPullBtnLoading"
|
||||||
|
class="ms-header-menu"
|
||||||
|
size="mini"
|
||||||
|
@click="filePull"
|
||||||
|
style="padding: 2px; font-size: 12px"
|
||||||
|
>pull</el-button
|
||||||
|
>
|
||||||
|
</span>
|
||||||
|
|
||||||
<el-tabs v-if="visible" tab-position="right" v-model="showPanel"
|
<el-tabs
|
||||||
:class=" isRepositoryFile()?'':'file-metadata-tab'">
|
v-if="visible"
|
||||||
<el-tab-pane name="baseInfo" :label=" isRepositoryFile()?$t('test_track.plan_view.base_info'):''">
|
tab-position="right"
|
||||||
|
v-model="showPanel"
|
||||||
|
:class="isRepositoryFile() ? '' : 'file-metadata-tab'"
|
||||||
|
>
|
||||||
|
<el-tab-pane
|
||||||
|
name="baseInfo"
|
||||||
|
:label="isRepositoryFile() ? $t('test_track.plan_view.base_info') : ''"
|
||||||
|
>
|
||||||
<el-row align="center" v-loading="loading">
|
<el-row align="center" v-loading="loading">
|
||||||
<el-col style="margin: 10px" :span="10">
|
<el-col style="margin: 10px" :span="10">
|
||||||
<el-row :gutter="20" style="background: #F5F6F8;height: 480px">
|
<el-row :gutter="20" style="background: #f5f6f8; height: 480px">
|
||||||
<el-col :span="2" class="ms-left-col">
|
<el-col :span="2" class="ms-left-col">
|
||||||
<i class="el-icon-arrow-left ms-icon-arrow" @click="beforeData"/>
|
<i
|
||||||
|
class="el-icon-arrow-left ms-icon-arrow"
|
||||||
|
@click="beforeData"
|
||||||
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="18" style="padding-top: 80px">
|
<el-col :span="18" style="padding-top: 80px">
|
||||||
<el-card :body-style="{ padding: '0px' }" v-if="isImage(data.type) && !isRepositoryFile()">
|
<el-card
|
||||||
<img :src="'/project/file/metadata/info/' + data.id" class="ms-edit-image"/>
|
:body-style="{ padding: '0px' }"
|
||||||
|
v-if="isImage(data.type) && !isRepositoryFile()"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
:src="'/project/file/metadata/info/' + data.id"
|
||||||
|
class="ms-edit-image"
|
||||||
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card :body-style="{ padding: '0px' }" v-else>
|
<el-card :body-style="{ padding: '0px' }" v-else>
|
||||||
<div class="ms-edit-image">
|
<div class="ms-edit-image">
|
||||||
|
@ -32,14 +68,24 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" class="ms-right-col">
|
<el-col :span="2" class="ms-right-col">
|
||||||
<i class="el-icon-arrow-right ms-icon-arrow" @click="nextData"/>
|
<i
|
||||||
|
class="el-icon-arrow-right ms-icon-arrow"
|
||||||
|
@click="nextData"
|
||||||
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="13">
|
<el-col :span="13">
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-main>
|
<el-main>
|
||||||
<el-form :model="data" :rules="rules" label-position="right" label-width="80px" size="small" ref="form">
|
<el-form
|
||||||
|
:model="data"
|
||||||
|
:rules="rules"
|
||||||
|
label-position="right"
|
||||||
|
label-width="80px"
|
||||||
|
size="small"
|
||||||
|
ref="form"
|
||||||
|
>
|
||||||
<!-- 基础信息 -->
|
<!-- 基础信息 -->
|
||||||
<el-form-item :label="$t('load_test.file_name')" prop="name">
|
<el-form-item :label="$t('load_test.file_name')" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
|
@ -47,13 +93,22 @@
|
||||||
size="small"
|
size="small"
|
||||||
v-model="data.name"
|
v-model="data.name"
|
||||||
:disabled="isRepositoryFile() || !canEdit"
|
:disabled="isRepositoryFile() || !canEdit"
|
||||||
show-word-limit @blur="save"/>
|
show-word-limit
|
||||||
|
@blur="save"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('commons.description')" prop="description">
|
<el-form-item
|
||||||
<el-input class="ms-http-textarea"
|
:label="$t('commons.description')"
|
||||||
v-model="data.description"
|
prop="description"
|
||||||
type="textarea"
|
>
|
||||||
:rows="2" size="small" @blur="save"/>
|
<el-input
|
||||||
|
class="ms-http-textarea"
|
||||||
|
v-model="data.description"
|
||||||
|
type="textarea"
|
||||||
|
:rows="2"
|
||||||
|
size="small"
|
||||||
|
@blur="save"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('load_test.file_type')" prop="type">
|
<el-form-item :label="$t('load_test.file_type')" prop="type">
|
||||||
<span>{{ data.type }}</span>
|
<span>{{ data.type }}</span>
|
||||||
|
@ -62,40 +117,79 @@
|
||||||
<span>{{ formatFileSize(data.size) }}</span>
|
<span>{{ formatFileSize(data.size) }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="$t('api_test.automation.tag')" prop="tags">
|
<el-form-item
|
||||||
<ms-input-tag :currentScenario="data" ref="tag" @onblur="save"/>
|
:label="$t('api_test.automation.tag')"
|
||||||
|
prop="tags"
|
||||||
|
>
|
||||||
|
<ms-input-tag
|
||||||
|
:currentScenario="data"
|
||||||
|
ref="tag"
|
||||||
|
@onblur="save"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="$t('test_track.case.module')" prop="moduleId">
|
<el-form-item
|
||||||
<ms-select-tree :disabled="isRepositoryFile() || !canEdit" size="small" :data="moduleOptions"
|
:label="$t('test_track.case.module')"
|
||||||
:defaultKey="data.moduleId"
|
prop="moduleId"
|
||||||
@getValue="setModule" :obj="moduleObj" clearable checkStrictly/>
|
>
|
||||||
|
<ms-select-tree
|
||||||
|
:disabled="isRepositoryFile() || !canEdit"
|
||||||
|
size="small"
|
||||||
|
:data="moduleOptions"
|
||||||
|
:defaultKey="data.moduleId"
|
||||||
|
@getValue="setModule"
|
||||||
|
:obj="moduleObj"
|
||||||
|
clearable
|
||||||
|
checkStrictly
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="$t('project.creator')" prop="createUser">
|
<el-form-item
|
||||||
|
:label="$t('project.creator')"
|
||||||
|
prop="createUser"
|
||||||
|
>
|
||||||
<span>{{ data.createUser }}</span>
|
<span>{{ data.createUser }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="$t('commons.create_time')" prop="createTime">
|
<el-form-item
|
||||||
|
:label="$t('commons.create_time')"
|
||||||
|
prop="createTime"
|
||||||
|
>
|
||||||
<span>{{ data.createTime | datetimeFormat }}</span>
|
<span>{{ data.createTime | datetimeFormat }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="'加载Jar包'" prop="loadJar" v-if="data.type === 'JAR'">
|
<el-form-item
|
||||||
<el-switch v-model="data.loadJar" :active-text="$t('project.file_jar_message')" @change="save" :disabled="!canEdit"/>
|
:label="'加载Jar包'"
|
||||||
|
prop="loadJar"
|
||||||
|
v-if="data.type === 'JAR'"
|
||||||
|
>
|
||||||
|
<el-switch
|
||||||
|
v-model="data.loadJar"
|
||||||
|
:active-text="$t('project.file_jar_message')"
|
||||||
|
@change="save"
|
||||||
|
:disabled="!canEdit"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="isRepositoryFile()" :label="$t('commons.version')">
|
<el-form-item
|
||||||
|
v-if="isRepositoryFile()"
|
||||||
|
:label="$t('commons.version')"
|
||||||
|
>
|
||||||
{{ getCommitId() }}
|
{{ getCommitId() }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-else :label="$t('project.upload_file_again')" prop="files">
|
<el-form-item
|
||||||
|
v-else
|
||||||
|
:label="$t('project.upload_file_again')"
|
||||||
|
prop="files"
|
||||||
|
>
|
||||||
<el-upload
|
<el-upload
|
||||||
style="width: 38px; float: left;"
|
style="width: 38px; float: left"
|
||||||
action="#"
|
action="#"
|
||||||
:before-upload="beforeUploadFile"
|
:before-upload="beforeUploadFile"
|
||||||
:http-request="handleUpload"
|
:http-request="handleUpload"
|
||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
v-permission="['PROJECT_FILE:READ+UPLOAD+JAR']">
|
v-permission="['PROJECT_FILE:READ+UPLOAD+JAR']"
|
||||||
<el-button icon="el-icon-plus" size="mini"/>
|
>
|
||||||
|
<el-button icon="el-icon-plus" size="mini" />
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -104,31 +198,42 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane name="relevanceCase" v-if="isRepositoryFile()"
|
<el-tab-pane
|
||||||
:label=" $t('test_track.review_view.relevance_case')">
|
name="relevanceCase"
|
||||||
<file-case-relevance-list :file-metadata-ref-id="data.refId"/>
|
v-if="isRepositoryFile()"
|
||||||
|
:label="$t('test_track.review_view.relevance_case')"
|
||||||
|
>
|
||||||
|
<file-case-relevance-list :file-metadata-ref-id="data.refId" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane name="versionHistory" v-if="isRepositoryFile()"
|
<el-tab-pane
|
||||||
:label=" $t('project.project_file.repository.version_history')">
|
name="versionHistory"
|
||||||
<file-version-list :file-metadata-ref-id="data.refId"/>
|
v-if="isRepositoryFile()"
|
||||||
|
:label="$t('project.project_file.repository.version_history')"
|
||||||
|
>
|
||||||
|
<file-version-list :file-metadata-ref-id="data.refId" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {operationConfirm} from "metersphere-frontend/src/utils";
|
import { operationConfirm } from "metersphere-frontend/src/utils";
|
||||||
import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
import { getCurrentProjectID } from "metersphere-frontend/src/utils/token";
|
||||||
import {getFileMetaPages, modifyFileMeta, pullGitFile, uploadFileMeta} from "../../../../api/file";
|
import {
|
||||||
|
getFileMetaPages,
|
||||||
|
modifyFileMeta,
|
||||||
|
pullGitFile,
|
||||||
|
uploadFileMeta,
|
||||||
|
} from "../../../../api/file";
|
||||||
import FileVersionList from "@/business/menu/file/list/FileVersionList";
|
import FileVersionList from "@/business/menu/file/list/FileVersionList";
|
||||||
import FileCaseRelevanceList from "@/business/menu/file/list/FileCaseRelevanceList";
|
import FileCaseRelevanceList from "@/business/menu/file/list/FileCaseRelevanceList";
|
||||||
import {hasPermission} from "metersphere-frontend/src/utils/permission";
|
import { hasPermission } from "metersphere-frontend/src/utils/permission";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsEditFileMetadata",
|
name: "MsEditFileMetadata",
|
||||||
components: {
|
components: {
|
||||||
MsSelectTree: () => import("metersphere-frontend/src/components/select-tree/SelectTree"),
|
MsSelectTree: () =>
|
||||||
|
import("metersphere-frontend/src/components/select-tree/SelectTree"),
|
||||||
MsInputTag: () => import("metersphere-frontend/src/components/MsInputTag"),
|
MsInputTag: () => import("metersphere-frontend/src/components/MsInputTag"),
|
||||||
FileVersionList,
|
FileVersionList,
|
||||||
FileCaseRelevanceList,
|
FileCaseRelevanceList,
|
||||||
|
@ -142,28 +247,61 @@ export default {
|
||||||
isPullBtnLoading: false,
|
isPullBtnLoading: false,
|
||||||
results: [],
|
results: [],
|
||||||
moduleObj: {
|
moduleObj: {
|
||||||
id: 'id',
|
id: "id",
|
||||||
label: 'name',
|
label: "name",
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
name: [
|
name: [
|
||||||
{min: 1, max: 200, message: this.$t('commons.input_limit', [1, 200]), trigger: 'blur'}
|
{
|
||||||
|
min: 1,
|
||||||
|
max: 200,
|
||||||
|
message: this.$t("commons.input_limit", [1, 200]),
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
description: [
|
description: [
|
||||||
{max: 3000, message: this.$t('commons.input_limit', [0, 3000]), trigger: 'blur'}
|
{
|
||||||
]
|
max: 3000,
|
||||||
|
message: this.$t("commons.input_limit", [0, 3000]),
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
total: 0,
|
total: 0,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
loading: false,
|
loading: false,
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
images: ["bmp", "jpg", "png", "tif", "gif", "pcx", "tga", "exif", "fpx", "svg", "psd", "cdr", "pcd", "dxf", "ufo", "eps", "ai", "raw", "WMF", "webp", "avif", "apng", "jpeg"]
|
images: [
|
||||||
|
"bmp",
|
||||||
|
"jpg",
|
||||||
|
"png",
|
||||||
|
"tif",
|
||||||
|
"gif",
|
||||||
|
"pcx",
|
||||||
|
"tga",
|
||||||
|
"exif",
|
||||||
|
"fpx",
|
||||||
|
"svg",
|
||||||
|
"psd",
|
||||||
|
"cdr",
|
||||||
|
"pcd",
|
||||||
|
"dxf",
|
||||||
|
"ufo",
|
||||||
|
"eps",
|
||||||
|
"ai",
|
||||||
|
"raw",
|
||||||
|
"WMF",
|
||||||
|
"webp",
|
||||||
|
"avif",
|
||||||
|
"apng",
|
||||||
|
"jpeg",
|
||||||
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
canEdit() {
|
canEdit() {
|
||||||
return hasPermission('PROJECT_FILE:READ+UPLOAD+JAR');
|
return hasPermission("PROJECT_FILE:READ+UPLOAD+JAR");
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
moduleOptions: Array,
|
moduleOptions: Array,
|
||||||
|
@ -190,22 +328,27 @@ export default {
|
||||||
},
|
},
|
||||||
filePull() {
|
filePull() {
|
||||||
this.isPullBtnLoading = true;
|
this.isPullBtnLoading = true;
|
||||||
let formData = {id: this.data.id};
|
let formData = { id: this.data.id };
|
||||||
pullGitFile(formData).then(() => {
|
pullGitFile(formData)
|
||||||
this.$success(this.$t('commons.update') + this.$t('api_test.automation.request_success'));
|
.then(() => {
|
||||||
this.isPullBtnLoading = false;
|
this.$success(
|
||||||
this.$emit("reload");
|
this.$t("commons.update") +
|
||||||
this.close();
|
this.$t("api_test.automation.request_success")
|
||||||
}).catch(() => {
|
);
|
||||||
this.isPullBtnLoading = false;
|
this.isPullBtnLoading = false;
|
||||||
});
|
this.$emit("reload");
|
||||||
|
this.close();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.isPullBtnLoading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
beforeUploadFile(file) {
|
beforeUploadFile(file) {
|
||||||
if (!this.fileValidator(file)) {
|
if (!this.fileValidator(file)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (file.size / 1024 / 1024 > 500) {
|
if (file.size / 1024 / 1024 > 500) {
|
||||||
this.$warning(this.$t('api_test.request.body_upload_limit_size'));
|
this.$warning(this.$t("api_test.request.body_upload_limit_size"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -217,7 +360,7 @@ export default {
|
||||||
if (this.data.moduleId !== id) {
|
if (this.data.moduleId !== id) {
|
||||||
this.data.moduleId = id;
|
this.data.moduleId = id;
|
||||||
this.save();
|
this.save();
|
||||||
this.$emit('refreshModule');
|
this.$emit("refreshModule");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
|
@ -239,20 +382,31 @@ export default {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
},
|
},
|
||||||
isRepositoryFile() {
|
isRepositoryFile() {
|
||||||
return this.data.storage === 'GIT';
|
return this.data.storage === "GIT";
|
||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let request = JSON.parse(JSON.stringify(this.data));
|
let request = JSON.parse(JSON.stringify(this.data));
|
||||||
request.tags = JSON.stringify(request.tags);
|
request.tags = JSON.stringify(request.tags);
|
||||||
if (request.tags && request.tags.length > 1000) {
|
if (request.tags && request.tags.length > 1000) {
|
||||||
this.$warning(this.$t('api_test.automation.tag') + this.$t('commons.input_limit', [0, 1000]));
|
this.$warning(
|
||||||
|
this.$t("api_test.automation.tag") +
|
||||||
|
this.$t("commons.input_limit", [0, 1000])
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
modifyFileMeta(request).catch(() => {
|
this.loading = true;
|
||||||
this.$emit("reload");
|
modifyFileMeta(request)
|
||||||
});
|
.then(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.$emit("reload");
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$error(this.$t("commons.save_failed"));
|
||||||
|
this.loading = false;
|
||||||
|
this.$emit("reload");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -264,22 +418,26 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isImage(type) {
|
isImage(type) {
|
||||||
return (type && this.images.indexOf(type.toLowerCase()) !== -1);
|
return type && this.images.indexOf(type.toLowerCase()) !== -1;
|
||||||
},
|
},
|
||||||
download() {
|
download() {
|
||||||
this.$emit("download", this.data);
|
this.$emit("download", this.data);
|
||||||
},
|
},
|
||||||
deleteData() {
|
deleteData() {
|
||||||
operationConfirm(this, this.$t('project.file_delete_tip', [this.data.name]), () => {
|
operationConfirm(
|
||||||
this.close();
|
this,
|
||||||
this.data.confirm = true;
|
this.$t("project.file_delete_tip", [this.data.name]),
|
||||||
this.$emit("delete", this.data);
|
() => {
|
||||||
});
|
this.close();
|
||||||
|
this.data.confirm = true;
|
||||||
|
this.$emit("delete", this.data);
|
||||||
|
}
|
||||||
|
);
|
||||||
},
|
},
|
||||||
handleUpload(uploadResources) {
|
handleUpload(uploadResources) {
|
||||||
let file = uploadResources.file;
|
let file = uploadResources.file;
|
||||||
uploadFileMeta(file, this.data).then(res => {
|
uploadFileMeta(file, this.data).then((res) => {
|
||||||
this.$success(this.$t('commons.save_success'));
|
this.$success(this.$t("commons.save_success"));
|
||||||
if (res.data && res.data.data) {
|
if (res.data && res.data.data) {
|
||||||
this.data = res.data.data;
|
this.data = res.data.data;
|
||||||
if (this.data.tags) {
|
if (this.data.tags) {
|
||||||
|
@ -291,12 +449,17 @@ export default {
|
||||||
},
|
},
|
||||||
getProjectFiles(before) {
|
getProjectFiles(before) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
getFileMetaPages(getCurrentProjectID(), this.currentPage, this.pageSize, this.condition).then(res => {
|
getFileMetaPages(
|
||||||
|
getCurrentProjectID(),
|
||||||
|
this.currentPage,
|
||||||
|
this.pageSize,
|
||||||
|
this.condition
|
||||||
|
).then((res) => {
|
||||||
let data = res.data;
|
let data = res.data;
|
||||||
let {itemCount, listObject} = data;
|
let { itemCount, listObject } = data;
|
||||||
this.total = itemCount;
|
this.total = itemCount;
|
||||||
this.results = listObject;
|
this.results = listObject;
|
||||||
this.results.forEach(item => {
|
this.results.forEach((item) => {
|
||||||
if (item.tags && item.tags.length > 0) {
|
if (item.tags && item.tags.length > 0) {
|
||||||
item.tags = JSON.parse(item.tags);
|
item.tags = JSON.parse(item.tags);
|
||||||
}
|
}
|
||||||
|
@ -310,7 +473,7 @@ export default {
|
||||||
},
|
},
|
||||||
beforeData() {
|
beforeData() {
|
||||||
this.showPanel = "baseInfo";
|
this.showPanel = "baseInfo";
|
||||||
const index = this.results.findIndex(e => e.id === this.data.id);
|
const index = this.results.findIndex((e) => e.id === this.data.id);
|
||||||
this.isFirst = index <= 0;
|
this.isFirst = index <= 0;
|
||||||
if (!this.isFirst) {
|
if (!this.isFirst) {
|
||||||
this.data = this.results[index - 1];
|
this.data = this.results[index - 1];
|
||||||
|
@ -342,8 +505,8 @@ export default {
|
||||||
},
|
},
|
||||||
nextData() {
|
nextData() {
|
||||||
this.showPanel = "baseInfo";
|
this.showPanel = "baseInfo";
|
||||||
const index = this.results.findIndex(e => e.id === this.data.id);
|
const index = this.results.findIndex((e) => e.id === this.data.id);
|
||||||
this.isLast = (this.results.length - 1) === index;
|
this.isLast = this.results.length - 1 === index;
|
||||||
if (!this.isLast) {
|
if (!this.isLast) {
|
||||||
this.data = this.results[index + 1];
|
this.data = this.results[index + 1];
|
||||||
} else {
|
} else {
|
||||||
|
@ -356,9 +519,9 @@ export default {
|
||||||
this.getProjectFiles(false);
|
this.getProjectFiles(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
@ -366,7 +529,7 @@ export default {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 320px;
|
height: 320px;
|
||||||
display: block;
|
display: block;
|
||||||
background: #407C51;
|
background: #407c51;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ms-edit-image:hover {
|
.ms-edit-image:hover {
|
||||||
|
@ -376,7 +539,7 @@ export default {
|
||||||
|
|
||||||
.ms-file-item {
|
.ms-file-item {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 140px
|
padding-top: 140px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-title {
|
.icon-title {
|
||||||
|
@ -385,7 +548,6 @@ export default {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.ms-file-item-input {
|
.ms-file-item-input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
@ -407,7 +569,7 @@ export default {
|
||||||
|
|
||||||
.ms-right-col {
|
.ms-right-col {
|
||||||
padding-top: 220px;
|
padding-top: 220px;
|
||||||
margin-left: 10px
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ms-header-menu {
|
.ms-header-menu {
|
||||||
|
|
|
@ -1,94 +1,155 @@
|
||||||
<template>
|
<template>
|
||||||
<div v-loading="result.loading">
|
<div v-loading="result.loading">
|
||||||
<env-group-popover :env-map="projectEnvMap"
|
<env-group-popover
|
||||||
:project-ids="projectIds"
|
:env-map="projectEnvMap"
|
||||||
@setProjectEnvMap="setProjectEnvMap"
|
:project-ids="projectIds"
|
||||||
:environment-type.sync="environmentType"
|
@setProjectEnvMap="setProjectEnvMap"
|
||||||
:group-id="envGroupId"
|
:environment-type.sync="environmentType"
|
||||||
:is-scenario="false"
|
:group-id="envGroupId"
|
||||||
@setEnvGroup="setEnvGroup"
|
:is-scenario="false"
|
||||||
:show-config-button-with-out-permission="showConfigButtonWithOutPermission"
|
@setEnvGroup="setEnvGroup"
|
||||||
:project-list="projectList"
|
:show-config-button-with-out-permission="
|
||||||
ref="envPopover" class="env-popover"/>
|
showConfigButtonWithOutPermission
|
||||||
|
"
|
||||||
|
:project-list="projectList"
|
||||||
|
ref="envPopover"
|
||||||
|
class="env-popover"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<mx-version-select
|
||||||
<mx-version-select v-xpack :project-id="projectId" @changeVersion="changeVersion" style="float: left;"
|
v-xpack
|
||||||
class="search-input"/>
|
:project-id="projectId"
|
||||||
|
@changeVersion="changeVersion"
|
||||||
|
style="float: left"
|
||||||
|
class="search-input"
|
||||||
|
/>
|
||||||
<ms-search
|
<ms-search
|
||||||
:base-search-tip="$t('api_test.definition.request.select_case')"
|
:base-search-tip="$t('api_test.definition.request.select_case')"
|
||||||
:condition.sync="condition"
|
:condition.sync="condition"
|
||||||
style="margin-top: 10px"
|
style="margin-top: 10px"
|
||||||
@search="filterSearch">
|
@search="filterSearch"
|
||||||
|
>
|
||||||
</ms-search>
|
</ms-search>
|
||||||
<ms-table ref="scenarioTable"
|
<ms-table
|
||||||
v-loading="result.loading"
|
ref="scenarioTable"
|
||||||
:data="tableData"
|
v-loading="result.loading"
|
||||||
:condition="condition"
|
:data="tableData"
|
||||||
:page-size="pageSize"
|
:condition="condition"
|
||||||
:total="total"
|
:page-size="pageSize"
|
||||||
:remember-order="true"
|
:total="total"
|
||||||
row-key="id"
|
:remember-order="true"
|
||||||
:row-order-group-id="projectId"
|
row-key="id"
|
||||||
@order="search"
|
:row-order-group-id="projectId"
|
||||||
@filter="filterSearch"
|
@order="search"
|
||||||
:disable-header-config="true"
|
@filter="filterSearch"
|
||||||
@selectCountChange="selectCountChange">
|
:disable-header-config="true"
|
||||||
|
@selectCountChange="selectCountChange"
|
||||||
<el-table-column v-if="!customNum" prop="num" label="ID" sortable="custom"
|
>
|
||||||
show-overflow-tooltip>
|
<el-table-column
|
||||||
|
v-if="!customNum"
|
||||||
|
prop="num"
|
||||||
|
label="ID"
|
||||||
|
sortable="custom"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-if="customNum" prop="customNum" label="ID" sortable="custom"
|
<el-table-column
|
||||||
show-overflow-tooltip>
|
v-if="customNum"
|
||||||
|
prop="customNum"
|
||||||
|
label="ID"
|
||||||
|
sortable="custom"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="name" :label="$t('api_test.automation.scenario_name')" sortable="custom" min-width="100px"
|
<el-table-column
|
||||||
show-overflow-tooltip/>
|
prop="name"
|
||||||
|
:label="$t('api_test.automation.scenario_name')"
|
||||||
|
sortable="custom"
|
||||||
|
min-width="100px"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="versionEnable"
|
v-if="versionEnable"
|
||||||
column-key="version_id"
|
column-key="version_id"
|
||||||
:filters="versionFilters"
|
:filters="versionFilters"
|
||||||
:label="$t('commons.version')"
|
:label="$t('commons.version')"
|
||||||
min-width="100px">
|
min-width="100px"
|
||||||
|
>
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<span>{{ scope.row.versionName }}</span>
|
<span>{{ scope.row.versionName }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="level" :label="$t('api_test.automation.case_level')" sortable="custom" min-width="100px"
|
<el-table-column
|
||||||
show-overflow-tooltip>
|
prop="level"
|
||||||
|
:label="$t('api_test.automation.case_level')"
|
||||||
|
sortable="custom"
|
||||||
|
min-width="100px"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<priority-table-item :value="scope.row.level" ref="level"/>
|
<priority-table-item :value="scope.row.level" ref="level" />
|
||||||
</template>
|
|
||||||
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="tagNames" :label="$t('api_test.automation.tag')" min-width="100">
|
|
||||||
<template v-slot:default="scope">
|
|
||||||
<ms-tag v-for="itemName in scope.row.tags" :key="itemName" type="success" effect="plain" :content="itemName"
|
|
||||||
style="margin-left: 0px; margin-right: 2px"/>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="userId" :label="$t('api_test.automation.creator')" show-overflow-tooltip sortable="custom"
|
<el-table-column
|
||||||
min-width="100px"/>
|
prop="tagNames"
|
||||||
<el-table-column prop="updateTime" :label="$t('commons.update_time')" width="180" sortable="custom">
|
:label="$t('api_test.automation.tag')"
|
||||||
|
min-width="100"
|
||||||
|
>
|
||||||
|
<template v-slot:default="scope">
|
||||||
|
<ms-tag
|
||||||
|
v-for="itemName in scope.row.tags"
|
||||||
|
:key="itemName"
|
||||||
|
type="success"
|
||||||
|
effect="plain"
|
||||||
|
:content="itemName"
|
||||||
|
style="margin-left: 0px; margin-right: 2px"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="userId"
|
||||||
|
:label="$t('api_test.automation.creator')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
min-width="100px"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="updateTime"
|
||||||
|
:label="$t('commons.update_time')"
|
||||||
|
width="180"
|
||||||
|
sortable="custom"
|
||||||
|
>
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<span>{{ scope.row.updateTime | datetimeFormat }}</span>
|
<span>{{ scope.row.updateTime | datetimeFormat }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="stepTotal" :label="$t('api_test.automation.step')" show-overflow-tooltip/>
|
<el-table-column
|
||||||
<el-table-column prop="lastResult" :label="$t('api_test.automation.last_result')" sortable="custom">
|
prop="stepTotal"
|
||||||
<template v-slot:default="{row}">
|
:label="$t('api_test.automation.step')"
|
||||||
<el-link type="success" @click="showReport(row)" v-if="row.lastResult === 'Success'">
|
show-overflow-tooltip
|
||||||
{{ $t('api_test.automation.success') }}
|
/>
|
||||||
</el-link>
|
<el-table-column
|
||||||
<el-link type="danger" @click="showReport(row)" v-if="row.lastResult === 'Fail'">
|
prop="lastResult"
|
||||||
{{ $t('api_test.automation.fail') }}
|
:label="$t('api_test.automation.last_result')"
|
||||||
</el-link>
|
sortable="custom"
|
||||||
|
>
|
||||||
|
<template v-slot:default="{ row }">
|
||||||
|
<ms-api-report-status :status="row.lastResult" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="passRate" :label="$t('api_test.automation.passing_rate')"
|
<el-table-column
|
||||||
show-overflow-tooltip/>
|
prop="passRate"
|
||||||
|
:label="$t('api_test.automation.passing_rate')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
</ms-table>
|
</ms-table>
|
||||||
<ms-table-pagination :change="search" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
<ms-table-pagination
|
||||||
:total="total"/>
|
:change="search"
|
||||||
|
:current-page.sync="currentPage"
|
||||||
|
:page-size.sync="pageSize"
|
||||||
|
:total="total"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -100,20 +161,26 @@ import MsTag from "metersphere-frontend/src/components/MsTag";
|
||||||
import TestPlanScenarioListHeader from "./TestPlanScenarioListHeader";
|
import TestPlanScenarioListHeader from "./TestPlanScenarioListHeader";
|
||||||
import PriorityTableItem from "@/business/common/tableItems/planview/PriorityTableItem";
|
import PriorityTableItem from "@/business/common/tableItems/planview/PriorityTableItem";
|
||||||
import MsTableAdvSearchBar from "metersphere-frontend/src/components/search/MsTableAdvSearchBar";
|
import MsTableAdvSearchBar from "metersphere-frontend/src/components/search/MsTableAdvSearchBar";
|
||||||
import {TEST_PLAN_RELEVANCE_API_SCENARIO_CONFIGS} from "metersphere-frontend/src/components/search/search-components";
|
import { TEST_PLAN_RELEVANCE_API_SCENARIO_CONFIGS } from "metersphere-frontend/src/components/search/search-components";
|
||||||
import {ENV_TYPE} from "metersphere-frontend/src/utils/constants";
|
import { ENV_TYPE } from "metersphere-frontend/src/utils/constants";
|
||||||
import MsTable from "metersphere-frontend/src/components/table/MsTable";
|
import MsTable from "metersphere-frontend/src/components/table/MsTable";
|
||||||
import MsSearch from "metersphere-frontend/src/components/search/MsSearch";
|
import MsSearch from "metersphere-frontend/src/components/search/MsSearch";
|
||||||
import {getOwnerProjects, getVersionFilters} from "@/business/utils/sdk-utils";
|
import {
|
||||||
|
getOwnerProjects,
|
||||||
|
getVersionFilters,
|
||||||
|
} from "@/business/utils/sdk-utils";
|
||||||
import MxVersionSelect from "metersphere-frontend/src/components/version/MxVersionSelect";
|
import MxVersionSelect from "metersphere-frontend/src/components/version/MxVersionSelect";
|
||||||
import {getProjectApplicationConfig} from "@/api/project-application";
|
import { getProjectApplicationConfig } from "@/api/project-application";
|
||||||
import {getApiScenarioEnvByProjectId} from "@/api/remote/api/api-automation";
|
import { getApiScenarioEnvByProjectId } from "@/api/remote/api/api-automation";
|
||||||
import {scenarioRelevanceList} from "@/api/remote/plan/test-plan-scenario";
|
import { scenarioRelevanceList } from "@/api/remote/plan/test-plan-scenario";
|
||||||
import EnvGroupPopover from "@/business/plan/env/EnvGroupPopover";
|
import EnvGroupPopover from "@/business/plan/env/EnvGroupPopover";
|
||||||
|
import ApiReportStatus from "@/business/plan/view/comonents/report/detail/api/ApiReportStatus";
|
||||||
|
import MsApiReportStatus from "@/business/plan/view/comonents/report/detail/api/ApiReportStatus";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RelevanceScenarioList",
|
name: "RelevanceScenarioList",
|
||||||
components: {
|
components: {
|
||||||
|
MsApiReportStatus,
|
||||||
EnvGroupPopover,
|
EnvGroupPopover,
|
||||||
MsTable,
|
MsTable,
|
||||||
PriorityTableItem,
|
PriorityTableItem,
|
||||||
|
@ -124,7 +191,7 @@ export default {
|
||||||
// MsApiReportDetail,
|
// MsApiReportDetail,
|
||||||
MsTableAdvSearchBar,
|
MsTableAdvSearchBar,
|
||||||
MxVersionSelect,
|
MxVersionSelect,
|
||||||
MsSearch
|
MsSearch,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
referenced: {
|
referenced: {
|
||||||
|
@ -135,13 +202,14 @@ export default {
|
||||||
projectId: String,
|
projectId: String,
|
||||||
planId: String,
|
planId: String,
|
||||||
versionEnable: Boolean,
|
versionEnable: Boolean,
|
||||||
|
ApiReportStatus,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
result: {},
|
result: {},
|
||||||
showConfigButtonWithOutPermission: false,
|
showConfigButtonWithOutPermission: false,
|
||||||
condition: {
|
condition: {
|
||||||
components: TEST_PLAN_RELEVANCE_API_SCENARIO_CONFIGS
|
components: TEST_PLAN_RELEVANCE_API_SCENARIO_CONFIGS,
|
||||||
},
|
},
|
||||||
currentScenario: {},
|
currentScenario: {},
|
||||||
schedule: {},
|
schedule: {},
|
||||||
|
@ -165,7 +233,7 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
ENV_TYPE() {
|
ENV_TYPE() {
|
||||||
return ENV_TYPE;
|
return ENV_TYPE;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
selectNodeIds() {
|
selectNodeIds() {
|
||||||
|
@ -173,7 +241,7 @@ export default {
|
||||||
},
|
},
|
||||||
projectId() {
|
projectId() {
|
||||||
this.condition = {
|
this.condition = {
|
||||||
components: TEST_PLAN_RELEVANCE_API_SCENARIO_CONFIGS
|
components: TEST_PLAN_RELEVANCE_API_SCENARIO_CONFIGS,
|
||||||
};
|
};
|
||||||
this.selectNodeIds.length = 0;
|
this.selectNodeIds.length = 0;
|
||||||
this.search();
|
this.search();
|
||||||
|
@ -201,7 +269,9 @@ export default {
|
||||||
if (this.condition.filters) {
|
if (this.condition.filters) {
|
||||||
this.condition.filters.status = ["Prepare", "Underway", "Completed"];
|
this.condition.filters.status = ["Prepare", "Underway", "Completed"];
|
||||||
} else {
|
} else {
|
||||||
this.condition.filters = {status: ["Prepare", "Underway", "Completed"]};
|
this.condition.filters = {
|
||||||
|
status: ["Prepare", "Underway", "Completed"],
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
this.condition.moduleIds = this.selectNodeIds;
|
this.condition.moduleIds = this.selectNodeIds;
|
||||||
|
@ -214,18 +284,20 @@ export default {
|
||||||
this.condition.planId = this.planId;
|
this.condition.planId = this.planId;
|
||||||
}
|
}
|
||||||
this.condition.stepTotal = "testPlan";
|
this.condition.stepTotal = "testPlan";
|
||||||
scenarioRelevanceList({pageNum: this.currentPage, pageSize: this.pageSize}, this.condition)
|
scenarioRelevanceList(
|
||||||
.then(response => {
|
{ pageNum: this.currentPage, pageSize: this.pageSize },
|
||||||
let data = response.data;
|
this.condition
|
||||||
this.total = data.itemCount;
|
).then((response) => {
|
||||||
this.tableData = data.listObject;
|
let data = response.data;
|
||||||
this.tableData.forEach(item => {
|
this.total = data.itemCount;
|
||||||
if (item.tags && item.tags.length > 0) {
|
this.tableData = data.listObject;
|
||||||
item.tags = JSON.parse(item.tags);
|
this.tableData.forEach((item) => {
|
||||||
}
|
if (item.tags && item.tags.length > 0) {
|
||||||
});
|
item.tags = JSON.parse(item.tags);
|
||||||
this.clear();
|
}
|
||||||
});
|
});
|
||||||
|
this.clear();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
clear() {
|
clear() {
|
||||||
this.selectRows.clear();
|
this.selectRows.clear();
|
||||||
|
@ -237,34 +309,33 @@ export default {
|
||||||
this.envGroupId = id;
|
this.envGroupId = id;
|
||||||
},
|
},
|
||||||
getWsProjects() {
|
getWsProjects() {
|
||||||
getOwnerProjects()
|
getOwnerProjects().then((res) => {
|
||||||
.then(res => {
|
this.projectList = res.data;
|
||||||
this.projectList = res.data;
|
});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
getProject(projectId) {
|
getProject(projectId) {
|
||||||
if (projectId) {
|
if (projectId) {
|
||||||
getProjectApplicationConfig(projectId, 'SCENARIO_CUSTOM_NUM')
|
getProjectApplicationConfig(projectId, "SCENARIO_CUSTOM_NUM").then(
|
||||||
.then(result => {
|
(result) => {
|
||||||
let data = result.data;
|
let data = result.data;
|
||||||
if (data && data.typeValue === 'true') {
|
if (data && data.typeValue === "true") {
|
||||||
this.customNum = true;
|
this.customNum = true;
|
||||||
} else {
|
} else {
|
||||||
this.customNum = false;
|
this.customNum = false;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
initProjectIds() {
|
initProjectIds() {
|
||||||
this.projectIds.clear();
|
this.projectIds.clear();
|
||||||
this.map.clear();
|
this.map.clear();
|
||||||
this.selectRows.forEach(row => {
|
this.selectRows.forEach((row) => {
|
||||||
getApiScenarioEnvByProjectId(row.id)
|
getApiScenarioEnvByProjectId(row.id).then((res) => {
|
||||||
.then(res => {
|
let data = res.data;
|
||||||
let data = res.data;
|
data.projectIds.forEach((d) => this.projectIds.add(d));
|
||||||
data.projectIds.forEach(d => this.projectIds.add(d));
|
this.map.set(row.id, data.projectIds);
|
||||||
this.map.set(row.id, data.projectIds);
|
});
|
||||||
});
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
checkEnv() {
|
checkEnv() {
|
||||||
|
@ -275,8 +346,9 @@ export default {
|
||||||
this.search();
|
this.search();
|
||||||
},
|
},
|
||||||
getVersionOptions() {
|
getVersionOptions() {
|
||||||
getVersionFilters(this.projectId)
|
getVersionFilters(this.projectId).then(
|
||||||
.then(r => this.versionFilters = r.data);
|
(r) => (this.versionFilters = r.data)
|
||||||
|
);
|
||||||
},
|
},
|
||||||
filter(field) {
|
filter(field) {
|
||||||
this.condition.filters = field || null;
|
this.condition.filters = field || null;
|
||||||
|
@ -286,8 +358,8 @@ export default {
|
||||||
this.selectRows = this.$refs.scenarioTable.selectRows;
|
this.selectRows = this.$refs.scenarioTable.selectRows;
|
||||||
this.initProjectIds();
|
this.initProjectIds();
|
||||||
this.$emit("selectCountChange", data);
|
this.$emit("selectCountChange", data);
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue