2019-07-30 16:47:11 +08:00
|
|
|
class Theme {
|
|
|
|
constructor(code) {
|
2019-07-30 18:02:58 +08:00
|
|
|
this._code = '02';
|
2019-07-29 16:03:14 +08:00
|
|
|
this._mapMenu = {
|
2019-08-07 16:23:04 +08:00
|
|
|
'01': 'default', // 成都4号线
|
2019-07-29 16:03:14 +08:00
|
|
|
'02': 'fuzhou_01',
|
2019-08-07 15:32:35 +08:00
|
|
|
// '03': 'beijing_01',
|
|
|
|
'03': 'chengdou_03',
|
2019-07-29 16:03:14 +08:00
|
|
|
'05': 'batong_01'
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
// 加载菜单组件
|
2019-07-30 16:47:11 +08:00
|
|
|
loadMenuComponent(code) {
|
2019-07-30 18:02:58 +08:00
|
|
|
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/index`).default);
|
2019-07-29 16:03:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// 加载运行图计划表组件
|
2019-07-30 16:47:11 +08:00
|
|
|
loadPlanComponent(code) {
|
2019-07-30 18:02:58 +08:00
|
|
|
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/planSchedule/index`).default);
|
2019-07-29 16:03:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// 加载运行图解析和转化函数
|
|
|
|
loadPlanConvert(code) {
|
2019-07-30 18:02:58 +08:00
|
|
|
return require(`./${this._mapMenu[code || this._code]}/planConvert`).default;
|
2019-07-29 16:03:14 +08:00
|
|
|
}
|
|
|
|
|
2019-07-30 16:47:11 +08:00
|
|
|
// 共有字段转换
|
|
|
|
loadPropConvert(code) {
|
2019-07-30 18:45:32 +08:00
|
|
|
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;
|