import type {INumberValueTagStyle} from "@/interface/app/ITagStyle.ts";

export default class TrayConveyLocationTypeFormatter {

    locationType: INumberValueTagStyle[] = [
        {value: 0, label: '普通点', type: 'primary'},
        {value: 1, label: '任务点', type: 'warning'}
    ];

    trayConveyLocationTypeFormatter(value: any): INumberValueTagStyle {
        const findResult = this.locationType.find(f => f.value == value);
        if (findResult) {
            return findResult;
        }
        return {value: value.toString(), label: '？' + value.toString(), type: 'danger'};
    }
}