config.js 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. const title = '指标卡'
  2. // 右侧配置项
  3. const setting = [
  4. {
  5. label: '背景色',
  6. // 设置组件类型, select / input / colorPicker
  7. type: 'colorPicker',
  8. // 字段
  9. field: 'customize_bgColor',
  10. optionField: 'customize.bgColor', // 对应options中的字段
  11. // 是否多选
  12. multiple: false,
  13. // 绑定的值
  14. value: '',
  15. // tab页。 data: 数据, custom: 自定义
  16. tabName: 'custom'
  17. },
  18. {
  19. label: '边框颜色',
  20. // 设置组件类型, select / input / colorPicker
  21. type: 'colorPicker',
  22. // 字段
  23. field: 'customize_borderColor',
  24. optionField: 'customize.borderColor', // 对应options中的字段
  25. // 是否多选
  26. multiple: false,
  27. // 绑定的值
  28. value: '',
  29. // tab页。 data: 数据, custom: 自定义
  30. tabName: 'custom'
  31. },
  32. {
  33. label: '边框粗细',
  34. // 设置组件类型, select / input / colorPicker
  35. type: 'inputNumber',
  36. // 字段
  37. field: 'customize_borderWidth',
  38. optionField: 'customize.borderWidth', // 对应options中的字段
  39. // 是否多选
  40. multiple: false,
  41. // 绑定的值
  42. value: 0,
  43. // tab页。 data: 数据, custom: 自定义
  44. tabName: 'custom'
  45. },
  46. {
  47. label: '边框圆角',
  48. // 设置组件类型, select / input / colorPicker
  49. type: 'inputNumber',
  50. // 字段
  51. field: 'customize_borderRadius',
  52. optionField: 'customize.borderRadius', // 对应options中的字段
  53. // 是否多选
  54. multiple: false,
  55. // 绑定的值
  56. value: 0,
  57. // tab页。 data: 数据, custom: 自定义
  58. tabName: 'custom'
  59. },
  60. {
  61. label: '图标链接',
  62. // 设置组件类型, select / input / colorPicker
  63. type: 'input',
  64. // 字段
  65. field: 'customize_src',
  66. optionField: 'customize.src', // 对应options中的字段
  67. // 是否多选
  68. multiple: false,
  69. // 绑定的值
  70. value: 'http://60.174.249.206:11080/upload/webDesign/uiSucai/dir/icon/icon_top6.png',
  71. // tab页。 data: 数据, custom: 自定义
  72. tabName: 'custom'
  73. },
  74. {
  75. label: '左右间距',
  76. // 设置组件类型, select / input / colorPicker
  77. type: 'inputNumber',
  78. // 字段
  79. field: 'customize_distance',
  80. optionField: 'customize.distance', // 对应options中的字段
  81. // 是否多选
  82. multiple: false,
  83. // 绑定的值
  84. value: 30,
  85. // tab页。 data: 数据, custom: 自定义
  86. tabName: 'custom'
  87. },
  88. {
  89. label: '上下间距',
  90. // 设置组件类型, select / input / colorPicker
  91. type: 'inputNumber',
  92. // 字段
  93. field: 'customize_lineDistance',
  94. optionField: 'customize.lineDistance', // 对应options中的字段
  95. // 是否多选
  96. multiple: false,
  97. // 绑定的值
  98. value: 25,
  99. // tab页。 data: 数据, custom: 自定义
  100. tabName: 'custom'
  101. },
  102. {
  103. label: '图标大小',
  104. // 设置组件类型, select / input / colorPicker
  105. type: 'inputNumber',
  106. // 字段
  107. field: 'customize_imgSize',
  108. optionField: 'customize.imgSize', // 对应options中的字段
  109. // 是否多选
  110. multiple: false,
  111. // 绑定的值
  112. value: 110,
  113. // tab页。 data: 数据, custom: 自定义
  114. tabName: 'custom'
  115. },
  116. {
  117. label: '首行字段',
  118. // 设置组件类型, select / input / colorPicker
  119. type: 'select',
  120. // 字段
  121. field: 'yField', // 字段
  122. optionField: 'yField', // 对应options中的字段
  123. // 是否多选
  124. multiple: false,
  125. // 绑定的值
  126. value: '',
  127. // tab页。 data: 数据, custom: 自定义
  128. tabName: 'data'
  129. },
  130. {
  131. label: '首行文字大小',
  132. // 设置组件类型, select / input / colorPicker
  133. type: 'inputNumber',
  134. // 字段
  135. field: 'customize_firstSize',
  136. optionField: 'customize.firstSize', // 对应options中的字段
  137. // 是否多选
  138. multiple: false,
  139. // 绑定的值
  140. value: 50,
  141. // tab页。 data: 数据, custom: 自定义
  142. tabName: 'custom'
  143. },
  144. {
  145. label: '首行字体颜色',
  146. // 设置组件类型, select / input / colorPicker
  147. type: 'colorPicker',
  148. // 字段
  149. field: 'customize_firstColor',
  150. optionField: 'customize.firstColor', // 对应options中的字段
  151. // 是否多选
  152. multiple: false,
  153. // 绑定的值
  154. value: '#fff',
  155. // tab页。 data: 数据, custom: 自定义
  156. tabName: 'custom'
  157. },
  158. {
  159. label: '首行字体粗细',
  160. // 设置组件类型, select / input / colorPicker
  161. type: 'inputNumber',
  162. // 字段
  163. field: 'customize_firstWeight',
  164. optionField: 'customize.firstWeight', // 对应options中的字段
  165. // 是否多选
  166. multiple: false,
  167. // 绑定的值
  168. value: 500,
  169. // tab页。 data: 数据, custom: 自定义
  170. tabName: 'custom'
  171. },
  172. {
  173. label: '第二行文字内容',
  174. // 设置组件类型, select / input / colorPicker
  175. type: 'input',
  176. // 字段
  177. field: 'customize_secondLine',
  178. optionField: 'customize.secondLine', // 对应options中的字段
  179. // 是否多选
  180. multiple: false,
  181. // 绑定的值
  182. value: '装机处理及时率',
  183. // tab页。 data: 数据, custom: 自定义
  184. tabName: 'custom'
  185. },
  186. {
  187. label: '第二行文字大小',
  188. // 设置组件类型, select / input / colorPicker
  189. type: 'inputNumber',
  190. // 字段
  191. field: 'customize_secondSize',
  192. optionField: 'customize.secondSize', // 对应options中的字段
  193. // 是否多选
  194. multiple: false,
  195. // 绑定的值
  196. value: 36,
  197. // tab页。 data: 数据, custom: 自定义
  198. tabName: 'custom'
  199. },
  200. {
  201. label: '第二行字体颜色',
  202. // 设置组件类型, select / input / colorPicker
  203. type: 'colorPicker',
  204. // 字段
  205. field: 'customize_secondColor',
  206. optionField: 'customize.secondColor', // 对应options中的字段
  207. // 是否多选
  208. multiple: false,
  209. // 绑定的值
  210. value: '#fff',
  211. // tab页。 data: 数据, custom: 自定义
  212. tabName: 'custom'
  213. },
  214. {
  215. label: '第二行字体粗细',
  216. // 设置组件类型, select / input / colorPicker
  217. type: 'inputNumber',
  218. // 字段
  219. field: 'customize_secondWeight',
  220. optionField: 'customize.secondWeight', // 对应options中的字段
  221. // 是否多选
  222. multiple: false,
  223. // 绑定的值
  224. value: 500,
  225. // tab页。 data: 数据, custom: 自定义
  226. tabName: 'custom'
  227. }
  228. ]
  229. // 模拟数据
  230. const option = {
  231. // 自定义组件其他属性
  232. customize: {
  233. src: 'http://60.174.249.206:11080/upload/webDesign/uiSucai/dir/icon/icon_top6.png',
  234. borderRadius: 0,
  235. borderWidth: 0,
  236. lineDistance: 25,
  237. borderColor: '',
  238. bgColor: '',
  239. distance: 30,
  240. imgSize: 110,
  241. firstSize: 50,
  242. firstColor: '#ffffff',
  243. firstWeight: 500,
  244. secondSize: 50,
  245. secondColor: '#ffffff',
  246. secondWeight: 500,
  247. secondLine: '装机处理及时率'
  248. }
  249. }
  250. export default {
  251. title,
  252. setting,
  253. option: {
  254. ...option,
  255. displayOption: {
  256. dataAllocation: {
  257. enable: false
  258. }
  259. }
  260. }
  261. }