import { fetch } from '../../utils/utils.js'
var username = JSON.parse(localStorage.getItem('portalCurrentUserInfo') || '{}').empuid
// 根据PID加载组合列表
export function getCombinationList (id, frameVersion) {
  return fetch({
    url: '/subprocess-combination/getListByPid/' + id + '/' + frameVersion,
    method: 'post'
  })
}
// // 根据组合ID加载条件列表
// export function getConditionList (id, type, frameVersion) {
//   return fetch({
//     url: '/subprocess-condition/getListByPid/' + id + '/' + type + '/' + frameVersion,
//     method: 'post'
//   })
// }
// 根据条件ID加载关系列表
export function getRelationList (id, frameVersion) {
  return fetch({
    url: '/subprocess-relation/getListByPid/' + id + '/' + frameVersion,
    method: 'post'
  })
}


// 根据PID加载组合列表
export function getListByPid (pId,version) {
  return fetch({
    url: `/subprocess-combination/getListByPid/${pId}/${version}`,
    method: 'POST'
  })
}
export function loaddragform (id, params) {
  return fetch({
    url: `/processNodeConfig/loaddragform/${id}?version=`,
    method: 'GET',
    params
  })
}
export function getConditionList (comId) {
  return fetch({
    url: `/subprocess-condition/getConditionList/${comId}`,
    method: 'GET'
  })
}
// 根据字典名称code获取字典值
export function getDictionaryOption(params) {
  return fetch({
    url: '/datadictionary/getDictionaryOption',
    method: 'GET',
    params
  })
}