This commit is contained in:
joylink_cuiweidong 2020-04-01 14:15:09 +08:00
commit 5d10d40ea3
70 changed files with 286 additions and 111 deletions

View File

@ -17,11 +17,14 @@
},
"dependencies": {
"axios": "0.18.0",
"echarts": "^4.7.0",
"element-ui": "^2.7.2",
"file-saver": "^1.3.3",
"js-cookie": "2.2.0",
"js-md5": "^0.7.3",
"lodash": "^4.17.11",
"normalize.css": "7.0.0",
"nprogress": "^0.2.0",
"path-to-regexp": "2.4.0",
"qrcode.vue": "^1.6.2",
"script-loader": "^0.7.2",
@ -30,8 +33,11 @@
"stompjs": "^2.3.3",
"storejs": "^1.0.25",
"three": "^0.107.0",
"vue": "^2.6.10",
"vue-i18n": "^8.12.0",
"vue-router": "^3.1.6",
"vuedraggable": "^2.23.2",
"vuex": "^3.1.0",
"xlsx": "^0.14.2",
"zrender": "^4.0.4"
},
@ -51,7 +57,7 @@
"babel-preset-env": "1.6.1",
"babel-preset-stage-2": "6.24.1",
"chalk": "2.4.2",
"compression-webpack-plugin": "^3.0.0",
"compression-webpack-plugin": "^3.1.0",
"connect": "3.6.6",
"copy-webpack-plugin": "^4.5.2",
"eslint": "5.15.3",
@ -67,7 +73,7 @@
"serve-static": "^1.13.2",
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.2",
"vue-template-compiler": "2.6.10"
"vue-template-compiler": "2.6.11"
},
"engines": {
"node": ">=8.9",

View File

@ -6,24 +6,25 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.png">
<!-- cdn.bootcss.com替换成cdnjs.cloudflare.com/ajax/libs -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.7.2/theme-chalk/index.css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.css" rel="stylesheet">
<title><%= webpackConfig.name %></title>
<script src="/static/inflate.min.js"></script>
<script src="/static/three.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/echarts/4.4.0-rc.1/echarts-en.common.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vuex/3.1.0/vuex.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-router/3.1.2/vue-router.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.7.2/index.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.7.2/locale/en.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.7.2/locale/zh-CN.min.js"></script>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/sockjs-client/1.4.0/sockjs.min.js"></script> -->
<% if (process.env.VUE_APP_PRO !== 'local') { %>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.7.2/theme-chalk/index.css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/echarts/4.4.0-rc.1/echarts-en.common.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vuex/3.1.0/vuex.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-router/3.1.2/vue-router.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.7.2/index.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.7.2/locale/en.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.7.2/locale/zh-CN.min.js"></script>
<% } %>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/sockjs-client/1.4.0/sockjs.min.js"></script>-->
</head>
<body>
<body>
<noscript>
<strong>We're sorry but <%= webpackConfig.name %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
export default {
bind(el) {

View File

@ -1,7 +1,7 @@
import en from './langs/en/index';
import zh from './langs/zh/index';
import en from './langs/en/index_APP_TARGET';
import zh from './langs/zh/index_APP_TARGET';
export default {
en,
zh
en,
zh
};

View File

@ -1,4 +1,3 @@
// import enLocale from 'element-ui/lib/locale/lang/en';
import ELEMENT from 'element-ui';
import map from './map';
import global from './global';

View File

@ -0,0 +1,63 @@
import enLocale from 'element-ui/lib/locale/lang/en';
import map from './map';
import global from './global';
import router from './router';
import lesson from './lesson';
import error from './error';
import rules from './rules';
import scriptRecord from './scriptRecord';
import tip from './tip';
import system from './system';
import orderAuthor from './orderAuthor';
import teach from './teach';
import publish from './publish';
import permission from './permission';
import replay from './replay';
import planMonitor from './planMonitor';
import screenMonitor from './screenMonitor';
import demonstration from './demonstration';
import exam from './exam';
import dashboard from './dashboard';
import jlmap3d from './jlmap3d';
import display from './display';
import joinTraining from './joinTraining';
import trainRoom from './trainRoom';
import menu from './menu';
import ibp from './ibp';
import approval from './approval';
import systemGenerate from './systemGenerate';
import login from './login';
import designPlatform from './designPlatform';
export default {
enLocale,
map,
global,
router,
lesson,
teach,
error,
rules,
scriptRecord,
tip,
system,
orderAuthor,
publish,
permission,
replay,
planMonitor,
screenMonitor,
demonstration,
exam,
dashboard,
jlmap3d,
display,
joinTraining,
trainRoom,
menu,
ibp,
approval,
systemGenerate,
login,
designPlatform
};

View File

@ -233,5 +233,6 @@ export default {
stopPointOffsetTip: 'Set block stop offset in bulk successfully!',
mapSortSuccessfully: 'Map sort successfully',
mapSortFailed: 'Map sort failed',
enterTrainingRoomFailed: 'Failed to enter the comprehensive drill, please consult the administrator is still in the room!'
enterTrainingRoomFailed: 'Failed to enter the comprehensive drill, please consult the administrator is still in the room!',
failedToAddNewRoom: 'Failed to add new room'
};

View File

@ -1,4 +1,3 @@
// import cnLocale from 'element-ui/lib/locale/lang/zh-CN';
import ELEMENT from 'element-ui';
import map from './map';
import global from './global';

View File

@ -0,0 +1,63 @@
import cnLocale from 'element-ui/lib/locale/lang/zh-CN';
import map from './map';
import global from './global';
import router from './router';
import lesson from './lesson';
import error from './error';
import rules from './rules';
import scriptRecord from './scriptRecord';
import tip from './tip';
import system from './system';
import orderAuthor from './orderAuthor';
import teach from './teach';
import publish from './publish';
import permission from './permission';
import replay from './replay';
import planMonitor from './planMonitor';
import screenMonitor from './screenMonitor';
import demonstration from './demonstration';
import exam from './exam';
import dashboard from './dashboard';
import jlmap3d from './jlmap3d';
import display from './display';
import joinTraining from './joinTraining';
import trainRoom from './trainRoom';
import menu from './menu';
import ibp from './ibp';
import approval from './approval';
import systemGenerate from './systemGenerate';
import login from './login';
import designPlatform from './designPlatform';
export default {
cnLocale,
map,
global,
router,
lesson,
error,
teach,
rules,
scriptRecord,
tip,
system,
orderAuthor,
publish,
permission,
replay,
planMonitor,
screenMonitor,
demonstration,
exam,
dashboard,
jlmap3d,
display,
joinTraining,
trainRoom,
menu,
ibp,
approval,
systemGenerate,
login,
designPlatform
};

View File

@ -233,5 +233,6 @@ export default {
stopPointOffsetTip: '批量设置区段停车点偏移量成功!',
mapSortSuccessfully: '地图排序成功!',
mapSortFailed: '地图排序失败!',
enterTrainingRoomFailed: '进入综合演练失败,请咨询管理员是否还在房间内!'
enterTrainingRoomFailed: '进入综合演练失败,请咨询管理员是否还在房间内!',
failedToAddNewRoom: '加入新房间失败'
};

View File

@ -1,7 +1,7 @@
import deviceType from './constant/deviceType';
import Eventful from 'zrender/src/mixin/Eventful';
import * as eventTool from 'zrender/src/core/event';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
class EventModel {
constructor(e) {

View File

@ -2,7 +2,7 @@ import * as zrUtil from 'zrender/src/core/util';
import * as matrix from 'zrender/src/core/matrix';
import deviceType from '../constant/deviceType';
import deviceRender from '../constant/deviceRender';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
export function createTransform(opts) {
let transform = matrix.create();

View File

@ -6,7 +6,7 @@ import Painter from './painter';
import deviceType from './constant/deviceType';
import {calculateDCenter, createBoundingRect, deviceFactory} from './utils/parser';
import { updateIscsData } from './utils/parser';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
const renderer = 'canvas';
const devicePixelRatio = 1;

View File

@ -1,7 +1,7 @@
import deviceType from './constant/deviceType';
import Eventful from 'zrender/src/mixin/Eventful';
import * as eventTool from 'zrender/src/core/event';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
class EventModel {
constructor(e) {

View File

@ -2,7 +2,7 @@ import * as zrUtil from 'zrender/src/core/util';
import * as matrix from 'zrender/src/core/matrix';
import deviceType from '../constant/deviceType';
import deviceRender from '../constant/deviceRender';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import { deepClone } from '@/utils/index';
export function createTransform(opts) {

View File

@ -1,7 +1,7 @@
import deviceType from './constant/deviceType';
import Eventful from 'zrender/src/mixin/Eventful';
import * as eventTool from 'zrender/src/core/event';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
class EventModel {
constructor(e) {

View File

@ -2,7 +2,7 @@ import Group from 'zrender/src/container/Group';
import Text from 'zrender/src/graphic/Text';
import Rect from 'zrender/src/graphic/shape/Rect';
// import Vue from 'vue';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
class EMouse extends Group {
constructor(device, code) {
super();

View File

@ -1,6 +1,6 @@
import Group from 'zrender/src/container/Group';
import Rect from 'zrender/src/graphic/shape/Rect';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
class EMouse extends Group {
constructor(device) {
super();

View File

@ -3,7 +3,7 @@ import TrainBodyBox from './TrainBodyBox';
import '../StationStand/EDetain';
import ETextName from '../element/ETextName'; // 名称文字 (共有)
import EMouse from './EMouse';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
/** 车身*/
export default class TrainBody extends Group {

View File

@ -2,7 +2,7 @@
import Polygon from 'zrender/src/graphic/shape/Polygon';
import Group from 'zrender/src/container/Group';
import EMouse from './EMouse';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
class TrainWindow extends Group {
constructor(model, style) {

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import deviceState from '@/jmap/constant/deviceState';
import { OperateMode } from '@/scripts/ConstDic';

View File

@ -1,5 +1,5 @@
import Vue from 'vue';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import deviceState from '@/jmap/constant/deviceState';
import { OperateMode } from '@/scripts/ConstDic';

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import deviceState from '@/jmap/constant/deviceState';
import { OperateMode } from '@/scripts/ConstDic';

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import deviceState from '@/jmap/constant/deviceState';
import { OperateMode } from '@/scripts/ConstDic';

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import deviceState from '@/jmap/constant/deviceState';
import { OperateMode } from '@/scripts/ConstDic';

View File

@ -10,7 +10,7 @@ import deviceType from './constant/deviceType';
import { selectLineCode } from './config/deviceStyle';
import { deviceFactory, createBoundingRect, calculateDCenter } from './utils/parser';
import { deepAssign } from '@/utils/index';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
const renderer = 'canvas';
const devicePixelRatio = 1;

View File

@ -1,7 +1,7 @@
import deviceType from './constant/deviceType';
import Eventful from 'zrender/src/mixin/Eventful';
import * as eventTool from 'zrender/src/core/event';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
class EventModel {
constructor(e) {

View File

@ -1,7 +1,7 @@
import Group from 'zrender/src/container/Group';
import Text from 'zrender/src/graphic/Text';
import Rect from 'zrender/src/graphic/shape/Rect';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
class EMouse extends Group {
constructor(device, code) {
super();

View File

@ -11,7 +11,7 @@ import { EBackArrow, EBackArrowTriangle } from './EBackArrow'; // 折返进路
import ELimitName from './ELimitName'; // 成都三号线 限速名称
import JTriangle from '../../utils/JTriangle';
import { drawSectionStyle } from '../../config/defaultStyle';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import Vue from 'vue';
/** 区段*/

View File

@ -1,6 +1,6 @@
import Group from 'zrender/src/container/Group';
import Rect from 'zrender/src/graphic/shape/Rect';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
class EMouse extends Group {
constructor(device) {
super();

View File

@ -13,7 +13,7 @@ import EMouse from './EMouse';
import EHighlight from '../element/EHighlight';
import ERhomboid from './ERhomboid';
import ETriangle from './ETriangle';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import Vue from 'vue';
export default class Switch extends Group {

View File

@ -36,18 +36,6 @@ class EDirection extends Group {
this.create();
this.arrow.setStyle('fill', color);
}
// 隐藏
hide() {
this.create();
this.arrow.hide();
}
// 显示
show() {
this.create();
this.arrow.show();
}
}
export default EDirection;

View File

@ -3,7 +3,7 @@ import TrainBodyBox from './TrainBodyBox';
import '../StationStand/EDetain';
import ETextName from '../element/ETextName'; // 名称文字 (共有)
import EMouse from './EMouse';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import Circle from 'zrender/src/graphic/shape/Circle';
import BoundingRect from 'zrender/src/core/BoundingRect';

View File

@ -4,7 +4,7 @@ import TrainBody from './TrainBody';
import BoundingRect from 'zrender/src/core/BoundingRect';
import Rect from 'zrender/src/graphic/shape/Rect';
import ETriangle from '../Train/ETriangle';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import EDirection from './EDirection';
/** 列车 */

View File

@ -2,7 +2,7 @@
import Polygon from 'zrender/src/graphic/shape/Polygon';
import Group from 'zrender/src/container/Group';
import EMouse from './EMouse';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
class TrainWindow extends Group {
constructor(model, style) {

View File

@ -1,5 +1,5 @@
import Vue from 'vue';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import deviceState from '@/jmap/constant/deviceState';
import { OperateMode } from '@/scripts/ConstDic';

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import deviceState from '@/jmap/constant/deviceState';
import { OperateMode } from '@/scripts/ConstDic';

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import deviceState from '@/jmap/constant/deviceState';
import { OperateMode } from '@/scripts/ConstDic';

View File

@ -1,5 +1,5 @@
import Vue from 'vue';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import deviceState from '@/jmap/constant/deviceState';
import { OperateMode } from '@/scripts/ConstDic';

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import deviceState from '@/jmap/constant/deviceState';
import { OperateMode } from '@/scripts/ConstDic';

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import deviceState from '@/jmap/constant/deviceState';
import { OperateMode } from '@/scripts/ConstDic';

View File

@ -1,5 +1,5 @@
import Vue from 'vue';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import deviceState from '@/jmap/constant/deviceState';
import { OperateMode } from '@/scripts/ConstDic';

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';

View File

@ -57,7 +57,7 @@ export default {
},
{
name: 'global.caseShow',
// handle: this.goToCaseShow,
handle: this.goEmpty,
isHelp:true,
style:'padding-right:0px;',
hidden:getSessionStorage('project').endsWith('hyd')
@ -134,6 +134,7 @@ export default {
const href = 'https://joylink.club/helps/help1.pdf';
window.open(href, '_blank');
},
goEmpty() {},
goToCaseShow() {
const href = 'https://joylink.club/helps/西安铁路职业技术学院.pdf';
window.open(href, '_blank');

View File

@ -45,7 +45,8 @@ export default {
}
this.dialogShow = false;
} catch (error) {
this.$messageBox(`${this.$t('error.scanningError')}:${error.message}`);
const errorMessage = this.isShow ? this.$t('tip.failedToAddNewRoom') : this.$t('error.scanningError');
this.$messageBox(`${errorMessage}:${error.message}`);
} finally {
this.loading = false;
}

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
const { body } = document;
const WIDTH = 1024;

View File

@ -1,18 +1,17 @@
import Vue from 'vue';
import 'normalize.css/normalize.css'; // A modern alternative to CSS resets
import ELEMENT from 'element-ui';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import '@/styles/index.scss'; // global css
import LangStorage from '@/utils/lang';
import App from './App';
import VueI18n from 'vue-i18n';
import store from './store';
import store from './store/index_APP_TARGET';
import router from './router/index_APP_TARGET';
import CancelMouseState from '@/mixin/CancelMouseState.js';
Vue.mixin(CancelMouseState);
import '@/icons'; // icon
@ -27,7 +26,7 @@ import '@/directive/quickMenuDrag/index.js';
import '@/directive/waves/index.js';
import messages from '@/i18n/index';
Vue.use(ELEMENT);
Vue.use(ElementUI);
Vue.use(VueI18n);
Vue.config.devtools = true; // 开发环境显示vue控制台
Vue.config.productionTip = false;
@ -36,8 +35,7 @@ export const i18n = new VueI18n({
locale: LangStorage.getLang('zh'),
messages
});
ELEMENT.i18n((key, value) => i18n.t(key, value));
Vue.use(ElementUI, {i18n: (key, value) => i18n.t(key, value)});
new Vue({
el: '#app',

View File

@ -1,5 +1,5 @@
import Vue from 'vue';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import router from './router/index_APP_TARGET';
import NProgress from 'nprogress';
import { admin} from './router/index_APP_TARGET';

View File

@ -1,8 +1,8 @@
// import Vue from 'vue';
import Router from 'vue-router';
import Vue from 'vue';
import VueRouter from 'vue-router';
// import VueRouter from 'vue-router';
// Vue.use(Router);
Vue.use(VueRouter);
/* Layout */
const Layout = () => import('@/layout');
@ -756,7 +756,7 @@ export const asyncRouter = [
}
];
const createRouter = () => new Router({
const createRouter = () => new VueRouter({
mode: 'history', // require service support
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes
@ -771,8 +771,8 @@ router.beforeEach((to, from, next) => {
});
// 兼容 vue-router在3.1.0版本以上的路由跳转使用的是 promise 的方式
const originalPush = Router.prototype.push;
Router.prototype.push = function push(location) {
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err);
};

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import router from '@/router/index_APP_TARGET';
import CommandHandler from './CommandHandler.js';
import ValidateHandler from './ValidateHandler.js';

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import CommandHandler from './CommandHandler';
import { State2SimulationMap, State2ControlMap } from './Config';
import { OperateMode } from '@/scripts/ConstDic';

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import LangStorage from '@/utils/lang';
import Handler from './Handler.js';
import { TrainingMode } from '@/scripts/ConstDic';

View File

@ -1,6 +1,6 @@
import { OperationEvent, getOperateTypeBy, MapDeviceType } from '@/scripts/ConstDic';
import localStore from 'storejs';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
const SectionOperation = OperationEvent.Section;

View File

@ -1,6 +1,5 @@
import { OperationEvent, getOperateTypeBy, MapDeviceType } from '@/scripts/ConstDic';
// import localStore from 'storejs';
// import store from '@/store';
const SignalOperation = OperationEvent.Signal;

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import router from '@/router/index_APP_TARGET';
import OperateHandler from '@/scripts/plugin/OperateHandler';
import { sendCommand } from '@/api/jmap/training';

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import router from '@/router/index_APP_TARGET';
import OperateConverter from '@/scripts/plugin/OperateConvert2Command';
import { TrainingMode } from '@/scripts/ConstDic';

View File

@ -1,4 +1,4 @@
// import Vue from 'vue';
import Vue from 'vue';
import Vuex from 'vuex';
import app from './modules/app';
import settings from './modules/settings';
@ -19,7 +19,7 @@ import iscs from './modules/iscs';
import getters from './getters';
// Vue.use(Vuex);
Vue.use(Vuex);
const store = new Vuex.Store({
modules: {

46
src/store/index_HYD.js Normal file
View File

@ -0,0 +1,46 @@
import Vuex from 'vuex';
import Vue from 'vue';
import app from './modules/app';
import settings from './modules/settings';
import user from './modules/user';
import config from './modules/config';
import permission from './modules/permission';
import map from './modules/map';
import menuOperation from './modules/menuoperation';
import training from './modules/training';
import trainingList from './modules/trainingList';
import exam from './modules/exam';
import runPlan from './modules/runplan';
import socket from './modules/socket';
import scriptRecord from './modules/scriptRecord';
import ibp from './modules/ibp';
import order from './modules/order';
import iscs from './modules/iscs';
import getters from './getters';
Vue.use(Vuex);
const store = new Vuex.Store({
modules: {
app,
settings,
user,
permission,
config,
map,
menuOperation,
training,
trainingList,
exam,
runPlan,
socket,
scriptRecord,
ibp,
order,
iscs
},
getters
});
export default store;

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
const exam = {
namespaced: true,

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import { Notification } from 'element-ui';
function handle(state, data) {

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import { getPublishMapVersionById, getPublishMapDetailById} from '@/api/jmap/map';
import { getNewMapDataByGroup } from '@/api/simulation';

View File

@ -1,5 +1,5 @@
import axios from 'axios';
import store from '../store';
import store from '@/store/index_APP_TARGET';
import { i18n } from '@/main.js';
import { MessageBox } from 'element-ui';
import { getToken } from '@/utils/auth';

View File

@ -1,4 +1,4 @@
import store from '@/store';
import store from '@/store/index_APP_TARGET';
import { timeFormat } from '@/utils/date';
/** 创建一个车次数据点*/

View File

@ -2,7 +2,7 @@ import { getToken } from '@/utils/auth';
import { checkLoginLine } from '@/api/login';
import { getBaseUrl } from '@/utils/baseUrl';
import { MessageBox, Message } from 'element-ui';
import store from '../store';
import store from '@/store/index_APP_TARGET';
import SockJS from 'sockjs-client';
import Stomp from 'stompjs';

View File

@ -1,6 +1,6 @@
import Vue from 'vue';
import StompClient from '@/utils/sock';
import store from '@/store';
import store from '@/store/index_APP_TARGET';
export const displayTopic = '/user/queue/simulation'; // 其他仿真topic
export const perpetualTopic = '/user/topic/message'; // 公用topic

View File

@ -64,7 +64,7 @@ export default {
}
},
stationList: {
type: Object,
type: Array,
default() {
return [];
}

View File

@ -10,7 +10,7 @@ export default {
name: 'SwitchStation',
props: {
concentrationStationList: {
type: String,
type: Array,
default() {
return [];
}

View File

@ -6,7 +6,7 @@ const defaultSettings = require('./src/settings.js');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const webpack = require('webpack');
// const CompressionPlugin = require('compression-webpack-plugin');
const CompressionPlugin = require('compression-webpack-plugin');
// const productionGzipExtensions = ['js', 'css'];
// const isProduction = process.env.NODE_ENV === 'production';
@ -86,6 +86,16 @@ module.exports = {
// // 为开发环境修改配置...
// config.mode = 'development';
// }
if (process.env.NODE_ENV !== 'development') {
config.plugins.push(new CompressionPlugin({
filename: '[path].gz[query]',
algorithm: 'gzip',
test:/\.js$|\.html$|.\css/, // 匹配文件名
threshold: 10240, // 对超过10k的数据压缩
minRatio: 0.8, // 只有压缩好这个比率的资产才能被处理
deleteOriginalAssets: true
}));
}
config.name = name;
config.resolve = {
extensions: ['.js', '.vue', '.json'],
@ -93,7 +103,7 @@ module.exports = {
'@': path.resolve('src')
}
};
var appTarget = process.env.NODE_ENV === 'Local' || process.env.VUE_APP_PRO === 'local' ? 'HYD' : 'Common';
const appTarget = process.env.NODE_ENV === 'Local' || process.env.VUE_APP_PRO === 'local' ? 'HYD' : 'Common';
config.plugins.push(new webpack.NormalModuleReplacementPlugin(/(.*)_APP_TARGET(\.*)/,
function (resourse) {
resourse.request = resourse.request.replace(/APP_TARGET/, `${appTarget}`);
@ -106,8 +116,7 @@ module.exports = {
ignore: ['.*']
}
]));
config.externals = { // 配置使用CDN
const externalsConfig = {
'vue': 'Vue',
'vuex': 'Vuex',
'vue-router': 'VueRouter',
@ -115,7 +124,7 @@ module.exports = {
'echarts': 'echarts',
'element-ui': 'ELEMENT'
};
config.externals = process.env.NODE_ENV === 'Local' || process.env.VUE_APP_PRO === 'local' ? {} : externalsConfig; // 配置CDN使用
},
// webpack配置
chainWebpack(config) {