From 0b090cf818a62fce475f92c2a402138a0a46d5d2 Mon Sep 17 00:00:00 2001 From: wangshuaiswim Date: Thu, 23 Feb 2023 20:02:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=89=A9=E6=A8=A1=E5=9E=8B=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/device/product.ts | 10 ++ src/components/FRuleEditor/Advance/index.vue | 8 +- src/components/FRuleEditor/Editor/index.vue | 10 +- src/components/FRuleEditor/Operator/index.vue | 127 ++++++++++++------ src/components/FRuleEditor/index.vue | 4 +- src/components/Metadata/JsonParam/index.vue | 2 +- .../Metadata/VirtualRuleParam/index.vue | 86 +++++++++++- .../Metadata/Base/Edit/ExpandsForm.vue | 2 +- 8 files changed, 197 insertions(+), 52 deletions(-) diff --git a/src/api/device/product.ts b/src/api/device/product.ts index 1e2f4f4f..b4a75cb7 100644 --- a/src/api/device/product.ts +++ b/src/api/device/product.ts @@ -166,3 +166,13 @@ export const saveDevice = (data:any) => server.post('/device-product',data) * 更新选择设备(设备接入) */ export const updateDevice = (data:any) => server.patch('/device-product',data) + +/** + * 获取操作符 + */ +export const getOperator = () => server.get('/property-calculate-rule/description') + +/** + * 获取聚合函数列表 + */ +export const getStreamingAggType = () => server.get[]>('/dictionary/streaming-agg-type/items') \ No newline at end of file diff --git a/src/components/FRuleEditor/Advance/index.vue b/src/components/FRuleEditor/Advance/index.vue index 5990edea..d938c37a 100644 --- a/src/components/FRuleEditor/Advance/index.vue +++ b/src/components/FRuleEditor/Advance/index.vue @@ -3,6 +3,7 @@
- +
@@ -44,10 +45,15 @@ const handleCancel = () => { emit('change', 'simple') } const handleOk = () => { + console.log(_value.value) emit('update:value', _value.value) emit('change', 'simple') } +const editor = ref() +const addOperatorValue = (val: string) => { + editor.value.addOperatorValue(val) +} \ No newline at end of file diff --git a/src/views/device/components/Metadata/Base/Edit/ExpandsForm.vue b/src/views/device/components/Metadata/Base/Edit/ExpandsForm.vue index 114b43e5..7377c4d0 100644 --- a/src/views/device/components/Metadata/Base/Edit/ExpandsForm.vue +++ b/src/views/device/components/Metadata/Base/Edit/ExpandsForm.vue @@ -4,7 +4,7 @@ ]"> - +