import HttpKit from '@/utils/http-kit'

export default {
  /**
   * 功能描述：查询数据字典
   * @param form
   */

  page (form) {
    return HttpKit.post(`/api/stem/page`, {
      data: form
    }).then(
      res => res.data
    )
  },page1(form){
     return HttpKit.post(`/api/paper/page`, {
        data: form
      }).then(
        res => res.data
      )
  },
  /**
   * 功能描述：根据[字典标识]查询所以下级
   * @param dataDictId
   */
  findDataDictById (form2,paperId) {
    return HttpKit.post(`/api/paper/paper-stem/${paperId}`,{
        data : form2
    }).then(
      res => res.data
    )
  },
  /**
   * 功能描述：根据[字典唯一标识]查询所以下级
   * @param dictKey
   */
  findDataDictByDictKey (dictKey) {
    return HttpKit.get(`/common/data-dict/dict-key/${dictKey}`).then(
      res => res.data
    )
  },
  /**
   * 功能描述：新增/更新词典
   * @param form
   */
  saveOrUpdate (form) {
    return HttpKit.post(`/common/data-dict`, {
      data: form
    }).then(
      res => res.data
    )
  },
  /**
   * 功能描述：根据Id删除词典
   * @param dataDictId
   */
  deleteDataDictPoint (dataDictId) {
    return HttpKit.delete(`/common/data-dict/${dataDictId}`).then(
      res => res.body
    )
  },

  /**
   * 功能描述：根据id获得试卷内容
   * @param id
   * @returns
   */
  getExamById(id){
    return HttpKit.get(`http://127.0.0.1:8888/api/exam/${id}`)
      .then(

      )
  }
}
