import { request } from '@/utils/http'

/**
 * 问卷列表
 *
 * @returns
 */
export const getquestionnaireInfo = async (data: any) => {
  return await request.http({
    url: '/safety_hazard/questionnaire/list',
    // isPost: false,
    isPost: '1',
    data: data
  })
}
/**
 * 项目编号查单位
 *
 * @returns
 */
export const getxmdwdefaultconditionlist = async (data: any) => {
  return await request.http({
    url: '/safety_hazard/questionnaire/list/defaultcondition',
    // isPost: false,
    isPost: '1',
    data: data
  })
}
/**
 * 新增问卷
 * @returns
 */
export const addquestionnaire = async (data: any) => {
  return await request.http({
    url: '/safety_hazard/questionnaire',
    data: data,
    // isPost: true,
    isPost: '0'
  })
}

/**
 *修改问卷
 * @returns
 */
export const upquestionnaire = async (data: any) => {
  return await request.http({
    url: '/safety_hazard/questionnaire',
    data: data,
    // isPost: true,
    isPost: '2'
  })
}
/**
 *删除问卷
 * @returns
 */
export const delquestionnaire = async (questionnaireId: any) => {
  return await request.http({
    url: '/safety_hazard/questionnaire',
    data: questionnaireId,
    // isPost: true,
    isPost: '3'
  })
}

/**
 *查问卷详情
 * @returns
 */

export const getquestionnaireIdinfo = async (questionnaireId: any) => {
  return await request.http({
    url: '/safety_hazard/questionnaire/' + questionnaireId,
    // isPost: false,
    isPost: '1'
  })
}

/**
 *查问卷未添加项目
 * @returns
 */

export const getadddefaultcondition = async () => {
  return await request.http({
    url: '/safety_hazard/questionnaire/add/defaultcondition',
    // isPost: false,
    isPost: '1'
  })
}

/**
 *查评价表
 * @returns
 */

export const getevaluationIdinfo = async (projectId: any) => {
  return await request.http({
    url: '/safety_hazard/report/evaluation/' + projectId,
    // isPost: false,
    isPost: '1'
  })
}
