Skip to content

Commit a1933a7

Browse files
committed
fix: ConditionRule后端无type、opName字段
1 parent 7775646 commit a1933a7

File tree

3 files changed

+12
-23
lines changed

3 files changed

+12
-23
lines changed

src/components/SimpleProcessDesignerV2/src/consts.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,6 @@ export enum OperationButtonType {
439439
* 条件规则结构定义
440440
*/
441441
export type ConditionRule = {
442-
type: number
443-
opName: string
444442
opCode: string
445443
leftSide: string
446444
rightSide: string

src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,6 @@ const conditionGroups = ref<ConditionGroup>({
319319
and: true,
320320
rules: [
321321
{
322-
type: 1,
323-
opName: '等于',
324322
opCode: '==',
325323
leftSide: '',
326324
rightSide: ''
@@ -353,8 +351,6 @@ const deleteConditionGroup = (idx: number) => {
353351
// 添加条件规则
354352
const addConditionRule = (condition: Condition, idx: number) => {
355353
const rule: ConditionRule = {
356-
type: 1,
357-
opName: '等于',
358354
opCode: '==',
359355
leftSide: '',
360356
rightSide: ''

src/components/SimpleProcessDesignerV2/src/nodes-config/components/Condition.vue

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<!-- TODO @lesan:其它路由条件,可以使用这个哇? -->
22
<template>
33
<el-form ref="formRef" :model="condition" :rules="formRules" label-position="top">
4-
<!-- TODO @lesan:1)默认选中 条件规则;2)条件规则放前面,因为更常用!-->
54
<el-form-item label="配置方式" prop="conditionType">
65
<el-radio-group v-model="condition.conditionType">
76
<el-radio
@@ -14,18 +13,6 @@
1413
</el-radio>
1514
</el-radio-group>
1615
</el-form-item>
17-
<el-form-item
18-
v-if="condition.conditionType === ConditionType.EXPRESSION"
19-
label="条件表达式"
20-
prop="conditionExpression"
21-
>
22-
<el-input
23-
type="textarea"
24-
v-model="condition.conditionExpression"
25-
clearable
26-
style="width: 100%"
27-
/>
28-
</el-form-item>
2916
<el-form-item v-if="condition.conditionType === ConditionType.RULE" label="条件规则">
3017
<div class="condition-group-tool">
3118
<div class="flex items-center">
@@ -114,6 +101,18 @@
114101
/>
115102
</div>
116103
</el-form-item>
104+
<el-form-item
105+
v-if="condition.conditionType === ConditionType.EXPRESSION"
106+
label="条件表达式"
107+
prop="conditionExpression"
108+
>
109+
<el-input
110+
type="textarea"
111+
v-model="condition.conditionExpression"
112+
clearable
113+
style="width: 100%"
114+
/>
115+
</el-form-item>
117116
</el-form>
118117
</template>
119118

@@ -181,8 +180,6 @@ const deleteConditionRule = (condition, index) => {
181180
182181
const addConditionRule = (condition, index) => {
183182
const rule = {
184-
type: 1,
185-
opName: '等于',
186183
opCode: '==',
187184
leftSide: '',
188185
rightSide: ''
@@ -195,8 +192,6 @@ const addConditionGroup = (conditions) => {
195192
and: true,
196193
rules: [
197194
{
198-
type: 1, // TODO @lesan:枚举~
199-
opName: '等于',
200195
opCode: '==',
201196
leftSide: '',
202197
rightSide: ''

0 commit comments

Comments
 (0)