/*
 * @Author: your name
 * @Date: 2021-06-11 09:40:16
 * @LastEditTime: 2022-06-21 14:53:10
 * @LastEditors: 许宏杰
 * @Description: In User Settings Edit
 * @FilePath: \MuduAPP\src\api\xApi.js
 */
import { request } from '@/api/request.js'
export default {
  //根据id获取企业详情
  getEnterInfo(id) {
    return request({
      url: `enterprise/enterpriseinfo/${id}`,
      method: 'GET',
    })
  },
  //根据id获取工业区详情
  getIdParkinfo(id) {
    return request.get(`enterprise/parkinfo/${id}`)
  },
  //获取平面图
  getimages(relationid) {
    return request.get(`attachment/getattachment/${relationid}`)
  },
  //id获取企业列表
  enterpriselist(ParkID) {
    return request.get(`enterprise/enterpriselist?ParkID=${ParkID}`)
    // return request({
    //   url:'enterprise/enterpriselist',
    //   method:'GET',
    //   params
    // })
  },
  //获取企业列表(无权限)
  wuQxenterpriselist(params) {
    return request({
      url: 'enterprise/getenterprisenotrightlist',
      method: 'GET',
      params,
    })
  },
  // 搜索关键字
  serachlist(name) {
    return request.get(
      `enterprise/getenterprisenotrightlist?Name=${name}&page=1&limit=10`
    )
  },
  allenterpriselist(params) {
    return request({
      url: 'enterprise/enterpriselist',
      method: 'GET',
      params,
    })
  },
  //id联系人
  linkman(id) {
    return request.get(`enterprise/contactslistinfo/${id}`)
  },
  //id设备
  sheBei(id) {
    return request.get(`enterprise/equipmentlistinfo/${id}`)
  },
  //营业执照
  yingYe(relationid) {
    return request.get(`attachment/getattachment/${relationid}`)
  },
  //获取园区列表(无权限)
  ParkList(params) {
    return request({
      url: 'enterprise/getparknotrightlist',
      method: 'GET',
      params,
    })
  },
  parkListyou(params) {
    //有权限
    return request({
      url: 'enterprise/getparklist',
      method: 'GET',
      params,
    })
  },
  //园区详情
  parkInfo(id) {
    return request.get('enterprise/parkinfo/' + id)
  },
  //上传图片
  loadImage(data, params) {
    return request({
      url: 'attachment/uploadimagefile',
      method: 'POST',
      params: params,
      data: data,
    })
  },
  // 归属地
  guiShu() {
    return request({
      url: 'area/getareachild',
      method: 'GET',
    })
  },
  //园区性质
  getXingZi() {
    return request({
      url: 'dictionary/parktype',
      method: 'GET',
    })
  },
  parkCreate(data) {
    return request({
      url: 'enterprise/parkcreate',
      method: 'POST',
      data: data,
    })
  },
  xiuGaiPark(data) {
    return request({
      url: 'enterprise/parkupdate',
      method: 'POST',
      data: data,
    })
  },
  //安全员
  WangGe(params) {
    return request({
      url: 'user/getlocationsafeperson',
      method: 'GET',
      params: params,
    })
  },
  //分管领导
  lingDao(params) {
    return request({
      url: 'user/getlocationmember',
      method: 'GET',
      params: params,
    })
  },
  // 企业类型
  leiXing() {
    return request({
      url: 'dictionary/enterprisetype',
      method: 'GET',
    })
  },
  // 所属行业
  shangYe() {
    return request({
      url: 'dictionary/industry',
      method: 'GET',
    })
  },
  // 产品
  canPing(params) {
    return request({
      url: 'dictionary/businessscope',
      method: 'GET',
      params,
    })
  },
  //危险源类型
  weiType() {
    return request({
      url: 'dictionary/risksourcetype',
      method: 'GET',
    })
  },
  //危险等级
  weiXianDj() {
    return request({
      url: 'dictionary/risksourcelevel',
      method: 'GET',
    })
  },
  // 标准等级
  biaoZhun() {
    return request({
      url: 'dictionary/standardlevel',
      method: 'GET',
    })
  },
  // 分险
  fenXian() {
    return request({
      url: 'dictionary/risklevel',
      method: 'GET',
    })
  },
  // 新增企业
  newQiYe(data) {
    return request({
      url: 'enterprise/enterprisecreate',
      method: 'POST',
      data: data,
    })
  },
  // 修改企业
  xiuGaiQiYe(data) {
    return request({
      url: 'enterprise/enterpriseupdate',
      method: 'POST',
      data: data,
    })
  },
  // 特种设备
  getTeZhong(params) {
    return request({
      url: 'dictionary/getdictionarydetaillist',
      method: 'GET',
      params: params,
    })
  },
  // 新增特种设备
  newSheBei(data) {
    return request({
      url: 'enterprise/equipmentcreate',
      method: 'POST',
      data: data,
    })
  },
  // id获取设备信息
  getEquipmentinfo(id) {
    return request({
      url: `enterprise/equipmentinfo/${id}`,
      method: 'GET',
    })
  },
  // 修改设备信息
  postSheBei(data) {
    return request({
      url: 'enterprise/equipmentupdate',
      method: 'POST',
      data: data,
    })
  },
  // 删除设备信息
  postDelete(data) {
    return request({
      url: 'enterprise/equipmentdelete',
      method: 'POST',
      data: data,
    })
  },
  //职位
  getZhiWu(params) {
    return request({
      url: 'dictionary/getdictionarydetaillist',
      method: 'GET',
      params: params,
    })
  },
  //新增联系人
  newLinkMan(data) {
    return request({
      url: 'enterprise/contactscreate',
      method: 'POST',
      data: data,
    })
  },
  //id删除联系人
  removeLinkMan(data) {
    return request({
      url: 'enterprise/contactsdelete',
      method: 'POST',
      data: data,
    })
  },
  //id获取联系人信息
  getLinkManInfo(id) {
    return request({
      url: `enterprise/contactsinfo/${id}`,
      method: 'GET',
    })
  },
  //修改联系人
  outLinkMan(data) {
    return request({
      url: 'enterprise/contactsupdate',
      method: 'POST',
      data: data,
    })
  },
  //企业id获取年度列表
  getNianList(params) {
    return request({
      url: 'enterprise/gettaxlist',
      method: 'GET',
      params,
    })
  },
  //新建年报
  newYeaar(data) {
    return request({
      url: 'enterprise/taxcreate',
      method: 'POST',
      data: data,
    })
  },
  //////////////////////////////////企业端互动留言///////////////////////////////////
  getLiuYanList(params) {
    return request({
      url: 'enterprisereply/getenterprisereplylist',
      method: 'GET',
      params,
    })
  },
  //id获取企业详情
  enterprisereplyinfo(id) {
    return request({
      url: `enterprisereply/enterprisereplyinfo/${id}`,
      method: 'GET',
    })
  },
  // 获取回复信息
  replynoteslist(query) {
    return request({
      url: 'enterprisereply/getenterprisereplynoteslist',
      method: 'GET',
      params: query,
    })
  },
  //////////////////////安全员回复/////////////////////
  enterprisereplynotescreate(data) {
    return request({
      url: 'enterprisereply/enterprisereplynotescreate',
      method: 'POST',
      data,
    })
  },
  //互动类型
  getHuDongType(params) {
    return request({
      url: 'dictionary/getdictionarydetaillist',
      method: 'GET',
      params,
    })
  },
  //新建政企互动
  enterprisereplycreate(data) {
    return request({
      url: 'enterprisereply/enterprisereplycreate',
      method: 'POST',
      data,
    })
  },
  //////////////////////////////政策推送
  getPolicydocumentList(params) {
    return request({
      url: 'policydocument/getpolicydocumentlist',
      method: 'GET',
      params,
    })
  },
  // 根据id获取政策文件
  fileId(id) {
    return request({
      url: `policydocument/policydocumentinfo/${id}`,
      method: 'GET',
    })
  },
  ///////////////////////大数据分析//////////////////
  parkNum(params) {
    //多少家园区
    return request({
      url: 'enterprise/parkcount',
      method: 'GET',
      params,
    })
  },
  enterHomeP(params) {
    //多少家企业
    return request({
      url: 'enterprise/enterprisecount',
      method: 'GET',
      params,
    })
  },
  enterPeople(params) {
    //企业人数
    return request({
      url: 'enterprise/enterprisepersoncount',
      method: 'GET',
      params,
    })
  },
  netWorkNum(params) {
    //安全员数量
    return request({
      url: 'enterprise/enterprisesafecount',
      method: 'GET',
      params,
    })
  },
  xunChaNum(params) {
    //安全员巡查次数
    return request({
      url: 'enterprise/enterprisesafecheckscount',
      method: 'GET',
      params,
    })
  },
  //获取隐患整改情况
  getsafepersonimproving(params) {
    return request({
      url: 'enterprise/getsafepersonimproving',
      method: 'GET',
      params,
    })
  },
  safepersonchecks(params) {
    return request({
      url: 'enterprise/getsafepersonchecks',
      method: 'GET',
      params,
    })
  },
  //获取上一年的产值汇总
  getoutputtax(params) {
    return request({
      url: 'enterprise/getoutputtax',
      method: 'GET',
      params,
    })
  },

  //////////////////////////随访互查//////////////////////////
  // 查询随访互动
  RemhuDong(params) {
    return request({
      url: 'publishaction/getpublishactionlist',
      method: 'GET',
      params,
    })
  },
  // 根据id获取随访互动
  byIdInfo(id) {
    return request({
      url: `publishaction/publishactioninfo/${id}`,
      method: 'GET',
    })
  },
  // 报名
  apply(data) {
    return request({
      url: 'publishaction/publishactionjoincreate',
      method: 'POST',
      data,
    })
  },
  //企业参与的获得
  canyu(params) {
    return request({
      url: 'publishaction/getpublishactionlist',
      method: 'GET',
      params,
    })
  },
  ///////////////////////通知公告////////////////////////////////
  noticeshortlist(params) {
    return request({
      url: 'notice/noticeshortlist',
      method: 'GET',
      params,
    })
  },
  // 获取通知详情
  notice(noticeid) {
    return request({
      url: `notice/${noticeid}`,
      method: 'GET',
    })
  },
  ////////////////////////////echarts///////////////////////////
  //获取TOP5工业园
  parkenterprisecountbylocationrank() {
    return request({
      url: 'enterprise/parkenterprisecountbylocationrank',
      method: 'GET',
    })
  },
  parkoutputvaluebylocationrank() {
    return request({
      url: 'enterprise/parkoutputvaluebylocationrank',
      method: 'GET',
    })
  },
  // top园区员工
  parkpersonbylocationrank() {
    return request({
      url: 'enterprise/parkpersonbylocationrank',
      method: 'GET',
    })
  },
  getenterprisegroupperson(params) {
    return request({
      url: 'enterprise/getenterprisegroupperson',
      method: 'GET',
      params,
    })
  },
  // 获取企业产值范围分组(没有当前用户的权限判断)
  getenterprisegroupoutputvalue(params) {
    return request({
      url: 'enterprise/getenterprisegroupoutputvalue',
      method: 'GET',
      params,
    })
  },
  getcheckstroublegroupbymonthtime(params) {
    return request({
      url: 'enterprise/getcheckstroublegroupbymonthtime',
      method: 'GET',
      params,
    })
  },
  // 巡查打卡排名
  parkcheckbylocationrank() {
    return request({
      url: 'enterprise/parkcheckbylocationrank',
      method: 'GET',
    })
  },
  //上报隐患数量排名
  parktroublebylocationrank() {
    return request({
      url: 'enterprise/parktroublebylocationrank',
      method: 'GET',
    })
  },
  //整改工单按时完成率排名
  parkimprovingisfinalnotdelaybylocationrank() {
    return request({
      url: 'enterprise/parkimprovingisfinalnotdelaybylocationrank',
      method: 'GET',
    })
  },
  //企业处罚记录数量TOP（5）
  enterprisepunishbylocationrank() {
    return request({
      url: 'enterprise/enterprisepunishamountbylocationrank',
      method: 'GET',
    })
  },
  //处罚信息数据变化情况排名
  getpunishgroupbymonthtime(params) {
    return request({
      url: 'enterprise/getpunishgroupbymonthtime',
      method: 'GET',
      params,
    })
  },
  //处罚案由占比情况
  getpunishoptiongroup() {
    return request({
      url: 'enterprise/getpunishoptiongroup',
      method: 'GET',
    })
  },
  // 企业检查次数TOP5
  getenterprisechecksrank() {
    return request({
      url: 'enterprise/getenterprisechecksrank',
      method: 'GET',
    })
  },
  //企业隐患数量TOP5
  getenterprisetroublerank() {
    return request({
      url: 'enterprise/getenterprisetroublerank',
      method: 'GET',
    })
  },
  // 企业整改工单数量TOP5
  getenterpriseimprovingrank() {
    return request({
      url: 'enterprise/getenterpriseimprovingrank',
      method: 'GET',
    })
  },
  //////////////////////////////////
  // 获取领导检查次数
  getenterprisecheckscount(params) {
    return request({
      url: 'enterprise/getenterprisecheckscount',
      method: 'GET',
      params,
    })
  },
  // 风险隐患
  getenterprisetroublecount(params) {
    return request({
      url: 'enterprise/getenterprisetroublecount',
      method: 'GET',
      params,
    })
  },
  //整改工单
  getenterpriseimprovingcount(params) {
    return request({
      url: 'enterprise/getenterpriseimprovingcount',
      method: 'GET',
      params,
    })
  },
  getimprovingreviewcount(params) {
    return request({
      url: 'enterprise/getimprovingreviewcount',
      method: 'GET',
      params,
    })
  },
  getenterprisepunishcount(params) {
    return request({
      url: 'enterprise/getenterprisepunishcount',
      method: 'GET',
      params,
    })
  },
  getenterprisejoinactioncount(params) {
    return request({
      url: 'enterprise/getenterprisejoinactioncount',
      method: 'GET',
      params,
    })
  },
  getenterprisesel(params) {
    return request({
      url: 'enterprise/getenterpriseselfinspectsafetydrilltrainingcount',
      method: 'GET',
      params,
    })
  },
  // 消息
  getmsgreceivelist(params) {
    return request({
      url: 'msg/getmsgreceivelist',
      method: 'GET',
      params,
    })
  },
  //收件
  getmsgreceive(id) {
    return request({
      url: `msg/getmsgreceive/${id}`,
      method: 'GET',
    })
  },
  readmsgreceive(id) {
    return request({
      url: `msg/readmsgreceive/${id}`,
      method: 'POST',
      data: {},
    })
  },
  getdictionarydetaillist(params) {
    return request({
      url: 'dictionary/getdictionarydetaillist',
      method: 'GET',
      params,
    })
  },
  getpunishlist(params) {
    return request({
      url: 'enterprise/getpunishlist',
      method: 'GET',
      params,
    })
  },
  punishinfo(id) {
    return request({
      url: `enterprise/punishinfo/${id}`,
      method: 'GET',
    })
  },
  changecurrentpassword(data) {
    return request({
      url: 'user/changecurrentpassword',
      method: 'POST',
      data,
    })
  },
  getparkreport(params) {
    return request({
      url: 'enterprise/getparkreport',
      params,
    })
  },
  enterprisedelete(data) {
    return request({
      url: 'enterprise/enterprisedelete',
      method: 'POST',
      data,
    })
  },

  // 属地工作动态
  locationWork(params) {
    return request({
      url: 'enterprise/getsummaryreportbylocation',
      method: 'GET',
      params,
    })
  },
  //重点监管企业
  emphasisEnterprise(params) {
    return request({
      url: 'enterprise/getenterprisegrouprisksourcetype',
      method: 'GET',
      params,
    })
  },
  guishangFunction() {
    return request({
      url: 'enterprise/getenterprisestandardsizedandonehundredmillion',
      method: 'GET',
    })
  },

  //安全员工作状态
  netWorkList(params) {
    return request({
      url: 'enterprise/getsummaryreportbylocationsafeperson',
      method: 'GET',
      params,
    })
  },
  getLoactionList(params) {
    return request({
      url: 'area/getareaall',
      method: 'GET',
      params,
    })
  },
}
