|
|
|
|
@ -97,7 +97,12 @@ |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="8" v-if="partType == '热表'"> |
|
|
|
|
<el-form-item label="镀种1:" prop="plate"> |
|
|
|
|
<el-select v-model="formData.plate" placeholder="请选择" style="width: 250px" disabled> |
|
|
|
|
<el-select |
|
|
|
|
v-model="formData.plate" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
style="width: 250px" |
|
|
|
|
disabled |
|
|
|
|
> |
|
|
|
|
<el-option label="镀种一" value="1" /> |
|
|
|
|
<el-option label="镀种二" value="2" /> |
|
|
|
|
<el-option label="镀种三" value="3" /> |
|
|
|
|
@ -439,6 +444,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
showProcessVersion:false, |
|
|
|
|
setCrewShow: false, |
|
|
|
|
activeName: '1', |
|
|
|
|
craftData: {}, |
|
|
|
|
@ -570,16 +576,66 @@ export default { |
|
|
|
|
methods: { |
|
|
|
|
// 组织树点击 |
|
|
|
|
handleNodeClick(nodes, node, self) { |
|
|
|
|
// if (nodes.disabled) { |
|
|
|
|
// // 阻止默认的点击行为 |
|
|
|
|
// return false; |
|
|
|
|
// } |
|
|
|
|
// this.treeLeave = node.level; |
|
|
|
|
// if (this.treeLeave == 3) { |
|
|
|
|
// this.activeName = '2'; |
|
|
|
|
// } |
|
|
|
|
// if (this.treeLeave == 2) { |
|
|
|
|
// this.activeName = '1'; |
|
|
|
|
// } |
|
|
|
|
if (nodes.disabled) { |
|
|
|
|
// 阻止默认的点击行为 |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
this.treeNodes = nodes; |
|
|
|
|
this.treeLeave = node.level; |
|
|
|
|
if (this.treeLeave == 3) { |
|
|
|
|
this.activeName = '2'; |
|
|
|
|
} |
|
|
|
|
if (this.treeLeave == 2) { |
|
|
|
|
|
|
|
|
|
// 清空现有表格数据 |
|
|
|
|
this.form1.tableData1 = []; |
|
|
|
|
this.form2.tableData2 = []; |
|
|
|
|
this.form3.tableData3 = []; |
|
|
|
|
this.form4.tableData4 = []; |
|
|
|
|
// 根据节点层级切换标签页 |
|
|
|
|
if (this.treeLeave === 2) { |
|
|
|
|
this.activeName = '1'; |
|
|
|
|
this.form1.tableData1 = nodes.processList; |
|
|
|
|
} |
|
|
|
|
// 根据节点层级加载对应数据 |
|
|
|
|
if (this.treeLeave === 3) { |
|
|
|
|
this.activeName = '2'; |
|
|
|
|
// 三级节点:工序级,加载工序相关数据 |
|
|
|
|
const { processInfo, projectList, measuringToolList, moldToolList } = nodes.rawData; |
|
|
|
|
|
|
|
|
|
// 加载项目表格数据 |
|
|
|
|
this.form2.tableData2 = projectList.map(item => ({ |
|
|
|
|
trialNo: item.projectCode, |
|
|
|
|
projectName: item.projectName, |
|
|
|
|
projectStandard: item.projectStandard, |
|
|
|
|
proHours: item.proHours, |
|
|
|
|
prepareHours: item.prepareHours, |
|
|
|
|
})); |
|
|
|
|
|
|
|
|
|
// 加载量具表格数据 |
|
|
|
|
this.form3.tableData3 = measuringToolList.map(item => ({ |
|
|
|
|
trialNo: item.projectCode || '', |
|
|
|
|
testType: item.testType, |
|
|
|
|
tool: item.tool, |
|
|
|
|
toolSize: item.toolSize, |
|
|
|
|
toolInfo: item.toolInfo, |
|
|
|
|
})); |
|
|
|
|
|
|
|
|
|
// 加载工装表格数据 |
|
|
|
|
this.form4.tableData4 = moldToolList.map(item => ({ |
|
|
|
|
trialNo: processInfo.processNo, |
|
|
|
|
moldCode: item.moldCode, |
|
|
|
|
moldName: item.moldName, |
|
|
|
|
isPrint: item.isPrint, |
|
|
|
|
printNo: item.printNo, |
|
|
|
|
testFixtureNo: item.testFixtureNo, |
|
|
|
|
})); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
setDataLocal() { |
|
|
|
|
@ -608,18 +664,17 @@ export default { |
|
|
|
|
let query = { |
|
|
|
|
partId: 4, |
|
|
|
|
partVersion: '1.3', |
|
|
|
|
rank:'2' |
|
|
|
|
rank: '2', |
|
|
|
|
}; |
|
|
|
|
debugger |
|
|
|
|
|
|
|
|
|
getProcessManagementAuthorized(query).then(res => { |
|
|
|
|
// this.craftData = res.data; |
|
|
|
|
// this.data = this.transformCraftTree(res.data.data); |
|
|
|
|
console.log('工艺编制信息-零件工艺', res.data.data); |
|
|
|
|
}); |
|
|
|
|
} else if (this.detailsType == 'taskProcessing') { |
|
|
|
|
getProcessAuthorized(this.rowData.id).then(res => { |
|
|
|
|
|
|
|
|
|
this.craftData = res.data.data; |
|
|
|
|
// this.data = this.transformCraftTree(res.data.data); |
|
|
|
|
console.log('工艺编制信息-工艺任务', res.data.data); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
@ -631,7 +686,7 @@ export default { |
|
|
|
|
let query = { |
|
|
|
|
partId: 4, |
|
|
|
|
partVersion: '1.3', |
|
|
|
|
rank:'2' |
|
|
|
|
rank: '2', |
|
|
|
|
}; |
|
|
|
|
getPartManagementDetail(query).then(res => { |
|
|
|
|
this.formData = res.data.data.dsPartEntity; |
|
|
|
|
@ -644,7 +699,60 @@ export default { |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
handleClick(tab, event) {}, |
|
|
|
|
// 组织树转换 |
|
|
|
|
transformCraftTree(responseData) { |
|
|
|
|
const { partInfo, craftList } = responseData; |
|
|
|
|
const partCode = partInfo.partCode; |
|
|
|
|
|
|
|
|
|
// 构建树形结构并保留原始数据引用 |
|
|
|
|
const tree = [ |
|
|
|
|
{ |
|
|
|
|
label: partCode, |
|
|
|
|
disabled: true, |
|
|
|
|
rawData: partInfo, // 保存零件原始数据 |
|
|
|
|
children: craftList.map(craft => { |
|
|
|
|
const { craftInfo, processList } = craft; |
|
|
|
|
// 拼接二级节点标签:roamNo-craftNo |
|
|
|
|
const craftLabel = `${craftInfo.roamNo}-${craftInfo.craftNo}`; |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
...craftInfo, |
|
|
|
|
label: craftLabel, |
|
|
|
|
processList: processList.map(process => { |
|
|
|
|
return process.processInfo; |
|
|
|
|
}), |
|
|
|
|
rawData: craftInfo, // 保存工艺原始数据 |
|
|
|
|
children: processList.map(process => { |
|
|
|
|
const { processInfo, projectList, measuringToolList, moldToolList } = process; |
|
|
|
|
// 三级节点:工序名称 |
|
|
|
|
const processLabel = processInfo.processName; |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
...processInfo, |
|
|
|
|
label: processLabel, |
|
|
|
|
rawData: { |
|
|
|
|
processInfo, |
|
|
|
|
projectList, |
|
|
|
|
measuringToolList, |
|
|
|
|
moldToolList, |
|
|
|
|
}, // 保存工序及关联数据 |
|
|
|
|
children: projectList.map(project => ({ |
|
|
|
|
label: project.projectName, // 四级节点:项目名称 |
|
|
|
|
rawData: project, // 保存项目原始数据 |
|
|
|
|
disabled: true, |
|
|
|
|
})), |
|
|
|
|
}; |
|
|
|
|
}), |
|
|
|
|
}; |
|
|
|
|
}), |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
return tree; |
|
|
|
|
}, |
|
|
|
|
handleClick(tab, event) { |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
partSubRefLoad() { |
|
|
|
|
this.$refs.partSubRef.loadData(this.partId, true); |
|
|
|
|
}, |
|
|
|
|
|