This commit is contained in:
2025-11-13 14:31:15 +08:00
parent 0afa8fad54
commit 2a9c088666
33 changed files with 50 additions and 106 deletions

View File

@@ -1,4 +1,4 @@
import { get, post } from '@/api/request';
import { post } from '@/api/request';
const env = import.meta.env;
const PREFIX = env.VITE_API_PREFIX_PROJECT;

View File

@@ -18,7 +18,7 @@ import { systemApproveQueryApproveFlowTempalteApi } from '@/api/system/systemApp
interface Props {
modelValue: string;
disabled: boolean;
disabled?: boolean;
}
const props = withDefaults(defineProps<Props>(), {

View File

@@ -20,7 +20,7 @@ import { queryNodeListApi } from '@/api/project/node';
interface Props {
modelValue: string;
multiple?: boolean;
disabled: boolean;
disabled?: boolean;
}
const props = withDefaults(defineProps<Props>(), {

View File

@@ -169,8 +169,6 @@
import { ref, onMounted, nextTick } from 'vue';
import { Plus } from '@element-plus/icons-vue';
import TreeCaseTable from '@/components/common/treeCaseTable/treeTable.vue';
import Dialog from '@/components/common/dialog/index.vue';
import UploadImg from '@/components/common/uploadImg/index.vue';
import { getTagKeyMap, NODE_TYPE } from '@/utils/enum/node';
import { canAddChild } from '@/utils/node';
import nodeDetailDialog from './nodeDetailDialog.vue';
@@ -357,7 +355,7 @@ const onNodeDetailConfirmFun = (formData: any) => {
eMemberList: formData.eMemberListArr,
pMemberList: formData.pMemberListArr,
};
getVxeRef().setRow(item, rowInfo).then(res => {
getVxeRef().setRow(item, rowInfo).then((res: any) => {
console.log('res', res);
});
}

View File

@@ -20,7 +20,7 @@ import { userListUserApi } from '@/api/system/user';
interface Props {
modelValue: string;
multiple?: boolean;
disabled: boolean;
disabled?: boolean;
}
const props = withDefaults(defineProps<Props>(), {

View File

@@ -1,4 +1,5 @@
import { defineStore } from 'pinia';
// import { useRouter } from 'vue-router';
// import router from '@/router';
// import { websocketPrefixPath } from '@/components/loadCaseTable/config/config';

View File

@@ -257,7 +257,7 @@
<script lang="ts" setup>
import { computed, nextTick, onMounted, ref, type Ref } from 'vue';
import { ElMessageBox, ElMessage } from 'element-plus';
import { clone, cloneDeep, groupBy, isEqual } from 'lodash-es';
import { cloneDeep, groupBy, isEqual } from 'lodash-es';
import { onBeforeRouteLeave, useRouter } from 'vue-router';
import loadcaseProTable from '@/components/loadCaseTable/commonTable/loadcaseProTable.vue';
import loadCaseTable from '@/components/common/treeCaseTable/loadCaseTable.vue';

View File

@@ -22,7 +22,7 @@
<el-button type="primary" @click="showCompareListFn">查看对比池</el-button>
<el-button type="primary" @click="compareFn('仿真工况')">对比</el-button>
</template>
<template #tableActions="{row}">
<template #tableActions>
<el-link type="primary">查看详情</el-link>
</template>
</BaseTable>
@@ -48,7 +48,7 @@
<el-button type="primary" @click="showCompareListFn">查看对比池</el-button>
<el-button type="primary" @click="compareFn('仿真算例')">对比</el-button>
</template>
<template #tableActions="{row}">
<template #tableActions>
<el-link type="primary">查看详情</el-link>
</template>
</BaseTable>

View File

@@ -58,14 +58,13 @@
import { getModelTrainingListApi, startPredictApi, getModelPredictResultApi, getHandleLoadDataResultApi } from '@/api/data/dataForecast';
import BaseTable from '@/components/common/table/baseTable.vue';
import { ref, onMounted } from 'vue';
import type{ Ref } from 'vue';
import type { Model } from './type';
const inputTableRef = ref();
const outputTableRef = ref();
const selectedModel = ref({} as Model);
const modelOptions:Ref<Model[]> = ref([]);
const modelOptions: any = ref([]);
const queryModelListFun = async () => {
const req = {

View File

@@ -154,6 +154,7 @@
import { ref, onMounted } from 'vue';
import FileTree from '@/components/common/dataFileTree/index.vue';
import { getSimulationNodeTreeApi, getAllTemplateApi } from '@/api/data/dimensionTemplate';
import { addNodeApi } from '@/api/project/node';
import { dataOverViewListSimulationNodeFilesApi, dataOverViewDeleteSimulationNodeFilesApi, dataOverViewUploadSimulationNodeFilesApi } from '@/api/data/dataOverView';
import BaseTable from '@/components/common/table/baseTable.vue';
import Configuration from './components/configuration.vue';
@@ -165,6 +166,7 @@ import NodeDetailDialog from '@/components/common/treeCaseTable/nodeDetailDialog
import { ElMessage, ElMessageBox } from 'element-plus';
import ProjectInfoDialog from '@/components/project/projectInfoDialog.vue';
import { CirclePlus, Upload, Edit, Refresh, Delete, Folder, Document } from '@element-plus/icons-vue';
import { getTagMapList } from '@/views/task/projectDetail/components/project';
import { NODE_TYPE } from '@/utils/enum/node';
import { useDict } from '@/utils/useDict';
import { formatFileSize } from '@/utils/file';
@@ -284,7 +286,19 @@ const searchFileFun = (data: any) => {
};
const addNodeFun = (data: any) => {
console.log(data);
const params = {
addNodeList: [{
...data,
pid: currentData.value.relatedResourceUuid,
}],
tagMap: getTagMapList(),
};
addNodeApi(params).then((res: any) => {
if (res.code === 200) {
ElMessage.success('操作成功');
reloadFun();
}
});
};
const openAddDirFun = () => {

View File

@@ -116,15 +116,6 @@ tableData.value = [
// },
];
const headData = ref<any[]>([
{ title: '名称', field: 'nickname', isShow: true },
{ title: '读', field: 'read', isShow: true },
{ title: '写', field: 'write', isShow: true },
{ title: '删除', field: 'delete', isShow: true },
{ title: '导入', field: 'input', isShow: true },
{ title: '导出', field: 'output', isShow: true },
]);
const userRoleForm = reactive<any>({
read: true,
write: false,

View File

@@ -53,7 +53,7 @@
</template>
<script setup lang="ts">
import { ref, defineProps, defineEmits, reactive } from 'vue';
import { ref, reactive } from 'vue';
import BaseTable from '@/components/common/table/baseTable.vue';
import { listBigFileApi, batchDeleteBigFileApi } from '@/api/data/data';
import { ElMessage } from 'element-plus';

View File

@@ -58,9 +58,9 @@
</template>
<script setup lang="ts">
import { ref, defineProps, defineEmits, reactive } from 'vue';
import { ref, reactive } from 'vue';
import BaseTable from '@/components/common/table/baseTable.vue';
import { listUserQuotaApi, addUserQuotaApi, batchUpdateUserQuotaApi } from '@/api/data/data';
import { listUserQuotaApi, batchUpdateUserQuotaApi } from '@/api/data/data';
import TableForm from '@/components/common/table/tableForm.vue';
import { ElMessage } from 'element-plus';

View File

@@ -13,7 +13,7 @@
<el-button icon="plus" type="primary" @click="addModelFun">新建训练</el-button>
</template>
<template #trainUser="{row}">
<template #trainUser>
<!-- {{ row.createBy }} -->
</template>
<template #tableActions="{ row }">

View File

@@ -81,7 +81,7 @@ export class AlgorithmOptions {
* @returns {Function} 防抖后的函数
*/
let timer: any = null; // 定时器
export function debounce(func, wait) {
export function debounce(func: any, wait: any) {
// 如果已有定时器,清除它
if (timer) {
clearTimeout(timer);
@@ -99,6 +99,6 @@ export function debounce(func, wait) {
* @param arr2
* @returns
*/
export function hasCommonItem(arr1, arr2) {
return arr1.some((item) => arr2.includes(item));
export function hasCommonItem(arr1: any, arr2: any) {
return arr1.some((item: any) => arr2.includes(item));
}

View File

@@ -145,8 +145,8 @@
v-model:value="algorithmParamForm.trainingRatio"
:min="0"
:max="100"
:formatter="(value) => `${value}%`"
:parser="(value) => value.replace('%', '')"
:formatter="(value: any) => `${value}%`"
:parser="(value: any) => value.replace('%', '')"
/>
<!-- <el-input-number :max="1" :min="0" v-model:value="algorithmParamForm.trainingRatio" /> -->
</el-form-item>
@@ -296,10 +296,9 @@
</template>
<script setup lang="ts">
import { nextTick, onBeforeUnmount, onMounted, reactive, ref, watchEffect, watch, computed, type PropType } from 'vue';
import { nextTick, onBeforeUnmount, onMounted, reactive, ref, watchEffect, computed, type PropType } from 'vue';
import attachmentTable from './components/attachmentTable.vue';
import { AlgorithmOptions, AlgorithmType, hasCommonItem, ModelStatus } from './model.ts';
import { averageData, sourceData } from './data.ts';
import { tableActionsLength } from '@/utils/common';
import BaseTable from '@/components/common/table/baseTable.vue';
import { ElMessage } from 'element-plus';
@@ -387,9 +386,6 @@ const columns: any = ref([
// { dataIndex: 'loadcaseName', title: '所属分析项', width: 200, ellipsis: true },
]);
// 导入的文件列表
const sourceFileList = ref<any[]>([]);
// 当前选中的文件名
const currentFileName = ref('');
@@ -572,11 +568,7 @@ const escapeHtml = (str: string) => {
.replace(/"/g, '&quot;')
.replace(/'/g, '&#39;');
};
const formatLogToHtml = (log = '', maxLines = 200) => {
const lines = log.split(/\r?\n/);
const lastLines = lines.slice(Math.max(0, lines.length - maxLines));
return escapeHtml(lastLines.join('\n')).replace(/\r?\n/g, '<br/>');
};
const renderCurveFun = (curveData: any) => {
initEcharts('curve', 'curve', 'lineChart', {
title: {

View File

@@ -143,19 +143,19 @@ const currentScriptIndex = ref(-1);
const scriptLanguage = ref('javascript');
// 添加脚本
const addScript = (type) => {
const addScript = (type: any) => {
const scripts = type === 'pre' ? preScripts : postScripts;
scripts.value.push({ name: '', content: '' });
};
// 移除脚本
const removeScript = (type, index) => {
const removeScript = (type: any, index: any) => {
const scripts = type === 'pre' ? preScripts : postScripts;
scripts.value.splice(index, 1);
};
// 编辑脚本
const editScript = (script, type, index) => {
const editScript = (script: any, type: any, index: any) => {
currentScript.value = { ...script };
currentScriptType.value = type;
currentScriptIndex.value = index;
@@ -204,9 +204,6 @@ const clearAllPostScripts = () => {
display: flex;
align-items: center;
justify-content: space-between;
.el-input {
// width: 85%;
}
img {
width: 20px;
margin-left: var(--margin-small);

View File

@@ -20,10 +20,8 @@
flex-shrink: 0;
}
.back {
width: 15px;
margin-right: var(--margin-small);
}
.name {
width: 15px;
margin-right: var(--margin-small);
}
.line {
color: #7F7F7F;

View File

@@ -236,12 +236,6 @@ const deleteNodeFun = async (row: any) => {
.projectCenter {
.projectName {
font-size: 14px;
// color: #fff;
}
.phase {
// font-size: 12px;
// color: #fff;
}
}

View File

@@ -66,7 +66,7 @@
</template>
<script lang="ts" setup>
import { nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
import { nextTick, onBeforeUnmount, onMounted, ref } from 'vue';
import BaseTable from '@/components/common/table/baseTable.vue';
import { ElMessage, ElMessageBox } from 'element-plus';
import addOrEditApp from '../application/components/addOrEditApp.vue';

View File

@@ -18,11 +18,8 @@
</template>
<script setup lang="ts">
import { ref, watch, onMounted } from'vue';
import { ref, watch, onMounted } from 'vue';
import { useDict } from '@/utils/useDict';
import { CommonStore } from '@/stores/common';
const store = CommonStore();
const { PROJECT_STATUS, USER_STATUS } = useDict('PROJECT_STATUS', 'USER_STATUS');

View File

@@ -3,8 +3,10 @@
<div class="head">
<el-space>
<el-tabs type="card"
editable >
<el-tabs
type="card"
editable
>
<el-tab-pane
v-for="item in configurationList"
:key="item.id"

View File

@@ -3,7 +3,6 @@
</template>
<script setup lang="ts">
import { ref, defineProps, defineEmits } from 'vue';
</script>

View File

@@ -99,9 +99,8 @@
</div>
</template>
<script lang="ts" setup>
import loadcaseProTable from '@/components/loadCaseTable/commonTable/loadcaseProTable.vue';
import { getProjectColumn } from '@/components/loadCaseTable/utils/project';
import { nextTick, onMounted, ref } from 'vue';
import { onMounted, ref } from 'vue';
import { getTaskTreeFun } from './projectApi';
import { NODE_TYPE } from '@/utils/enum/node';
import { getChildrenNodeListApi } from '@/api/project/node';
@@ -112,7 +111,6 @@ const props = defineProps<{
projectUuid: string;
}>();
const tableRef = ref();
const tableList = ref<any[]>([]);
const tableLoading = ref(false);
const tableColumns = ref<any[]>([]);
@@ -184,10 +182,6 @@ const refreshPhaseList = () => {
getPhaseListApi();
};
const exportTaskFun = () => {
console.log('getCheckboxRecords', tableRef.value.loadcaseTableRef?.proTreeRef?.vxeGridRef.getCheckboxRecords(true));
};
onMounted(async () => {
const columns = await getProjectColumn(['operation']);
getPhaseListApi();

View File

@@ -90,7 +90,7 @@
</template>
<script lang="ts" setup>
import { nextTick, reactive, ref } from 'vue';
import { reactive, ref } from 'vue';
import projectFile from './components/projectFile.vue';
import teamMember from './components/teamMember.vue';
import loadcase from './components/loadcase.vue';
@@ -101,7 +101,6 @@ import baseInfo from './components/baseInfo.vue';
import { editNodeApi } from '@/api/project/node';
import { PROJECT_EXE_STATUS_CODE } from '@/utils/enum/project';
import { ElMessage } from 'element-plus';
import { getProjectExeStatus } from './components/project';
// import { useRoute, useRouter } from 'vue-router';
// import { queryNodeListApi } from '@/api/project/node';
// import { NODE_TYPE } from '@/utils/enum/node';

View File

@@ -73,7 +73,3 @@
width: 140px;
}
}
.right-top-bar button {
// margin-right: 16px;
}

View File

@@ -383,11 +383,6 @@ const deleteNodeFun = async(row:IProjectInfo) => {
font-size: 14px;
// color: #fff;
}
.phase {
// font-size: 12px;
// color: #fff;
}
}
.name {

View File

@@ -102,8 +102,3 @@ onMounted(() => {
});
</script>
<style lang="scss" scoped>
.gl-page-content {
}
</style>

View File

@@ -206,8 +206,3 @@ onMounted(() => {
</script>
<style lang="scss" scoped>
.gl-page-content {
}
</style>

View File

@@ -283,9 +283,6 @@ onMounted(() => {
</script>
<style lang="scss" scoped>
.gl-page-content {
}
.btn-box {
display: flex;
.filter-btn {

View File

@@ -435,9 +435,6 @@ const batchSendFun = () => {
</script>
<style lang="scss" scoped>
.gl-page-content {
}
.loadcase-img {
width: 18px;
vertical-align: text-bottom;

View File

@@ -401,9 +401,3 @@ defineExpose({
tableFormRef,
});
</script>
<style lang="scss" scoped>
.gl-page-content {
}
</style>

View File

@@ -35,4 +35,4 @@ export const disposeTagName = (row:any, nodeType:string) => {
const tagMap = getTagKeyMap();
// console.log('row, nodeType', row, nodeType, tagMap.get(nodeType));
return row[tagMap.get(nodeType)] || '--';
};
};