From b84a874aa91cf214ba8ff3fb0d314e0c703e1523 Mon Sep 17 00:00:00 2001 From: baiqi Date: Fri, 17 May 2024 14:43:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=20csv=E6=96=87=E4=BB=B6=E7=B1=BB=E5=9E=8B=E9=99=90=E5=88=B6&?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E6=AD=A5=E9=AA=A4=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ms-add-attachment/dropdownMenu.vue | 5 +- .../business/ms-add-attachment/index.vue | 12 +- .../ms-link-file/associatedFileDrawer.vue | 2 + .../business/ms-link-file/linkFileTable.vue | 13 +- .../views/api-test/components/paramTable.vue | 7 +- .../components/common/csvParamsTable.vue | 1 + .../components/common/customApiDrawer.vue | 1 + .../components/common/customCaseDrawer.vue | 1 + .../scenario/components/step/stepTree.vue | 263 ++++-------------- .../components/step/useStepNodeEdit.ts | 137 ++++++++- .../components/step/useStepOperation.ts | 1 + .../src/views/api-test/scenario/index.vue | 5 +- 12 files changed, 234 insertions(+), 214 deletions(-) diff --git a/frontend/src/components/business/ms-add-attachment/dropdownMenu.vue b/frontend/src/components/business/ms-add-attachment/dropdownMenu.vue index 7354dc6530..0b516c725a 100644 --- a/frontend/src/components/business/ms-add-attachment/dropdownMenu.vue +++ b/frontend/src/components/business/ms-add-attachment/dropdownMenu.vue @@ -8,7 +8,7 @@ @@ -218,7 +225,7 @@ import MsTag, { Size } from '@/components/pure/ms-tag/ms-tag.vue'; import MsTagsInput from '@/components/pure/ms-tags-input/index.vue'; import MsUpload from '@/components/pure/ms-upload/index.vue'; - import type { MsFileItem } from '@/components/pure/ms-upload/types'; + import type { MsFileItem, UploadType } from '@/components/pure/ms-upload/types'; import LinkFileDrawer from '@/components/business/ms-link-file/associatedFileDrawer.vue'; import dropdownMenu from './dropdownMenu.vue'; import saveAsFilePopover from './saveAsFilePopover.vue'; @@ -237,6 +244,7 @@ defineProps<{ disabled?: boolean; mode?: 'button' | 'input'; + accept?: UploadType; multiple?: boolean; inputClass?: string; inputSize?: 'small' | 'medium' | 'large' | 'mini'; diff --git a/frontend/src/components/business/ms-link-file/associatedFileDrawer.vue b/frontend/src/components/business/ms-link-file/associatedFileDrawer.vue index c823373f8e..9443f27088 100644 --- a/frontend/src/components/business/ms-link-file/associatedFileDrawer.vue +++ b/frontend/src/components/business/ms-link-file/associatedFileDrawer.vue @@ -73,6 +73,7 @@ :get-list-fun-params="props.getListFunParams" :selector-type="props.selectorType" :file-all-count-by-storage="fileAllCountByStorage" + :filetype="props.filetype" @init="handleModuleTableInit" /> @@ -105,6 +106,7 @@ getListRequest: (params: TableQueryParams) => Promise>; // 获取表格请求 getListFunParams: TableQueryParams; // 关联表去重id selectorType?: 'none' | 'checkbox' | 'radio'; + filetype?: string; }>(); const emit = defineEmits<{ diff --git a/frontend/src/components/business/ms-link-file/linkFileTable.vue b/frontend/src/components/business/ms-link-file/linkFileTable.vue index ba340d2302..a3af1b219f 100644 --- a/frontend/src/components/business/ms-link-file/linkFileTable.vue +++ b/frontend/src/components/business/ms-link-file/linkFileTable.vue @@ -6,7 +6,13 @@ >({{ moduleInfo.count }})
- + {{ t('common.all') }} {{ item }} @@ -91,6 +97,7 @@ getListFunParams: TableQueryParams; // 表格额外去重参数 selectorType?: 'none' | 'checkbox' | 'radio'; fileAllCountByStorage: number; + filetype?: string; }>(); const emit = defineEmits<{ (e: 'init', params: FileListQueryParams): void; @@ -98,7 +105,7 @@ }>(); const tableFileTypeOptions = ref([]); - const tableFileType = ref(''); // 文件格式筛选 + const tableFileType = ref(props.filetype || ''); // 文件格式筛选 const keyword = ref(''); const fileTypeLoading = ref(false); const fileType = ref('module'); // 当前查看的文件类型,模块/存储库 @@ -249,7 +256,7 @@ } else { res = await getFileTypes(appStore.currentProjectId); } - tableFileType.value = ''; + tableFileType.value = props.filetype || ''; tableFileTypeOptions.value = res; } catch (error) { // eslint-disable-next-line no-console diff --git a/frontend/src/views/api-test/components/paramTable.vue b/frontend/src/views/api-test/components/paramTable.vue index cae4df6abd..03ab67a5fb 100644 --- a/frontend/src/views/api-test/components/paramTable.vue +++ b/frontend/src/views/api-test/components/paramTable.vue @@ -260,6 +260,7 @@ id: 'fileId', name: 'fileAlias', }" + :accept="columnConfig.accept" :file-save-as-source-id="props.fileSaveAsSourceId" :file-save-as-api="props.fileSaveAsApi" :file-module-options-api="props.fileModuleOptionsApi" @@ -280,7 +281,7 @@ /> -