From 28935545cb2fdba40ca9dc870bd5501fece30635 Mon Sep 17 00:00:00 2001 From: maochaoying <925670706@qq.com> Date: Sun, 10 Sep 2023 09:48:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=85=8D=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Formula.vue | 29 ++++++++++++++++------------- src/components/dialogs/AddPreModal.vue | 2 +- src/components/dialogs/DelPreModal.vue | 17 ++++++++++++++++- src/store/modules/formula.js | 4 ++++ 4 files changed, 37 insertions(+), 15 deletions(-) diff --git a/src/components/Formula.vue b/src/components/Formula.vue index a7a69b2..f394576 100644 --- a/src/components/Formula.vue +++ b/src/components/Formula.vue @@ -15,16 +15,14 @@ : 'content_wrap' " > -
+ +
{{ item?.formula_id }}
-
删除
-
配置
-
执行
+
删除
+
配置
+
执行
{ +const delModalShow = item => { + formulaStore.updateCurrentFormula(item) delPreModalVisible.value = true } @@ -147,7 +147,8 @@ const hideAddNewPreModal = () => { const isSettingVisible = ref(false) -const showSetting = () => { +const showSetting = item => { + formulaStore.updateCurrentFormula(item) isSettingVisible.value = true } @@ -156,12 +157,14 @@ const hideSettingModal = () => { } // 执行配置 -const runConfig = () => { - console.log('run config') +const runConfig = item => { + formulaStore.updateCurrentFormula(item) + webSocketStore.sendCommandMsg(startFormulaJSON(item.id)) + console.log('run config', item) } onMounted(() => { - webSocketStore.sendCommandMsg(getAllFormulaJSON) + // webSocketStore.sendCommandMsg(getAllFormulaJSON) }) diff --git a/src/components/dialogs/AddPreModal.vue b/src/components/dialogs/AddPreModal.vue index 107dfe9..fe57cfd 100644 --- a/src/components/dialogs/AddPreModal.vue +++ b/src/components/dialogs/AddPreModal.vue @@ -55,7 +55,7 @@ const addNewRecord = () => { justify-content: center; .modal_content { width: 476px; - height: 414px; + height: 314px; border-radius: 16px; background: #ffffff; position: relative; diff --git a/src/components/dialogs/DelPreModal.vue b/src/components/dialogs/DelPreModal.vue index 329babc..d281cc2 100644 --- a/src/components/dialogs/DelPreModal.vue +++ b/src/components/dialogs/DelPreModal.vue @@ -22,7 +22,7 @@ 确定要删除当前预设吗?

-
确定
+
确定
取消
@@ -30,6 +30,11 @@