flow.js 408 B

1234567891011121314151617181920
  1. /**
  2. * 工作流统一分类格式
  3. * @param category 分类字典号
  4. * @returns {string}
  5. */
  6. export function flowCategory(category) {
  7. return `flow_${category}`;
  8. }
  9. /**
  10. * 根据key获取流程路由
  11. * @param routes
  12. * @param key
  13. */
  14. export function flowRoute(routes, key) {
  15. const data = routes.filter(d => {
  16. return d.routeKey === key;
  17. });
  18. return data.length === 0 ? [] : data[0].routeValue;
  19. }