From 2b1ec335946d3454f7b07968d5959a9672e93fbe Mon Sep 17 00:00:00 2001 From: caixiaofeng <1941338475@qq.com> Date: Tue, 7 May 2024 23:04:07 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=9B=E9=80=89=E7=AC=A6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Condition/Operator.vue | 8 ++++---- src/components/Condition/index.ts | 2 +- src/components/Condition/index.vue | 6 +++--- src/views/flowDesign/hooks/useNode.ts | 2 +- src/views/flowDesign/index.vue | 1 + src/views/flowDesign/nodes/Condition/index.ts | 4 ++-- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/components/Condition/Operator.vue b/src/components/Condition/Operator.vue index 56a8af3..4b0f7dd 100644 --- a/src/components/Condition/Operator.vue +++ b/src/components/Condition/Operator.vue @@ -6,20 +6,20 @@ const $props = defineProps<{ }>() const operatorOptions = [ { - value: 'equal', + value: 'eq', label: '等于' }, { - value: 'not_equal', + value: 'ne', label: '不等于' }, { label: '包含', - value: 'contains' + value: 'lk' }, { label: '不包含', - value: 'not_contain' + value: 'nl' } ] const $emits = defineEmits<{ diff --git a/src/components/Condition/index.ts b/src/components/Condition/index.ts index 1379617..5be0bb5 100644 --- a/src/components/Condition/index.ts +++ b/src/components/Condition/index.ts @@ -14,7 +14,7 @@ export interface Condition { * 筛选规则 */ export interface FilterRules { - logicalOperator: 'or' | 'and', + operator: 'or' | 'and', conditions: Condition[] groups: FilterRules[] } \ No newline at end of file diff --git a/src/components/Condition/index.vue b/src/components/Condition/index.vue index 670211e..44e7c7a 100644 --- a/src/components/Condition/index.vue +++ b/src/components/Condition/index.vue @@ -25,7 +25,7 @@ const addRule = () => { filterRules.value.conditions.push( { field: null, - operator: 'equal', + operator: 'eq', value: null } ) @@ -46,7 +46,7 @@ const handleDel = (index: number) => { */ const addGroup = () => { filterRules.value.groups.push({ - logicalOperator: 'and', + operator: 'and', conditions: [{ field: null, operator: '', @@ -69,7 +69,7 @@ const delGroup = (index: number) => {