修改sdy行调沙盘,现地cctv
This commit is contained in:
parent
96e2179bd7
commit
d257bf254b
@ -116,7 +116,9 @@ export function sandBoxConnect(manager,routegroup,section,signal,station,train )
|
||||
train.trainGroup.add(train.trainlist[data.body[i].code]);
|
||||
}else{
|
||||
let realprogress = section.topSectionList[data.body[i].section].leftProgress+(section.topSectionList[data.body[i].section].rightProgress - section.topSectionList[data.body[i].section].leftProgress)*data.body[i].offset;
|
||||
train.trainlist[data.body[i].code].position.copy(manager.topCurve.getPoint(realprogress));
|
||||
let realpos = manager.topCurve.getPoint(realprogress);
|
||||
train.trainlist[data.body[i].code].position.x = realpos.x;
|
||||
train.trainlist[data.body[i].code].position.z = realpos.z;
|
||||
|
||||
train.trainlist[data.body[i].code].up = new THREE.Vector3(1,0,0);
|
||||
let tangent = manager.topCurve.getTangentAt(realprogress).normalize();
|
||||
@ -144,7 +146,10 @@ export function sandBoxConnect(manager,routegroup,section,signal,station,train )
|
||||
}else{
|
||||
|
||||
let realprogress = section.downSectionList[data.body[i].section].leftProgress +(section.downSectionList[data.body[i].section].rightProgress - section.downSectionList[data.body[i].section].leftProgress)*data.body[i].offset;
|
||||
train.trainlist[data.body[i].code].position.copy(manager.downCurve.getPoint(realprogress));
|
||||
let realpos = manager.downCurve.getPoint(realprogress);
|
||||
train.trainlist[data.body[i].code].position.x = realpos.x;
|
||||
train.trainlist[data.body[i].code].position.z = realpos.z;
|
||||
|
||||
|
||||
train.trainlist[data.body[i].code].up = new THREE.Vector3(-1,0,0);
|
||||
let tangent = manager.downCurve.getTangentAt(realprogress).normalize();
|
||||
|
@ -23,6 +23,15 @@ export function signalModel(scene) {
|
||||
|
||||
newsignal.position.copy(downCurve.getPoint(downData[j].leftProgress));
|
||||
|
||||
newsignal.up = new THREE.Vector3(1,0,0);
|
||||
newsignal.axis = new THREE.Vector3();
|
||||
let tangent = downCurve.getTangentAt(downData[j].leftProgress).normalize();
|
||||
newsignal.axis.crossVectors(newsignal.up, tangent).normalize();
|
||||
let radians = Math.acos(newsignal.up.dot(tangent));
|
||||
newsignal.quaternion.setFromAxisAngle(newsignal.axis, radians);
|
||||
|
||||
|
||||
|
||||
scene.add( newsignal );
|
||||
j = downData.length;
|
||||
}
|
||||
|
@ -11,9 +11,11 @@ export function trainModel(scene) {
|
||||
var trainBox = new THREE.Mesh( geometry, material );
|
||||
trainBox.code = trainData[i].code;
|
||||
trainBox.groupNumber = trainData[i].groupNumber;
|
||||
|
||||
trainBox.dispose = false;
|
||||
trainBox.up = new THREE.Vector3(1, 0, 0);
|
||||
trainBox.axis = new THREE.Vector3();
|
||||
trainBox.position.y = 5;
|
||||
scope.trainlist[trainData[i].groupNumber] = trainBox;
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,11 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://api.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.140:9000'; // 杜康
|
||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
|
@ -6,6 +6,49 @@
|
||||
'left': uiLeft,
|
||||
'display': uiDisplay,
|
||||
}">
|
||||
<el-card class="box-title">
|
||||
设备信息
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card">
|
||||
<!-- 列车 -->
|
||||
<div v-if="selectmodel.code" class="text item">
|
||||
列车编号:{{selectmodel.code}}
|
||||
</div>
|
||||
<div v-if="selectmodel.v" class="text item">
|
||||
速度:{{selectmodel.v}}
|
||||
</div>
|
||||
<div v-if="selectmodel.right" class="text item">
|
||||
行进方向:{{selectmodel.right}}
|
||||
</div>
|
||||
<div v-if="selectmodel.num" class="text item">
|
||||
车内人数:{{selectmodel.num}}
|
||||
</div>
|
||||
<div v-if="selectmodel.leftdoor" class="text item">
|
||||
左侧车门:{{selectmodel.leftdoor}}
|
||||
</div>
|
||||
<div v-if="selectmodel.rightdoor" class="text item">
|
||||
右侧车门:{{selectmodel.rightdoor}}
|
||||
</div>
|
||||
|
||||
<!-- 车站 -->
|
||||
<div v-if="selectmodel.name" class="text item">
|
||||
车站:{{selectmodel.name}}
|
||||
</div>
|
||||
<div v-if="selectmodel.topnum" class="text item">
|
||||
上行站台人数:{{selectmodel.topnum}}
|
||||
</div>
|
||||
<div v-if="selectmodel.downnum" class="text item">
|
||||
下行站台人数:{{selectmodel.downnum}}
|
||||
</div>
|
||||
<div v-if="selectmodel.topdoor" class="text item">
|
||||
上行车门:{{selectmodel.topdoor}}
|
||||
</div>
|
||||
<div v-if="selectmodel.downdoor" class="text item">
|
||||
下行车门:{{selectmodel.downdoor}}
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@ -26,6 +69,14 @@ export default {
|
||||
uiDisplay:'none',
|
||||
uiTop:'0px',
|
||||
uiLeft:'0px',
|
||||
selectmodel:{
|
||||
code:"asd123",
|
||||
v:"80km/h",
|
||||
right:"上行",
|
||||
num:100,
|
||||
leftdoor:"关闭",
|
||||
rightdoor:"关闭"
|
||||
},
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
@ -63,4 +114,37 @@ export default {
|
||||
background-size:100%;
|
||||
// display:none;
|
||||
}
|
||||
.text {
|
||||
font-size: 8px;
|
||||
color:#ffffff;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both
|
||||
}
|
||||
.box-title{
|
||||
position: absolute;
|
||||
top:20px;
|
||||
left:7px;
|
||||
width: 120px;
|
||||
text-align: center;
|
||||
}
|
||||
.box-card {
|
||||
position: absolute;
|
||||
top:45px;
|
||||
left:7px;
|
||||
width: 136px;
|
||||
background-color:rgba(0,0,0,0);
|
||||
}
|
||||
</style>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<!-- 设备视图 -->
|
||||
<el-button v-if="isShow3dmodel && isShowScheduling" size="small" @click="jumpjlmap3dmodel">{{ $t('display.demon.deviceView') }}</el-button>
|
||||
<!-- 三维视图 / 司机视角 -->
|
||||
<el-button v-if="isShowScheduling || isDriver" size="small" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
|
||||
<el-button v-if="isShowScheduling || isDriver || isDISPATCHER" size="small" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
|
||||
<!-- cctv视图 -->
|
||||
<el-button v-if="isShowScheduling || isStationSupervisor" size="small" @click="jumpjl3dpassflow">{{ $t('display.demon.passengerflow') }}</el-button>
|
||||
<!-- 客流规划视图 -->
|
||||
@ -128,10 +128,16 @@ export default {
|
||||
},
|
||||
isShowScheduling() {
|
||||
// 行调与管理员 可显示
|
||||
return (this.$store.state.training.prdType == '02' || this.isAdmin) && !this.$route.query.projectDevice;
|
||||
return (this.$store.state.training.prdType == '02' || this.isAdmin) && (!this.$route.query.projectDevice);
|
||||
},
|
||||
isDISPATCHER(){
|
||||
return (this.$store.state.training.prdType == '02' || this.isAdmin) && (!this.$route.query.projectDevice || this.project == 'sdy');
|
||||
},
|
||||
isStationSupervisor() {
|
||||
return this.userRole == 'STATION_SUPERVISOR' && !this.$route.query.projectDevice;
|
||||
console.log(this.project);
|
||||
console.log(this.userRole);
|
||||
console.log(this.$store.state.training.prdType);
|
||||
return this.userRole == 'STATION_SUPERVISOR' && (!this.$route.query.projectDevice || this.project == 'sdy');
|
||||
},
|
||||
isDriver() {
|
||||
return this.userRole == 'DRIVER' && !this.$route.query.projectDevice;
|
||||
|
Loading…
Reference in New Issue
Block a user