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 错误逻辑 + }) + } + } + }) + }, + }, +} +