From 17aa5a76998547cd3c999f56ea9818569c180947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=A2=A6=E8=BF=9C?= <1063331231@qq.com> Date: Sun, 6 Jul 2025 21:35:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E5=8F=82=E6=95=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/formula/HomeFormulaConfig.vue | 5 +- src/components/formula/RunFormulaConfig.vue | 24 ++++++---- src/components/home/HomeFormula.vue | 4 +- src/components/home/HomeSetting.vue | 10 ++-- src/stores/formulaStore.ts | 2 +- src/views/home/chart.vue | 69 ++++++++++++++++------------ 6 files changed, 64 insertions(+), 50 deletions(-) diff --git a/src/components/formula/HomeFormulaConfig.vue b/src/components/formula/HomeFormulaConfig.vue index 6e5b913..3a64a47 100644 --- a/src/components/formula/HomeFormulaConfig.vue +++ b/src/components/formula/HomeFormulaConfig.vue @@ -49,7 +49,7 @@ const size = 'default'
- + { - runtimeFormRef.value.validate((valid: any) => { - if (valid) { - return convertValuesToString(formData.value, 'name') - } - return null - }) +const saveFormData = async () => { + const valid = await runtimeFormRef.value.validate + if (valid) { + return convertValuesToString(formData.value, 'name') + } + return null } +defineExpose({ saveFormData }) /** * 注册孙子组件方法的注入函数 */ @@ -34,8 +34,9 @@ const labelUnitMap: Record = formulaStore.labelUnitMap /** * 监听事件 */ -watchEffect(() => { - formData.value = convertValuesToInt(formulaStore.getRealtimeConfig()) +watchEffect(async () => { + formData.value = (await formulaStore.getRealtimeConfig()).rely + console.log(formData.value) }) /** * 配方配置列表 @@ -153,6 +154,9 @@ const validatePass = (rule: any, value: any, callback: any, config: Formula.Form text-align: left; height: 40px; } +:deep(.el-select__wrapper) { + height: 42px; +} :deep(.el-form-item) { margin-right: 0; align-items: center; diff --git a/src/components/home/HomeFormula.vue b/src/components/home/HomeFormula.vue index 37b231b..9ab3abf 100644 --- a/src/components/home/HomeFormula.vue +++ b/src/components/home/HomeFormula.vue @@ -14,11 +14,11 @@ watchEffect(() => {