import {Pipe, PipeTransform} from "@angular/core";
import {FrameService} from "../../core/service/frame.service";

/******************************
 * 系统字典
 */
@Pipe({
  name: 'frameDict'
})
export class FrameDictPipe implements PipeTransform {

  transform(dict_value: any, dict_name?: any): any {
    if (dict_name)
      return FrameService.getFrameDictText(dict_name, dict_value);
    return FrameService.getFrameDictArray(dict_value);

  }

}
