This commit is contained in:
fan 2021-09-22 10:12:30 +08:00
commit e0abfe2798
9 changed files with 568 additions and 504 deletions

View File

@ -96,7 +96,9 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
if(toptrain.nowcode != data.body[i].code){
toptrain.nowcode = data.body[i].code;
}
toptrain.position.copy(toptrain.curve.getPointAt(data.body[i].offset));
toptrain.position.copy(passerStation.nowStation.topcurve.getPointAt(data.body[i].offset));
// }
}else{
if(downtrain.nowcode == data.body[i].code){
@ -108,7 +110,8 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
if(downtrain.nowcode != data.body[i].code){
downtrain.nowcode = data.body[i].code;
}
downtrain.position.copy(downtrain.curve.getPointAt(data.body[i].offset));
downtrain.position.copy(passerStation.nowStation.downcurve.getPointAt(data.body[i].offset));
}else{
if(downtrain.nowcode == data.body[i].code){

View File

@ -122,7 +122,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup,viewMap) {
passerStation.loadMaterial(netdata3d);
this.modelmanager.loadpromise(JSON.parse(netdata3d.data.assets).cctvAssetList, scope.mixers).then(function (data) {
passerStation.initStationAnimation(scope.modelmanager.station.mesh,mixers,deviceaction,scene);
passerStation.initStationAnimation(scope.modelmanager.station.mesh,mixers,deviceaction,scene,JSON.parse(netdata3d.data.stands),);
passerCheckDoor.initCheckDoorInAnimation(scope.modelmanager.zhajiin.mesh,mixers,deviceaction,scene);
passerCheckDoor.initCheckDoorOutAnimation(scope.modelmanager.zhajiout.mesh,mixers,deviceaction,scene);
@ -139,7 +139,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup,viewMap) {
scope.switchviews('4views');
passerHuman.initHumans(scope.modelmanager.man1.mesh,scope.modelmanager.man2.mesh);
scene.add(humanlist);
passerStation.initStationList(netdata.data.stationList,netdata.data.stationStandList,netdata.data.psdList);
passerStation.initStationList(netdata.data.stationList,netdata.data.stationStandList,netdata.data.psdList,netdata.data.sectionList);
socktest = new PassflowConnect(deviceaction,passerTrain.toptrain,passerTrain.downtrain,routegroup,passerStation,passerAi);
store.dispatch('app/animationsClose');

View File

@ -92,8 +92,9 @@ export function PasserStation() {
}
//初始化车站名称数据
this.initStationList = function(stationdata,standdata,psddata){
this.initStationList = function(stationdata,standdata,psddata,sectiondata){
let list = [];
let sections = sectiondata;
if(psddata){
for(let i=0,leni = standdata.length;i<leni;i++){
for(let j=0,lenj = psddata.length;j<lenj;j++){
@ -121,6 +122,8 @@ export function PasserStation() {
downpsd:null,
topsection:null,
downsection:null,
topcurve:"",
downcurve:"",
};
if(list[k][0].position.y<list[k][1].position.y){
stationobject.toppsd = list[k][0].name;
@ -138,6 +141,35 @@ export function PasserStation() {
}
for(let i=0;i<scope.stationlist.length;i++){
let topOver = false;
let downOver = false;
for(let j = 0;j<sections.length;j++){
if(scope.stationlist[i].topsection == sections[j].code){
let points = [];
let lo = -71 - (sections[j].leftStopPointOffset);
let ro = 60.73+(sections[j].lengthFact - sections[j].rightStopPointOffset);
points.push(new THREE.Vector3(lo,0.06,-6.3));
points.push(new THREE.Vector3(ro,0.06,-6.3));
scope.stationlist[i].topcurve = new THREE.CatmullRomCurve3(points);
topOver = true;
}
if(scope.stationlist[i].downsection == sections[j].code){
let points = [];
let lo = -71 - (sections[j].leftStopPointOffset);
let ro = 60.73+(sections[j].lengthFact - sections[j].rightStopPointOffset);
points.push(new THREE.Vector3(lo ,0.06,28.68));
points.push(new THREE.Vector3(ro,0.06,28.68));
scope.stationlist[i].downcurve = new THREE.CatmullRomCurve3(points);
downOver = true;
}
if(topOver && downOver){
j = sections.length;
}
}
}
scope.nowStation = scope.stationlist[0];
if(scope.stationtexture["stationlist"]){
scope.stationMesh.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"];

View File

@ -326,13 +326,9 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
var intersects = raycaster.intersectObject( modelManager.otherModel.children[1],true);
if(intersects.length>0){
for(let td=0;td<trainDeviceList.length;td++){
if(trainDeviceList[td].id == intersects[0].object.name){
trainDeviceList[td].color = "#fff";
trainDeviceList[td].value = "已检查";
}
}
jl3dZzwwTrainTestUpdate(intersects[0].object.name);
}
}

View File

@ -2,13 +2,23 @@
export function ZzwwTrain() {
let scope = this;
this.deviceList = [
{
tittle:"防溜防护检查",
text:"",
devices:[
{
id:"ZLQ",
name:"止轮器",
color:"#ff0000",
status:"",
value:"未检查",
}
]
},
{
tittle:"车辆端部检查(前端)",
text:"",
devices:[
{
id:"FD",
name:"风笛",
@ -16,13 +26,6 @@ export function ZzwwTrain() {
status:"",
value:"未检查",
},
{
id:"SD",
name:"上灯",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"SDD",
name:"上大灯",
@ -39,7 +42,7 @@ export function ZzwwTrain() {
},
{
id:"YGQ",
name:"雨X刮器",
name:"雨刮器",
color:"#ff0000",
status:"",
value:"未检查",
@ -71,7 +74,13 @@ export function ZzwwTrain() {
color:"#ff0000",
status:"",
value:"未检查",
}
]
},
{
tittle:"车辆端部检查(前端)",
text:"",
devices:[
{
id:"CG",
name:"车钩",
@ -85,14 +94,14 @@ export function ZzwwTrain() {
color:"#ff0000",
status:"",
value:"未检查",
}
]
},
{
id:"CG1",
name:"车钩",
color:"#ff0000",
status:"",
value:"未检查",
},
tittle:"车辆端部检查(前端)",
text:"",
devices:[
{
id:"ZJSM",
name:"折角塞门",
@ -106,14 +115,13 @@ export function ZzwwTrain() {
color:"#ff0000",
status:"",
value:"未检查",
}
]
},
{
id:"ZDGRG1",
name:"制动管软管",
color:"#ff0000",
status:"",
value:"未检查",
},
tittle:"车辆端部检查(前端)",
text:"",
devices:[
{
id:"FCD",
name:"防尘堵",
@ -127,14 +135,13 @@ export function ZzwwTrain() {
color:"#ff0000",
status:"",
value:"未检查",
}
]
},
{
id:"AQL1",
name:"安全链",
color:"#ff0000",
status:"",
value:"未检查",
},
tittle:"车辆端部检查(前端)",
text:"",
devices:[
{
id:"PZQ",
name:"排障器",
@ -142,27 +149,20 @@ export function ZzwwTrain() {
status:"",
value:"未检查",
},
{
id:"PZQ1",
name:"排障器",
id:"SSQ",
name:"扫石器",
color:"#ff0000",
status:"",
value:"未检查",
}
]
},
{
id:"PSQ",
name:"排石器",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"PSQ1",
name:"排石器1",
color:"#ff0000",
status:"",
value:"未检查",
},
tittle:"左前部",
text:"",
devices:[
{
id:"ZJF",
name:"中继阀",
@ -184,20 +184,6 @@ export function ZzwwTrain() {
status:"",
value:"未检查",
},
{
id:"",
name:"",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"ZDSM1",
name:"制动塞门",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"JCXHCGQ",
name:"信号传感器",
@ -225,14 +211,21 @@ export function ZzwwTrain() {
color:"#ff0000",
status:"",
value:"未检查",
}
// ,
// {
// id:"PDYL",
// name:"皮带压轮",
// color:"#ff0000",
// status:"",
// value:"未检查",
// }
]
},
{
id:"PDYL",
name:"皮带压轮",
color:"#ff0000",
status:"",
value:"未检查",
},
tittle:"转向架左侧",
text:"",
devices:[
{
id:"ZXTH",
name:"轴箱弹簧",
@ -255,12 +248,18 @@ export function ZzwwTrain() {
value:"未检查",
},
{
id:"CLTM",
id:"CL",
name:"车轮踏面",
color:"#ff0000",
status:"",
value:"未检查",
}
]
},
{
tittle:"转向架左侧",
text:"",
devices:[
{
id:"QYZ",
name:"牵引座",
@ -281,14 +280,26 @@ export function ZzwwTrain() {
color:"#ff0000",
status:"",
value:"未检查",
}
]
},
{
tittle:"转向架左侧",
text:"",
devices:[
{
id:"SDCGQ",
name:"速度传感器",
color:"#ff0000",
status:"",
value:"未检查",
}
]
},
{
tittle:"转向架左侧",
text:"",
devices:[
{
id:"ZDG",
name:"制动缸",
@ -316,7 +327,13 @@ export function ZzwwTrain() {
color:"#ff0000",
status:"",
value:"未检查",
}
]
},
{
tittle:"车辆中部(左侧)",
text:"",
devices:[
{
id:"RYX",
name:"燃油箱",
@ -324,27 +341,32 @@ export function ZzwwTrain() {
status:"",
value:"未检查",
},
{
id:"YW",
name:"油位",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"XDCX",
name:"蓄电池箱",
color:"#ff0000",
status:"",
value:"未检查",
}
]
},
{
tittle:"左侧后部",
text:"",
devices:[
{
id:"RLZDJAZZ",
name:"人力制动机",
color:"#ff0000",
status:"",
value:"未检查",
}
]
},
{
tittle:"车辆(右侧)",
text:"",
devices:[
{
id:"ZFG",
name:"总风缸",
@ -352,20 +374,26 @@ export function ZzwwTrain() {
status:"",
value:"未检查",
},
{
id:"ZFGSM",
name:"总风缸塞门",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"XYQ",
name:"消音器",
color:"#ff0000",
status:"",
value:"未检查",
}
]
},
{
id:"JCXHCGQ1",
name:"信号传感器",
color:"#ff0000",
status:"",
value:"未检查",
},
tittle:"右前部",
text:"",
devices:[
{
id:"KLQ",
name:"空滤器",
@ -373,6 +401,19 @@ export function ZzwwTrain() {
status:"",
value:"未检查",
},
{
id:"JCXHCGQ",
name:"信号传感器",
color:"#ff0000",
status:"",
value:"未检查",
},
]
},
{
tittle:"车辆底部检查",
text:"",
devices:[
{
id:"GWS",
name:"钩尾销",
@ -380,6 +421,13 @@ export function ZzwwTrain() {
status:"",
value:"未检查",
},
{
id:"BSX",
name:"变速箱",
color:"#ff0000",
status:"",
value:"未检查",
},
{
id:"FDJ",
name:"发动机",
@ -414,14 +462,26 @@ export function ZzwwTrain() {
color:"#ff0000",
status:"",
value:"未检查",
}
]
},
{
id:"CZCLX1",
name:"车轴齿轮箱1",
tittle:"车辆底部检查",
text:"",
devices: [
{
id:"FLP",
name:"法兰盘",
color:"#ff0000",
status:"",
value:"未检查",
}
]
},
{
tittle:"车辆底部检查",
text:"",
devices:[
{
id:"ZJHXX",
name:"中间换向箱",
@ -435,7 +495,13 @@ export function ZzwwTrain() {
color:"#ff0000",
status:"",
value:"未检查",
}
]
},
{
tittle:"车上检查",
text:"",
devices:[
{
id:"CC",
name:"车窗",
@ -457,5 +523,8 @@ export function ZzwwTrain() {
status:"",
value:"未检查",
}
]
}
];
}

View File

@ -588,7 +588,7 @@ class SkinCode extends defaultStyle {
jointImg: { // 道岔 A B C D四元素属性配置
trapezoidLength: 8, // 直角梯形元素默认长度
trapezoidBlock: true, // 梯形封锁显示
fork: true, // 挤岔专用(如有挤岔操作 变为true
fork: false, // 挤岔专用(如有挤岔操作 变为true
forKColor: 'red' // 挤岔颜色 配合挤岔专用
},
arcBlcok: { // 圆形封锁图形

View File

@ -35,13 +35,17 @@ function hasPermission(roles, route, parentsRoles) {
*/
function resetAsyncRouter({ systemType }) {
let list = publicAsyncRoute;
if (systemType == projectTrain) {
const projectList = [projectTrain, projectXian, projectJyd, projectTky, projectDrts, projectRichor];
const specialProjects = [projectXty, projectGzzb, projectHeb, projectSdy, projectRichorJoint];
const specialProjectEnum = {[projectXty]:'designxty', [projectGzzb]:'designgzb', [projectHeb]:'designheb',
[projectSdy]:'designsdy', [projectRichorJoint]:'designrichorjoint' };
if (projectList.includes(systemType)) {
list = [...list, ...asyncRouter];
} else if (systemType == projectXian) {
list = [...list, ...asyncRouter];
} else if (systemType == projectXty) {
if (projectRoute && projectRoute.designxty && projectRoute.designxty.length) {
projectRoute.designxty.forEach(item => {
} else if (specialProjects.includes(systemType) ) {
if (projectRoute) {
const proRoute = projectRoute[specialProjectEnum[systemType]];
if (proRoute && proRoute.length) {
proRoute.forEach(item => {
if (item.merge) {
asyncRouter[item.mergeIndex].children = [...asyncRouter[item.mergeIndex].children, ...item.children];
} else {
@ -49,55 +53,10 @@ function resetAsyncRouter({ systemType }) {
}
});
}
list = [...list, ...asyncRouter];
} else if (systemType == projectGzzb) {
if (projectRoute && projectRoute.designgzb && projectRoute.designgzb.length) {
projectRoute.designgzb.forEach(item => {
if (item.merge) {
asyncRouter[item.mergeIndex].children = [...asyncRouter[item.mergeIndex].children, ...item.children];
} else {
list.push(item);
}
});
}
list = [...list, ...asyncRouter];
} else if (systemType == projectHeb) {
if (projectRoute && projectRoute.designheb && projectRoute.designheb.length) {
projectRoute.designheb.forEach(item => {
if (item.merge) {
asyncRouter[item.mergeIndex].children = [...asyncRouter[item.mergeIndex].children, ...item.children];
} else { list.push(item); }
});
}
list = [...list, ...asyncRouter];
} else if (systemType == projectJsxt) {
list = [...list, ...JSXT];
} else if (systemType == projectJyd) {
list = [...list, ...asyncRouter];
} else if (systemType == projectTky) {
list = [...list, ...asyncRouter];
} else if (systemType == projectDrts) {
list = [...list, ...asyncRouter];
} else if (systemType == projectRichor) {
list = [...list, ...asyncRouter];
} else if (systemType == projectSdy) {
if (projectRoute && projectRoute.designsdy && projectRoute.designsdy.length) {
projectRoute.designsdy.forEach(item => {
if (item.merge) {
asyncRouter[item.mergeIndex].children = [...asyncRouter[item.mergeIndex].children, ...item.children];
} else { list.push(item); }
});
}
list = [...list, ...asyncRouter];
} else if (systemType == projectRichorJoint) {
if (projectRoute && projectRoute.designrichorjoint && projectRoute.designrichorjoint.length) {
projectRoute.designrichorjoint.forEach(item => {
if (item.merge) {
asyncRouter[item.mergeIndex].children = [...asyncRouter[item.mergeIndex].children, ...item.children];
} else { list.push(item); }
});
}
list = [...list, ...asyncRouter];
}
return list;
}

View File

@ -2,12 +2,10 @@
<div class="traintestpaneover" :style="{'background-image': 'url('+lessonbg+')'}">
<div class="traintesttittle"> 待检查设备:</div>
<div class="addtraintestdivs" :style="{'color':item.color}" v-for="(item,index) in trainDeviceData.deviceList" @click="selsectTrainDevice(item)">
<div class="addtraintestdivs" :style="{'color':item.color}" v-for="(item,index) in trainDeviceData.deviceList[testIndex].devices" @click="selsectTrainDevice(item)">
{{item.name}}:{{item.value}}
</div>
<!-- <div class="addtraintestdiv"
:style="{'background-image': 'url('+localstatic+'/lesson3d/addbutton.png)'}"
@click="addjob(index)"></div> -->
</div>
</template>
@ -28,6 +26,7 @@
data() {
return {
localstatic:JL3D_LOCAL_STATIC,
testIndex:0,
jobList:[],
showJobList:false,
showJob:false,
@ -45,6 +44,7 @@
},
mounted() {
// this.initJobList();
window.jl3dZzwwTrainTestUpdate = this.jl3dZzwwTrainTestUpdate;
},
beforeDestroy() {
@ -63,19 +63,24 @@
initJobList(data){
this.jobList = data;
},
selectJob(item){
this.selectedJob = item;
jl3dZzwwTrainTestUpdate(upname){
let nextText = true;
console.log(upname);
for(let td=0;td<this.trainDeviceData.deviceList[this.testIndex].devices.length;td++){
},
addjob(index){
this.selectedJob.controlList[index].data.push({
cname:this.generateUUID(),
text:"内容",
explainRole:"角色",
nextNode:"null",
sceneId:this.lessonData.lessonData.lessonProgress[this.lessonEditIndex].id,
type:"",
});
if(this.trainDeviceData.deviceList[this.testIndex].devices[td].id == upname){
this.trainDeviceData.deviceList[this.testIndex].devices[td].color = "#fff";
this.trainDeviceData.deviceList[this.testIndex].devices[td].value = "已检查";
}
if(this.trainDeviceData.deviceList[this.testIndex].devices[td].color != "#fff"){
nextText = false;
}
}
if(nextText && this.testIndex<=this.trainDeviceData.deviceList.length){
this.testIndex += 1;
}
},
selsectTrainDevice(selectTool,jobList){

View File

@ -236,7 +236,7 @@ export default {
aspectList:[
{ name: '绿', code: 'G' },
{ name: '黄', code: 'Y' },
{ name: '月白', code: ' W' }
{ name: '月白', code: 'W' }
],
addModel: {
mapId: '',