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

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);