data.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679
  1. let ecData = [
  2. {
  3. color: ['#2E9AE2', 'transparent'],
  4. value: '75',
  5. value1: '25',
  6. name: '煤矿运输',
  7. txt: ''
  8. },
  9. {
  10. color: ['#02FDFE', 'transparent'],
  11. value: '75',
  12. value1: '25',
  13. name: '钢铁运输',
  14. txt: ''
  15. },
  16. {
  17. color: ['#1EEBBC', 'transparent'],
  18. value: '75',
  19. value1: '25',
  20. name: '其他领域',
  21. txt: ''
  22. },
  23. {
  24. color: ['#2E9AE2', 'transparent'],
  25. value: '75',
  26. value1: '25',
  27. name: '港口运输',
  28. txt: ''
  29. },
  30. {
  31. color: ['#1EEBBC', 'transparent'],
  32. value: '75',
  33. value1: '25',
  34. name: '站台运输',
  35. txt: ''
  36. },
  37. ]
  38. // 节能减排数据
  39. export const setOption1 = {
  40. color: ecData[0].color,
  41. tooltip: {
  42. show: false
  43. },
  44. series: [
  45. {
  46. type: 'pie',
  47. clockWise: false,
  48. radius: [40, 43],
  49. avoidLabelOverlap: false,
  50. itemStyle: {
  51. normal: {
  52. color: '#2E9AE2',
  53. shadowColor: '#2E9AE2',
  54. shadowBlur: 0,
  55. label: {
  56. show: true,
  57. },
  58. labelLine: {
  59. show: true,
  60. },
  61. },
  62. },
  63. hoverAnimation: false,
  64. label: {
  65. show: false,
  66. },
  67. labelLine: {
  68. show: false
  69. },
  70. data: [
  71. {
  72. value: Number(ecData[0].value),
  73. name: ecData[0].name,
  74. label: {
  75. normal: {
  76. formatter: function (params) {
  77. let num = ecData[0].value;
  78. return ["{a|" + num + "%}", "{b|" + ecData[0].name + "\n" + ecData[0].txt + "}"].join("\n");
  79. },
  80. rich: {
  81. a: {
  82. color: "#fff",
  83. fontWeight: 500,
  84. fontSize: 16,
  85. lineHeight: 20,
  86. align: "center",
  87. },
  88. b: {
  89. color: "#ccc",
  90. fontSize: 10,
  91. },
  92. },
  93. position: "center",
  94. show: true,
  95. textStyle: {
  96. fontSize: "20",
  97. fontWeight: "bold",
  98. color: ecData[0].color[0], //跟随其他颜色
  99. },
  100. },
  101. },
  102. itemStyle: {
  103. emphasis: {
  104. color: ecData[0].color[0],
  105. },
  106. },
  107. },
  108. {
  109. value: Number(ecData[0].value1),
  110. name: '轨道',
  111. label: {
  112. show: false,
  113. },
  114. labelLine: {
  115. show: false,
  116. },
  117. itemStyle: {
  118. normal: {
  119. color: ecData[0].color[1],
  120. },
  121. },
  122. },
  123. ]
  124. }
  125. ]
  126. }
  127. export const setOption2 = {
  128. color: ecData[1].color,
  129. tooltip: {
  130. show: false
  131. },
  132. series: [
  133. {
  134. type: 'pie',
  135. clockWise: false,
  136. radius: [40, 43],
  137. avoidLabelOverlap: false,
  138. itemStyle: {
  139. normal: {
  140. color: ecData[1].color[0],
  141. shadowColor: ecData[1].color[0],
  142. shadowBlur: 0,
  143. label: {
  144. show: true,
  145. },
  146. labelLine: {
  147. show: true,
  148. },
  149. },
  150. },
  151. hoverAnimation: false,
  152. label: {
  153. show: false,
  154. },
  155. labelLine: {
  156. show: false
  157. },
  158. data: [
  159. {
  160. value: Number(ecData[1].value),
  161. name: ecData[1].name,
  162. label: {
  163. normal: {
  164. formatter: function (params) {
  165. let num = ecData[1].value;
  166. return ["{a|" + num + "%}", "{b|" + ecData[1].name + "}"].join("\n");
  167. },
  168. rich: {
  169. a: {
  170. color: "#fff",
  171. fontWeight: 500,
  172. fontSize: 16,
  173. lineHeight: 20,
  174. align: "center",
  175. },
  176. b: {
  177. color: "#ccc",
  178. fontSize: 10,
  179. },
  180. },
  181. position: "center",
  182. show: true,
  183. textStyle: {
  184. fontSize: "20",
  185. fontWeight: "bold",
  186. color: ecData[1].color[0], //跟随其他颜色
  187. },
  188. },
  189. },
  190. itemStyle: {
  191. emphasis: {
  192. color: ecData[1].color[0],
  193. },
  194. },
  195. },
  196. {
  197. value: Number(ecData[1].value1),
  198. name: '轨道',
  199. label: {
  200. show: false,
  201. },
  202. labelLine: {
  203. show: false,
  204. },
  205. itemStyle: {
  206. normal: {
  207. color: ecData[1].color[1],
  208. },
  209. },
  210. },
  211. ]
  212. }
  213. ]
  214. }
  215. export const setOption3 = {
  216. color: ecData[2].color,
  217. tooltip: {
  218. show: false
  219. },
  220. series: [
  221. {
  222. type: 'pie',
  223. clockWise: false,
  224. radius: [40, 43],
  225. avoidLabelOverlap: false,
  226. itemStyle: {
  227. normal: {
  228. color: ecData[2].color[0],
  229. shadowColor: ecData[2].color[0],
  230. shadowBlur: 0,
  231. label: {
  232. show: true,
  233. },
  234. labelLine: {
  235. show: true,
  236. },
  237. },
  238. },
  239. hoverAnimation: false,
  240. label: {
  241. show: false,
  242. },
  243. labelLine: {
  244. show: false
  245. },
  246. data: [
  247. {
  248. value: Number(ecData[2].value),
  249. name: ecData[2].name,
  250. label: {
  251. normal: {
  252. formatter: function (params) {
  253. let num = ecData[2].value;
  254. return ["{a|" + num + "%}", "{b|" + ecData[2].name + "}"].join("\n");
  255. },
  256. rich: {
  257. a: {
  258. color: "#fff",
  259. fontWeight: 500,
  260. fontSize: 16,
  261. lineHeight: 20,
  262. align: "center",
  263. },
  264. b: {
  265. color: "#ccc",
  266. fontSize: 10,
  267. },
  268. },
  269. position: "center",
  270. show: true,
  271. textStyle: {
  272. fontSize: "20",
  273. fontWeight: "bold",
  274. color: ecData[2].color[0], //跟随其他颜色
  275. },
  276. },
  277. },
  278. itemStyle: {
  279. emphasis: {
  280. color: ecData[2].color[0],
  281. },
  282. },
  283. },
  284. {
  285. value: Number(ecData[2].value1),
  286. name: '轨道',
  287. label: {
  288. show: false,
  289. },
  290. labelLine: {
  291. show: false,
  292. },
  293. itemStyle: {
  294. normal: {
  295. color: ecData[2].color[1],
  296. },
  297. },
  298. },
  299. ]
  300. }
  301. ]
  302. }
  303. export const setOption4 = {
  304. color: ecData[3].color,
  305. tooltip: {
  306. show: false
  307. },
  308. series: [
  309. {
  310. type: 'pie',
  311. clockWise: false,
  312. radius: [40, 43],
  313. avoidLabelOverlap: false,
  314. itemStyle: {
  315. normal: {
  316. color: ecData[3].color[0],
  317. shadowColor: ecData[3].color[0],
  318. shadowBlur: 0,
  319. label: {
  320. show: true,
  321. },
  322. labelLine: {
  323. show: true,
  324. },
  325. },
  326. },
  327. hoverAnimation: false,
  328. label: {
  329. show: false,
  330. },
  331. labelLine: {
  332. show: false
  333. },
  334. data: [
  335. {
  336. value: Number(ecData[3].value),
  337. name: ecData[3].name,
  338. label: {
  339. normal: {
  340. formatter: function (params) {
  341. let num = ecData[3].value;
  342. return ["{a|" + num + "%}", "{b|" + ecData[3].name + "}"].join("\n");
  343. },
  344. rich: {
  345. a: {
  346. color: "#fff",
  347. fontWeight: 500,
  348. fontSize: 16,
  349. lineHeight: 20,
  350. align: "center",
  351. },
  352. b: {
  353. color: "#ccc",
  354. fontSize: 10,
  355. },
  356. },
  357. position: "center",
  358. show: true,
  359. textStyle: {
  360. fontSize: "20",
  361. fontWeight: "bold",
  362. color: ecData[3].color[0], //跟随其他颜色
  363. },
  364. },
  365. },
  366. itemStyle: {
  367. emphasis: {
  368. color: ecData[3].color[0],
  369. },
  370. },
  371. },
  372. {
  373. value: Number(ecData[3].value1),
  374. name: '轨道',
  375. label: {
  376. show: false,
  377. },
  378. labelLine: {
  379. show: false,
  380. },
  381. itemStyle: {
  382. normal: {
  383. color: ecData[3].color[1],
  384. },
  385. },
  386. },
  387. ]
  388. }
  389. ]
  390. }
  391. export const setOption5 = {
  392. color: ecData[4].color,
  393. tooltip: {
  394. show: false
  395. },
  396. series: [
  397. {
  398. type: 'pie',
  399. clockWise: false,
  400. radius: [40, 43],
  401. avoidLabelOverlap: false,
  402. itemStyle: {
  403. normal: {
  404. color: ecData[4].color[0],
  405. shadowColor: ecData[4].color[0],
  406. shadowBlur: 0,
  407. label: {
  408. show: true,
  409. },
  410. labelLine: {
  411. show: true,
  412. },
  413. },
  414. },
  415. hoverAnimation: false,
  416. label: {
  417. show: false,
  418. },
  419. labelLine: {
  420. show: false
  421. },
  422. data: [
  423. {
  424. value: Number(ecData[4].value),
  425. name: ecData[4].name,
  426. label: {
  427. normal: {
  428. formatter: function (params) {
  429. let num = ecData[4].value;
  430. return ["{a|" + num + "%}", "{b|" + ecData[4].name + "}"].join("\n");
  431. },
  432. rich: {
  433. a: {
  434. color: "#fff",
  435. fontWeight: 500,
  436. fontSize: 16,
  437. lineHeight: 20,
  438. align: "center",
  439. },
  440. b: {
  441. color: "#ccc",
  442. fontSize: 10,
  443. },
  444. },
  445. position: "center",
  446. show: true,
  447. textStyle: {
  448. fontSize: "20",
  449. fontWeight: "bold",
  450. color: ecData[4].color[0], //跟随其他颜色
  451. },
  452. },
  453. },
  454. itemStyle: {
  455. emphasis: {
  456. color: ecData[4].color[0],
  457. },
  458. },
  459. },
  460. {
  461. value: Number(ecData[4].value1),
  462. name: '轨道',
  463. label: {
  464. show: false,
  465. },
  466. labelLine: {
  467. show: false,
  468. },
  469. itemStyle: {
  470. normal: {
  471. color: ecData[4].color[1],
  472. },
  473. },
  474. },
  475. ]
  476. }
  477. ]
  478. }
  479. let seriesData = ['535','354','285','487','624','482','395','324','487']
  480. let xAxisData = ['00:00','03:00','06:00','09:00','12:00','15:00','18:00','21:00','24:00']
  481. export const lineOption = {
  482. backgroundColor:"transparent",
  483. tooltip: {
  484. show:false
  485. },
  486. grid: {
  487. top: '18%',
  488. left: '2%',
  489. right: '10%',
  490. bottom: '5%',
  491. containLabel: true
  492. },
  493. legend: {
  494. show:false,
  495. },
  496. xAxis: {
  497. boundaryGap: true,
  498. data: xAxisData,
  499. axisLine: {
  500. lineStyle: {
  501. color: "rgba(117, 168, 202, 0.4)"
  502. }
  503. },
  504. axisTick: {
  505. show: false
  506. },
  507. axisLabel: {
  508. color: '#fff'
  509. }
  510. },
  511. yAxis: [{
  512. name: '单位:万元',
  513. type: "value",
  514. inverse: false,
  515. splitLine: {
  516. show: true,
  517. lineStyle: {
  518. color: 'rgba(117, 168, 202, 0.3)',
  519. type: 'dashed'
  520. }
  521. },
  522. axisLine: {
  523. show: false,
  524. lineStyle: {
  525. color: "#0A5C95"
  526. }
  527. },
  528. axisLabel: {
  529. formatter: "{value}",
  530. textStyle: {
  531. color: '#89BFE5',
  532. fontSize: 12
  533. }
  534. },
  535. nameTextStyle: {
  536. color: '#89BFE5',
  537. padding: [0, 0, 0, 15],
  538. fontSize: 12
  539. },
  540. axisTick: {
  541. show: false
  542. }
  543. }],
  544. series: [
  545. {
  546. name: '客户今日请求量',
  547. type: "line",
  548. symbol: 'circle', //设定为实心点
  549. showAllSymbol: true,
  550. symbolSize: 0,
  551. smooth: true,
  552. itemStyle: {
  553. normal: {
  554. color: `#02D6D9`,
  555. lineStyle: { //线的颜色
  556. color: `#02D6D9`,
  557. width: 1.5
  558. },
  559. areaStyle: {
  560. //新版渐变色实现
  561. color: {
  562. type: 'linear',
  563. x: 0,
  564. y: 0,
  565. x2: 0,
  566. y2: 1,
  567. colorStops: [
  568. {
  569. offset: 0,
  570. color: 'rgba(58, 147, 255, 0.5)'
  571. },
  572. {
  573. offset: 1,
  574. color: 'rgba(2,214,217, 0.1)'
  575. }
  576. ]
  577. }
  578. },
  579. }
  580. },
  581. data: seriesData
  582. },
  583. ]
  584. }
  585. export const userList = [
  586. {
  587. "projectName": "开采",
  588. "position": "四川乐山",
  589. "type": "通信服务",
  590. "sn": "011K",
  591. "deviceType": "数通模块",
  592. "time": "2h",
  593. "number": "5"
  594. },
  595. {
  596. "projectName": "海上采能",
  597. "position": "山东威海",
  598. "type": "通信服务",
  599. "sn": "209M",
  600. "deviceType": "数通模块",
  601. "time": "2h",
  602. "number": "1"
  603. },
  604. {
  605. "projectName": "复垦",
  606. "position": "四川雅安",
  607. "type": "通信服务",
  608. "sn": "901C",
  609. "deviceType": "数通模块",
  610. "time": "2h",
  611. "number": "2"
  612. },
  613. {
  614. "projectName": "开采",
  615. "position": "内蒙古包头",
  616. "type": "通信服务",
  617. "sn": "008C",
  618. "deviceType": "数通模块",
  619. "time": "1h",
  620. "number": "4"
  621. },
  622. {
  623. "projectName": "传媒",
  624. "position": "浙江杭州",
  625. "type": "通信服务",
  626. "sn": "310A",
  627. "deviceType": "数通模块",
  628. "time": "2h",
  629. "number": "2"
  630. },
  631. {
  632. "projectName": "驾驶",
  633. "position": "四川眉山",
  634. "type": "通信服务",
  635. "sn": "800B",
  636. "deviceType": "数通模块",
  637. "time": "2h",
  638. "number": "5"
  639. },
  640. {
  641. "projectName": "开采",
  642. "position": "陕西运城",
  643. "type": "卫星地图",
  644. "sn": "100G",
  645. "deviceType": "数通模块",
  646. "time": "2h",
  647. "number": "11"
  648. },
  649. {
  650. "projectName": "光伏储能",
  651. "position": "新疆库尔勒",
  652. "type": "通信服务",
  653. "sn": "005R",
  654. "deviceType": "数通模块",
  655. "time": "1.5h",
  656. "number": "8"
  657. },
  658. {
  659. "projectName": "开采",
  660. "position": "云南丽江",
  661. "type": "通信服务",
  662. "sn": "113U",
  663. "deviceType": "数通模块",
  664. "time": "2h",
  665. "number": "0"
  666. },
  667. {
  668. "projectName": "开采",
  669. "position": "四川雅安",
  670. "type": "通信服务",
  671. "sn": "467W",
  672. "deviceType": "数通模块",
  673. "time": "1.5h",
  674. "number": "2"
  675. }
  676. ]