EP需求附件功能开发

This commit is contained in:
weibl
2026-01-21 09:25:57 +08:00
parent 38567acc43
commit c4af6ea389

View File

@@ -12,7 +12,7 @@
showIndex
tableName="DEMAND_ATTACHMENT"
:params="{ uuid: demandId }"
:api="dataQueryDirApi"
:api="queryDemandFilesApi"
:searchLimitNum="3"
:actionList="actionList"
fullHeight
@@ -38,13 +38,14 @@
import { computed, ref } from 'vue';
import BaseTable from '@/components/common/table/baseTable.vue';
import Dialog from '@/components/common/dialog/index.vue';
import { dataDelFileApi, dataQueryDirApi } from '@/api/data/data';
import { dataDelFileApi } from '@/api/data/data';
import { formatFileSize } from '@/utils/file';
import { ElMessage } from 'element-plus';
import { downloadFileById } from '@/utils/file';
import { useDict } from '@/utils/useDict';
import FilePreview from '@/components/common/filePreview/index.vue';
import { useI18n } from 'vue-i18n';
import { queryDemandFilesApi } from '@/api/project/demand';
const { t } = useI18n();
@@ -52,6 +53,7 @@ const actionList = ref([
{
title: t('通用.预览'),
type: 'primary',
hide: (row: any) => row.fileResource === 'EP',
click: (row: any) => {
reviewFile(row.id);
},
@@ -60,7 +62,11 @@ const actionList = ref([
title: t('通用.下载'),
type: 'primary',
click: (row: any) => {
downloadFile(row);
if (row.fileResource === 'EP') {
window.open(row.fileUrl, '_blank');
} else {
downloadFile(row);
}
},
},
{
@@ -68,6 +74,7 @@ const actionList = ref([
needConfirm: true,
confirmTip: t('通用.确认删除吗'),
type: 'danger',
hide: (row: any) => row.fileResource === 'EP',
click: (row: any) => {
deleteFileFun(row.id);
},