index.js 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. export const setTopOptions = {
  2. legend: {
  3. data: ['任务航材保障良好率', '装备完好率', '非任务携行航材利用率', '任务携行航材利用率'],
  4. textStyle: {
  5. fontSize: 13,
  6. color: '#fff'
  7. }
  8. },
  9. tooltip: {
  10. trigger: 'axis',
  11. axisPointer: {
  12. type: 'shadow'
  13. }
  14. },
  15. grid: {
  16. top: '15%',
  17. left: '5%',
  18. right: '5%',
  19. bottom: '0%',
  20. containLabel: true
  21. },
  22. xAxis: [
  23. {
  24. type: 'category',
  25. axisTick: { show: false },
  26. data: [],
  27. axisLine: {
  28. lineStyle: {
  29. color: '#fff'
  30. }
  31. },
  32. axisLabel: {
  33. fontSize: 13,
  34. rotate: 45
  35. },
  36. triggerEvent: true
  37. }
  38. ],
  39. yAxis: [
  40. {
  41. type: 'value',
  42. axisLabel: { formatter: '{value} %', fontSize: 13 },
  43. axisLine: {
  44. lineStyle: {
  45. color: '#fff'
  46. }
  47. }
  48. }
  49. ],
  50. series: [
  51. {
  52. name: '任务航材保障良好率',
  53. type: 'bar',
  54. maxBarWidth: 25,
  55. minBarWidth: 10,
  56. tooltip: {
  57. valueFormatter: function (value) {
  58. return value + '%'
  59. }
  60. },
  61. data: []
  62. },
  63. {
  64. name: '装备完好率',
  65. type: 'bar',
  66. maxBarWidth: 25,
  67. minBarWidth: 10,
  68. tooltip: {
  69. valueFormatter: function (value) {
  70. return value + '%'
  71. }
  72. },
  73. data: []
  74. },
  75. {
  76. name: '非任务携行航材利用率',
  77. type: 'bar',
  78. maxBarWidth: 25,
  79. minBarWidth: 10,
  80. tooltip: {
  81. valueFormatter: function (value) {
  82. return value + '%'
  83. }
  84. },
  85. data: []
  86. },
  87. {
  88. name: '任务携行航材利用率',
  89. type: 'bar',
  90. maxBarWidth: 25,
  91. minBarWidth: 10,
  92. tooltip: {
  93. valueFormatter: function (value) {
  94. return value + '%'
  95. }
  96. },
  97. data: []
  98. }
  99. ]
  100. }
  101. export const bottomLeftOptions = {
  102. legend: {
  103. data: ['非任务携行航材利用率', '任务携行航材利用率'],
  104. textStyle: {
  105. fontSize: 13,
  106. color: '#fff'
  107. }
  108. },
  109. tooltip: {
  110. trigger: 'axis',
  111. axisPointer: {
  112. type: 'shadow'
  113. }
  114. },
  115. grid: {
  116. left: '5%',
  117. right: '5%',
  118. bottom: '15%',
  119. containLabel: true
  120. },
  121. xAxis: [
  122. {
  123. type: 'category',
  124. axisTick: { show: false },
  125. data: [],
  126. axisLine: {
  127. lineStyle: {
  128. color: '#fff'
  129. }
  130. },
  131. axisLabel: {
  132. fontSize: 13,
  133. rotate: 45
  134. },
  135. triggerEvent: true
  136. }
  137. ],
  138. yAxis: [
  139. {
  140. type: 'value',
  141. axisLabel: { formatter: '{value} %', fontSize: 13 },
  142. axisLine: {
  143. lineStyle: {
  144. color: '#fff'
  145. }
  146. }
  147. }
  148. ],
  149. series: [
  150. {
  151. name: '非任务携行航材利用率',
  152. type: 'bar',
  153. maxBarWidth: 25,
  154. minBarWidth: 10,
  155. tooltip: {
  156. valueFormatter: function (value) {
  157. return value + '%'
  158. }
  159. },
  160. data: []
  161. },
  162. {
  163. name: '任务携行航材利用率',
  164. type: 'bar',
  165. maxBarWidth: 25,
  166. minBarWidth: 10,
  167. tooltip: {
  168. valueFormatter: function (value) {
  169. return value + '%'
  170. }
  171. },
  172. data: []
  173. }
  174. ]
  175. }
  176. export const bottomCenterOptions = {
  177. legend: {
  178. data: ['非任务携行航材利用率', '任务携行航材利用率'],
  179. textStyle: {
  180. fontSize: 13,
  181. color: '#fff'
  182. }
  183. },
  184. tooltip: {
  185. trigger: 'axis',
  186. axisPointer: {
  187. type: 'shadow'
  188. }
  189. },
  190. grid: {
  191. left: '5%',
  192. right: '5%',
  193. bottom: '10%',
  194. containLabel: true
  195. },
  196. xAxis: [
  197. {
  198. type: 'category',
  199. axisTick: { show: false },
  200. data: [],
  201. axisLine: {
  202. lineStyle: {
  203. color: '#fff'
  204. }
  205. },
  206. axisLabel: {
  207. fontSize: 13,
  208. rotate: 45
  209. },
  210. triggerEvent: true
  211. }
  212. ],
  213. yAxis: [
  214. {
  215. type: 'value',
  216. axisLabel: { formatter: '{value} %', fontSize: 13 },
  217. axisLine: {
  218. lineStyle: {
  219. color: '#fff'
  220. }
  221. }
  222. }
  223. ],
  224. series: [
  225. {
  226. name: '非任务携行航材利用率',
  227. type: 'bar',
  228. maxBarWidth: 25,
  229. minBarWidth: 10,
  230. tooltip: {
  231. valueFormatter: function (value) {
  232. return value + '%'
  233. }
  234. },
  235. data: []
  236. },
  237. {
  238. name: '任务携行航材利用率',
  239. type: 'bar',
  240. maxBarWidth: 25,
  241. minBarWidth: 10,
  242. tooltip: {
  243. valueFormatter: function (value) {
  244. return value + '%'
  245. }
  246. },
  247. data: []
  248. }
  249. ]
  250. }
  251. export const bottomRightOptions = {
  252. legend: {
  253. data: ['非任务携行航材利用率', '任务携行航材利用率'],
  254. textStyle: {
  255. fontSize: 13,
  256. color: '#fff'
  257. }
  258. },
  259. tooltip: {
  260. trigger: 'axis',
  261. axisPointer: {
  262. type: 'shadow'
  263. }
  264. },
  265. grid: {
  266. left: '5%',
  267. right: '5%',
  268. bottom: '10%',
  269. containLabel: true
  270. },
  271. xAxis: [
  272. {
  273. type: 'category',
  274. axisTick: { show: false },
  275. data: [],
  276. axisLine: {
  277. lineStyle: {
  278. color: '#fff'
  279. }
  280. },
  281. axisLabel: {
  282. fontSize: 13,
  283. rotate: 45
  284. },
  285. triggerEvent: true
  286. }
  287. ],
  288. yAxis: [
  289. {
  290. type: 'value',
  291. axisLabel: { formatter: '{value} %', fontSize: 13 },
  292. axisLine: {
  293. lineStyle: {
  294. color: '#fff'
  295. }
  296. }
  297. }
  298. ],
  299. series: [
  300. {
  301. name: '非任务携行航材利用率',
  302. type: 'bar',
  303. maxBarWidth: 25,
  304. minBarWidth: 10,
  305. tooltip: {
  306. valueFormatter: function (value) {
  307. return value + '%'
  308. }
  309. },
  310. data: []
  311. },
  312. {
  313. name: '任务携行航材利用率',
  314. type: 'bar',
  315. maxBarWidth: 25,
  316. minBarWidth: 10,
  317. tooltip: {
  318. valueFormatter: function (value) {
  319. return value + '%'
  320. }
  321. },
  322. data: []
  323. }
  324. ]
  325. }
  326. const handleModelData = (a) => {
  327. if (a == '全部') return [16, 56, 78]
  328. if (a == '大灯') return [89, 12, 36]
  329. if (a == '雾灯') return [15, 65, 11]
  330. if (a == '煤油') return [15, 65, 11]
  331. if (a == '飞机发动机') return [15, 65, 11]
  332. }