getComponentConfig.js 5.0 KB

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