workspace.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. import request from '@/api'
  2. import qs from 'qs'
  3. /**
  4. * @param {*} actionMode
  5. * 常用功能更新(保存):commonlyRenew
  6. * 常用功能列表:commonlyList
  7. * 菜单模式更新:menuMode
  8. * @returns
  9. */
  10. const actionModeMap = {
  11. save: 'commonlyRenew',
  12. list: 'commonlyList',
  13. mode: 'menuMode'
  14. }
  15. export function workspaceCommonUse(type, data) {
  16. const actionMode = actionModeMap[type]
  17. if (!actionMode) {
  18. return console.warn('未知类型type')
  19. }
  20. return request({
  21. baseURL: '/userCenter',
  22. url: `/workDesktop/renew/${actionMode}`,
  23. method: 'POST',
  24. data
  25. })
  26. }
  27. // 获取工作桌面菜单
  28. export function getWorkspaceMenu() {
  29. return request({
  30. baseURL: '/userCenter',
  31. url: '/workDesktop/menuInfo',
  32. method: 'POST'
  33. })
  34. }
  35. // 商机管理 - 我的客户
  36. export function customerQuery(data) {
  37. return request({
  38. baseURL: '/entnicheNew',
  39. url: '/customer/query',
  40. method: 'POST',
  41. data
  42. })
  43. }
  44. // 商机管理 - 客户关注列表
  45. export function entNewFollowClientList(params) {
  46. return request({
  47. baseURL: '/entnicheNew',
  48. url: '/customer/list',
  49. method: 'GET',
  50. params
  51. })
  52. }
  53. // 商机管理 - 过程数据看板 - 数据概览 - 个人数据概览
  54. export function getEmployeeDataOverview(data) {
  55. data = qs.stringify(data)
  56. return request({
  57. baseURL: '/entnicheNew',
  58. url: '/employeeDataBoard/userDataView',
  59. method: 'POST',
  60. data
  61. })
  62. }
  63. // 商机管理 - 过程数据看板 - 数据概览 - 部门数据概览
  64. export function getDepDataOverview(data) {
  65. data = qs.stringify(data)
  66. return request({
  67. baseURL: '/entnicheNew',
  68. url: '/reportform/departDataOverView',
  69. method: 'POST',
  70. data
  71. })
  72. }
  73. // 商机管理 - 查询用户关键词列表
  74. export function getEntNicheSubKeyList() {
  75. return request({
  76. baseURL: '/entnicheNew',
  77. url: '/subscribe/key/get',
  78. method: 'POST'
  79. })
  80. }
  81. // 消息中心 - 消息列表查询
  82. export function getMessageCenterList(data) {
  83. return request({
  84. baseURL: '/jyapi/messageCenter',
  85. url: '/MessageList',
  86. method: 'POST',
  87. data
  88. })
  89. }
  90. // 获工作台介绍
  91. export function getWhatIsWorkspace() {
  92. return request({
  93. baseURL: '/front',
  94. url: '/bootstrap/specification',
  95. method: 'get'
  96. })
  97. }