diff --git a/src/apis/system.ts b/src/apis/system.ts index 94b8d2b..ca38c43 100644 --- a/src/apis/system.ts +++ b/src/apis/system.ts @@ -1,3 +1,4 @@ +import { FtMessage } from 'libs/message' import { createWebSocket } from 'libs/socket' import { nanoid } from 'nanoid' @@ -20,6 +21,7 @@ export async function sendCmd(resParams: System.SendCmdParams) { return res.rely } else { + FtMessage.error(`错误码: ${res.ackcode}, 描述: ${res.message}`) console.log(res) throw new Error(res.message) } diff --git a/src/components/formula/FormulaConfig.vue b/src/components/formula/FormulaConfig.vue index b0ddf46..9b8e44b 100644 --- a/src/components/formula/FormulaConfig.vue +++ b/src/components/formula/FormulaConfig.vue @@ -112,7 +112,7 @@ const handleSubmit = async () => { ElMessage.warning('禁止修改正在执行的配方信息!') return } - const formulaForm: Record = convertValuesToString(formData.value, 'name') + const formulaForm: Record = convertValuesToString(formData.value, 'name').filter() formulaStore .editFormula(formulaForm.formula_id, formulaForm as Formula.FormulaItem) .then(() => {