merge
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { get, post, upload } from '@/api/request';
|
||||
import { download, get, post, upload } from '@/api/request';
|
||||
|
||||
const env = import.meta.env;
|
||||
const PREFIX = env.VITE_API_PREFIX_DATA;
|
||||
@@ -55,7 +55,9 @@ export const dataFileSearchApi = (params: any) => {
|
||||
export const dataDelFileApi = (params: any) => {
|
||||
return post(`${PREFIX}data/delFile`, params);
|
||||
};
|
||||
|
||||
export const dataExportFileApi = (params: any) => {
|
||||
return download(`${PREFIX}data/exportFile`, params);
|
||||
};
|
||||
export const dataDownloadFileApi = (params: any) => {
|
||||
return get(`${PREFIX}data/downloadFile`, params);
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { get, post, upload } from '@/api/request';
|
||||
import { download, get, post, upload } from '@/api/request';
|
||||
|
||||
const env = import.meta.env;
|
||||
const PREFIX = env.VITE_API_PREFIX_DATA;
|
||||
@@ -8,6 +8,10 @@ const WS_PREFIX = env.VITE_API_WS_BASE_URL;
|
||||
export const getModelTrainingListApi = (params: any) => {
|
||||
return post(`${PREFIX}modelTraining/getModelList`, params);
|
||||
};
|
||||
// 导出模型列表
|
||||
export const exportTrainingListApi = (params: any) => {
|
||||
return download(`${PREFIX}modelTraining/exportModelList`, params);
|
||||
};
|
||||
// 获取模型详情
|
||||
export const getModelDetailApi = (params: any) => {
|
||||
return get(`${PREFIX}modelTraining/getModelDetail`, params);
|
||||
|
||||
@@ -39,6 +39,10 @@ export const getTaskPoolPerformanceApi = (params: any) => {
|
||||
return get(`${PREFIX}taskpool/getTaskPoolPerformance`, params);
|
||||
};
|
||||
|
||||
export const exportTaskPoolPerformanceApi = (params: any) => {
|
||||
return download(`${PREFIX}taskPerformance/exportTaskPoolPerformance`, params);
|
||||
};
|
||||
|
||||
export const getTaskPerformanceApi = (params: any) => {
|
||||
return get(`${PREFIX}taskPerformance/getTaskPerformance`, params);
|
||||
};
|
||||
|
||||
@@ -17,4 +17,12 @@ export enum TABLE_NAME {
|
||||
SIMULATION_KNOWLEDGE_APPROVE_PREVIEW = 'SIMULATION_KNOWLEDGE_APPROVE_PREVIEW',
|
||||
/** 项目任务弹窗 */
|
||||
PROJECT_TASK_MODAL = 'PROJECT_TASK_MODAL',
|
||||
/** 数据训练 */
|
||||
MODEL_TRAINING_LIST = 'MODEL_TRAINING_LIST',
|
||||
/** 数据训练 - 参数设置 */
|
||||
DATA_TRAINING_PARAM_SETTING = 'DATA_TRAINING_PARAM_SETTING',
|
||||
/** 数据预测 - 输入 */
|
||||
DATA_FORECAST_INPUT = 'DATA_FORECAST_INPUT',
|
||||
/** 数据预测 - 输出 */
|
||||
DATA_FORECAST_OUTPUT = 'DATA_FORECAST_OUTPUT',
|
||||
}
|
||||
|
||||
@@ -15,6 +15,9 @@ const lang = {
|
||||
'审核模版': 'Approval Template',
|
||||
'请选择审核模版': 'Please select an approval template',
|
||||
'确认删除吗': 'Are you sure to delete?',
|
||||
'上一步': 'Previous',
|
||||
'下一步': 'Next',
|
||||
'查看': 'View',
|
||||
},
|
||||
'菜单': {
|
||||
'首页': 'Home',
|
||||
@@ -137,6 +140,7 @@ const lang = {
|
||||
'切换至树结构视图': 'Switch to Tree View',
|
||||
'不能提交空数据': 'Cannot submit empty data',
|
||||
'没有修改的数据需要提交审批': 'No modified data to submit for approval',
|
||||
'指标库列表': 'Performance Pool List',
|
||||
},
|
||||
'知识库': {
|
||||
'上传': 'Upload',
|
||||
@@ -157,6 +161,7 @@ const lang = {
|
||||
'请选择文件': 'Please select a file',
|
||||
'请输入名称': 'Please input name',
|
||||
'审批完成': 'Approval Completed',
|
||||
'知识库列表': 'Knowledge Base List',
|
||||
},
|
||||
'我的任务': {
|
||||
'待接收任务': 'Accepted Tasks',
|
||||
@@ -180,11 +185,19 @@ const lang = {
|
||||
'数据训练': {
|
||||
'新建训练': 'Create Training',
|
||||
'编辑训练': 'Edit Training',
|
||||
'算法选择': 'Algorithm Selection',
|
||||
'算法参数设置': 'Algorithm Parameter Setting',
|
||||
'开始训练': 'Start Training',
|
||||
'确定开始训练吗': 'Are you sure to start training?',
|
||||
'数据训练列表': 'Data Training List',
|
||||
},
|
||||
'数据预测': {
|
||||
'功能说明': 'Function Description',
|
||||
'开始预测': 'Begin Forecast',
|
||||
'确定开始预测吗': 'Are you sure to begin forecast?',
|
||||
'降阶模型': 'Reduced-order Model',
|
||||
'输入': 'Input',
|
||||
'输出': 'Output',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@ const lang = {
|
||||
'审核模版': '审核模板',
|
||||
'请选择审核模版': '请选择审核模版',
|
||||
'确认删除吗': '确认删除吗?',
|
||||
'上一步': '上一步',
|
||||
'下一步': '下一步',
|
||||
'查看': '查看',
|
||||
},
|
||||
'菜单': {
|
||||
'首页': '首页',
|
||||
@@ -137,6 +140,7 @@ const lang = {
|
||||
'切换至树结构视图': '切换至树结构视图',
|
||||
'不能提交空数据': '不能提交空数据',
|
||||
'没有修改的数据需要提交审批': '没有修改的数据需要提交审批',
|
||||
'指标库列表': '指标库列表',
|
||||
},
|
||||
'知识库': {
|
||||
'上传': '上传',
|
||||
@@ -157,6 +161,7 @@ const lang = {
|
||||
'请选择文件': '请选择文件',
|
||||
'请输入名称': '请输入名称',
|
||||
'审批完成': '审批完成',
|
||||
'知识库列表': '知识库列表',
|
||||
},
|
||||
'我的任务': {
|
||||
'待接收任务': '待接收任务',
|
||||
@@ -180,11 +185,19 @@ const lang = {
|
||||
'数据训练': {
|
||||
'新建训练': '新建训练',
|
||||
'编辑训练': '编辑训练',
|
||||
'算法选择': '算法选择',
|
||||
'算法参数设置': '算法参数设置',
|
||||
'开始训练': '开始训练',
|
||||
'确定开始训练吗': '确定开始训练吗?',
|
||||
'数据训练列表': '数据训练列表',
|
||||
},
|
||||
'数据预测': {
|
||||
'功能说明': '功能说明',
|
||||
'开始预测': '开始预测',
|
||||
'确定开始预测吗': '确定开始预测吗?',
|
||||
'降阶模型': '降阶模型',
|
||||
'输入': '输入',
|
||||
'输出': '输出',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -173,6 +173,17 @@
|
||||
:data="performanceData"
|
||||
:hasOperationColumn="false"
|
||||
:showCheckBox="false"
|
||||
:exportApi="exportTaskPoolPerformanceApi"
|
||||
:exportFileName="$t('工况库.指标库列表')"
|
||||
:exportParams ="{
|
||||
poolName: currentPoolBriefVersion ? currentPoolBriefVersion.poolName : '',
|
||||
version: currentPoolBriefVersion ? currentPoolBriefVersion.poolVersion : ''
|
||||
}"
|
||||
:exportDict="{
|
||||
performanceType: 'PERFORMANCE_TYPE',
|
||||
method:'COMPLIANCE_METHOD',
|
||||
unit: 'PERFORMANCE_UNIT'
|
||||
}"
|
||||
>
|
||||
</loadCaseTable>
|
||||
</div>
|
||||
@@ -219,6 +230,7 @@ import {
|
||||
updateTaskPoolApi,
|
||||
getTaskPoolApi,
|
||||
getTaskPoolPerformanceApi,
|
||||
exportTaskPoolPerformanceApi,
|
||||
getTaskPoolVersionsApi,
|
||||
getAllTaskPoolApi,
|
||||
importTaskPoolApi,
|
||||
|
||||
@@ -58,6 +58,11 @@
|
||||
:actionsWidth="200"
|
||||
:actionList="actionList"
|
||||
@cell-dblclick="onCellDblclickFun"
|
||||
:exportApi="dataExportFileApi"
|
||||
:exportFileName="$t('知识库.知识库列表')"
|
||||
:exportDict="{
|
||||
approvalStatus: 'KNOWLEDGE_APPROVE_STATUS'
|
||||
}"
|
||||
>
|
||||
<template #leftOptions>
|
||||
<div>
|
||||
@@ -123,7 +128,7 @@ import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import FileTree from '@/components/common/fileTree/index.vue';
|
||||
import knowledgeDetailModal from './components/knowledgeDetailModal.vue';
|
||||
import folderModal from './components/folderDetailModal.vue';
|
||||
import { dataCreateDirApi, dataListDirApi, dataRenameDirApi, dataUploadFilesApi, dataDelDirApi, dataQueryDirApi, dataFileSearchApi, dataDelFileApi, dataUpdateFileApi, batchAddFileInfoApi } from '@/api/data/data';
|
||||
import { dataCreateDirApi, dataListDirApi, dataRenameDirApi, dataUploadFilesApi, dataDelDirApi, dataQueryDirApi, dataFileSearchApi, dataDelFileApi, dataUpdateFileApi, batchAddFileInfoApi, dataExportFileApi } from '@/api/data/data';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import type { RenderContentContext } from 'element-plus';
|
||||
import { formatFileSize } from '@/utils/file';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="header">
|
||||
<div class="form">
|
||||
<el-form>
|
||||
<el-form-item label="降阶模型">
|
||||
<el-form-item :label="$t('数据预测.降阶模型')">
|
||||
<el-select v-model="selectedModel" placeholder="请选择降阶模型" filterable @change="onModelChangeFun">
|
||||
<el-option v-for="item in modelOptions" :label="item.label" :value="item" :key="item.id" />
|
||||
</el-select>
|
||||
@@ -24,9 +24,9 @@
|
||||
</div>
|
||||
<div class="content" v-loading="forecastLoading">
|
||||
<div class="left">
|
||||
<BaseTable ref="inputTableRef" tableName="DATA_FORECAST_INPUT" showIndex :actionsWidth="200" hidePagination>
|
||||
<BaseTable ref="inputTableRef" :tableName="TABLE_NAME.DATA_FORECAST_INPUT" showIndex :actionsWidth="200" hidePagination>
|
||||
<template #type>
|
||||
输入
|
||||
{{ $t('数据预测.输入') }}
|
||||
</template>
|
||||
<template #value="{ row }">
|
||||
<el-input-number
|
||||
@@ -44,9 +44,9 @@
|
||||
</el-popconfirm>
|
||||
</div>
|
||||
<div class="right">
|
||||
<BaseTable ref="outputTableRef" tableName="DATA_FORECAST_OUTPUT" showIndex :actionsWidth="200" hidePagination>
|
||||
<BaseTable ref="outputTableRef" :tableName="TABLE_NAME.DATA_FORECAST_OUTPUT" showIndex :actionsWidth="200" hidePagination>
|
||||
<template #type>
|
||||
输出
|
||||
{{ $t('数据预测.输出') }}
|
||||
</template>
|
||||
</BaseTable>
|
||||
</div>
|
||||
@@ -59,6 +59,7 @@ import { getModelTrainingListApi, startPredictApi, getModelPredictResultApi, get
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import { ref, onMounted } from 'vue';
|
||||
import type { Model } from './type';
|
||||
import { TABLE_NAME } from '@/utils/enum/tableName';
|
||||
|
||||
const inputTableRef = ref();
|
||||
const outputTableRef = ref();
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<template>
|
||||
<div class="param-setting">
|
||||
<el-card class="algorithm-select" shadow="never">
|
||||
<template #header>算法选择</template>
|
||||
<template #header>{{ $t('数据训练.算法选择') }}</template>
|
||||
<el-radio-group v-model="algorithm" >
|
||||
<el-radio-button v-for="item in algorithmOptions" :key="item.label" :label="item.label" :value="item.value" />
|
||||
</el-radio-group>
|
||||
</el-card>
|
||||
<BaseTable v-if="false" ref="baseTableRef" tableName="DATA_TRAINING_PARAM_SETTING" showIndex :actionsWidth="200" >
|
||||
<BaseTable v-if="false" ref="baseTableRef" :tableName="TABLE_NAME.DATA_TRAINING_PARAM_SETTING" showIndex :actionsWidth="200" >
|
||||
</BaseTable>
|
||||
<el-card shadow="never">
|
||||
<template #header>算法参数设置</template>
|
||||
<TableForm ref="tableFormRef" tableName="DATA_TRAINING_PARAM_SETTING" >
|
||||
<template #header>{{ $t('数据训练.算法参数设置') }}</template>
|
||||
<TableForm ref="tableFormRef" :tableName="TABLE_NAME.DATA_TRAINING_PARAM_SETTING" >
|
||||
</TableForm>
|
||||
</el-card>
|
||||
</div>
|
||||
@@ -22,6 +22,7 @@ import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import TableForm from '@/components/common/table/tableForm.vue';
|
||||
import { CommonStore } from '@/stores/common';
|
||||
import { cloneDeep, isBoolean } from 'lodash-es';
|
||||
import { TABLE_NAME } from '@/utils/enum/tableName';
|
||||
|
||||
interface Props {
|
||||
param: any;
|
||||
|
||||
@@ -4,19 +4,25 @@
|
||||
<BaseTable
|
||||
showIndex
|
||||
ref="tableRef"
|
||||
tableName="MODEL_TRAINING_LIST"
|
||||
:tableName="TABLE_NAME.MODEL_TRAINING_LIST"
|
||||
:api="getModelTrainingListApi"
|
||||
:searchLimitNum="3"
|
||||
:actionsWidth="tableActionsLength['2-2-2']"
|
||||
:actionList="actionList"
|
||||
:exportApi="exportTrainingListApi"
|
||||
:exportFileName="$t('数据训练.数据训练列表')"
|
||||
:exportDict="{
|
||||
trainingStatus: 'TRAINING_STATUS',
|
||||
algorithmUsed: 'TRAINING_ALGORITHM'
|
||||
}"
|
||||
>
|
||||
<template #leftOptions>
|
||||
<el-button icon="plus" type="primary" @click="addModelFun">新建训练</el-button>
|
||||
<el-button icon="plus" type="primary" @click="addModelFun">{{ $t('数据训练.新建训练') }}</el-button>
|
||||
</template>
|
||||
|
||||
<template #trainUser>
|
||||
<!-- {{ row.createBy }} -->
|
||||
</template>
|
||||
<template #tableActions="{ row }">
|
||||
<!-- <template #tableActions="{ row }">
|
||||
<div class="gl-table-actions">
|
||||
<el-link type="primary" @click="goModelDetailFun(row)">查看</el-link>
|
||||
<el-link type="primary" @click="editTrainingFun(row)">编辑</el-link>
|
||||
@@ -29,21 +35,21 @@
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</div>
|
||||
</template>
|
||||
</template> -->
|
||||
</BaseTable>
|
||||
<Dialog
|
||||
v-model="dialogVisible"
|
||||
:diaTitle="isCreateModal?$t('数据训练.新建训练'):$t('数据训练.编辑训练')"
|
||||
:width="500"
|
||||
:height="500"
|
||||
@close="closeFun"
|
||||
@close="onCancelFun"
|
||||
show-footer
|
||||
>
|
||||
<TableForm ref="tableFormRef" tableName="MODEL_TRAINING_LIST" />
|
||||
<TableForm ref="tableFormRef" :tableName="TABLE_NAME.MODEL_TRAINING_LIST" />
|
||||
<template #footer>
|
||||
<div>
|
||||
<el-button @click="closeFun">取消</el-button>
|
||||
<el-button type="primary" @click="confirmFun">确认</el-button>
|
||||
<el-button @click="onCancelFun">{{ $t('通用.取消') }}</el-button>
|
||||
<el-button type="primary" @click="onConfirmFun">{{ $t('通用.确定') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</Dialog>
|
||||
@@ -53,14 +59,16 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { nextTick, onMounted, reactive, ref } from 'vue';
|
||||
import { computed, nextTick, onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { getModelTrainingListApi, addModelApi, updateModelApi, delModelApi } from '@/api/data/dataForecast';
|
||||
import { getModelTrainingListApi, addModelApi, updateModelApi, delModelApi, exportTrainingListApi } from '@/api/data/dataForecast';
|
||||
import { tableActionsLength } from '@/utils/common';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import Dialog from '@/components/common/dialog/index.vue';
|
||||
import TableForm from '@/components/common/table/tableForm.vue';
|
||||
import modelTraining from './modelTraining.vue';
|
||||
import { TABLE_NAME } from '@/utils/enum/tableName';
|
||||
import i18n from '@/utils/i18n';
|
||||
|
||||
const tableRef = ref();
|
||||
const tableFormRef = ref();
|
||||
@@ -81,7 +89,35 @@ const addModelFun = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const closeFun = () => {
|
||||
const actionList = computed(() => {
|
||||
return [
|
||||
{
|
||||
title: i18n?.global?.t('通用.查看'),
|
||||
type: 'primary',
|
||||
click: (row: any) => {
|
||||
goModelDetailFun(row);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18n?.global?.t('通用.编辑'),
|
||||
type: 'primary',
|
||||
click: (row: any) => {
|
||||
editTrainingFun(row);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18n?.global?.t('通用.删除'),
|
||||
needConfirm: true,
|
||||
confirmText: i18n?.global?.t('通用.确认删除吗'),
|
||||
type: 'danger',
|
||||
click: (row: any) => {
|
||||
delModelFun(row.id);
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
});
|
||||
const onCancelFun = () => {
|
||||
dialogVisible.value = false;
|
||||
};
|
||||
|
||||
@@ -112,7 +148,7 @@ const delModelFun = async (id: number) => {
|
||||
}
|
||||
};
|
||||
|
||||
const confirmFun = async() => {
|
||||
const onConfirmFun = async() => {
|
||||
const valid = await tableFormRef.value?.validateFun();
|
||||
if (valid) {
|
||||
const formData = tableFormRef.value?.getFormDataFun();
|
||||
|
||||
@@ -225,9 +225,9 @@
|
||||
</div>
|
||||
|
||||
<div class="options">
|
||||
<el-button class="step-btn" @click="handleChangeStep('pre')" :disabled="currentStep < 0">上一步</el-button>
|
||||
<el-button v-if="currentStep === 1" class="step-btn" type="primary" @click="beginTrainingFun">开始训练</el-button>
|
||||
<el-button class="step-btn" @click="handleChangeStep('next')" :disabled="currentStep >= 2"> 下一步
|
||||
<el-button class="step-btn" @click="handleChangeStep('pre')" :disabled="currentStep < 0">{{ $t('通用.上一步') }}</el-button>
|
||||
<el-button v-if="currentStep === 1" class="step-btn" type="primary" @click="beginTrainingFun">{{ $t('数据训练.开始训练') }}</el-button>
|
||||
<el-button class="step-btn" @click="handleChangeStep('next')" :disabled="currentStep >= 2"> {{ $t('通用.下一步') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<Dialog
|
||||
|
||||
Reference in New Issue
Block a user