2026-04-02 08:55:23 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="comp-industry">
|
|
|
|
|
<div class="content">
|
|
|
|
|
<div class="tips">
|
|
|
|
|
<PlanningInformation data="工业设计" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form">
|
|
|
|
|
<TableForm
|
|
|
|
|
ref="TableFormRef"
|
|
|
|
|
tableName="SIMULATION_TASK_DEMAND_INDUSTRIAL_CREATE"
|
|
|
|
|
v-model:data="editFormInfo"
|
|
|
|
|
:formAttrs="{
|
2026-04-03 15:05:42 +08:00
|
|
|
projectId: {
|
|
|
|
|
auth: false,
|
|
|
|
|
},
|
|
|
|
|
workspaceCode: {
|
|
|
|
|
filterable: true,
|
|
|
|
|
},
|
2026-04-02 08:55:23 +08:00
|
|
|
endTime: {
|
|
|
|
|
remarkText: endTimeRemark,
|
|
|
|
|
},
|
|
|
|
|
attachments: {
|
|
|
|
|
remarkText: attachmentRemark,
|
|
|
|
|
},
|
|
|
|
|
}"
|
|
|
|
|
:hideKeys="hideKeys"
|
|
|
|
|
:colNum="3"
|
2026-04-08 13:45:01 +08:00
|
|
|
@change="changeFun"
|
2026-04-02 08:55:23 +08:00
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { ref } from 'vue';
|
|
|
|
|
import PlanningInformation from '@/tenants/lyric/views/task/components/planningInformation.vue';
|
|
|
|
|
import TableForm from '@/components/common/table/tableForm.vue';
|
2026-04-08 13:45:01 +08:00
|
|
|
import {
|
|
|
|
|
setPhaseListByProjectId,
|
|
|
|
|
setMachineListByPhaseId,
|
|
|
|
|
setWorkspaceListByMachineId,
|
|
|
|
|
} from './lib';
|
2026-04-02 08:55:23 +08:00
|
|
|
|
|
|
|
|
const emits = defineEmits(['submit']);
|
|
|
|
|
const TableFormRef = ref();
|
|
|
|
|
const hideKeys = ref([
|
|
|
|
|
'downAttachments',
|
|
|
|
|
'simulationPurpose',
|
|
|
|
|
'animationPurpose',
|
|
|
|
|
'fluidPurpose',
|
|
|
|
|
'robotBrand',
|
|
|
|
|
'axis',
|
|
|
|
|
'beatDemand',
|
|
|
|
|
'robotNum',
|
|
|
|
|
'robotNum6',
|
|
|
|
|
'isMoldMaking',
|
|
|
|
|
'materialNo',
|
|
|
|
|
'designExp',
|
|
|
|
|
]);
|
|
|
|
|
const endTimeRemark = ref('【需求时间】请参考发图时间或客户评审时间');
|
|
|
|
|
const attachmentRemark = ref('必须上传附件!');
|
|
|
|
|
|
|
|
|
|
const editFormInfo = ref<any>({});
|
|
|
|
|
|
2026-04-08 13:45:01 +08:00
|
|
|
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,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2026-04-02 08:55:23 +08:00
|
|
|
const submitFun = async () => {
|
|
|
|
|
if (await TableFormRef.value.validateFun()) {
|
|
|
|
|
emits('submit', editFormInfo.value);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
defineExpose({
|
|
|
|
|
submitFun,
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped></style>
|