config.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. export default {
  2. colors: ["rgba(245, 166, 35, 1)", "rgba(19, 173, 255, 1)", '#9689FF', '#FF8A26', '#5FB878', '#73c0de',
  3. '#4ED33C',
  4. '#FF5252', '#01AAED', '#FF5722',
  5. '#6648FF', '#2A8BFD', '#BAFF7F', '#00FAC1', '#00CAFF', '#FDE056', 'rgba(245, 166, 35, 1)',
  6. '#fac858', '#ee6666', '#91cc75', '#38cafb', '#4caff9', '#4adeca', '#2aa7ee', '#0270f2', '#488cf7'
  7. ],
  8. bmapstyle: {
  9. styleJson: [{
  10. featureType: "water",
  11. elementType: "all",
  12. stylers: {
  13. color: "#021019"
  14. }
  15. },
  16. {
  17. featureType: "highway",
  18. elementType: "geometry.fill",
  19. stylers: {
  20. color: "#000000"
  21. }
  22. },
  23. {
  24. featureType: "highway",
  25. elementType: "geometry.stroke",
  26. stylers: {
  27. color: "#147a92"
  28. }
  29. },
  30. {
  31. featureType: "arterial",
  32. elementType: "geometry.fill",
  33. stylers: {
  34. color: "#000000"
  35. }
  36. },
  37. {
  38. featureType: "arterial",
  39. elementType: "geometry.stroke",
  40. stylers: {
  41. color: "#0b3d51"
  42. }
  43. },
  44. {
  45. featureType: "local",
  46. elementType: "geometry",
  47. stylers: {
  48. color: "#000000"
  49. }
  50. },
  51. {
  52. featureType: "land",
  53. elementType: "all",
  54. stylers: {
  55. color: "#08304b"
  56. }
  57. },
  58. {
  59. featureType: "railway",
  60. elementType: "geometry.fill",
  61. stylers: {
  62. color: "#000000"
  63. }
  64. },
  65. {
  66. featureType: "railway",
  67. elementType: "geometry.stroke",
  68. stylers: {
  69. color: "#08304b"
  70. }
  71. },
  72. {
  73. featureType: "subway",
  74. elementType: "geometry",
  75. stylers: {
  76. lightness: -70
  77. }
  78. },
  79. {
  80. featureType: "building",
  81. elementType: "geometry.fill",
  82. stylers: {
  83. color: "#000000"
  84. }
  85. },
  86. {
  87. featureType: "all",
  88. elementType: "labels.text.fill",
  89. stylers: {
  90. color: "#857f7f"
  91. }
  92. },
  93. {
  94. featureType: "all",
  95. elementType: "labels.text.stroke",
  96. stylers: {
  97. color: "#000000"
  98. }
  99. },
  100. {
  101. featureType: "building",
  102. elementType: "geometry",
  103. stylers: {
  104. color: "#022338"
  105. }
  106. },
  107. {
  108. featureType: "green",
  109. elementType: "geometry",
  110. stylers: {
  111. color: "#062032"
  112. }
  113. },
  114. {
  115. featureType: "boundary",
  116. elementType: "all",
  117. stylers: {
  118. color: "#1e1c1c"
  119. }
  120. },
  121. {
  122. featureType: "manmade",
  123. elementType: "geometry",
  124. stylers: {
  125. color: "#022338"
  126. }
  127. },
  128. {
  129. featureType: "poi",
  130. elementType: "all",
  131. stylers: {
  132. visibility: "off"
  133. }
  134. },
  135. {
  136. featureType: "all",
  137. elementType: "labels.icon",
  138. stylers: {
  139. visibility: "off"
  140. }
  141. },
  142. {
  143. featureType: "all",
  144. elementType: "labels.text.fill",
  145. stylers: {
  146. color: "#2da0c6",
  147. visibility: "on"
  148. }
  149. },
  150. {
  151. featureType: "background",
  152. elementType: "all",
  153. stylers: {
  154. color: "#200000"
  155. }
  156. }
  157. ]
  158. },
  159. defaultconfig: [{
  160. key: 'theme',
  161. value: 'dark',
  162. label: '界面主题',
  163. type: 'select',
  164. required: true,
  165. options: [{
  166. value: 'dark',
  167. label: '深色主题'
  168. }, {
  169. value: 'red',
  170. label: '紅色主题'
  171. }]
  172. }, {
  173. key: 'refreshtime',
  174. value: 10 * 1000,
  175. label: '刷新时间',
  176. type: 'number',
  177. required: true
  178. }, {
  179. key: 'turntime',
  180. value: 20 * 1000,
  181. label: '切换时间',
  182. type: 'select',
  183. required: true,
  184. options: [{
  185. value: 20 * 1000,
  186. label: '20秒'
  187. }, {
  188. value: 60 * 1000,
  189. label: '1分钟'
  190. }, {
  191. value: 2 * 60 * 1000,
  192. label: '2分钟'
  193. }, {
  194. value: 5 * 60 * 1000,
  195. label: '5分钟'
  196. }]
  197. }, {
  198. key: 'serverurl',
  199. value: '/',
  200. label: '接口地址',
  201. type: 'text',
  202. required: true
  203. }],
  204. /**
  205. * 获取系统配置
  206. */
  207. getConfig: function() {
  208. var config = localStorage.getItem("config");
  209. if (!config) {
  210. config = this.defaultconfig;
  211. } else {
  212. config = JSON.parse(config);
  213. }
  214. return config;
  215. }
  216. }