Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
34bff76eb5
@ -1,4 +1,4 @@
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default {
|
||||
bind(el) {
|
||||
|
@ -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 {
|
||||
|
@ -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();
|
||||
|
@ -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';
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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';
|
||||
|
@ -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) {
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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<passerStation.stationlist.length;i++){
|
||||
if(passerStation.stationlist[i].code == data.body){
|
||||
jl3d.changestation(passerStation.stationlist[i].name);
|
||||
@ -44,7 +43,7 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
|
||||
}
|
||||
/** 站台客流当前人数信息 */
|
||||
if(data.type == "STAND_PFI"){
|
||||
|
||||
// console.log(data);
|
||||
let newStandData = data.body;
|
||||
let count = 0;
|
||||
for(let j=0;j<passerStation.stationlist.length;j++){
|
||||
@ -199,6 +198,13 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(data.type == 'Device_Load_Destroy_3D'){
|
||||
start = true;
|
||||
console.log("仿真重开=====================");
|
||||
}
|
||||
|
||||
|
||||
if(data.type == 'Simulation_Over') {
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.reload();
|
||||
|
@ -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<data.body.length;i++){
|
||||
|
||||
trafficTrain.trainList[data.body[i].code].endStation = data.body[i].endStation;
|
||||
@ -131,7 +136,10 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe
|
||||
|
||||
}
|
||||
}
|
||||
if(data.type == 'Device_Load_Destroy_3D'){
|
||||
restart = true;
|
||||
|
||||
}
|
||||
if(data.type == 'Simulation_Over') {
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.reload();
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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(){
|
||||
|
@ -1,8 +1,5 @@
|
||||
export function PasserHuman() {
|
||||
let scope = this;
|
||||
|
||||
|
||||
|
||||
//初始人物模型和动画
|
||||
let originhuman1 = null;
|
||||
let originhuman2 = null;
|
||||
|
@ -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--){
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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';
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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';
|
||||
|
||||
/** 区段*/
|
||||
|
@ -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';
|
||||
|
@ -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();
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
||||
/** 列车 */
|
||||
|
@ -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) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import store from '@/store/index';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
|
||||
/** 创建一个车次数据点*/
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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';
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -149,6 +149,9 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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: '潏河停车场',
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import store from '@/store/index';
|
||||
|
||||
const { body } = document;
|
||||
const WIDTH = 1024;
|
||||
|
@ -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);
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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;
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import store from '@/store/index';
|
||||
|
||||
const exam = {
|
||||
namespaced: true,
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -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) {
|
||||
|
@ -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'; // 张赛
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import store from '@/store/index';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
|
||||
/** 创建一个车次数据点*/
|
||||
|
@ -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';
|
||||
|
@ -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
|
||||
|
@ -5,7 +5,8 @@
|
||||
</div>
|
||||
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
|
||||
<transition>
|
||||
<router-view :product-list="productList" :width-left="widthLeft" />
|
||||
<!-- :product-list="productList" -->
|
||||
<router-view :width-left="widthLeft" />
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -200,7 +200,6 @@
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
// import store from '@/store/index_APP_TARGET';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
import {getScriptByIdNew} from '@/api/script';
|
||||
|
@ -43,7 +43,7 @@
|
||||
import Vue from 'vue';
|
||||
import localStore from 'storejs';
|
||||
import axios from 'axios';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import store from '@/store/index';
|
||||
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
<el-tab-pane label="资源" name="models">
|
||||
<el-scrollbar style="margin-bottom:1px">
|
||||
<el-form ref="form" label-width="130px" size="mini">
|
||||
|
||||
<div class="modellist" v-for="(asset,index) in nowAssetList" @click="modelSelect(index)">
|
||||
|
||||
<div >
|
||||
<img class="modelpic"
|
||||
:style="{'background-image': 'url('+localStatic+'/texture/modelfile.png)'}"
|
||||
@ -18,7 +20,8 @@
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="清空当前选项内容" name="delet">
|
||||
</el-tab-pane>
|
||||
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
@ -178,7 +178,7 @@ export default {
|
||||
if (this.$route.query.type == 'CCTV') {
|
||||
this.isCctv = false;
|
||||
}
|
||||
window.updateValue = this.updateValue;
|
||||
window.updateTrafficTrainValue = this.updateTrafficTrainValue;
|
||||
window.updateTrainNum = this.updateTrainNum;
|
||||
},
|
||||
|
||||
@ -215,7 +215,8 @@ export default {
|
||||
this.isActive=index;
|
||||
this.jl3d.switchcamera(index+'');
|
||||
},
|
||||
updateValue(newcode){
|
||||
updateTrafficTrainValue(newcode){
|
||||
this.nowCode = newcode;
|
||||
this.value = newcode;
|
||||
},
|
||||
|
||||
@ -252,6 +253,7 @@ export default {
|
||||
for(let i = 0;i<this.takelist.length;i++){
|
||||
this.allPassers = this.allPassers + this.takelist[i].num;
|
||||
}
|
||||
|
||||
this.value = this.nowCode+"(现有乘客"+this.allPassers+"人)";
|
||||
},
|
||||
getnum(num,pnum){
|
||||
|
@ -181,23 +181,34 @@ export default {
|
||||
if (this.$route.query.group) {
|
||||
// 获取排序的车站列表
|
||||
getByGroupStationList(this.$route.query.group).then(response => {
|
||||
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
||||
getEveryDayRunPlanNew(this.$route.query.group).then(async resp => { // 获取仿真运行图
|
||||
await this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||
await this.$store.dispatch('runPlan/setInitialPlanData', resp.data);
|
||||
this.$store.dispatch('runPlan/setStations', response.data).then(async() => {
|
||||
if (this.$store.getters['runPlan/getRunPlanData']) {
|
||||
await this.$store.dispatch('runPlan/setPlanData', this.$store.getters['runPlan/getRunPlanData']);
|
||||
await this.$store.dispatch('runPlan/setInitialPlanData', this.$store.getters['runPlan/getRunPlanData']);
|
||||
this.loadChartPage();
|
||||
this.setPosition();
|
||||
this.loadInitData();
|
||||
this.inter && clearInterval(this.inter);
|
||||
this.subscribe();
|
||||
}).catch(error => {
|
||||
this.$store.dispatch('runPlan/setPlanData', []);
|
||||
if (error.code == 30001) {
|
||||
this.$messageBox(this.$t('display.schema.todayRunDiagramNoLoad'));
|
||||
} else {
|
||||
!this.dataError && this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
getEveryDayRunPlanNew(this.$route.query.group).then(async resp => { // 获取仿真运行图
|
||||
await this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||
await this.$store.dispatch('runPlan/setInitialPlanData', resp.data);
|
||||
this.$store.dispatch('runPlan/setRunPlanMap', resp.data);
|
||||
this.loadChartPage();
|
||||
this.setPosition();
|
||||
this.loadInitData();
|
||||
this.inter && clearInterval(this.inter);
|
||||
this.subscribe();
|
||||
}).catch(error => {
|
||||
this.$store.dispatch('runPlan/setPlanData', []);
|
||||
if (error.code == 30001) {
|
||||
this.$messageBox(this.$t('display.schema.todayRunDiagramNoLoad'));
|
||||
} else {
|
||||
!this.dataError && this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('display.schema.getStationListFail'));
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
<script>
|
||||
import PlanSchedule from '@/views/planSchedule/index';
|
||||
import { getEveryDayRunPlanNew } from '@/api/simulation';
|
||||
import { getEveryDayRunPlanNew, getSimulationInfoNew } from '@/api/simulation';
|
||||
|
||||
// 运行图加载
|
||||
export default {
|
||||
@ -39,16 +39,24 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.runPlanReloadCount': function (val) {
|
||||
getEveryDayRunPlanNew(this.group).then(resp => {
|
||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||
this.$store.dispatch('runPlan/setInitialPlanData', resp.data);
|
||||
this.viewDisabled = false;
|
||||
}).catch(error => {
|
||||
this.$store.dispatch('runPlan/setPlanData', []);
|
||||
if (error.code == 30001) {
|
||||
this.$messageBox(this.$t('display.schema.todayRunDiagramNoLoad'));
|
||||
getSimulationInfoNew(this.group).then(res => {
|
||||
this.$store.dispatch('runPlan/setRunPlanInfo', res.data.runPlan);
|
||||
if (this.$store.getters['runPlan/getRunPlanData']) {
|
||||
this.$store.dispatch('runPlan/setPlanData', this.$store.getters['runPlan/getRunPlanData']);
|
||||
this.$store.dispatch('runPlan/setInitialPlanData', this.$store.getters['runPlan/getRunPlanData']);
|
||||
} else {
|
||||
this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
||||
getEveryDayRunPlanNew(this.group).then(resp => {
|
||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||
this.$store.dispatch('runPlan/setInitialPlanData', resp.data);
|
||||
this.$store.dispatch('runPlan/setRunPlanMap', resp.data);
|
||||
}).catch(error => {
|
||||
this.$store.dispatch('runPlan/setPlanData', []);
|
||||
if (error.code == 30001) {
|
||||
this.$messageBox(this.$t('display.schema.todayRunDiagramNoLoad'));
|
||||
} else {
|
||||
this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -208,6 +208,7 @@ export default {
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); // 是否暂停判断
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
|
||||
this.$store.dispatch('training/countTime');
|
||||
this.$store.dispatch('runPlan/setRunPlanInfo', resp.data.runPlan);
|
||||
this.planRunning = resp.data.planRunning;
|
||||
if (resp.data.planRunning) {
|
||||
this.$store.commit('training/start');
|
||||
|
@ -4,6 +4,7 @@
|
||||
<select-station v-if="isLocalStation && !isScript" ref="selectStation" :style-css="'width: 100px;'" />
|
||||
<template v-if="!dataError&& project !== 'bjd'">
|
||||
<el-button-group>
|
||||
<el-button v-if="isLocalStation" size="small" @click="goIbp">IBP盘</el-button>
|
||||
<el-button v-if="isScheduling && isDepot" size="small" type="primary" @click="runPlanEditShow">运行图编辑</el-button>
|
||||
<!-- 加载剧本 -->
|
||||
<el-button v-if="isDemon && !isScheduling && !isContest" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{ $t('display.schema.loadScript') }}</el-button>
|
||||
@ -37,6 +38,7 @@ import { getByGroupStationList } from '@/api/jmap/map';
|
||||
import { getEveryDayRunPlanNew } from '@/api/simulation';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getIbpInfoByStation } from '@/api/ibp';
|
||||
|
||||
// 右上角操作
|
||||
export default {
|
||||
@ -142,18 +144,25 @@ export default {
|
||||
// 获取排序的车站列表
|
||||
getByGroupStationList(this.group).then(response => {
|
||||
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
||||
getEveryDayRunPlanNew(this.group).then(resp => { // 获取仿真运行图
|
||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||
this.$store.dispatch('runPlan/setInitialPlanData', resp.data);
|
||||
if (this.$store.getters['runPlan/getRunPlanData']) {
|
||||
this.$store.dispatch('runPlan/setPlanData', this.$store.getters['runPlan/getRunPlanData']);
|
||||
this.$store.dispatch('runPlan/setInitialPlanData', this.$store.getters['runPlan/getRunPlanData']);
|
||||
this.viewDisabled = false;
|
||||
}).catch(error => {
|
||||
this.$store.dispatch('runPlan/setPlanData', []);
|
||||
if (error.code == 30001) {
|
||||
this.$messageBox(this.$t('display.schema.todayRunDiagramNoLoad'));
|
||||
} else {
|
||||
!this.dataError && this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
getEveryDayRunPlanNew(this.group).then(resp => { // 获取仿真运行图
|
||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||
this.$store.dispatch('runPlan/setInitialPlanData', resp.data);
|
||||
this.$store.dispatch('runPlan/setRunPlanMap', resp.data);
|
||||
this.viewDisabled = false;
|
||||
}).catch(error => {
|
||||
this.$store.dispatch('runPlan/setPlanData', []);
|
||||
if (error.code == 30001) {
|
||||
this.$messageBox(this.$t('display.schema.todayRunDiagramNoLoad'));
|
||||
} else {
|
||||
!this.dataError && this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('display.schema.getStationListFail'));
|
||||
@ -231,6 +240,34 @@ export default {
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
},
|
||||
goIbp() {
|
||||
const deviceCode = this.$refs.selectStation.showStation;
|
||||
getIbpInfoByStation(this.$route.query.mapId, deviceCode).then(resp => {
|
||||
if (resp.data) {
|
||||
const routeData = this.$router.resolve({
|
||||
path:`/ibpShow`,
|
||||
query:{
|
||||
lineCode: this.$route.query.lineCode,
|
||||
mapId: this.$route.query.mapId,
|
||||
group: this.$route.query.group,
|
||||
stationCode: deviceCode,
|
||||
loadAll: true,
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
} else {
|
||||
this.$messageBox('本车站暂无IBP盘数据!');
|
||||
}
|
||||
}).catch((error) => {
|
||||
if (error.code == '10007') {
|
||||
this.$messageBox('本车站暂无IBP盘数据!');
|
||||
} else {
|
||||
this.$message.error('获取IBP盘数据异常');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -62,7 +62,7 @@
|
||||
<el-dialog
|
||||
title="切换客流数据"
|
||||
:visible.sync="flowDataShow"
|
||||
top="50px"
|
||||
top="150px"
|
||||
width="400px"
|
||||
:before-do-close="flowDataClose"
|
||||
:close-on-click-modal="false"
|
||||
@ -75,7 +75,7 @@
|
||||
<el-option
|
||||
v-for="item in flowDataList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:label="item.name==currentFlowDataName?item.name+' [运行中]':item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
@ -177,29 +177,37 @@ export default {
|
||||
});
|
||||
},
|
||||
'$store.state.socket.standPfiNum':function(val) {
|
||||
const stationNumList = val;
|
||||
stationNumList.forEach(stationNum=>{
|
||||
stationNum.deviceType = 'STAND';
|
||||
stationNum.code = stationNum.standCode;
|
||||
});
|
||||
this.$store.dispatch('training/updateMapState', stationNumList);
|
||||
if (val) {
|
||||
// console.log(val, 'standPfiNum');
|
||||
const stationNumList = val;
|
||||
stationNumList.forEach(stationNum=>{
|
||||
stationNum.deviceType = 'STAND';
|
||||
stationNum.code = stationNum.standCode;
|
||||
});
|
||||
this.$store.dispatch('training/updateMapState', stationNumList);
|
||||
}
|
||||
},
|
||||
'$store.state.socket.trainPfiNum':function(val) {
|
||||
const trainNumList = this.$store.state.socket.trainPfiNum;
|
||||
trainNumList.forEach(stationNum=>{
|
||||
stationNum.deviceType = 'TRAIN';
|
||||
console.log(stationNum.num, 'inital');
|
||||
});
|
||||
this.$store.dispatch('training/updateMapState', trainNumList);
|
||||
if (val) {
|
||||
// console.log(val, 'trainPfiNum');
|
||||
const trainNumList = this.$store.state.socket.trainPfiNum;
|
||||
trainNumList.forEach(stationNum=>{
|
||||
stationNum.deviceType = 'TRAIN';
|
||||
console.log(stationNum.num, 'inital');
|
||||
});
|
||||
this.$store.dispatch('training/updateMapState', trainNumList);
|
||||
}
|
||||
},
|
||||
'$store.state.socket.trainPfiBL':function(val) {
|
||||
const trainNum = this.$store.state.socket.trainPfiBL;
|
||||
const device = this.$store.getters['map/getDeviceByCode'](trainNum.code);
|
||||
trainNum.deviceType = 'TRAIN';
|
||||
// console.log(trainNum, device, device.num, trainNum.in, trainNum.out, 'changed');
|
||||
trainNum.num = device.num + trainNum.in - trainNum.out;
|
||||
// console.log(trainNum.num, 'changeder');
|
||||
this.$store.dispatch('training/updateMapState', [trainNum]);
|
||||
if (val) {
|
||||
const trainNum = this.$store.state.socket.trainPfiBL;
|
||||
const device = this.$store.getters['map/getDeviceByCode'](trainNum.code);
|
||||
trainNum.deviceType = 'TRAIN';
|
||||
// console.log(trainNum, device, device.num, trainNum.in, trainNum.out, 'changed');
|
||||
trainNum.num = device.num + trainNum.in - trainNum.out;
|
||||
// console.log(trainNum.num, 'changeder');
|
||||
this.$store.dispatch('training/updateMapState', [trainNum]);
|
||||
}
|
||||
},
|
||||
'$store.state.socket.isFirst':function(val) {
|
||||
if (val) {
|
||||
@ -269,6 +277,7 @@ export default {
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); // 是否暂停判断
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
|
||||
this.$store.dispatch('training/countTime');
|
||||
this.$store.dispatch('runPlan/setRunPlanInfo', resp.data.runPlan);
|
||||
this.planRunning = resp.data.planRunning;
|
||||
if (resp.data.planRunning) {
|
||||
this.$store.commit('training/start');
|
||||
@ -293,9 +302,13 @@ export default {
|
||||
this.flowDataShow = false;
|
||||
},
|
||||
confirmFlowData() {
|
||||
if (this.passengerFlowId) {
|
||||
changePassengerFlowData(this.group, this.passengerFlowId).then(res=>{
|
||||
this.$store.dispatch('map/mapClear');
|
||||
if (this.currentFlowDataId) {
|
||||
changePassengerFlowData(this.group, this.currentFlowDataId).then(res=>{
|
||||
this.$store.dispatch('socket/resetTrainPassagerNum');
|
||||
// this.$store.dispatch('map/mapClear');
|
||||
this.flowDataShow = false;
|
||||
const currentFlowData = this.flowDataList.find(each=>{ return each.id == this.currentFlowDataId; });
|
||||
if (currentFlowData) { this.currentFlowDataName = currentFlowData.name; }
|
||||
}).catch(error=>{
|
||||
this.$messageBox('切换客流数据失败');
|
||||
console.log(error.message);
|
||||
@ -359,6 +372,8 @@ export default {
|
||||
},
|
||||
changeFlowData() {
|
||||
this.flowDataShow = true;
|
||||
const currentFlowData = this.flowDataList.find(each=>{ return each.name == this.currentFlowDataName; });
|
||||
if (currentFlowData) { this.currentFlowDataId = currentFlowData.id; }
|
||||
},
|
||||
end() {
|
||||
exitRunPlan(this.group).then(() => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import store from '@/store/index';
|
||||
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
|
||||
// 操作
|
||||
export const operateEnum = {
|
||||
|
@ -156,6 +156,7 @@ export default {
|
||||
const resp = await getSimulationInfoNew(this.group);
|
||||
if (resp && resp.code == 200 && resp.data && !resp.data.dataError) {
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause);
|
||||
this.$store.dispatch('runPlan/setRunPlanInfo', resp.data.runPlan);
|
||||
if (resp.data.planRunning) {
|
||||
this.$store.dispatch('training/start');// 仿真开始按计划行车
|
||||
} else {
|
||||
@ -302,18 +303,25 @@ export default {
|
||||
// 获取排序的车站列表
|
||||
getByGroupStationList(this.group).then(response => {
|
||||
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
||||
getEveryDayRunPlanNew(this.group).then(resp => { // 获取仿真运行图
|
||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||
this.$store.dispatch('runPlan/setInitialPlanData', resp.data);
|
||||
if (this.$store.getters['runPlan/getRunPlanData']) {
|
||||
this.$store.dispatch('runPlan/setPlanData', this.$store.getters['runPlan/getRunPlanData']);
|
||||
this.$store.dispatch('runPlan/setInitialPlanData', this.$store.getters['runPlan/getRunPlanData']);
|
||||
this.viewDisabled = false;
|
||||
}).catch(error => {
|
||||
this.$store.dispatch('runPlan/setPlanData', []);
|
||||
if (error.code == 30001) {
|
||||
this.$messageBox(this.$t('display.schema.todayRunDiagramNoLoad'));
|
||||
} else {
|
||||
!this.dataError && this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
getEveryDayRunPlanNew(this.group).then(resp => { // 获取仿真运行图
|
||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||
this.$store.dispatch('runPlan/setInitialPlanData', resp.data);
|
||||
this.$store.dispatch('runPlan/setRunPlanMap', resp.data);
|
||||
this.viewDisabled = false;
|
||||
}).catch(error => {
|
||||
this.$store.dispatch('runPlan/setPlanData', []);
|
||||
if (error.code == 30001) {
|
||||
this.$messageBox(this.$t('display.schema.todayRunDiagramNoLoad'));
|
||||
} else {
|
||||
!this.dataError && this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('display.schema.getStationListFail'));
|
||||
|
@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<el-select v-if="showSelectStation" v-model="showStation" :style="styleCss" size="small" @change="switchStationMode">
|
||||
<el-select v-model="oldShowMemberId" :style="styleCss" size="small" @change="switchStationMode">
|
||||
<el-option v-for="item in stationListMode" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { assignUsersPlayRoles } from '@/api/jointSimulation';
|
||||
export default {
|
||||
name:'SelectStation',
|
||||
props:{
|
||||
@ -16,8 +17,10 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
stationListMode: [], // 设备集中站列表
|
||||
showStation: '', // 展示的设备集中站
|
||||
showSelectStation: false // 是否展示现地选择设备集中站select
|
||||
showMemberId: '', // 展示的值班站memberId
|
||||
oldShowMemberId: '',
|
||||
stationCentralizedMap: {},
|
||||
showStation: ''
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
@ -27,45 +30,42 @@ export default {
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'stationList': function () {
|
||||
this.setStationList();
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识 开始加载默认状态
|
||||
this.setMode();
|
||||
this.setStationList();
|
||||
this.switchStationMode(this.showStation);
|
||||
},
|
||||
'$store.state.training.centerStationCode': function(code) {
|
||||
if (code) {
|
||||
this.showStation = code;
|
||||
}
|
||||
},
|
||||
'$store.state.training.prdType': function (val) { // 根据权限类型计算高度
|
||||
this.setMode();
|
||||
},
|
||||
'$store.state.socket.simulationStart':function(val) {
|
||||
if (val) {
|
||||
if (this.$route.query.lineCode == '06') {
|
||||
this.switchStationMode(this.showStation);// 宁波线 过滤列车显示
|
||||
'$store.state.training.memberData': function (val) {
|
||||
this.$store.state.training.memberList.forEach(item => {
|
||||
if (item.type === 'STATION_SUPERVISOR') {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
||||
this.stationListMode.push({value:item.id, name: station.name});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
'$store.state.training.simulationUserList': function(val) {
|
||||
this.$store.state.training.simulationUserList.forEach(item => {
|
||||
if (item.userId == this.$store.state.user.id) {
|
||||
this.showMemberId = item.memberId;
|
||||
this.oldShowMemberId = item.memberId;
|
||||
}
|
||||
});
|
||||
this.stationList.forEach(item => {
|
||||
if (item.centralized) {
|
||||
this.stationCentralizedMap[item.code] = item.code;
|
||||
item.chargeStationCodeList.forEach(ele => {
|
||||
this.stationCentralizedMap[ele] = item.code;
|
||||
});
|
||||
}
|
||||
});
|
||||
this.switchStationMode( this.showMemberId);
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
setMode() {
|
||||
if (this.map) {
|
||||
this.showSelectStation = this.map.skinVO.code === '06' && this.$store.state.training.prdType === '01';
|
||||
}
|
||||
},
|
||||
switchStationMode(val) {
|
||||
if (this.stationListMode.length > 0) {
|
||||
if (val == null) {
|
||||
this.showStation = this.stationListMode[0].value;
|
||||
} else {
|
||||
this.showStation = val;
|
||||
}
|
||||
assignUsersPlayRoles([{ userId: this.$store.state.user.id, memberId: val}], this.$route.query.group).then(resp => {
|
||||
this.showMemberId = val;
|
||||
const nameList = Object.keys(this.$store.state.map.map);
|
||||
let list = [];
|
||||
const member = this.$store.state.training.memberData[val];
|
||||
const station = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
|
||||
this.showStation = station.code;
|
||||
const showStationCode = this.stationCentralizedMap[station.code];
|
||||
nameList.forEach(item => {
|
||||
if (this.$store.state.map.map[item] && this.$store.state.map.map[item].constructor === Array) {
|
||||
if (item === 'trainList') {
|
||||
@ -77,25 +77,15 @@ export default {
|
||||
}
|
||||
}
|
||||
});
|
||||
this.$jlmap.updateShowStation(list, this.showStation);
|
||||
this.setCenter(this.showStation);
|
||||
// this.$store.dispatch('map/setShowCentralizedStationCode', this.showStation);
|
||||
// this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
}
|
||||
this.$jlmap.updateShowStation(list, showStationCode);
|
||||
this.setCenter(showStationCode);
|
||||
}).catch(() => {
|
||||
this.showMemberId = this.oldShowMemberId;
|
||||
this.$message.error('调整角色成员失败!');
|
||||
});
|
||||
},
|
||||
setCenter(code) {
|
||||
this.$jlmap.setCenter(code);
|
||||
},
|
||||
setStationList() {
|
||||
this.stationListMode = [];
|
||||
(this.stationList || []).forEach(item => {
|
||||
if (item.centralized) {
|
||||
this.stationListMode.push({value: item.code, name: item.name});
|
||||
}
|
||||
});
|
||||
if (this.stationListMode.length && this.showSelectStation) {
|
||||
this.showStation = this.stationListMode[0].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import store from '@/store/index';
|
||||
export function covertMemberData (activeTrainList, resp) {
|
||||
let lastData = JSON.stringify(resp);
|
||||
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
||||
|
@ -160,10 +160,10 @@ export default {
|
||||
},
|
||||
'$store.state.training.prdType': function (prdType) {
|
||||
this.setPosition();
|
||||
if (prdType == '01' && this.$route.query.lineCode == '06') {
|
||||
if (prdType == '01') {
|
||||
this.showSelectStation = true;
|
||||
this.cancelBigScreenMode();
|
||||
} else if (prdType == '02' && this.$route.query.lineCode == '06') {
|
||||
} else if (prdType == '02') {
|
||||
this.showSelectStation = false;
|
||||
this.cancelBigScreenMode();
|
||||
} else if (prdType == '07') { // 大屏
|
||||
@ -313,6 +313,7 @@ export default {
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause);// 设置剧本暂停装填
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));// 设置仿真时间
|
||||
this.$store.dispatch('training/countTime');// 前端仿真时间开始跑秒
|
||||
this.$store.dispatch('runPlan/setRunPlanInfo', resp.data.runPlan);
|
||||
if (resp.data.planRunning) {
|
||||
this.$store.dispatch('training/start');// 仿真开始按计划行车
|
||||
} else {
|
||||
@ -367,18 +368,14 @@ export default {
|
||||
this.$store.dispatch('training/setRoles', 'DISPATCHER');
|
||||
this.hideIbp();
|
||||
this.drivingShow = false;
|
||||
if (this.lineCode === '07' || this.lineCode === '06') {
|
||||
this.mapViewLoadedOver && this.setShowStation('');
|
||||
}
|
||||
this.mapViewLoadedOver && this.setShowStation('');
|
||||
this.jl3dmaintainershow = false;
|
||||
break;
|
||||
case 'STATION_SUPERVISOR':
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
|
||||
if (this.lineCode === '06' && deviceCode) {
|
||||
this.$refs.menuSchema.chiShowStation = deviceCode;
|
||||
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
|
||||
}
|
||||
this.$refs.menuSchema.chiShowStation = deviceCode;
|
||||
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
|
||||
this.jl3dmaintainershow = false;
|
||||
this.drivingShow = false;
|
||||
break;
|
||||
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div style="height:100%">
|
||||
<div class="schema" :style="{top: offset+'px'}">
|
||||
<el-select v-if="showSelectStation" v-model="chiShowStation" style="width: 100px;" size="small" @change="switchStationMode">
|
||||
<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
<!--<el-select v-if="showSelectStation" v-model="chiShowStation" style="width: 100px;" size="small" @change="switchStationMode">-->
|
||||
<!--<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />-->
|
||||
<!--</el-select>-->
|
||||
<el-button-group>
|
||||
<el-button v-if="userRole=== 'STATION_SUPERVISOR' && !$route.query.projectDevice" size="small" @click="goIbp">IBP盘</el-button>
|
||||
<el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice" size="small" @click="goBigScreen">大屏</el-button>
|
||||
@ -143,19 +143,28 @@ export default {
|
||||
getByGroupStationList(this.$route.query.group).then(response => {
|
||||
const stations = response.data;
|
||||
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
||||
getEveryDayRunPlanNew(this.group).then(resp => {
|
||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||
this.$store.dispatch('runPlan/setInitialPlanData', resp.data);
|
||||
if (this.$store.getters['runPlan/getRunPlanData']) {
|
||||
this.$store.dispatch('runPlan/setPlanData', this.$store.getters['runPlan/getRunPlanData']);
|
||||
this.$store.dispatch('runPlan/setInitialPlanData', this.$store.getters['runPlan/getRunPlanData']);
|
||||
this.viewDisabled = false;
|
||||
this.firstLoad = false;
|
||||
}).catch(error => {
|
||||
this.$store.dispatch('runPlan/setPlanData', []);
|
||||
if (error.code == 30001) {
|
||||
this.$messageBox(this.$t('error.runGraphIsNotLoaded'));
|
||||
} else {
|
||||
!this.dataError && this.$messageBox(this.$t('error.obtainOperationGraphFailed'));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
getEveryDayRunPlanNew(this.group).then(resp => {
|
||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||
this.$store.dispatch('runPlan/setInitialPlanData', resp.data);
|
||||
this.$store.dispatch('runPlan/setRunPlanMap', resp.data);
|
||||
this.viewDisabled = false;
|
||||
this.firstLoad = false;
|
||||
}).catch(error => {
|
||||
this.$store.dispatch('runPlan/setPlanData', []);
|
||||
if (error.code == 30001) {
|
||||
this.$messageBox(this.$t('error.runGraphIsNotLoaded'));
|
||||
} else {
|
||||
!this.dataError && this.$messageBox(this.$t('error.obtainOperationGraphFailed'));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('error.obtainStationListFailed'));
|
||||
@ -231,7 +240,7 @@ export default {
|
||||
this.$messageBox('本车站暂无IBP盘数据!');
|
||||
}
|
||||
}).catch((error) => {
|
||||
if (error.code == '30001') {
|
||||
if (error.code == '10007') {
|
||||
this.$messageBox('本车站暂无IBP盘数据!');
|
||||
} else {
|
||||
this.$message.error('获取IBP盘数据异常');
|
||||
@ -244,7 +253,7 @@ export default {
|
||||
</script>
|
||||
<style>
|
||||
.schema {
|
||||
z-index: 8;
|
||||
z-index: 18;
|
||||
display: inline;
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
|
@ -139,7 +139,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
// this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
formatName(code) {
|
||||
|
@ -64,7 +64,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
// this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
formatName(code) {
|
||||
|
@ -68,10 +68,12 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.runPlan.planLoadedCount': function() {
|
||||
this.currentPlanId = this.$store.state.runPlan.planData.id;
|
||||
this.tableData.forEach(item => {
|
||||
item.$loading = item.id === this.currentPlanId;
|
||||
});
|
||||
if (this.$store.state.runPlan.runPlanInfo && this.$store.state.runPlan.runPlanInfo.id) {
|
||||
this.currentPlanId = this.$store.state.runPlan.runPlanInfo.id;
|
||||
this.tableData.forEach(item => {
|
||||
item.$loading = item.id === this.currentPlanId;
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -85,7 +87,7 @@ export default {
|
||||
},
|
||||
initPageData() {
|
||||
this.tableData = [];
|
||||
this.currentPlanId = this.$store.state.runPlan.planData.id;
|
||||
this.currentPlanId = this.$store.state.runPlan.runPlanInfo.id;
|
||||
queryRunPlanList(this.$route.query.mapId).then(resp =>{
|
||||
if (resp.data && resp.data.length) {
|
||||
resp.data.forEach(item => {
|
||||
|
Loading…
Reference in New Issue
Block a user