Browse Source

2024-4*-16 工艺路由配置中初始化工序的查询接口变更

master_hella_20240701
zhousq 7 months ago
parent
commit
1797720566
  1. 5
      src/api/mes/processroute/index.ts
  2. 35
      src/views/mes/processroute/components/configDialog.vue

5
src/api/mes/processroute/index.ts

@ -30,6 +30,11 @@ export const getProcessroutePage = async (params) => {
export const getProcessroute = async (id: number) => {
return await request.get({ url: `/mes/processroute/get?id=` + id })
}
// 查询工艺路线定义的工序列表
export const getProcessrouteNodeList = async (code:any) => {
return await request.get({ url: `/mes/processrouteNodeDetail/getRouteNodes?code=`+code })
}
// 新增工艺路线定义
export const createProcessroute = async (data: ProcessrouteVO) => {

35
src/views/mes/processroute/components/configDialog.vue

@ -145,7 +145,6 @@ import { start_node, end_node, createGraph, getNewNode } from './graphbase.data'
import {ProcessSearch} from '../../publicUtil/processSearch.data'
import * as ProcessrouteApi from '@/api/mes/processroute'
import { Graph } from '@antv/x6'
import { get } from 'http'
const graphContainer = ref<HTMLElement | null>(null)
defineOptions({ name: 'ProcessRouteConfig' })
const isShowDrawer = ref(false)
@ -234,11 +233,12 @@ const openDetail = (row: any) => {
materialData.value = []
mouldData.value = []
workStationList.value = []
graph.value.on('node:click', ({ e, x, y, node, view }) => {
graph.value.on('node:dblclick', ({ e, x, y, node, view }) => {
nodeClick(e, x, y, node, view)
})
graph.value.fromJSON(graphJson.cells)
})
getProcessList(rowData.value.processrouteCode)
getItembasicInfo(rowData.value.productCode)
getRemarkList()
getFileList()
@ -275,17 +275,24 @@ const getPatternPage = async (code) => {
const getWorkstationPage = async (code) => {
return await ProcessrouteApi.getWorkstationPage(code);
}
const processListParmas = ref({
name: '',
workshopCode: '',
productionLineCode:'',
pageNum: 1,
pageSize: 50
})
/**获取工序列表 */
const getProcessList = async () => {
const res = await ProcessrouteApi.getProcessList(processListParmas.value)
processData.value = res.list
// const processListParmas = ref({
// name: '',
// workshopCode: '',
// productionLineCode:'',
// pageNum: 1,
// pageSize: 50
// })
// /** */
// const getProcessList = async () => {
// const res = await ProcessrouteApi.getProcessList(processListParmas.value)
// processData.value = res.list
// //return res
// }
/**获取工艺路线定义的工序列表 */
const getProcessList = async (code) => {
console.log('code',code)
const res = await ProcessrouteApi.getProcessrouteNodeList(code)
processData.value = res
//return res
}
//
@ -353,7 +360,7 @@ defineExpose({ openDetail, createGraph }) // 提供 open 方法,用于打开
onMounted?.(() => {
//registerNodes()
getProcessList()
//getProcessList()
})
//
const saveResult = async () => {

Loading…
Cancel
Save