fix: 找回丢失的代码
This commit is contained in:
@@ -586,15 +586,29 @@ const searchChangeFun = (searchData: any) => {
|
||||
if (val.uuid) {
|
||||
getChildNodeFun('phase');
|
||||
}
|
||||
clearChildOptions(['phaseNodeId', 'machineNodeId', 'workspaceNodeId', 'taskNodeId', 'runId']);
|
||||
clearChildOptions([
|
||||
'phaseNodeId',
|
||||
'machineNodeId',
|
||||
'workspaceNodeId',
|
||||
'taskNodeId',
|
||||
'runId',
|
||||
'disciplineNodeId',
|
||||
]);
|
||||
}
|
||||
|
||||
if (key === 'phaseNodeId') {
|
||||
if (val) {
|
||||
getChildNodeFun('machine');
|
||||
getChildNodeFun('workspace');
|
||||
getChildNodeFun('discipline');
|
||||
}
|
||||
clearChildOptions(['machineNodeId', 'workspaceNodeId', 'taskNodeId', 'runId']);
|
||||
clearChildOptions([
|
||||
'machineNodeId',
|
||||
'workspaceNodeId',
|
||||
'taskNodeId',
|
||||
'runId',
|
||||
'disciplineNodeId',
|
||||
]);
|
||||
}
|
||||
|
||||
if (key === 'machineNodeId') {
|
||||
@@ -619,7 +633,9 @@ const searchChangeFun = (searchData: any) => {
|
||||
}
|
||||
};
|
||||
|
||||
const getChildNodeFun = (nodeType: 'phase' | 'machine' | 'workspace' | 'task' | 'run') => {
|
||||
const getChildNodeFun = (
|
||||
nodeType: 'phase' | 'machine' | 'workspace' | 'task' | 'run' | 'discipline'
|
||||
) => {
|
||||
const searchParams = tableRef.value?.getSearchParamsFun() || {};
|
||||
const params: any = { nodeType };
|
||||
|
||||
@@ -629,6 +645,9 @@ const getChildNodeFun = (nodeType: 'phase' | 'machine' | 'workspace' | 'task' |
|
||||
if (nodeType !== 'phase' && searchParams.phaseNodeId) {
|
||||
params.phaseNodeId = searchParams.phaseNodeId;
|
||||
}
|
||||
if (!['phase', 'discipline'].includes(nodeType) && searchParams.disciplineNodeId) {
|
||||
params.disciplineNodeId = searchParams.disciplineNodeId;
|
||||
}
|
||||
if (!['phase', 'machine'].includes(nodeType) && searchParams.machineNodeId) {
|
||||
params.machineNodeId = searchParams.machineNodeId;
|
||||
}
|
||||
@@ -649,6 +668,9 @@ const getChildNodeFun = (nodeType: 'phase' | 'machine' | 'workspace' | 'task' |
|
||||
if (nodeType === 'phase') {
|
||||
tableRef.value?.setOptionsFun('phaseNodeId', options);
|
||||
}
|
||||
if (nodeType === 'discipline') {
|
||||
tableRef.value?.setOptionsFun('disciplineNodeId', options);
|
||||
}
|
||||
if (nodeType === 'machine') {
|
||||
tableRef.value?.setOptionsFun('machineNodeId', options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user