From e9353e9639ac50735713eb85a8fe0ef7e06afa4f Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期一, 10 三月 2025 13:41:25 +0800 Subject: [PATCH] 1、产品和设备结构树选择节点时可以连续点击相同节点且不会取消选中当前节点 2、产品结构树接口调整,产品结构树节点实体信息通过点击后调取接口获取(仍有bug,点击一次会出现多次重复请求) --- src/views/dnc/base/modules/ProductStructure/Component/ComponentModalForm.vue | 22 +++++++++------------- 1 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/views/dnc/base/modules/ProductStructure/Component/ComponentModalForm.vue b/src/views/dnc/base/modules/ProductStructure/Component/ComponentModalForm.vue index b6e6eef..d6097b5 100644 --- a/src/views/dnc/base/modules/ProductStructure/Component/ComponentModalForm.vue +++ b/src/views/dnc/base/modules/ProductStructure/Component/ComponentModalForm.vue @@ -22,7 +22,7 @@ </a-col> <a-col :span="12"> <a-form-model-item label="瑙勬牸"> - <a-input v-model="model.productName" placeholder="璇疯緭鍏ヨ鏍�"></a-input> + <a-input v-model="model.componentScale" placeholder="璇疯緭鍏ヨ鏍�"></a-input> </a-form-model-item> </a-col> </a-row> @@ -112,14 +112,9 @@ ] }, url: { - add: '/mdc/mdcPartProcessInfo/add', - edit: '/mdc/mdcPartProcessInfo/edit' + add: '/nc/component/add', + edit: '/nc/component/edit' } - } - }, - computed: { - formDisabled() { - return this.disabled } }, created() { @@ -127,14 +122,13 @@ this.modelDefault = JSON.parse(JSON.stringify(this.model)) }, methods: { - add() { - this.edit(this.modelDefault) + add(params) { + this.edit({ ...this.modelDefault, ...params }) }, edit(record) { this.model = Object.assign({}, record) console.log('model', this.model) - this.visible = true }, submitForm() { @@ -144,11 +138,13 @@ if (valid) { that.confirmLoading = true let httpUrl = '' - let method = 'post' + let method = '' if (!this.model.id) { httpUrl += this.url.add + method = 'post' } else { - httpUrl += this.url.edit + httpUrl += this.url.edit + `/${this.model.id}` + method = 'put' } httpAction(httpUrl, this.model, method).then((res) => { if (res.success) { -- Gitblit v1.9.3