diff --git a/src/directive/dialogDrag/dialogDrag.js b/src/directive/dialogDrag/dialogDrag.js index 2e1b1ec67..864ede3f6 100644 --- a/src/directive/dialogDrag/dialogDrag.js +++ b/src/directive/dialogDrag/dialogDrag.js @@ -1,4 +1,4 @@ -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; export default { bind(el) { diff --git a/src/ibp/mouseController.js b/src/ibp/mouseController.js index 977a90af9..903ea6e6d 100644 --- a/src/ibp/mouseController.js +++ b/src/ibp/mouseController.js @@ -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/index_APP_TARGET'; +import store from '@/store/index'; // import * as Event from 'zrender/src/core/event'; class EventModel { diff --git a/src/ibp/utils/parser.js b/src/ibp/utils/parser.js index 397e4092d..30153fe10 100644 --- a/src/ibp/utils/parser.js +++ b/src/ibp/utils/parser.js @@ -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/index_APP_TARGET'; +import store from '@/store/index'; export function createTransform(opts) { let transform = matrix.create(); diff --git a/src/iscs/iscs.js b/src/iscs/iscs.js index 35864a967..78cadb9a0 100644 --- a/src/iscs/iscs.js +++ b/src/iscs/iscs.js @@ -7,7 +7,7 @@ import deviceType from './constant/deviceType'; import KeyboardController from './keyboardController'; import {calculateDCenter, createBoundingRect, deviceFactory} from './utils/parser'; import { updateIscsData } from './utils/parser'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; import { selectLineCode } from './constant/deviceStyle'; const renderer = 'canvas'; diff --git a/src/iscs/mouseController.js b/src/iscs/mouseController.js index 41ef9524d..cd6ad1fc3 100644 --- a/src/iscs/mouseController.js +++ b/src/iscs/mouseController.js @@ -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/index_APP_TARGET'; +import store from '@/store/index'; class EventModel { constructor(e) { diff --git a/src/iscs/mouseController1.js b/src/iscs/mouseController1.js index 6b44152a0..824361b49 100644 --- a/src/iscs/mouseController1.js +++ b/src/iscs/mouseController1.js @@ -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/index_APP_TARGET'; +import store from '@/store/index'; class EventModel { constructor(e) { diff --git a/src/iscs/utils/parser.js b/src/iscs/utils/parser.js index 1afd389c5..08fc4c9aa 100644 --- a/src/iscs/utils/parser.js +++ b/src/iscs/utils/parser.js @@ -2,7 +2,6 @@ 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/index_APP_TARGET'; // import { deepClone } from '@/utils/index'; export function createTransform(opts) { diff --git a/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js b/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js index 00a38b578..5ed51299c 100644 --- a/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js +++ b/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js @@ -15,7 +15,7 @@ import { getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3dda import StompClient from '@/utils/sock'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; var clock = new THREE.Clock(); export function Jl3ddeviceNew(dom,group,token,skinCode) { diff --git a/src/jlmap3d/jl3dmaintainer/maintainerload.js b/src/jlmap3d/jl3dmaintainer/maintainerload.js index 97d886f15..b311905b4 100644 --- a/src/jlmap3d/jl3dmaintainer/maintainerload.js +++ b/src/jlmap3d/jl3dmaintainer/maintainerload.js @@ -6,7 +6,7 @@ import {SignalListN} from '@/jlmap3d/main/newmodel/SignalListN'; import {StationStandListN} from '@/jlmap3d/main/newmodel/StationStandListN'; import {SwitchListN} from '@/jlmap3d/main/newmodel/SwitchListN'; import {RailListN} from '@/jlmap3d/main/newmodel/RailListN.js'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; import {Materialload} from '@/jlmap3d/main/loaders/Materialload.js'; diff --git a/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js b/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js index 30684c42b..9c9e856bf 100644 --- a/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js +++ b/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js @@ -1,7 +1,7 @@ import StompClient from '@/utils/sock'; import { getBaseUrl } from '@/utils/baseUrl' import { getToken } from '@/utils/auth'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; // 定于仿真socket接口 export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passerStation,passerAi) { diff --git a/src/jlmap3d/jl3dpassflow/jl3dpassflownew.js b/src/jlmap3d/jl3dpassflow/jl3dpassflownew.js index 4476b9e0f..4b9276350 100644 --- a/src/jlmap3d/jl3dpassflow/jl3dpassflownew.js +++ b/src/jlmap3d/jl3dpassflow/jl3dpassflownew.js @@ -29,7 +29,7 @@ import { PathFinder } from '@/jlmap3d/jl3dpassflow/passerai/pathfinder.js'; import { PassflowConnect } from '@/jlmap3d/jl3dpassflow/connect/passflowconnect.js'; import StompClient from '@/utils/sock'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; // import { Loading } from 'element-ui'; import {Stats} from '@/jlmap3d/main/lib/stats.min.js'; diff --git a/src/jlmap3d/jl3dtrafficplan/connect/stationconnect.js b/src/jlmap3d/jl3dtrafficplan/connect/stationconnect.js index 82456fa2c..9a10d6c14 100644 --- a/src/jlmap3d/jl3dtrafficplan/connect/stationconnect.js +++ b/src/jlmap3d/jl3dtrafficplan/connect/stationconnect.js @@ -1,7 +1,7 @@ import StompClient from '@/utils/sock'; import { getBaseUrl } from '@/utils/baseUrl' import { getToken } from '@/utils/auth'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; // 定于仿真socket接口 export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passerStation,passerAi,jl3d) { @@ -30,9 +30,8 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe // 仿真socket接口回调函数 function callback(Response) { const data = JSON.parse(Response.body); - if(data.type == "PFV"){ - console.log(data); + for(let i=0;i { location.reload(); diff --git a/src/jlmap3d/jl3dtrafficplan/connect/trainconnect.js b/src/jlmap3d/jl3dtrafficplan/connect/trainconnect.js index 5c4fb531e..b52036ba7 100644 --- a/src/jlmap3d/jl3dtrafficplan/connect/trainconnect.js +++ b/src/jlmap3d/jl3dtrafficplan/connect/trainconnect.js @@ -1,7 +1,7 @@ import StompClient from '@/utils/sock'; import { getBaseUrl } from '@/utils/baseUrl' import { getToken } from '@/utils/auth'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; // 定于仿真socket接口 export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passerAi) { @@ -10,7 +10,7 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe let topic = '/user/queue/simulation/jl3d/'+routegroup; let header = {'X-Token': getToken() }; - + let restart = false; socketon(topic); function socketon(topic) { @@ -35,7 +35,9 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe // console.log(trafficTrain.trainList); for(let k in trafficTrain.trainList){ if(trafficTrain.trainList[k].code == data.body){ - updateValue(data.body); + console.log( trafficTrain.trainList[k].code); + console.log( data.body); + updateTrafficTrainValue(data.body); trafficTrain.updateNowTrainCode(data.body); trafficTrain.updateNowTrunk(0+''); break; @@ -62,7 +64,10 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe // console.log(data); trafficTrain.updateTrainData(data.body); - + if(restart == true){ + restart = false; + trafficTrain.restart(); + } // if(toptrain.nowcode == data.body.code){ // console.log(data); // //根据上下车人数创建人 @@ -76,7 +81,7 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe } if(data.type == "TRAIN_PIS"){ - + for(let i=0;i { location.reload(); diff --git a/src/jlmap3d/jl3dtrafficplan/jl3dtrafficplan.js b/src/jlmap3d/jl3dtrafficplan/jl3dtrafficplan.js index e12cfb011..2aae806be 100644 --- a/src/jlmap3d/jl3dtrafficplan/jl3dtrafficplan.js +++ b/src/jlmap3d/jl3dtrafficplan/jl3dtrafficplan.js @@ -30,7 +30,7 @@ import { PathFinder } from '@/jlmap3d/jl3dtrafficplan/passerai/pathfinder.js'; import { PassflowConnect } from '@/jlmap3d/jl3dtrafficplan/connect/stationconnect.js'; import StompClient from '@/utils/sock'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; // import { Loading } from 'element-ui'; import {Stats} from '@/jlmap3d/main/lib/stats.min.js'; @@ -192,11 +192,11 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap,initCode) { passerAi.initPasser(humanlist,topWaitPassers,downWaitPassers,passerHuman,scope); updatePasserData(humanlist.children.length,topWaitPassers.children.length,downWaitPassers.children.length,outStationPassers.children.length,passerHuman.speed); + scope.resetscene(); } this.changestation = function(stationname){ passerStation.changestation(stationname); - console.log(passerStation.nowStation); scope.humanWaitTop = passerStation.nowStation.toppassers; scope.humanWaitDown = passerStation.nowStation.downpassers; passerHuman.speed = passerStation.nowStation.topspeed + passerStation.nowStation.downspeed; diff --git a/src/jlmap3d/jl3dtrafficplan/jl3dtraffictrain.js b/src/jlmap3d/jl3dtrafficplan/jl3dtraffictrain.js index 7cc18dd4e..206fb62e1 100644 --- a/src/jlmap3d/jl3dtrafficplan/jl3dtraffictrain.js +++ b/src/jlmap3d/jl3dtrafficplan/jl3dtraffictrain.js @@ -31,7 +31,7 @@ import { PathFinder } from '@/jlmap3d/jl3dpassflow/passerai/pathfinder.js'; import { TrainConnect } from '@/jlmap3d/jl3dtrafficplan/connect/trainconnect.js'; import StompClient from '@/utils/sock'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; // import { Loading } from 'element-ui'; import {Stats} from '@/jlmap3d/main/lib/stats.min.js'; @@ -343,6 +343,11 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) { } } } + this.restart = function(){ + updateTrafficTrainValue(passerTrain.toptrain.nowcode); + scope.updateNowTrainCode(passerTrain.toptrain.nowcode); + scope.updateNowTrunk(0+''); + }; this.updateNowTrainCode = function(newCode){ passerTrain.toptrain.nowcode = newCode; diff --git a/src/jlmap3d/jl3dtrafficplan/loader/loader.js b/src/jlmap3d/jl3dtrafficplan/loader/loader.js index 8f655cb70..cb3c3b88b 100644 --- a/src/jlmap3d/jl3dtrafficplan/loader/loader.js +++ b/src/jlmap3d/jl3dtrafficplan/loader/loader.js @@ -1,5 +1,5 @@ import { BASE_ASSET_API } from '@/api/jlmap3d/assets3d.js'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; //模型管理器 let mode = "0"; export function ModelManager(){ diff --git a/src/jlmap3d/jl3dtrafficplan/model/passerhuman.js b/src/jlmap3d/jl3dtrafficplan/model/passerhuman.js index 5b1b9420d..ba9ed3849 100644 --- a/src/jlmap3d/jl3dtrafficplan/model/passerhuman.js +++ b/src/jlmap3d/jl3dtrafficplan/model/passerhuman.js @@ -1,8 +1,5 @@ export function PasserHuman() { let scope = this; - - - //初始人物模型和动画 let originhuman1 = null; let originhuman2 = null; diff --git a/src/jlmap3d/main/loaders/AssetLoader.js b/src/jlmap3d/main/loaders/AssetLoader.js index 670d46715..3b104309a 100644 --- a/src/jlmap3d/main/loaders/AssetLoader.js +++ b/src/jlmap3d/main/loaders/AssetLoader.js @@ -11,7 +11,7 @@ let defaultsignal = { deviceType:"signal", type:"low", picUrl:"", - url:BASE_ASSET_API+"/MODEL/signal/d3d.FBX" + url:BASE_ASSET_API+"/MODEL/2020-07-10/13-42231.FBX" } let defaulttrain = { @@ -20,7 +20,7 @@ let defaulttrain = { deviceType:"train", type:"num4", picUrl:"", - url:BASE_ASSET_API+"/MODEL/train/train.FBX" + url:BASE_ASSET_API+"/MODEL/2020-11-16/57-53841.FBX" } @@ -30,7 +30,7 @@ let defaultstation = { deviceType:"stand", type:"num4", picUrl:"", - url:BASE_ASSET_API+"/MODEL/station/fuzhou.FBX" + url:BASE_ASSET_API+"/MODEL/2020-11-16/52-60478.FBX" } let waicestation = { id:"10", @@ -38,7 +38,7 @@ let waicestation = { deviceType:"standwaice", type:"num4", picUrl:"", - url:BASE_ASSET_API+"/MODEL/station/waicestation.FBX" + url:BASE_ASSET_API+"/MODEL/2020-11-16/53-61736.FBX" } let defaultswitch = { @@ -47,7 +47,7 @@ let defaultswitch = { deviceType:"switch", type:"fuzhou", picUrl:"", - url:BASE_ASSET_API+"/MODEL/daocha/daocha.FBX" + url:BASE_ASSET_API+"/MODEL/2020-07-10/17-43789.FBX" } @@ -57,7 +57,7 @@ let defaultsuidao = { deviceType:"suidao", type:"suidao", picUrl:"", - url:BASE_ASSET_API+"/MODEL/suidao/suidao.FBX" + url:BASE_ASSET_API+"/MODEL/2020-07-10/21-35677.FBX" } @@ -68,7 +68,7 @@ let defaultbackground = { deviceType:"background", type:"background", picUrl:"", - url:BASE_ASSET_API+"/MODEL/suidao/background.FBX" + url:BASE_ASSET_API+"/MODEL/2020-07-10/21-35677.FBX" } let defaultautorail = { @@ -86,7 +86,7 @@ let autoswitch = { deviceType:"autoswitch", type:"fuzhou", picUrl:"", - url:BASE_ASSET_API+"/MODEL/auto/autoswitch.FBX" + url:BASE_ASSET_API+"/MODEL/2020-07-10/17-43789.FBX" } let autoswitch1 = { @@ -95,7 +95,7 @@ let autoswitch1 = { deviceType:"autoswitch1", type:"fuzhou", picUrl:"", - url:BASE_ASSET_API+"/MODEL/auto/switch1.FBX" + url:BASE_ASSET_API+"/MODEL/2020-07-10/17-43789.FBX" } let autoswitch2 = { @@ -104,7 +104,7 @@ let autoswitch2 = { deviceType:"autoswitch2", type:"fuzhou", picUrl:"", - url:BASE_ASSET_API+"/MODEL/auto/switch2.FBX" + url:BASE_ASSET_API+"/MODEL/2020-07-10/17-43789.FBX" } export function AssetLoader(){ @@ -305,34 +305,40 @@ export function AssetLoader(){ fbxpromise(signal) .then(function(data){ ////console.log(data); + console.log("test"); return fbxpromise(train); }) .then(function(data){ ////console.log(data); + console.log("test"); return fbxpromise(station); }) .then(function(data){ ////console.log(data); + console.log("test"); return fbxpromise(wstation); }) - .then(function(data){ - ////console.log(data); - return fbxpromise(autorail); - }) + // .then(function(data){ + // ////console.log(data); + // return fbxpromise(autorail); + // }) // .then(function(data){ // ////console.log(data); // return fbxpromise(autosuidao); // }) .then(function(data){ ////console.log(data); + console.log("defaultswitch1"); return fbxpromise(defaultswitch1); }) .then(function(data){ + console.log("defaultswitch2"); ////console.log(data); return fbxpromise(defaultswitch2); }) .then(function(data){ ////console.log(data); + console.log("autoswitchs"); return fbxpromise(autoswitchs); }) .then(function(data){ @@ -637,9 +643,9 @@ export function AssetLoader(){ //object.traverse(function (node) {//获取其中对象 // node.frustumCulled = true; //}); - - if(asset.type == "train"){ console.log(asset); + if(asset.type == "train"){ + let realtrain = new THREE.Group(); let j = object.children.length; for(j;j>0;j--){ diff --git a/src/jlmap3d/main/loaders/SimulationLoadNew.js b/src/jlmap3d/main/loaders/SimulationLoadNew.js index 13be65739..c7b65f495 100644 --- a/src/jlmap3d/main/loaders/SimulationLoadNew.js +++ b/src/jlmap3d/main/loaders/SimulationLoadNew.js @@ -10,7 +10,7 @@ import {TdtList} from '@/jlmap3d/main/newmodel/TdtList.js'; import {Materialload} from '@/jlmap3d/main/loaders/Materialload.js'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; // import { Loading } from 'element-ui'; // import {SwitchModel} from '@/jlmap3d/model/SwitchModel.js'; diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 8196c24a7..135d880f2 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -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/index_APP_TARGET'; +import store from '@/store/index'; import Vue from 'vue'; const renderer = 'canvas'; diff --git a/src/jmapNew/mouseController.js b/src/jmapNew/mouseController.js index 672c2c334..92865276e 100644 --- a/src/jmapNew/mouseController.js +++ b/src/jmapNew/mouseController.js @@ -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/index_APP_TARGET'; +import store from '@/store/index'; class EventModel { constructor(e) { diff --git a/src/jmapNew/shape/Psd/EVertical2Door.js b/src/jmapNew/shape/Psd/EVertical2Door.js index cedae26af..a4ad09007 100644 --- a/src/jmapNew/shape/Psd/EVertical2Door.js +++ b/src/jmapNew/shape/Psd/EVertical2Door.js @@ -1,6 +1,6 @@ import Group from 'zrender/src/container/Group'; import Line from 'zrender/src/graphic/shape/Line'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; class EVertical2Door extends Group { constructor(model) { diff --git a/src/jmapNew/shape/Section/EMouse.js b/src/jmapNew/shape/Section/EMouse.js index b3e68ecab..0cc1470f0 100644 --- a/src/jmapNew/shape/Section/EMouse.js +++ b/src/jmapNew/shape/Section/EMouse.js @@ -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 Polygon from 'zrender/src/graphic/shape/Polygon'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; import JTriangle from '../../utils/JTriangle'; class EMouse extends Group { constructor(device, code) { diff --git a/src/jmapNew/shape/Section/index.js b/src/jmapNew/shape/Section/index.js index c8e8735e5..c720c4d52 100644 --- a/src/jmapNew/shape/Section/index.js +++ b/src/jmapNew/shape/Section/index.js @@ -12,7 +12,7 @@ import ELimitName from './ELimitName'; // 成都三号线 限速名称 // import JTriangle from '../../utils/JTriangle'; import { drawSectionStyle } from '../../config/defaultStyle'; import EStopRouteImg from './EStopRouteImg'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; import Vue from 'vue'; /** 区段*/ diff --git a/src/jmapNew/shape/Station/index.js b/src/jmapNew/shape/Station/index.js index 99cb53cdf..617c774f6 100644 --- a/src/jmapNew/shape/Station/index.js +++ b/src/jmapNew/shape/Station/index.js @@ -10,7 +10,7 @@ import EArrow from './EArrow'; import { arrow } from '../utils/ShapePoints'; import Rect from 'zrender/src/graphic/shape/Rect'; import Text from 'zrender/src/graphic/Text'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; import EStationText from './EStationText'; import { traverseLineElements } from '../utils/ShapeStatusCovert'; diff --git a/src/jmapNew/shape/Switch/EMouse.js b/src/jmapNew/shape/Switch/EMouse.js index 298d5af87..8eae2f593 100644 --- a/src/jmapNew/shape/Switch/EMouse.js +++ b/src/jmapNew/shape/Switch/EMouse.js @@ -1,6 +1,6 @@ import Group from 'zrender/src/container/Group'; import Rect from 'zrender/src/graphic/shape/Rect'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; class EMouse extends Group { constructor(device) { super(); diff --git a/src/jmapNew/shape/Switch/index.js b/src/jmapNew/shape/Switch/index.js index 7eeb5e62c..ab34b4001 100644 --- a/src/jmapNew/shape/Switch/index.js +++ b/src/jmapNew/shape/Switch/index.js @@ -10,7 +10,7 @@ import ELockArc from './ELockArc'; import EMouse from './EMouse'; import EHighlight from '../element/EHighlight'; import ETriangle from './ETriangle'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; import Vue from 'vue'; export default class Switch extends Group { diff --git a/src/jmapNew/shape/Train/EMouse.js b/src/jmapNew/shape/Train/EMouse.js index 1b499aef6..4b1e46fe6 100644 --- a/src/jmapNew/shape/Train/EMouse.js +++ b/src/jmapNew/shape/Train/EMouse.js @@ -2,7 +2,7 @@ import Group from 'zrender/src/container/Group'; import Text from 'zrender/src/graphic/Text'; import LangStorage from '@/utils/lang'; import Rect from 'zrender/src/graphic/shape/Rect'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; import Vue from 'vue'; class EMouse extends Group { diff --git a/src/jmapNew/shape/Train/TrainBody.js b/src/jmapNew/shape/Train/TrainBody.js index 01daaeeda..727171569 100644 --- a/src/jmapNew/shape/Train/TrainBody.js +++ b/src/jmapNew/shape/Train/TrainBody.js @@ -3,7 +3,7 @@ import TrainBodyBox from './TrainBodyBox'; // import '../StationStand/EDetain'; import ETextName from '../element/ETextName'; // 名称文字 (共有) import EMouse from './EMouse'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; import Circle from 'zrender/src/graphic/shape/Circle'; import BoundingRect from 'zrender/src/core/BoundingRect'; import Vue from 'vue'; diff --git a/src/jmapNew/shape/Train/index.js b/src/jmapNew/shape/Train/index.js index 40fa92cee..38a0e9103 100644 --- a/src/jmapNew/shape/Train/index.js +++ b/src/jmapNew/shape/Train/index.js @@ -3,7 +3,7 @@ import TrainHead from './TrainHead'; import TrainBody from './TrainBody'; import BoundingRect from 'zrender/src/core/BoundingRect'; import ETriangle from '../Train/ETriangle'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; import EDirection from './EDirection'; /** 列车 */ diff --git a/src/jmapNew/shape/TrainWindow/index.js b/src/jmapNew/shape/TrainWindow/index.js index eb40e64ed..59144fac8 100644 --- a/src/jmapNew/shape/TrainWindow/index.js +++ b/src/jmapNew/shape/TrainWindow/index.js @@ -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/index_APP_TARGET'; +import store from '@/store/index'; class TrainWindow extends Group { constructor(model, style) { diff --git a/src/jmapNew/theme/aus_00/utils.js b/src/jmapNew/theme/aus_00/utils.js index e6bc7efc2..3cbb88534 100644 --- a/src/jmapNew/theme/aus_00/utils.js +++ b/src/jmapNew/theme/aus_00/utils.js @@ -1,4 +1,4 @@ -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; import { timeFormat } from '@/utils/date'; /** 创建一个车次数据点*/ diff --git a/src/jmapNew/theme/beijing_01/planConvert.js b/src/jmapNew/theme/beijing_01/planConvert.js index c5923128c..b03c73ccb 100644 --- a/src/jmapNew/theme/beijing_01/planConvert.js +++ b/src/jmapNew/theme/beijing_01/planConvert.js @@ -1,5 +1,5 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; export default { /** 边缘高度*/ EdgeHeight: 600, diff --git a/src/jmapNew/theme/chengdu_01/planConvert.js b/src/jmapNew/theme/chengdu_01/planConvert.js index 36a2df5b6..dc7f5ba36 100644 --- a/src/jmapNew/theme/chengdu_01/planConvert.js +++ b/src/jmapNew/theme/chengdu_01/planConvert.js @@ -1,5 +1,5 @@ import { createMartPointReverse, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; export default { /** 边缘高度*/ EdgeHeight: 600, diff --git a/src/jmapNew/theme/chengdu_03/planConvert.js b/src/jmapNew/theme/chengdu_03/planConvert.js index ad1ec5f49..903f5b6b9 100644 --- a/src/jmapNew/theme/chengdu_03/planConvert.js +++ b/src/jmapNew/theme/chengdu_03/planConvert.js @@ -1,5 +1,5 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; export default { /** 边缘高度*/ EdgeHeight: 600, diff --git a/src/jmapNew/theme/components/utils/menuOperate.js b/src/jmapNew/theme/components/utils/menuOperate.js index 63bbb7007..7256d9ef0 100644 --- a/src/jmapNew/theme/components/utils/menuOperate.js +++ b/src/jmapNew/theme/components/utils/menuOperate.js @@ -1,4 +1,4 @@ -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { sendCommandTrain } from '@/api/jmap/training'; diff --git a/src/jmapNew/theme/foshan_01/planConvert.js b/src/jmapNew/theme/foshan_01/planConvert.js index 63bc555e2..1b89169ff 100644 --- a/src/jmapNew/theme/foshan_01/planConvert.js +++ b/src/jmapNew/theme/foshan_01/planConvert.js @@ -1,5 +1,5 @@ import { createMartPointReverse, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList, prefixTime } from '@/utils/runPlan'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; export default { /** 边缘高度*/ EdgeHeight: 600, diff --git a/src/jmapNew/theme/fuzhou_01/planConvert.js b/src/jmapNew/theme/fuzhou_01/planConvert.js index 77da7f97e..52d32ed76 100644 --- a/src/jmapNew/theme/fuzhou_01/planConvert.js +++ b/src/jmapNew/theme/fuzhou_01/planConvert.js @@ -1,11 +1,11 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, prefixTime, convertSheetToList } from '@/utils/runPlan'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; export default { /** 边缘高度*/ EdgeHeight: 180, /** 间隔高度*/ - CoordMultiple: 180, + CoordMultiple: 900, /** 偏移时间*/ TranslationTime: 60 * 60 * 2, diff --git a/src/jmapNew/theme/haerbin_01/planConvert.js b/src/jmapNew/theme/haerbin_01/planConvert.js index 67c45fe8f..f352b834d 100644 --- a/src/jmapNew/theme/haerbin_01/planConvert.js +++ b/src/jmapNew/theme/haerbin_01/planConvert.js @@ -1,5 +1,5 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, prefixTime, convertSheetToList } from '@/utils/runPlan'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; export default { /** 边缘高度*/ EdgeHeight: 3, diff --git a/src/jmapNew/theme/ningbo_01/planConvert.js b/src/jmapNew/theme/ningbo_01/planConvert.js index 900037477..21026f93c 100644 --- a/src/jmapNew/theme/ningbo_01/planConvert.js +++ b/src/jmapNew/theme/ningbo_01/planConvert.js @@ -1,5 +1,5 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList, prefixTime } from '@/utils/runPlan'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; export default { /** 边缘高度*/ EdgeHeight: 600, diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/standDetain.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/standDetain.vue index 4dbc34b76..fe1aa8a51 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/standDetain.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/standDetain.vue @@ -149,6 +149,9 @@ export default { if (valid) { this.doClose(); } + }).catch(() => { + this.doClose(); + this.$refs.noticeInfo.doShow(); }); }, handleCurrentChange(val) { diff --git a/src/jmapNew/theme/race_01/planConvert.js b/src/jmapNew/theme/race_01/planConvert.js index 494b63908..0571f01d7 100644 --- a/src/jmapNew/theme/race_01/planConvert.js +++ b/src/jmapNew/theme/race_01/planConvert.js @@ -1,5 +1,5 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; export default { /** 边缘高度*/ EdgeHeight: 600 / 3, diff --git a/src/jmapNew/theme/xian_01/planConvert.js b/src/jmapNew/theme/xian_01/planConvert.js index e36617488..22be91024 100644 --- a/src/jmapNew/theme/xian_01/planConvert.js +++ b/src/jmapNew/theme/xian_01/planConvert.js @@ -1,5 +1,5 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList, prefixTime } from '@/utils/runPlan'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; export default { /** 边缘高度*/ EdgeHeight: 600, diff --git a/src/jmapNew/theme/xian_02/planConvert.js b/src/jmapNew/theme/xian_02/planConvert.js index 554d99130..a505686d4 100644 --- a/src/jmapNew/theme/xian_02/planConvert.js +++ b/src/jmapNew/theme/xian_02/planConvert.js @@ -1,5 +1,5 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; const StationMap = { YARD1: '潏河停车场', YARD2: '潏河停车场', diff --git a/src/layout/mixin/ResizeHandler.js b/src/layout/mixin/ResizeHandler.js index 199995b4c..51ee6d6b5 100644 --- a/src/layout/mixin/ResizeHandler.js +++ b/src/layout/mixin/ResizeHandler.js @@ -1,4 +1,4 @@ -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; const { body } = document; const WIDTH = 1024; diff --git a/src/main.js b/src/main.js index f5a04a56c..fea23a6f5 100644 --- a/src/main.js +++ b/src/main.js @@ -10,7 +10,7 @@ import LangStorage from '@/utils/lang'; import App from './App'; import VueI18n from 'vue-i18n'; -import store from './store/index_APP_TARGET'; +import store from './store/index'; import router from './router/index_APP_TARGET'; import CancelMouseState from '@/mixin/CancelMouseState.js'; Vue.mixin(CancelMouseState); diff --git a/src/permission.js b/src/permission.js index 29b76dec8..d430cdcde 100644 --- a/src/permission.js +++ b/src/permission.js @@ -1,5 +1,5 @@ import Vue from 'vue'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; import router from './router/index_APP_TARGET'; import {loginInfo} from '@/scripts/ProjectConfig'; import NProgress from 'nprogress'; diff --git a/src/scripts/cmdPlugin/Handler.js b/src/scripts/cmdPlugin/Handler.js index 978c687c6..d19640426 100644 --- a/src/scripts/cmdPlugin/Handler.js +++ b/src/scripts/cmdPlugin/Handler.js @@ -1,4 +1,4 @@ -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; import router from '@/router/index_APP_TARGET'; import CommandHandler from './CommandHandler.js'; import ValidateHandler from './ValidateHandler.js'; diff --git a/src/scripts/cmdPlugin/MenuContextHandler.js b/src/scripts/cmdPlugin/MenuContextHandler.js index 832e83584..d906a030c 100644 --- a/src/scripts/cmdPlugin/MenuContextHandler.js +++ b/src/scripts/cmdPlugin/MenuContextHandler.js @@ -1,4 +1,4 @@ -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; import CommandHandler from './CommandHandler'; import { State2SimulationMap, State2ControlMap } from './Config'; import { OperateMode } from '@/scripts/ConstDic'; diff --git a/src/store/index_Common.js b/src/store/index.js similarity index 100% rename from src/store/index_Common.js rename to src/store/index.js diff --git a/src/store/index_HEB.js b/src/store/index_HEB.js deleted file mode 100644 index dbaf695f1..000000000 --- a/src/store/index_HEB.js +++ /dev/null @@ -1,48 +0,0 @@ -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 race from './modules/race'; - -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, - race - }, - getters -}); - -export default store; diff --git a/src/store/modules/exam.js b/src/store/modules/exam.js index aa709a6fc..9001b0a4e 100644 --- a/src/store/modules/exam.js +++ b/src/store/modules/exam.js @@ -1,4 +1,4 @@ -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; const exam = { namespaced: true, diff --git a/src/store/modules/runplan.js b/src/store/modules/runplan.js index 47df66348..3b95dbcfa 100644 --- a/src/store/modules/runplan.js +++ b/src/store/modules/runplan.js @@ -14,7 +14,9 @@ const runPlan = { refreshCount: 0, // 刷新页面重新加载 initialPlanData: {}, // 运行图原始数据 draftSelected: {}, // 草稿运行图选中对象 - draftStations: [] // 草稿运行图车站列表 + draftStations: [], // 草稿运行图车站列表 + runPlanMap: {}, // 运行图数据map(以id和version 为标识) + runPlanInfo: {} // 运行图信息 }, getters: { stations: (state) => { @@ -22,6 +24,13 @@ const runPlan = { }, draftStations: (state) => { return state.draftStations || []; + }, + getRunPlanData: (state) => { + if (!state.runPlanInfo || !state.runPlanInfo.templateId) { + return ''; + } else { + return state.runPlanMap[`runPlan_${state.runPlanInfo.templateId}_${state.runPlanInfo.version}`]; + } } }, mutations: { @@ -110,6 +119,14 @@ const runPlan = { }, refresh: (state) => { state.refreshCount++; + }, + setRunPlanMap: ( state, data) => { + if (state.runPlanInfo && state.runPlanInfo.templateId) { + state.runPlanMap[`runPlan_${state.runPlanInfo.templateId}_${state.runPlanInfo.version}`] = data; + } + }, + setRunPlanInfo: (state, data) => { + state.runPlanInfo = data; } }, actions: { @@ -186,6 +203,12 @@ const runPlan = { /** 刷新页面*/ refresh: ({commit}) => { commit('refresh'); + }, + setRunPlanInfo: ({commit}, data) => { + commit('setRunPlanInfo', data); + }, + setRunPlanMap: ({commit}, data) => { + commit('setRunPlanMap', data); } } }; diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 7b578ebcf..23738c92f 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -1,4 +1,4 @@ -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; import { Notification } from 'element-ui'; function handle(state, data) { diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index c0569ef83..798608c73 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,11 +2,11 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.8.107:9000'; // 袁琪 // BASE_API = 'http://192.168.8.129:9000'; // 旭强 // BASE_API = 'http://192.168.8.119:9000'; // 张赛 - // BASE_API = 'http://192.168.8.110:9000'; // 杜康 + BASE_API = 'http://192.168.8.110:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 diff --git a/src/utils/loaddata.js b/src/utils/loaddata.js index ca7b282e8..0df18df99 100644 --- a/src/utils/loaddata.js +++ b/src/utils/loaddata.js @@ -1,4 +1,4 @@ -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; import { getPublishMapVersionById, getPublishMapDetailById} from '@/api/jmap/map'; // getNewMapDataByMapId // import { getNewMapDataByGroup } from '@/api/simulation'; diff --git a/src/utils/request.js b/src/utils/request.js index 48c81eb06..df7bc8d42 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -1,5 +1,5 @@ import axios from 'axios'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; import qs from 'qs'; import { i18n } from '@/main.js'; import { MessageBox } from 'element-ui'; diff --git a/src/utils/runPlan.js b/src/utils/runPlan.js index 8fdb324e4..e2674e8bf 100644 --- a/src/utils/runPlan.js +++ b/src/utils/runPlan.js @@ -1,4 +1,4 @@ -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; import { timeFormat } from '@/utils/date'; /** 创建一个车次数据点*/ diff --git a/src/utils/sock.js b/src/utils/sock.js index 2106b4301..b9bfc119a 100644 --- a/src/utils/sock.js +++ b/src/utils/sock.js @@ -2,7 +2,7 @@ import { getToken } from '@/utils/auth'; import { checkLoginLine } from '@/api/login'; import { getBaseUrl } from '@/utils/baseUrl'; import { MessageBox } from 'element-ui'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; import Stomp from 'stompjs'; const isDev = process.env.NODE_ENV === 'development'; diff --git a/src/utils/stomp.js b/src/utils/stomp.js index fa1624804..cde21c9ce 100644 --- a/src/utils/stomp.js +++ b/src/utils/stomp.js @@ -1,6 +1,6 @@ import Vue from 'vue'; import StompClient from '@/utils/sock'; -import store from '@/store/index_APP_TARGET'; +import store from '@/store/index'; export const displayTopic = '/user/queue/simulation'; // 其他仿真topic export const perpetualTopic = '/user/topic/message'; // 公用topic diff --git a/src/views/designPlatform/index.vue b/src/views/designPlatform/index.vue index e411e5b93..a314d144f 100644 --- a/src/views/designPlatform/index.vue +++ b/src/views/designPlatform/index.vue @@ -5,7 +5,8 @@ - + + diff --git a/src/views/drts/scene/modify.vue b/src/views/drts/scene/modify.vue index f54bebfd0..30d124e34 100644 --- a/src/views/drts/scene/modify.vue +++ b/src/views/drts/scene/modify.vue @@ -200,7 +200,6 @@