import request from '@/utils/request'
import upload from '@/utils/upload'

// 上传文件
export function saveFileManagement(data) {
  return request({
    url: '/apiwork/fileApi/saveFileManagement',
    method: 'post',
	data:data
  })
}

// 下载文件时调用
export function countLikeNum(val) {
  return request({
    url: '/apiwork/fileApi/countLikeNum/' + val,
    method: 'get',
  })
}

// 点赞/取消点赞
export function fileApilike(val) {
  return request({
    url: '/apiwork/fileApi/like/' + val,
    method: 'get',
  })
}

// 宣传资料列表
export function findAll(data) {
  return request({
    url: '/apiwork/fileApi/findAll',
    method: 'get',
    data: data,
  })
}

// 工單提交
export function submitWork(data) {
  return request({
    'url': '/apiwork/work/tzzrz/createTzzWork',
    method: 'post',
    data: data,
  })
}
// 文件上传
export function uploadFile(data) {
  return upload({
    url: '/common/upload',
	method:'PUT',
    name: data.name,
    filePath: data.filePath
  })
}

// 查询意见反馈类型列表
export function ideaType(data) {
  return request({
    'url': '/apiwork/tyPublicApi/idea/v1/ideaType',
    method: 'get'
  })
}

// 提交反馈
export function feedbackSub(data) {
  return request({
    'url': '/apiwork/tyPublicApi/idea/v1/add',
    method: 'post',
    data: data,
  })
}