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/Product/ProductModal.vue | 27 +++++++++++++++++++-------- 1 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/views/dnc/base/modules/ProductStructure/Product/ProductModal.vue b/src/views/dnc/base/modules/ProductStructure/Product/ProductModal.vue index e808a87..ceaa455 100644 --- a/src/views/dnc/base/modules/ProductStructure/Product/ProductModal.vue +++ b/src/views/dnc/base/modules/ProductStructure/Product/ProductModal.vue @@ -29,41 +29,52 @@ return { title: '', width: 500, - visible: false + visible: false, } }, created() { this.$bus.$on('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) }, methods: { - handleProductAdd(modalTitle) { - this.title = modalTitle + /** + * 娣诲姞浜у搧 + */ + handleProductAdd() { this.visible = true this.$nextTick(() => { this.$refs.realForm.add() }) }, - handleProductEdit(modalTitle) { - this.title = modalTitle + + /** + * 缂栬緫浜у搧淇℃伅 + */ + handleProductEdit() { this.visible = true this.$nextTick(() => { - this.$refs.realForm.edit(this.currentTreeNodeInfo.entity) + this.$refs.realForm.edit({ id: this.currentTreeNodeInfo.id, ...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) + if (this[methodName]) { + this[methodName](modalTitle) + this.title = modalTitle + } } } } -- Gitblit v1.9.3