fix: ConditionRule后端无type、opName字段

pull/655/head
Lesan 2025-01-09 09:50:08 +08:00
parent 777564673e
commit a1933a781e
3 changed files with 12 additions and 23 deletions

View File

@ -439,8 +439,6 @@ export enum OperationButtonType {
*
*/
export type ConditionRule = {
type: number
opName: string
opCode: string
leftSide: string
rightSide: string

View File

@ -319,8 +319,6 @@ const conditionGroups = ref<ConditionGroup>({
and: true,
rules: [
{
type: 1,
opName: '等于',
opCode: '==',
leftSide: '',
rightSide: ''
@ -353,8 +351,6 @@ const deleteConditionGroup = (idx: number) => {
//
const addConditionRule = (condition: Condition, idx: number) => {
const rule: ConditionRule = {
type: 1,
opName: '等于',
opCode: '==',
leftSide: '',
rightSide: ''

View File

@ -1,7 +1,6 @@
<!-- TODO @lesan其它路由条件可以使用这个哇 -->
<template>
<el-form ref="formRef" :model="condition" :rules="formRules" label-position="top">
<!-- TODO @lesan1默认选中 条件规则2条件规则放前面因为更常用-->
<el-form-item label="配置方式" prop="conditionType">
<el-radio-group v-model="condition.conditionType">
<el-radio
@ -14,18 +13,6 @@
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-if="condition.conditionType === ConditionType.EXPRESSION"
label="条件表达式"
prop="conditionExpression"
>
<el-input
type="textarea"
v-model="condition.conditionExpression"
clearable
style="width: 100%"
/>
</el-form-item>
<el-form-item v-if="condition.conditionType === ConditionType.RULE" label="条件规则">
<div class="condition-group-tool">
<div class="flex items-center">
@ -114,6 +101,18 @@
/>
</div>
</el-form-item>
<el-form-item
v-if="condition.conditionType === ConditionType.EXPRESSION"
label="条件表达式"
prop="conditionExpression"
>
<el-input
type="textarea"
v-model="condition.conditionExpression"
clearable
style="width: 100%"
/>
</el-form-item>
</el-form>
</template>
@ -181,8 +180,6 @@ const deleteConditionRule = (condition, index) => {
const addConditionRule = (condition, index) => {
const rule = {
type: 1,
opName: '等于',
opCode: '==',
leftSide: '',
rightSide: ''
@ -195,8 +192,6 @@ const addConditionGroup = (conditions) => {
and: true,
rules: [
{
type: 1, // TODO @lesan~
opName: '等于',
opCode: '==',
leftSide: '',
rightSide: ''