Commit c7a2bd96bfe46f1809dffb92d9942e87f94f5e13

Authored by 徐烜
1 parent b41df8b5

电子站牌项目

1、修改bsth-line-chart-scrollList.js,修改默认参数
2、修改index.js,隐藏不用的组件
3、修改vue.config.js,添加publicPath,修正打包输出引用资源路径的根路径
front-end/h5/src/components/core/plugins/bsth/bsth-line-chart-scrollList.js
... ... @@ -47,11 +47,11 @@ export default {
47 47 }),
48 48 // --------------- 数据属性 -------------- //
49 49 _flag_1_: PropTypes.string({ label: '', component: null, extra (h) { return (<hr data-label='数据属性' class='bsth-line-item-divider'/>) } }),
50   - page_size: PropTypes.number({ label: '每页显示线路图数量', defaultValue: 5, layout: { prefixCls: 'bsth-line' } }),
  50 + page_size: PropTypes.number({ label: '每页显示线路图数量', defaultValue: 3, layout: { prefixCls: 'bsth-line' } }),
51 51 scroll_mode: PropTypes.select({ label: '滚动模式', defaultValue: 'up', options: [{ label: '向上滚动', value: 'up' }, { label: '向下滚动', value: 'down' }], layout: { prefixCls: 'bsth-line' } }),
52   - scroll_seconds: PropTypes.number({ label: '滚动时间间隔(秒)', defaultValue: 2000, layout: { prefixCls: 'bsth-line' } }),
53   - scroll_speed: PropTypes.number({ label: '滚动速度(像素/秒)', defaultValue: 10, layout: { prefixCls: 'bsth-line' } }),
54   - gps_data_refresh_seconds: PropTypes.number({ label: 'gps数据刷新间隔(秒)', defaultValue: 1, layout: { prefixCls: 'bsth-line' } }),
  52 + scroll_seconds: PropTypes.number({ label: '滚动时间间隔(秒)', defaultValue: 3, layout: { prefixCls: 'bsth-line' } }),
  53 + scroll_speed: PropTypes.number({ label: '滚动速度(像素/秒)', defaultValue: 1000, layout: { prefixCls: 'bsth-line' } }),
  54 + gps_data_refresh_seconds: PropTypes.number({ label: 'gps数据刷新间隔(秒)', defaultValue: 30, layout: { prefixCls: 'bsth-line' } }),
