This commit is contained in:
2026-04-03 15:05:42 +08:00
parent ecae3cd290
commit b95a102d83
9 changed files with 76 additions and 5 deletions

View File

@@ -291,6 +291,8 @@ const updateNavFun = (data: any) => {
};
const reloadFun = () => {
expandedKeys.value = [];
currentKey.value = '';
navList.value = [];
visible.value = false;
setTimeout(() => {

View File

@@ -13,6 +13,9 @@
projectId: {
auth: false,
},
workspaceCode: {
filterable: true,
},
endTime: {
remarkText: endTimeRemark,
},

View File

@@ -13,6 +13,12 @@
projectId: {
auth: false,
},
workspaceCode: {
filterable: true,
},
description: {
placeholder: '输入条件1、3D模型 2、xxx输出结果xxx变形量xxx应力值',
},
endTime: {
remarkText: endTimeRemark,
},

View File

@@ -20,7 +20,7 @@
<div class="card-item">
<div class="content" @click="openFun('industry')">
<div class="pic">
<el-image class="img" fit="cover" :src="blueBg" />
<el-image class="img" fit="cover" :src="greenBg" />
</div>
<div class="title">工业设计待办</div>
</div>
@@ -36,7 +36,7 @@
<div class="card-item">
<div class="content" @click="openFun('finiteElement')">
<div class="pic">
<el-image class="img" fit="cover" :src="greenBg" />
<el-image class="img" fit="cover" :src="blueBg" />
</div>
<div class="title">有限元仿真待办</div>
</div>
@@ -49,6 +49,14 @@
<div class="title">物流仿真待办</div>
</div>
</div>
<div class="card-item">
<div class="content">
<div class="pic">
<el-image class="img" fit="cover" :src="blueBg" />
</div>
<div class="title">仿真策划</div>
</div>
</div>
</div>
</div>
<Dialog
@@ -58,7 +66,7 @@
height="90%"
@close="closeFun"
>
<div>
<div v-if="diaVisible">
<Animation v-if="currentName === 'animation'" ref="CurrentRef" @submit="submitFun" />
<FiniteElement v-if="currentName === 'finiteElement'" ref="CurrentRef" @submit="submitFun" />
<Industry v-if="currentName === 'industry'" ref="CurrentRef" @submit="submitFun" />

View File

@@ -10,6 +10,12 @@
tableName="SIMULATION_TASK_DEMAND_INDUSTRIAL_CREATE"
v-model:data="editFormInfo"
:formAttrs="{
projectId: {
auth: false,
},
workspaceCode: {
filterable: true,
},
endTime: {
remarkText: endTimeRemark,
},

View File

@@ -49,11 +49,21 @@ export const setPhaseListByProjectId = async (data: any) => {
const options = await getNodeListData(nodeId, 'phase');
ref.setOptionsFun('phaseName', options);
ref.setOptionsFun('phaseId', options);
const current = options[0];
let defaultIndex = 0;
const currentPhaseIndex = options.findIndex((item: any) => {
return item.label === cbData.val?.currentPhase;
});
if (currentPhaseIndex > 0) {
defaultIndex = currentPhaseIndex;
}
const current = options[defaultIndex];
formData.phaseId = current.value;
formData.phaseName = current.label;
formData.selectPhaseName = current.label;
for (let index = 0; index < cbData.val.extras.length; index++) {
if (cbData.val.extras[index]?.propertyName === 'projectUndertaker') {
formData.projectUndertaker = cbData.val.extras[index]?.propertyValue || '';
}
if (cbData.val.extras[index]?.propertyName === 'produceLine') {
formData.produceLine = cbData.val.extras[index]?.propertyValue;
}
@@ -65,7 +75,8 @@ export const setWorkspaceListByPhaseId = async (data: any) => {
const { nodeId, formData, ref } = data;
const options = await getNodeListData(nodeId, 'workspace');
ref.setOptionsFun('workspaceCode', options);
const current = options[0];
const defaultIndex = 0;
const current = options[defaultIndex];
formData.workspaceId = current.value;
formData.workspaceCode = current.value;
formData.workspaceName = current.label;

View File

@@ -13,8 +13,13 @@
projectId: {
auth: false,
},
workspaceCode: {
filterable: true,
},
endTime: {
remarkText: endTimeRemark,
'disabled-date': disabledEndDateFun,
'disabled-hours': disabledEndHoursFun,
},
attachments: {
remarkText: attachmentRemark,
@@ -51,6 +56,7 @@ import {
setWorkspaceListByPhaseId,
getSimTypeList,
} from './lib';
import dayjs from 'dayjs';
const emits = defineEmits(['submit']);
const TableFormRef = ref();
@@ -110,6 +116,29 @@ const submitFun = async () => {
}
};
const disabledEndDateFun = (time: any) => {
return new Date().getTime() + 2 * 24 * 60 * 60 * 1000 > time.getTime();
};
const disabledEndHoursFun = () => {
// 物流仿真只能选择三天后的时间,精确到小时
const currentTime = new Date(editFormInfo.value.endTime).getTime();
if (
new Date().getTime() + 2 * 24 * 60 * 60 * 1000 <= currentTime &&
new Date().getTime() + 3 * 24 * 60 * 60 * 1000 >= currentTime
) {
const hour = dayjs(new Date()).get('hour');
const num = [];
for (let index = 0; index < 24; index++) {
if (hour > index) {
num.push(index);
}
}
return num;
}
return [];
};
defineExpose({
submitFun,
});

View File

@@ -13,6 +13,9 @@
projectId: {
auth: false,
},
workspaceCode: {
filterable: true,
},
endTime: {
remarkText: endTimeRemark,
},

View File

@@ -13,6 +13,9 @@
projectId: {
auth: false,
},
workspaceCode: {
filterable: true,
},
endTime: {
remarkText: endTimeRemark,
},