From 58848b1a18d29929ba84b0336860f258b913070f Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期一, 13 一月 2025 17:18:48 +0800 Subject: [PATCH] 产品结构树数据由后台数据库驱动 --- src/views/dnc/base/modules/ProductStructure/Process/ProcessModal.vue | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 41 insertions(+), 3 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..fa309d6 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.visible = false }, + handleCancel() { this.$emit('close') this.visible = false + }, + + triggerCorrespondingMethod({ methodName, modalTitle }) { + if (this[methodName]) this[methodName](modalTitle) } } } -- Gitblit v1.9.3