Browse Source

2024-4-12 工艺路线优化

master_hella_20240701
zhousq 8 months ago
parent
commit
56eed12688
  1. 7
      src/views/mes/processroute/components/configDialog.vue
  2. 7
      src/views/mes/processroute/index.vue

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

@ -145,6 +145,7 @@ import { start_node, end_node, createGraph, getNewNode } from './graphbase.data'
import {ProcessSearch} from '../../publicUtil/processSearch.data' import {ProcessSearch} from '../../publicUtil/processSearch.data'
import * as ProcessrouteApi from '@/api/mes/processroute' import * as ProcessrouteApi from '@/api/mes/processroute'
import { Graph } from '@antv/x6' import { Graph } from '@antv/x6'
import { get } from 'http'
const graphContainer = ref<HTMLElement | null>(null) const graphContainer = ref<HTMLElement | null>(null)
defineOptions({ name: 'ProcessRouteConfig' }) defineOptions({ name: 'ProcessRouteConfig' })
const isShowDrawer = ref(false) const isShowDrawer = ref(false)
@ -215,8 +216,9 @@ const deleteNode=(row)=>{
} }
// //
const graph = ref<Graph>() const graph = ref<Graph>()
const openDetail = async (rowData: any) => { const openDetail = (rowData: any) => {
rowData.value = rowData rowData.value = rowData
console.log('rowData',rowData.value)
titleNameRef.value = rowData.value.processrouteCode titleNameRef.value = rowData.value.processrouteCode
titleValueRef.value = rowData.value.processName titleValueRef.value = rowData.value.processName
processRouteId.value = rowData.value.id processRouteId.value = rowData.value.id
@ -351,7 +353,7 @@ const saveResult = async () => {
return return
} }
if (graph.value.getNodes().length < 3) { if (graph.value.getNodes().length < 3) {
message.info('除了开始结束节点外至少需要设置一个节点!') message.info('工艺至少配置一道工序!')
return return
} }
let gdata = { let gdata = {
@ -418,6 +420,7 @@ const deleteAnnexSuccess = async () => {
// //
onUnmounted(() => {}) onUnmounted(() => {})
const emit = defineEmits(['close']) const emit = defineEmits(['close'])
</script> </script>
<style lang="scss"> <style lang="scss">
.el-drawer__body { .el-drawer__body {

7
src/views/mes/processroute/index.vue

@ -51,7 +51,7 @@
/> />
<!-- 详情 --> <!-- 详情 -->
<ProcessRouteConfig ref="configDialogRef" @close="getList" /> <ProcessRouteConfig ref="configDialogRef" @close="dailogClose" />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/mes/processroute/import" :importTemplateData="importTemplateData" @success="importSuccess" /> <ImportForm ref="importFormRef" url="/mes/processroute/import" :importTemplateData="importTemplateData" @success="importSuccess" />
@ -157,7 +157,10 @@ const buttonTableClick = async (val, row) => {
openDetail(row) openDetail(row)
} }
} }
const dailogClose=() => {
console.log('close');
}
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {

Loading…
Cancel
Save