feat(测试跟踪): 本地附件转存文件库排除掉第三方存储库模块

--bug=1033078 --user=宋昌昌 【测试跟踪&接口测试】用例中上传本地文件的附件,该附件可以选择转存到第三方仓库,实际转存失败 https://www.tapd.cn/55049933/s/1446223
This commit is contained in:
song-cc-rock 2023-12-20 16:29:13 +08:00 committed by 刘瑞斌
parent 8b04686ad1
commit 900b443886
2 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<el-dialog <el-dialog
:title="this.$t('test_track.case.select_catalog')" :title="this.$t('test_track.case.dump_module')"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
:before-close="close" :before-close="close"
:destroy-on-close="true" :destroy-on-close="true"
@ -40,10 +40,10 @@
</template> </template>
<script> <script>
import { getFileModules } from 'metersphere-frontend/src/api/file-metadata'; import {getFileModules} from 'metersphere-frontend/src/api/file-metadata';
import MsDialogFooter from 'metersphere-frontend/src/components/MsDialogFooter'; import MsDialogFooter from 'metersphere-frontend/src/components/MsDialogFooter';
import { buildTree } from 'metersphere-frontend/src/model/NodeTree'; import {buildTree} from 'metersphere-frontend/src/model/NodeTree';
import { getCurrentProjectID } from 'metersphere-frontend/src/utils/token'; import {getCurrentProjectID} from 'metersphere-frontend/src/utils/token';
export default { export default {
name: 'MsFileBatchMove', name: 'MsFileBatchMove',
@ -82,7 +82,7 @@ export default {
this.loading = true; this.loading = true;
this.result = getFileModules(getCurrentProjectID()).then((response) => { this.result = getFileModules(getCurrentProjectID()).then((response) => {
if (response.data != undefined && response.data != null) { if (response.data != undefined && response.data != null) {
this.treeNodes = response.data; this.treeNodes = response.data.filter(node => node['moduleType'] !== 'repository');
this.treeNodes.forEach((node) => { this.treeNodes.forEach((node) => {
node.name = node.name === 'DEF_MODULE' ? this.$t('commons.module_title') : node.name; node.name = node.name === 'DEF_MODULE' ? this.$t('commons.module_title') : node.name;
buildTree(node, { path: '' }); buildTree(node, { path: '' });

View File

@ -80,7 +80,7 @@ export default {
this.loading = true; this.loading = true;
this.result = getFileModules(getCurrentProjectID()).then(response => { this.result = getFileModules(getCurrentProjectID()).then(response => {
if (response.data !== undefined && response.data != null) { if (response.data !== undefined && response.data != null) {
this.treeNodes = response.data; this.treeNodes = response.data.filter(node => node['moduleType'] !== 'repository');
this.treeNodes.forEach(node => { this.treeNodes.forEach(node => {
node.name = node.name === 'DEF_MODULE' ? this.$t('commons.module_title') : node.name node.name = node.name === 'DEF_MODULE' ? this.$t('commons.module_title') : node.name
buildTree(node, {path: ''}); buildTree(node, {path: ''});