import {Injectable} from "@angular/core";
import {HttpClient} from "@angular/common/http";
import {Observable} from "rxjs/Observable";
import {AppGlobal} from "../../service/appHttpService";
import {CommonService} from "../../service/common.service";

@Injectable()
export class TabsService{
    constructor(private http:HttpClient,private commonSer:CommonService){}

    //获取权限
    getRoles(): Observable<any>{
        return this.http.get(AppGlobal.domain +'/wisdomgroup/app/getRoles', );
    }

    //获取参加活动的日期
    appOrderCal(): Observable<any>{
        return this.http.get(AppGlobal.domain +'/wisdomgroup/modules/order/appOrderCal');
    }

    //获取离沪日期
    appPreCal(): Observable<any>{
        return this.http.get(AppGlobal.domain +'/wisdomgroup/modules/userpre/appPreCal');
    }

    //每月值班信息
    getMyScheduleOnMonth(data): Observable<any>{
        return this.http.get(AppGlobal.domain +'/wisdomgroup/schedule/app/getMyScheduleOnMonth?'+this.commonSer.toQuery(data));
    }

    //获取节假日
    getFestivalAboutMonth(data): Observable<any>{
        return this.http.get(AppGlobal.domain +'/wisdomgroup/workCalendar/getFestivalAboutMonth?'+this.commonSer.toQuery(data));
    }

    //下载文件
    downFile(data): Observable<any>{
        return this.http.get(AppGlobal.domain +'/modules/common/file/download/'+data);
    }

}