import {HttpClient} from '@angular/common/http';
import {Observable} from 'rxjs/Rx';
import {Injectable} from '@angular/core';
import {SERVER_API_URL_SCHOOL} from '../app.constants';
import {CommonService} from '../shared/common/common.service';
import {LocalStorageService, SessionStorageService} from 'ngx-webstorage';

@Injectable()
export class PerforManageService {

    headers;
    options;

    constructor(private http: HttpClient, private commonSer: CommonService,
                private localStorage: LocalStorageService, private sessionStorage: SessionStorageService) {
    }

    /**视频会议**/
    //新增
    addVideoMeeting(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/videoMeeting/addVideoMeeting', data);
    }

    //更新
    updateVideoMeeting(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/videoMeeting/updateVideoMeeting', data);
    }

    //查询
    selectVideoMeeting(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/videoMeeting/selectVideoMeeting', data);
    }

    //删除
    deleteVideoMeeting(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/videoMeeting/deleteVideoMeeting', data);
    }

    //详情
    selectVideoMeetingCountsById(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/videoMeeting/selectVideoMeetingCountsById', data);
    }

    /**end**/

    /**行政办公**/
    //新增
    addOfficeService(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/officeService/addOfficeService', data);
    }

    //更新
    updateOfficeService(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/officeService/updateOfficeService', data);
    }

    //查询
    selectOfficeService(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/officeService/selectOfficeService', data);
    }

    //删除
    deleteOfficeService(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/officeService/deleteOfficeService', data);
    }

    //详情
    selectOfficeServiceCountsById(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/officeService/selectOfficeServiceCountsById', data);
    }

    /**end**/

    /**网上办事**/
    //新增
    addWorkOnline(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/workOnline/addWorkOnline', data);
    }

    //更新
    updateWorkOnline(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/workOnline/updateWorkOnline', data);
    }

    //查询
    selectWorkOnline(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/workOnline/selectWorkOnline', data);
    }

    //删除
    deleteWorkOnline(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/workOnline/deleteWorkOnline', data);
    }

    //详情
    selectWorkOnlineCountsById(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/workOnline/selectWorkOnlineCountsById', data);
    }

    /**end**/

    /**基础服务**/
    //新增
    addBasicService(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/basicService/addBasicService', data);
    }

    //更新
    updateBasicService(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/basicService/updateBasicService', data);
    }

    //查询
    selectBasicService(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/basicService/selectBasicService', data);
    }

    //删除
    deleteBasicService(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/basicService/deleteBasicService', data);
    }

    //详情
    selectBasicServiceCountsById(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/basicService/selectBasicServiceCountsById', data);
    }

    /**end**/

    /**后台数据存储及交互**/
    //新增
    addBackgroundDataStorage(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/backgroundDataStorage/addBackgroundDataStorage', data);
    }

    //更新
    updateBackgroundDataStorage(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/backgroundDataStorage/updateBackgroundDataStorage', data);
    }

    //查询
    selectBackgroundDataStorage(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/backgroundDataStorage/selectBackgroundDataStorage', data);
    }

    //删除
    deleteBackgroundDataStorage(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/backgroundDataStorage/deleteBackgroundDataStorage', data);
    }

    //详情
    selectBackgroundDataStorageCountsById(data): Observable<any> {
        return this.http.post(SERVER_API_URL_SCHOOL + '/backgroundDataStorage/selectBackgroundDataStorageCountsById', data);
    }

    /**end**/
}
