/*
 * @Author: your name
 * @Date: 2021-07-07 14:38:10
 * @LastEditTime: 2021-07-28 19:37:09
 * @LastEditors: 许宏杰
 * @Description: In User Settings Edit
 * @FilePath: \MuduAPP\src\api\api3.js
 */
import { request } from '@/api/request.js'
export default {
  //  根据id获取企业自查信息
    getexaminat(id){
      return  request({
      url:`relation/selfinspectinfo/${id}`,
      method:'GET',
    })
    },
  //根据id获取企业安全演练信息
  getdrill(id) {
    return  request({
        url:`relation/safetydrillinfo/${id}`,
        method:'GET',
      })
  },
 //根据id获取企业训练信息
 getinternaltrain(id) {
    return  request({
        url:`relation/traininginfo/${id}`,
        method:'GET',
      })
  },
   //企业自查列表
 examinatlist(params) {
 
    return request.get('relation/getselfinspectlist', {params: params} )
    
  },
  //企业安全演练列表
 drilllist(params) {
    return request.get('relation/getsafetydrilllist',{params: params} )
  },
   //企业训练列表
 internaltrainlist(params) {
    return request.get('relation/gettraininglist',{params: params})
  },

//新建企业自查信息
examinatcreate(data) {
    return request({
      url: 'relation/selfinspectcreate',
      method: 'post',
      data: data
    })
  },
  //新建企业安全演练信息
  drillcreate(data) {
    return request({
      url: 'relation/safetydrillcreate',
      method: 'post',
      data: data
    })
  },
    //新建企业训练信息
    internaltraincreate(data) {
        return request({
          url: 'relation/trainingcreate',
          method: 'post',
          data: data
        })
      },
      postUploadimagefile(data, params) {
        return request({
          url: 'attachment/uploadimagefile',
          method: 'post',
          data: data,
          params: params
        })
      },

//图片合集
      getAttachment(id) {
        // console.log('附件ID图', id)
        return request.get(
          // 'attachment/getattachment/69e450e4-c8ca-47ff-a30a-c79cae653d52'
          'attachment/getattachment/' + id
        )
      }
}




 