rt-sim-training-client/src/jmap/theme/factory.js

35 lines
1001 B
JavaScript
Raw Normal View History

2019-07-30 16:47:11 +08:00
class Theme {
2019-11-13 10:34:19 +08:00
constructor(code) {
this._code = '02';
this._mapMenu = {
'01': 'chengdu_04',
'02': 'fuzhou_01',
'03': 'beijing_01',
'04': 'chengdu_03',
'05': 'fuzhou_01' // 国际版运行图皮肤 指向05 福州线路
};
}
2019-07-29 16:03:14 +08:00
2019-11-13 10:34:19 +08:00
// 加载菜单组件
loadMenuComponent(code) {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/index`).default);
}
2019-07-29 16:03:14 +08:00
2019-11-13 10:34:19 +08:00
// 加载运行图计划表组件
loadPlanComponent(code) {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/planSchedule/index`).default);
}
2019-07-29 16:03:14 +08:00
2019-11-13 10:34:19 +08:00
// 加载运行图解析和转化函数
loadPlanConvert(code) {
return require(`./${this._mapMenu[code || this._code]}/planConvert`).default;
}
2019-07-29 16:03:14 +08:00
2019-11-13 10:34:19 +08:00
// 共有字段转换
loadPropConvert(code) {
return require(`./${this._mapMenu[code || this._code]}/model`).default;
}
2019-07-29 16:03:14 +08:00
}
2019-07-30 16:47:11 +08:00
export default Theme;