| | |
| | | } from '@bole-core/components'; |
| | | import { format, downloadFileByUrl, formatFileSize } from '@/utils'; |
| | | import { downloadWithZip, Message, isFileCanPreview } from '@bole-core/core'; |
| | | import { CustomerApplyFileTypeListItem, EnterpriseApplyFileUtils } from './utils'; |
| | | import { FourStreamsExtraMaterialFileSearchType, SearchType } from '@/constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'FourStreamsBatchMaterialFileDialog', |
| | |
| | | name?: string; |
| | | zipName?: string; |
| | | showDeleteBtn?: boolean; |
| | | showMaterialExtraFileDeleteBtn?: boolean; |
| | | fileSearchTypeId?: string; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | | showDeleteBtn: true, |
| | | showMaterialExtraFileDeleteBtn: false, |
| | | }); |
| | | |
| | | const visible = defineModel<boolean>('visible'); |
| | |
| | | onClick: (row) => handleDelete(row), |
| | | }, |
| | | extraProps: { |
| | | hide: (row) => !props.showDeleteBtn, |
| | | hide: (row: API.CustomerUploadMonthApplyFileTypeDto) => { |
| | | if (EnterpriseApplyFileUtils.isApplyUploadExtraFileSearchTypeId(props.fileSearchTypeId)) { |
| | | return !props.showMaterialExtraFileDeleteBtn; |
| | | } else { |
| | | return !props.showDeleteBtn; |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | ]); |