This commit is contained in:
2026-02-11 10:55:53 +08:00
15 changed files with 488 additions and 1417 deletions

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1770718385511" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="32167" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M569.664 352.896c130.986667 0 237.162667 106.176 237.162667 237.162667 0 130.986667-106.176 237.184-237.162667 237.184H213.909333v79.061333h355.754667c174.656 0 316.224-141.589333 316.224-316.245333 0-174.634667-141.568-316.224-316.224-316.224h-283.52l100.266667-100.245334-55.893334-55.893333L134.826667 313.386667l195.669333 195.669333 55.893333-55.893333-100.266666-100.245334h283.52z" fill="#1296db" p-id="32168"></path></svg>

After

Width:  |  Height:  |  Size: 764 B

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1770718220053" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21075" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M416.832 798.08c-16.192 0-32.32-6.208-44.672-18.56L119.424 525.76c-24.64-24.768-24.64-64.96 0-89.728 24.704-24.768 64.704-24.768 89.344 0l208.064 208.896L814.4 245.76c24.64-24.832 64.64-24.832 89.344 0 24.64 24.768 24.64 64.896 0 89.664L461.504 779.52c-12.352 12.352-28.544 18.56-44.672 18.56z" fill="#1AB394" p-id="21076"></path></svg>

After

Width:  |  Height:  |  Size: 670 B

View File

@@ -71,6 +71,7 @@
:loading="loading"
:data="tableData"
v-bind="$attrs"
highlight-hover-row
:seq-config="{ startIndex: (current - 1) * size }"
:column-config="{
drag: true,

View File

@@ -0,0 +1,216 @@
<template>
<div class="task-performance-page">
<DragUploader @beforeUpload="beforeUploadFun">
<BaseTable
tableName="TASK_REPORT"
:api="getSimulationTaskFilesApi"
:params="apiParam"
ref="baseTableRef"
:showCheckbox="true"
:actionList="actionList"
>
<template v-if="showLeftOptions" #leftOptions>
<AddFile
:accept="accept"
ref="AddFileRef"
:api="batchAddFileInfoForTaskApi"
:fileType="FILE_TYPE.REVIEW_FILE"
tableName="TASK_DETAIL_UPLOAD_FILE"
callbackFlag="TASK_REPORT_UPLOAD_FINISHED"
multiple
:discipline="taskData?.discipline"
:data="{
dirId: nodeFIleId,
projectId: null,
uuid: taskId,
}"
@finished="uploadFinishedFun"
>
<el-button>上传文件</el-button>
</AddFile>
<el-button class="ml12" type="primary" @click="downLoadFun">下载文件</el-button>
</template>
<template #type="{ row }">
<span>{{ getfileType(row) }}</span>
</template>
<template #fileSize="{ row }">
<span>{{ formatFileSize(row.fileSize) }}</span>
</template>
<template #operate="{ row }">
<el-button link type="primary">
<UploadFile v-model="row.id" :name="'下载'" />
</el-button>
</template>
</BaseTable>
</DragUploader>
<FilePreview v-model="previewVisible" :fileId="currentRow?.id" />
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, watch } from 'vue';
import BaseTable from '@/components/common/table/baseTable.vue';
import { batchAddFileInfoForTaskApi } from '@/api/project/run';
import {
downloadFileById,
downloadFileByStream,
formatFileSize,
queryFileIdByNodeIdFun,
} from '@/utils/file';
import UploadFile from '@/components/common/uploadFile/index.vue';
import FilePreview from '@/components/common/filePreview/index.vue';
import AddFile from '@/components/common/addFile/index.vue';
import { FILE_TYPE } from '@/utils/enum/file';
import { dataOverViewDeleteSimulationNodeFilesApi } from '@/api/data/dataOverView';
import { getSimulationTaskFilesApi } from '@/api/data/dataAnalysis';
import { NODE_TYPE } from '@/utils/enum/node';
import DragUploader from '@/components/common/dragUploader/index.vue';
const props = defineProps({
taskId: {
type: String,
default: '',
},
showFilter: {
type: Boolean,
default: true,
},
showLeftOptions: {
type: Boolean,
default: true,
},
taskData: {
type: Object,
default: () => ({}),
},
});
const baseTableRef = ref();
const currentId = ref<any>(props.taskId);
const taskRunList = ref<any>([]);
const nodeFIleId = ref<any>('');
const accept = ref<any>('');
// const env = import.meta.env;
// 获取任务下指标信息
const getTaskRunInfoFun = async () => {
taskRunList.value = [
{
name: '当前任务',
id: props.taskId,
},
];
currentId.value = taskRunList.value[0].id;
};
const getfileType = (data: any) => {
const fileType = data.originalName.split('.').pop();
return fileType;
};
const currentRow = ref();
const previewVisible = ref(false);
const previewFileFun = (row: any) => {
currentRow.value = row;
previewVisible.value = true;
};
const actionList = ref([
{
title: '下载',
type: 'primary',
click: (row: any) => {
downloadFileById(row.id);
},
},
{
title: '预览',
type: 'primary',
click: (row: any) => {
previewFileFun(row);
},
},
{
title: '删除',
type: 'danger',
needConfirm: true,
confirmTip: '删除后不可恢复,确认删除吗?',
click: (row: any) => {
deleteFun(row);
},
hide: () => {
return !props.showLeftOptions;
},
},
]);
const deleteFun = async (row: any) => {
const param = {
deleteId: row.id,
dataType: 2,
};
try {
const res: any = await dataOverViewDeleteSimulationNodeFilesApi(param);
if (res && res.code === 200) {
baseTableRef.value.resetFun();
}
} catch {}
};
const uploadFinishedFun = (data: any) => {
if (data.callbackFlag === 'TASK_REPORT_UPLOAD_FINISHED') {
baseTableRef.value.resetFun();
}
};
const downLoadFun = async () => {
const data: any = baseTableRef.value.tableRef.getCheckboxRecords() || [];
if (data.length) {
for (let i = 0; i < data.length; i++) {
downloadFileByStream(data[i].id);
}
}
};
const apiParam = ref<any>({});
watch(
() => props.taskId,
(newVal) => {
if (newVal) {
apiParam.value = {
uuid: currentId,
fileBizType: FILE_TYPE.REVIEW_FILE,
fileName: '',
startTime: '',
endTime: '',
level: NODE_TYPE.TASK,
};
}
},
{
immediate: true,
deep: true,
}
);
const AddFileRef = ref<any>();
const beforeUploadFun = (file: any) => {
AddFileRef.value.addFileFun(file);
};
onMounted(async () => {
getTaskRunInfoFun();
// accept.value = await getFileUploadAcceptFun('REPORT_FILE_FORMAT');
nodeFIleId.value = await queryFileIdByNodeIdFun(props.taskId);
});
</script>
<style lang="scss" scoped>
.task-performance-page {
width: 100%;
height: 100%;
.ml12 {
margin-left: 12px;
}
}
</style>

