import request from '@/utils/request'

// 查询列表
export function listTable(query) {
  return request({
    url: '/worktecket/sign/template/list',
    method: 'get',
    params: query
  })
}
// 删除数据
export function delTable(ids) {
  return request({
    url: `/worktecket/sign/template/${ids}`,
    method: 'delete'
  })
}
// 修改作业签字模板
export function editSignTemplate(data) {
  return request({
    url: '/worktecket/sign/template',
    method: 'put',
    data: data
  })
}
// 获取作业票签字模板详细信息
export function getJobDetails(id) {
  return request({
    url: `/worktecket/sign/template/${id}`,
    method: 'get'
  })
}
// 新增作业签字模板
export function addSignTemplate(data) {
  return request({
    url: '/worktecket/sign/template',
    method: 'post',
    data
  })
}
// 安全措施模板
// 查询列表
export function measuresList(query) {
  return request({
    url: '/worktecket/measures/list',
    method: 'get',
    params: query
  })
}
// 删除作业票安全措施模板
export function delMeasures(ids) {
  return request({
    url: `/worktecket/measures/${ids}`,
    method: 'delete'
  })
}
// 修改作业票安全措施模板
export function editMeasuresTemplate(data) {
  return request({
    url: '/worktecket/measures',
    method: 'put',
    data: data
  })
}
// 获取作业票签字模板详细信息
export function getMeasuresDetails(id) {
  return request({
    url: `/worktecket/measures/${id}`,
    method: 'get'
  })
}
// 新增作业票安全措施模板
export function addMeasuresTemplate(data) {
  return request({
    url: '/worktecket/measures',
    method: 'post',
    data
  })
}
// 查询字典
export function dictType(query) {
  return request({
    url: '/system/dict/data/list',
    method: 'get',
    params: query
  })
}
// 查询用户列表
export function listUser(query) {
  return request({
    url: '/system/user/list',
    method: 'get',
    params: query
  })
}
// 获取部门
export function deptTree(params) {
  return request({
    url: '/system/user/deptTree',
    method: "get",
    params
  });
}
// 查询区域树
export function areaTree(params) {
  return request({
    url: `/system/area/areaTree`,
    method: "get",
    params
  });
}
// 查询岗位列表
export function listPost(query) {
  return request({
    url: '/system/post/list',
    method: 'get',
    params: query
  })
}


// 获取作业票签字模板详细信息
export function getWorktecketDetails(id) {
  return request({
    url: `/worktecket/data/${id}`,
    method: 'get'
  })
}

// 删除作业票
export function delWorktecket(ids) {
  return request({
    url: `/worktecket/data/${ids}`,
    method: 'delete'
  })
}
// 查询作业票信息列表
export function queryWorktecketList(params) {
  return request({
    url: `/worktecket/data/list`,
    method: 'get',
    params
  })
}

// 获取作业票操作记录列表
export function worktecketOperateRecord(id) {
  return request({
    url: `/worktecket/data/operateRecord/${id}`,
    method: 'get'
  })
}
export function getBase64(path) {
  return request({
    url: `/common/getBase64?path=${path}`,
    method: 'get'
  })
}
