getComponentConfig.js 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. import Icon from 'packages/assets/images/bigScreenIcon/export'
  2. // import _ from 'lodash'
  3. export default function getComponentConfig (type) {
  4. // const _type = _.upperFirst(type)
  5. switch (type) {
  6. case 'texts':
  7. return {
  8. name: '文本',
  9. title: '文本',
  10. icon: Icon.getNameList()[0],
  11. className:
  12. 'com.gccloud.dataroom.core.module.chart.components.ScreenTextChart',
  13. w: 150,
  14. h: 30,
  15. x: 0,
  16. y: 0,
  17. type
  18. }
  19. case 'linkChart':
  20. return {
  21. name: '超链接',
  22. title: '超链接',
  23. icon: Icon.getNameList()[15],
  24. className:
  25. 'com.gccloud.dataroom.core.module.chart.components.ScreenLinkChart',
  26. w: 150,
  27. h: 30,
  28. x: 0,
  29. y: 0,
  30. type
  31. }
  32. case 'horizontalLine':
  33. return {
  34. name: '水平线',
  35. title: '水平线',
  36. icon: Icon.getNameList()[10],
  37. component: null,
  38. className:
  39. 'com.gccloud.dataroom.core.module.chart.components.ScreenBorderChart',
  40. w: 300,
  41. h: 40,
  42. x: 0,
  43. y: 0,
  44. type
  45. }
  46. case 'verticalLine':
  47. return {
  48. name: '垂直线',
  49. title: '垂直线',
  50. icon: Icon.getNameList()[11],
  51. component: null,
  52. className:
  53. 'com.gccloud.dataroom.core.module.chart.components.ScreenBorderChart',
  54. w: 40,
  55. h: 300,
  56. x: 0,
  57. y: 0,
  58. type
  59. }
  60. case 'picture':
  61. return {
  62. name: '图片',
  63. title: '图片',
  64. icon: Icon.getNameList()[1],
  65. className:
  66. 'com.gccloud.dataroom.core.module.chart.components.ScreenPictureChart',
  67. w: 280,
  68. h: 200,
  69. x: 0,
  70. y: 0,
  71. type
  72. }
  73. case 'screenScrollBoard':
  74. return {
  75. name: '轮播表',
  76. title: '轮播表',
  77. icon: Icon.getNameList()[2],
  78. className:
  79. 'com.gccloud.dataroom.core.module.chart.components.ScreenScrollBoardChart',
  80. w: 500,
  81. h: 300,
  82. x: 0,
  83. y: 0,
  84. type
  85. }
  86. case 'screenScrollRanking':
  87. return {
  88. name: '排名表',
  89. title: '排名表',
  90. icon: Icon.getNameList()[3],
  91. className:
  92. 'com.gccloud.dataroom.core.module.chart.components.ScreenScrollRankingChart',
  93. w: 550,
  94. h: 350,
  95. x: 0,
  96. y: 0,
  97. type
  98. }
  99. case 'tables':
  100. return {
  101. name: '表格',
  102. title: '表格',
  103. icon: Icon.getNameList()[4],
  104. className:
  105. 'com.gccloud.dataroom.core.module.chart.components.ScreenTablesChart',
  106. w: 600,
  107. h: 400,
  108. x: 0,
  109. y: 0,
  110. type
  111. }
  112. case 'currentTime':
  113. return {
  114. name: '当前时间',
  115. title: '当前时间',
  116. icon: Icon.getNameList()[6],
  117. className:
  118. 'com.gccloud.dataroom.core.module.chart.components.ScreenCurrentTimeChart',
  119. w: 380,
  120. h: 130,
  121. x: 0,
  122. y: 0,
  123. type
  124. }
  125. case 'timeCountDown':
  126. return {
  127. name: '倒计时',
  128. title: '倒计时',
  129. icon: Icon.getNameList()[7],
  130. className:
  131. 'com.gccloud.dataroom.core.module.chart.components.ScreenTimeCountDownChart',
  132. w: 500,
  133. h: 130,
  134. x: 0,
  135. y: 0,
  136. type
  137. }
  138. case 'iframeChart':
  139. return {
  140. name: '外链',
  141. title: '外链',
  142. icon: Icon.getNameList()[8],
  143. className:
  144. 'com.gccloud.dataroom.core.module.chart.components.ScreenIframeChart',
  145. w: 500,
  146. h: 500,
  147. x: 0,
  148. y: 0,
  149. type
  150. }
  151. case 'digitalFlop':
  152. return {
  153. name: '翻牌器',
  154. title: '翻牌器',
  155. icon: null,
  156. img: require('packages/BasicComponents/DigitalFlop/images/fanpaiqi.png'),
  157. className:
  158. 'com.gccloud.dataroom.core.module.chart.components.ScreenDigitalFlopChart',
  159. w: 800,
  160. h: 150,
  161. x: 0,
  162. y: 0,
  163. type
  164. }
  165. case 'video':
  166. return {
  167. name: '播放器',
  168. title: '播放器',
  169. icon: Icon.getNameList()[12],
  170. className:
  171. 'com.gccloud.dataroom.core.module.chart.components.ScreenVideoChart',
  172. w: 800,
  173. h: 500,
  174. x: 0,
  175. y: 0,
  176. type
  177. }
  178. case 'input':
  179. return {
  180. name: '输入框',
  181. title: '输入框',
  182. icon: Icon.getNameList()[13],
  183. className: 'com.gccloud.dataroom.core.module.chart.components.ScreenInputChart',
  184. w: 180,
  185. h: 40,
  186. x: 0,
  187. y: 0,
  188. type
  189. }
  190. case 'button':
  191. return {
  192. name: '按钮',
  193. title: '按钮',
  194. icon: Icon.getNameList()[14],
  195. className: 'com.gccloud.dataroom.core.module.chart.components.ScreenButtonChart',
  196. w: 80,
  197. h: 40,
  198. x: 0,
  199. y: 0,
  200. type
  201. }
  202. default:
  203. return {}
  204. }
  205. }