View File

@@ -40,6 +40,7 @@ const props = defineProps({
default: '机器人',
},
});
const env = import.meta.env;
// 机器人 动画 有限元 工业设计 公差
// 1正常 2标红 3缩进
@@ -252,6 +253,9 @@ const getPageValue = (str: string) => {
const downLoadFileFun = (name: any) => {
console.log(name, 'name');
ElMessage.success('文件下载中请稍后!');
const url = `${env.VITE_API_STATIC_FILE}/${name.replace('《', '').replace('》', '')}.docx`;
// const url = `${env.VITE_API_STATIC_FILE}/测试word.docx`;
window.open(url);
};
</script>

View File

@@ -43,6 +43,7 @@ const lang = {
: 'Retry',
: 'Loading...',
: 'Load failed, please try again later',
: 'Restore',
},
: {
: 'Home',

View File

@@ -43,6 +43,7 @@ const lang = {
: '重试',
: '加载中...',
: '加载失败,请稍后再试',
: '还原',
},
: {
: '首页',

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,235 @@
<template>
<div class="gl-page-content setting-page">
<FileTable
tableName="RECYCLE_BIN_FILE"
ref="baseTableRef"
fullHeight
showCheckbox
:api="listBigFileApi"
:actionList="actionList"
:defaultActions="['preview']"
@checkbox-all="checkboxChangeFun"
@checkbox-change="checkboxChangeFun"
>
<template #leftOptions>
<el-button type="default" :loading="deleteAllLoading" icon="delete" @click="clearAll"
>清空回收站</el-button
>
<el-button
type="default"
icon="delete"
@click="clickDeleteFun"
:disabled="chosenData.length === 0"
>
批量删除
</el-button>
<el-button type="primary" icon="RefreshLeft" @click="clickRestore('all')">
还原所有文件</el-button
>
<el-button
type="primary"
icon="RefreshLeft"
:disabled="chosenData.length === 0"
@click="clickRestore"
>
还原选定文件</el-button
>
</template>
</FileTable>
<Dialog v-model="dialogVisible" diaTitle="替换或跳过文件" :width="400" :height="240">
<span>所还原文件原位置中包含同名文件请选择替换或跳过</span>
<div
class="radio-nomal"
:class="restoreType === 'replace' ? 'active' : ''"
@click="restoreType = 'replace'"
>
<img src="@/assets/imgs/btnIcon/replace.svg" alt="" class="icon-img-all" />
替换重名文件
</div>
<div
class="radio-nomal"
:class="restoreType === 'ignore' ? 'active' : ''"
@click="restoreType = 'ignore'"
>
<img src="@/assets/imgs/btnIcon/ignore.svg" alt="" class="icon-img-all ignore" />
跳过重名文件
</div>
<template #footer>
<div>
<el-button @click="dialogVisible = false">{{ $t('通用.取消') }}</el-button>
<el-button type="primary">{{ $t('通用.确定') }}</el-button>
</div>
</template>
</Dialog>
</div>
</template>
<script setup lang="ts">
import { ref, computed } from 'vue';
// import BaseTable from '@/components/common/table/baseTable.vue';
import FileTable from '@/components/common/fileTable/index.vue';
import { listBigFileApi, batchDeleteBigFileApi } from '@/api/data/dataStorageAnalysis';
import Dialog from '@/components/common/dialog/index.vue';
import { ElMessage, ElMessageBox } from 'element-plus';
import { useI18n } from 'vue-i18n';
const baseTableRef = ref();
const { t } = useI18n();
// 操作栏
const actionList = computed(() => {
return [
{
title: t('通用.还原'),
type: 'primary',
needConfirm: true,
confirmTipFun: (row: any) => {
return `是否确认还原“${row.originalName}”?`;
},
click: (row: any) => {
clickRestore('single', row);
},
},
{
title: t('通用.删除'),
type: 'danger',
needConfirm: true,
confirmTip: t('通用.确认删除吗'),
confirmTipFun: (row: any) => {
return `该操作将会永久删除“${row.originalName}”,是否确认删除?`;
},
click: (row: any) => {
deleteFileFun(row);
},
},
];
});
// 多选的数据
const chosenData = ref<any>([]);
const checkboxChangeFun = (data: any) => {
chosenData.value = data.records;
};
// 点击批量删除
const clickDeleteFun = () => {
ElMessageBox.confirm('是否确认永久删除所选文件?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
deleteFileBatchFun();
});
};
// 批量删除操作
const deleteFileBatchFun = async () => {
// const param = chosenData.value.map((item: any) => {
// return item.id;
// });
// const res: any = await batchDeleteBigFileApi(param);
// if (res && res.code === 200) {
// ElMessage.success('删除成功');
// baseTableRef.value.resetFun({}); // 刷新数据
// }
};
// 单个删除操作
const deleteFileFun = async (row: any) => {
// const param = [row.id];
// const res: any = await batchDeleteBigFileApi(param);
// if (res && res.code === 200) {
// ElMessage.success('删除成功');
// baseTableRef.value.resetFun({}); // 刷新数据
// }
};
// 清空回收站
const deleteAllLoading = ref(false);
const clearAll = () => {
ElMessageBox.confirm('是否确认清空回收站?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
deleteAllLoading.value = true;
});
};
// 询问弹窗 先查询是否有同名文件;没有的话直接调用还原接口,有的话弹出对话框,让用户选择覆盖还是取消
const dialogVisible = ref(false);
const restoreType = ref('replace'); // replace 覆盖ignore 跳过
const hasSameNameFile = ref(true); // 是否有同名文件
// 参数:type all 全部还原single 单个还原, row当前行
const clickRestore = (type?: any, row?: any) => {
ElMessageBox.confirm('是否确认还原?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
await getSameNameFile(type, row);
// dzhtodo 调接口
if (hasSameNameFile.value) {
// 如果有同名的就弹出询问框
dialogVisible.value = true;
restoreType.value = 'replace';
} else {
// 没有同名的 直接还原
restoreAction();
}
});
};
const getSameNameFile = async (type: any, row: any) => {
console.log('type', type, row);
// dzhtodo 调接口 更新hasSameNameFile
};
// 还原
const restoreAction = async () => {};
</script>
<style lang="scss" scoped>
.setting-page {
width: 100%;
height: 100%;
margin-bottom: 0 !important;
.form-slot {
width: 100%;
display: flex;
justify-content: space-between;
.input {
width: 63%;
}
.select {
width: 35%;
}
}
.icon-img {
width: 14px;
height: 14px;
}
}
.radio-nomal {
height: 36px;
margin-top: 10px;
// background-color: var(--el-color-primary-light-9);
font-size: 16px;
border-radius: 4px;
line-height: 30px;
padding-left: 10px;
border-radius: 4px;
cursor: pointer;
background-color: var(--el-color-info-light-9);
border: 1px solid transparent;
.icon-img-all {
width: 20px;
height: 20px;
transform: translateY(3px);
}
.ignore {
transform: translateY(2px) rotate(-45deg);
}
}
.active {
background-color: var(--el-color-primary-light-9);
border: 1px solid var(--el-color-primary);
}
</style>

