getComponentConfig.js 5.4 KB

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