From bc7ae55adb28dd1760c25ec5428aeef209e40ead Mon Sep 17 00:00:00 2001 From: zwq Date: Fri, 8 Jul 2022 10:14:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/common/board.vue | 4 ++-- src/views/common/order-auto-add.vue | 3 ++- src/views/common/order-auto-submit.vue | 19 ++++++++++----- src/views/common/order-process-add.vue | 1 + src/views/common/order-process.vue | 32 ++++++++++++++++++++++--- src/views/order/current-task.vue | 11 ++++----- static/config/index.js | 3 ++- static/img/lu/{BMD1.png => BMD.png} | Bin 8 files changed, 54 insertions(+), 19 deletions(-) rename static/img/lu/{BMD1.png => BMD.png} (100%) diff --git a/src/views/common/board.vue b/src/views/common/board.vue index cb85623..e4ce202 100644 --- a/src/views/common/board.vue +++ b/src/views/common/board.vue @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2022-03-07 15:31:13 * @LastEditors: zwq - * @LastEditTime: 2022-07-07 10:50:49 + * @LastEditTime: 2022-07-08 08:36:01 * @Description: --> diff --git a/src/views/common/order-auto-add.vue b/src/views/common/order-auto-add.vue index 38aeefe..ce4a2eb 100644 --- a/src/views/common/order-auto-add.vue +++ b/src/views/common/order-auto-add.vue @@ -70,6 +70,7 @@ methods: { init (row, idx) { this.visible = true + this.formLoading = false this.$nextTick(() => { this.$refs['dataForm'].resetFields() if (row) { @@ -110,7 +111,7 @@ dataFormSubmit () { this.$refs['dataForm'].validate((valid) => { if (valid) { - if (this.editIndex) { + if (this.editIndex || this.editIndex === 0) { const taskList = JSON.parse(sessionStorage.getItem('autoTaskList')) taskList.splice(this.editIndex, 1, this.dataForm) sessionStorage.setItem('autoTaskList', JSON.stringify(taskList)) diff --git a/src/views/common/order-auto-submit.vue b/src/views/common/order-auto-submit.vue index 535e4e1..023063c 100644 --- a/src/views/common/order-auto-submit.vue +++ b/src/views/common/order-auto-submit.vue @@ -1,8 +1,8 @@ @@ -144,6 +144,7 @@ }, methods: { init (list) { + this.dataList.splice(0, this.dataList.length) this.dataList = list this.visible = true this.$nextTick(() => { @@ -252,10 +253,16 @@ }).then(({data}) => { console.log(data) if (data && data.code === 0) { - this.$message.success('任务提交成功') - this.dataList = [] - sessionStorage.setItem('autoTaskList', '') - this.$emit('refreshDataList') + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => { + this.visible = false + sessionStorage.setItem('autoTaskList', '') + this.$emit('refreshDataList') + } + }) } else { this.$message.warning(data.msg) } diff --git a/src/views/common/order-process-add.vue b/src/views/common/order-process-add.vue index bbe1d2b..14355cb 100644 --- a/src/views/common/order-process-add.vue +++ b/src/views/common/order-process-add.vue @@ -72,6 +72,7 @@ this.visible = true this.row = null this.editIndex = null + this.formLoading = false this.$nextTick(() => { this.$refs['dataForm'].resetFields() if (row) { diff --git a/src/views/common/order-process.vue b/src/views/common/order-process.vue index 8c21dd2..62b9c26 100644 --- a/src/views/common/order-process.vue +++ b/src/views/common/order-process.vue @@ -28,6 +28,11 @@ + + + + + 提交任务 @@ -117,13 +122,15 @@ return { startPosition: '', kilnId: '', + craftCode: '', targetPosition: '', dataList: [], processType: null, dataListLoading: false, addOrUpdateVisible: false, processPointVisible: false, - eqList: [] + eqList: [], + processList: [] } }, components: { @@ -151,6 +158,21 @@ } this.getDataList() }) + + this.$http({ + url: this.$http.adornUrl('/craftInfo/page'), + method: 'post', + data: this.$http.adornData({ + current: 1, + size: 999 + }) + }).then(({ data }) => { + if (data && data.code === 0) { + this.processList = data.data.records + } else { + this.processList = [] + } + }) }, // 获取数据列表 getDataList () { @@ -199,6 +221,11 @@ message: '请选择窑炉', type: 'warning' }) + } else if (!this.craftCode) { + this.$message({ + message: '请选择工艺', + type: 'warning' + }) } else if (this.processType !== 0 && this.processType !== 1) { this.$message.warning('请选择加工类型') } else { @@ -211,7 +238,7 @@ url: this.$http.adornUrl(`/currTask/createProcessTask`), method: 'post', data: this.$http.adornData({ - craftCode: '', + craftCode: this.craftCode, detParams: this.dataList, kilnId: this.kilnId, processType: this.processType, @@ -220,7 +247,6 @@ // this.targetPosition }) }).then(({data}) => { - console.log(data) if (data && data.code === 0) { this.$message.success('任务提交成功') this.dataList = [] diff --git a/src/views/order/current-task.vue b/src/views/order/current-task.vue index a705dc1..099c662 100644 --- a/src/views/order/current-task.vue +++ b/src/views/order/current-task.vue @@ -53,19 +53,18 @@ - { if (data && data.code === 0) { this.$message({ diff --git a/static/config/index.js b/static/config/index.js index 8eebf61..f30b4e1 100644 --- a/static/config/index.js +++ b/static/config/index.js @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2021-11-15 08:20:28 * @LastEditors: zwq - * @LastEditTime: 2022-07-06 15:12:03 + * @LastEditTime: 2022-07-08 09:06:37 * @Description: */ /** @@ -13,6 +13,7 @@ // api接口请求地址 window.SITE_CONFIG['baseUrl'] = 'http://192.168.1.18:8080/api/' + window.SITE_CONFIG['wbUrl'] = '192.168.1.18:8080' // cdn地址 = 域名 + 版本号 window.SITE_CONFIG['domain'] = './' // 域名 diff --git a/static/img/lu/BMD1.png b/static/img/lu/BMD.png similarity index 100% rename from static/img/lu/BMD1.png rename to static/img/lu/BMD.png -- 2.45.2