/**
 * @name 民生API
 * @description 请求示例
 * @param {Object} data        请求参数
 * @param {String} url         请求地址
 * @param {String} method      请求类型 可以不设置,默认GET
 */
import request from '../utils/request';

/**
 * 获得议事厅分页
 * @param {*} data
 */
const assemblyHallPageApi = function (data) {
    return request({
        url: '/admin-api/people/assembly-hall/page',
        method: 'get',
        data: data
    });
};
/**
 * 获得人民调解员分页
 * @param {*} data
 */
const mediatorPageApi = function (data) {
    return request({
        url: '/admin-api/people/mediator/page',
        method: 'get',
        data: data
    });
};
/**
 * 获得人民调解员详情
 * @param {*} data
 */
const mediatorGetApi = function (data) {
    return request({
        url: '/admin-api/people/mediator/get',
        method: 'get',
        data: data
    });
};

/**
 * 获得群众点单分页
 * @param {*} data
 */
const seekHelpPageApi = function (data) {
    return request({
        url: '/admin-api/people/seek-help/page',
        method: 'get',
        data: data
    });
};
/**
 * 创建群众点单
 * @param {*} data
 */
const seekHelpCreateApi = function (data) {
    return request({
        url: '/admin-api/people/seek-help/create',
        method: 'post',
        data: data
    });
};

/**
 * 获得群众点单详情
 * @param {*} data
 */
const seekHelpGetApi = function (data) {
    return request({
        url: '/admin-api/people/seek-help/get',
        method: 'get',
        data: data
    });
};
const massesDetailUpdate = function (data) {
    // 点单状态变化如：接单
    return request({
        url: '/admin-api/people/seek-help/update',
        method: 'put',
        data: data
    });
};
const seekHelpApi = function (data) {
    // 点单 进行帮助
    return request({
        url: `/admin-api/people/seek-help/help/${data.id}`,
        method: 'put',
        data: data
    });
};
/**
 * 获得法律法规分页
 * @param {*} data
 */
const lawsRegulationPageApi = function (data) {
    return request({
        url: '/admin-api/people/laws-regulation/page',
        method: 'get',
        data: data
    });
};

/**
 * 获得法律法规详情
 * @param {*} data
 */
const lawsRegulationGetApi = function (data) {
    return request({
        url: '/admin-api/people/laws-regulation/get',
        method: 'get',
        data: data
    });
};

/**
 * 获得调解案件分页分页
 * @param {*} data
 */
const casesListApi = function (data) {
    return request({
        url: '/admin-api/people/cases/page',
        method: 'get',
        data: data
    });
};

/**
 * 获得调解案件
 * @param {*} data
 */
const getCasesIdApi = function (data) {
    return request({
        url: '/admin-api/people/cases/get',
        method: 'get',
        data: data
    });
};

/**
 * 创建调解案件
 * @param {*} data
 */
const createCasesApi = function (data) {
    return request({
        url: '/admin-api/people/cases/create',
        method: 'post',
        data: data
    });
};

/**
 * 获得党建引领详情
 * @param {*} data
 */
const newsGetApi = function (data) {
    return request({
        url: '/admin-api/people/news/get',
        method: 'get',
        data: data
    });
};

/**
 * 获得医院分页
 * @param {*} data
 */
const hospitalPageApi = function (data) {
    return request({
        url: '/admin-api/people/hospital/page',
        method: 'get',
        data: data
    });
};

/**
 * 获得医院详情
 * @param {*} data
 */
const hospitalGetApi = function (data) {
    return request({
        url: '/admin-api/people/hospital/get',
        method: 'get',
        data: data
    });
};
/**
 * 获得医生分页
 * @param {*} data
 */
const doctorPageApi = function (data) {
    return request({
        url: '/admin-api/people/doctor/page',
        method: 'get',
        data: data
    });
};

/**
 * 获得议事厅分页
 * @param {*} data
 */
const assemblyIdApi = function (data) {
    return request({
        url: '/admin-api/people/assemblymen/create',
        method: 'post',
        data: data
    });
};

/**
 * 获得议事厅分页
 * @param {*} data
 */
const assemblyhallIdApi = function (data) {
    return request({
        url: '/admin-api/people/assembly-hall/get',
        method: 'get',
        data: data
    });
};

/**
 * 获得评论分页
 * @param {*} data
 */
const commentPageApi = function (data) {
    return request({
        url: '/admin-api/people/comment/page',
        method: 'get',
        data: data
    });
};

/**
 * 创建评论
 * @param {*} data
 */
const commentCreateApi = function (data) {
    return request({
        url: '/admin-api/people/comment/create',
        method: 'post',
        data: data
    });
};

/**
 * 获得议事厅详情
 * @param {*} data
 */
const assemblyHallGetApi = function (data) {
    return request({
        url: '/admin-api/people/assembly-hall/get',
        method: 'get',
        data: data
    });
};
/**
 * 星级党支部
 * @param {*} data
 */
const partyBranchApi = function (data) {
    return request({
        url: '/admin-api/people/party-branch/page',
        method: 'get',
        data: data
    });
};
/**
 * 获得党建引领 - 获得新闻资讯及活动分页
 * @param {*} data
 * @param {*} data.categoryId // 取字典新闻类型的键值
 */
