config.js 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. const title = '高德地图'
  2. // 右侧配置项
  3. const setting = [
  4. {
  5. label: '语言类型',
  6. // 设置组件类型, select / input / colorPicker
  7. type: 'select',
  8. // 字段
  9. field: 'customize_lang',
  10. optionField: 'customize.lang', // 对应options中的字段
  11. // 是否多选
  12. multiple: false,
  13. options: [
  14. {
  15. label: '中文简称',
  16. value: 'zh_cn'
  17. },
  18. {
  19. label: '英文',
  20. value: 'en'
  21. },
  22. {
  23. label: '中英文对照',
  24. value: 'zh_en'
  25. }
  26. ],
  27. // 绑定的值
  28. value: 'zh_cn',
  29. // tab页。 data: 数据, custom: 自定义
  30. tabName: 'custom'
  31. },
  32. {
  33. label: 'Key',
  34. // 设置组件类型, select / input / colorPicker
  35. type: 'input',
  36. // 字段
  37. field: 'customize_mapKey',
  38. // 高德地图的key
  39. optionField: 'customize.mapKey', // 对应options中的字段
  40. // 是否多选
  41. multiple: false,
  42. // 绑定的值
  43. value: '1b0a1423b70bbcbc20c9c87327e5e94e',
  44. // tab页。 data: 数据, custom: 自定义
  45. tabName: 'custom'
  46. },
  47. {
  48. label: '主题',
  49. // 设置组件类型, select / input / colorPicker
  50. type: 'select',
  51. // 字段
  52. field: 'customize_mapStyle',
  53. optionField: 'customize.mapStyle', // 对应options中的字段
  54. options: [
  55. {
  56. label: '标准',
  57. value: 'normal'
  58. },
  59. {
  60. label: '幻影黑',
  61. value: 'dark'
  62. },
  63. {
  64. label: '月光银',
  65. value: 'light'
  66. },
  67. {
  68. label: '远山黛',
  69. value: 'whitesmoke'
  70. },
  71. {
  72. label: '草色青',
  73. value: 'fresh'
  74. },
  75. {
  76. label: '雅士灰',
  77. value: 'grey'
  78. },
  79. {
  80. label: '涂鸦',
  81. value: 'graffiti'
  82. },
  83. {
  84. label: '马卡龙',
  85. value: 'macaron'
  86. },
  87. {
  88. label: '靛青蓝',
  89. value: 'blue'
  90. },
  91. {
  92. label: '极夜黑',
  93. value: 'darkblue'
  94. },
  95. {
  96. label: '酱籽',
  97. value: 'wine'
  98. }
  99. ],
  100. // 是否多选
  101. multiple: false,
  102. // 绑定的值
  103. value: 'normal',
  104. // tab页。 data: 数据, custom: 自定义
  105. tabName: 'custom'
  106. },
  107. {
  108. label: '内容',
  109. // 设置组件类型, select / input / colorPicker
  110. type: 'select',
  111. // 字段
  112. field: 'customize_features',
  113. optionField: 'customize.features', // 对应options中的字段
  114. options: [
  115. {
  116. label: '区域面',
  117. value: 'bg'
  118. },
  119. {
  120. label: '道路',
  121. value: 'road'
  122. },
  123. {
  124. label: '建筑物',
  125. value: 'building'
  126. },
  127. {
  128. label: '标注',
  129. value: 'point'
  130. }
  131. ],
  132. // 是否多选
  133. multiple: true,
  134. // 绑定的值
  135. value: ['bg', 'road', 'building', 'point'],
  136. // tab页。 data: 数据, custom: 自定义
  137. tabName: 'custom'
  138. },
  139. {
  140. label: '经度',
  141. // 设置组件类型, select / input / colorPicker
  142. type: 'inputNumber',
  143. min: 0,
  144. // 字段
  145. field: 'customize_lng',
  146. optionField: 'customize.lng', // 对应options中的字段
  147. // 是否多选
  148. multiple: false,
  149. // 绑定的值
  150. value: 117.13872961838531,
  151. // tab页。 data: 数据, custom: 自定义
  152. tabName: 'custom'
  153. },
  154. {
  155. label: '维度',
  156. // 设置组件类型, select / input / colorPicker
  157. type: 'inputNumber',
  158. // 范围
  159. min: 0,
  160. // 字段
  161. field: 'customize_lat',
  162. optionField: 'customize.lat', // 对应options中的字段
  163. // 是否多选
  164. multiple: false,
  165. // 绑定的值
  166. value: 31.826653302438004,
  167. // tab页。 data: 数据, custom: 自定义
  168. tabName: 'custom'
  169. },
  170. {
  171. label: '缩放',
  172. // 设置组件类型, select / input / colorPicker
  173. type: 'inputNumber',
  174. // 范围
  175. min: 3,
  176. max: 18,
  177. // 字段
  178. field: 'customize_zoom',
  179. optionField: 'customize.zoom', // 对应options中的字段
  180. // 是否多选
  181. multiple: false,
  182. // 绑定的值
  183. value: 16,
  184. // tab页。 data: 数据, custom: 自定义
  185. tabName: 'custom'
  186. },
  187. {
  188. label: '模式',
  189. // 设置组件类型, select / input / colorPicker
  190. type: 'select',
  191. options: [
  192. {
  193. label: '2D',
  194. value: '2D'
  195. },
  196. {
  197. label: '3D',
  198. value: '3D'
  199. }
  200. ],
  201. // 字段
  202. field: 'customize_viewMode',
  203. optionField: 'customize.viewMode', // 对应options中的字段
  204. // 是否多选
  205. multiple: false,
  206. // 绑定的值
  207. value: '2D',
  208. // tab页。 data: 数据, custom: 自定义
  209. tabName: 'custom'
  210. },
  211. {
  212. label: '标记内容',
  213. // 设置组件类型, select / input / colorPicker
  214. type: 'input',
  215. // 字段
  216. field: 'customize_markerSpan',
  217. optionField: 'customize.markerSpan', // 对应options中的字段
  218. // 是否多选
  219. multiple: false,
  220. // 绑定的值
  221. value: '科大国创软件股份有限公司',
  222. // tab页。 data: 数据, custom: 自定义
  223. tabName: 'custom'
  224. },
  225. {
  226. label: '标记点经度',
  227. // 设置组件类型, select / input / colorPicker
  228. type: 'inputNumber',
  229. min: 0,
  230. // 字段
  231. field: 'customize_markerLng',
  232. optionField: 'customize.markerLng', // 对应options中的字段
  233. // 是否多选
  234. multiple: false,
  235. // 绑定的值
  236. value: 117.13872961838531,
  237. // tab页。 data: 数据, custom: 自定义
  238. tabName: 'custom'
  239. },
  240. {
  241. label: '标记点维度',
  242. // 设置组件类型, select / input / colorPicker
  243. type: 'inputNumber',
  244. // 字段
  245. field: 'customize_markerLat',
  246. optionField: 'customize.markerLat', // 对应options中的字段
  247. // 是否多选
  248. multiple: false,
  249. // 绑定的值
  250. value: 31.826653302438004,
  251. // tab页。 data: 数据, custom: 自定义
  252. tabName: 'custom'
  253. }
  254. ]
  255. // 模拟数据
  256. const option = {
  257. // 自定义组件其他属性
  258. customize: {
  259. lang: 'zh_cn',
  260. mapKey: '1b0a1423b70bbcbc20c9c87327e5e94e',
  261. mapStyle: 'normal',
  262. features: ['bg', 'road', 'building', 'point'],
  263. lng: 117.13872961838531,
  264. lat: 31.826653302438004,
  265. zoom: 17,
  266. markerSpan: '科大国创软件股份有限公司',
  267. markerLng: 117.13872961838531,
  268. markerLat: 31.826653302438004
  269. }
  270. }
  271. export default {
  272. title,
  273. setting,
  274. option: {
  275. ...option,
  276. displayOption: {
  277. dataAllocation: {
  278. enable: false
  279. }
  280. }
  281. }
  282. }