import axios from '@/common/services/axios-instance'

class AuditWorkflowService {
  // 获取表单list
  getFormList(id) {
    return axios({
      url: `api/xcoa-mobile/v1/iamflownode/getFormList?id=${id}`,
      method: 'get',
    }).then((res) => {
      return res.data
    })
  }

  getFormNotIdList() {
    return axios({
      url: `api/xcoa-mobile/v1/iamflownode/getFormNotIdList`,
      method: 'get',
    }).then((res) => {
      return res.data
    })
  }

  // 保存表单list
  saveNodeList(params) {
    return axios({
      url: 'api/xcoa-mobile/v1/iamflownode/saveNodeList',
      method: 'post',
      data: params,
      headers: {
        'Content-Type': 'application/json',
      },
    }).then((res) => {
      return res.data
    })
  }
}

export default new AuditWorkflowService()