const newsPageApi = function (data) {
    return request({
        url: '/admin-api/people/news/page',
        method: 'get',
        data: data
    });
};

/**
 * 星级党支部详情
 * @param {*} data
 */
const partyBranchGetApi = function (data) {
    return request({
        url: '/admin-api/people/party-branch/get',
        method: 'get',
        data: data
    });
};
/**
 * 获得优秀党员分页 - 五星党员
 * @param {*} data
 */
const excellentPartMemberPageApi = function (data) {
    return request({
        url: '/admin-api/people/excellent-party-member/page',
        method: 'get',
        data: data
    });
};

/**
 * 获取部门列表
 * @param {*} data
 */
const deptListApi = function (data) {
    return request({
        url: '/admin-api/system/dept/list',
        method: 'get',
        data: data
    });
};

/**
 * 获得优秀党员详情
 * @param {*} data
 */
const excellentPartMemberGetApi = function (data) {
    return request({
        url: '/admin-api/people/excellent-party-member/get',
        method: 'get',
        data: data
    });
};

/**
 * 获得办事处分页 - 最美乡村
 * @param {*} data
 */
const agencyPageApi = function (data) {
    return request({
        url: '/admin-api/people/agency/page',
        method: 'get',
        data: data
    });
};

/**
 * 获得村务公开分页
 * @param {*} data
 */
const villageAffairsPageApi = function (data) {
    return request({
        url: '/admin-api/people/village-affairs/page',
        method: 'get',
        data: data
    });
};

/**
 * 获得办事处分页
 * @param {*} data
 */
const agencyContentPageApi = function (data) {
    return request({
        url: '/admin-api/people/agency-content/page',
        method: 'get',
        data: data
    });
};

/**
 * 获得群众点单评论
 * @param {*} data
 */
const CrateAppraiseApi = function (data) {
    return request({
        url: '/admin-api/people/seek-help/appraise',
        method: 'put',
        data: data
    });
};

/**
 * 获得办事处内容详情
 * @param {*} data
 */
const agencyContentGetApi = function (data) {
    return request({
        url: '/admin-api/people/agency-content/get',
        method: 'get',
        data: data
    });
};

/**
 * 获得办事处分页详情
 * @param {*} data
 */
const agencyGetApi = function (data) {
    return request({
        url: '/admin-api/people/agency/get',
        method: 'get',
        data: data
    });
};

/**
 * 获得办事处内容 + 根据部门id
 * @param {*} data
 */
const agencyContentGetOrgIdApi = function (data) {
    return request({
        url: '/admin-api/people/agency-content/getOrgId',
        method: 'get',
        data: data
    });
};

/**
 * 获得办事处内容 + 根据部门id
 * @param {*} data
 */
const villageAffairsGetApi = function (data) {
    return request({
        url: '/admin-api/people/village-affairs/get',
        method: 'get',
        data: data
    });
};

/**
 * 获得党活动事件分页
 * @param {*} data
 */
const partyEventPageApi = function (data) {
    return request({
        url: '/admin-api/people/party-event/page',
        method: 'get',
        data: data
    });
};

/**
 * 获得党活动事件分页详情
 * @param {*} data
 */
const partyEventGetApi = function (data) {
    return request({
        url: '/admin-api/people/party-event/get',
        method: 'get',
        data: data
    });
};

/**
 * 创建患者 - 申请签约家庭医生
 * @param {*} data
 */
const patientCreateApi = function (data) {
    return request({
        url: '/admin-api/people/patient/create',
        method: 'post',
        data: data
    });
};
/**
 * 获取网格列表
 * @param {*} data
 */
const getGridListApi = function (data) {
    return request({
        url: '/admin-api/people/grid/page',
        method: 'get',
        data: data
    });
};
/**
 * 获取网格成员列表
 * @param {*} data
 */
const getGridMemberListApi = function (data) {
    return request({
        url: '/admin-api/people/grid-member/page',
        method: 'get',
        data: data
    });
};
export {
    assemblyHallPageApi,
    mediatorPageApi,
    mediatorGetApi,
    seekHelpPageApi,
    seekHelpCreateApi,
    seekHelpGetApi,
    lawsRegulationPageApi,
    lawsRegulationGetApi,
    massesDetailUpdate,
    seekHelpApi,
    casesListApi,
    getCasesIdApi,
    createCasesApi,
    newsGetApi,
    hospitalPageApi,
    hospitalGetApi,
    doctorPageApi,
    commentPageApi,
    commentCreateApi,
    assemblyHallGetApi,
    newsPageApi,
    assemblyIdApi,
    assemblyhallIdApi,
    partyBranchApi,
    partyBranchGetApi,
    excellentPartMemberPageApi,
    deptListApi,
    excellentPartMemberGetApi,
    agencyPageApi,
    villageAffairsPageApi,
    agencyContentPageApi,
    CrateAppraiseApi,
    agencyContentGetApi,
    agencyGetApi,
    agencyContentGetOrgIdApi,
    villageAffairsGetApi,
    partyEventPageApi,
    partyEventGetApi,
    patientCreateApi,
    getGridListApi,
    getGridMemberListApi
};
