update:修改标题名称,仿真执行图片和曲线结果加拖拽上传
This commit is contained in:
@@ -637,7 +637,7 @@ const getRunDetailInfoFun = async (id: any) => {
|
||||
}
|
||||
};
|
||||
|
||||
const dirNames = ref(['图片结果', '曲线结果', '报告结果', '计算模型', '3D模型']);
|
||||
const dirNames = ref(['图片结果', '曲线结果', '仿真报告', '计算模型', '3D模型']);
|
||||
// 在算例下新建文件夹
|
||||
const createRunResultDirFun = async (runId: any) => {
|
||||
for (let i = 0; i < dirNames.value.length; i++) {
|
||||
|
||||
@@ -22,73 +22,98 @@
|
||||
</div>
|
||||
<div class="dir-content" v-else>
|
||||
<div class="table-box">
|
||||
<FileTable
|
||||
v-if="tableShow && tableName === 'RUN_RESULT_IMAGE_TABLE'"
|
||||
showIndex
|
||||
ref="baseTableRef"
|
||||
:tableName="tableName"
|
||||
:show-checkbox="true"
|
||||
:api="queryDirDataFun"
|
||||
:params="apiParam"
|
||||
:full-height="true"
|
||||
:action-list="showLeftOption ? actionList : []"
|
||||
:default-actions="showLeftOption ? ['rename', 'refresh'] : []"
|
||||
fileNameField="name"
|
||||
fileIdField="fileId"
|
||||
v-model:viewType="viewType"
|
||||
>
|
||||
<template #leftOptions v-if="showLeftOption">
|
||||
<el-button type="primary" @click="ArchiveRunDataFun">归档</el-button>
|
||||
<el-button type="primary" v-if="getdirNameFun() != '报告结果'" @click="viewFun"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button type="primary" @click="openFun">上传</el-button>
|
||||
<el-button type="danger" @click="batchDeleteFun" :disabled="isDelete"
|
||||
>批量删除</el-button
|
||||
>
|
||||
<el-button @click="refreshFun">刷新</el-button>
|
||||
</template>
|
||||
<DragUploader @beforeUpload="beforeUploadFun">
|
||||
<FileTable
|
||||
v-if="tableShow && tableName === 'RUN_RESULT_IMAGE_TABLE'"
|
||||
showIndex
|
||||
ref="baseTableRef"
|
||||
:tableName="tableName"
|
||||
:show-checkbox="true"
|
||||
:api="queryDirDataFun"
|
||||
:params="apiParam"
|
||||
:full-height="true"
|
||||
:action-list="showLeftOption ? actionList : []"
|
||||
:default-actions="showLeftOption ? ['rename', 'refresh'] : []"
|
||||
fileNameField="name"
|
||||
fileIdField="fileId"
|
||||
v-model:viewType="viewType"
|
||||
>
|
||||
<template #leftOptions v-if="showLeftOption">
|
||||
<el-button type="primary" @click="ArchiveRunDataFun">归档</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
class="mr12"
|
||||
v-if="getdirNameFun() != '报告结果' && getdirNameFun() != '仿真报告'"
|
||||
@click="viewFun"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-upload
|
||||
:show-file-list="false"
|
||||
:accept="accept"
|
||||
multiple
|
||||
:before-upload="beforeUploadFun"
|
||||
>
|
||||
<el-button class="mr12" type="primary">上传</el-button>
|
||||
</el-upload>
|
||||
|
||||
<template v-if="tableName === 'RUN_RESULT_IMAGE_TABLE'" #cardTemplate="{ tableData }">
|
||||
<ImageCard
|
||||
ref="imageCardRef"
|
||||
:list="tableData"
|
||||
:columnCount="columnCount"
|
||||
:showDelete="showLeftOption"
|
||||
@download="downloadFileFun"
|
||||
@preview="previewFileFun"
|
||||
@delete="deleteFile"
|
||||
@refresh="refreshFun"
|
||||
/>
|
||||
</template>
|
||||
</FileTable>
|
||||
<el-button type="danger" @click="batchDeleteFun" :disabled="isDelete"
|
||||
>批量删除</el-button
|
||||
>
|
||||
<el-button @click="refreshFun">刷新</el-button>
|
||||
</template>
|
||||
|
||||
<FileTable
|
||||
v-if="tableShow && tableName === 'RUN_RESULT_CANVAS_TABLE'"
|
||||
showIndex
|
||||
ref="baseTableRef"
|
||||
:tableName="tableName"
|
||||
:show-checkbox="true"
|
||||
:api="queryDirDataFun"
|
||||
:params="apiParam"
|
||||
:full-height="true"
|
||||
:action-list="showLeftOption ? actionList : []"
|
||||
:default-actions="showLeftOption ? ['rename', 'refresh'] : []"
|
||||
fileNameField="name"
|
||||
fileIdField="fileId"
|
||||
>
|
||||
<template #leftOptions v-if="showLeftOption">
|
||||
<el-button type="primary" @click="ArchiveRunDataFun">归档</el-button>
|
||||
<el-button type="primary" v-if="getdirNameFun() != '报告结果'" @click="viewFun"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button type="primary" @click="openFun">上传</el-button>
|
||||
<el-button type="danger" @click="batchDeleteFun" :disabled="isDelete"
|
||||
>批量删除</el-button
|
||||
>
|
||||
<el-button @click="refreshFun">刷新</el-button>
|
||||
</template>
|
||||
</FileTable>
|
||||
<template v-if="tableName === 'RUN_RESULT_IMAGE_TABLE'" #cardTemplate="{ tableData }">
|
||||
<ImageCard
|
||||
ref="imageCardRef"
|
||||
:list="tableData"
|
||||
:columnCount="columnCount"
|
||||
:showDelete="showLeftOption"
|
||||
@download="downloadFileFun"
|
||||
@preview="previewFileFun"
|
||||
@delete="deleteFile"
|
||||
@refresh="refreshFun"
|
||||
/>
|
||||
</template>
|
||||
</FileTable>
|
||||
|
||||
<FileTable
|
||||
v-if="tableShow && tableName === 'RUN_RESULT_CANVAS_TABLE'"
|
||||
showIndex
|
||||
ref="baseTableRef"
|
||||
:tableName="tableName"
|
||||
:show-checkbox="true"
|
||||
:api="queryDirDataFun"
|
||||
:params="apiParam"
|
||||
:full-height="true"
|
||||
:action-list="showLeftOption ? actionList : []"
|
||||
:default-actions="showLeftOption ? ['rename', 'refresh'] : []"
|
||||
fileNameField="name"
|
||||
fileIdField="fileId"
|
||||
>
|
||||
<template #leftOptions v-if="showLeftOption">
|
||||
<el-button type="primary" @click="ArchiveRunDataFun">归档</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
class="mr12"
|
||||
v-if="getdirNameFun() != '报告结果' && getdirNameFun() != '仿真报告'"
|
||||
@click="viewFun"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-upload
|
||||
:show-file-list="false"
|
||||
:accept="accept"
|
||||
multiple
|
||||
:before-upload="beforeUploadFun"
|
||||
>
|
||||
<el-button class="mr12" type="primary">上传</el-button>
|
||||
</el-upload>
|
||||
<el-button type="danger" @click="batchDeleteFun" :disabled="isDelete"
|
||||
>批量删除</el-button
|
||||
>
|
||||
<el-button @click="refreshFun">刷新</el-button>
|
||||
</template>
|
||||
</FileTable>
|
||||
</DragUploader>
|
||||
</div>
|
||||
<!-- <div class="operate-box">
|
||||
<el-button @click="ArchiveRunDataFun">归档</el-button>
|
||||
@@ -333,7 +358,6 @@
|
||||
diaTitle="上传文件"
|
||||
:width="'70%'"
|
||||
:height="'70%'"
|
||||
:zIndex="101"
|
||||
@close="closeFun"
|
||||
show-footer
|
||||
>
|
||||
@@ -546,6 +570,7 @@ import taskPerformance from '@/components/taskDetail/taskPerformance.vue';
|
||||
import { getCSVDataApi } from '@/api/data/dataAnalysis';
|
||||
import { useDict } from '@/utils/useDict';
|
||||
import ImageCard from '@/components/taskDetail/imageCard.vue';
|
||||
import DragUploader from '@/components/common/dragUploader/index.vue';
|
||||
|
||||
const env = import.meta.env;
|
||||
|
||||
@@ -644,12 +669,12 @@ const queryDirDataFun = async (param: any) => {
|
||||
});
|
||||
res.data.data = list;
|
||||
|
||||
tableData2.value = res.data.data.map((item: any) => {
|
||||
return {
|
||||
...item,
|
||||
originalName: item.name,
|
||||
};
|
||||
});
|
||||
// tableData2.value = res.data.data.map((item: any) => {
|
||||
// return {
|
||||
// ...item,
|
||||
// originalName: item.name,
|
||||
// };
|
||||
// });
|
||||
return res;
|
||||
}
|
||||
};
|
||||
@@ -690,7 +715,7 @@ const runResultDirChangeFun = () => {
|
||||
formData.fileType = [`${FILE_TYPE.CANVAS_FILE}`];
|
||||
tableShow.value = true;
|
||||
}
|
||||
if (name === '报告结果') {
|
||||
if (name === '报告结果' || name === '仿真报告') {
|
||||
tableName.value = 'RUN_RESULT_REPORT_TABLE';
|
||||
apiParam.value.keyResultType = '3';
|
||||
accept.value = '.ppt(x),.pptx,.doc(x),.docx,.pdf';
|
||||
@@ -715,7 +740,7 @@ const getFileType = () => {
|
||||
type = FILE_TYPE.CANVAS_FILE;
|
||||
}
|
||||
|
||||
if (dirName === '报告结果') {
|
||||
if (dirName === '报告结果' || dirName === '仿真报告') {
|
||||
type = FILE_TYPE.REPORT_FILE;
|
||||
}
|
||||
|
||||
@@ -725,6 +750,7 @@ const getFileType = () => {
|
||||
const closeFun = () => {
|
||||
visible.value = false;
|
||||
isCsv.value = false;
|
||||
tableData2.value = [];
|
||||
uploadFileVisible.value = false;
|
||||
};
|
||||
|
||||
@@ -1024,12 +1050,12 @@ const getparamListFUn = () => {
|
||||
const viewFiles = ref<any>([]);
|
||||
|
||||
const viewFun = () => {
|
||||
if (viewType.value === 'llst') {
|
||||
console.log(viewType.value, 'viewType.value');
|
||||
|
||||
if (viewType.value === 'list') {
|
||||
viewFiles.value = baseTableRef.value.tableRef.getCheckboxRecords();
|
||||
} else {
|
||||
viewFiles.value = imageCardRef.value.getSelectedIds() || [];
|
||||
|
||||
console.log(viewFiles.value, 'viewFiles.value');
|
||||
}
|
||||
if (viewFiles.value.length) {
|
||||
const name = getdirNameFun();
|
||||
@@ -1230,6 +1256,9 @@ const uploadActionList = ref([
|
||||
|
||||
const num = ref(1);
|
||||
const beforeUploadFun = async (file: any) => {
|
||||
if (!uploadFileVisible.value) {
|
||||
uploadFileVisible.value = true;
|
||||
}
|
||||
num.value++;
|
||||
const { name, size } = file;
|
||||
|
||||
@@ -1306,7 +1335,10 @@ const beforeUploadFun = async (file: any) => {
|
||||
}
|
||||
|
||||
tableData2.value.push(obj);
|
||||
baseUploadTableRef.value.setDataFun(tableData2.value);
|
||||
|
||||
nextTick(() => {
|
||||
baseUploadTableRef.value.setDataFun(tableData2.value);
|
||||
});
|
||||
|
||||
return false;
|
||||
};
|
||||
@@ -1596,4 +1628,8 @@ onMounted(async () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mr12 {
|
||||
margin-right: 12px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
|
||||
<div class="task-content">
|
||||
<el-radio-group v-model="keyResultType" v-if="activeName === 'keyResult'">
|
||||
<el-radio-button label="性能指标" value="performance" />
|
||||
<el-radio-button label="图片文件" value="resultImage" />
|
||||
<el-radio-button label="曲线文件" value="curveView" />
|
||||
<el-radio-button label="视频文件" value="video" />
|
||||
<el-radio-button label="数值结果" value="performance" />
|
||||
<el-radio-button label="图片结果" value="resultImage" />
|
||||
<el-radio-button label="曲线结果" value="curveView" />
|
||||
<el-radio-button label="视频结果" value="video" />
|
||||
</el-radio-group>
|
||||
<div class="task-tab-content-first" v-if="activeName === 'taskDetail'">
|
||||
<div class="task-tab-content-title">
|
||||
|
||||
Reference in New Issue
Block a user