import axios from '@/common/services/axios-instance'
class FlowamendService {
  // 获取下级流程分类
  getTreeNode(params) {
    return axios({
      url: `api/framework/v1/process-prop/child-categories`,
      method: 'get',
      params,
    })
  }

  // 获取业务属性
  getBusinessAttr(params) {
    return axios({
      url: `api/framework/v1/process-prop/datasbyparam`,
      method: 'get',
      params,
    }).then((res) => {
      return res.data
    })
  }

  // 获取工作日历列表
  getWorklogList(params) {
    return axios.post('api/framework/v1/work-calendar/list', params).then((res) => {
      return res.data
    })
  }

  // 获取流程属性应用全局配置
  getAppSetting() {
    return axios.get('api/framework/v1/process-prop/app-setting').then((res) => {
      return res
    })
  }

  // 批量修改属性
  amendAttr(params) {
    return axios.put('api/framework/v1/process-prop/process', params)
  }
}
export default new FlowamendService()
