From 4b63863da4ed4c147c317ba6f432b90432745b66 Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期三, 15 一月 2025 14:37:39 +0800 Subject: [PATCH] 设备特殊字符管理 --- 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