Browse Source

打开弹窗,默认展示第一个工序的数据

master_hella_20240701
TengXF 7 months ago
parent
commit
75b6214f16
  1. 11
      src/views/mes/orderDay/components/schedule.vue

11
src/views/mes/orderDay/components/schedule.vue

@ -378,12 +378,18 @@ const getProcessBom=async (code:any) => {
let res = await orderDayconfigApi.getOrderDayBomByOrder(queryParams) let res = await orderDayconfigApi.getOrderDayBomByOrder(queryParams)
materialsData.value=res materialsData.value=res
} }
const currentStartNode = ref({
id:''
})
//线 //线
const getProcessroute = async () => { const getProcessroute = async () => {
let res = await orderDayconfigApi.getConfigProcessRoute(queryParams) let res = await orderDayconfigApi.getConfigProcessRoute(queryParams)
//console.log('ddddd',res)
graphJson.value=JSON.parse(res.newGraphData) graphJson.value=JSON.parse(res.newGraphData)
//
currentStartNode.value.id = graphJson.value.cells[0].id
//
nodeClick('','','',currentStartNode.value,'')
currentNode.value = graphJson.value.cells[0]
graph.value?.fromJSON(graphJson.value.cells) graph.value?.fromJSON(graphJson.value.cells)
} }
// //
@ -407,6 +413,7 @@ const getConfigProcessEquipment= async (code:any) => {
equipmentData.value = await orderDayconfigApi.getConfigProcessEquipment(queryParams) equipmentData.value = await orderDayconfigApi.getConfigProcessEquipment(queryParams)
} }
const nodeClick = (e, x, y, node, view) => { const nodeClick = (e, x, y, node, view) => {
console.log(node.id)
getProcessBom(node.id) getProcessBom(node.id)
getConfigProcessWorkstation(node.id) getConfigProcessWorkstation(node.id)
getConfigProcessWorker(node.id) getConfigProcessWorker(node.id)

Loading…
Cancel
Save