data.js 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. export const repaireOptions = [
  2. {
  3. title: '巡点检工单',
  4. imgUrl: require('../../assets/vector.png'),
  5. total: 0,
  6. num: 0
  7. },
  8. {
  9. title: '保养工单',
  10. imgUrl: require('../../assets/vector.png'),
  11. total: 0,
  12. num: 0
  13. },
  14. {
  15. title: '维修工单',
  16. imgUrl: require('../../assets/vector.png'),
  17. total: 0,
  18. num: 0
  19. }
  20. ]
  21. export const statusList = [
  22. {
  23. title: '运行',
  24. titleUrl: require('../../assets/title3.png'),
  25. numUrl: require('../../assets/num3.png'),
  26. color: '#07AF2E ',
  27. num: 0,
  28. code:'runNumber',
  29. },
  30. {
  31. title: '维修',
  32. color: '#9F9F9F',
  33. titleUrl: require('../../assets/title1.png'),
  34. numUrl: require('../../assets/num1.png'),
  35. code:'repairNumber',
  36. num: 0
  37. },
  38. {
  39. title: '故障',
  40. color: '#C14E4D ',
  41. titleUrl: require('../../assets/title2.png'),
  42. numUrl: require('../../assets/num2.png'),
  43. code:'faultNumber',
  44. num: 0
  45. },
  46. {
  47. title: '停机',
  48. color: '#F4C15E',
  49. titleUrl: require('../../assets/title4.png'),
  50. numUrl: require('../../assets/num4.png'),
  51. code:'shutdownNumber',
  52. num: 0
  53. }
  54. ]
  55. export const rankList = [
  56. {
  57. label: '排名',
  58. prop: 'rank',
  59. width: '20%',
  60. },
  61. {
  62. prop: 'name',
  63. label: '备品备件名称',
  64. width: '50%',
  65. },
  66. {
  67. prop: 'num',
  68. label: '消耗数量',
  69. width: '30%',
  70. },
  71. ];
  72. export const planList = [
  73. {
  74. label: '类型',
  75. prop: 'type',
  76. width: '13%',
  77. },
  78. {
  79. prop: 'code',
  80. label: '编码',
  81. width: '30%',
  82. },
  83. {
  84. prop: 'title',
  85. label: '标题',
  86. width: '30%',
  87. },
  88. {
  89. prop: 'userName',
  90. label: '申请人',
  91. width: '17%',
  92. },
  93. {
  94. prop: 'action',
  95. label: '操作',
  96. width: '10%',
  97. },
  98. ];
  99. export const barOption = (data, itemStyle = {}) => {
  100. return {
  101. tooltip: {
  102. formatter: '{b}:{c}' + '个',
  103. trigger: 'item'
  104. },
  105. color: ['#398f4e',],
  106. xAxis: {
  107. type: 'category',
  108. data: data.map(item => item.name),
  109. axisLabel: {
  110. fontSize: window.innerHeight * 0.012,
  111. }
  112. },
  113. yAxis: {
  114. type: 'value',
  115. name: '(个)',
  116. nameTextStyle: {
  117. align: 'center',
  118. color: "#333",
  119. fontSize: window.innerHeight * 0.012,
  120. padding: [0, 20, -3, 0]
  121. },
  122. },
  123. series: [
  124. {
  125. // showBackground: true,
  126. barWidth: '20%',
  127. data: data.map(item => item.value),
  128. type: 'bar',
  129. itemStyle
  130. }
  131. ]
  132. }
  133. }
  134. export const pieOption = (data) => {
  135. return {
  136. color: ['#398f4e', '#458ef7', '#fdc537', '#fe6869', '#975fe6'],
  137. tooltip: {
  138. formatter: '{b}:{c}' + '%',
  139. trigger: 'item'
  140. },
  141. legend: {
  142. orient: 'vertical',
  143. // left: 'center',
  144. right: '15%',
  145. top: '10%',
  146. itemGap: window.innerHeight * 0.014,
  147. textStyle: {
  148. fontSize: window.innerHeight * 0.013,
  149. }
  150. },
  151. series: [
  152. {
  153. center: ['30%', '50%'],
  154. label: {
  155. position: 'inside',
  156. // show: true,
  157. formatter: '{c}' + '%',
  158. fontSize: window.innerHeight * 0.013,
  159. color: "#fff"
  160. },
  161. labelLine: {
  162. show: false
  163. },
  164. type: 'pie',
  165. radius: '85%',
  166. itemStyle: {
  167. borderWidth: 0,
  168. shadowBlur: 10,
  169. shadowColor: 'rgba(0, 0, 0, 0.5)'
  170. },
  171. data
  172. }
  173. ]
  174. }
  175. }
  176. export const pieOption1 = (data) => {
  177. return {
  178. // color: ['#398f4e', '#458ef7', '#fdc537', '#fe6869', '#975fe6'],
  179. tooltip: {
  180. formatter: '{b}:{c}' + '%',
  181. trigger: 'item'
  182. },
  183. legend: {
  184. orient: 'horizontal',
  185. left: 'right',
  186. right: '15%',
  187. bottom: '5%',
  188. itemGap: window.innerHeight * 0.014,
  189. textStyle: {
  190. fontSize: window.innerHeight * 0.013,
  191. }
  192. },
  193. series: [
  194. {
  195. center: ['62%', '45%'],
  196. label: {
  197. position: 'outside',
  198. show: true,
  199. formatter: (item) => {
  200. return item.name + ":" + item.value + '%'
  201. },
  202. fontSize: window.innerHeight * 0.0125,
  203. color: "#333"
  204. },
  205. labelLine: {
  206. show: true
  207. },
  208. type: 'pie',
  209. radius: ['39%', '55%'],
  210. itemStyle: {
  211. borderWidth: 0,
  212. shadowBlur: 10,
  213. shadowColor: 'rgba(0, 0, 0, 0.5)'
  214. },
  215. data
  216. }
  217. ]
  218. }
  219. }
  220. export const lineOption = (data) => {
  221. return {
  222. tooltip: {
  223. formatter: (item) => {
  224. return item.name + ' ' + item.seriesName + ":" + item.value + '万元'
  225. },
  226. trigger: 'item'
  227. },
  228. legend: {
  229. // bottom: '2%',
  230. itemGap: window.innerHeight * 0.014,
  231. textStyle: {
  232. fontSize: window.innerHeight * 0.013,
  233. }
  234. },
  235. xAxis: {
  236. type: 'category',
  237. axisLabel: {
  238. fontSize: window.innerHeight * 0.012,
  239. },
  240. data: [2020, 2021, 2022, 2023, 2024]
  241. },
  242. yAxis: {
  243. type: 'value'
  244. },
  245. series: [
  246. {
  247. name: '班组一',
  248. data: [40, 45, 36, 45, 56],
  249. type: 'line'
  250. }, {
  251. name: '班组二',
  252. data: [32, 33, 43, 56, 46],
  253. type: 'line'
  254. }, {
  255. name: '班组三',
  256. data: [47, 43, 41, 65, 36],
  257. type: 'line'
  258. }, {
  259. name: '班组四',
  260. data: [51, 56, 39, 54, 41],
  261. type: 'line'
  262. }
  263. ]
  264. }
  265. }