From 42c371a143ddf895c9af70827fa0fda61534c283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AD=A3=E6=98=93?= <9634538+git_rabbit@user.noreply.gitee.com> Date: Sun, 17 Mar 2024 14:52:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86-=E7=89=A9?= =?UTF-8?q?=E6=96=99=E8=AE=B0=E5=BD=95=E8=A1=A8=EF=BC=9A=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=A2=9E=E5=88=A0=E6=94=B9=E6=9F=A5=E6=A0=B7=E5=BC=8F=20?= =?UTF-8?q?=E8=B4=A8=E9=87=8F=E7=AE=A1=E7=90=86-=E9=A6=96=E6=A3=80?= =?UTF-8?q?=EF=BC=9Amqtt=20=E7=99=BB=E5=BD=95id=E5=BB=B6=E9=95=BF=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=EF=BC=8C=E5=B9=B6=E4=B8=94=E9=A6=96=E6=A3=80=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=A0=87=E8=AF=86=E7=AC=A6=EF=BC=8C=E4=BE=BF=E4=BA=8E?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/qualityManagement/FQC/firstFQC.vue | 4 +- src/views/wmsManagement/WmMaterial.vue | 827 ++++++++++--------- 2 files changed, 429 insertions(+), 402 deletions(-) diff --git a/src/views/qualityManagement/FQC/firstFQC.vue b/src/views/qualityManagement/FQC/firstFQC.vue index e3cd84e..1b1486e 100644 --- a/src/views/qualityManagement/FQC/firstFQC.vue +++ b/src/views/qualityManagement/FQC/firstFQC.vue @@ -548,7 +548,7 @@ toindex: 0, //索引 timer: null, //定时器 mqttClient: null, - mqttClientId: emqxUtil.title + Math.random().toString(16).substring(2, 8) + mqttClientId: emqxUtil.title + 'FirstFQC' + Math.random().toString(16).substring(1, 10) } }, created() { @@ -1091,7 +1091,7 @@ // 退出页面 beforeDestroy() { this.stopTimer(); - // emqxUtil.endClient(this.mqttClient); + emqxUtil.endClient(this.mqttClient); }, } diff --git a/src/views/wmsManagement/WmMaterial.vue b/src/views/wmsManagement/WmMaterial.vue index 77b6b9b..25d663d 100644 --- a/src/views/wmsManagement/WmMaterial.vue +++ b/src/views/wmsManagement/WmMaterial.vue @@ -7,426 +7,453 @@ * @LastEditTime: (2024-03-16) --> \ No newline at end of file + this.form = { + ...data, + } + } + }) + }, + // 状态(0-不可见 1-可见)字典翻译 + statusFormat(row, column) { + return this.selectDictLabel(this.statusOptions, row.status) + }, + /** 提交按钮 */ + submitForm: function () { + this.$refs['form'].validate((valid) => { + if (valid) { + console.log(JSON.stringify(this.form)) + + if (this.form.id != undefined && this.opertype === 2) { + updateWmMaterial(this.form) + .then((res) => { + this.msgSuccess('修改成功') + this.open = false + this.getList() + }) + .catch((err) => { + //TODO 错误逻辑 + }) + } else { + addWmMaterial(this.form) + .then((res) => { + this.msgSuccess('新增成功') + this.open = false + this.getList() + }) + .catch((err) => { + //TODO 错误逻辑 + }) + } + } + }) + }, + }, +} +