0
点赞
收藏
分享

微信扫一扫

Ajax是什么?如何在HTML5中使用Ajax?

杨沐涵 2024-07-24 阅读 26

因为这个项目license问题无法开源,更多技术支持与服务请加入我的知识星球。

1、在仿钉钉流程中,条件的数字比较跟普通的字符串比较又不一样,同时在flowable里也是不同的表达式,所以需要特殊处理

2、后端方面

    增加操作符

//以下为数字操作符 add by nbacheng
        // 大于
        operatorMap.put("ngt", "%s > %s");
        // 等于
        operatorMap.put("neq", "%s = %s");
        // 不等于
        operatorMap.put("nne", "%s != %s");

同时对数字使用不同的格式处理

} else if ( (e.getValue() instanceof String) && (this.isNumber(e.getValue().toString())) ) {//判断是否是数字 add by nbacheng
                    e.setValue(String.format("%d", Integer.valueOf(e.getValue().toString())));
                } else if (e.getValue() instanceof String) {
                    e.setValue(String.format("'%s'", e.getValue()));
                }
                return String.format(operator,
                    e.getField(),
                    e.getValue()
                );

3、前端方面

   也是要增加数字专用的操作符

const operatorOptions = [
  {
    value: 'eq',
    label: '等于'
  },
  {
    value: 'gt', 
    label: '大于'
  },
  {
    value: 'ne',
    label: '不等于'
  },
  {
    value: 'neq',
    label: '数字等于'
  },
  {
    value: 'ngt', 
    label: '数字大于'
  },
  {
    value: 'nne',
    label: '数字不等于'
  },
  {
    label: '包含',
    value: 'in'
  },
  {
    label: '不包含',
    value: 'ni'
  }
]

4、相应生成的xml文件如下:

5、效果图

举报

相关推荐

0 条评论