import request from '@/utils/request'

/**    基础表单接口  开始    */

// 表单模板列表
export const pageList = (query) => {
  return request({
    url: '/system/deviceInfo/pageList',
    method: 'get',
    params: query
  })
}

// 新增
export const saveAndAdd = (data) => {
  return request({
    url: '/system/deviceInfo/save',
    method: 'post',
    data: data
  })
}

// 修改/更新  保存 
export const saveAndEdit = (data) => {
  return request({
    url: '/system/deviceInfo/save',
    method: 'post',
    data: data
  })
}

// 获取详情
export const getDetails = (data) => {
  return request({
    url: '/system/agreementInfo/selectById',
    method: 'get',
    params: data
  })
}

// 删除模板
export const deleteById = (id) => {
  return request({
    url: '/system/deviceInfo/deleteById',
    method: 'delete',
    params: {id:id}
  })
}


/**    基础表单接口  结束    */