system.ts 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643
  1. import { defineFakeRoute } from "vite-plugin-fake-server/client";
  2. import { faker } from "@faker-js/faker/locale/zh_CN";
  3. export default defineFakeRoute([
  4. // 用户管理
  5. {
  6. url: "/user",
  7. method: "post",
  8. response: ({ body }) => {
  9. let list = [
  10. {
  11. username: "admin",
  12. nickname: "admin",
  13. avatar: "https://avatars.githubusercontent.com/u/44761321",
  14. phone: "15888886789",
  15. email: faker.internet.email(),
  16. sex: 0,
  17. id: 1,
  18. status: 1,
  19. dept: {
  20. // 部门id
  21. id: 103,
  22. // 部门名称
  23. name: "研发部门"
  24. },
  25. remark: "管理员",
  26. createTime: 1605456000000
  27. },
  28. {
  29. username: "common",
  30. nickname: "common",
  31. avatar: "https://avatars.githubusercontent.com/u/52823142",
  32. phone: "18288882345",
  33. email: faker.internet.email(),
  34. sex: 1,
  35. id: 2,
  36. status: 1,
  37. dept: {
  38. id: 105,
  39. name: "测试部门"
  40. },
  41. remark: "普通用户",
  42. createTime: 1605456000000
  43. }
  44. ];
  45. list = list.filter(item => item.username.includes(body?.username));
  46. list = list.filter(item =>
  47. String(item.status).includes(String(body?.status))
  48. );
  49. if (body.phone) list = list.filter(item => item.phone === body.phone);
  50. if (body.deptId) list = list.filter(item => item.dept.id === body.deptId);
  51. return {
  52. success: true,
  53. data: {
  54. list,
  55. total: list.length, // 总条目数
  56. pageSize: 10, // 每页显示条目个数
  57. currentPage: 1 // 当前页数
  58. }
  59. };
  60. }
  61. },
  62. // 用户管理-获取所有角色列表
  63. {
  64. url: "/list-all-role",
  65. method: "get",
  66. response: () => {
  67. return {
  68. success: true,
  69. data: [
  70. { id: 1, name: "超级管理员" },
  71. { id: 2, name: "普通角色" }
  72. ]
  73. };
  74. }
  75. },
  76. // 用户管理-根据 userId 获取对应角色 id 列表(userId:用户id)
  77. {
  78. url: "/list-role-ids",
  79. method: "post",
  80. response: ({ body }) => {
  81. if (body.userId) {
  82. if (body.userId == 1) {
  83. return {
  84. success: true,
  85. data: [1]
  86. };
  87. } else if (body.userId == 2) {
  88. return {
  89. success: true,
  90. data: [2]
  91. };
  92. }
  93. } else {
  94. return {
  95. success: false,
  96. data: []
  97. };
  98. }
  99. }
  100. },
  101. // 角色管理
  102. {
  103. url: "/role",
  104. method: "post",
  105. response: ({ body }) => {
  106. let list = [
  107. {
  108. createTime: 1605456000000, // 时间戳(毫秒ms)
  109. updateTime: 1684512000000,
  110. id: 1,
  111. name: "超级管理员",
  112. code: "admin",
  113. status: 1, // 状态 1 启用 0 停用
  114. remark: "超级管理员拥有最高权限"
  115. },
  116. {
  117. createTime: 1605456000000,
  118. updateTime: 1684512000000,
  119. id: 2,
  120. name: "普通角色",
  121. code: "common",
  122. status: 1,
  123. remark: "普通角色拥有部分权限"
  124. }
  125. ];
  126. list = list.filter(item => item.name.includes(body?.name));
  127. list = list.filter(item =>
  128. String(item.status).includes(String(body?.status))
  129. );
  130. if (body.code) list = list.filter(item => item.code === body.code);
  131. return {
  132. success: true,
  133. data: {
  134. list,
  135. total: list.length, // 总条目数
  136. pageSize: 10, // 每页显示条目个数
  137. currentPage: 1 // 当前页数
  138. }
  139. };
  140. }
  141. },
  142. // 角色管理-权限-菜单权限
  143. {
  144. url: "/role-menu",
  145. method: "post",
  146. response: () => {
  147. return {
  148. success: true,
  149. data: [
  150. // 外部页面
  151. {
  152. parentId: 0,
  153. id: 100,
  154. menuType: 0, // 菜单类型(0代表菜单、1代表iframe、2代表外链、3代表按钮)
  155. title: "menus.pureExternalPage"
  156. },
  157. {
  158. parentId: 100,
  159. id: 101,
  160. menuType: 0,
  161. title: "menus.pureExternalDoc"
  162. },
  163. {
  164. parentId: 101,
  165. id: 102,
  166. menuType: 2,
  167. title: "menus.pureExternalLink"
  168. },
  169. {
  170. parentId: 101,
  171. id: 103,
  172. menuType: 2,
  173. title: "menus.pureUtilsLink"
  174. },
  175. {
  176. parentId: 100,
  177. id: 104,
  178. menuType: 1,
  179. title: "menus.pureEmbeddedDoc"
  180. },
  181. {
  182. parentId: 104,
  183. id: 105,
  184. menuType: 1,
  185. title: "menus.pureEpDoc"
  186. },
  187. {
  188. parentId: 104,
  189. id: 106,
  190. menuType: 1,
  191. title: "menus.pureTailwindcssDoc"
  192. },
  193. {
  194. parentId: 104,
  195. id: 107,
  196. menuType: 1,
  197. title: "menus.pureVueDoc"
  198. },
  199. {
  200. parentId: 104,
  201. id: 108,
  202. menuType: 1,
  203. title: "menus.pureViteDoc"
  204. },
  205. {
  206. parentId: 104,
  207. id: 109,
  208. menuType: 1,
  209. title: "menus.purePiniaDoc"
  210. },
  211. {
  212. parentId: 104,
  213. id: 110,
  214. menuType: 1,
  215. title: "menus.pureRouterDoc"
  216. },
  217. // 权限管理
  218. {
  219. parentId: 0,
  220. id: 200,
  221. menuType: 0,
  222. title: "menus.purePermission"
  223. },
  224. {
  225. parentId: 200,
  226. id: 201,
  227. menuType: 0,
  228. title: "menus.purePermissionPage"
  229. },
  230. {
  231. parentId: 200,
  232. id: 202,
  233. menuType: 0,
  234. title: "menus.purePermissionButton"
  235. },
  236. {
  237. parentId: 202,
  238. id: 203,
  239. menuType: 3,
  240. title: "添加"
  241. },
  242. {
  243. parentId: 202,
  244. id: 204,
  245. menuType: 3,
  246. title: "修改"
  247. },
  248. {
  249. parentId: 202,
  250. id: 205,
  251. menuType: 3,
  252. title: "删除"
  253. },
  254. // 系统管理
  255. {
  256. parentId: 0,
  257. id: 300,
  258. menuType: 0,
  259. title: "menus.pureSysManagement"
  260. },
  261. {
  262. parentId: 300,
  263. id: 301,
  264. menuType: 0,
  265. title: "menus.pureUser"
  266. },
  267. {
  268. parentId: 300,
  269. id: 302,
  270. menuType: 0,
  271. title: "menus.pureRole"
  272. },
  273. {
  274. parentId: 300,
  275. id: 303,
  276. menuType: 0,
  277. title: "menus.pureSystemMenu"
  278. },
  279. {
  280. parentId: 300,
  281. id: 304,
  282. menuType: 0,
  283. title: "menus.pureDept"
  284. },
  285. // 系统监控
  286. {
  287. parentId: 0,
  288. id: 400,
  289. menuType: 0,
  290. title: "menus.pureSysMonitor"
  291. },
  292. {
  293. parentId: 400,
  294. id: 401,
  295. menuType: 0,
  296. title: "menus.pureOnlineUser"
  297. },
  298. {
  299. parentId: 400,
  300. id: 402,
  301. menuType: 0,
  302. title: "menus.pureLoginLog"
  303. },
  304. {
  305. parentId: 400,
  306. id: 403,
  307. menuType: 0,
  308. title: "menus.pureOperationLog"
  309. },
  310. {
  311. parentId: 400,
  312. id: 404,
  313. menuType: 0,
  314. title: "menus.pureSystemLog"
  315. },
  316. // 标签页操作
  317. {
  318. parentId: 0,
  319. id: 500,
  320. menuType: 0,
  321. title: "menus.pureTabs"
  322. },
  323. {
  324. parentId: 500,
  325. id: 501,
  326. menuType: 0,
  327. title: "menus.pureTabs"
  328. },
  329. {
  330. parentId: 500,
  331. id: 502,
  332. menuType: 0,
  333. title: "query传参模式"
  334. },
  335. {
  336. parentId: 500,
  337. id: 503,
  338. menuType: 0,
  339. title: "params传参模式"
  340. }
  341. ]
  342. };
  343. }
  344. },
  345. // 角色管理-权限-菜单权限-根据角色 id 查对应菜单
  346. {
  347. url: "/role-menu-ids",
  348. method: "post",
  349. response: ({ body }) => {
  350. if (body.id == 1) {
  351. return {
  352. success: true,
  353. data: [
  354. 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 200, 201,
  355. 202, 203, 204, 205, 300, 301, 302, 303, 304, 400, 401, 402, 403,
  356. 404, 500, 501, 502, 503
  357. ]
  358. };
  359. } else if (body.id == 2) {
  360. return {
  361. success: true,
  362. data: [
  363. 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 404, 500,
  364. 501, 502, 503
  365. ]
  366. };
  367. }
  368. }
  369. },
  370. // 菜单管理
  371. {
  372. url: "/menu",
  373. method: "post",
  374. response: () => {
  375. return {
  376. success: true,
  377. data: [
  378. // 外部页面
  379. {
  380. parentId: 0,
  381. id: 100,
  382. menuType: 0, // 菜单类型(0代表菜单、1代表iframe、2代表外链、3代表按钮)
  383. title: "menus.pureExternalPage",
  384. name: "PureIframe",
  385. path: "/iframe",
  386. component: "",
  387. rank: 7,
  388. redirect: "",
  389. icon: "ri:links-fill",
  390. extraIcon: "",
  391. enterTransition: "",
  392. leaveTransition: "",
  393. activePath: "",
  394. auths: "",
  395. frameSrc: "",
  396. frameLoading: true,
  397. keepAlive: false,
  398. hiddenTag: false,
  399. showLink: true,
  400. showParent: false
  401. },
  402. {
  403. parentId: 100,
  404. id: 101,
  405. menuType: 0,
  406. title: "menus.pureExternalDoc",
  407. name: "PureIframeExternal",
  408. path: "/iframe/external",
  409. component: "",
  410. rank: null,
  411. redirect: "",
  412. icon: "",
  413. extraIcon: "",
  414. enterTransition: "",
  415. leaveTransition: "",
  416. activePath: "",
  417. auths: "",
  418. frameSrc: "",
  419. frameLoading: true,
  420. keepAlive: false,
  421. hiddenTag: false,
  422. showLink: true,
  423. showParent: false
  424. },
  425. {
  426. parentId: 101,
  427. id: 102,
  428. menuType: 2,
  429. title: "menus.pureExternalLink",
  430. name: "https://yiming_chang.gitee.io/pure-admin-doc",
  431. path: "/external",
  432. component: "",
  433. rank: null,
  434. redirect: "",
  435. icon: "",
  436. extraIcon: "",
  437. enterTransition: "",
  438. leaveTransition: "",
  439. activePath: "",
  440. auths: "",
  441. frameSrc: "",
  442. frameLoading: true,
  443. keepAlive: false,
  444. hiddenTag: false,
  445. showLink: true,
  446. showParent: false
  447. },
  448. {
  449. parentId: 101,
  450. id: 103,
  451. menuType: 2,
  452. title: "menus.pureUtilsLink",
  453. name: "https://pure-admin-utils.netlify.app/",
  454. path: "/pureUtilsLink",
  455. component: "",
  456. rank: null,
  457. redirect: "",
  458. icon: "",
  459. extraIcon: "",
  460. enterTransition: "",
  461. leaveTransition: "",
  462. activePath: "",
  463. auths: "",
  464. frameSrc: "",
  465. frameLoading: true,
  466. keepAlive: false,
  467. hiddenTag: false,
  468. showLink: true,
  469. showParent: false
  470. },
  471. {
  472. parentId: 100,
  473. id: 104,
  474. menuType: 1,
  475. title: "menus.pureEmbeddedDoc",
  476. name: "PureIframeEmbedded",
  477. path: "/iframe/embedded",
  478. component: "",
  479. rank: null,
  480. redirect: "",
  481. icon: "",
  482. extraIcon: "",
  483. enterTransition: "",
  484. leaveTransition: "",
  485. activePath: "",
  486. auths: "",
  487. frameSrc: "",
  488. frameLoading: true,
  489. keepAlive: false,
  490. hiddenTag: false,
  491. showLink: true,
  492. showParent: false
  493. },
  494. {
  495. parentId: 104,
  496. id: 105,
  497. menuType: 1,
  498. title: "menus.pureEpDoc",
  499. name: "FrameEp",
  500. path: "/iframe/ep",
  501. component: "",
  502. rank: null,
  503. redirect: "",
  504. icon: "",
  505. extraIcon: "",
  506. enterTransition: "",
  507. leaveTransition: "",
  508. activePath: "",
  509. auths: "",
  510. frameSrc: "https://element-plus.org/zh-CN/",
  511. frameLoading: true,
  512. keepAlive: true,
  513. hiddenTag: false,
  514. showLink: true,
  515. showParent: false
  516. },
  517. {
  518. parentId: 104,
  519. id: 106,
  520. menuType: 1,
  521. title: "menus.pureTailwindcssDoc",
  522. name: "FrameTailwindcss",
  523. path: "/iframe/tailwindcss",
  524. component: "",
  525. rank: null,
  526. redirect: "",
  527. icon: "",
  528. extraIcon: "",
  529. enterTransition: "",
  530. leaveTransition: "",
  531. activePath: "",
  532. auths: "",
  533. frameSrc: "https://tailwindcss.com/docs/installation",
  534. frameLoading: true,
  535. keepAlive: true,
  536. hiddenTag: false,
  537. showLink: true,
  538. showParent: false
  539. },
  540. {
  541. parentId: 104,
  542. id: 107,
  543. menuType: 1,
  544. title: "menus.pureVueDoc",
  545. name: "FrameVue",
  546. path: "/iframe/vue3",
  547. component: "",
  548. rank: null,
  549. redirect: "",
  550. icon: "",
  551. extraIcon: "",
  552. enterTransition: "",
  553. leaveTransition: "",
  554. activePath: "",
  555. auths: "",
  556. frameSrc: "https://cn.vuejs.org/",
  557. frameLoading: true,
  558. keepAlive: true,
  559. hiddenTag: false,
  560. showLink: true,
  561. showParent: false
  562. },
  563. {
  564. parentId: 104,
  565. id: 108,
  566. menuType: 1,
  567. title: "menus.pureViteDoc",
  568. name: "FrameVite",
  569. path: "/iframe/vite",
  570. component: "",
  571. rank: null,
  572. redirect: "",
  573. icon: "",
  574. extraIcon: "",
  575. enterTransition: "",
  576. leaveTransition: "",
  577. activePath: "",
  578. auths: "",
  579. frameSrc: "https://cn.vitejs.dev/",
  580. frameLoading: true,
  581. keepAlive: true,
  582. hiddenTag: false,
  583. showLink: true,
  584. showParent: false
  585. },
  586. {
  587. parentId: 104,
  588. id: 109,
  589. menuType: 1,
  590. title: "menus.purePiniaDoc",
  591. name: "FramePinia",
  592. path: "/iframe/pinia",
  593. component: "",
  594. rank: null,
  595. redirect: "",
  596. icon: "",
  597. extraIcon: "",
  598. enterTransition: "",
  599. leaveTransition: "",
  600. activePath: "",
  601. auths: "",
  602. frameSrc: "https://pinia.vuejs.org/zh/index.html",
  603. frameLoading: true,
  604. keepAlive: true,
  605. hiddenTag: false,
  606. showLink: true,
  607. showParent: false
  608. },
  609. {
  610. parentId: 104,
  611. id: 110,
  612. menuType: 1,
  613. title: "menus.pureRouterDoc",
  614. name: "FrameRouter",
  615. path: "/iframe/vue-router",
  616. component: "",
  617. rank: null,
  618. redirect: "",
  619. icon: "",
  620. extraIcon: "",
  621. enterTransition: "",
  622. leaveTransition: "",
  623. activePath: "",
  624. auths: "",
  625. frameSrc: "https://router.vuejs.org/zh/",
  626. frameLoading: true,
  627. keepAlive: true,
  628. hiddenTag: false,
  629. showLink: true,
  630. showParent: false
  631. },
  632. // 权限管理
  633. {
  634. parentId: 0,
  635. id: 200,
  636. menuType: 0,
  637. title: "menus.purePermission",
  638. name: "PurePermission",
  639. path: "/permission",
  640. component: "",
  641. rank: 9,
  642. redirect: "",
  643. icon: "ep:lollipop",
  644. extraIcon: "",
  645. enterTransition: "",
  646. leaveTransition: "",
  647. activePath: "",
  648. auths: "",
  649. frameSrc: "",
  650. frameLoading: true,
  651. keepAlive: false,
  652. hiddenTag: false,
  653. showLink: true,
  654. showParent: false
  655. },
  656. {
  657. parentId: 200,
  658. id: 201,
  659. menuType: 0,
  660. title: "menus.purePermissionPage",
  661. name: "PermissionPage",
  662. path: "/permission/page/index",
  663. component: "",
  664. rank: null,
  665. redirect: "",
  666. icon: "",
  667. extraIcon: "",
  668. enterTransition: "",
  669. leaveTransition: "",
  670. activePath: "",
  671. auths: "",
  672. frameSrc: "",
  673. frameLoading: true,
  674. keepAlive: false,
  675. hiddenTag: false,
  676. showLink: true,
  677. showParent: false
  678. },
  679. {
  680. parentId: 200,
  681. id: 202,
  682. menuType: 0,
  683. title: "menus.purePermissionButton",
  684. name: "PermissionButton",
  685. path: "/permission/button/index",
  686. component: "",
  687. rank: null,
  688. redirect: "",
  689. icon: "",
  690. extraIcon: "",
  691. enterTransition: "",
  692. leaveTransition: "",
  693. activePath: "",
  694. auths: "",
  695. frameSrc: "",
  696. frameLoading: true,
  697. keepAlive: false,
  698. hiddenTag: false,
  699. showLink: true,
  700. showParent: false
  701. },
  702. {
  703. parentId: 202,
  704. id: 203,
  705. menuType: 3,
  706. title: "添加",
  707. name: "",
  708. path: "",
  709. component: "",
  710. rank: null,
  711. redirect: "",
  712. icon: "",
  713. extraIcon: "",
  714. enterTransition: "",
  715. leaveTransition: "",
  716. activePath: "",
  717. auths: "permission:btn:add",
  718. frameSrc: "",
  719. frameLoading: true,
  720. keepAlive: false,
  721. hiddenTag: false,
  722. showLink: true,
  723. showParent: false
  724. },
  725. {
  726. parentId: 202,
  727. id: 204,
  728. menuType: 3,
  729. title: "修改",
  730. name: "",
  731. path: "",
  732. component: "",
  733. rank: null,
  734. redirect: "",
  735. icon: "",
  736. extraIcon: "",
  737. enterTransition: "",
  738. leaveTransition: "",
  739. activePath: "",
  740. auths: "permission:btn:edit",
  741. frameSrc: "",
  742. frameLoading: true,
  743. keepAlive: false,
  744. hiddenTag: false,
  745. showLink: true,
  746. showParent: false
  747. },
  748. {
  749. parentId: 202,
  750. id: 205,
  751. menuType: 3,
  752. title: "删除",
  753. name: "",
  754. path: "",
  755. component: "",
  756. rank: null,
  757. redirect: "",
  758. icon: "",
  759. extraIcon: "",
  760. enterTransition: "",
  761. leaveTransition: "",
  762. activePath: "",
  763. auths: "permission:btn:delete",
  764. frameSrc: "",
  765. frameLoading: true,
  766. keepAlive: false,
  767. hiddenTag: false,
  768. showLink: true,
  769. showParent: false
  770. },
  771. // 系统管理
  772. {
  773. parentId: 0,
  774. id: 300,
  775. menuType: 0,
  776. title: "menus.pureSysManagement",
  777. name: "PureSystem",
  778. path: "/system",
  779. component: "",
  780. rank: 10,
  781. redirect: "",
  782. icon: "ri:settings-3-line",
  783. extraIcon: "",
  784. enterTransition: "",
  785. leaveTransition: "",
  786. activePath: "",
  787. auths: "",
  788. frameSrc: "",
  789. frameLoading: true,
  790. keepAlive: false,
  791. hiddenTag: false,
  792. showLink: true,
  793. showParent: false
  794. },
  795. {
  796. parentId: 300,
  797. id: 301,
  798. menuType: 0,
  799. title: "menus.pureUser",
  800. name: "SystemUser",
  801. path: "/system/user/index",
  802. component: "",
  803. rank: null,
  804. redirect: "",
  805. icon: "ri:admin-line",
  806. extraIcon: "",
  807. enterTransition: "",
  808. leaveTransition: "",
  809. activePath: "",
  810. auths: "",
  811. frameSrc: "",
  812. frameLoading: true,
  813. keepAlive: false,
  814. hiddenTag: false,
  815. showLink: true,
  816. showParent: false
  817. },
  818. {
  819. parentId: 300,
  820. id: 302,
  821. menuType: 0,
  822. title: "menus.pureRole",
  823. name: "SystemRole",
  824. path: "/system/role/index",
  825. component: "",
  826. rank: null,
  827. redirect: "",
  828. icon: "ri:admin-fill",
  829. extraIcon: "",
  830. enterTransition: "",
  831. leaveTransition: "",
  832. activePath: "",
  833. auths: "",
  834. frameSrc: "",
  835. frameLoading: true,
  836. keepAlive: false,
  837. hiddenTag: false,
  838. showLink: true,
  839. showParent: false
  840. },
  841. {
  842. parentId: 300,
  843. id: 303,
  844. menuType: 0,
  845. title: "menus.pureSystemMenu",
  846. name: "SystemMenu",
  847. path: "/system/menu/index",
  848. component: "",
  849. rank: null,
  850. redirect: "",
  851. icon: "ep:menu",
  852. extraIcon: "",
  853. enterTransition: "",
  854. leaveTransition: "",
  855. activePath: "",
  856. auths: "",
  857. frameSrc: "",
  858. frameLoading: true,
  859. keepAlive: false,
  860. hiddenTag: false,
  861. showLink: true,
  862. showParent: false
  863. },
  864. {
  865. parentId: 300,
  866. id: 304,
  867. menuType: 0,
  868. title: "menus.pureDept",
  869. name: "SystemDept",
  870. path: "/system/dept/index",
  871. component: "",
  872. rank: null,
  873. redirect: "",
  874. icon: "ri:git-branch-line",
  875. extraIcon: "",
  876. enterTransition: "",
  877. leaveTransition: "",
  878. activePath: "",
  879. auths: "",
  880. frameSrc: "",
  881. frameLoading: true,
  882. keepAlive: false,
  883. hiddenTag: false,
  884. showLink: true,
  885. showParent: false
  886. },
  887. // 系统监控
  888. {
  889. parentId: 0,
  890. id: 400,
  891. menuType: 0,
  892. title: "menus.pureSysMonitor",
  893. name: "PureMonitor",
  894. path: "/monitor",
  895. component: "",
  896. rank: 11,
  897. redirect: "",
  898. icon: "ep:monitor",
  899. extraIcon: "",
  900. enterTransition: "",
  901. leaveTransition: "",
  902. activePath: "",
  903. auths: "",
  904. frameSrc: "",
  905. frameLoading: true,
  906. keepAlive: false,
  907. hiddenTag: false,
  908. showLink: true,
  909. showParent: false
  910. },
  911. {
  912. parentId: 400,
  913. id: 401,
  914. menuType: 0,
  915. title: "menus.pureOnlineUser",
  916. name: "OnlineUser",
  917. path: "/monitor/online-user",
  918. component: "monitor/online/index",
  919. rank: null,
  920. redirect: "",
  921. icon: "ri:user-voice-line",
  922. extraIcon: "",
  923. enterTransition: "",
  924. leaveTransition: "",
  925. activePath: "",
  926. auths: "",
  927. frameSrc: "",
  928. frameLoading: true,
  929. keepAlive: false,
  930. hiddenTag: false,
  931. showLink: true,
  932. showParent: false
  933. },
  934. {
  935. parentId: 400,
  936. id: 402,
  937. menuType: 0,
  938. title: "menus.pureLoginLog",
  939. name: "LoginLog",
  940. path: "/monitor/login-logs",
  941. component: "monitor/logs/login/index",
  942. rank: null,
  943. redirect: "",
  944. icon: "ri:window-line",
  945. extraIcon: "",
  946. enterTransition: "",
  947. leaveTransition: "",
  948. activePath: "",
  949. auths: "",
  950. frameSrc: "",
  951. frameLoading: true,
  952. keepAlive: false,
  953. hiddenTag: false,
  954. showLink: true,
  955. showParent: false
  956. },
  957. {
  958. parentId: 400,
  959. id: 403,
  960. menuType: 0,
  961. title: "menus.pureOperationLog",
  962. name: "OperationLog",
  963. path: "/monitor/operation-logs",
  964. component: "monitor/logs/operation/index",
  965. rank: null,
  966. redirect: "",
  967. icon: "ri:history-fill",
  968. extraIcon: "",
  969. enterTransition: "",
  970. leaveTransition: "",
  971. activePath: "",
  972. auths: "",
  973. frameSrc: "",
  974. frameLoading: true,
  975. keepAlive: false,
  976. hiddenTag: false,
  977. showLink: true,
  978. showParent: false
  979. },
  980. {
  981. parentId: 400,
  982. id: 404,
  983. menuType: 0,
  984. title: "menus.pureSystemLog",
  985. name: "SystemLog",
  986. path: "/monitor/system-logs",
  987. component: "monitor/logs/system/index",
  988. rank: null,
  989. redirect: "",
  990. icon: "ri:file-search-line",
  991. extraIcon: "",
  992. enterTransition: "",
  993. leaveTransition: "",
  994. activePath: "",
  995. auths: "",
  996. frameSrc: "",
  997. frameLoading: true,
  998. keepAlive: false,
  999. hiddenTag: false,
  1000. showLink: true,
  1001. showParent: false
  1002. },
  1003. // 标签页操作
  1004. {
  1005. parentId: 0,
  1006. id: 500,
  1007. menuType: 0,
  1008. title: "menus.pureTabs",
  1009. name: "PureTabs",
  1010. path: "/tabs",
  1011. component: "",
  1012. rank: 12,
  1013. redirect: "",
  1014. icon: "ri:bookmark-2-line",
  1015. extraIcon: "",
  1016. enterTransition: "",
  1017. leaveTransition: "",
  1018. activePath: "",
  1019. auths: "",
  1020. frameSrc: "",
  1021. frameLoading: true,
  1022. keepAlive: false,
  1023. hiddenTag: false,
  1024. showLink: true,
  1025. showParent: false
  1026. },
  1027. {
  1028. parentId: 500,
  1029. id: 501,
  1030. menuType: 0,
  1031. title: "menus.pureTabs",
  1032. name: "Tabs",
  1033. path: "/tabs/index",
  1034. component: "",
  1035. rank: null,
  1036. redirect: "",
  1037. icon: "",
  1038. extraIcon: "",
  1039. enterTransition: "",
  1040. leaveTransition: "",
  1041. activePath: "",
  1042. auths: "",
  1043. frameSrc: "",
  1044. frameLoading: true,
  1045. keepAlive: false,
  1046. hiddenTag: false,
  1047. showLink: true,
  1048. showParent: false
  1049. },
  1050. {
  1051. parentId: 500,
  1052. id: 502,
  1053. menuType: 0,
  1054. title: "query传参模式",
  1055. name: "TabQueryDetail",
  1056. path: "/tabs/query-detail",
  1057. component: "",
  1058. rank: null,
  1059. redirect: "",
  1060. icon: "",
  1061. extraIcon: "",
  1062. enterTransition: "",
  1063. leaveTransition: "",
  1064. activePath: "/tabs/index",
  1065. auths: "",
  1066. frameSrc: "",
  1067. frameLoading: true,
  1068. keepAlive: false,
  1069. hiddenTag: false,
  1070. showLink: false,
  1071. showParent: false
  1072. },
  1073. {
  1074. parentId: 500,
  1075. id: 503,
  1076. menuType: 0,
  1077. title: "params传参模式",
  1078. name: "TabParamsDetail",
  1079. path: "/tabs/params-detail/:id",
  1080. component: "params-detail",
  1081. rank: null,
  1082. redirect: "",
  1083. icon: "",
  1084. extraIcon: "",
  1085. enterTransition: "",
  1086. leaveTransition: "",
  1087. activePath: "/tabs/index",
  1088. auths: "",
  1089. frameSrc: "",
  1090. frameLoading: true,
  1091. keepAlive: false,
  1092. hiddenTag: false,
  1093. showLink: false,
  1094. showParent: false
  1095. }
  1096. ]
  1097. };
  1098. }
  1099. },
  1100. // 部门管理
  1101. {
  1102. url: "/dept",
  1103. method: "post",
  1104. response: () => {
  1105. return {
  1106. success: true,
  1107. data: [
  1108. {
  1109. name: "杭州总公司",
  1110. parentId: 0,
  1111. id: 100,
  1112. sort: 0,
  1113. phone: "15888888888",
  1114. principal: faker.person.firstName(),
  1115. email: faker.internet.email(),
  1116. status: 1, // 状态 1 启用 0 停用
  1117. type: 1, // 1 公司 2 分公司 3 部门
  1118. createTime: 1605456000000,
  1119. remark: "这里是备注信息这里是备注信息这里是备注信息这里是备注信息"
  1120. },
  1121. {
  1122. name: "郑州分公司",
  1123. parentId: 100,
  1124. id: 101,
  1125. sort: 1,
  1126. phone: "15888888888",
  1127. principal: faker.person.firstName(),
  1128. email: faker.internet.email(),
  1129. status: 1,
  1130. type: 2,
  1131. createTime: 1605456000000,
  1132. remark: "这里是备注信息这里是备注信息这里是备注信息这里是备注信息"
  1133. },
  1134. {
  1135. name: "研发部门",
  1136. parentId: 101,
  1137. id: 103,
  1138. sort: 1,
  1139. phone: "15888888888",
  1140. principal: faker.person.firstName(),
  1141. email: faker.internet.email(),
  1142. status: 1,
  1143. type: 3,
  1144. createTime: 1605456000000,
  1145. remark: "这里是备注信息这里是备注信息这里是备注信息这里是备注信息"
  1146. },
  1147. {
  1148. name: "市场部门",
  1149. parentId: 102,
  1150. id: 108,
  1151. sort: 1,
  1152. phone: "15888888888",
  1153. principal: faker.person.firstName(),
  1154. email: faker.internet.email(),
  1155. status: 1,
  1156. type: 3,
  1157. createTime: 1605456000000,
  1158. remark: "这里是备注信息这里是备注信息这里是备注信息这里是备注信息"
  1159. },
  1160. {
  1161. name: "深圳分公司",
  1162. parentId: 100,
  1163. id: 102,
  1164. sort: 2,
  1165. phone: "15888888888",
  1166. principal: faker.person.firstName(),
  1167. email: faker.internet.email(),
  1168. status: 1,
  1169. type: 2,
  1170. createTime: 1605456000000,
  1171. remark: "这里是备注信息这里是备注信息这里是备注信息这里是备注信息"
  1172. },
  1173. {
  1174. name: "市场部门",
  1175. parentId: 101,
  1176. id: 104,
  1177. sort: 2,
  1178. phone: "15888888888",
  1179. principal: faker.person.firstName(),
  1180. email: faker.internet.email(),
  1181. status: 1,
  1182. type: 3,
  1183. createTime: 1605456000000,
  1184. remark: "这里是备注信息这里是备注信息这里是备注信息这里是备注信息"
  1185. },
  1186. {
  1187. name: "财务部门",
  1188. parentId: 102,
  1189. id: 109,
  1190. sort: 2,
  1191. phone: "15888888888",
  1192. principal: faker.person.firstName(),
  1193. email: faker.internet.email(),
  1194. status: 1,
  1195. type: 3,
  1196. createTime: 1605456000000,
  1197. remark: "这里是备注信息这里是备注信息这里是备注信息这里是备注信息"
  1198. },
  1199. {
  1200. name: "测试部门",
  1201. parentId: 101,
  1202. id: 105,
  1203. sort: 3,
  1204. phone: "15888888888",
  1205. principal: faker.person.firstName(),
  1206. email: faker.internet.email(),
  1207. status: 0,
  1208. type: 3,
  1209. createTime: 1605456000000,
  1210. remark: "这里是备注信息这里是备注信息这里是备注信息这里是备注信息"
  1211. },
  1212. {
  1213. name: "财务部门",
  1214. parentId: 101,
  1215. id: 106,
  1216. sort: 4,
  1217. phone: "15888888888",
  1218. principal: faker.person.firstName(),
  1219. email: faker.internet.email(),
  1220. status: 1,
  1221. type: 3,
  1222. createTime: 1605456000000,
  1223. remark: "这里是备注信息这里是备注信息这里是备注信息这里是备注信息"
  1224. },
  1225. {
  1226. name: "运维部门",
  1227. parentId: 101,
  1228. id: 107,
  1229. sort: 5,
  1230. phone: "15888888888",
  1231. principal: faker.person.firstName(),
  1232. email: faker.internet.email(),
  1233. status: 0,
  1234. type: 3,
  1235. createTime: 1605456000000,
  1236. remark: "这里是备注信息这里是备注信息这里是备注信息这里是备注信息"
  1237. }
  1238. ]
  1239. };
  1240. }
  1241. },
  1242. // 在线用户
  1243. {
  1244. url: "/online-logs",
  1245. method: "post",
  1246. response: ({ body }) => {
  1247. let list = [
  1248. {
  1249. id: 1,
  1250. username: "admin",
  1251. ip: faker.internet.ipv4(),
  1252. address: "中国河南省信阳市",
  1253. system: "macOS",
  1254. browser: "Chrome",
  1255. loginTime: new Date()
  1256. },
  1257. {
  1258. id: 2,
  1259. username: "common",
  1260. ip: faker.internet.ipv4(),
  1261. address: "中国广东省深圳市",
  1262. system: "Windows",
  1263. browser: "Firefox",
  1264. loginTime: new Date()
  1265. }
  1266. ];
  1267. list = list.filter(item => item.username.includes(body?.username));
  1268. return {
  1269. success: true,
  1270. data: {
  1271. list,
  1272. total: list.length, // 总条目数
  1273. pageSize: 10, // 每页显示条目个数
  1274. currentPage: 1 // 当前页数
  1275. }
  1276. };
  1277. }
  1278. },
  1279. // 登录日志
  1280. {
  1281. url: "/login-logs",
  1282. method: "post",
  1283. response: ({ body }) => {
  1284. let list = [
  1285. {
  1286. id: 1,
  1287. username: "admin",
  1288. ip: faker.internet.ipv4(),
  1289. address: "中国河南省信阳市",
  1290. system: "macOS",
  1291. browser: "Chrome",
  1292. status: 1, // 登录状态 1 成功 0 失败
  1293. behavior: "账号登录",
  1294. loginTime: new Date()
  1295. },
  1296. {
  1297. id: 2,
  1298. username: "common",
  1299. ip: faker.internet.ipv4(),
  1300. address: "中国广东省深圳市",
  1301. system: "Windows",
  1302. browser: "Firefox",
  1303. status: 0,
  1304. behavior: "第三方登录",
  1305. loginTime: new Date()
  1306. }
  1307. ];
  1308. list = list.filter(item => item.username.includes(body?.username));
  1309. list = list.filter(item =>
  1310. String(item.status).includes(String(body?.status))
  1311. );
  1312. return {
  1313. success: true,
  1314. data: {
  1315. list,
  1316. total: list.length, // 总条目数
  1317. pageSize: 10, // 每页显示条目个数
  1318. currentPage: 1 // 当前页数
  1319. }
  1320. };
  1321. }
  1322. },
  1323. // 操作日志
  1324. {
  1325. url: "/operation-logs",
  1326. method: "post",
  1327. response: ({ body }) => {
  1328. let list = [
  1329. {
  1330. id: 1,
  1331. username: "admin",
  1332. ip: faker.internet.ipv4(),
  1333. address: "中国河南省信阳市",
  1334. system: "macOS",
  1335. browser: "Chrome",
  1336. status: 1, // 操作状态 1 成功 0 失败
  1337. summary: "菜单管理-添加菜单", // 操作概要
  1338. module: "系统管理", // 所属模块
  1339. operatingTime: new Date() // 操作时间
  1340. },
  1341. {
  1342. id: 2,
  1343. username: "common",
  1344. ip: faker.internet.ipv4(),
  1345. address: "中国广东省深圳市",
  1346. system: "Windows",
  1347. browser: "Firefox",
  1348. status: 0,
  1349. summary: "列表分页查询",
  1350. module: "在线用户",
  1351. operatingTime: new Date()
  1352. }
  1353. ];
  1354. list = list.filter(item => item.module.includes(body?.module));
  1355. list = list.filter(item =>
  1356. String(item.status).includes(String(body?.status))
  1357. );
  1358. return {
  1359. success: true,
  1360. data: {
  1361. list,
  1362. total: list.length, // 总条目数
  1363. pageSize: 10, // 每页显示条目个数
  1364. currentPage: 1 // 当前页数
  1365. }
  1366. };
  1367. }
  1368. },
  1369. // 系统日志
  1370. {
  1371. url: "/system-logs",
  1372. method: "post",
  1373. response: ({ body }) => {
  1374. let list = [
  1375. {
  1376. id: 1, // 日志ID
  1377. /**
  1378. * 日志级别
  1379. * 0 debug调试(最低级别的日志,用于调试和开发阶段)
  1380. * 1 info信息(默认级别,用于记录一般的信息)
  1381. * 2 warn警告(表示可能出现的问题或潜在的错误,但不会影响系统的正常运行)
  1382. * 3 error错误(表示发生了错误,但不会导致系统崩溃)
  1383. * 4 fatal致命(最高级别的日志,表示发生了严重错误,导致系统无法继续运行)
  1384. */
  1385. level: 1,
  1386. module: "菜单管理", // 所属模块
  1387. url: "/menu", // 请求接口
  1388. method: "post", // 请求方法
  1389. ip: faker.internet.ipv4(),
  1390. address: "中国河南省信阳市",
  1391. system: "macOS",
  1392. browser: "Chrome",
  1393. /**
  1394. * 请求耗时(单位:ms 毫秒)
  1395. * 正常耗时:一般认为在几百毫秒(0.1-0.5秒)范围内的请求耗时较为正常
  1396. * 较慢耗时:在1秒以上的耗时可以被认为是较慢的请求,但具体是否较慢还需要根据具体业务场景和性能要求来判断
  1397. */
  1398. takesTime: 10,
  1399. requestTime: new Date() // 请求时间
  1400. },
  1401. {
  1402. id: 2,
  1403. level: 0,
  1404. module: "地图",
  1405. url: "/get-map-info",
  1406. method: "get",
  1407. ip: faker.internet.ipv4(),
  1408. address: "中国广东省深圳市",
  1409. system: "Windows",
  1410. browser: "Firefox",
  1411. takesTime: 1200,
  1412. requestTime: new Date()
  1413. }
  1414. ];
  1415. list = list.filter(item => item.module.includes(body?.module));
  1416. return {
  1417. success: true,
  1418. data: {
  1419. list,
  1420. total: list.length, // 总条目数
  1421. pageSize: 10, // 每页显示条目个数
  1422. currentPage: 1 // 当前页数
  1423. }
  1424. };
  1425. }
  1426. },
  1427. // 系统日志-根据 id 查日志详情
  1428. {
  1429. url: "/system-logs-detail",
  1430. method: "post",
  1431. response: ({ body }) => {
  1432. if (body.id == 1) {
  1433. return {
  1434. id: 1,
  1435. level: 1,
  1436. module: "菜单管理",
  1437. url: "/menu",
  1438. method: "post",
  1439. ip: faker.internet.ipv4(),
  1440. address: "中国河南省信阳市",
  1441. system: "macOS",
  1442. browser: "Chrome",
  1443. takesTime: 10,
  1444. responseHeaders: {
  1445. traceId: "1495502411171032",
  1446. "Content-Type": "application/json",
  1447. Connection: "keep-alive",
  1448. "Keep-Alive": "timeout=5",
  1449. "Content-Length": 17019
  1450. },
  1451. responseBody: {
  1452. success: true,
  1453. data: [
  1454. {
  1455. parentId: 0,
  1456. id: 400,
  1457. menuType: 0,
  1458. title: "menus.pureSysMonitor",
  1459. name: "PureMonitor",
  1460. path: "/monitor",
  1461. component: "",
  1462. rank: 11,
  1463. redirect: "",
  1464. icon: "ep:monitor",
  1465. extraIcon: "",
  1466. enterTransition: "",
  1467. leaveTransition: "",
  1468. activePath: "",
  1469. auths: "",
  1470. frameSrc: "",
  1471. frameLoading: true,
  1472. keepAlive: false,
  1473. hiddenTag: false,
  1474. showLink: true,
  1475. showParent: false
  1476. },
  1477. {
  1478. parentId: 400,
  1479. id: 401,
  1480. menuType: 0,
  1481. title: "menus.pureOnlineUser",
  1482. name: "OnlineUser",
  1483. path: "/monitor/online-user",
  1484. component: "monitor/online/index",
  1485. rank: null,
  1486. redirect: "",
  1487. icon: "ri:user-voice-line",
  1488. extraIcon: "",
  1489. enterTransition: "",
  1490. leaveTransition: "",
  1491. activePath: "",
  1492. auths: "",
  1493. frameSrc: "",
  1494. frameLoading: true,
  1495. keepAlive: false,
  1496. hiddenTag: false,
  1497. showLink: true,
  1498. showParent: false
  1499. },
  1500. {
  1501. parentId: 400,
  1502. id: 402,
  1503. menuType: 0,
  1504. title: "menus.pureLoginLog",
  1505. name: "LoginLog",
  1506. path: "/monitor/login-logs",
  1507. component: "monitor/logs/login/index",
  1508. rank: null,
  1509. redirect: "",
  1510. icon: "ri:window-line",
  1511. extraIcon: "",
  1512. enterTransition: "",
  1513. leaveTransition: "",
  1514. activePath: "",
  1515. auths: "",
  1516. frameSrc: "",
  1517. frameLoading: true,
  1518. keepAlive: false,
  1519. hiddenTag: false,
  1520. showLink: true,
  1521. showParent: false
  1522. },
  1523. {
  1524. parentId: 400,
  1525. id: 403,
  1526. menuType: 0,
  1527. title: "menus.pureOperationLog",
  1528. name: "OperationLog",
  1529. path: "/monitor/operation-logs",
  1530. component: "monitor/logs/operation/index",
  1531. rank: null,
  1532. redirect: "",
  1533. icon: "ri:history-fill",
  1534. extraIcon: "",
  1535. enterTransition: "",
  1536. leaveTransition: "",
  1537. activePath: "",
  1538. auths: "",
  1539. frameSrc: "",
  1540. frameLoading: true,
  1541. keepAlive: false,
  1542. hiddenTag: false,
  1543. showLink: true,
  1544. showParent: false
  1545. },
  1546. {
  1547. parentId: 400,
  1548. id: 404,
  1549. menuType: 0,
  1550. title: "menus.pureSystemLog",
  1551. name: "SystemLog",
  1552. path: "/monitor/system-logs",
  1553. component: "monitor/logs/system/index",
  1554. rank: null,
  1555. redirect: "",
  1556. icon: "ri:file-search-line",
  1557. extraIcon: "",
  1558. enterTransition: "",
  1559. leaveTransition: "",
  1560. activePath: "",
  1561. auths: "",
  1562. frameSrc: "",
  1563. frameLoading: true,
  1564. keepAlive: false,
  1565. hiddenTag: false,
  1566. showLink: true,
  1567. showParent: false
  1568. }
  1569. ]
  1570. },
  1571. requestHeaders: {
  1572. Accept: "application/json, text/plain, */*",
  1573. "Accept-Encoding": "gzip, deflate",
  1574. "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,eo;q=0.7",
  1575. Authorization: "Bearer eyJhbGciOiJIUzUxMiJ9.admin",
  1576. Connection: "keep-alive",
  1577. "Content-Length": 0,
  1578. Cookie:
  1579. "_ga=GA1.1.231800979.1704562367; _ga_M74ZHEQ1M1=GS1.1.1709299375.7.1.1709299476.0.0.0; Hm_lvt_6a7dac00248d3b6ad8479d7249bb29c5=1709032753,1709359575; Hm_lvt_23a157b7d0d9867f7a51e42628f052f5=1708960489,1709485849,1709879672; authorized-token={%22accessToken%22:%22eyJhbGciOiJIUzUxMiJ9.admin%22%2C%22expires%22:1919520000000}; multiple-tabs=true",
  1580. Host: "192.168.2.121:8848",
  1581. Origin: "http://192.168.2.121:8848",
  1582. Referer: "http://192.168.2.121:8848/",
  1583. "User-Agent":
  1584. "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
  1585. "X-Requested-With": "XMLHttpRequest"
  1586. },
  1587. requestBody: {
  1588. title: "系统监控"
  1589. },
  1590. traceId: "1495502411171032",
  1591. requestTime: new Date()
  1592. };
  1593. } else if (body.id == 2) {
  1594. return {
  1595. id: 2,
  1596. level: 0,
  1597. module: "地图",
  1598. url: "/get-map-info?plateNumber=豫A59778U",
  1599. method: "get",
  1600. ip: faker.internet.ipv4(),
  1601. address: "中国广东省深圳市",
  1602. system: "Windows",
  1603. browser: "Firefox",
  1604. takesTime: 1200,
  1605. responseHeaders: {
  1606. traceId: "2280443117103208",
  1607. "Content-Type": "application/json",
  1608. Connection: "keep-alive",
  1609. "Keep-Alive": "timeout=5",
  1610. "Content-Length": 28693
  1611. },
  1612. responseBody: {
  1613. plateNumber: "豫A59778U",
  1614. driver: "子骞",
  1615. orientation: 289,
  1616. lng: 113.8564,
  1617. lat: 34.373
  1618. },
  1619. requestHeaders: {
  1620. Accept: "application/json, text/plain, */*",
  1621. "Accept-Encoding": "gzip, deflate",
  1622. "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,eo;q=0.7",
  1623. Authorization: "Bearer eyJhbGciOiJIUzUxMiJ9.admin",
  1624. Connection: "keep-alive",
  1625. "Content-Length": 0,
  1626. Cookie:
  1627. "_ga=GA1.1.231800979.1704562367; _ga_M74ZHEQ1M1=GS1.1.1709299375.7.1.1709299476.0.0.0; Hm_lvt_6a7dac00248d3b6ad8479d7249bb29c5=1709032753,1709359575; Hm_lvt_23a157b7d0d9867f7a51e42628f052f5=1708960489,1709485849,1709879672; authorized-token={%22accessToken%22:%22eyJhbGciOiJIUzUxMiJ9.admin%22%2C%22expires%22:1919520000000}; multiple-tabs=true",
  1628. Host: "192.168.2.121:8848",
  1629. Origin: "http://192.168.2.121:8848",
  1630. Referer: "http://192.168.2.121:8848/",
  1631. "User-Agent":
  1632. "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
  1633. "X-Requested-With": "XMLHttpRequest"
  1634. },
  1635. requestBody: null,
  1636. traceId: "2280443117103208",
  1637. requestTime: new Date()
  1638. };
  1639. }
  1640. }
  1641. }
  1642. ]);