55 55 route_data_of_api_url: PropTypes.string({ label: '线路路由数据url', component: 'a-textarea', defaultValue: 'http://192.168.168.228:8910/General_Interface/getLineRouteVO', layout: { prefixCls: 'bsth-line' } }),
56 56 gps_data_of_api_url: PropTypes.string({ label: '线路gps数据url', component: 'a-textarea', defaultValue: 'http://192.168.168.228:8910/General_Interface/getLineGpsVO', layout: { prefixCls: 'bsth-line' } }),
57 57 device_id: PropTypes.string({ label: '站牌设备Id', defaultValue: '66MH0001', layout: { prefixCls: 'bsth-line' } }),
... ... @@ -65,7 +65,7 @@ export default {
65 65 background_color: PropTypes.color({ label: '背景颜色', defaultValue: '#FFFFFF', layout: { prefixCls: 'bsth-line' } }),
66 66 // --------------- 内部线路模拟图外层css属性 --------------- //
67 67 _flag_3_: PropTypes.string({ label: '', component: null, extra (h) { return (<hr data-label='内部线路模拟图外层css属性' class='bsth-line-item-divider'></hr>) } }),
68   - line_chart_name_font_size: PropTypes.number({ label: '线路名称字体大小', defaultValue: 20, layout: { prefixCls: 'bsth-line' } }),
  68 + line_chart_name_font_size: PropTypes.number({ label: '线路名称字体大小', defaultValue: 30, layout: { prefixCls: 'bsth-line' } }),
69 69 line_chart_name_font_color: PropTypes.color({ label: '线路名称字体颜色', defaultValue: '#babdbd', layout: { prefixCls: 'bsth-line' } }),
70 70 line_chart_margin_left: PropTypes.number({ label: '图左边margin', defaultValue: 10, layout: { prefixCls: 'bsth-line' } }),
71 71 line_chart_margin_right: PropTypes.number({ label: '图右边margin', defaultValue: 10, layout: { prefixCls: 'bsth-line' } }),
... ... @@ -78,7 +78,7 @@ export default {
78 78 chart_left_padding: PropTypes.number({ label: '内部线路图距离左边padding', defaultValue: 30, layout: { prefixCls: 'bsth-line' } }),
79 79 chart_right_padding: PropTypes.number({ label: '内部线路图距离右边padding', defaultValue: 30, layout: { prefixCls: 'bsth-line' } }),
80 80 chart_center_top_padding: PropTypes.number({ label: '内部线路图居中修正padding', defaultValue: 4, layout: { prefixCls: 'bsth-line' } }),
81   - chart_station_name_max_size: PropTypes.number({ label: '站定名显示最大文字个数', defaultValue: 7, layout: { prefixCls: 'bsth-line' } }),
  81 + chart_station_name_max_size: PropTypes.number({ label: '站点名显示最大文字个数', defaultValue: 12, layout: { prefixCls: 'bsth-line' } }),
82 82 chart_up_line_path_s_color: PropTypes.color({ label: '上行线颜色', defaultValue: '#5E96D2', layout: { prefixCls: 'bsth-line' } }),
83 83 chart_down_line_path_s_color: PropTypes.color({ label: '下行线颜色', defaultValue: '#c92121', layout: { prefixCls: 'bsth-line' } }),
84 84 chart_up_line_circle_f_color: PropTypes.color({ label: '上行线站点圆圈填充色', defaultValue: '#5e96d2', layout: { prefixCls: 'bsth-line' } }),
... ...
front-end/h5/src/components/core/plugins/index.js
... ... @@ -26,87 +26,87 @@ import BsthLineChartScrollList from &#39;core/plugins/bsth/bsth-line-chart-scrollLis
26 26 import BsthSlide from 'core/plugins/bsth/bsth-slide'
27 27  
28 28 export const pluginsList = [
29   - {
30   - i18nTitle: {
31   - 'en-US': 'RadarChart',
32   - 'zh-CN': '雷达图'
33   - },
34   - title: '雷达图',
35   - icon: 'line-chart',
36   - component: LbpLineChart,
37   - visible: true,
38   - name: LbpLineChart.name,
39   - shortcutProps: {
40   - type: 'radar'
41   - }
42   - },
43   - {
44   - i18nTitle: {
45   - 'en-US': 'LineChart',
46   - 'zh-CN': '折线图'
47   - },
48   - title: '折线图',
49   - icon: 'line-chart',
50   - component: LbpLineChart,
51   - visible: true,
52   - name: LbpLineChart.name,
53   - shortcutProps: {
54   - type: 'line'
55   - }
56   - },
57   - {
58   - i18nTitle: {
59   - 'en-US': 'LineChart',
60   - 'zh-CN': '柱状图'
61   - },
62   - title: '柱状图',
63   - icon: 'bar-chart',
64   - component: LbpLineChart,
65   - visible: true,
66   - name: LbpLineChart.name,
67   - shortcutProps: {
68   - type: 'histogram'
69   - }
70   - },
71   - {
72   - i18nTitle: {
73   - 'en-US': 'LineChart',
74   - 'zh-CN': '饼状图'
75   - },
76   - title: '饼状图',
77   - icon: 'pie-chart',
78   - component: LbpLineChart,
79   - visible: true,
80   - name: LbpLineChart.name,
81   - shortcutProps: {
82   - type: 'pie'
83   - }
84   - },
85   - {
86   - i18nTitle: {
87   - 'en-US': 'LineChart',
88   - 'zh-CN': '漏斗图'
89   - },
90   - title: '漏斗图',
91   - icon: 'filter',
92   - component: LbpLineChart,
93   - visible: true,
94   - name: LbpLineChart.name,
95   - shortcutProps: {
96   - type: 'funnel'
97   - }
98   - },
99   - {
100   - title: '公告',
101   - i18nTitle: {
102   - 'en-US': 'Notice-Bar',
103   - 'zh-CN': '公告'
104   - },
105   - icon: 'volume-up',
106   - component: LbpNoticeBar,
107   - visible: true,
108   - name: LbpNoticeBar.name
109   - },
  29 + // {
  30 + // i18nTitle: {
  31 + // 'en-US': 'RadarChart',
  32 + // 'zh-CN': '雷达图'
  33 + // },
  34 + // title: '雷达图',
  35 + // icon: 'line-chart',
  36 + // component: LbpLineChart,
  37 + // visible: true,
  38 + // name: LbpLineChart.name,
  39 + // shortcutProps: {
  40 + // type: 'radar'
  41 + // }
  42 + // },
  43 + // {
  44 + // i18nTitle: {
  45 + // 'en-US': 'LineChart',
  46 + // 'zh-CN': '折线图'
  47 + // },
  48 + // title: '折线图',
  49 + // icon: 'line-chart',
  50 + // component: LbpLineChart,
  51 + // visible: true,
  52 + // name: LbpLineChart.name,
  53 + // shortcutProps: {
  54 + // type: 'line'
  55 + // }
  56 + // },
  57 + // {
  58 + // i18nTitle: {
  59 + // 'en-US': 'LineChart',
  60 + // 'zh-CN': '柱状图'
  61 + // },
  62 + // title: '柱状图',
  63 + // icon: 'bar-chart',
  64 + // component: LbpLineChart,
  65 + // visible: true,
  66 + // name: LbpLineChart.name,
  67 + // shortcutProps: {
  68 + // type: 'histogram'
  69 + // }
  70 + // },
  71 + // {
  72 + // i18nTitle: {
  73 + // 'en-US': 'LineChart',
  74 + // 'zh-CN': '饼状图'
  75 + // },
  76 + // title: '饼状图',
  77 + // icon: 'pie-chart',
  78 + // component: LbpLineChart,
  79 + // visible: true,
  80 + // name: LbpLineChart.name,
  81 + // shortcutProps: {
  82 + // type: 'pie'
  83 + // }
  84 + // },
  85 + // {
  86 + // i18nTitle: {
  87 + // 'en-US': 'LineChart',
  88 + // 'zh-CN': '漏斗图'
  89 + // },
  90 + // title: '漏斗图',
  91 + // icon: 'filter',
  92 + // component: LbpLineChart,
  93 + // visible: true,
  94 + // name: LbpLineChart.name,
  95 + // shortcutProps: {
  96 + // type: 'funnel'
  97 + // }
  98 + // },
  99 + // {
  100 + // title: '公告',
  101 + // i18nTitle: {
  102 + // 'en-US': 'Notice-Bar',
  103 + // 'zh-CN': '公告'
  104 + // },
  105 + // icon: 'volume-up',
  106 + // component: LbpNoticeBar,
  107 + // visible: true,
  108 + // name: LbpNoticeBar.name
  109 + // },
110 110 // {
111 111 // title: '标签页',
112 112 // i18nTitle: {
... ... @@ -118,28 +118,28 @@ export const pluginsList = [
118 118 // visible: true,
119 119 // name: LbpTabs.name
120 120 // },
121   - {
122   - title: '评分',
123   - i18nTitle: {
124   - 'en-US': 'Rate',
125   - 'zh-CN': '评分'
126   - },
127   - icon: 'star-o',
128   - component: LbpRate,
129   - visible: true,
130   - name: LbpRate.name
131   - },
132   - {
133   - title: '图片',
134   - i18nTitle: {
135   - 'en-US': 'Picture',
136   - 'zh-CN': '图片'
137   - },
138   - icon: 'photo',
139   - component: LbpPicture,
140   - visible: true,
141   - name: LbpPicture.name
142   - },
  121 + // {
  122 + // title: '评分',
  123 + // i18nTitle: {
  124 + // 'en-US': 'Rate',
  125 + // 'zh-CN': '评分'
  126 + // },
  127 + // icon: 'star-o',
  128 + // component: LbpRate,
  129 + // visible: true,
  130 + // name: LbpRate.name
  131 + // },
  132 + // {
  133 + // title: '图片',
  134 + // i18nTitle: {
  135 + // 'en-US': 'Picture',
  136 + // 'zh-CN': '图片'
  137 + // },
  138 + // icon: 'photo',
  139 + // component: LbpPicture,
  140 + // visible: true,
  141 + // name: LbpPicture.name
  142 + // },
143 143 {
144 144 i18nTitle: {
145 145 'en-US': 'Text',
... ... @@ -151,96 +151,96 @@ export const pluginsList = [
151 151 visible: true,
152 152 name: LbpText.name
153 153 },
154   - {
155   - i18nTitle: {
156   - 'en-US': 'Button',
157   - 'zh-CN': '普通按钮'
158   - },
159   - title: '普通按钮',
160   - icon: 'hand-pointer-o',
161   - component: LbpButton,
162   - visible: true,
163   - name: LbpButton.name
164   - },
165   - {
166   - i18nTitle: {
167   - 'en-US': 'Carousel',
168   - 'zh-CN': '轮播图'
169   - },
170   - title: '轮播图',
171   - icon: 'photo',
172   - component: LbpSlide,
173   - visible: true,
174   - name: LbpSlide.name
175   - // disabled: true
176   - },
177   - {
178   - i18nTitle: {
179   - 'en-US': 'Map',
180   - 'zh-CN': '地图'
181   - },
182   - title: '地图',
183   - icon: 'map-o',
184   - component: LbpQQMap,
185   - visible: true,
186   - name: LbpQQMap.name
187   - // disabled: true
188   - },
189   - {
190   - i18nTitle: {
191   - 'en-US': 'Video',
192   - 'zh-CN': '视频'
193   - },
194   - title: '视频',
195   - icon: 'file-video-o',
196   - component: LbpVideo,
197   - visible: true,
198   - name: LbpVideo.name
199   - },
200   - {
201   - i18nTitle: {
202   - 'en-US': 'Form Input',
203   - 'zh-CN': '表单输入'
204   - },
205   - title: '表单输入',
206   - icon: 'pencil-square-o',
207   - component: LbpFormInput,
208   - visible: true,
209   - name: LbpFormInput.name
210   - },
211   - {
212   - i18nTitle: {
213   - 'en-US': 'Form Submit',
214   - 'zh-CN': '表单提交'
215   - },
216   - title: '表单提交',
217   - icon: 'hand-pointer-o',
218   - component: LbpFormButton,
219   - visible: true,
220   - name: LbpFormButton.name
221   - },
222   - {
223   - i18nTitle: {
224   - 'en-US': 'Form Checkbox',
225   - 'zh-CN': '表单多选'
226   - },
227   - title: '表单多选',
228   - icon: 'check-square-o',
229   - component: LbpFormCheckboxGroup,
230   - visible: true,
231   - name: LbpFormCheckboxGroup.name
232   - },
233   - {
234   - i18nTitle: {
235   - 'en-US': 'Form Radio',
236   - 'zh-CN': '表单单选'
237   - },
238   - title: '表单单选',
239   - icon: 'dot-circle-o',
240   - component: LbpFormRadioGroup,
241   - visible: true,
242   - name: LbpFormRadioGroup.name
243   - },
  154 + // {
  155 + // i18nTitle: {
  156 + // 'en-US': 'Button',
  157 + // 'zh-CN': '普通按钮'
  158 + // },
  159 + // title: '普通按钮',
  160 + // icon: 'hand-pointer-o',
  161 + // component: LbpButton,
  162 + // visible: true,
  163 + // name: LbpButton.name
  164 + // },
  165 + // {
  166 + // i18nTitle: {
  167 + // 'en-US': 'Carousel',
  168 + // 'zh-CN': '轮播图'
  169 + // },
  170 + // title: '轮播图',
  171 + // icon: 'photo',
  172 + // component: LbpSlide,
  173 + // visible: true,
  174 + // name: LbpSlide.name
  175 + // // disabled: true
  176 + // },
  177 + // {
  178 + // i18nTitle: {
  179 + // 'en-US': 'Map',
  180 + // 'zh-CN': '地图'
  181 + // },
  182 + // title: '地图',
  183 + // icon: 'map-o',
  184 + // component: LbpQQMap,
  185 + // visible: true,
  186 + // name: LbpQQMap.name
  187 + // // disabled: true
  188 + // },
  189 + // {
  190 + // i18nTitle: {
  191 + // 'en-US': 'Video',
  192 + // 'zh-CN': '视频'
  193 + // },
  194 + // title: '视频',
  195 + // icon: 'file-video-o',
  196 + // component: LbpVideo,
  197 + // visible: true,
  198 + // name: LbpVideo.name
  199 + // },
  200 + // {
  201 + // i18nTitle: {
  202 + // 'en-US': 'Form Input',
  203 + // 'zh-CN': '表单输入'
  204 + // },
  205 + // title: '表单输入',
  206 + // icon: 'pencil-square-o',
  207 + // component: LbpFormInput,
  208 + // visible: true,
  209 + // name: LbpFormInput.name
  210 + // },
  211 + // {
  212 + // i18nTitle: {
  213 + // 'en-US': 'Form Submit',
  214 + // 'zh-CN': '表单提交'
  215 + // },
  216 + // title: '表单提交',
  217 + // icon: 'hand-pointer-o',
  218 + // component: LbpFormButton,
  219 + // visible: true,
  220 + // name: LbpFormButton.name
  221 + // },
  222 + // {
  223 + // i18nTitle: {
  224 + // 'en-US': 'Form Checkbox',
  225 + // 'zh-CN': '表单多选'
  226 + // },
  227 + // title: '表单多选',
  228 + // icon: 'check-square-o',
  229 + // component: LbpFormCheckboxGroup,
  230 + // visible: true,
  231 + // name: LbpFormCheckboxGroup.name
  232 + // },
  233 + // {
  234 + // i18nTitle: {
  235 + // 'en-US': 'Form Radio',
  236 + // 'zh-CN': '表单单选'
  237 + // },
  238 + // title: '表单单选',
  239 + // icon: 'dot-circle-o',
  240 + // component: LbpFormRadioGroup,
  241 + // visible: true,
  242 + // name: LbpFormRadioGroup.name
  243 + // },
244 244 {
245 245 i18nTitle: {
246 246 'en-US': 'Background',
... ... @@ -252,64 +252,64 @@ export const pluginsList = [
252 252 visible: false,
253 253 name: LbpBackground.name
254 254 },
255   - {
256   - i18nTitle: {
257   - 'en-US': 'BgMusic',
258   - 'zh-CN': '背景音乐'
259   - },
260   - title: '背景音乐',
261   - icon: 'music',
262   - component: LbpBgMusic,
263   - visible: true,
264   - name: LbpBgMusic.name
265   - },
266   - {
267   - i18nTitle: {
268   - 'en-US': 'Table(Default)',
269   - 'zh-CN': '默认表格'
270   - },
271   - icon: 'table',
272   - component: LbpTable,
273   - visible: true,
274   - name: LbpTable.name
275   - },
276   - {
277   - i18nTitle: {
278   - 'en-US': 'Table(Stripe)',
279   - 'zh-CN': '(斑马线)表格'
280   - },
281   - icon: 'table',
282   - component: LbpTable,
283   - visible: true,
284   - name: LbpTable.name,
285   - shortcutProps: {
286   - theme: 'lbp-table-theme-stripe'
287   - }
288   - },
289   - {
290   - i18nTitle: {
291   - 'en-US': 'Table(LightBlue)',
292   - 'zh-CN': '(淡蓝色)表格'
293   - },
294   - icon: 'table',
295   - component: LbpTable,
296   - visible: true,
297   - name: LbpTable.name,
298   - shortcutProps: {
299   - theme: 'lbp-table-theme-light-blue'
300   - }
301   - },
302   - {
303   - i18nTitle: {
304   - 'en-US': 'NewsList',
305   - 'zh-CN': '新闻列表'
306   - },
307   - title: '新闻列表',
308   - icon: 'list',
309   - component: LbpNewsList,
310   - visible: true,
311   - name: LbpNewsList.name
312   - },
  255 + // {
  256 + // i18nTitle: {
  257 + // 'en-US': 'BgMusic',
  258 + // 'zh-CN': '背景音乐'
  259 + // },
  260 + // title: '背景音乐',
  261 + // icon: 'music',
  262 + // component: LbpBgMusic,
  263 + // visible: true,
  264 + // name: LbpBgMusic.name
  265 + // },
  266 + // {
  267 + // i18nTitle: {
  268 + // 'en-US': 'Table(Default)',
  269 + // 'zh-CN': '默认表格'
  270 + // },
  271 + // icon: 'table',
  272 + // component: LbpTable,
  273 + // visible: true,
  274 + // name: LbpTable.name
  275 + // },
  276 + // {
  277 + // i18nTitle: {
  278 + // 'en-US': 'Table(Stripe)',
  279 + // 'zh-CN': '(斑马线)表格'
  280 + // },
  281 + // icon: 'table',
  282 + // component: LbpTable,
  283 + // visible: true,
  284 + // name: LbpTable.name,
  285 + // shortcutProps: {
  286 + // theme: 'lbp-table-theme-stripe'
  287 + // }
  288 + // },
  289 + // {
  290 + // i18nTitle: {
  291 + // 'en-US': 'Table(LightBlue)',
  292 + // 'zh-CN': '(淡蓝色)表格'
  293 + // },
  294 + // icon: 'table',
  295 + // component: LbpTable,
  296 + // visible: true,
  297 + // name: LbpTable.name,
  298 + // shortcutProps: {
  299 + // theme: 'lbp-table-theme-light-blue'
  300 + // }
  301 + // },
  302 + // {
  303 + // i18nTitle: {
  304 + // 'en-US': 'NewsList',
  305 + // 'zh-CN': '新闻列表'
  306 + // },
  307 + // title: '新闻列表',
  308 + // icon: 'list',
  309 + // component: LbpNewsList,
  310 + // visible: true,
  311 + // name: LbpNewsList.name
  312 + // },
313 313  
314 314 {
315 315 i18nTitle: {
... ... @@ -319,21 +319,21 @@ export const pluginsList = [
319 319 title: '线路模拟图',
320 320 icon: 'list',
321 321 component: BsthLineChart,
322   - visible: true,
  322 + visible: false,
323 323 name: BsthLineChart.name
324 324 },
325   -
326   - {
327   - i18nTitle: {
328   - 'en-US': 'LineChartList',
329   - 'zh-CN': '线路模拟图列表'
330   - },
331   - title: '线路模拟图列表',
332   - icon: 'list',
333   - component: BsthLineChartList,
334   - visible: true,
335   - name: BsthLineChartList.name
336   - },
  325 + //
  326 + // {
  327 + // i18nTitle: {
  328 + // 'en-US': 'LineChartList',
  329 + // 'zh-CN': '线路模拟图列表'
  330 + // },
  331 + // title: '线路模拟图列表',
  332 + // icon: 'list',
  333 + // component: BsthLineChartList,
  334 + // visible: true,
  335 + // name: BsthLineChartList.name
  336 + // },
337 337  
338 338 {
339 339 i18nTitle: {
... ... @@ -350,9 +350,9 @@ export const pluginsList = [
350 350 {
351 351 i18nTitle: {
352 352 'en-US': 'Carousel2',
353   - 'zh-CN': '轮播图2'
  353 + 'zh-CN': '轮播图'
354 354 },
355   - title: '轮播图2',
  355 + title: '轮播图',
356 356 icon: 'photo',
357 357 component: BsthSlide,
358 358 visible: true,
... ...
front-end/h5/vue.config.js
... ... @@ -41,7 +41,8 @@ switch (process.env.PAGE) {
41 41 filename: 'index.html',
42 42 title: 'Index Page',
43 43 // outputDir: 'dist',
44   - outputDir: mainAppOutputDir
  44 + outputDir: mainAppOutputDir,
  45 + publicPath: './'
45 46 // publicPath: isProd ? '/main/' : '/'
46 47 }
47 48 }
... ...