config.js 1.2 KB
Newer Older
wangdanlei's avatar
wangdanlei committed
1
import {
wangdanlei's avatar
wangdanlei committed
2 3
  get,
  post
wangdanlei's avatar
wangdanlei committed
4 5 6 7
  //  del
} from '../utils/http'
// 查询模型配置信息
export function getLayouts(typeKey, layoutType) {
wangdanlei's avatar
wangdanlei committed
8 9 10 11 12 13 14 15 16 17 18 19 20
  return new Promise(async(resolve, reject) => {
    get('/DxModelComponent/findModelComponent', { modelDefName: typeKey, layoutType }).then(res => {
      if (res.items && res.items.content) {
        resolve({
          items: res.items.content
        })
      }
    })
  })
}
// 深度查询
export function searchView(params) {
  return post('/DxView/page', params)
wangdanlei's avatar
wangdanlei committed
21 22 23 24 25 26 27 28 29 30 31
}
export function getParentNameBySubTypeName(modelName) {
  return get('/ModelDefinition/parents/name', { modelName })
}
export function getLifecycleTemplateById(id) {
  return get(`/LifecycleTemplate/findDetail/${id}`)
}
export function getMenu(params) {
  return get(`/perm/PageResource/findUserCatalogMenu`, params)
  // return get(`/DxApplicationWorkspace/menu`, params)
}
wangdanlei's avatar
wangdanlei committed
32 33 34 35 36 37 38 39 40

// 根据业务密级查询用户密级
export function getUserSecretBySecret(params) {
  return get(`/SecretCodeMatrix/getUserSecretBySecret`, params)
}
// 返回在生命周期模板中定义的当前状态可到达的所有路径的状态集合
export function getStateOptions(params) {
  return get(`/LifecycleTemplate/getNextStates`, params)
}