index.ts 79 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724
  1. import { EnumRouterName } from '@/common/constants/enumRouterName';
  2. import { setLoadComplete } from '@/common/methods';
  3. import { getLoadIsComplete } from '@/common/methods/mixin';
  4. import Main from '@/layout/components/main.vue';
  5. import Layout from '@/layout/index.vue';
  6. import { globalDataRefresh } from '@/services/bus';
  7. import { isLogin, login } from '@/services/bus/login';
  8. import { localStorageUtil } from '@/utils/storage';
  9. import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router';
  10. import eventBus from '../utils/eventBus';
  11. const routes: Array<RouteRecordRaw> = [
  12. {
  13. path: '/login',
  14. name: 'login',
  15. component: () => import('@/views/account/login.vue'),
  16. },
  17. {
  18. path: '/logon',
  19. name: 'logon',
  20. component: () => import('@/views/account/logon.vue'),
  21. },
  22. {
  23. path: '/resetPassword',
  24. name: 'resetPassword',
  25. component: () => import('@/views/account/resetPassword.vue'),
  26. },
  27. {
  28. path: '/',
  29. component: Layout,
  30. props: true,
  31. redirect: '/login',
  32. children: [
  33. {
  34. path: '/home',
  35. name: 'home',
  36. component: () => import('@/views/home.vue'),
  37. },
  38. {
  39. path: '/futures',
  40. name: 'forward',
  41. component: () => import('@/views/market/forward/index.vue'),
  42. },
  43. {
  44. path: '/warehouse-trade',
  45. name: 'warehouseTrade',
  46. component: () => import('@/views/market/warehouseTrade/index.vue'),
  47. },
  48. {
  49. path: 'custom_info',
  50. name: 'custom_info',
  51. component: Main,
  52. meta: {
  53. requireAuth: true,
  54. },
  55. redirect: (to) => {
  56. return { name: 'custom_info_unsubmit' };
  57. },
  58. children: [
  59. {
  60. path: '/custom_info/custom_info_normal',
  61. name: 'custom_info_normal',
  62. component: () => import('@/views/information/custom/list/normal-use/index.vue'),
  63. meta: {
  64. requireAuth: true,
  65. },
  66. },
  67. {
  68. path: '/custom_info/custom_info_disabled',
  69. name: 'custom_info_disabled',
  70. component: () => import('@/views/information/custom/list/stop-use/index.vue'),
  71. meta: {
  72. requireAuth: true,
  73. },
  74. },
  75. {
  76. path: '/custom_info/custom_info_checkpending',
  77. name: 'custom_info_checkpending',
  78. component: () => import('@/views/information/custom/list/checkpending/index.vue'),
  79. meta: {
  80. requireAuth: true,
  81. },
  82. },
  83. {
  84. path: '/custom_info/custom_info_unsubmit',
  85. name: 'custom_info_unsubmit',
  86. component: () => import('@/views/information/custom/list/unsubmit/index.vue'),
  87. meta: {
  88. requireAuth: true,
  89. },
  90. },
  91. ],
  92. },
  93. {
  94. path: 'goods_info',
  95. name: 'goods_info',
  96. component: Main,
  97. meta: {
  98. requireAuth: true,
  99. },
  100. redirect: (to) => {
  101. return { name: 'goods_info_spot' };
  102. },
  103. children: [
  104. {
  105. path: '/goods_info/goods_info_spot',
  106. name: 'goods_info_spot',
  107. component: () => import('@/views/information/goods/list/spot-variety/index.vue'),
  108. meta: {
  109. requireAuth: true,
  110. },
  111. },
  112. {
  113. path: '/goods_info/goods_info_hedge',
  114. name: 'goods_info_hedge',
  115. component: () => import('@/views/information/goods/list/hedging-variety/index.vue'),
  116. meta: {
  117. requireAuth: true,
  118. },
  119. },
  120. ],
  121. },
  122. {
  123. path: '/spot_contract',
  124. name: 'spot_contract',
  125. component: Main,
  126. meta: {
  127. requireAuth: true,
  128. },
  129. redirect: (to) => {
  130. return { name: 'spot_contract_unsubmitted' };
  131. },
  132. children: [
  133. {
  134. path: '/spot_contract/spot_contract_unsubmitted',
  135. name: 'spot_contract_unsubmitted',
  136. component: () => import('@/views/information/spot-contract/list/unsubmitted/index.vue'),
  137. meta: {
  138. requireAuth: true,
  139. },
  140. },
  141. {
  142. path: '/spot_contract/spot_contract_checkpending',
  143. name: 'spot_contract_checkpending',
  144. component: () => import('@/views/information/spot-contract/list/checkpending/index.vue'),
  145. meta: {
  146. requireAuth: true,
  147. },
  148. },
  149. {
  150. path: '/spot_contract/spot_contract_performance',
  151. name: 'spot_contract_performance',
  152. component: () => import('@/views/information/spot-contract/list/performance/index.vue'),
  153. meta: {
  154. requireAuth: true,
  155. },
  156. },
  157. {
  158. path: '/spot_contract/spot_contract_finished',
  159. name: 'spot_contract_finished',
  160. component: () => import('@/views/information/spot-contract/list/finished/index.vue'),
  161. meta: {
  162. requireAuth: true,
  163. },
  164. },
  165. ],
  166. },
  167. {
  168. path: '/account_info',
  169. name: 'account_info',
  170. component: Main,
  171. meta: {
  172. requireAuth: true,
  173. },
  174. redirect: (to) => {
  175. return { name: 'account_info_business' };
  176. },
  177. children: [
  178. {
  179. path: '/account_info/account_info_business',
  180. name: 'account_info_business',
  181. component: () => import('@/views/information/account_info/list/account_info_business/index.vue'),
  182. meta: {
  183. requireAuth: true,
  184. },
  185. },
  186. {
  187. path: '/account_info/account_info_futures',
  188. name: 'account_info_futures',
  189. component: () => import('@/views/information/account_info/list/account_info_futures/index.vue'),
  190. meta: {
  191. requireAuth: true,
  192. },
  193. },
  194. {
  195. path: '/account_info/account_info_manager',
  196. name: 'account_info_manager',
  197. component: () => import('@/views/information/account_info/list/account_info_manager/index.vue'),
  198. meta: {
  199. requireAuth: true,
  200. },
  201. },
  202. {
  203. path: '/account_info/account_info_trade',
  204. name: 'account_info_trade',
  205. component: () => import('@/views/information/account_info/list/account_info_trade/index.vue'),
  206. meta: {
  207. requireAuth: true,
  208. },
  209. },
  210. ],
  211. },
  212. {
  213. path: '/warehouse_info',
  214. name: 'warehouse_info',
  215. component: Main,
  216. meta: {
  217. requireAuth: true,
  218. },
  219. redirect: (to) => {
  220. return { name: 'warehouse_info_normal' };
  221. },
  222. children: [
  223. {
  224. path: '/warehouse_info/warehouse_info_normal',
  225. name: 'warehouse_info_normal',
  226. component: () => import('@/views/information/warehouse-info/list/normal-use/index.vue'),
  227. meta: {
  228. requireAuth: true,
  229. },
  230. },
  231. {
  232. path: '/warehouse_info/warehouse_info_disabled',
  233. name: 'warehouse_info_disabled',
  234. component: () => import('@/views/information/warehouse-info/list/stop-use/index.vue'),
  235. meta: {
  236. requireAuth: true,
  237. },
  238. },
  239. ],
  240. },
  241. {
  242. path: '/outaccount_status',
  243. name: 'outaccount_status',
  244. component: () => import('@/views/search/outaccount_status/index.vue'),
  245. meta: {
  246. requireAuth: true,
  247. },
  248. },
  249. {
  250. path: '/inventory',
  251. name: 'inventory',
  252. component: Main,
  253. meta: {
  254. requireAuth: true,
  255. },
  256. redirect: (to) => {
  257. return { name: 'inventory_current' };
  258. },
  259. children: [
  260. {
  261. path: '/inventory/inventory_current',
  262. name: 'inventory_current',
  263. component: () => import('@/views/search/inventory/list/inventory_current/index.vue'),
  264. meta: {
  265. requireAuth: true,
  266. },
  267. },
  268. {
  269. path: '/inventory/inventory_applyrecord',
  270. name: 'inventory_applyrecord',
  271. component: () => import('@/views/search/inventory/list/inventory_applyrecord/index.vue'),
  272. meta: {
  273. requireAuth: true,
  274. },
  275. },
  276. ]
  277. },
  278. {
  279. path: '/purchase',
  280. name: 'purchase',
  281. component: Main,
  282. meta: {
  283. requireAuth: true,
  284. },
  285. redirect: { name: 'purchase_pending' },
  286. children: [
  287. {
  288. path: '/purchase/purchase_pending',
  289. name: 'purchase_pending',
  290. component: () => import('@/views/business/purchase/list/pending/index.vue'),
  291. meta: {
  292. requireAuth: true,
  293. },
  294. },
  295. {
  296. path: '/purchase/purchase_performance',
  297. name: 'purchase_performance',
  298. component: () => import('@/views/business/purchase/list/performance/index.vue'),
  299. meta: {
  300. requireAuth: true,
  301. },
  302. },
  303. {
  304. path: '/purchase/purchase_all',
  305. name: 'purchase_all',
  306. component: () => import('@/views/business/purchase/list/all/index.vue'),
  307. meta: {
  308. requireAuth: true,
  309. },
  310. },
  311. ],
  312. },
  313. {
  314. path: '/sell',
  315. name: 'sell',
  316. component: Main,
  317. meta: {
  318. requireAuth: true,
  319. },
  320. redirect: { name: 'sell_pending' },
  321. children: [
  322. {
  323. path: '/sell/sell_pending',
  324. name: 'sell_pending',
  325. component: () => import('@/views/business/sell/list/pending/index.vue'),
  326. meta: {
  327. requireAuth: true,
  328. },
  329. },
  330. {
  331. path: '/sell/sell_performance',
  332. name: 'sell_performance',
  333. component: () => import('@/views/business/sell/list/performance/index.vue'),
  334. meta: {
  335. requireAuth: true,
  336. },
  337. },
  338. {
  339. path: '/sell/sell_all',
  340. name: 'sell_all',
  341. component: () => import('@/views/business/sell/list/all/index.vue'),
  342. meta: {
  343. requireAuth: true,
  344. },
  345. },
  346. ],
  347. },
  348. {
  349. path: '/exposure',
  350. name: 'exposure',
  351. component: Main,
  352. meta: {
  353. requireAuth: true,
  354. },
  355. redirect: { name: 'exposure_realtime' },
  356. children: [
  357. {
  358. path: '/exposure/exposure_realtime',
  359. name: 'exposure_realtime',
  360. component: () => import('@/views/business/exposure/list/realTime/index.vue'),
  361. meta: {
  362. requireAuth: true,
  363. },
  364. },
  365. {
  366. path: '/exposure/exposure_spot',
  367. name: 'exposure_spot',
  368. component: () => import('@/views/business/exposure/list/spot/index.vue'),
  369. meta: {
  370. requireAuth: true,
  371. },
  372. },
  373. {
  374. path: '/exposure/exposure_futures',
  375. name: 'exposure_futures',
  376. component: () => import('@/views/business/exposure/list/futures/index.vue'),
  377. meta: {
  378. requireAuth: true,
  379. },
  380. },
  381. {
  382. path: '/exposure/exposure_history',
  383. name: 'exposure_history',
  384. component: () => import('@/views/business/exposure/list/history/index.vue'),
  385. meta: {
  386. requireAuth: true,
  387. },
  388. },
  389. ],
  390. },
  391. {
  392. path: '/plan',
  393. name: 'plan',
  394. component: Main,
  395. meta: {
  396. requireAuth: true,
  397. },
  398. redirect: { name: 'plan_uncommitted' },
  399. children: [
  400. {
  401. path: '/plan/plan_uncommitted',
  402. name: 'plan_uncommitted',
  403. component: () => import('@/views/business/plan/list/uncommitted/index.vue'),
  404. meta: {
  405. requireAuth: true,
  406. },
  407. },
  408. {
  409. path: '/plan/plan_audit',
  410. name: 'plan_audit',
  411. component: () => import('@/views/business/plan/list/audit/index.vue'),
  412. meta: {
  413. requireAuth: true,
  414. },
  415. },
  416. {
  417. path: '/plan/plan_running',
  418. name: 'plan_running',
  419. component: () => import('@/views/business/plan/list/running/index.vue'),
  420. meta: {
  421. requireAuth: true,
  422. },
  423. },
  424. ],
  425. },
  426. {
  427. path: 'review',
  428. name: 'business_review',
  429. component: Main,
  430. meta: {
  431. requireAuth: true,
  432. },
  433. redirect: { name: 'business_review_someprice' },
  434. children: [
  435. {
  436. path: '/business_review/business_review_someprice',
  437. name: 'business_review_someprice',
  438. component: () => import('@/views/manage/business-review/list/someprice/index.vue'),
  439. meta: {
  440. requireAuth: true,
  441. },
  442. },
  443. {
  444. path: '/business_review/business_review_settlement',
  445. name: 'business_review_settlement',
  446. component: () => import('@/views/manage/business-review/list/settlement/index.vue'),
  447. meta: {
  448. requireAuth: true,
  449. },
  450. },
  451. ]
  452. },
  453. {
  454. path: '/finance_review',
  455. name: 'finance_review',
  456. component: Main,
  457. meta: {
  458. requireAuth: true,
  459. },
  460. redirect: { name: 'finance_review_funds' },
  461. children: [
  462. {
  463. path: '/finance_review/finance_review_funds',
  464. name: 'finance_review_funds',
  465. component: () => import('@/views/manage/finance-review/list/funds/index.vue'),
  466. meta: {
  467. requireAuth: true,
  468. },
  469. },
  470. {
  471. path: '/finance_review/finance_review_invoice',
  472. name: 'finance_review_invoice',
  473. component: () => import('@/views/manage/finance-review/list/invoice/index.vue'),
  474. meta: {
  475. requireAuth: true,
  476. },
  477. },
  478. ]
  479. },
  480. {
  481. path: '/inventory_review',
  482. name: 'inventory_review',
  483. component: Main,
  484. meta: {
  485. requireAuth: true,
  486. },
  487. redirect: { name: 'inventory_review_checkin' },
  488. children: [
  489. {
  490. path: '/inventory_review/inventory_review_checkin',
  491. name: 'inventory_review_checkin',
  492. component: () => import('@/views/manage/inventory-review/list/checkin/index.vue'),
  493. meta: {
  494. requireAuth: true,
  495. },
  496. },
  497. {
  498. path: '/inventory_review/inventory_review_checkout',
  499. name: 'inventory_review_checkout',
  500. component: () => import('@/views/manage/inventory-review/list/checkout/index.vue'),
  501. meta: {
  502. requireAuth: true,
  503. },
  504. },
  505. ]
  506. },
  507. {
  508. path: '/exposure_report',
  509. name: 'exposure_report',
  510. component: Main,
  511. meta: {
  512. requireAuth: true,
  513. },
  514. redirect: { name: 'exposure_report_exposure' },
  515. children: [
  516. {
  517. path: '/exposure_report/exposure_report_exposure',
  518. name: 'exposure_report_exposure',
  519. component: () => import('@/views/report/exposure-report/list/exposure_report/index.vue'),
  520. meta: {
  521. requireAuth: true,
  522. },
  523. },
  524. ]
  525. },
  526. {
  527. path: '/finance_report',
  528. name: 'finance_report',
  529. component: Main,
  530. meta: {
  531. requireAuth: true,
  532. },
  533. redirect: { name: 'finance_report_finance' },
  534. children: [
  535. {
  536. path: '/finance_report/finance_report_finance',
  537. name: 'finance_report_finance',
  538. component: () => import('@/views/report/finance-report/list/finance_report_finance/index.vue'),
  539. meta: {
  540. requireAuth: true,
  541. },
  542. },
  543. ]
  544. },
  545. {
  546. path: '/inventory_report',
  547. name: 'inventory_report',
  548. component: Main,
  549. meta: {
  550. requireAuth: true,
  551. },
  552. redirect: { name: 'inventory_report_inventory_category' },
  553. children: [
  554. {
  555. path: '/inventory_report/inventory_report_inventory_category',
  556. name: 'inventory_report_inventory_category',
  557. component: () => import('@/views/report/inventory-report/list/category/index.vue'),
  558. meta: {
  559. requireAuth: true,
  560. },
  561. },
  562. {
  563. path: '/inventory_report/warehouse',
  564. name: 'inventory_report_warehouse',
  565. component: () => import('@/views/report/inventory-report/list/warehouse/index.vue'),
  566. meta: {
  567. requireAuth: true,
  568. },
  569. },
  570. ]
  571. },
  572. {
  573. path: '/spot_report',
  574. name: 'spot_report',
  575. component: Main,
  576. meta: {
  577. requireAuth: true,
  578. },
  579. redirect: { name: 'spot_report_spot' },
  580. children: [
  581. {
  582. path: '/spot_report/spot_report_spot',
  583. name: 'spot_report_spot',
  584. component: () => import('@/views/report/spot-report/list/spot_report/index.vue'),
  585. meta: {
  586. requireAuth: true,
  587. },
  588. },
  589. ]
  590. },
  591. {
  592. path: '/sum_pl_report',
  593. name: 'sum_pl_report',
  594. component: Main,
  595. meta: {
  596. requireAuth: true,
  597. },
  598. redirect: { name: 'sum_pl_report_sum_pl' },
  599. children: [
  600. {
  601. path: '/sum_pl_report/sum_pl_report_sum_pl',
  602. name: 'sum_pl_report_sum_pl',
  603. component: () => import('@/views/report/sum_pl_report/list/sum_pl_report/index.vue'),
  604. meta: {
  605. requireAuth: true,
  606. },
  607. },
  608. ]
  609. },
  610. {
  611. path: '/future_report',
  612. name: 'future_report',
  613. component: Main,
  614. meta: {
  615. requireAuth: true,
  616. },
  617. redirect: { name: 'future_report_future' },
  618. children: [
  619. {
  620. path: '/future_report/future_report_future',
  621. name: 'future_report_future',
  622. component: () => import('@/views/report/future_report/list/future_report/index.vue'),
  623. meta: {
  624. requireAuth: true,
  625. },
  626. },
  627. ]
  628. },
  629. {
  630. path: '/platinum_customer_info',
  631. name: 'platinum_customer_info',
  632. component: Main,
  633. meta: {
  634. requireAuth: true,
  635. },
  636. redirect: { name: 'platinum_custom_info_normal' },
  637. children: [
  638. {
  639. path: '/platinum_customer_info/platinum_custom_info_normal',
  640. name: 'platinum_custom_info_normal',
  641. component: () => import('@/views/platinum/platinum_customer_info/list/normal-use/index.vue'),
  642. meta: {
  643. requireAuth: true,
  644. },
  645. },
  646. {
  647. path: '/platinum_customer_info/platinum_customer_info_unsubmit',
  648. name: 'platinum_customer_info_unsubmit',
  649. component: () => import('@/views/platinum/platinum_customer_info/list/unsubmit/index.vue'),
  650. meta: {
  651. requireAuth: true,
  652. },
  653. },
  654. {
  655. path: '/platinum_customer_info/platinum_customer_info_stop',
  656. name: 'platinum_customer_info_stop',
  657. component: () => import('@/views/platinum/platinum_customer_info/list/stop-use/index.vue'),
  658. meta: {
  659. requireAuth: true,
  660. },
  661. },
  662. ]
  663. },
  664. {
  665. path: '/platinum_pick_query',
  666. name: 'platinum_pick_query',
  667. component: Main,
  668. meta: {
  669. requireAuth: true,
  670. },
  671. redirect: { name: 'platinum_pick_query_tab' },
  672. children: [
  673. {
  674. path: '/platinum_pick_query/platinum_pick_query_tab',
  675. name: 'platinum_pick_query_tab',
  676. component: () => import('@/views/platinum/platinum_pick_query/list/tab/index.vue'),
  677. meta: {
  678. requireAuth: true,
  679. },
  680. },
  681. ]
  682. },
  683. {
  684. path: '/platinum_recharge_withdrawal_review',
  685. name: 'platinum_recharge_withdrawal_review',
  686. component: Main,
  687. meta: {
  688. requireAuth: true,
  689. },
  690. redirect: { name: 'platinum_recharge_review_tab' },
  691. children: [
  692. {
  693. path: '/platinum_withdrawal_review_tab/platinum_recharge_review_tab',
  694. name: 'platinum_recharge_review_tab',
  695. component: () => import('@/views/platinum/platinum_recharge_withdrawal_review/list/recharge/index.vue'),
  696. meta: {
  697. requireAuth: true,
  698. },
  699. },
  700. {
  701. path: '/platinum_withdrawal_review_tab/platinum_withdrawal_review_tab',
  702. name: 'platinum_withdrawal_review_tab',
  703. component: () => import('@/views/platinum/platinum_recharge_withdrawal_review/list/withdrawal/index.vue'),
  704. meta: {
  705. requireAuth: true,
  706. },
  707. },
  708. ]
  709. },
  710. {
  711. path: '/platinum_fixed_investment_price_query',
  712. name: 'platinum_fixed_investment_price_query',
  713. component: Main,
  714. meta: {
  715. requireAuth: true,
  716. },
  717. redirect: { name: 'platinum_fixed_investment_price_query_tab' },
  718. children: [
  719. {
  720. path: '/platinum_fixed_investment_price_query/platinum_fixed_investment_price_query_tab',
  721. name: 'platinum_fixed_investment_price_query_tab',
  722. component: () => import('@/views/platinum/platinum_fixed_investment_price_query/list/tab/index.vue'),
  723. meta: {
  724. requireAuth: true,
  725. },
  726. },
  727. ]
  728. },
  729. {
  730. path: '/platinum_fixed_investment_query',
  731. name: 'platinum_fixed_investment_query',
  732. component: Main,
  733. meta: {
  734. requireAuth: true,
  735. },
  736. redirect: { name: 'platinum_fixed_investment_plan_query' },
  737. children: [
  738. {
  739. path: '/platinum_fixed_investment_plan_query/platinum_fixed_investment_plan_query',
  740. name: 'platinum_fixed_investment_plan_query',
  741. component: () => import('@/views/platinum/platinum_fixed_investment_query/list/plan/index.vue'),
  742. meta: {
  743. requireAuth: true,
  744. },
  745. },
  746. {
  747. path: '/platinum_fixed_investment_plan_query/platinum_fixed_investment_flow_query',
  748. name: 'platinum_fixed_investment_flow_query',
  749. component: () => import('@/views/platinum/platinum_fixed_investment_query/list/flow/index.vue'),
  750. meta: {
  751. requireAuth: true,
  752. },
  753. },
  754. ]
  755. },
  756. {
  757. path: '/platinum_document_query',
  758. name: 'platinum_document_query',
  759. component: Main,
  760. meta: {
  761. requireAuth: true,
  762. },
  763. redirect: { name: 'platinum_document_query_position' },
  764. children: [
  765. {
  766. path: '/platinum_document_query/platinum_document_query_position',
  767. name: 'platinum_document_query_position',
  768. component: () => import('@/views/platinum/platinum_document_query/list/position/index.vue'),
  769. meta: {
  770. requireAuth: true,
  771. },
  772. },
  773. {
  774. path: '/platinum_document_query/platinum_document_query_order',
  775. name: 'platinum_document_query_order',
  776. component: () => import('@/views/platinum/platinum_document_query/list/order/index.vue'),
  777. meta: {
  778. requireAuth: true,
  779. },
  780. },
  781. {
  782. path: '/platinum_document_query/platinum_document_query_waiting',
  783. name: 'platinum_document_query_waiting',
  784. component: () => import('@/views/platinum/platinum_document_query/list/waiting/index.vue'),
  785. meta: {
  786. requireAuth: true,
  787. },
  788. },
  789. {
  790. path: '/platinum_document_query/platinum_document_query_success',
  791. name: 'platinum_document_query_success',
  792. component: () => import('@/views/platinum/platinum_document_query/list/success/index.vue'),
  793. meta: {
  794. requireAuth: true,
  795. },
  796. },
  797. ]
  798. },
  799. {
  800. path: '/platinum_financing_information',
  801. name: 'platinum_financing_information',
  802. component: Main,
  803. meta: {
  804. requireAuth: true,
  805. },
  806. redirect: { name: 'platinum_financing_information_tab' },
  807. children: [
  808. {
  809. path: '/platinum_financing_information/platinum_financing_information_tab',
  810. name: 'platinum_financing_information_tab',
  811. component: () => import('@/views/platinum/platinum_financing_information/list/tab/index.vue'),
  812. meta: {
  813. requireAuth: true,
  814. },
  815. },
  816. ]
  817. },
  818. {
  819. path: '/platinum_agents_and_stores',
  820. name: 'platinum_agents_and_stores',
  821. component: Main,
  822. meta: {
  823. requireAuth: true,
  824. },
  825. redirect: { name: 'platinum_agents_and_stores_tab' },
  826. children: [
  827. {
  828. path: '/platinum_agents_and_stores/platinum_agents_and_stores_tab',
  829. name: 'platinum_agents_and_stores_tab',
  830. component: () => import('@/views/platinum/platinum_agents_and_stores/list/tab/index.vue'),
  831. meta: {
  832. requireAuth: true,
  833. },
  834. },
  835. ]
  836. },
  837. {
  838. path: '/platinum_agreement',
  839. name: 'platinum_agreement',
  840. component: Main,
  841. meta: {
  842. requireAuth: true,
  843. },
  844. redirect: { name: 'platinum_agreement_tab' },
  845. children: [
  846. {
  847. path: '/platinum_agreement/platinum_agreement_tab',
  848. name: 'platinum_agreement_tab',
  849. component: () => import('@/views/platinum/platinum_agreement/list/tab/index.vue'),
  850. meta: {
  851. requireAuth: true,
  852. },
  853. },
  854. ]
  855. },
  856. {
  857. path: '/platinum_capital_flow',
  858. name: 'platinum_capital_flow',
  859. component: Main,
  860. meta: {
  861. requireAuth: true,
  862. },
  863. redirect: { name: 'platinum_capital_flow_tab' },
  864. children: [
  865. {
  866. path: '/platinum_capital_flow_tab/platinum_capital_flow_tab',
  867. name: 'platinum_capital_flow_tab',
  868. component: () => import('@/views/platinum/platinum_capital_flow/platinum_capital_flow_tab/index.vue'),
  869. meta: {
  870. requireAuth: true,
  871. },
  872. },
  873. ]
  874. },
  875. {
  876. path: '/platinum_promotion_report',
  877. name: 'platinum_promotion_report',
  878. component: Main,
  879. meta: {
  880. requireAuth: true,
  881. },
  882. redirect: { name: 'platinum_promotion_report_tab' },
  883. children: [
  884. {
  885. path: '/platinum_promotion_report/platinum_promotion_report_tab',
  886. name: 'platinum_promotion_report_tab',
  887. component: () => import('@/views/platinum/platinum_promotion_report/platinum_promotion_report_tab/index.vue'),
  888. meta: {
  889. requireAuth: true,
  890. },
  891. },
  892. ]
  893. },
  894. {
  895. path: '/platinum_signing_settings',
  896. name: 'platinum_signing_settings',
  897. component: Main,
  898. meta: {
  899. requireAuth: true,
  900. },
  901. redirect: { name: 'platinum_signing_settings_tab' },
  902. children: [
  903. {
  904. path: '/platinum_signing_settings/platinum_signing_settings_tab',
  905. name: 'platinum_signing_settings_tab',
  906. component: () => import('@/views/platinum/platinum_signing_settings/index.vue'),
  907. meta: {
  908. requireAuth: true,
  909. },
  910. },
  911. ]
  912. },
  913. {
  914. path: '/platinum_team_settings',
  915. name: 'platinum_team_settings',
  916. component: Main,
  917. meta: {
  918. requireAuth: true,
  919. },
  920. redirect: { name: 'platinum_team_settings_tab' },
  921. children: [
  922. {
  923. path: '/platinum_team_settings/platinum_team_settings_tab',
  924. name: 'platinum_team_settings_tab',
  925. component: () => import('@/views/platinum/platinum_team_settings/index.vue'),
  926. meta: {
  927. requireAuth: true,
  928. },
  929. },
  930. ]
  931. },
  932. {
  933. path: '/platinum_account_manager',
  934. name: 'platinum_account_manager',
  935. component: Main,
  936. meta: {
  937. requireAuth: true,
  938. },
  939. redirect: { name: 'platinum_account_manager_tab' },
  940. children: [
  941. {
  942. path: '/platinum_account_manager/platinum_account_manager_tab',
  943. name: 'platinum_account_manager_tab',
  944. component: () => import('@/views/platinum/platinum_account_manager/index.vue'),
  945. meta: {
  946. requireAuth: true,
  947. },
  948. },
  949. ]
  950. },
  951. {
  952. path: '/platinum_salesman_performance_report',
  953. name: 'platinum_salesman_performance_report',
  954. component: Main,
  955. meta: {
  956. requireAuth: true,
  957. },
  958. redirect: { name: 'platinum_salesman_performance_report_tab' },
  959. children: [
  960. {
  961. path: '/platinum_salesman_performance_report/platinum_salesman_performance_report_tab',
  962. name: 'platinum_salesman_performance_report_tab',
  963. component: () => import('@/views/report/platinum_salesman_performance_report/platinum_salesman_performance_report_tab/index.vue'),
  964. meta: {
  965. requireAuth: true,
  966. },
  967. },
  968. ]
  969. },
  970. {
  971. path: '/platinum_customer_service_report',
  972. name: 'platinum_customer_service_report',
  973. component: Main,
  974. meta: {
  975. requireAuth: true,
  976. },
  977. redirect: { name: 'platinum_customer_service_report_reach_rate_report_tab' },
  978. children: [
  979. {
  980. path: '/platinum_customer_service_report/platinum_customer_service_report_reach_rate_report_tab',
  981. name: 'platinum_customer_service_report_reach_rate_report_tab',
  982. component: () => import('@/views/report/platinum_customer_service_report/platinum_customer_service_report_reach_rate_report_tab/index.vue'),
  983. meta: {
  984. requireAuth: true,
  985. },
  986. },
  987. {
  988. path: '/platinum_customer_service_report/platinum_customer_service_report_team_annualized_performance_ranking_report_tab',
  989. name: 'platinum_customer_service_report_team_annualized_performance_ranking_report_tab',
  990. component: () => import('@/views/report/platinum_customer_service_report/platinum_customer_service_report_team_annualized_performance_ranking_report_tab/index.vue'),
  991. meta: {
  992. requireAuth: true,
  993. },
  994. },
  995. {
  996. path: '/platinum_customer_service_report/platinum_customer_service_report_personal_annualized_performance_ranking_report_tab',
  997. name: 'platinum_customer_service_report_personal_annualized_performance_ranking_report_tab',
  998. component: () => import('@/views/report/platinum_customer_service_report/platinum_customer_service_report_personal_annualized_performance_ranking_report_tab/index.vue'),
  999. meta: {
  1000. requireAuth: true,
  1001. },
  1002. },
  1003. {
  1004. path: '/platinum_customer_service_report/platinum_customer_service_report_team_manager_annual_performance_ranking_report_tab',
  1005. name: 'platinum_customer_service_report_team_manager_annual_performance_ranking_report_tab',
  1006. component: () => import('@/views/report/platinum_customer_service_report/platinum_customer_service_report_team_manager_annual_performance_ranking_report_tab/index.vue'),
  1007. meta: {
  1008. requireAuth: true,
  1009. },
  1010. },
  1011. ]
  1012. },
  1013. {
  1014. path: '/platinum_asset_management_sale_report',
  1015. name: 'platinum_asset_management_sale_report',
  1016. component: Main,
  1017. meta: {
  1018. requireAuth: true,
  1019. },
  1020. redirect: { name: 'platinum_asset_management_sale_report_company_day_tab' },
  1021. children: [
  1022. {
  1023. path: '/platinum_asset_management_sale_report/platinum_asset_management_sale_report_company_day_tab',
  1024. name: 'platinum_asset_management_sale_report_company_day_tab',
  1025. component: () => import('@/views/report/platinum_asset_management_sale_report/platinum_asset_management_sale_report_company_day_tab/index.vue'),
  1026. meta: {
  1027. requireAuth: true,
  1028. },
  1029. },
  1030. {
  1031. path: '/platinum_asset_management_sale_report/platinum_asset_management_sale_report_company_week_tab',
  1032. name: 'platinum_asset_management_sale_report_company_week_tab',
  1033. component: () => import('@/views/report/platinum_asset_management_sale_report/platinum_asset_management_sale_report_company_week_tab/index.vue'),
  1034. meta: {
  1035. requireAuth: true,
  1036. },
  1037. },
  1038. {
  1039. path: '/platinum_asset_management_sale_report/platinum_asset_management_sale_report_company_month_tab',
  1040. name: 'platinum_asset_management_sale_report_company_month_tab',
  1041. component: () => import('@/views/report/platinum_asset_management_sale_report/platinum_asset_management_sale_report_company_month_tab/index.vue'),
  1042. meta: {
  1043. requireAuth: true,
  1044. },
  1045. },
  1046. {
  1047. path: '/platinum_asset_management_sale_report/platinum_precious_metal_sales_report_departmental_week_tab',
  1048. name: 'platinum_precious_metal_sales_report_departmental_week_tab',
  1049. component: () => import('@/views/report/platinum_asset_management_sale_report/platinum_precious_metal_sales_report_departmental_week_tab/index.vue'),
  1050. meta: {
  1051. requireAuth: true,
  1052. },
  1053. },
  1054. {
  1055. path: '/platinum_asset_management_sale_report/platinum_precious_metal_sales_report_departmental_month_tab',
  1056. name: 'platinum_precious_metal_sales_report_departmental_month_tab',
  1057. component: () => import('@/views/report/platinum_asset_management_sale_report/platinum_precious_metal_sales_report_departmental_month_tab/index.vue'),
  1058. meta: {
  1059. requireAuth: true,
  1060. },
  1061. },
  1062. {
  1063. path: '/platinum_asset_management_sale_report/platinum_precious_metal_sales_report_product_month_tab',
  1064. name: 'platinum_precious_metal_sales_report_product_month_tab',
  1065. component: () => import('@/views/report/platinum_asset_management_sale_report/platinum_precious_metal_sales_report_product_month_tab/index.vue'),
  1066. meta: {
  1067. requireAuth: true,
  1068. },
  1069. },
  1070. ]
  1071. },
  1072. {
  1073. path: '/platinum_precious_metal_sales_report',
  1074. name: 'platinum_precious_metal_sales_report',
  1075. component: Main,
  1076. meta: {
  1077. requireAuth: true,
  1078. },
  1079. redirect: { name: 'platinum_precious_metal_sales_report_company_tab' },
  1080. children: [
  1081. {
  1082. path: '/platinum_precious_metal_sales_report/platinum_precious_metal_sales_report_company_tab',
  1083. name: 'platinum_precious_metal_sales_report_company_tab',
  1084. component: () => import('@/views/report/platinum_precious_metal_sales_report/platinum_precious_metal_sales_report_company_tab/index.vue'),
  1085. meta: {
  1086. requireAuth: true,
  1087. },
  1088. },
  1089. {
  1090. path: '/platinum_precious_metal_sales_report/platinum_precious_metal_sales_report_departmental_tab',
  1091. name: 'platinum_precious_metal_sales_report_departmental_tab',
  1092. component: () => import('@/views/report/platinum_precious_metal_sales_report/platinum_precious_metal_sales_report_departmental_tab/index.vue'),
  1093. meta: {
  1094. requireAuth: true,
  1095. },
  1096. },
  1097. ]
  1098. },
  1099. {
  1100. path: '/platinum_financial_payment',
  1101. name: 'platinum_financial_payment',
  1102. component: Main,
  1103. meta: {
  1104. requireAuth: true,
  1105. },
  1106. redirect: { name: 'platinum_financial_payment_waiting_payment_tab' },
  1107. children: [
  1108. {
  1109. path: '/platinum_financial_payment/platinum_financial_payment_waiting_payment_tab',
  1110. name: 'platinum_financial_payment_waiting_payment_tab',
  1111. component: () => import('@/views/platinum/platinum_financial_payment/platinum_financial_payment_waiting_payment_tab/index.vue'),
  1112. meta: {
  1113. requireAuth: true,
  1114. },
  1115. },
  1116. {
  1117. path: '/platinum_financial_payment/platinum_financial_payment_in_waiting_payment_tab',
  1118. name: 'platinum_financial_payment_in_waiting_payment_tab',
  1119. component: () => import('@/views/platinum/platinum_financial_payment/platinum_financial_payment_in_waiting_payment_tab/index.vue'),
  1120. meta: {
  1121. requireAuth: true,
  1122. },
  1123. },
  1124. {
  1125. path: '/platinum_financial_payment/platinum_financial_payment_waiting_payment_cash_tab',
  1126. name: 'platinum_financial_payment_waiting_payment_cash_tab',
  1127. component: () => import('@/views/platinum/platinum_financial_payment/platinum_financial_payment_waiting_payment_cash_tab/index.vue'),
  1128. meta: {
  1129. requireAuth: true,
  1130. },
  1131. },
  1132. {
  1133. path: '/platinum_financial_payment/platinum_financial_payment_payment_tab',
  1134. name: 'platinum_financial_payment_payment_tab',
  1135. component: () => import('@/views/platinum/platinum_financial_payment/platinum_financial_payment_payment_tab/index.vue'),
  1136. meta: {
  1137. requireAuth: true,
  1138. },
  1139. },
  1140. {
  1141. path: '/platinum_financial_payment/platinum_financial_payment_all_tab',
  1142. name: 'platinum_financial_payment_all_tab',
  1143. component: () => import('@/views/platinum/platinum_financial_payment/platinum_financial_payment_all_tab/index.vue'),
  1144. meta: {
  1145. requireAuth: true,
  1146. },
  1147. },
  1148. ]
  1149. },
  1150. {
  1151. path: '/platinum_precious_metal_signing',
  1152. name: 'platinum_precious_metal_signing',
  1153. component: Main,
  1154. meta: {
  1155. requireAuth: true,
  1156. },
  1157. redirect: { name: 'platinum_precious_metal_signing_unsubmitted' },
  1158. children: [
  1159. {
  1160. path: '/platinum_precious_metal_signing/platinum_precious_metal_signing_unsubmitted',
  1161. name: 'platinum_precious_metal_signing_unsubmitted',
  1162. component: () => import('@/views/platinum/platinum_precious_metal_signing/platinum_precious_metal_signing_unsubmitted/index.vue'),
  1163. meta: {
  1164. requireAuth: true,
  1165. },
  1166. },
  1167. {
  1168. path: '/platinum_precious_metal_signing/platinum_precious_metal_signing_pending_review',
  1169. name: 'platinum_precious_metal_signing_pending_review',
  1170. component: () => import('@/views/platinum/platinum_precious_metal_signing/platinum_precious_metal_signing_pending_review/index.vue'),
  1171. meta: {
  1172. requireAuth: true,
  1173. },
  1174. },
  1175. {
  1176. path: '/platinum_precious_metal_signing/platinum_precious_metal_signing_repurchase_pending_review',
  1177. name: 'platinum_precious_metal_signing_repurchase_pending_review',
  1178. component: () => import('@/views/platinum/platinum_precious_metal_signing/platinum_precious_metal_signing_repurchase_pending_review/index.vue'),
  1179. meta: {
  1180. requireAuth: true,
  1181. },
  1182. },
  1183. {
  1184. path: '/platinum_precious_metal_signing/platinum_precious_metal_signing_normal',
  1185. name: 'platinum_precious_metal_signing_normal',
  1186. component: () => import('@/views/platinum/platinum_precious_metal_signing/platinum_precious_metal_signing_normal/index.vue'),
  1187. meta: {
  1188. requireAuth: true,
  1189. },
  1190. },
  1191. {
  1192. path: '/platinum_precious_metal_signing/platinum_precious_metal_signing_success',
  1193. name: 'platinum_precious_metal_signing_success',
  1194. component: () => import('@/views/platinum/platinum_precious_metal_signing/platinum_precious_metal_signing_success/index.vue'),
  1195. meta: {
  1196. requireAuth: true,
  1197. },
  1198. },
  1199. {
  1200. path: '/platinum_precious_metal_signing/platinum_precious_metal_signing_refunded',
  1201. name: 'platinum_precious_metal_signing_refunded',
  1202. component: () => import('@/views/platinum/platinum_precious_metal_signing/platinum_precious_metal_signing_refunded/index.vue'),
  1203. meta: {
  1204. requireAuth: true,
  1205. },
  1206. },
  1207. {
  1208. path: '/platinum_precious_metal_signing/platinum_precious_metal_signing_all',
  1209. name: 'platinum_precious_metal_signing_all',
  1210. component: () => import('@/views/platinum/platinum_precious_metal_signing/platinum_precious_metal_signing_all/index.vue'),
  1211. meta: {
  1212. requireAuth: true,
  1213. },
  1214. },
  1215. ]
  1216. },
  1217. {
  1218. path: '/platinum_asset_management_signing',
  1219. name: 'platinum_asset_management_signing',
  1220. component: Main,
  1221. meta: {
  1222. requireAuth: true,
  1223. },
  1224. redirect: { name: 'platinum_asset_management_signing_unsubmitted' },
  1225. children: [
  1226. {
  1227. path: '/platinum_asset_management_signing/platinum_asset_management_signing_unsubmitted',
  1228. name: 'platinum_asset_management_signing_unsubmitted',
  1229. component: () => import('@/views/platinum/platinum_asset_management_signing/platinum_asset_management_signing_unsubmitted/index.vue'),
  1230. meta: {
  1231. requireAuth: true,
  1232. },
  1233. },
  1234. {
  1235. path: '/platinum_asset_management_signing/platinum_asset_management_signing_pending_review',
  1236. name: 'platinum_asset_management_signing_pending_review',
  1237. component: () => import('@/views/platinum/platinum_asset_management_signing/platinum_asset_management_signing_pending_review/index.vue'),
  1238. meta: {
  1239. requireAuth: true,
  1240. },
  1241. },
  1242. {
  1243. path: '/platinum_asset_management_signing/platinum_asset_management_signing_finish',
  1244. name: 'platinum_asset_management_signing_finish',
  1245. component: () => import('@/views/platinum/platinum_asset_management_signing/platinum_asset_management_signing_finish/index.vue'),
  1246. meta: {
  1247. requireAuth: true,
  1248. },
  1249. },
  1250. {
  1251. path: '/platinum_asset_management_signing/platinum_asset_management_signing_normal',
  1252. name: 'platinum_asset_management_signing_normal',
  1253. component: () => import('@/views/platinum/platinum_asset_management_signing/platinum_asset_management_signing_normal/index.vue'),
  1254. meta: {
  1255. requireAuth: true,
  1256. },
  1257. },
  1258. ]
  1259. },
  1260. {
  1261. path: '/platinum_broker_management',
  1262. name: 'platinum_broker_management',
  1263. component: Main,
  1264. meta: {
  1265. requireAuth: true,
  1266. },
  1267. redirect: { name: 'platinum_broker_management_normal_tab' },
  1268. children: [
  1269. {
  1270. path: '/platinum_broker_management/platinum_broker_management_normal_tab',
  1271. name: 'platinum_broker_management_normal_tab',
  1272. component: () => import('@/views/platinum/platinum_broker_management/normal/index.vue'),
  1273. meta: {
  1274. requireAuth: true,
  1275. },
  1276. },
  1277. {
  1278. path: '/platinum_broker_management/platinum_broker_management_waiting_tab',
  1279. name: 'platinum_broker_management_waiting_tab',
  1280. component: () => import('@/views/platinum/platinum_broker_management/waiting/index.vue'),
  1281. meta: {
  1282. requireAuth: true,
  1283. },
  1284. },
  1285. {
  1286. path: '/platinum_broker_management/platinum_broker_management_refuse_tab',
  1287. name: 'platinum_broker_management_refuse_tab',
  1288. component: () => import('@/views/platinum/platinum_broker_management/refuse/index.vue'),
  1289. meta: {
  1290. requireAuth: true,
  1291. },
  1292. },
  1293. ]
  1294. },
  1295. {
  1296. path: '/spot_trade',
  1297. name: EnumRouterName.spot_trade,
  1298. component: Main,
  1299. meta: {
  1300. requireAuth: true,
  1301. },
  1302. redirect: { name: EnumRouterName.warehouse_receipt_trade, },
  1303. children: [
  1304. {
  1305. path: '/spot_trade/warehouse_receipt_trade',
  1306. name: EnumRouterName.warehouse_receipt_trade,
  1307. component: () => import('@/views/market/spot_trade/warehouse_receipt_trade/index.vue'),
  1308. meta: {
  1309. requireAuth: true,
  1310. },
  1311. children: [
  1312. {
  1313. path: '/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_floating_price',
  1314. name: EnumRouterName.warehouse_receipt_trade_floating_price,
  1315. component: () => import('@/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_floating_price/index.vue'),
  1316. meta: {
  1317. requireAuth: true,
  1318. },
  1319. },
  1320. {
  1321. path: '/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_price',
  1322. name: EnumRouterName.warehouse_receipt_trade_price,
  1323. component: () => import('@/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_price/index.vue'),
  1324. meta: {
  1325. requireAuth: true,
  1326. },
  1327. },
  1328. {
  1329. path: '/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs',
  1330. name: 'warehouse_receipt_trade_blocs',
  1331. component: () => import('@/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/index.vue'),
  1332. meta: {
  1333. requireAuth: true,
  1334. },
  1335. },
  1336. ]
  1337. },
  1338. {
  1339. path: '/spot_trade/warehouse_pre_sale',
  1340. name: EnumRouterName.warehouse_pre_sale,
  1341. component: () => import('@/views/market/spot_trade/warehouse_pre_sale/index.vue'),
  1342. meta: {
  1343. requireAuth: true,
  1344. },
  1345. children: [
  1346. {
  1347. path: '/spot_trade/warehouse_pre_sale/warehouse_pre_sale_floating_price',
  1348. name: EnumRouterName.warehouse_pre_sale_floating_price,
  1349. component: () => import('@/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_floating_price/index.vue'),
  1350. meta: {
  1351. requireAuth: true,
  1352. },
  1353. },
  1354. {
  1355. path: '/spot_trade/warehouse_pre_sale/warehouse_pre_sale_price',
  1356. name: EnumRouterName.warehouse_pre_sale_price,
  1357. component: () => import('@/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_price/index.vue'),
  1358. meta: {
  1359. requireAuth: true,
  1360. },
  1361. },
  1362. ]
  1363. },
  1364. {
  1365. path: '/spot_trade/spot_trade_order_transaction',
  1366. name: EnumRouterName.spot_trade_order_transaction,
  1367. component: () => import('@/views/market/spot_trade/spot_trade_order_transaction/index.vue'),
  1368. meta: {
  1369. requireAuth: true,
  1370. },
  1371. children: [
  1372. {
  1373. path: '/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_basis_difference',
  1374. name: EnumRouterName.spot_trade_order_transaction_basis_difference,
  1375. component: () => import('@/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_basis_difference/index.vue'),
  1376. meta: {
  1377. requireAuth: true,
  1378. },
  1379. },
  1380. {
  1381. path: '/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_listing_transfer',
  1382. name: EnumRouterName.spot_trade_order_transaction_listing_transfer,
  1383. component: () => import('@/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_listing_transfer/index.vue'),
  1384. meta: {
  1385. requireAuth: true,
  1386. },
  1387. },
  1388. ]
  1389. },
  1390. {
  1391. path: '/spot_trade/spot_trade_reference_market',
  1392. name: EnumRouterName.spot_trade_reference_market,
  1393. component: () => import('@/views/market/spot_trade/spot_trade_reference_market/index.vue'),
  1394. meta: {
  1395. requireAuth: true,
  1396. },
  1397. }
  1398. ]
  1399. },
  1400. {
  1401. path: '/search_document_records',
  1402. name: EnumRouterName.search_document_records,
  1403. component: Main,
  1404. meta: {
  1405. requireAuth: true,
  1406. },
  1407. // redirect: { name: EnumRouterName.search_document_records, },
  1408. children: [
  1409. {
  1410. path: '/search_document_records/search_commodity_contract',
  1411. name: EnumRouterName.search_commodity_contract,
  1412. component: () => import('@/views/search/search_document_records/search_commodity_contract/index.vue'),
  1413. meta: {
  1414. requireAuth: true,
  1415. },
  1416. children: [
  1417. {
  1418. path: '/search_document_records/search_commodity_contract/search_document_records_contract_summary',
  1419. name: EnumRouterName.search_document_records_contract_summary,
  1420. component: () => import('@/views/search/search_document_records/search_commodity_contract/search_document_records_contract_summary/index.vue'),
  1421. meta: {
  1422. requireAuth: true,
  1423. },
  1424. },
  1425. {
  1426. path: '/search_document_records/search_commodity_contract/search_document_records_commission_record',
  1427. name: EnumRouterName.search_document_records_commission_record,
  1428. component: () => import('@/views/search/search_document_records/search_commodity_contract/search_document_records_commission_record/index.vue'),
  1429. meta: {
  1430. requireAuth: true,
  1431. },
  1432. },
  1433. {
  1434. path: '/search_document_records/search_commodity_contract/search_document_records_delivery_record',
  1435. name: EnumRouterName.search_document_records_delivery_record,
  1436. component: () => import('@/views/search/search_document_records/search_commodity_contract/search_document_records_delivery_record/index.vue'),
  1437. meta: {
  1438. requireAuth: true,
  1439. },
  1440. },
  1441. {
  1442. path: '/search_document_records/search_document_records/search_document_records_transaction_record',
  1443. name: EnumRouterName.search_document_records_transaction_record,
  1444. component: () => import('@/views/search/search_document_records/search_commodity_contract/search_document_records_transaction_record/index.vue'),
  1445. meta: {
  1446. requireAuth: true,
  1447. },
  1448. },
  1449. ]
  1450. },
  1451. {
  1452. path: '/search_document_records/search_pre_sale_warehouse_receipt',
  1453. name: EnumRouterName.search_pre_sale_warehouse_receipt,
  1454. component: () => import('@/views/search/search_document_records/search_pre_sale_warehouse_receipt/index.vue'),
  1455. meta: {
  1456. requireAuth: true,
  1457. },
  1458. children: [
  1459. {
  1460. path: '/search_document_records/search_pre_sale_warehouse_receipt/search_pre_sale_warehouse_receipt_commission_record',
  1461. name: EnumRouterName.search_pre_sale_warehouse_receipt_commission_record,
  1462. component: () => import('@/views/search/search_document_records/search_pre_sale_warehouse_receipt/search_pre_sale_warehouse_receipt_commission_record/index.vue'),
  1463. meta: {
  1464. requireAuth: true,
  1465. },
  1466. },
  1467. {
  1468. path: '/search_document_records/search_pre_sale_warehouse_receipt/search_pre_sale_warehouse_receipt_order_summary',
  1469. name: EnumRouterName.search_pre_sale_warehouse_receipt_order_summary,
  1470. component: () => import('@/views/search/search_document_records/search_pre_sale_warehouse_receipt/search_pre_sale_warehouse_receipt_order_summary/index.vue'),
  1471. meta: {
  1472. requireAuth: true,
  1473. },
  1474. },
  1475. {
  1476. path: '/search_document_records/search_pre_sale_warehouse_receipt/search_pre_sale_warehouse_receipt_protocol_specified_record',
  1477. name: EnumRouterName.search_pre_sale_warehouse_receipt_protocol_specified_record,
  1478. component: () => import('@/views/search/search_document_records/search_pre_sale_warehouse_receipt/search_pre_sale_warehouse_receipt_protocol_specified_record/index.vue'),
  1479. meta: {
  1480. requireAuth: true,
  1481. },
  1482. },
  1483. {
  1484. path: '/search_document_records/search_pre_sale_warehouse_receipt/search_pre_sale_warehouse_receipt_transaction_record',
  1485. name: EnumRouterName.search_pre_sale_warehouse_receipt_transaction_record,
  1486. component: () => import('@/views/search/search_document_records/search_pre_sale_warehouse_receipt/search_pre_sale_warehouse_receipt_transaction_record/index.vue'),
  1487. meta: {
  1488. requireAuth: true,
  1489. },
  1490. },
  1491. ]
  1492. },
  1493. {
  1494. path: '/search_document_records/search_spot_warrant',
  1495. name: EnumRouterName.search_spot_warrant,
  1496. component: () => import('@/views/search/search_document_records/search_spot_warrant/index.vue'),
  1497. meta: {
  1498. requireAuth: true,
  1499. },
  1500. children: [
  1501. {
  1502. path: '/search_document_records/search_spot_warrant/search_spot_warrant_transaction_record',
  1503. name: EnumRouterName.search_spot_warrant_transaction_record,
  1504. component: () => import('@/views/search/search_document_records/search_spot_warrant/search_spot_warrant_transaction_record/index.vue'),
  1505. meta: {
  1506. requireAuth: true,
  1507. },
  1508. },
  1509. {
  1510. path: '/search_document_records/search_spot_warrant/search_spot_warrant_protocol_specified_record',
  1511. name: EnumRouterName.search_spot_warrant_protocol_specified_record,
  1512. component: () => import('@/views/search/search_document_records/search_spot_warrant/search_spot_warrant_protocol_specified_record/index.vue'),
  1513. meta: {
  1514. requireAuth: true,
  1515. },
  1516. },
  1517. {
  1518. path: '/search_document_records/search_spot_warrant/search_spot_warrant_listing_record',
  1519. name: EnumRouterName.search_spot_warrant_listing_record,
  1520. component: () => import('@/views/search/search_document_records/search_spot_warrant/search_spot_warrant_listing_record/index.vue'),
  1521. meta: {
  1522. requireAuth: true,
  1523. },
  1524. },
  1525. {
  1526. path: '/search_document_records/search_spot_warrant/search_spot_warrant_warehouse_receipt_details',
  1527. name: EnumRouterName.search_spot_warrant_warehouse_receipt_details,
  1528. component: () => import('@/views/search/search_document_records/search_spot_warrant/search_spot_warrant_warehouse_receipt_details/index.vue'),
  1529. meta: {
  1530. requireAuth: true,
  1531. },
  1532. },
  1533. ]
  1534. },
  1535. ]
  1536. },
  1537. {
  1538. path: '/search_capital_flow',
  1539. name: EnumRouterName.search_capital_flow,
  1540. component: Main,
  1541. meta: {
  1542. requireAuth: true,
  1543. },
  1544. children: [
  1545. {
  1546. path: '/search_capital_flow/search_capital_flow_tab',
  1547. name: EnumRouterName.search_capital_flow_tab,
  1548. component: () => import('@/views/search/search_capital_flow/search_capital_flow_tab/index.vue'),
  1549. meta: {
  1550. requireAuth: true,
  1551. },
  1552. }
  1553. ]
  1554. },
  1555. {
  1556. path: '/search_financing_inquiry',
  1557. name: EnumRouterName.search_financing_inquiry,
  1558. component: Main,
  1559. meta: {
  1560. requireAuth: true,
  1561. },
  1562. children: [
  1563. {
  1564. path: '/search_financing_inquiry/search_financing_inquiry_apply_order',
  1565. name: EnumRouterName.search_financing_inquiry_apply_order,
  1566. component: () => import('@/views/search/search_financing_inquiry/search_financing_inquiry_apply_order/index.vue'),
  1567. meta: {
  1568. requireAuth: true,
  1569. },
  1570. },
  1571. {
  1572. path: '/search_financing_inquiry/search_financing_inquiry_contract',
  1573. name: EnumRouterName.search_financing_inquiry_contract,
  1574. component: () => import('@/views/search/search_financing_inquiry/search_financing_inquiry_contract/index.vue'),
  1575. meta: {
  1576. requireAuth: true,
  1577. },
  1578. }
  1579. ]
  1580. },
  1581. {
  1582. path: '/search_performance_query',
  1583. name: EnumRouterName.search_performance_query,
  1584. component: Main,
  1585. meta: {
  1586. requireAuth: true,
  1587. },
  1588. children: [
  1589. {
  1590. path: '/search_performance_query/search_performance_query_buy_performance',
  1591. name: EnumRouterName.search_performance_query_buy_performance,
  1592. component: () => import('@/views/search/search_performance_query/search_performance_query_buy_performance/index.vue'),
  1593. meta: {
  1594. requireAuth: true,
  1595. },
  1596. },
  1597. {
  1598. path: '/search_performance_query/search_performance_query_sell_performance',
  1599. name: EnumRouterName.search_performance_query_sell_performance,
  1600. component: () => import('@/views/search/search_performance_query/search_performance_query_sell_performance/index.vue'),
  1601. meta: {
  1602. requireAuth: true,
  1603. },
  1604. }
  1605. ]
  1606. },
  1607. {
  1608. path: '/search_pickup_query',
  1609. name: EnumRouterName.search_pickup_query,
  1610. component: Main,
  1611. meta: {
  1612. requireAuth: true,
  1613. },
  1614. children: [
  1615. {
  1616. path: '/search_pickup_query/search_pickup_query_tab',
  1617. name: EnumRouterName.search_pickup_query_tab,
  1618. component: () => import('@/views/search/search_pickup_query/search_pickup_query_tab/index.vue'),
  1619. meta: {
  1620. requireAuth: true,
  1621. },
  1622. }
  1623. ]
  1624. },
  1625. {
  1626. path: '/entry_of_spot_information',
  1627. name: EnumRouterName.entry_of_spot_information,
  1628. component: () => import('@/views/hedging/entry_of_spot_information/index.vue'),
  1629. meta: {
  1630. requireAuth: true,
  1631. },
  1632. },
  1633. {
  1634. path: '/spot_price_management',
  1635. name: EnumRouterName.spot_price_management,
  1636. component: Main,
  1637. meta: {
  1638. requireAuth: true,
  1639. },
  1640. children: [
  1641. {
  1642. path: '/spot_price_management/spot_price_management_disable',
  1643. name: EnumRouterName.spot_price_management_disable,
  1644. component: () => import('@/views/hedging/spot_price_management/spot_price_management_disable/index.vue'),
  1645. meta: {
  1646. requireAuth: true,
  1647. },
  1648. },
  1649. {
  1650. path: '/spot_price_management/spot_price_management_normal',
  1651. name: EnumRouterName.spot_price_management_normal,
  1652. component: () => import('@/views/hedging/spot_price_management/spot_price_management_normal/index.vue'),
  1653. meta: {
  1654. requireAuth: true,
  1655. },
  1656. },
  1657. ]
  1658. },
  1659. ],
  1660. },
  1661. {
  1662. path: '/test',
  1663. name: 'test',
  1664. component: () => import('@/views/test/index.vue'),
  1665. },
  1666. {
  1667. // VueRouter 匹配规则是从上往下 建议把*放最后
  1668. path: '/:pathMatch(.*)*',
  1669. name: '404',
  1670. component: () => import('@/views/error-page/404.vue'),
  1671. },
  1672. ];
  1673. const router = createRouter({
  1674. history: createWebHashHistory(),
  1675. routes,
  1676. });
  1677. // 路由拦截
  1678. router.beforeEach((to, from, next) => {
  1679. // 前往登录页时 直接走登出流程
  1680. if (to.fullPath === '/login') {
  1681. eventBus.$emit('logout');
  1682. next();
  1683. } else {
  1684. // 前往其他页 判断是否是登录状态
  1685. if (isLogin()) {
  1686. return next();
  1687. } else {
  1688. if (!getLoadIsComplete()) { // 没有加载对应的资料,表示第一次启动项目
  1689. console.log('to', to);
  1690. const { ACCOUNT, PASSWORD } = to.query
  1691. const name = to.name ? to.name : 'home'
  1692. if (ACCOUNT && PASSWORD) {
  1693. setLoadComplete(false)
  1694. globalDataRefresh().then(() => {
  1695. const { ACCOUNT, PASSWORD } = to.query
  1696. login(ACCOUNT as string, PASSWORD as string, [], true).then(res => {
  1697. setLoadComplete(true)
  1698. localStorageUtil.setItem('loginAccount', ACCOUNT); // 缓存登录账号
  1699. eventBus.$emit('loginSuccess', true);
  1700. next({ name })
  1701. }).catch(err => {
  1702. // 异常需要跳转到错误页面,让用户手动重试
  1703. console.log('err', err);
  1704. })
  1705. })
  1706. } else { // 跳转到登录页面
  1707. next()
  1708. }
  1709. } else { //
  1710. next()
  1711. }
  1712. }
  1713. }
  1714. });
  1715. export default router;