zhengyiming
5 天以前 0b73bba28e2a8473ab71f5c8b4760c1995ff4fc1
src/components/commonView/FourStreamsBatchMaterialFileDialog.vue
@@ -53,6 +53,8 @@
} 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',
@@ -62,10 +64,13 @@
  name?: string;
  zipName?: string;
  showDeleteBtn?: boolean;
  showMaterialExtraFileDeleteBtn?: boolean;
  fileSearchTypeId?: string;
};
const props = withDefaults(defineProps<Props>(), {
  showDeleteBtn: true,
  showMaterialExtraFileDeleteBtn: false,
});
const visible = defineModel<boolean>('visible');
@@ -120,7 +125,13 @@
      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;
        }
      },
    },
  },
]);