import { CompareType } from '../enum/compare-type.enum'; import { ValueType } from '../enum/value-type.enum'; import { RelationType } from '../enum/relation-type.enum'; export class SmartHelpHandler{ convert(qc) { const shv = (qc.value); if(shv.value.length == 0 || !shv.valueField){ return []; }else{ const arr = []; shv.getOriginalValue().split(',').forEach(id => { id && arr.push({ 'FilterField' : qc.labelCode, 'Compare' : CompareType.Equal, 'Value' : id, 'Relation' : RelationType.Or, 'Expresstype':ValueType.Value }); }); if(arr.length > 0){ arr[0]['Lbracket'] = '('; arr[arr.length -1]['Rbracket'] = ')'; arr[arr.length -1]['Relation'] = RelationType.And; return arr; }else{ return []; } } } }