update 项目文件、所有任务增加重命名
This commit is contained in:
@@ -158,17 +158,24 @@ const defaultActionList = computed(() => [
|
||||
{
|
||||
title: '刷新',
|
||||
type: 'primary',
|
||||
click: () => fileTableRef.value.resetFun(),
|
||||
click: () => refreshFun(),
|
||||
},
|
||||
]
|
||||
: []),
|
||||
]);
|
||||
const emit = defineEmits(['refresh']);
|
||||
|
||||
const refreshFun = () => {
|
||||
fileTableRef.value.resetFun();
|
||||
emit('refresh');
|
||||
};
|
||||
|
||||
const deleteFileFun = async (id: number) => {
|
||||
const res: any = await dataDelFileApi({ delFileId: id });
|
||||
if (res.code === 200) {
|
||||
ElMessage.success('删除成功');
|
||||
fileTableRef.value.resetFun();
|
||||
emit('refresh');
|
||||
}
|
||||
};
|
||||
// 展示的操作栏
|
||||
@@ -192,6 +199,7 @@ const renameFun = (id: any, row: any) => {
|
||||
const renameFinishFun = () => {
|
||||
// 刷新数据
|
||||
fileTableRef.value.resetFun();
|
||||
emit('refresh');
|
||||
};
|
||||
// #endregion
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="task-performance-page">
|
||||
<div class="task-img-box">
|
||||
<DragUploader :disabled="!canUpdate" @beforeUpload="beforeUploadFun">
|
||||
<BaseTable
|
||||
<FileTable
|
||||
tableName="TASK_IMAGE_FILE"
|
||||
ref="baseTableRef"
|
||||
v-model:viewType="viewType"
|
||||
@@ -10,6 +10,7 @@
|
||||
:params="apiParam"
|
||||
:show-checkbox="showCheckbox"
|
||||
:actionList="actionList"
|
||||
:defaultActions="canUpdate && showLeftOptions ? ['rename', 'refresh'] : ['refresh']"
|
||||
:full-height="true"
|
||||
>
|
||||
<template v-if="showLeftOptions" #leftOptions>
|
||||
@@ -60,7 +61,7 @@
|
||||
<template #fileSize="{ row }">
|
||||
<span>{{ row.formatFileSize }}</span>
|
||||
</template>
|
||||
</BaseTable>
|
||||
</FileTable>
|
||||
</DragUploader>
|
||||
</div>
|
||||
|
||||
@@ -81,6 +82,7 @@ import {
|
||||
queryFileIdByNodeIdFun,
|
||||
} from '@/utils/file';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import FileTable from '@/components/common/fileTable/index.vue';
|
||||
import FilePreview from '@/components/common/filePreview/index.vue';
|
||||
import AddFile from '@/components/common/addFile/index.vue';
|
||||
import ImageCard from './imageCard.vue';
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<template>
|
||||
<div class="task-performance-page">
|
||||
<DragUploader :disabled="!canUpdate" @beforeUpload="beforeUploadFun">
|
||||
<BaseTable
|
||||
<FileTable
|
||||
tableName="TASK_REPORT"
|
||||
:api="getSimulationTaskFileApi"
|
||||
:params="apiParam"
|
||||
ref="baseTableRef"
|
||||
:showCheckbox="showCheckbox"
|
||||
:actionList="actionList"
|
||||
:defaultActions="canUpdate && showLeftOptions ? ['rename', 'refresh'] : ['refresh']"
|
||||
>
|
||||
<template v-if="showLeftOptions" #leftOptions>
|
||||
<AddFile
|
||||
@@ -36,7 +37,7 @@
|
||||
<template #fileSize="{ row }">
|
||||
<span>{{ formatFileSize(row.fileSize) }}</span>
|
||||
</template>
|
||||
</BaseTable>
|
||||
</FileTable>
|
||||
</DragUploader>
|
||||
<FilePreview v-model="previewVisible" :fileId="currentRow?.id" :noAuth="noAuth" />
|
||||
</div>
|
||||
@@ -45,6 +46,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch } from 'vue';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import FileTable from '@/components/common/fileTable/index.vue';
|
||||
import { batchAddFileInfoForTaskApi } from '@/api/project/run';
|
||||
import {
|
||||
downloadFileById,
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<template>
|
||||
<div class="task-performance-page">
|
||||
<DragUploader :disabled="!canUpdate" @beforeUpload="beforeUploadFun">
|
||||
<BaseTable
|
||||
<FileTable
|
||||
tableName="TASK_MODEL_FILE"
|
||||
ref="baseTableRef"
|
||||
:api="getSimulationTaskFileApi"
|
||||
:showCheckbox="showCheckbox"
|
||||
:params="apiParam"
|
||||
:actionList="actionList"
|
||||
:defaultActions="canUpdate ? ['rename', 'refresh'] : ['refresh']"
|
||||
>
|
||||
<template v-if="showLeftOptions" #leftOptions>
|
||||
<AddFile
|
||||
@@ -40,7 +41,7 @@
|
||||
<template #fileType="{ row }">
|
||||
<fileTypeChange :id="row.id" v-model="row.fileType" :disabled="disabled"></fileTypeChange>
|
||||
</template>
|
||||
</BaseTable>
|
||||
</FileTable>
|
||||
</DragUploader>
|
||||
<FilePreview v-model="previewVisible" :fileId="currentRow?.id" :noAuth="noAuth" />
|
||||
</div>
|
||||
@@ -49,6 +50,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch } from 'vue';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import FileTable from '@/components/common/fileTable/index.vue';
|
||||
import { batchAddFileInfoForTaskApi } from '@/api/project/run';
|
||||
import FilePreview from '@/components/common/filePreview/index.vue';
|
||||
import AddFile from '@/components/common/addFile/index.vue';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="task-performance-page">
|
||||
<div class="task-curve-page-left">
|
||||
<DragUploader :disabled="!canUpdate" @beforeUpload="beforeUploadFun">
|
||||
<BaseTable
|
||||
<FileTable
|
||||
tableName="TASK_CANVAS_FILE"
|
||||
ref="baseTableRef"
|
||||
:api="getSimulationTaskFileApi"
|
||||
@@ -10,6 +10,7 @@
|
||||
:show-checkbox="showCheckbox"
|
||||
:full-height="true"
|
||||
:actionList="actionList"
|
||||
:defaultActions="canUpdate && showLeftOptions ? ['rename', 'refresh'] : ['refresh']"
|
||||
>
|
||||
<template v-if="showLeftOptions" #leftOptions>
|
||||
<AddFile
|
||||
@@ -44,7 +45,7 @@
|
||||
<!-- <template #num="{ row, column }">
|
||||
图 <el-input class="w50" v-model="row[column.field]"></el-input>
|
||||
</template> -->
|
||||
</BaseTable>
|
||||
</FileTable>
|
||||
</DragUploader>
|
||||
</div>
|
||||
|
||||
@@ -93,7 +94,8 @@ import { ref, onMounted, reactive, watch } from 'vue';
|
||||
import { batchAddFileInfoForTaskApi } from '@/api/project/run';
|
||||
import { initEcharts } from '../common/echartCard/echartsOptions';
|
||||
import { FILE_TYPE } from '@/utils/enum/file';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
// import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import FileTable from '@/components/common/fileTable/index.vue';
|
||||
import {
|
||||
downloadFileById,
|
||||
downloadFileByStream,
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<template>
|
||||
<div class="task-performance-page">
|
||||
<DragUploader :disabled="!canUpdate" @beforeUpload="beforeUploadFun">
|
||||
<BaseTable
|
||||
<FileTable
|
||||
tableName="TASK_MODEL_FILE"
|
||||
ref="baseTableRef"
|
||||
:api="getSimulationTaskFileApi"
|
||||
:showCheckbox="showCheckbox"
|
||||
:params="apiParam"
|
||||
:actionList="actionList"
|
||||
:defaultActions="canUpdate ? ['rename', 'refresh'] : ['refresh']"
|
||||
>
|
||||
<template v-if="showLeftOptions" #leftOptions>
|
||||
<AddFile
|
||||
@@ -36,7 +37,7 @@
|
||||
<template #fileSize="{ row }">
|
||||
<span>{{ formatFileSize(row.fileSize) }}</span>
|
||||
</template>
|
||||
</BaseTable>
|
||||
</FileTable>
|
||||
</DragUploader>
|
||||
<FilePreview v-model="previewVisible" :fileId="currentRow?.id" :noAuth="noAuth" />
|
||||
</div>
|
||||
@@ -45,6 +46,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch } from 'vue';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import FileTable from '@/components/common/fileTable/index.vue';
|
||||
import { batchAddFileInfoForTaskApi } from '@/api/project/run';
|
||||
import FilePreview from '@/components/common/filePreview/index.vue';
|
||||
import AddFile from '@/components/common/addFile/index.vue';
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<template>
|
||||
<div class="task-performance-page">
|
||||
<DragUploader :disabled="!canUpdate" @beforeUpload="beforeUploadFun">
|
||||
<BaseTable
|
||||
<FileTable
|
||||
tableName="TASK_REPORT"
|
||||
:api="getSimulationTaskFileApi"
|
||||
:params="apiParam"
|
||||
ref="baseTableRef"
|
||||
:showCheckbox="showCheckbox"
|
||||
:actionList="actionList"
|
||||
:defaultActions="canUpdate ? ['rename', 'refresh'] : ['refresh']"
|
||||
>
|
||||
<template v-if="showLeftOptions" #leftOptions>
|
||||
<!-- <el-button v-if="canUpdate" @click="reportInpDiaShow = true">编辑报告</el-button> -->
|
||||
@@ -37,7 +38,7 @@
|
||||
<template #fileSize="{ row }">
|
||||
<span>{{ formatFileSize(row.fileSize) }}</span>
|
||||
</template>
|
||||
</BaseTable>
|
||||
</FileTable>
|
||||
</DragUploader>
|
||||
<FilePreview v-model="previewVisible" :fileId="currentRow?.id" :noAuth="noAuth" />
|
||||
<ReportInputDialog v-model="reportInpDiaShow" :taskId="taskId" />
|
||||
@@ -47,6 +48,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch } from 'vue';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import FileTable from '@/components/common/fileTable/index.vue';
|
||||
import { batchAddFileInfoForTaskApi } from '@/api/project/run';
|
||||
import {
|
||||
downloadFileById,
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<template>
|
||||
<div class="task-performance-page">
|
||||
<DragUploader :disabled="!canUpdate" @beforeUpload="beforeUploadFun">
|
||||
<BaseTable
|
||||
<FileTable
|
||||
tableName="TASK_REPORT"
|
||||
:api="getSimulationTaskFileApi"
|
||||
:params="apiParam"
|
||||
ref="baseTableRef"
|
||||
:showCheckbox="showCheckbox"
|
||||
:actionList="actionList"
|
||||
:defaultActions="canUpdate && showLeftOptions ? ['rename', 'refresh'] : ['refresh']"
|
||||
>
|
||||
<template v-if="showLeftOptions" #leftOptions>
|
||||
<AddFile
|
||||
@@ -36,7 +37,7 @@
|
||||
<template #fileSize="{ row }">
|
||||
<span>{{ formatFileSize(row.fileSize) }}</span>
|
||||
</template>
|
||||
</BaseTable>
|
||||
</FileTable>
|
||||
</DragUploader>
|
||||
<FilePreview v-model="previewVisible" :fileId="currentRow?.id" :noAuth="noAuth" />
|
||||
</div>
|
||||
@@ -45,6 +46,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch } from 'vue';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import FileTable from '@/components/common/fileTable/index.vue';
|
||||
import { batchAddFileInfoForTaskApi } from '@/api/project/run';
|
||||
import {
|
||||
downloadFileById,
|
||||
|
||||
@@ -131,18 +131,20 @@
|
||||
height="70%"
|
||||
@close="diaVisible = false"
|
||||
>
|
||||
<BaseTable
|
||||
<FileTable
|
||||
ref="baseFileTableRef"
|
||||
table-name="RUN_RESULT_FILE_TABLE"
|
||||
:data="tableData"
|
||||
:hide-pagination="true"
|
||||
:full-height="true"
|
||||
:action-list="fileActionList"
|
||||
:defaultActions="['rename', 'refresh']"
|
||||
@refresh="refreshFun"
|
||||
>
|
||||
<template #fileSize="{ row }">
|
||||
<span>{{ formatFileSize(row.fileSize) }}</span>
|
||||
</template>
|
||||
</BaseTable>
|
||||
</FileTable>
|
||||
</Dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -150,6 +152,7 @@
|
||||
<script setup lang="ts">
|
||||
import { nextTick, onMounted, ref, watch } from 'vue';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import FileTable from '@/components/common/fileTable/index.vue';
|
||||
import TableForm from '@/components/common/table/tableForm.vue';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import {
|
||||
@@ -287,6 +290,11 @@ const showfileTableFun = async (ids: any) => {
|
||||
// });
|
||||
};
|
||||
|
||||
const refreshFun = () => {
|
||||
console.log('refresh');
|
||||
showfileTableFun(fileIds.value.join(','));
|
||||
};
|
||||
|
||||
const resultInfo = ref<any>({});
|
||||
const attachmentFileList = ref<any>([]);
|
||||
const actionList = ref([
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="project-file">
|
||||
<BaseTable
|
||||
<FileTable
|
||||
showIndex
|
||||
tableName="NODE_DETAIL_FILE"
|
||||
ref="tableRef"
|
||||
@@ -8,6 +8,7 @@
|
||||
:params="searchParams"
|
||||
:api="dataQueryDirApiWithDirId"
|
||||
:actionList="actionList"
|
||||
:defaultActions="freeze ? ['refresh'] : ['rename', 'refresh']"
|
||||
>
|
||||
<template #leftOptions>
|
||||
<el-button :disabled="freeze" icon="plus" @click="openDialog('add')" type="primary">
|
||||
@@ -38,7 +39,7 @@
|
||||
<template #fileSize="{ row }">
|
||||
{{ formatFileSize(row.fileSize) }}
|
||||
</template>
|
||||
</BaseTable>
|
||||
</FileTable>
|
||||
<Dialog
|
||||
v-model="dialogVisible"
|
||||
:diaTitle="isEditDialog ? '编辑' : '上传文件'"
|
||||
@@ -64,6 +65,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import FileTable from '@/components/common/fileTable/index.vue';
|
||||
import Dialog from '@/components/common/dialog/index.vue';
|
||||
import { onBeforeUnmount, onMounted, ref } from 'vue';
|
||||
import {
|
||||
|
||||
Reference in New Issue
Block a user