小优化

This commit is contained in:
weibl
2026-03-14 11:30:25 +08:00
parent 95d4cda021
commit dc3ddb6ca1
4 changed files with 40 additions and 27 deletions

View File

@@ -129,22 +129,22 @@ const changeFun = async (val: any) => {
// }
// }
};
const setHideKeys = (key: string) => {
if (key === 'DEMAND_TYPE1') {
hideKeys.value = [
'downAttachments',
'simulationPurpose',
'animationPurpose',
'simulationDemand',
];
} else if (key === 'DEMAND_TYPE2') {
hideKeys.value = ['downAttachments', 'animationPurpose', 'simulationDemand'];
} else if (key === 'DEMAND_TYPE3') {
hideKeys.value = ['downAttachments', 'simulationPurpose', 'simulationDemand'];
} else if (key === 'DEMAND_TYPE4') {
hideKeys.value = ['downAttachments', 'simulationPurpose', 'animationPurpose'];
}
};
// const setHideKeys = (key: string) => {
// if (key === 'DEMAND_TYPE1') {
// hideKeys.value = [
// 'downAttachments',
// 'simulationPurpose',
// 'animationPurpose',
// 'simulationDemand',
// ];
// } else if (key === 'DEMAND_TYPE2') {
// hideKeys.value = ['downAttachments', 'animationPurpose', 'simulationDemand'];
// } else if (key === 'DEMAND_TYPE3') {
// hideKeys.value = ['downAttachments', 'simulationPurpose', 'simulationDemand'];
// } else if (key === 'DEMAND_TYPE4') {
// hideKeys.value = ['downAttachments', 'simulationPurpose', 'animationPurpose'];
// }
// };
const deptOptions = ref<any[]>([]);

View File

@@ -52,6 +52,9 @@ export const getDemandHideKeys = (key: string) => {
} else if (key.indexOf('公差') !== -1) {
const toleranceKeys = [''];
keys = allKeys.filter((item) => !toleranceKeys.includes(item));
} else if (key.indexOf('物流') !== -1) {
const logistics = ['robotBrand', 'axis', 'robotNum', 'robotNum6'];
keys = allKeys.filter((item) => !logistics.includes(item));
}
return keys;
};

View File

@@ -436,14 +436,14 @@ const getLoadcaseList = async (flag?: string) => {
const sendFormRef = ref();
const sendFormRules = reactive<any>({
insertIndex: [{ required: true, message: '请选择上层节点', trigger: 'change' }],
currentLoadcaseLib: [{ required: true, message: '请选择工况库', trigger: 'change' }],
currentLoadcaseLibVersion: [{ required: true, message: '请选择工况库版本', trigger: 'change' }],
chooseTaskList: [{ required: true, message: '请选择分发的任务', trigger: 'change' }],
eMemberList: [{ required: true, message: '请选择仿真执行人', trigger: 'change' }],
taskName: [{ required: true, message: '请填写任务名称', trigger: 'blur' }],
});
// const sendFormRules = reactive<any>({
// insertIndex: [{ required: true, message: '请选择上层节点', trigger: 'change' }],
// currentLoadcaseLib: [{ required: true, message: '请选择工况库', trigger: 'change' }],
// currentLoadcaseLibVersion: [{ required: true, message: '请选择工况库版本', trigger: 'change' }],
// chooseTaskList: [{ required: true, message: '请选择分发的任务', trigger: 'change' }],
// eMemberList: [{ required: true, message: '请选择仿真执行人', trigger: 'change' }],
// taskName: [{ required: true, message: '请填写任务名称', trigger: 'blur' }],
// });
const taskTreeRef = ref();

View File

@@ -72,11 +72,14 @@
workspaceCode: {
filterable: true,
},
attachments: {
remark: attachmentRemark,
},
}"
:colNum="2"
:hideKeys="hideKeys.concat(formHideKeys)"
v-model:data="editFormInfo"
@change="changeFun($event, 'form')"
@change="changeFun($event)"
@load="loadTableForm"
>
<template #form-pMemberList v-if="enableConfigByTenant([TENANT_ENUM.LYRIC])">
@@ -113,7 +116,7 @@
</template>
<script setup lang="ts">
import { nextTick, reactive, ref } from 'vue';
import { computed, nextTick, reactive, ref } from 'vue';
import Dialog from '@/components/common/dialog/index.vue';
import TableForm from '@/components/common/table/tableForm.vue';
import {
@@ -547,6 +550,13 @@ const currentProjectUndertaker = ref('');
const simulationTypeList = ref(commonStore.getDictData('SIMULATION_TYPE').A);
const simulationType = ref(simulationTypeList.value[0].value);
const attachmentRemark = computed(() => {
if (simulationType.value.indexOf('有限元') !== -1) {
return '需要上传工位截图';
}
return '';
});
const changeSimulationType = (val: string) => {
let simTypeList = [];
simTypeList = commonStore.getDictData(val).A;
@@ -554,7 +564,7 @@ const changeSimulationType = (val: string) => {
formHideKeys.value = getDemandHideKeys(val);
};
const changeFun = async (val: any, type: string) => {
const changeFun = async (val: any) => {
// console.log('val', val);
// const formData = tableFormRef.value.getFormDataFun();
// editFormInfo.value = { ...formData };