Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
68a0eadf9b
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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,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--){
|
||||
|
@ -132,9 +132,35 @@ export default class SplitStation extends Group {
|
||||
this.add(this.leftText);
|
||||
this.add(this.rightText);
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation() {}
|
||||
setState() {}
|
||||
setShowMode() {
|
||||
const showMode = this.model.showMode;
|
||||
if (showMode == '04') {
|
||||
this.eachChild(item => item.hide() );
|
||||
return;
|
||||
}
|
||||
const showConditions = this.model.showConditions;
|
||||
if (!showConditions || showConditions === '01' || showMode === showConditions) {
|
||||
this.eachChild(item => item.show() );
|
||||
} else {
|
||||
this.eachChild(item => item.hide() );
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
this.isShowShape = true;
|
||||
} else {
|
||||
this.eachChild(item => {
|
||||
item.hide();
|
||||
});
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
screenShow() {
|
||||
this.eachChild((child) => {
|
||||
child.hide();
|
||||
|
@ -98,11 +98,11 @@
|
||||
<stand-detail ref="standDetail" />
|
||||
<switch-command ref="switchCommand" />
|
||||
<initialize-switch-block ref="initializeSwitchBlock" />
|
||||
<switch-block ref="switchBlock" />
|
||||
<!-- <switch-block ref="switchBlock" /> -->
|
||||
<switch-active ref="switchActive" />
|
||||
<switch-detail ref="switchDetail" />
|
||||
<initialize-signal-guide ref="initializeSignalGuide" />
|
||||
<signal-guide ref="signalGuide" />
|
||||
<!-- <signal-guide ref="signalGuide" /> -->
|
||||
<initialzed-signal-can-block ref="initializeSignalCanBlock" />
|
||||
<signal-can-block ref="signalCanBlock" />
|
||||
<route-command ref="routeCommand" />
|
||||
@ -153,11 +153,11 @@ import AllocateTime from './menuDialog/allocateTime';
|
||||
import StationControl from './menuDialog/stationControl';
|
||||
import SwitchCommand from './menuDialog/switchCommand';
|
||||
import InitializeSwitchBlock from './menuDialog/initializeSwitchBlock';
|
||||
import SwitchBlock from './menuDialog/switchBlock';
|
||||
// import SwitchBlock from './menuDialog/switchBlock';
|
||||
import SwitchActive from './menuDialog/switchActive';
|
||||
import SwitchDetail from './menuDialog/switchDetail';
|
||||
import InitializeSignalGuide from './menuDialog/initializeSignalGuide';
|
||||
import SignalGuide from './menuDialog/signalGuide';
|
||||
// import SignalGuide from './menuDialog/signalGuide';
|
||||
import InitialzedSignalCanBlock from './menuDialog/initializeSignalCanBlock';
|
||||
import SignalCanBlock from './menuDialog/signalCanBlock';
|
||||
import RouteCommand from './menuDialog/routeCommand';
|
||||
@ -203,11 +203,11 @@ export default {
|
||||
StandDetail,
|
||||
SwitchCommand,
|
||||
InitializeSwitchBlock,
|
||||
SwitchBlock,
|
||||
// SwitchBlock,
|
||||
SwitchActive,
|
||||
SwitchDetail,
|
||||
InitializeSignalGuide,
|
||||
SignalGuide,
|
||||
// SignalGuide,
|
||||
InitialzedSignalCanBlock,
|
||||
SignalCanBlock,
|
||||
RouteCommand,
|
||||
@ -1390,6 +1390,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 站台开放/关闭
|
||||
standOpenOrClose() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
@ -1403,6 +1404,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 站台扣车
|
||||
setStandDetain() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
@ -1429,6 +1431,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 停站时间
|
||||
setAllocateTime() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
@ -1442,6 +1445,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 控制权转移
|
||||
authorizeTransfer() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
@ -1481,6 +1485,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔封锁
|
||||
setBlockSwitch() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
@ -1495,6 +1500,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔解除封锁
|
||||
setUnblockSwitch() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
@ -1508,6 +1514,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔授权
|
||||
setSwitchActive() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
@ -1521,6 +1528,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔显示详情
|
||||
showSwitchDetail() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
@ -1534,6 +1542,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号引导
|
||||
setSignalGuide() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
@ -1562,6 +1571,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路指令
|
||||
setRouteCommand() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
|
@ -48,7 +48,7 @@
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { mapGetters } from 'vuex';
|
||||
import SwitchBlock from './switchBlock';
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<el-row>
|
||||
<div class="signal-box-title">开始</div>
|
||||
<div style="border: 1px solid #ACABAA;padding: 8px;">
|
||||
<el-table :data="signalList" height="184px">
|
||||
<el-table :data="signalList" height="184px" highlight-current-row @current-change="handleCurrentChangeStar">
|
||||
<el-table-column prop="name" label="信号机" />
|
||||
</el-table>
|
||||
</div>
|
||||
@ -13,16 +13,20 @@
|
||||
<el-row>
|
||||
<div class="signal-box-title">结束</div>
|
||||
<div style="border: 1px solid #ACABAA;padding: 8px;">
|
||||
<el-table :data="signalList" height="184px">
|
||||
<el-table :data="signalList" height="184px" highlight-current-row @current-change="handleCurrentChangeEnd">
|
||||
<el-table-column prop="name" label="信号机" />
|
||||
</el-table>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="6" class="path-box">
|
||||
<el-table :data="tempData" height="412px">
|
||||
<el-table-column prop="path" label="路径" />
|
||||
<el-table-column prop="direction" label="运行方向" />
|
||||
<el-table ref="singleTable" :data="tempData" height="412px" highlight-current-row @current-change="handleRowChange">
|
||||
<el-table-column prop="name" label="路径" width="125" />
|
||||
<el-table-column prop="direction" label="运行方向">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getRouteDirection(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-checkbox v-model="checked">显示复制路径</el-checkbox>
|
||||
</el-col>
|
||||
@ -33,7 +37,6 @@
|
||||
<el-col :span="18">
|
||||
<div class="border-box">
|
||||
<div class="border-box-title">CBTC</div>
|
||||
<!--<el-table :data="routeList" height="120px" style="position: relative;top: -15px;">-->
|
||||
<el-table
|
||||
ref="singleTable1"
|
||||
:data="routeList"
|
||||
@ -83,7 +86,6 @@
|
||||
<el-row>
|
||||
<div class="border-box">
|
||||
<div class="border-box-title">CBTC</div>
|
||||
<!--<el-table :data="routeList" height="120px" style="position: relative;top: -15px;">-->
|
||||
<el-table
|
||||
ref="singleTable3"
|
||||
:data="routeList"
|
||||
@ -100,7 +102,6 @@
|
||||
</el-row>
|
||||
<el-row class="border-box">
|
||||
<div class="border-box-title">后备</div>
|
||||
<!--<el-table :data="routeList" height="160px" style="position: relative;top: -15px;">-->
|
||||
<el-table
|
||||
ref="singleTable4"
|
||||
:data="routeList"
|
||||
@ -181,6 +182,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
@ -199,6 +201,7 @@ export default {
|
||||
active: false,
|
||||
activeName: 'first',
|
||||
tempData: [],
|
||||
beforeSectionList: [],
|
||||
checked: false,
|
||||
unlockType: 'auto',
|
||||
forbidRoute: false
|
||||
@ -207,6 +210,7 @@ export default {
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'overlapData',
|
||||
'routeList'
|
||||
]),
|
||||
show() {
|
||||
@ -255,10 +259,107 @@ export default {
|
||||
this.$refs.singleTable3.setCurrentRow();
|
||||
this.$refs.singleTable4.setCurrentRow();
|
||||
},
|
||||
// 始端信号机点击
|
||||
handleCurrentChangeStar(val) {
|
||||
if (!val) { return; }
|
||||
this.tempData = [];
|
||||
this.routeList.forEach(item => {
|
||||
if (item.startSignalCode == val.code) {
|
||||
this.tempData.push(item);
|
||||
}
|
||||
});
|
||||
},
|
||||
handleCurrentChangeEnd(val) {
|
||||
if (!val) { return; }
|
||||
const arrList = [];
|
||||
this.tempData.forEach(item => {
|
||||
if (item.endSignalCode == val.code) {
|
||||
arrList.push(item);
|
||||
}
|
||||
});
|
||||
this.tempData = arrList;
|
||||
},
|
||||
restoreBeforeDevices() {
|
||||
// 恢复之前选中设备
|
||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||
this.beforeSectionList.forEach(elem => {
|
||||
elem.routeLock = false;
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/updateMapState', [... this.beforeSectionList]);
|
||||
this.beforeSectionList = [];
|
||||
},
|
||||
handleRowChange(row) {
|
||||
this.$refs.singleTable1.setCurrentRow();
|
||||
this.$refs.singleTable2.setCurrentRow();
|
||||
this.$refs.singleTable3.setCurrentRow();
|
||||
this.$refs.singleTable4.setCurrentRow();
|
||||
if (!row) { return; }
|
||||
// 恢复进路区段的切除状态
|
||||
this.restoreBeforeDevices(); // 清空
|
||||
const containSectionList = [];
|
||||
// 设置选中区段为切除状态
|
||||
if (row.routeSectionList && row.routeSectionList.length) {
|
||||
// 设置新选的进路区段为切除状态
|
||||
row.routeSectionList.forEach(elem => {
|
||||
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
|
||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||
section.logicSectionCodeList.forEach(item => {
|
||||
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item));
|
||||
sec.routeLock = true;
|
||||
containSectionList.push(sec);
|
||||
});
|
||||
} else {
|
||||
section.routeLock = true;
|
||||
containSectionList.push(section);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (this.overlapData[row.overlapCode] && this.overlapData[row.overlapCode].pathList && this.overlapData[row.overlapCode].pathList.length) {
|
||||
this.overlapData[row.overlapCode].pathList.forEach(item => {
|
||||
if (item.sectionList && item.sectionList.length) {
|
||||
item.sectionList.forEach(elem => {
|
||||
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
|
||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||
section.logicSectionCodeList.forEach(logicSectionCode => {
|
||||
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](logicSectionCode));
|
||||
sec.routeLock = true;
|
||||
containSectionList.push(sec);
|
||||
});
|
||||
} else {
|
||||
section.routeLock = true;
|
||||
containSectionList.push(section);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
this.$store.dispatch('training/updateMapState', [...containSectionList]);
|
||||
this.beforeSectionList = containSectionList || [];
|
||||
|
||||
// 设置选中指令
|
||||
const step = {
|
||||
code: `${row.code}`,
|
||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
||||
param: {}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.selected = row;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const step = {
|
||||
over: true,
|
||||
param: {routeCode: this.selected.code, signalCode: this.selected.startSignalCode}
|
||||
param: {
|
||||
routeCode: this.selected.code,
|
||||
signalCode: this.selected.startSignalCode
|
||||
}
|
||||
};
|
||||
if (this.activeName === 'first') {
|
||||
if (this.unlockType === 'auto') {
|
||||
@ -277,11 +378,12 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.$refs.singleTable.setCurrentRow();
|
||||
this.$refs.singleTable2.setCurrentRow();
|
||||
this.$refs.singleTable1.setCurrentRow(val);
|
||||
if (!val) { return; }
|
||||
@ -300,6 +402,7 @@ export default {
|
||||
});
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.$refs.singleTable.setCurrentRow();
|
||||
this.$refs.singleTable1.setCurrentRow();
|
||||
this.$refs.singleTable2.setCurrentRow(val);
|
||||
if (!val) { return; }
|
||||
@ -318,6 +421,7 @@ export default {
|
||||
});
|
||||
},
|
||||
handleCurrentChange3(val) {
|
||||
this.$refs.singleTable.setCurrentRow();
|
||||
this.$refs.singleTable4.setCurrentRow();
|
||||
this.$refs.singleTable3.setCurrentRow(val);
|
||||
if (!val) { return; }
|
||||
@ -336,6 +440,7 @@ export default {
|
||||
});
|
||||
},
|
||||
handleCurrentChange4(val) {
|
||||
this.$refs.singleTable.setCurrentRow();
|
||||
this.$refs.singleTable3.setCurrentRow();
|
||||
this.$refs.singleTable4.setCurrentRow(val);
|
||||
const step = {
|
||||
|
@ -74,6 +74,7 @@ export default {
|
||||
loading: false,
|
||||
selected: null,
|
||||
command: true,
|
||||
isBlock: false,
|
||||
title: ''
|
||||
};
|
||||
},
|
||||
@ -81,9 +82,6 @@ export default {
|
||||
...mapGetters('map', [
|
||||
'switchList'
|
||||
]),
|
||||
isBlock() {
|
||||
return this.operate && this.operate.operation === OperationEvent.Switch.block.confirm.operation;
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
@ -115,6 +113,7 @@ export default {
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
this.operate = operate;
|
||||
this.title = this.operate && this.operate.operation === OperationEvent.Switch.block.confirm.operation ? '确认/取消道岔封锁' : '确认/取消道岔解除封锁';
|
||||
this.isBlock = !!(this.operate && this.operate.operation === OperationEvent.Switch.block.confirm.operation);
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$refs.singleTable.setCurrentRow(selected);
|
||||
@ -140,7 +139,7 @@ export default {
|
||||
cmdType: this.isBlock ? CMD.Switch.CMD_SWITCH_BLOCK : CMD.Switch.CMD_SWITCH_UNBLOCK,
|
||||
operation: this.isBlock ? OperationEvent.Switch.block.confirm1.operation : OperationEvent.Switch.unblock.confirm1.operation,
|
||||
over: true,
|
||||
param: {switchCode: this.selected.code}
|
||||
param: { switchCode: this.selected.code }
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
|
@ -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'; // 张赛
|
||||
|
@ -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){
|
||||
|
@ -178,7 +178,7 @@ export default {
|
||||
},
|
||||
'$store.state.socket.standPfiNum':function(val) {
|
||||
if (val) {
|
||||
console.log(val, 'standPfiNum');
|
||||
// console.log(val, 'standPfiNum');
|
||||
const stationNumList = val;
|
||||
stationNumList.forEach(stationNum=>{
|
||||
stationNum.deviceType = 'STAND';
|
||||
@ -189,7 +189,7 @@ export default {
|
||||
},
|
||||
'$store.state.socket.trainPfiNum':function(val) {
|
||||
if (val) {
|
||||
console.log(val, 'trainPfiNum');
|
||||
// console.log(val, 'trainPfiNum');
|
||||
const trainNumList = this.$store.state.socket.trainPfiNum;
|
||||
trainNumList.forEach(stationNum=>{
|
||||
stationNum.deviceType = 'TRAIN';
|
||||
|
@ -355,7 +355,7 @@ export default {
|
||||
async simulationReset() {
|
||||
await this.$store.dispatch('socket/setSimulationStart');
|
||||
await this.$store.dispatch('map/clearJlmapTrainView');
|
||||
await this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
await this.$store.dispatch('map/setTrainWindowShow', false); // 结束清除车次窗显示
|
||||
await this.$store.dispatch('training/over');
|
||||
await this.$store.dispatch('map/resetActiveTrainList');
|
||||
await this.$store.dispatch('socket/setSimulationReset'); // 清空
|
||||
|
@ -473,9 +473,7 @@ export default {
|
||||
saveMapEvent() { // 保存地图
|
||||
const map = this.$store.state.map.map;
|
||||
// map.signalList.forEach(item => {
|
||||
// // item.interlockStationCode = item.stationCode;
|
||||
// item.lampPostType = '02';
|
||||
// item.lampPositionType = '01';
|
||||
// item.uniqueName = item.name;
|
||||
// });
|
||||
if (this.$refs.jlmapVisual && map && parseInt(this.$route.params.mapId)) {
|
||||
if (this.verifySectionPoint(map)) {
|
||||
|
@ -25,6 +25,8 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
import { getUID } from '@/jmapNew/utils/Uid';
|
||||
import OperateProperty from './components/operateProperty';
|
||||
import CreateOperate from './components/createOperate';
|
||||
@ -52,6 +54,7 @@ export default {
|
||||
type: 'SplitStation',
|
||||
rightStationName: '',
|
||||
leftStationName: '',
|
||||
showConditions: '01',
|
||||
position: {
|
||||
x: 0,
|
||||
y: 0
|
||||
@ -63,6 +66,12 @@ export default {
|
||||
...mapGetters('map', [
|
||||
'splitStationList'
|
||||
]),
|
||||
showConditionsList() {
|
||||
const showConditionsList = ConstConfig.ConstSelect.showConditionsList;
|
||||
return Cookies.get('user_lang') == 'en'
|
||||
? showConditionsList.map(elem => { return { value: elem.value, label: elem.enlabel }; })
|
||||
: showConditionsList.map(elem => { return { value: elem.value, label: elem.label }; });
|
||||
},
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '150px',
|
||||
@ -77,6 +86,7 @@ export default {
|
||||
{ prop: 'code', label: `${this.$t('map.code')}`, type: 'select', optionLabel: 'code', optionValue: 'code', options: this.splitStationList, isHidden:this.activeName == 'second'},
|
||||
{ prop: 'rightStationName', label: this.$t('map.rightCentralStationName'), type: 'input'},
|
||||
{ prop: 'leftStationName', label: this.$t('map.leftCentralStationName'), type: 'input'},
|
||||
{ prop: 'showConditions', label: '显示条件', type: 'radio', optionLabel: 'label', optionValue:'value', radioList: this.showConditionsList},
|
||||
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '140px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
||||
@ -113,6 +123,7 @@ export default {
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
this.editModel.type = selected._type;
|
||||
this.editModel.showConditions = selected.showConditions;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user