View File

@@ -57,8 +57,8 @@ const statusColorList = [
];
const performanceColorList = [
'rgb(200, 201, 204)',
getThemeColor('--el-color-danger'),
getThemeColor('--el-color-success'),
getThemeColor('--el-color-primary'),
];
// 难度系数颜色列表
const difficultyCountColorList = [

View File

@@ -61,12 +61,12 @@ const initCompleteChart = async (formData: any) => {
res.data?.result?.map((item: any) => {
return item.name;
}) || [];
const allExeStatus = Object.keys(TASK_CALCULATE_STATUS_OBJ);
titles =
res.data?.allExeStatus?.map((item: any) => {
return TASK_CALCULATE_STATUS_OBJ[item] || item; // todo 返回的状态待确认
allExeStatus?.map((item: any) => {
return TASK_CALCULATE_STATUS_OBJ[item] || item;
}) || [];
const names = res.data?.allExeStatus || [];
const names = allExeStatus || [];
for (let i = 0; i < names.length; i++) {
const str = names[i];

View File

@@ -59,7 +59,7 @@ const initReviewPassedChart = async (formData: any) => {
return item.name;
}) || [];
titles = res.data.allApprovalStatus;
titles = ['0', '1', '2', '3'];
const statusMap: any = {
0: '未评审',
1: '评审中',

View File

@@ -844,6 +844,7 @@ const getSubmitParamFun = async (appPath: any) => {
const creatorId = getUserId().toString();
const subRunId = flowNodeData.value.nodeId;
const asyncTaskId = flowNodeData.value.nodeDetailInfo?.asyncTaskId;
const outputFormat = flowNodeParamData.value.outputFormat;
return {
runId,
runName,
@@ -867,6 +868,7 @@ const getSubmitParamFun = async (appPath: any) => {
creatorId,
subRunId,
asyncTaskId,
outputFormat,
};
};

View File

@@ -10,6 +10,7 @@
<el-tab-pane label="曲线文件" name="canvas"></el-tab-pane>
<el-tab-pane label="视频文件" name="video"></el-tab-pane>
<el-tab-pane label="试验结果" name="experiment"></el-tab-pane>
<el-tab-pane label="复盘数据" name="review-data"></el-tab-pane>
<el-tab-pane label="任务信息" name="taskInfo" v-if="showTaskInfo"></el-tab-pane>
<!-- <el-tab-pane label="交付物" name="deliverable"></el-tab-pane> -->
@@ -88,6 +89,12 @@
:disabled="!showLeftOptions"
></taskInfoPage>
</div>
<div class="tabs-component" v-if="activeName === 'review-data'">
<reviewData
:task-id="currentTaskInfo?.uuid"
:show-left-options="showLeftOptions"
></reviewData>
</div>
</div>
<Dialog
@@ -148,6 +155,7 @@ import task3DModel from '@/components/taskDetail/task3DModel.vue';
import taskInfoPage from '@/components/taskDetail/taskInfo.vue';
import { getSimulationTaskFilesApi } from '@/api/data/dataAnalysis';
import videoFile from '@/components/taskDetail/videoFile.vue';
import reviewData from '@/components/taskDetail/reviewData.vue';
const props = defineProps({
taskInfo: {

View File

@@ -124,6 +124,17 @@
></taskDemand>
</div>
</el-tab-pane>
<el-tab-pane label="复盘数据" name="review-data">
<div class="task-tab-content">
<reviewData
v-if="activeTab === 'review-data'"
:task-id="currentTaskInfo?.uuid"
:taskData="currentTaskInfo"
:show-left-options="showLeftOptions"
></reviewData>
</div>
</el-tab-pane>
<!-- <el-tab-pane label="交付物" name="deliverables">
<div class="task-tab-content">
<taskDeliverable
@@ -195,6 +206,7 @@ import runVersionTree from '@/views/task/execution/components/runDetailPage/runP
import taskDemand from '@/components/taskDetail/taskDemand.vue';
import { getSimulationTaskFilesApi } from '@/api/data/dataAnalysis';
import videoFile from '@/components/taskDetail/videoFile.vue';
import reviewData from '@/components/taskDetail/reviewData.vue';
const emits = defineEmits(['closeFn', 'updateFn']);
const props = defineProps({