判定表达式修改
This commit is contained in:
parent
73a475c4ea
commit
ec64f67041
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 3.2.6 on 2021-11-16 02:24
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('mtm', '0031_auto_20211116_0841'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='recordformfield',
|
||||
name='rule_expression',
|
||||
field=models.TextField(default='', verbose_name='判定表达式'),
|
||||
),
|
||||
]
|
|
@ -154,7 +154,7 @@ class RecordFormField(CommonAModel):
|
|||
high_rule = models.IntegerField('上限规则', choices=high_rule_choices, null=True, blank=True)
|
||||
low_limit = models.FloatField('下限值', null=True, blank=True)
|
||||
low_rule = models.IntegerField('下限规则', choices=low_rule_choices, null=True, blank=True)
|
||||
rule_expression = models.JSONField('判定表达式', default=list, help_text='判定表达式, 格式为[{"expression":"{value} > 3 and {value}<10"}] 其中{}用于填充的字段key,运算时会换算成实际的值,符合条件返回true,表达式只支持简单的运算或datetime/time运算.以首次匹配成功的条件为准,所以多个条件不要有冲突' )
|
||||
rule_expression = models.TextField('判定表达式', default='')
|
||||
|
||||
class Meta:
|
||||
verbose_name = '记录表格字段'
|
||||
|
|
Loading…
Reference in New Issue