update:新增代办

This commit is contained in:
2026-04-08 13:45:01 +08:00
parent 7bdf77a4d8
commit 248e7d28cb
9 changed files with 232 additions and 63 deletions

41
.env.190100 Normal file
View File

@@ -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/

View File

@@ -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"
}
}
}

View File

@@ -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,
});
}
};

View File

@@ -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,
});
}
};

View File

@@ -25,6 +25,7 @@
}"
:hideKeys="hideKeys"
:colNum="3"
@change="changeFun"
/>
</div>
</div>
@@ -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<any>({});
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);

View File

@@ -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 || [];
};

View File

@@ -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,
});
}
};

View File

@@ -37,6 +37,17 @@
/>
</el-select>
</template>
<!-- ep 的仿真用途 -->
<template #form-simulationPurpose>
<el-select v-model="editFormInfo.simulationPurpose" filterable placeholder="请选择">
<el-option
v-for="item in finiteElementPurposeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</TableForm>
</div>
</div>
@@ -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<any>({});
const deptOptions = ref<any>([]);
const finiteElementPurposeOptions = ref<any>([]);
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') {
}
};

View File

@@ -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,
});
}
};