data.js 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. import echarts from "echarts"
  2. export const acceptOption = {
  3. // 图表标题
  4. title: {
  5. show: true,
  6. text: '检测受理类型',
  7. textStyle: {
  8. color: '#fff',
  9. fontSize: 20,
  10. fontWeight: '600'
  11. },
  12. textAlign: 'center',
  13. left: '50%',
  14. top: '20px'
  15. },
  16. xAxis: {
  17. type: 'category',
  18. data: ['理化', '微生物', '细胞活率', '残留检测', '细胞鉴别'],
  19. axisTick: {
  20. alignWithLabel: true
  21. },
  22. axisLabel: {
  23. style: {
  24. fill: '#fff'
  25. }
  26. },
  27. axisLine: {
  28. lineStyle: {
  29. color: '#fff'
  30. }
  31. }
  32. // axisLabel: {
  33. // inside: true,
  34. // color: "#000",
  35. // },
  36. // axisTick: {
  37. // show: true,
  38. // },
  39. // axisLine: {
  40. // show: true,
  41. // },
  42. // z: 10
  43. },
  44. yAxis: {
  45. type: 'value',
  46. name: '',
  47. nameTextStyle: {
  48. color: '#fff',
  49. fontSize: 14
  50. },
  51. splitLine: {
  52. show: false
  53. },
  54. axisLine: {
  55. lineStyle: {
  56. color: '#fff'
  57. }
  58. }
  59. },
  60. series: [{
  61. type: 'bar',
  62. name: '',
  63. data: [],
  64. barMaxWidth: '35px',
  65. itemStyle: {
  66. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  67. { offset: 0, color: "#83bff6" },
  68. { offset: 0.5, color: "#188df0" },
  69. { offset: 1, color: "#188df0" },
  70. ])
  71. },
  72. emphasis: {
  73. itemStyle: {
  74. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  75. { offset: 0, color: "#2378f7" },
  76. { offset: 0.7, color: "#2378f7" },
  77. { offset: 1, color: "#83bff6" },
  78. ])
  79. }
  80. }
  81. }],
  82. tooltip: {
  83. show: true,
  84. trigger: 'axis'
  85. }
  86. }
  87. export const taskOption = {
  88. // 图表标题
  89. title: {
  90. show: true,
  91. text: '检测任务情况',
  92. textStyle: {
  93. color: '#fff',
  94. fontSize: 20,
  95. fontWeight: '600'
  96. },
  97. textAlign: 'center',
  98. left: '50%',
  99. top: '20px'
  100. },
  101. xAxis: {
  102. type: 'category',
  103. data: ['委托', '检测', '任务发放', '报告'],
  104. axisTick: {
  105. alignWithLabel: true
  106. },
  107. axisLabel: {
  108. style: {
  109. fill: '#fff'
  110. }
  111. },
  112. axisLine: {
  113. lineStyle: {
  114. color: '#fff'
  115. }
  116. }
  117. },
  118. yAxis: {
  119. type: 'value',
  120. name: '',
  121. nameTextStyle: {
  122. color: '#fff',
  123. fontSize: 14
  124. },
  125. splitLine: {
  126. show: false
  127. },
  128. axisLine: {
  129. lineStyle: {
  130. color: '#fff'
  131. }
  132. }
  133. },
  134. series: [{
  135. type: 'bar',
  136. name: '',
  137. data: [],
  138. barMaxWidth: '35px',
  139. itemStyle: {
  140. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  141. { offset: 0, color: "#83bff6" },
  142. { offset: 0.5, color: "#188df0" },
  143. { offset: 1, color: "#188df0" },
  144. ])
  145. },
  146. emphasis: {
  147. itemStyle: {
  148. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  149. { offset: 0, color: "#2378f7" },
  150. { offset: 0.7, color: "#2378f7" },
  151. { offset: 1, color: "#83bff6" },
  152. ])
  153. }
  154. }
  155. }],
  156. tooltip: {
  157. show: true,
  158. trigger: 'axis'
  159. }
  160. }
  161. export const trustOption = {
  162. legend: {
  163. data: [
  164. {
  165. name: '委托',
  166. itemStyle: {
  167. color: '#00baff'
  168. }
  169. },
  170. {
  171. name: '受理',
  172. itemStyle: {
  173. color: '#f5d94e'
  174. }
  175. }
  176. ],
  177. textStyle: {
  178. color: '#fff',
  179. },
  180. bottom: 10
  181. },
  182. title: {
  183. show: true,
  184. text: '检测委托受理量',
  185. textStyle: {
  186. color: '#fff',
  187. fontSize: 20,
  188. fontWeight: '600'
  189. },
  190. textAlign: 'center',
  191. left: '50%',
  192. top: '20px'
  193. },
  194. xAxis: {
  195. type: 'category',
  196. data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
  197. axisTick: {
  198. alignWithLabel: true
  199. },
  200. axisLabel: {
  201. style: {
  202. fill: '#fff'
  203. }
  204. },
  205. axisLine: {
  206. lineStyle: {
  207. color: '#fff'
  208. }
  209. }
  210. },
  211. yAxis: {
  212. type: 'value',
  213. name: '',
  214. nameTextStyle: {
  215. color: '#fff',
  216. fontSize: 14
  217. },
  218. splitLine: {
  219. show: false
  220. },
  221. axisLabel: {
  222. style: {
  223. fill: '#fff'
  224. }
  225. },
  226. axisLine: {
  227. lineStyle: {
  228. color: '#fff'
  229. }
  230. }
  231. },
  232. series: [
  233. {
  234. type: 'bar',
  235. name: '委托',
  236. data: [],
  237. barMaxWidth: '35px',
  238. barStyle: {
  239. fill: 'rgba(0, 186, 255, 0.4)'
  240. },
  241. itemStyle: {
  242. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  243. { offset: 0, color: "#83bff6" },
  244. { offset: 0.5, color: "#188df0" },
  245. { offset: 1, color: "#188df0" },
  246. ])
  247. },
  248. emphasis: {
  249. itemStyle: {
  250. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  251. { offset: 0, color: "#2378f7" },
  252. { offset: 0.7, color: "#2378f7" },
  253. { offset: 1, color: "#83bff6" },
  254. ])
  255. }
  256. }
  257. },
  258. {
  259. type: 'line',
  260. name: '受理',
  261. data: [],
  262. symbol: 'circle',
  263. symbolSize: 10,
  264. lineArea: {
  265. show: true,
  266. gradient: ['rgba(245, 217, 79, 0.8)', 'rgba(245, 217, 79, 0.2)']
  267. },
  268. itemStyle: {
  269. color: '#f5d94e'
  270. }
  271. }
  272. ],
  273. tooltip: {
  274. show: true,
  275. trigger: 'axis'
  276. }
  277. }
  278. export const sampleOption = {
  279. title: {
  280. show: true,
  281. text: '样品受理情况',
  282. textStyle: {
  283. color: '#fff',
  284. fontSize: 20,
  285. fontWeight: '600'
  286. },
  287. textAlign: 'center',
  288. left: '50%',
  289. top: '20px'
  290. },
  291. xAxis: {
  292. type: 'category',
  293. data: ['已委托未收样', '已收样', '已收不合格', '留样'],
  294. axisTick: {
  295. alignWithLabel: true
  296. },
  297. axisLabel: {
  298. style: {
  299. fill: '#fff'
  300. }
  301. },
  302. axisLine: {
  303. lineStyle: {
  304. color: '#fff'
  305. }
  306. }
  307. },
  308. yAxis: {
  309. type: 'value',
  310. name: '',
  311. nameTextStyle: {
  312. color: '#fff',
  313. fontSize: 14
  314. },
  315. splitLine: {
  316. show: false
  317. },
  318. axisLine: {
  319. lineStyle: {
  320. color: '#fff'
  321. }
  322. }
  323. },
  324. series: [{
  325. type: 'bar',
  326. name: '',
  327. data: [],
  328. barMaxWidth: '35px',
  329. itemStyle: {
  330. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  331. { offset: 0, color: "#83bff6" },
  332. { offset: 0.5, color: "#188df0" },
  333. { offset: 1, color: "#188df0" },
  334. ])
  335. },
  336. emphasis: {
  337. itemStyle: {
  338. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  339. { offset: 0, color: "#2378f7" },
  340. { offset: 0.7, color: "#2378f7" },
  341. { offset: 1, color: "#83bff6" },
  342. ])
  343. }
  344. }
  345. }],
  346. tooltip: {
  347. show: true,
  348. trigger: 'axis'
  349. }
  350. }
  351. export const monthOption = {
  352. legend: {
  353. data: [
  354. {
  355. name: '任务总数',
  356. itemStyle: {
  357. color: '#00baff'
  358. }
  359. },
  360. {
  361. name: '已完成',
  362. itemStyle: {
  363. color: '#f5d94e'
  364. }
  365. }
  366. ],
  367. textStyle: {
  368. color: '#fff',
  369. },
  370. bottom: 10
  371. },
  372. title: {
  373. show: true,
  374. text: '检测任务月度完成量',
  375. textStyle: {
  376. color: '#fff',
  377. fontSize: 20,
  378. fontWeight: '600'
  379. },
  380. textAlign: 'center',
  381. left: '50%',
  382. top: '20px'
  383. },
  384. xAxis: {
  385. type: 'category',
  386. data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
  387. axisTick: {
  388. alignWithLabel: true
  389. },
  390. axisLabel: {
  391. style: {
  392. fill: '#fff'
  393. }
  394. },
  395. axisLine: {
  396. lineStyle: {
  397. color: '#fff'
  398. }
  399. }
  400. },
  401. yAxis: {
  402. type: 'value',
  403. name: '',
  404. nameTextStyle: {
  405. color: '#fff',
  406. fontSize: 14
  407. },
  408. splitLine: {
  409. show: false
  410. },
  411. axisLabel: {
  412. style: {
  413. fill: '#fff'
  414. }
  415. },
  416. axisLine: {
  417. lineStyle: {
  418. color: '#fff'
  419. }
  420. }
  421. },
  422. series: [
  423. {
  424. type: 'bar',
  425. name: '任务总数',
  426. data: [],
  427. barMaxWidth: '35px',
  428. barStyle: {
  429. fill: 'rgba(0, 186, 255, 0.4)'
  430. },
  431. itemStyle: {
  432. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  433. { offset: 0, color: "#83bff6" },
  434. { offset: 0.5, color: "#188df0" },
  435. { offset: 1, color: "#188df0" },
  436. ])
  437. },
  438. emphasis: {
  439. itemStyle: {
  440. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  441. { offset: 0, color: "#2378f7" },
  442. { offset: 0.7, color: "#2378f7" },
  443. { offset: 1, color: "#83bff6" },
  444. ])
  445. }
  446. }
  447. },
  448. {
  449. type: 'line',
  450. name: '已完成',
  451. data: [],
  452. symbol: 'circle',
  453. symbolSize: 10,
  454. lineArea: {
  455. show: true,
  456. gradient: ['rgba(245, 217, 79, 0.8)', 'rgba(245, 217, 79, 0.2)']
  457. },
  458. itemStyle: {
  459. color: '#f5d94e'
  460. }
  461. }
  462. ],
  463. tooltip: {
  464. show: true,
  465. trigger: 'axis'
  466. }
  467. }
  468. export const yearOption = {
  469. title: {
  470. show: true,
  471. text: '检测任务年度完成量',
  472. textStyle: {
  473. color: '#fff',
  474. fontSize: 20,
  475. fontWeight: '600'
  476. },
  477. textAlign: 'center',
  478. left: '50%',
  479. top: '20px'
  480. },
  481. legend: {
  482. orient: 'horizontal',
  483. show: true,
  484. left: 'center',
  485. bottom: 10,
  486. z: 3,
  487. itemWidth: 25,
  488. itemHeight: 14,
  489. itemGap: 10,
  490. data: [
  491. {
  492. name: '未完成',
  493. textStyle: {
  494. color: '#00baff'
  495. }
  496. },
  497. {
  498. name: '已完成',
  499. textStyle: {
  500. color: '#f5d94e'
  501. }
  502. }
  503. ]
  504. },
  505. series: [
  506. {
  507. name: '任务完成情况',
  508. type: 'pie',
  509. radius: '55%',
  510. center: ['50%', '50%'],
  511. data: [],
  512. itemStyle: {
  513. emphasis: {
  514. shadowBlur: 10,
  515. shadowOffsetX: 0,
  516. shadowColor: 'rgba(0, 0, 0, 0.5)'
  517. },
  518. normal: {
  519. label: {
  520. show: true,
  521. position: 'outer',
  522. // formatter: '{d}%'
  523. formatter: `占比:{d}%\n\n\r{b}:{c}`,
  524. // formatter: `{b}:{c}\n\n\r占比:{d}%`,
  525. fontSize: 12,
  526. // padding: [0, 5]
  527. },
  528. labelLine: {
  529. show: true
  530. }
  531. }
  532. }
  533. }
  534. ],
  535. color: ['#00baff', '#f5d94e'],
  536. tooltip: {
  537. show: true,
  538. trigger: 'item',
  539. formatter: '任务情况<br/>{b}:{c}<br/>占比:{d}%'
  540. }
  541. }