import {abstractDataStrategyRight} from "./abstractDataStrategyRight";
import mapToObj from "../../../util/mapToObj";

export class eventCategoryCountStrategy extends abstractDataStrategyRight {
    execute(params?: any): any {
        this.paramsCheck(params);
        const eventList = ['咨询', '求助', '预警系统', '投诉', '指挥调度', '建议']
        const target = '事件类型';
        return mapToObj(this.getListCount(eventList, target, this.eventData, params.query.year));
    }
}