feat: 谱系
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
export const FILE_TYPE = {
|
||||
/** 需求附件 */
|
||||
DEMAND_ATTACHMENTS: 7,
|
||||
/** 流程脚本 */
|
||||
FLOW_PYTHON: 6,
|
||||
/** 模型文件 */
|
||||
MODEL_FILE: 1,
|
||||
/** 仿真报告 */
|
||||
@@ -13,17 +9,26 @@ export const FILE_TYPE = {
|
||||
CANVAS_FILE: 4,
|
||||
/** 云图文件 */
|
||||
PNG_FILE: 5,
|
||||
|
||||
/** 项目文件 会议纪要 */
|
||||
/** 流程脚本 */
|
||||
FLOW_PYTHON: 6,
|
||||
/** 需求附件 */
|
||||
DEMAND_ATTACHMENTS: 7,
|
||||
/** 会议纪要-项目 */
|
||||
PROJECT_FILE_METING_FILE: 8,
|
||||
|
||||
/** 项目文件 知识文件 */
|
||||
/** 知识文件-项目 */
|
||||
PROJECT_FILE_KNOWLEDGE: 9,
|
||||
|
||||
/** 项目文件 附件 */
|
||||
/** 附件-项目 */
|
||||
PROJECT_FILE_ATTACHMENT: 10,
|
||||
/** 任务文件 实验数据 */
|
||||
/** 交付物文件 */
|
||||
DELIVERY_FILE: 11,
|
||||
/** 试验结果文件 */
|
||||
TEST_DOCUMENT_FILE: 12,
|
||||
/** 3d模型文件 */
|
||||
/** 3D模型 */
|
||||
MODEL_3D_FILE: 13,
|
||||
/** 试验数据闭环报告 */
|
||||
TEST_CLOSURE_REPORT: 14,
|
||||
/** 复盘报告 */
|
||||
REVIEW_FILE: 15,
|
||||
/** 结果视频 */
|
||||
VIDEO_FILE: 16,
|
||||
};
|
||||
|
||||
@@ -5,7 +5,12 @@
|
||||
ref="inputModelTableRef"
|
||||
tableName="RESULT_MODEL"
|
||||
:api="getFileListApiFun"
|
||||
:params="{ uuid: runId, fileBizType: FILE_TYPE.MODEL_FILE }"
|
||||
:params="{
|
||||
uuid: runId,
|
||||
fileTypeDictValue: String(FILE_TYPE.MODEL_FILE),
|
||||
fileTypeDictClass: FILE_DICT_CLASS,
|
||||
dictTags: DICT_TAGS,
|
||||
}"
|
||||
showIndex
|
||||
:fullHeight="true"
|
||||
hideSearch
|
||||
@@ -39,7 +44,12 @@
|
||||
ref="calcModelTableRef"
|
||||
tableName="RESULT_FILE"
|
||||
:api="getFileListApiFun"
|
||||
:params="{ uuid: runId, fileBizType: FILE_TYPE.CALCULATION_FILE }"
|
||||
:params="{
|
||||
uuid: runId,
|
||||
fileTypeDictValue: String(FILE_TYPE.CALCULATION_FILE),
|
||||
fileTypeDictClass: FILE_DICT_CLASS,
|
||||
dictTags: DICT_TAGS,
|
||||
}"
|
||||
showIndex
|
||||
:fullHeight="true"
|
||||
hideSearch
|
||||
@@ -52,7 +62,12 @@
|
||||
ref="calcResultTableRef"
|
||||
tableName="RESULT_FILE"
|
||||
:api="getFileListApiFun"
|
||||
:params="{ uuid: runId, fileBizType: FILE_TYPE.CALCULATION_FILE }"
|
||||
:params="{
|
||||
uuid: runId,
|
||||
fileTypeDictValue: String(FILE_TYPE.CALCULATION_FILE),
|
||||
fileTypeDictClass: FILE_DICT_CLASS,
|
||||
dictTags: DICT_TAGS,
|
||||
}"
|
||||
showIndex
|
||||
:fullHeight="true"
|
||||
hideSearch
|
||||
@@ -74,7 +89,12 @@
|
||||
ref="cloudImageTableRef"
|
||||
tableName="RESULT_PNG"
|
||||
:api="getFileListApiFun"
|
||||
:params="{ uuid: runId, fileBizType: FILE_TYPE.PNG_FILE }"
|
||||
:params="{
|
||||
uuid: runId,
|
||||
fileTypeDictValue: String(FILE_TYPE.PNG_FILE),
|
||||
fileTypeDictClass: FILE_DICT_CLASS,
|
||||
dictTags: DICT_TAGS,
|
||||
}"
|
||||
showIndex
|
||||
:fullHeight="true"
|
||||
hideSearch
|
||||
@@ -85,7 +105,12 @@
|
||||
ref="curveTableRef"
|
||||
tableName="RESULT_CURVE"
|
||||
:api="getFileListApiFun"
|
||||
:params="{ uuid: runId, fileBizType: FILE_TYPE.CANVAS_FILE }"
|
||||
:params="{
|
||||
uuid: runId,
|
||||
fileTypeDictValue: String(FILE_TYPE.CANVAS_FILE),
|
||||
fileTypeDictClass: FILE_DICT_CLASS,
|
||||
dictTags: DICT_TAGS,
|
||||
}"
|
||||
showIndex
|
||||
:fullHeight="true"
|
||||
hideSearch
|
||||
@@ -114,7 +139,12 @@
|
||||
ref="reportTableRef"
|
||||
tableName="RESULT_REPORT"
|
||||
:api="getFileListApiFun"
|
||||
:params="{ uuid: runId, fileBizType: FILE_TYPE.REPORT_FILE }"
|
||||
:params="{
|
||||
uuid: runId,
|
||||
fileTypeDictValue: String(FILE_TYPE.REPORT_FILE),
|
||||
fileTypeDictClass: FILE_DICT_CLASS,
|
||||
dictTags: DICT_TAGS,
|
||||
}"
|
||||
showIndex
|
||||
:fullHeight="true"
|
||||
hideSearch
|
||||
@@ -122,6 +152,42 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-else-if="currentNode === 'testData'" class="detail-content">
|
||||
<BaseTable
|
||||
ref="testDataTableRef"
|
||||
tableName="RESULT_REPORT"
|
||||
:api="getFileListApiFun"
|
||||
:params="{
|
||||
uuid: runId,
|
||||
fileTypeDictValue: String(FILE_TYPE.TEST_CLOSURE_REPORT),
|
||||
fileTypeDictClass: FILE_DICT_CLASS,
|
||||
dictTags: DICT_TAGS,
|
||||
}"
|
||||
showIndex
|
||||
:fullHeight="true"
|
||||
hideSearch
|
||||
:actionList="testDataActionList"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-else-if="currentNode === 'reviewReport'" class="detail-content">
|
||||
<BaseTable
|
||||
ref="reviewReportTableRef"
|
||||
tableName="RESULT_REPORT"
|
||||
:api="getFileListApiFun"
|
||||
:params="{
|
||||
uuid: runId,
|
||||
fileTypeDictValue: String(FILE_TYPE.REVIEW_FILE),
|
||||
fileTypeDictClass: FILE_DICT_CLASS,
|
||||
dictTags: DICT_TAGS,
|
||||
}"
|
||||
showIndex
|
||||
:fullHeight="true"
|
||||
hideSearch
|
||||
:actionList="reviewReportActionList"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<FilePreview v-model="previewVisible" :fileId="currentRow?.id" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -141,6 +207,9 @@ import FilePreview from '@/components/common/filePreview/index.vue';
|
||||
import { downloadFileById } from '@/utils/file';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
|
||||
const FILE_DICT_CLASS = 'ALL_FILE_TYPE';
|
||||
const DICT_TAGS = ['fileTypeDictClass', 'fileTypeDictValue'];
|
||||
|
||||
interface Props {
|
||||
currentNode?: string;
|
||||
runId?: string;
|
||||
@@ -185,6 +254,14 @@ const reportActionList = [
|
||||
{ title: '预览', type: 'primary', click: previewFileFun },
|
||||
{ title: '下载', type: 'primary', click: downloadFileFun },
|
||||
];
|
||||
const testDataActionList = [
|
||||
{ title: '预览', type: 'primary', click: previewFileFun },
|
||||
{ title: '下载', type: 'primary', click: downloadFileFun },
|
||||
];
|
||||
const reviewReportActionList = [
|
||||
{ title: '预览', type: 'primary', click: previewFileFun },
|
||||
{ title: '下载', type: 'primary', click: downloadFileFun },
|
||||
];
|
||||
|
||||
const keyResultType = ref('1');
|
||||
|
||||
|
||||
@@ -68,6 +68,8 @@ const nodeLabelsKey: Record<string, string> = {
|
||||
calcResult: '数据谱系.计算结果',
|
||||
keyResult: '数据谱系.关键结果',
|
||||
simReport: '数据谱系.仿真报告',
|
||||
testData: '数据谱系.试验数据',
|
||||
reviewReport: '数据谱系.复盘报告',
|
||||
};
|
||||
|
||||
const currentNodeLabel = computed(() => t(nodeLabelsKey[currentNodeId.value]) || '');
|
||||
@@ -79,6 +81,8 @@ const dataTypeToNodeIdMap: Record<string, string> = {
|
||||
计算文件: 'calcModel',
|
||||
结果曲线: 'keyResult',
|
||||
结果云图: 'keyResult',
|
||||
试验数据: 'testData',
|
||||
复盘报告: 'reviewReport',
|
||||
};
|
||||
|
||||
const dataTypeToKeyResultTypeMap: Record<string, string> = {
|
||||
|
||||
@@ -27,7 +27,7 @@ const resizeObserver = ref<ResizeObserver>();
|
||||
|
||||
const nodeWidth = computed(() => (locale.value === 'EN' ? 160 : 100));
|
||||
const nodeGap = computed(() => (locale.value === 'EN' ? 40 : 60));
|
||||
const totalWidth = computed(() => 6 * nodeWidth.value + 5 * nodeGap.value);
|
||||
const totalWidth = computed(() => 8 * nodeWidth.value + 7 * nodeGap.value);
|
||||
|
||||
const flowNodesConfig = [
|
||||
{ id: 'inputModel', labelKey: '数据谱系.输入模型' },
|
||||
@@ -36,6 +36,8 @@ const flowNodesConfig = [
|
||||
{ id: 'calcResult', labelKey: '数据谱系.计算结果' },
|
||||
{ id: 'keyResult', labelKey: '数据谱系.关键结果' },
|
||||
{ id: 'simReport', labelKey: '数据谱系.仿真报告' },
|
||||
{ id: 'testData', labelKey: '数据谱系.试验数据' },
|
||||
{ id: 'reviewReport', labelKey: '数据谱系.复盘报告' },
|
||||
];
|
||||
|
||||
const flowNodesData = computed(() =>
|
||||
@@ -55,6 +57,8 @@ const flowEdges = [
|
||||
{ source: 'calcModel', target: 'calcResult' },
|
||||
{ source: 'calcResult', target: 'keyResult' },
|
||||
{ source: 'keyResult', target: 'simReport' },
|
||||
{ source: 'simReport', target: 'testData' },
|
||||
{ source: 'testData', target: 'reviewReport' },
|
||||
];
|
||||
|
||||
const defaultBodyAttrs = {
|
||||
|
||||
Reference in New Issue
Block a user