From 43cf1a348650fc00b3e638396406814bf5f7ebfd Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期三, 15 一月 2025 17:55:02 +0800 Subject: [PATCH] 1、产品结构树页面新增工步功能 2、产品结构树页面新增导入文档或NC程序功能 --- src/views/dnc/base/modules/ProductStructure/Process/ProcessModalForm.vue | 43 +++++++++++-------------------------------- 1 files changed, 11 insertions(+), 32 deletions(-) diff --git a/src/views/dnc/base/modules/ProductStructure/Process/ProcessModalForm.vue b/src/views/dnc/base/modules/ProductStructure/Process/ProcessModalForm.vue index 34603da..d077f67 100644 --- a/src/views/dnc/base/modules/ProductStructure/Process/ProcessModalForm.vue +++ b/src/views/dnc/base/modules/ProductStructure/Process/ProcessModalForm.vue @@ -61,22 +61,19 @@ </a-col> </a-row> </a-form-model> - - <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'閫夋嫨璁惧'"/> </a-spin> </template> <script> import { httpAction, getAction } from '@/api/manage' - import SelectDeviceDrawer from '@/views/system/modules/SelectDeviceDrawer' export default { name: 'ProcessModalForm', - components: { SelectDeviceDrawer }, + components: {}, data() { return { model: { - passCount: 0 + processType: 0 }, labelCol: { xs: { span: 24 }, @@ -104,14 +101,9 @@ ] }, url: { - add: '/mdc/mdcPartProcessInfo/add', - edit: '/mdc/mdcPartProcessInfo/edit' + add: '/nc/stream/process/add', + edit: '/nc/stream/process/edit' } - } - }, - computed: { - formDisabled() { - return this.disabled } }, created() { @@ -119,13 +111,12 @@ 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({}, { equipmentIds: record.equipmentId }, record) + this.model = Object.assign({}, record) console.log('model', this.model) - this.visible = true }, submitForm() { const that = this @@ -134,11 +125,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) { @@ -159,20 +152,6 @@ } }) - }, - deviceSearch() { - this.$refs.selectDeviceDrawer.visible = true - this.$refs.selectDeviceDrawer.selectedRowKeys = [] - this.$refs.selectDeviceDrawer.selectedRows = [] - this.$refs.selectDeviceDrawer.checkedKeys = this.model.equipmentIds ? this.model.equipmentIds.split(',') : [] - }, - /** - * 閫夋嫨宸叉湁璁惧鍚庣偣鍑荤‘瀹氭椂瑙﹀彂 - * @param data 宸查�夋嫨鐨勮澶� - */ - selectOK(data) { - this.$set(this.model, 'equipmentIds', data.join(',')) - if (this.model.equipmentIds) this.$refs.form.clearValidate('equipmentIds') } } } -- Gitblit v1.9.3