data.js 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425
  1. /**
  2. * label 模块名
  3. * img 模块图标
  4. * url 点击后跳转的页面
  5. * query 跳转页面时携带的参数
  6. * auth 模块权限
  7. * type 模块类型
  8. */
  9. export const quickListLib = [
  10. {
  11. label: '建客户',
  12. img: 'images/home/quick_customer.png',
  13. url: '/pages_crm/customer/create',
  14. query: { type: 'customer' },
  15. auth: 'crm.customer.save',
  16. type: 'customer',
  17. typeNum: 1
  18. },
  19. {
  20. label: '建商机',
  21. img: 'images/home/quick_business.png',
  22. url: '/pages_crm/business/create',
  23. query: { type: 'business' },
  24. auth: 'crm.business.save',
  25. type: 'business',
  26. typeNum: 2
  27. },
  28. {
  29. label: '发任务',
  30. img: 'images/home/quick_task.png',
  31. url: '/pages_task/add',
  32. type: 'task',
  33. typeNum: 3
  34. },
  35. {
  36. label: '写日志',
  37. img: 'images/home/quick_log.png',
  38. url: '/pages_log/add',
  39. auth: 'oa.log',
  40. type: 'log',
  41. typeNum: 4
  42. },
  43. {
  44. label: '发审批',
  45. img: 'images/home/quick_examine.png',
  46. url: '/pages_examine/index',
  47. type: 'examine',
  48. typeNum: 5
  49. },
  50. {
  51. label: '建联系人',
  52. img: 'images/home/quick_contacts.png',
  53. url: '/pages_crm/contacts/create',
  54. query: { type: 'contacts' },
  55. type: 'contacts',
  56. typeNum: 6
  57. },
  58. {
  59. label: '建合同',
  60. img: 'images/home/quick_contract.png',
  61. url: '/pages_crm/contract/create',
  62. query: { type: 'contract' },
  63. type: 'contract',
  64. typeNum: 7
  65. },
  66. {
  67. label: '建线索',
  68. img: 'images/home/quick_leads.png',
  69. url: '/pages_crm/leads/create',
  70. query: { type: 'leads' },
  71. type: 'leads',
  72. typeNum: 8
  73. },
  74. {
  75. label: '建产品',
  76. img: 'images/home/quick_product.png',
  77. url: '/pages_crm/product/create',
  78. query: { type: 'product' },
  79. type: 'product',
  80. typeNum: 9
  81. },
  82. {
  83. label: '建回款',
  84. img: 'images/home/quick_receivables.png',
  85. url: '/pages_crm/receivables/create',
  86. query: { type: 'receivables' },
  87. type: 'receivables',
  88. typeNum: 10
  89. },
  90. {
  91. label: '建外勤',
  92. img: 'images/home/quick_legwork.png',
  93. url: '/pages_oa/legwork/add',
  94. type: 'legwork',
  95. typeNum: 11
  96. },
  97. {
  98. label: '建公告',
  99. img: 'images/home/quick_announcement.png',
  100. url: '/pages_oa/notice/add',
  101. type: 'announcement',
  102. typeNum: 12
  103. }
  104. ]
  105. export const crmLibList = [
  106. {
  107. label: '线索',
  108. icon: 'images/application/leads.png',
  109. auth: 'crm.leads',
  110. url: '/pages_crm/leads/index',
  111. type: 'leads',
  112. typeNum: 1
  113. },
  114. {
  115. label: '客户',
  116. icon: 'images/application/customer.png',
  117. auth: 'crm.customer',
  118. url: '/pages_crm/customerAndContacts/index?type=list&&index=0',
  119. type: 'customer',
  120. typeNum: 2
  121. },
  122. {
  123. label: '公海',
  124. icon: 'images/application/pool.png',
  125. auth: 'crm.pool',
  126. url: '/pages_crm/seas/index',
  127. type: 'pool',
  128. typeNum: 3
  129. },
  130. {
  131. label: '联系人',
  132. icon: 'images/application/contacts.png',
  133. auth: 'crm.contacts',
  134. url: '/pages_crm/customerAndContacts/index?type=list&&index=1',
  135. type: 'contacts',
  136. typeNum: 4
  137. },
  138. {
  139. label: '附近客户',
  140. icon: 'images/application/nearby.png',
  141. auth: 'crm.customer.nearbyCustomer',
  142. url: '/pages_crm/nearby/index',
  143. type: 'nearbyCustomer',
  144. typeNum: 5
  145. },
  146. {
  147. label: '商机',
  148. icon: 'images/application/business.png',
  149. auth: 'crm.business',
  150. url: '/pages_crm/business/index?type=list',
  151. type: 'business',
  152. typeNum: 6
  153. },
  154. {
  155. label: '产品',
  156. icon: 'images/application/product.png',
  157. auth: 'crm.product',
  158. url: '/pages_crm/product/index',
  159. type: 'product',
  160. typeNum: 7
  161. },
  162. {
  163. label: '合同',
  164. icon: 'images/application/contract.png',
  165. auth: 'crm.contract',
  166. url: '/pages_crm/contract/index',
  167. type: 'contract',
  168. typeNum: 8
  169. },
  170. {
  171. label: '回款',
  172. icon: 'images/application/receivables.png',
  173. auth: 'crm.receivables',
  174. url: '/pages_crm/receivables/index',
  175. type: 'receivables',
  176. typeNum: 9
  177. },
  178. {
  179. label: '发票',
  180. icon: 'images/application/invoice.png',
  181. auth: 'crm.invoice',
  182. url: '/pages_crm/invoice/index',
  183. type: 'invoice',
  184. typeNum: 18
  185. }
  186. ]
  187. export const oaLibList = [
  188. {
  189. label: '公告',
  190. icon: 'images/application/announcement.png',
  191. auth: '',
  192. url: '/pages_oa/notice/index',
  193. type: 'announcement',
  194. typeNum: 10
  195. },
  196. {
  197. label: '待办',
  198. icon: 'images/application/remind.png',
  199. auth: '',
  200. url: '/pages_message/backlogIndex',
  201. type: 'backlog',
  202. typeNum: 11
  203. },
  204. {
  205. label: '任务',
  206. icon: 'images/application/task.png',
  207. auth: 'oa.taskExamine',
  208. url: '/pages_task/index',
  209. type: 'task',
  210. typeNum: 12
  211. },
  212. {
  213. label: '日志',
  214. icon: 'images/application/worklog.png',
  215. auth: 'oa.log',
  216. url: '/pages_log/index',
  217. type: 'log',
  218. typeNum: 13
  219. },
  220. {
  221. label: '通讯录',
  222. icon: 'images/application/address_book.png',
  223. auth: 'oa.book',
  224. url: '/pages_oa/concat/index',
  225. type: 'book',
  226. typeNum: 14
  227. },
  228. {
  229. label: '审批',
  230. icon: 'images/application/examine.png',
  231. auth: 'oa.taskExamine',
  232. url: '/pages_examine/index',
  233. type: 'examine',
  234. typeNum: 15
  235. },
  236. {
  237. label: '外勤签到',
  238. icon: 'images/application/sign_in.png',
  239. auth: 'crm.outwork.read',
  240. url: '/pages_oa/legwork/index',
  241. type: 'legwork',
  242. typeNum: 16
  243. },
  244. {
  245. label: '跟进记录',
  246. icon: 'images/application/follow.png',
  247. auth: 'crm.followRecord.read',
  248. url: '/pages_oa/record/index',
  249. type: 'record',
  250. typeNum: 17
  251. }
  252. ]
  253. export const navLibList = [
  254. {
  255. name: '首页',
  256. icon: 'ft ft-home',
  257. active_icon: 'ft ft-home-fill',
  258. path: '/pages/home/index',
  259. typeNum: 1
  260. },
  261. {
  262. name: '客户',
  263. icon: 'ft ft-customer',
  264. active_icon: 'ft ft-customer-fill',
  265. path: '/pages_crm/customerAndContacts/index',
  266. typeNum: 2
  267. },
  268. {
  269. name: '商机',
  270. icon: 'ft ft-business',
  271. active_icon: 'ft ft-business-fill',
  272. path: '/pages_crm/business/index',
  273. typeNum: 3
  274. },
  275. {
  276. name: '消息',
  277. icon: 'ft ft-news',
  278. active_icon: 'ft ft-news-fill',
  279. path: '/pages_message/index',
  280. typeNum: 4
  281. },
  282. {
  283. name: '产品',
  284. icon: 'ft ft-product',
  285. active_icon: 'ft ft-product-fill',
  286. path: '/pages_crm/product/index',
  287. typeNum: 5
  288. },
  289. {
  290. name: '线索',
  291. icon: 'ft ft-clue',
  292. active_icon: 'ft ft-clue-fill',
  293. path: '/pages_crm/leads/index',
  294. typeNum: 6
  295. },
  296. {
  297. name: '公海',
  298. icon: 'ft ft-international',
  299. active_icon: 'ft ft-international-fill',
  300. path: '/pages_crm/seas/index',
  301. typeNum: 7
  302. },
  303. {
  304. name: '合同',
  305. icon: 'ft ft-contract',
  306. active_icon: 'ft ft-contract-fill',
  307. path: '/pages_crm/contract/index',
  308. typeNum: 8
  309. },
  310. // {
  311. // name: '外勤',
  312. // icon: 'ft ft-legwork',
  313. // active_icon: 'ft ft-legwork-fill',
  314. // path: '',
  315. // typeNum: 9
  316. // },
  317. {
  318. name: '回款',
  319. icon: 'ft ft-return',
  320. active_icon: 'ft ft-return-fill',
  321. path: '/pages_crm/receivables/index',
  322. typeNum: 10
  323. },
  324. {
  325. name: '任务',
  326. icon: 'ft ft-task',
  327. active_icon: 'ft ft-task-fill',
  328. path: '/pages_task/index',
  329. typeNum: 11
  330. },
  331. {
  332. name: '我的',
  333. icon: 'ft ft-my',
  334. active_icon: 'ft ft-my-fill',
  335. path: '/pages/application/index',
  336. typeNum: 12,
  337. badge: 0,
  338. disabled: true
  339. }
  340. ]
  341. export function getQuickList(typeArr) {
  342. const res = []
  343. typeArr.forEach(type => {
  344. const findRes = quickListLib.find(o => o.typeNum === type)
  345. if (findRes) {
  346. res.push(findRes)
  347. }
  348. })
  349. return res
  350. }
  351. export function getCommonNavList(typeArr) {
  352. const res = []
  353. typeArr.forEach(type => {
  354. let findRes = crmLibList.find(o => o.typeNum === type)
  355. if (findRes) {
  356. res.push(findRes)
  357. } else {
  358. findRes = oaLibList.find(o => o.typeNum === type)
  359. if (findRes) {
  360. res.push(findRes)
  361. }
  362. }
  363. })
  364. return res
  365. }
  366. export function getNavList(typeArr) {
  367. const res = []
  368. typeArr.forEach(type => {
  369. const findRes = navLibList.find(o => o.typeNum === type)
  370. if (findRes) {
  371. res.push(findRes)
  372. }
  373. })
  374. return res
  375. }
  376. export const timeOptions = [
  377. { label: '今天', value: 'today' },
  378. { label: '昨天', value: 'yesterday' },
  379. { label: '明天', value: 'tomorrow' },
  380. { label: '本周', value: 'week' },
  381. { label: '上周', value: 'lastWeek' },
  382. { label: '下周', value: 'nextWeek' },
  383. { label: '本月', value: 'month' },
  384. { label: '上月', value: 'lastMonth' },
  385. { label: '下月', value: 'nextMonth' },
  386. { label: '本季度', value: 'quarter' },
  387. { label: '上一季度', value: 'lastQuarter' },
  388. { label: '下一季度', value: 'nextQuarter' },
  389. { label: '本年度', value: 'year' },
  390. { label: '上一年度', value: 'lastYear' },
  391. { label: '下一年度', value: 'nextYear' },
  392. { label: '自定义', value: 'custom' }
  393. ]
  394. export const largeTimeOptions = [
  395. { label: '本年度', value: 'year' },
  396. { label: '上一年度', value: 'lastYear' },
  397. { label: '下一年度', value: 'nextYear' },
  398. { label: '上半年', value: 'firstHalfYear' },
  399. { label: '下半年', value: 'nextHalfYear' },
  400. { label: '本季度', value: 'quarter' },
  401. { label: '上一季度', value: 'lastQuarter' },
  402. { label: '下一季度', value: 'nextQuarter' },
  403. { label: '本月', value: 'month' },
  404. { label: '上月', value: 'lastMonth' },
  405. { label: '下月', value: 'nextMonth' },
  406. { label: '本周', value: 'week' },
  407. { label: '上周', value: 'lastWeek' },
  408. { label: '下周', value: 'nextWeek' },
  409. { label: '今天', value: 'today' },
  410. { label: '昨天', value: 'yesterday' },
  411. { label: '明天', value: 'tomorrow' },
  412. { label: '过去7天', value: 'previous7day' },
  413. { label: '过去30天', value: 'previous30day' },
  414. { label: '未来7天', value: 'future7day' },
  415. { label: '未来30天', value: 'future30day' },
  416. { label: '自定义', value: -1 }
  417. ]