import BaseACTION from './base_action'
import { Affairs } from '@api'

export default class AffairsAction extends BaseACTION {
  /* 获取事务类型 */
  getAffairsType () { return Affairs.getAffairsType().then(res => res) }
  /* 获取事务列表内容 */
  getAffairsData (obj) { return Affairs.getAffairsData(obj).then(res => res) }
  /* 提交事务申请 */
  submitLearning (obj) { return Affairs.submitLearning(obj).then(res => res) }
  /* 删除事务 */
  deleteAffairs (reid) { return Affairs.deleteAffairs(reid).then(res => res) }
  /* 获取事务详情 */
  getAffairsDetails (rid) { return Affairs.getAffairsDetails(rid).then(res => res) }
  /* 修改事务 */
  updateAffairs (rid, obj) { return Affairs.updateAffairs(rid, obj).then(res => res) }
  /* 重修图片上传 */
  uploadFile (obj) { return Affairs.uploadFile(obj).then(res => res) }
}
