From 9ed9db9716f36e797141d9a80119fd0c1f4ac7a5 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期二, 14 一月 2025 15:12:14 +0800
Subject: [PATCH] 1、产品/部件/零件的新增与编辑以及根据层级查询对应文档功能已完成后端联调 2、产品结构树新增节点展开记忆功能方便新增节点后查看

---
 src/views/dnc/base/modules/ProductStructure/Process/ProcessModal.vue |   46 ++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/src/views/dnc/base/modules/ProductStructure/Process/ProcessModal.vue b/src/views/dnc/base/modules/ProductStructure/Process/ProcessModal.vue
index 60bea4b..9f265d2 100644
--- a/src/views/dnc/base/modules/ProductStructure/Process/ProcessModal.vue
+++ b/src/views/dnc/base/modules/ProductStructure/Process/ProcessModal.vue
@@ -20,6 +20,11 @@
     components: {
       ProcessModalForm
     },
+    props: {
+      currentTreeNodeInfo: {
+        type: Object
+      }
+    },
     data() {
       return {
         title: '',
@@ -27,29 +32,62 @@
         visible: false
       }
     },
+    created() {
+      this.$bus.$on('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod)
+    },
     methods: {
-      add() {
+      /**
+       * 鍒涘缓
+       * @param modalTitle
+       */
+      handleComponentAddRelative(modalTitle) {
+        this.title = modalTitle
         this.visible = true
         this.$nextTick(() => {
           this.$refs.realForm.add()
         })
       },
-      edit(record) {
+
+      handleProcessAdd(modalTitle) {
+        this.title = modalTitle
         this.visible = true
         this.$nextTick(() => {
-          this.$refs.realForm.edit(record)
+          this.$refs.realForm.add()
         })
       },
+
+      handlePartsAddRelative(modalTitle) {
+        this.title = modalTitle
+        this.visible = true
+        this.$nextTick(() => {
+          this.$refs.realForm.add()
+        })
+      },
+
+      handleProcessEdit(modalTitle) {
+        this.title = modalTitle
+        this.visible = true
+        this.$nextTick(() => {
+          this.$refs.realForm.edit(this.currentTreeNodeInfo.entity)
+        })
+      },
+
       handleOk() {
         this.$refs.realForm.submitForm()
       },
+
       submitCallback() {
-        this.$emit('ok')
+        this.$emit('submitSuccess')
         this.visible = false
       },
+
       handleCancel() {
         this.$emit('close')
         this.visible = false
+      },
+
+      triggerCorrespondingMethod({ methodName, modalTitle }) {
+        if (this[methodName]) this[methodName](modalTitle)
       }
     }
   }

--
Gitblit v1.9.3