From 248e7d28cb053fd0f02742c18d970d29ba840187 Mon Sep 17 00:00:00 2001 From: lijing1 Date: Wed, 8 Apr 2026 13:45:01 +0800 Subject: [PATCH] =?UTF-8?q?update:=E6=96=B0=E5=A2=9E=E4=BB=A3=E5=8A=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.190100 | 41 +++++++++++++ package.json | 3 +- .../newDemand/components/animation.vue | 29 ++++++---- .../newDemand/components/finiteElement.vue | 29 ++++++---- .../newDemand/components/industry.vue | 34 +++++++++++ .../newDemand/components/lib.ts | 58 +++++++++++++++---- .../newDemand/components/logistics.vue | 29 ++++++---- .../newDemand/components/robot.vue | 43 ++++++++++---- .../newDemand/components/tolerance.vue | 29 ++++++---- 9 files changed, 232 insertions(+), 63 deletions(-) create mode 100644 .env.190100 diff --git a/.env.190100 b/.env.190100 new file mode 100644 index 00000000..7a668a5e --- /dev/null +++ b/.env.190100 @@ -0,0 +1,41 @@ +# 测试环境 +NODE_ENV=190100 +VITE_APP_ENV=190100 +# 租户 +VITE_API_TENANT_NAME = lyric +# http请求的baseUrl,/api为代理字段 +VITE_API_BASE_URL=/api/simulation +# 本地环境http地址,线上通过nginx转发/api到指定服务地址 +VITE_API_HTTP_URL=http://192.168.190.100:7100 +# ws请求的baseUrl,/wsApi为代理字段 +VITE_API_WS_BASE_URL=/wsApi/simulation +# 本地环境ws地址,线上通过nginx转发/wsApi到指定服务地址 +VITE_API_WS_URL=ws://192.168.190.100:7100 +# 静态资源/usr/local/nginx/html/static +VITE_API_STATIC_FILE=http://192.168.190.100:3000/static +# 图片预览地址 +VITE_API_IMAGE_PREVIEW_URL=http://192.168.190.100:3000/imagePreview +# 文件预览地址 +VITE_API_FILE_PREVIEW_URL=http://192.168.190.100:3000/preview/onlinePreview +# 文件下载地址 +VITE_API_DOWNLOAD_URL=http://192.168.190.100:9000 +# onlyOffice服务 +VITE_API_ONLYOFFICE_URL=http://192.168.190.100:18888 +# onlyOffice回调服务 +VITE_API_ONLYOFFICE_CALLBACK=http://192.168.190.100:3000/api/simulation/data/data/onlyOfficeCallback +# 基线地址,用于onlyOffice预览 +VITE_API_SPDM_URL=http://192.168.190.100:3000/spdm +# CID地址 +VITE_API_CID_URL=http://192.168.190.100:3001 + +VITE_API_PREFIX_APPROVE=/approve/ +VITE_API_PREFIX_CAPABILITY=/capability/ +VITE_API_PREFIX_DATA=/data/ +VITE_API_PREFIX_PBS=/pbs/ +VITE_API_PREFIX_PERFORMANCE=/performance/ +VITE_API_PREFIX_PROJECT=/project/ +VITE_API_PREFIX_SYSTEM=/system/ +VITE_API_PREFIX_TASK=/task/ +VITE_API_PREFIX_APPLICATION=/application/ +VITE_API_PREFIX_FLOWABLE=/flowable/ +VITE_API_PREFIX_JOB=/downBigFile/ \ No newline at end of file diff --git a/package.json b/package.json index afa456cf..18e51caa 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "dev": "vite --mode development", "build:dev": "vite build --mode development", "build:lyric": "vite build --mode lyric", + "build:190100": "vite build --mode 190100", "build:eontec": "vite build --mode eontec", "build:test": "vite build --mode test", "build:prod": "vite build --mode production", @@ -81,4 +82,4 @@ "vite-plugin-vue-devtools": "^8.0.0", "vue-tsc": "^3.0.4" } -} +} \ No newline at end of file diff --git a/src/views/task/simulationTask/newDemand/components/animation.vue b/src/views/task/simulationTask/newDemand/components/animation.vue index 12075043..91fbd001 100644 --- a/src/views/task/simulationTask/newDemand/components/animation.vue +++ b/src/views/task/simulationTask/newDemand/components/animation.vue @@ -51,7 +51,8 @@ import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant'; import { getDeptListData, setPhaseListByProjectId, - setWorkspaceListByPhaseId, + setMachineListByPhaseId, + setWorkspaceListByMachineId, getSimTypeList, } from './lib'; @@ -87,21 +88,29 @@ onMounted(async () => { const changeFun = async (cbData: any) => { const { key, data } = cbData; - if (key === 'projectId') { + if (['projectId'].includes(key)) { await setPhaseListByProjectId({ nodeId: data.projectId, formData: editFormInfo.value, ref: TableFormRef.value, cbData, }); - if (editFormInfo.value.phaseId) { - await setWorkspaceListByPhaseId({ - nodeId: editFormInfo.value.phaseId, - formData: editFormInfo.value, - ref: TableFormRef.value, - cbData, - }); - } + } + if (['projectId', 'phaseId'].includes(key)) { + await setMachineListByPhaseId({ + nodeId: editFormInfo.value.phaseId, + formData: editFormInfo.value, + ref: TableFormRef.value, + cbData, + }); + } + if (['projectId', 'phaseId', 'machineId'].includes(key)) { + await setWorkspaceListByMachineId({ + nodeId: editFormInfo.value.machineId, + formData: editFormInfo.value, + ref: TableFormRef.value, + cbData, + }); } }; diff --git a/src/views/task/simulationTask/newDemand/components/finiteElement.vue b/src/views/task/simulationTask/newDemand/components/finiteElement.vue index e10768f8..0e7e16c5 100644 --- a/src/views/task/simulationTask/newDemand/components/finiteElement.vue +++ b/src/views/task/simulationTask/newDemand/components/finiteElement.vue @@ -57,7 +57,8 @@ import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant'; import { getDeptListData, setPhaseListByProjectId, - setWorkspaceListByPhaseId, + setMachineListByPhaseId, + setWorkspaceListByMachineId, getSimTypeList, } from './lib'; @@ -99,21 +100,29 @@ onMounted(async () => { const changeFun = async (cbData: any) => { const { key, data } = cbData; - if (key === 'projectId') { + if (['projectId'].includes(key)) { await setPhaseListByProjectId({ nodeId: data.projectId, formData: editFormInfo.value, ref: TableFormRef.value, cbData, }); - if (editFormInfo.value.phaseId) { - await setWorkspaceListByPhaseId({ - nodeId: editFormInfo.value.phaseId, - formData: editFormInfo.value, - ref: TableFormRef.value, - cbData, - }); - } + } + if (['projectId', 'phaseId'].includes(key)) { + await setMachineListByPhaseId({ + nodeId: editFormInfo.value.phaseId, + formData: editFormInfo.value, + ref: TableFormRef.value, + cbData, + }); + } + if (['projectId', 'phaseId', 'machineId'].includes(key)) { + await setWorkspaceListByMachineId({ + nodeId: editFormInfo.value.machineId, + formData: editFormInfo.value, + ref: TableFormRef.value, + cbData, + }); } }; diff --git a/src/views/task/simulationTask/newDemand/components/industry.vue b/src/views/task/simulationTask/newDemand/components/industry.vue index 49d07dc8..ea677122 100644 --- a/src/views/task/simulationTask/newDemand/components/industry.vue +++ b/src/views/task/simulationTask/newDemand/components/industry.vue @@ -25,6 +25,7 @@ }" :hideKeys="hideKeys" :colNum="3" + @change="changeFun" /> @@ -35,6 +36,11 @@ import { ref } from 'vue'; import PlanningInformation from '@/tenants/lyric/views/task/components/planningInformation.vue'; import TableForm from '@/components/common/table/tableForm.vue'; +import { + setPhaseListByProjectId, + setMachineListByPhaseId, + setWorkspaceListByMachineId, +} from './lib'; const emits = defineEmits(['submit']); const TableFormRef = ref(); @@ -57,6 +63,34 @@ const attachmentRemark = ref('必须上传附件!'); const editFormInfo = ref({}); +const changeFun = async (cbData: any) => { + const { key, data } = cbData; + if (['projectId'].includes(key)) { + await setPhaseListByProjectId({ + nodeId: data.projectId, + formData: editFormInfo.value, + ref: TableFormRef.value, + cbData, + }); + } + if (['projectId', 'phaseId'].includes(key)) { + await setMachineListByPhaseId({ + nodeId: editFormInfo.value.phaseId, + formData: editFormInfo.value, + ref: TableFormRef.value, + cbData, + }); + } + if (['projectId', 'phaseId', 'machineId'].includes(key)) { + await setWorkspaceListByMachineId({ + nodeId: editFormInfo.value.machineId, + formData: editFormInfo.value, + ref: TableFormRef.value, + cbData, + }); + } +}; + const submitFun = async () => { if (await TableFormRef.value.validateFun()) { emits('submit', editFormInfo.value); diff --git a/src/views/task/simulationTask/newDemand/components/lib.ts b/src/views/task/simulationTask/newDemand/components/lib.ts index 8b5f9e01..6b373dad 100644 --- a/src/views/task/simulationTask/newDemand/components/lib.ts +++ b/src/views/task/simulationTask/newDemand/components/lib.ts @@ -22,7 +22,7 @@ export const getDeptListData = async () => { return data; }; -// 获取阶段列表 +// 获取节点列表 export const getNodeListData = async (nodeId: any, nodeType: any) => { const params = { current: 1, @@ -46,9 +46,15 @@ export const getNodeListData = async (nodeId: any, nodeType: any) => { // 根据项目设置阶段 export const setPhaseListByProjectId = async (data: any) => { const { nodeId, formData, ref, cbData } = data; + ref.setOptionsFun('phaseId', []); + if (!nodeId) { + return; + } const options = await getNodeListData(nodeId, 'phase'); - ref.setOptionsFun('phaseName', options); ref.setOptionsFun('phaseId', options); + formData.phaseId = ''; + formData.phaseName = ''; + formData.selectPhaseName = ''; let defaultIndex = 0; const currentPhaseIndex = options.findIndex((item: any) => { return item.label === cbData.val?.currentPhase; @@ -57,9 +63,11 @@ export const setPhaseListByProjectId = async (data: any) => { defaultIndex = currentPhaseIndex; } const current = options[defaultIndex]; - formData.phaseId = current.value; - formData.phaseName = current.label; - formData.selectPhaseName = current.label; + if (current) { + 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 || ''; @@ -70,18 +78,44 @@ export const setPhaseListByProjectId = async (data: any) => { } }; -// 根据阶段设置工位 -export const setWorkspaceListByPhaseId = async (data: any) => { +// 更具阶段设置机台 +export const setMachineListByPhaseId = async (data: any) => { const { nodeId, formData, ref } = data; - const options = await getNodeListData(nodeId, 'workspace'); - ref.setOptionsFun('workspaceCode', options); + ref.setOptionsFun('machineId', []); + formData.machineId = ''; + if (!nodeId) { + return; + } + const options = await getNodeListData(nodeId, 'machine'); + ref.setOptionsFun('machineId', options); const defaultIndex = 0; const current = options[defaultIndex]; - formData.workspaceId = current.value; - formData.workspaceCode = current.value; - formData.workspaceName = current.label; + if (current) { + formData.machineId = current.value; + } +}; + +// 根据机台设置工位 +export const setWorkspaceListByMachineId = async (data: any) => { + const { nodeId, formData, ref } = data; + ref.setOptionsFun('workspaceId', []); + formData.workspaceId = ''; + if (!nodeId) { + return; + } + const options = await getNodeListData(nodeId, 'workspace'); + ref.setOptionsFun('workspaceId', options); + const defaultIndex = 0; + const current = options[defaultIndex]; + if (current) { + formData.workspaceId = current.value; + } }; export const getSimTypeList = (name: any) => { return CommonStore().getDictData(name)?.A || []; }; + +export const getPurposeList = () => { + return CommonStore().getDictData('FINITE_ELEMENT_SIMULATION_PURPOSE_ALL')?.A || []; +}; diff --git a/src/views/task/simulationTask/newDemand/components/logistics.vue b/src/views/task/simulationTask/newDemand/components/logistics.vue index fb44613e..4460ef09 100644 --- a/src/views/task/simulationTask/newDemand/components/logistics.vue +++ b/src/views/task/simulationTask/newDemand/components/logistics.vue @@ -53,7 +53,8 @@ import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant'; import { getDeptListData, setPhaseListByProjectId, - setWorkspaceListByPhaseId, + setMachineListByPhaseId, + setWorkspaceListByMachineId, getSimTypeList, } from './lib'; import dayjs from 'dayjs'; @@ -92,21 +93,29 @@ onMounted(async () => { const changeFun = async (cbData: any) => { const { key, data } = cbData; - if (key === 'projectId') { + if (['projectId'].includes(key)) { await setPhaseListByProjectId({ nodeId: data.projectId, formData: editFormInfo.value, ref: TableFormRef.value, cbData, }); - if (editFormInfo.value.phaseId) { - await setWorkspaceListByPhaseId({ - nodeId: editFormInfo.value.phaseId, - formData: editFormInfo.value, - ref: TableFormRef.value, - cbData, - }); - } + } + if (['projectId', 'phaseId'].includes(key)) { + await setMachineListByPhaseId({ + nodeId: editFormInfo.value.phaseId, + formData: editFormInfo.value, + ref: TableFormRef.value, + cbData, + }); + } + if (['projectId', 'phaseId', 'machineId'].includes(key)) { + await setWorkspaceListByMachineId({ + nodeId: editFormInfo.value.machineId, + formData: editFormInfo.value, + ref: TableFormRef.value, + cbData, + }); } }; diff --git a/src/views/task/simulationTask/newDemand/components/robot.vue b/src/views/task/simulationTask/newDemand/components/robot.vue index 3f72b9c7..a3b8ff52 100644 --- a/src/views/task/simulationTask/newDemand/components/robot.vue +++ b/src/views/task/simulationTask/newDemand/components/robot.vue @@ -37,6 +37,17 @@ /> + + @@ -51,7 +62,8 @@ import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant'; import { getDeptListData, setPhaseListByProjectId, - setWorkspaceListByPhaseId, + setMachineListByPhaseId, + setWorkspaceListByMachineId, getSimTypeList, } from './lib'; @@ -86,6 +98,7 @@ const attachmentRemark = ref(` const editFormInfo = ref({}); const deptOptions = ref([]); +const finiteElementPurposeOptions = ref([]); onMounted(async () => { deptOptions.value = await getDeptListData(); @@ -94,21 +107,31 @@ onMounted(async () => { const changeFun = async (cbData: any) => { const { key, data } = cbData; - if (key === 'projectId') { + if (['projectId'].includes(key)) { await setPhaseListByProjectId({ nodeId: data.projectId, formData: editFormInfo.value, ref: TableFormRef.value, cbData, }); - if (editFormInfo.value.phaseId) { - await setWorkspaceListByPhaseId({ - nodeId: editFormInfo.value.phaseId, - formData: editFormInfo.value, - ref: TableFormRef.value, - cbData, - }); - } + } + if (['projectId', 'phaseId'].includes(key)) { + await setMachineListByPhaseId({ + nodeId: editFormInfo.value.phaseId, + formData: editFormInfo.value, + ref: TableFormRef.value, + cbData, + }); + } + if (['projectId', 'phaseId', 'machineId'].includes(key)) { + await setWorkspaceListByMachineId({ + nodeId: editFormInfo.value.machineId, + formData: editFormInfo.value, + ref: TableFormRef.value, + cbData, + }); + } + if (key === 'endTime') { } }; diff --git a/src/views/task/simulationTask/newDemand/components/tolerance.vue b/src/views/task/simulationTask/newDemand/components/tolerance.vue index 58f14a30..8cfa794c 100644 --- a/src/views/task/simulationTask/newDemand/components/tolerance.vue +++ b/src/views/task/simulationTask/newDemand/components/tolerance.vue @@ -48,7 +48,8 @@ import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant'; import { getDeptListData, setPhaseListByProjectId, - setWorkspaceListByPhaseId, + setMachineListByPhaseId, + setWorkspaceListByMachineId, getSimTypeList, } from './lib'; @@ -87,21 +88,29 @@ onMounted(async () => { const changeFun = async (cbData: any) => { const { key, data } = cbData; - if (key === 'projectId') { + if (['projectId'].includes(key)) { await setPhaseListByProjectId({ nodeId: data.projectId, formData: editFormInfo.value, ref: TableFormRef.value, cbData, }); - if (editFormInfo.value.phaseId) { - await setWorkspaceListByPhaseId({ - nodeId: editFormInfo.value.phaseId, - formData: editFormInfo.value, - ref: TableFormRef.value, - cbData, - }); - } + } + if (['projectId', 'phaseId'].includes(key)) { + await setMachineListByPhaseId({ + nodeId: editFormInfo.value.phaseId, + formData: editFormInfo.value, + ref: TableFormRef.value, + cbData, + }); + } + if (['projectId', 'phaseId', 'machineId'].includes(key)) { + await setWorkspaceListByMachineId({ + nodeId: editFormInfo.value.machineId, + formData: editFormInfo.value, + ref: TableFormRef.value, + cbData, + }); } };