This commit is contained in:
joylink_cuiweidong 2020-10-10 19:28:33 +08:00
commit 4357b5dac2
84 changed files with 890 additions and 8363 deletions

View File

@ -26,7 +26,13 @@ export function setFailureModeNew(data, group) {
data: data data: data
}); });
} }
/** 取消自动故障 */
export function cancelFailureModeNew(id, group) {
return request({
url: `/simulation/${group}/faultMode/${id}`,
method: 'put'
});
}
/** 获取仿真待触发的故障列表*/ /** 获取仿真待触发的故障列表*/
export function getSimulationFaultRules(group) { export function getSimulationFaultRules(group) {
return request({ return request({

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@ -198,7 +198,8 @@ class IbpPan {
const deviceList = Object.values(this.ibpDevice); const deviceList = Object.values(this.ibpDevice);
deviceList.forEach(elem =>{ deviceList.forEach(elem =>{
for (var key in val) { for (var key in val) {
if (elem.model.mean === key) { const mean = elem.model.mean || '';
if (mean.toUpperCase() === key.toUpperCase()) {
const state = {}; const state = {};
state[key] = val[key]; state[key] = val[key];
elem.instance.setStatus(state); elem.instance.setStatus(state);

View File

@ -6,10 +6,24 @@ import psdSystem from '@/assets/iscs_picture/iscs-psd.png';
import psdRight from '@/assets/iscs_picture/iscs-psd-right.png'; import psdRight from '@/assets/iscs_picture/iscs-psd-right.png';
import fireBlue from '@/assets/iscs_picture/iscs-fire-blue.png'; import fireBlue from '@/assets/iscs_picture/iscs-fire-blue.png';
import fireRed from '@/assets/iscs_picture/iscs-fire-red.png'; import fireRed from '@/assets/iscs_picture/iscs-fire-red.png';
import envPersonDoor from '@/assets/iscs_picture/renfangmen.png' import envPersonDoor from '@/assets/iscs_picture/renfangmen.png';
import hand from '@/assets/iscs_picture/hand.png';
import fmBlue from '@/assets/iscs_picture/fm-blue.png';
import fmGray from '@/assets/iscs_picture/fm-gray.png';
import fmGreen from '@/assets/iscs_picture/fm-green.png';
import airCond from '@/assets/iscs_picture/kongtiao.png';
import airCondMul from '@/assets/iscs_picture/mul-kongtiao.png';
import setting from '@/assets/iscs_picture/setting.png';
import blowerRedLeft from '@/assets/iscs_picture/gufengji-red-l.png';
import blowerGrayLeft from '@/assets/iscs_picture/gufengji-gray-l.png';
import blowerRedRight from '@/assets/iscs_picture/gufengji-red-r.png';
import blowerGrayRight from '@/assets/iscs_picture/gufengji-gray-r.png';
import iscsAPF from '@/assets/iscs_picture/iscs_APF.png'; import iscsAPF from '@/assets/iscs_picture/iscs_APF.png';
import drum from '@/assets/iscs_picture/drum.png';
import exhaustFan from '@/assets/iscs_picture/exhaustFan.png'
import waterCooler from '@/assets/iscs_picture/ZSDF533.png';
import textBgBluePoint from '@/assets/iscs_picture/textBgBluePoint.png';
import ventilationFan from '@/assets/iscs_picture/ventilationFan.png'
const pictureObj = { const pictureObj = {
'psdLeft': psdLeft, 'psdLeft': psdLeft,
@ -18,7 +32,23 @@ const pictureObj = {
'APF': iscsAPF, 'APF': iscsAPF,
'envPersonDoor': envPersonDoor, 'envPersonDoor': envPersonDoor,
's': fireBlue, 's': fireBlue,
'a': fireRed 'a': fireRed,
hand,
fmBlue,
fmGray,
fmGreen,
airCond,
airCondMul,
setting,
blowerRedLeft,
blowerGrayLeft,
blowerRedRight,
blowerGrayRight,
drum,
exhaustFan,
waterCooler,
textBgBluePoint,
ventilationFan
}; };
export default class Picture extends Group { export default class Picture extends Group {
constructor(device) { constructor(device) {
@ -39,7 +69,9 @@ export default class Picture extends Group {
}); });
this.imageButton = new Image({ this.imageButton = new Image({
zlevel: model.zlevel, zlevel: model.zlevel,
z: model.z, z: model.z,
origin: [model.width/2, model.height/2],
rotation: (model.rotation||0)*Math.PI/180,
style: { style: {
x: 0, x: 0,
y: 0, y: 0,

View File

@ -1,5 +1,5 @@
export function SetRender(dom) { export function SetRender(dom) {
var renderer = new THREE.WebGLRenderer();//{antialias: true} var renderer = new THREE.WebGLRenderer({logarithmicDepthBuffer: true});//{antialias: true}
renderer.setSize(dom.offsetWidth, dom.offsetHeight); renderer.setSize(dom.offsetWidth, dom.offsetHeight);
return renderer; return renderer;
} }

View File

@ -2,7 +2,7 @@ export function SetScene(project) {
var scene = new THREE.Scene(); var scene = new THREE.Scene();
// var cubeTextureLoader = new THREE.CubeTextureLoader(); // var cubeTextureLoader = new THREE.CubeTextureLoader();
// //
// cubeTextureLoader.setPath( '../../cbtc/static/skybox/star/' ); // cubeTextureLoader.setPath( '/cbtc/static/skybox/star/' );
// //
// var cubeTexture = cubeTextureLoader.load( [ // var cubeTexture = cubeTextureLoader.load( [
// 'px.png', 'nx.png', // 'px.png', 'nx.png',
@ -13,9 +13,9 @@ export function SetScene(project) {
var bgTexture; var bgTexture;
// console.log(project); // console.log(project);
if(project == "login" || project == undefined){ if(project == "login" || project == undefined){
bgTexture = new THREE.TextureLoader().load("../../cbtc/static/background/other.jpg"); bgTexture = new THREE.TextureLoader().load("/cbtc/static/background/other.jpg");
}else if(project == "heb"){ }else if(project == "heb"){
bgTexture = new THREE.TextureLoader().load("../../cbtc/static/background/other.jpg"); bgTexture = new THREE.TextureLoader().load("/cbtc/static/background/other.jpg");
} }
scene.background = bgTexture; scene.background = bgTexture;
// cubeTexture.dispos e(); // cubeTexture.dispos e();

View File

@ -46,7 +46,7 @@ export function getmodels(data) {
packageName:"高位三灯信号机", packageName:"高位三灯信号机",
deviceType:"SimulationSignal", deviceType:"SimulationSignal",
type:"signal", type:"signal",
url:"../../cbtc/static/MODEL/signal/d3d.FBX" url:"/cbtc/static/MODEL/signal/d3d.FBX"
} }
assets.push(assetsignal); assets.push(assetsignal);
@ -57,7 +57,7 @@ export function getmodels(data) {
packageName:"6节列车", packageName:"6节列车",
deviceType:"SimulationTrain", deviceType:"SimulationTrain",
type:"train", type:"train",
url:"../../cbtc/static/MODEL/train/train.FBX" url:"/cbtc/static/MODEL/train/train.FBX"
} }
assets.push(assettrain); assets.push(assettrain);
@ -67,8 +67,8 @@ export function getmodels(data) {
packageName:"沙盘驾驶内侧站台", packageName:"沙盘驾驶内侧站台",
deviceType:"SimulationStation", deviceType:"SimulationStation",
type:"stationInside", type:"stationInside",
url:"../../cbtc/static/MODEL/station/fuzhou.FBX" url:"/cbtc/static/MODEL/station/fuzhou.FBX"
}//"../../cbtc/static/MODEL/station/fuzhou/fuzhou.FBX" }//"/cbtc/static/MODEL/station/fuzhou/fuzhou.FBX"
assets.push(assetneicestation); assets.push(assetneicestation);
let assetswitch = { let assetswitch = {
@ -77,7 +77,7 @@ export function getmodels(data) {
packageName:"轨道通用道岔", packageName:"轨道通用道岔",
deviceType:"SimulationSwitch", deviceType:"SimulationSwitch",
type:"switch", type:"switch",
url:"../../cbtc/static/MODEL/auto/autoswitch.FBX" url:"/cbtc/static/MODEL/auto/autoswitch.FBX"
} }
assets.push(assetswitch); assets.push(assetswitch);
@ -87,7 +87,7 @@ export function getmodels(data) {
packageName:"沙盘驾驶外侧站台", packageName:"沙盘驾驶外侧站台",
deviceType:"SimulationStation", deviceType:"SimulationStation",
type:"stationOutside", type:"stationOutside",
url:"../../cbtc/static/MODEL/station/waicestation.FBX" url:"/cbtc/static/MODEL/station/waicestation.FBX"
} }
assets.push(assetwaicestation); assets.push(assetwaicestation);
@ -97,7 +97,7 @@ export function getmodels(data) {
packageName:"沙盘驾驶三站台", packageName:"沙盘驾驶三站台",
deviceType:"SimulationStation", deviceType:"SimulationStation",
type:"stationThree", type:"stationThree",
url:"../../cbtc/static/MODEL/station/station3.FBX" url:"/cbtc/static/MODEL/station/station3.FBX"
} }
assets.push(assetstation3); assets.push(assetstation3);
@ -107,7 +107,7 @@ export function getmodels(data) {
packageName:"隧道背景", packageName:"隧道背景",
deviceType:"SimulationBg", deviceType:"SimulationBg",
type:"suidao", type:"suidao",
url:"../../cbtc/static/MODEL/suidao/xiansuidao.FBX" url:"/cbtc/static/MODEL/suidao/xiansuidao.FBX"
} }
assets.push(backgroundmodel); assets.push(backgroundmodel);

View File

@ -19,10 +19,10 @@ export function TrainList() {
// model // model
THREE.Loader.Handlers.add( /\.dds$/i, new THREE.DDSLoader() ) ; THREE.Loader.Handlers.add( /\.dds$/i, new THREE.DDSLoader() ) ;
for(let i=0;i<data.length;i++){ for(let i=0;i<data.length;i++){
new THREE.MTLLoader().setPath( '../../cbtc/static/MODEL/train/' ).load( 'train.mtl', function ( materials ) { new THREE.MTLLoader().setPath( '/cbtc/static/MODEL/train/' ).load( 'train.mtl', function ( materials ) {
materials.preload(); materials.preload();
new THREE.OBJLoader().setMaterials( materials ).setPath( '../../cbtc/static/MODEL/train/' ).load( 'train.obj', function ( object ) { new THREE.OBJLoader().setMaterials( materials ).setPath( '/cbtc/static/MODEL/train/' ).load( 'train.obj', function ( object ) {
object.name = data[i].code; object.name = data[i].code;

View File

@ -384,7 +384,7 @@ export function JLmap3dEdit(dom, data, mapid) {
alignmentModel.railpoint[1].x -= offsetX; alignmentModel.railpoint[1].x -= offsetX;
alignmentModel.railpoint[1].y -= offsetY; alignmentModel.railpoint[1].y -= offsetY;
alignmentModel.railpoint[1].z -= offsetZ; alignmentModel.railpoint[1].z -= offsetZ+0.0001;
alignmentModel.railpoint[2].x -= offsetX; alignmentModel.railpoint[2].x -= offsetX;
alignmentModel.railpoint[2].y -= offsetY; alignmentModel.railpoint[2].y -= offsetY;
@ -405,7 +405,7 @@ export function JLmap3dEdit(dom, data, mapid) {
alignmentModel.railpoint[1].x -= offsetX; alignmentModel.railpoint[1].x -= offsetX;
alignmentModel.railpoint[1].y -= offsetY; alignmentModel.railpoint[1].y -= offsetY;
alignmentModel.railpoint[1].z -= offsetZ; alignmentModel.railpoint[1].z -= offsetZ+0.0001;
alignmentModel.railpoint[0].x -= offsetX; alignmentModel.railpoint[0].x -= offsetX;
alignmentModel.railpoint[0].y -= offsetY; alignmentModel.railpoint[0].y -= offsetY;

View File

@ -733,7 +733,7 @@ export function SectionList() {
// console.log("-------------------"); // console.log("-------------------");
// console.log(jlmap3ddata.sectionlist.sections.datalist); // console.log(jlmap3ddata.sectionlist.sections.datalist);
// console.log(sectiondata); // console.log(sectiondata);
var texture = new THREE.TextureLoader().load( '../../cbtc/static/test/z0251.png' ); var texture = new THREE.TextureLoader().load( '/cbtc/static/test/z0251.png' );
texture.wrapS = texture.wrapT = THREE.RepeatWrapping; texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set( 1,1); texture.repeat.set( 1,1);

View File

@ -20,7 +20,7 @@ export function SectionList() {
this.initpromise = function(jlmap3ddata,assetloader,sectiondata,switchdata,scene){ this.initpromise = function(jlmap3ddata,assetloader,sectiondata,switchdata,scene){
var texture = new THREE.TextureLoader().load( '../../cbtc/static/test/z0251.png' ); var texture = new THREE.TextureLoader().load( '/cbtc/static/test/z0251.png' );
texture.wrapS = texture.wrapT = THREE.RepeatWrapping; texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set( 1,1); texture.repeat.set( 1,1);
@ -414,7 +414,7 @@ export function SectionList() {
}; };
function createsection(origin,position,start,py){ function createsection(origin,position,start,py){
var texture = new THREE.TextureLoader().load( '../../cbtc/static/test/z0251.png' ); var texture = new THREE.TextureLoader().load( '/cbtc/static/test/z0251.png' );
texture.wrapS = texture.wrapT = THREE.RepeatWrapping; texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set( 1,1); texture.repeat.set( 1,1);
@ -455,7 +455,7 @@ export function SectionList() {
}) })
let testmesh2; let testmesh2;
if(scope.sections.datalist[start].standTrack == false){ if(scope.sections.datalist[start].standTrack == false){
testmesh2 = new THREE.Mesh( geometry, randomMaterail ); testmesh2 = new THREE.Mesh( geometry, selectmaterial );
}else{ }else{
testmesh2 = new THREE.Mesh( geometry, selectmaterial ); testmesh2 = new THREE.Mesh( geometry, selectmaterial );
} }
@ -804,7 +804,7 @@ export function SectionList() {
} }
this.loadpromise = function(jlmap3ddata,assetloader,sectiondata,section2d,switch2d,scene){ this.loadpromise = function(jlmap3ddata,assetloader,sectiondata,section2d,switch2d,scene){
var texture = new THREE.TextureLoader().load( '../../cbtc/static/test/z0251.png' ); var texture = new THREE.TextureLoader().load( '/cbtc/static/test/z0251.png' );
texture.wrapS = texture.wrapT = THREE.RepeatWrapping; texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set( 1,1); texture.repeat.set( 1,1);
@ -862,7 +862,7 @@ export function SectionList() {
}); });
if(newsection.standTrack == false){ if(newsection.standTrack == false){
testmesh2 = new THREE.Mesh( geometry, randomMaterail ); testmesh2 = new THREE.Mesh( geometry, selectmaterial );
}else{ }else{
testmesh2 = new THREE.Mesh( geometry, selectmaterial ); testmesh2 = new THREE.Mesh( geometry, selectmaterial );
} }

View File

@ -1,13 +1,13 @@
export function Signallightload(lights) { export function Signallightload(lights) {
settexture(lights, "red", '../../cbtc/static/MODEL/device/signal/1.jpg'); settexture(lights, "red", '/cbtc/static/MODEL/device/signal/1.jpg');
settexture(lights, "yellow", '../../cbtc/static/MODEL/device/signal/2.jpg'); settexture(lights, "yellow", '/cbtc/static/MODEL/device/signal/2.jpg');
settexture(lights, "green", '../../cbtc/static/MODEL/device/signal/3.jpg'); settexture(lights, "green", '/cbtc/static/MODEL/device/signal/3.jpg');
settexture(lights, "black", '../../cbtc/static/MODEL/device/signal/4.jpg'); settexture(lights, "black", '/cbtc/static/MODEL/device/signal/4.jpg');
} }
function settexture(lights, name, textureurl) { function settexture(lights, name, textureurl) {

View File

@ -7,14 +7,14 @@ var Staticmodel = {
picUrl: "", picUrl: "",
assetUrl: "./../cbtc/static/MODEL/device/switch/ZD6D.FBX" assetUrl: "./../cbtc/static/MODEL/device/switch/ZD6D.FBX"
},//"https://joylink.club/oss/wx/switch/switch.FBX" },//"https://joylink.club/oss/wx/switch/switch.FBX"
//../../cbtc/static/MODEL/device/switch.FBX ///cbtc/static/MODEL/device/switch.FBX
Signal: { Signal: {
id: "2", id: "2",
name: "信号机", name: "信号机",
deviceType: "Signal", deviceType: "Signal",
type: "low", type: "low",
picUrl: "", picUrl: "",
assetUrl: "../../cbtc/static/MODEL/device/signal/signal.FBX" assetUrl: "/cbtc/static/MODEL/device/signal/signal.FBX"
}, },
stationstand: { stationstand: {
id: "3", id: "3",
@ -22,9 +22,9 @@ var Staticmodel = {
deviceType: "stationstand", deviceType: "stationstand",
type: "low", type: "low",
picUrl: "", picUrl: "",
assetUrl: "../../cbtc/static/MODEL/device/stationstand/stationstand.FBX" assetUrl: "/cbtc/static/MODEL/device/stationstand/stationstand.FBX"
//https://joylink.club/oss/wx/stationstand/stationstand.FBX //https://joylink.club/oss/wx/stationstand/stationstand.FBX
//../../cbtc/static/MODEL/device/stationstand.FBX ///cbtc/static/MODEL/device/stationstand.FBX
}, },
section: { section: {
@ -33,9 +33,9 @@ var Staticmodel = {
deviceType: "section", deviceType: "section",
type: "low", type: "low",
picUrl: "", picUrl: "",
assetUrl: "../../cbtc/static/MODEL/device/section/section.FBX" assetUrl: "/cbtc/static/MODEL/device/section/section.FBX"
//https://joylink.club/oss/wx/stationstand/stationstand.FBX //https://joylink.club/oss/wx/stationstand/stationstand.FBX
//../../cbtc/static/MODEL/device/stationstand.FBX ///cbtc/static/MODEL/device/stationstand.FBX
}, },
room: { room: {
@ -44,9 +44,9 @@ var Staticmodel = {
deviceType: "room", deviceType: "room",
type: "low", type: "low",
picUrl: "", picUrl: "",
assetUrl: "../../cbtc/static/MODEL/device/room/room.FBX" assetUrl: "/cbtc/static/MODEL/device/room/room.FBX"
//https://joylink.club/oss/wx/stationstand/stationstand.FBX //https://joylink.club/oss/wx/stationstand/stationstand.FBX
//../../cbtc/static/MODEL/device/stationstand.FBX ///cbtc/static/MODEL/device/stationstand.FBX
} }

View File

@ -688,7 +688,7 @@ export function Jl3ddevice(dom,group,token) {
} }
} }
var beauty = new Image(); var beauty = new Image();
beauty.src = "../../cbtc/static/texture/guide.png"; beauty.src = "/cbtc/static/texture/guide.png";
//canvas文字贴图方法 //canvas文字贴图方法
//PS:待提炼 增强功能 //PS:待提炼 增强功能
function getTextCanvas(text){ function getTextCanvas(text){

View File

@ -828,7 +828,7 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
} }
} }
var beauty = new Image(); var beauty = new Image();
beauty.src = "../../cbtc/static/texture/guide.png"; beauty.src = "/cbtc/static/texture/guide.png";
//canvas文字贴图方法 //canvas文字贴图方法
//PS:待提炼 增强功能 //PS:待提炼 增强功能
function getTextCanvas(text){ function getTextCanvas(text){

View File

@ -1,7 +1,7 @@
import { getBaseUrl } from '@/utils/baseUrl'; import { getBaseUrl } from '@/utils/baseUrl';
const BASE_API = getBaseUrl(); const BASE_API = getBaseUrl();
let modelurl = "../../cbtc/static/MODEL/jdq/"; let modelurl = "/cbtc/static/MODEL/jdq/";
// if(BASE_API == 'https://joylink.club/jlcloud'){ // if(BASE_API == 'https://joylink.club/jlcloud'){
// modelurl = "https://joylink.club/oss/jdq/"; // modelurl = "https://joylink.club/oss/jdq/";
// }else if(BASE_API == 'https://test.joylink.club/jlcloud'){ // }else if(BASE_API == 'https://test.joylink.club/jlcloud'){

View File

@ -61,7 +61,7 @@ export function Jl3ddevice(dom,serviceid) {
//定义场景(渲染容器) //定义场景(渲染容器)
let scene = new THREE.Scene(); let scene = new THREE.Scene();
var bgTexture = new THREE.TextureLoader().load("../../cbtc/static/background/other.jpg"); var bgTexture = new THREE.TextureLoader().load("/cbtc/static/background/other.jpg");
scene.background = bgTexture; scene.background = bgTexture;
//定义全局光 //定义全局光
@ -540,7 +540,7 @@ export function Jl3ddevice(dom,serviceid) {
} }
var beauty = new Image(); var beauty = new Image();
beauty.src = "../../cbtc/static/texture/guide.png"; beauty.src = "/cbtc/static/texture/guide.png";
//canvas文字贴图方法 //canvas文字贴图方法
//PS:待提炼 增强功能 //PS:待提炼 增强功能
function getTextCanvas(text){ function getTextCanvas(text){

View File

@ -56,7 +56,7 @@ export function Jl3ddevice(dom,serviceid) {
//定义场景(渲染容器) //定义场景(渲染容器)
let scene = new THREE.Scene(); let scene = new THREE.Scene();
var bgTexture = new THREE.TextureLoader().load("../../cbtc/static/background/other.jpg"); var bgTexture = new THREE.TextureLoader().load("/cbtc/static/background/other.jpg");
scene.background = bgTexture; scene.background = bgTexture;
//定义全局光 //定义全局光
@ -537,7 +537,7 @@ export function Jl3ddevice(dom,serviceid) {
} }
var beauty = new Image(); var beauty = new Image();
beauty.src = "../../cbtc/static/texture/guide.png"; beauty.src = "/cbtc/static/texture/guide.png";
//canvas文字贴图方法 //canvas文字贴图方法
//PS:待提炼 增强功能 //PS:待提炼 增强功能
function getTextCanvas(text){ function getTextCanvas(text){

View File

@ -110,7 +110,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
var rails = null; var rails = null;
this.webwork=new Worker('../../cbtc/static/workertest/trainworker.js'); this.webwork=new Worker('/cbtc/static/workertest/trainworker.js');
// 地图模型数据 // 地图模型数据
let mapdata = new Jl3ddata(); let mapdata = new Jl3ddata();
@ -130,7 +130,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
// load a sound and set it as the Audio object's buffer // load a sound and set it as the Audio object's buffer
// let audioLoader = new THREE.AudioLoader(); // let audioLoader = new THREE.AudioLoader();
// audioLoader.load( '../../cbtc/static/audio/trainmove.ogg', function( buffer ) { // audioLoader.load( '/cbtc/static/audio/trainmove.ogg', function( buffer ) {
// sound.setBuffer( buffer ); // sound.setBuffer( buffer );
// sound.setLoop( true ); // sound.setLoop( true );
// sound.setVolume( 0 ); // sound.setVolume( 0 );
@ -144,10 +144,11 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
scene.add(controls3.getObject()); scene.add(controls3.getObject());
let cameracctv = new THREE.PerspectiveCamera(50, dom.clientWidth/dom.clientHeight, 0.1, 50); let cameracctv = new THREE.PerspectiveCamera(50, dom.clientWidth/dom.clientHeight, 0.1, 50);
cameracctv.position.set( 0, -0.4,29 ); cameracctv.position.set( -3, 0,1.5 );
// cameracctv.rotation.y = Math.PI/2; cameracctv.rotation.y = -Math.PI/2;
camera.add(cameracctv); cameracctv.rotation.x = Math.PI/2;
// camera.add(cameracctv);
// 初始化加载数据和模型 // 初始化加载数据和模型
@ -159,7 +160,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
if(assetsdata.link){ if(assetsdata.link){
scope.datatype = "old"; scope.datatype = "old";
// datanew(); // datanew();
// scope.jsonwebwork = new Worker("../../cbtc/static/workertest/jsonworker.js"); // scope.jsonwebwork = new Worker("/cbtc/static/workertest/jsonworker.js");
// scope.Subscribe = new Jlmap3dSubscribe(scope,routegroup,scope.jsonwebwork); // scope.Subscribe = new Jlmap3dSubscribe(scope,routegroup,scope.jsonwebwork);
// scope.Subscribe.socketon(scope.Subscribe.topic); // scope.Subscribe.socketon(scope.Subscribe.topic);
@ -208,7 +209,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
}, 2000); }, 2000);
}else{ }else{
scope.datatype = "new"; scope.datatype = "new";
driverWebWorker = new Worker("../../cbtc/static/workertest/driverWebWorker.js"); driverWebWorker = new Worker("/cbtc/static/workertest/driverWebWorker.js");
scope.Subscribe = new Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,driverWebWorker,stats); scope.Subscribe = new Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,driverWebWorker,stats);
datanew(); datanew();
@ -433,6 +434,9 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
trainlisttest = loadtrainlisttest; trainlisttest = loadtrainlisttest;
realsectionlist = loadrealsectionlist; realsectionlist = loadrealsectionlist;
rails = loadrails; rails = loadrails;
console.log(trainlisttest.group.children[0]);
trainlisttest.group.children[0].getObjectByName("c1").add(cameracctv);
} }
this.eventon = function() { this.eventon = function() {

View File

@ -50,8 +50,10 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
driverWebWorker.onmessage = function (event) { driverWebWorker.onmessage = function (event) {
let data = event.data; let data = event.data;
// console.log(data);
if(data.type == "Train_Position"){ if(data.type == "Train_Position"){
trainrun(data.body); nowTrainRun(data.body);
return; return;
} }
@ -60,7 +62,15 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
otherTrainRun(data.body); otherTrainRun(data.body);
return; return;
} }
if(data.type == "Train_Hmi_3D"){ if(data.type == "Train_Hmi_3D"){
//改变当前列车code
if(data.body.groupNumber){
changeNowTrain(data.body);
}
updatestatus(data.body); updatestatus(data.body);
return; return;
} }
@ -92,7 +102,88 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
return; return;
} }
} }
//切换车辆修改列车属性
function changeNowTrain(data){
if(data.right == "0"){
if(data.rightDoorCanClose == false){
trainmodel.openright = '0';
for (let an=actions["traindoor"].down.length-1; an>=0; an--) {
actions["traindoor"].down[an].reset();
actions["traindoor"].down[an].time = 0;
actions["traindoor"].down[an].timeScale = -1;
actions["traindoor"].down[an].play();
}
}else{
trainmodel.openright = "1";
for(let an=actions["traindoor"].down.length-1;an>=0;an--){
actions["traindoor"].down[an].reset();
actions["traindoor"].down[an].time = actions["traindoor"].top[an]._clip.duration;
actions["traindoor"].down[an].timeScale = 1;
actions["traindoor"].down[an].play();
}
}
if(data.leftDoorCanClose == false){
trainmodel.openleft = "0";
for(let an=actions["traindoor"].top.length-1;an>=0;an--){
actions["traindoor"].top[an].reset();
actions["traindoor"].top[an].time = 0;
actions["traindoor"].top[an].timeScale = -1;
actions["traindoor"].top[an].play();
}
}else{
trainmodel.openleft = "1";
for(let an=actions["traindoor"].top.length-1;an>=0;an--){
actions["traindoor"].top[an].reset();
actions["traindoor"].top[an].time = actions["traindoor"].top[an]._clip.duration;
actions["traindoor"].top[an].timeScale = 1;
actions["traindoor"].top[an].play();
}
}
}else{
if(data.leftDoorCanClose == false){
trainmodel.openleft = "0";
for(let an=actions["traindoor"].top.length-1;an>=0;an--){
actions["traindoor"].top[an].reset();
actions["traindoor"].top[an].time = 0;
actions["traindoor"].top[an].timeScale = -1;
actions["traindoor"].top[an].play();
}
}else{
trainmodel.openleft = "1";
for(let an=actions["traindoor"].top.length-1;an>=0;an--){
actions["traindoor"].top[an].reset();
actions["traindoor"].top[an].time = actions["traindoor"].top[an]._clip.duration;
actions["traindoor"].top[an].timeScale = 1;
actions["traindoor"].top[an].play();
}
}
if(data.rightDoorCanClose == false){
trainmodel.openright = '0';
for (let an=actions["traindoor"].down.length-1; an>=0; an--) {
actions["traindoor"].down[an].reset();
actions["traindoor"].down[an].time = 0;
actions["traindoor"].down[an].timeScale = -1;
actions["traindoor"].down[an].play();
}
}else{
trainmodel.openright = "1";
for(let an=actions["traindoor"].down.length-1;an>=0;an--){
actions["traindoor"].down[an].reset();
actions["traindoor"].down[an].time = actions["traindoor"].top[an]._clip.duration;
actions["traindoor"].down[an].timeScale = 1;
actions["traindoor"].down[an].play();
}
}
}
}
this.updatamap = function(newsectionlist,newlinklist,newsignallist,newstationstandlist,newtrainlisttest,newrealsectionlist,newrails, materiallist, nowaction, scene) { this.updatamap = function(newsectionlist,newlinklist,newsignallist,newstationstandlist,newtrainlisttest,newrealsectionlist,newrails, materiallist, nowaction, scene) {
// console.log(mapdata); // console.log(mapdata);
// console.log(newtrainlisttest); // console.log(newtrainlisttest);
@ -115,7 +206,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
this.socketon = function(topic) { this.socketon = function(topic) {
try { try {
// console.log("teststomp"); // console.log("teststomp");
scope.teststomp.subscribe(topic, callback, header); // scope.teststomp.subscribe(topic, callback, header);
} catch (error) { } catch (error) {
console.error('websocket订阅失败'); console.error('websocket订阅失败');
} }
@ -153,9 +244,9 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
let data = JSON.parse(Response.body); let data = JSON.parse(Response.body);
// stats.update(); // stats.update();
// 遍历后台数据 // 遍历后台数据
// console.log(data); console.log(data);
if(data.type == "Train_Position"){ if(data.type == "Train_Position"){
trainrun(data.body); nowTrainRun(data.body);
return; return;
} }
@ -405,13 +496,10 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
} }
//更新当前驾驶车辆
function nowTrainRun(data){
function trainrun(data){ //改变当前列车code
// console.log(data);
// if(data.code = "336"){
// console.log(data);
// }
if(data.code != trainmodel.code){ if(data.code != trainmodel.code){
if(trainlisttest.otherTrainList[trainmodel.code] && trainmodel.code){ if(trainlisttest.otherTrainList[trainmodel.code] && trainmodel.code){
trainlisttest.otherTrainList[trainmodel.code].offset = 0; trainlisttest.otherTrainList[trainmodel.code].offset = 0;
@ -421,11 +509,13 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
trainmodel.nowcode = data.code; trainmodel.nowcode = data.code;
} }
//改变当前列车行驶的区段code
if(data.section != trainmodel.nowsection){ if(data.section != trainmodel.nowsection){
trainmodel.nowsection = data.section; trainmodel.nowsection = data.section;
trainmodel.curve = rails.sectionrail[data.section].lineleft; trainmodel.curve = rails.sectionrail[data.section].lineleft;
} }
// console.log(trainmodel.right);
//判断转向
if(trainmodel.right != data.right){ if(trainmodel.right != data.right){
if(data.right == "0"){ if(data.right == "0"){
@ -528,8 +618,8 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
let offsetz = pos.z + trainmodel.children[0].position.z; let offsetz = pos.z + trainmodel.children[0].position.z;
trainmodel.children[0].position.z -= offsetz; trainmodel.children[0].position.z -= offsetz;
let offsety = pos.y - trainmodel.children[0].position.y; // let offsety = pos.y - trainmodel.children[0].position.y;
trainmodel.children[0].position.y += offsetz; // trainmodel.children[0].position.y += offsetz;
// trainmodel.position.z = point.z; // trainmodel.position.z = point.z;
} }
@ -768,8 +858,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
} }
} }
}else{ }else{
if (trainmodel.openright != data.open && data.open == '0') { if (trainmodel.openright != data.open && data.open == '0') {
trainmodel.openright = '0'; trainmodel.openright = '0';
for (let an=actions["traindoor"].down.length-1; an>=0; an--) { for (let an=actions["traindoor"].down.length-1; an>=0; an--) {
@ -787,11 +875,9 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
actions["traindoor"].down[an].play(); actions["traindoor"].down[an].play();
} }
} }
} }
} }
} }
} }

View File

@ -701,7 +701,7 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
} }
} }
var beauty = new Image(); var beauty = new Image();
beauty.src = "../../cbtc/static/texture/guide.png"; beauty.src = "/cbtc/static/texture/guide.png";
//canvas文字贴图方法 //canvas文字贴图方法
//PS:待提炼 增强功能 //PS:待提炼 增强功能
function getTextCanvas(text){ function getTextCanvas(text){

View File

@ -73,7 +73,7 @@ export function Jl3dfaultdeviceVR(dom,group,skinCode) {
let playerPosition = new THREE.Vector3( -3.5, 0.5, 5.5 ); let playerPosition = new THREE.Vector3( -3.5, 0.5, 5.5 );
let targetPosition = new THREE.Vector3(); let targetPosition = new THREE.Vector3();
let pathFinder = new THREE.Pathfinding(); let pathFinder = new THREE.Pathfinding();
var textureNav = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/daohang.png' ); var textureNav = new THREE.TextureLoader().load( '/cbtc/static/vrtest/daohang.png' );
textureNav.wrapS = THREE.RepeatWrapping; textureNav.wrapS = THREE.RepeatWrapping;
textureNav.wrapT=THREE.RepeatWrapping; textureNav.wrapT=THREE.RepeatWrapping;
textureNav.repeat.x = 40; textureNav.repeat.x = 40;
@ -195,7 +195,7 @@ export function Jl3dfaultdeviceVR(dom,group,skinCode) {
// load a resource // load a resource
loaderObj.load( loaderObj.load(
// resource URL // resource URL
'../../cbtc/static/vrtest/path.obj', '/cbtc/static/vrtest/path.obj',
// called when resource is loaded // called when resource is loaded
function ( object ) { function ( object ) {
@ -267,7 +267,7 @@ export function Jl3dfaultdeviceVR(dom,group,skinCode) {
document.addEventListener( "mousedown", onselect, false ); document.addEventListener( "mousedown", onselect, false );
let vrwebworker = new Worker("../../cbtc/static/workertest/vrwebworker.js"); let vrwebworker = new Worker("/cbtc/static/workertest/vrwebworker.js");
let connectmsg = { let connectmsg = {
type:'init', type:'init',
@ -1144,7 +1144,7 @@ export function Jl3dfaultdeviceVR(dom,group,skinCode) {
var loader = new THREE.TextureLoader(); var loader = new THREE.TextureLoader();
var circle; var circle;
loader.load( loader.load(
'../../cbtc/static/vrtest/ring.png', '/cbtc/static/vrtest/ring.png',
// onLoad callback // onLoad callback
function ( texture ) { function ( texture ) {
@ -1404,7 +1404,7 @@ export function Jl3dfaultdeviceVR(dom,group,skinCode) {
} }
} }
var beauty = new Image(); var beauty = new Image();
beauty.src = "../../cbtc/static/texture/scene.png"; beauty.src = "/cbtc/static/texture/scene.png";
//canvas文字贴图方法 //canvas文字贴图方法
//PS:待提炼 增强功能 //PS:待提炼 增强功能
function getTextCanvas(text){ function getTextCanvas(text){

View File

@ -170,7 +170,7 @@ export function Jl3dOtherVR(dom,group,skinCode) {
this.controls.update(); this.controls.update();
let otherVrViewWorker = new Worker("../../cbtc/static/workertest/otherVrViewWorker.js"); let otherVrViewWorker = new Worker("/cbtc/static/workertest/otherVrViewWorker.js");
let connectmsg = { let connectmsg = {
type:'init', type:'init',
@ -822,7 +822,7 @@ export function Jl3dOtherVR(dom,group,skinCode) {
} }
} }
var beauty = new Image(); var beauty = new Image();
beauty.src = "../../cbtc/static/texture/scene.png"; beauty.src = "/cbtc/static/texture/scene.png";
//canvas文字贴图方法 //canvas文字贴图方法
//PS:待提炼 增强功能 //PS:待提炼 增强功能
function getTextCanvas(text){ function getTextCanvas(text){

View File

@ -105,7 +105,7 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
this.controls.update(); this.controls.update();
this.modelmanager = new ModelManagerVR(); this.modelmanager = new ModelManagerVR();
loader.load( loader.load(
'../../cbtc/static/vrtest/ring.png', '/cbtc/static/vrtest/ring.png',
// onLoad callback // onLoad callback
function ( texture ) { function ( texture ) {
@ -163,7 +163,7 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
document.addEventListener( "mousedown", onselect, false ); document.addEventListener( "mousedown", onselect, false );
let vrwebworker = new Worker("../../cbtc/static/workertest/vrwebworker.js"); let vrwebworker = new Worker("/cbtc/static/workertest/vrwebworker.js");
let connectmsg = { let connectmsg = {
type:'init', type:'init',
@ -611,7 +611,7 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
} }
} }
var beauty = new Image(); var beauty = new Image();
beauty.src = "../../cbtc/static/texture/scene.png"; beauty.src = "/cbtc/static/texture/scene.png";
//canvas文字贴图方法 //canvas文字贴图方法
//PS:待提炼 增强功能 //PS:待提炼 增强功能
function getTextCanvas(text){ function getTextCanvas(text){

View File

@ -4,36 +4,36 @@ var TrainRescueStatic = {
name: "动画模型", name: "动画模型",
deviceType: "animatemodel", deviceType: "animatemodel",
type: "animatemodel", type: "animatemodel",
url: "../../cbtc/static/vrtest/trainrescue/DH923.FBX" url: "/cbtc/static/vrtest/trainrescue/DH923.FBX"
},//"https://joylink.club/oss/wx/switch/switch.FBX" },//"https://joylink.club/oss/wx/switch/switch.FBX"
//../../cbtc/static/MODEL/device/switch.FBX ///cbtc/static/MODEL/device/switch.FBX
floorplane: { floorplane: {
id: "2", id: "2",
name: "行走范围", name: "行走范围",
deviceType: "runplane", deviceType: "runplane",
type: "runplane", type: "runplane",
url: "../../cbtc/static/vrtest/trainrescue/diban.FBX" url: "/cbtc/static/vrtest/trainrescue/diban.FBX"
}, },
controlmodel: { controlmodel: {
id: "3", id: "3",
name: "控制台", name: "控制台",
deviceType: "controlmodel", deviceType: "controlmodel",
type: "controlmodel", type: "controlmodel",
url: "../../cbtc/static/vrtest/trainrescue/kongzhigan.FBX" url: "/cbtc/static/vrtest/trainrescue/kongzhigan.FBX"
}, },
other: { other: {
id: "4", id: "4",
name: "其他", name: "其他",
deviceType: "other", deviceType: "other",
type: "other", type: "other",
url: "../../cbtc/static/vrtest/trainrescue/TK.FBX" url: "/cbtc/static/vrtest/trainrescue/TK.FBX"
}, },
handR: { handR: {
id: "5", id: "5",
name: "handr", name: "handr",
deviceType: "handr", deviceType: "handr",
type: "handr", type: "handr",
url: "../../cbtc/static/vrtest/trainrescue/handr.FBX" url: "/cbtc/static/vrtest/trainrescue/handr.FBX"
} }
} }

View File

@ -102,7 +102,7 @@ export function JLmap3dMaintainer(dom, data,skinCode,storemod,routegroup,project
//地图模型数据 //地图模型数据
let mapdata = new Jl3ddata(); let mapdata = new Jl3ddata();
this.webwork = new Worker("../../cbtc/static/workertest/trainworker.js"); this.webwork = new Worker("/cbtc/static/workertest/trainworker.js");
//初始化加载数据和模型getPublishMapDetail //初始化加载数据和模型getPublishMapDetail
getPublishMapDetail(skinCode).then(data => { getPublishMapDetail(skinCode).then(data => {
let mapnetdata = data.data; let mapnetdata = data.data;
@ -124,7 +124,7 @@ export function JLmap3dMaintainer(dom, data,skinCode,storemod,routegroup,project
}else{ }else{
scope.datatype = "new"; scope.datatype = "new";
scope.jsonwebworknew = new Worker("../../cbtc/static/workertest/maintainerworker.js"); scope.jsonwebworknew = new Worker("/cbtc/static/workertest/maintainerworker.js");
scope.Subscribe = new Maintainerconnect(scope,routegroup,scope.jsonwebworknew,lablecodemap); scope.Subscribe = new Maintainerconnect(scope,routegroup,scope.jsonwebworknew,lablecodemap);
scope.Subscribe.socketon(scope.Subscribe.topic); scope.Subscribe.socketon(scope.Subscribe.topic);
MaintainerLoad(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod); MaintainerLoad(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod);

View File

@ -7,7 +7,7 @@ export function TrainControl(){
// load a sound and set it as the Audio object's buffer // load a sound and set it as the Audio object's buffer
let audioLoader = new THREE.AudioLoader(); let audioLoader = new THREE.AudioLoader();
audioLoader.load( '../../cbtc/static/audio/trainmove.ogg', function( buffer ) { audioLoader.load( '/cbtc/static/audio/trainmove.ogg', function( buffer ) {
scope.sound.setBuffer( buffer ); scope.sound.setBuffer( buffer );
scope.sound.setLoop( true ); scope.sound.setLoop( true );
scope.sound.setVolume( 3 ); scope.sound.setVolume( 3 );

View File

@ -17,7 +17,7 @@ export function VrGui(){
var geometryPlane = new THREE.PlaneBufferGeometry( 1.4, 2, 16); var geometryPlane = new THREE.PlaneBufferGeometry( 1.4, 2, 16);
var texturePlane = new THREE.TextureLoader().load( '../../cbtc/static/texture/devicemsgpane.png' ); var texturePlane = new THREE.TextureLoader().load( '/cbtc/static/texture/devicemsgpane.png' );
var materialPlane = new THREE.MeshBasicMaterial( { var materialPlane = new THREE.MeshBasicMaterial( {
map: texturePlane, map: texturePlane,
side: THREE.DoubleSide, side: THREE.DoubleSide,
@ -36,7 +36,7 @@ export function VrGui(){
var geometryButtonPane = new THREE.PlaneBufferGeometry( 0.4, 0.2, 16 ); var geometryButtonPane = new THREE.PlaneBufferGeometry( 0.4, 0.2, 16 );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/buttonHome.png' ); var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/buttonHome.png' );
var material = new THREE.MeshBasicMaterial( { var material = new THREE.MeshBasicMaterial( {
map: texture, map: texture,
transparent: true, transparent: true,
@ -48,7 +48,7 @@ export function VrGui(){
buttonHome.position.z = 0.02; buttonHome.position.z = 0.02;
plane.add( buttonHome ); plane.add( buttonHome );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/buttonStationList.png' ); var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/buttonStationList.png' );
var material = new THREE.MeshBasicMaterial( { var material = new THREE.MeshBasicMaterial( {
map: texture, map: texture,
transparent: true, transparent: true,
@ -60,7 +60,7 @@ export function VrGui(){
buttonStationList.position.z = 0.02; buttonStationList.position.z = 0.02;
plane.add( buttonStationList ); plane.add( buttonStationList );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/buttonFaultList.png' ); var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/buttonFaultList.png' );
var material = new THREE.MeshBasicMaterial( { var material = new THREE.MeshBasicMaterial( {
map: texture, map: texture,
transparent: true, transparent: true,
@ -78,7 +78,7 @@ export function VrGui(){
var geometryButtonPage = new THREE.PlaneBufferGeometry( 0.3, 0.1, 16 ); var geometryButtonPage = new THREE.PlaneBufferGeometry( 0.3, 0.1, 16 );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/buttonPrevious.png' ); var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/buttonPrevious.png' );
var material = new THREE.MeshBasicMaterial( { var material = new THREE.MeshBasicMaterial( {
map: texture, map: texture,
transparent: true, transparent: true,
@ -90,7 +90,7 @@ export function VrGui(){
buttonPreviousFault.position.z = 0.02; buttonPreviousFault.position.z = 0.02;
scope.faultListGroup.add( buttonPreviousFault ); scope.faultListGroup.add( buttonPreviousFault );
// //
// var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/nav.png' ); // var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/nav.png' );
// var material = new THREE.MeshBasicMaterial( { // var material = new THREE.MeshBasicMaterial( {
// map: texture, // map: texture,
// transparent: true, // transparent: true,
@ -102,7 +102,7 @@ export function VrGui(){
// buttonPrevious.position.z = 0.02; // buttonPrevious.position.z = 0.02;
// plane.add( buttonPrevious ); // plane.add( buttonPrevious );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/buttonNext.png' ); var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/buttonNext.png' );
var material = new THREE.MeshBasicMaterial( { var material = new THREE.MeshBasicMaterial( {
map: texture, map: texture,
transparent: true, transparent: true,
@ -114,7 +114,7 @@ export function VrGui(){
buttonNextFault.position.z = 0.02; buttonNextFault.position.z = 0.02;
scope.faultListGroup.add( buttonNextFault ); scope.faultListGroup.add( buttonNextFault );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/buttonPrevious.png' ); var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/buttonPrevious.png' );
var material = new THREE.MeshBasicMaterial( { var material = new THREE.MeshBasicMaterial( {
map: texture, map: texture,
transparent: true, transparent: true,
@ -127,7 +127,7 @@ export function VrGui(){
scope.stationListGroup.add( buttonPreviousStation ); scope.stationListGroup.add( buttonPreviousStation );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/buttonNext.png' ); var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/buttonNext.png' );
var material = new THREE.MeshBasicMaterial( { var material = new THREE.MeshBasicMaterial( {
map: texture, map: texture,
transparent: true, transparent: true,
@ -145,7 +145,7 @@ export function VrGui(){
var geometryButtonBox = new THREE.PlaneBufferGeometry( 0.25, 0.25, 16 ); var geometryButtonBox = new THREE.PlaneBufferGeometry( 0.25, 0.25, 16 );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/nav.png' ); var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/nav.png' );
var material = new THREE.MeshBasicMaterial( { var material = new THREE.MeshBasicMaterial( {
map: texture, map: texture,
transparent: true, transparent: true,
@ -157,7 +157,7 @@ export function VrGui(){
button1.position.z = 0.02; button1.position.z = 0.02;
scope.deviceGroup.add( button1 ); scope.deviceGroup.add( button1 );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/anime.png' ); var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/anime.png' );
var material = new THREE.MeshBasicMaterial( { var material = new THREE.MeshBasicMaterial( {
map: texture, map: texture,
transparent: true, transparent: true,
@ -171,7 +171,7 @@ export function VrGui(){
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/reset.png' ); var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/reset.png' );
var material = new THREE.MeshBasicMaterial( { var material = new THREE.MeshBasicMaterial( {
map: texture, map: texture,
transparent: true, transparent: true,
@ -183,7 +183,7 @@ export function VrGui(){
button2.position.z = 0.02; button2.position.z = 0.02;
scope.deviceGroup.add( button2 ); scope.deviceGroup.add( button2 );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/repire.png' ); var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/repire.png' );
var material = new THREE.MeshBasicMaterial( { var material = new THREE.MeshBasicMaterial( {
map: texture, map: texture,
transparent: true, transparent: true,
@ -208,7 +208,7 @@ export function VrGui(){
var geometryButtonBox = new THREE.PlaneBufferGeometry( 0.3, 0.3, 16 ); var geometryButtonBox = new THREE.PlaneBufferGeometry( 0.3, 0.3, 16 );
var textureshebei = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/shebei.png' ); var textureshebei = new THREE.TextureLoader().load( '/cbtc/static/vrtest/shebei.png' );
var material = new THREE.MeshBasicMaterial( { var material = new THREE.MeshBasicMaterial( {
map: textureshebei, map: textureshebei,
transparent: true, transparent: true,
@ -220,7 +220,7 @@ export function VrGui(){
buttonShiBei.position.z = 0.02; buttonShiBei.position.z = 0.02;
plane.add( buttonShiBei ); plane.add( buttonShiBei );
var texturezhankong = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/zhankong.png' ); var texturezhankong = new THREE.TextureLoader().load( '/cbtc/static/vrtest/zhankong.png' );
var material = new THREE.MeshBasicMaterial( { var material = new THREE.MeshBasicMaterial( {
map: texturezhankong, map: texturezhankong,
transparent: true, transparent: true,
@ -234,7 +234,7 @@ export function VrGui(){
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/station1.png' ); var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/station1.png' );
var material = new THREE.MeshBasicMaterial( { var material = new THREE.MeshBasicMaterial( {
map: texture, map: texture,
transparent: true, transparent: true,
@ -246,7 +246,7 @@ export function VrGui(){
buttonStation1.position.z = 0.02; buttonStation1.position.z = 0.02;
plane.add( buttonStation1 ); plane.add( buttonStation1 );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/station2.png' ); var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/station2.png' );
var material = new THREE.MeshBasicMaterial( { var material = new THREE.MeshBasicMaterial( {
map: texture, map: texture,
transparent: true, transparent: true,
@ -452,7 +452,7 @@ export function VrGui(){
var beauty = new Image(); var beauty = new Image();
beauty.src = "../../cbtc/static/texture/scene.png"; beauty.src = "/cbtc/static/texture/scene.png";
//canvas文字贴图方法 //canvas文字贴图方法
//PS:待提炼 增强功能 //PS:待提炼 增强功能
function getTextCanvas(text,type){ function getTextCanvas(text,type){

View File

@ -6,42 +6,42 @@ export function ModelManagerVR(){
// code:"test", // code:"test",
// locateType:"01", // locateType:"01",
// mesh:null, // mesh:null,
// url:"../../cbtc/static/vrtest/vrtest.FBX" // url:"/cbtc/static/vrtest/vrtest.FBX"
// }; // };
this.stationIn = { this.stationIn = {
code:"stationIn", code:"stationIn",
locateType:"1", locateType:"1",
mesh:null, mesh:null,
url:"../../cbtc/static/vrtest/stationIn.FBX" url:"/cbtc/static/vrtest/stationIn.FBX"
}; };
this.stationOut = { this.stationOut = {
code:"stationOut", code:"stationOut",
locateType:"2", locateType:"2",
mesh:null, mesh:null,
url:"../../cbtc/static/vrtest/stationIn.FBX" url:"/cbtc/static/vrtest/stationIn.FBX"
}; };
this.otherDevice = { this.otherDevice = {
code:"otherDevice", code:"otherDevice",
locateType:"3", locateType:"3",
mesh:null, mesh:null,
url:"../../cbtc/static/vrtest/otherDevice.FBX" url:"/cbtc/static/vrtest/otherDevice.FBX"
}; };
this.train = { this.train = {
code:"train", code:"train",
locateType:"4", locateType:"4",
mesh:null, mesh:null,
url:"../../cbtc/static/vrtest/vrTrain.FBX" url:"/cbtc/static/vrtest/vrTrain.FBX"
}; };
this.human = { this.human = {
code:"human", code:"human",
locateType:"5", locateType:"5",
mesh:null, mesh:null,
url:"../../cbtc/static/vrtest/vrHuman.FBX" url:"/cbtc/static/vrtest/vrHuman.FBX"
}; };
this.loadpromise = function (mixers){ this.loadpromise = function (mixers){

View File

@ -5,16 +5,16 @@ var Staticmodel = {
deviceType: "man", deviceType: "man",
type: "man", type: "man",
picUrl: "", picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/man1.FBX" assetUrl: "/cbtc/static/MODEL/passflow/man1.FBX"
},//"https://joylink.club/oss/wx/switch/switch.FBX" },//"https://joylink.club/oss/wx/switch/switch.FBX"
//../../cbtc/static/MODEL/device/switch.FBX ///cbtc/static/MODEL/device/switch.FBX
man2: { man2: {
id: "2", id: "2",
name: "人物2", name: "人物2",
deviceType: "man", deviceType: "man",
type: "man", type: "man",
picUrl: "", picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/man2.FBX" assetUrl: "/cbtc/static/MODEL/passflow/man2.FBX"
}, },
station: { station: {
id: "3", id: "3",
@ -22,7 +22,7 @@ var Staticmodel = {
deviceType: "station", deviceType: "station",
type: "hrb", type: "hrb",
picUrl: "", picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/station.FBX" assetUrl: "/cbtc/static/MODEL/passflow/station.FBX"
}, },
zhajiin: { zhajiin: {
id: "4", id: "4",
@ -30,7 +30,7 @@ var Staticmodel = {
deviceType: "zhajiin", deviceType: "zhajiin",
type: "hrb", type: "hrb",
picUrl: "", picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/zhajiin.FBX" assetUrl: "/cbtc/static/MODEL/passflow/zhajiin.FBX"
}, },
zhajiout: { zhajiout: {
id: "5", id: "5",
@ -38,7 +38,7 @@ var Staticmodel = {
deviceType: "zhajiout", deviceType: "zhajiout",
type: "hrb", type: "hrb",
picUrl: "", picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/zhajiout.FBX" assetUrl: "/cbtc/static/MODEL/passflow/zhajiout.FBX"
}, },
monitor: { monitor: {
id: "6", id: "6",
@ -46,7 +46,7 @@ var Staticmodel = {
deviceType: "monitor", deviceType: "monitor",
type: "hrb", type: "hrb",
picUrl: "", picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/monitor.FBX" assetUrl: "/cbtc/static/MODEL/passflow/monitor.FBX"
}, },
train: { train: {
id: "7", id: "7",
@ -54,7 +54,7 @@ var Staticmodel = {
deviceType: "train", deviceType: "train",
type: "hrb", type: "hrb",
picUrl: "", picUrl: "",
assetUrl: "../../cbtc/static/MODEL/train/train.FBX" assetUrl: "/cbtc/static/MODEL/train/train.FBX"
}, },
section: { section: {
id: "8", id: "8",
@ -62,7 +62,7 @@ var Staticmodel = {
deviceType: "section", deviceType: "section",
type: "hrb", type: "hrb",
picUrl: "", picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/section.FBX" assetUrl: "/cbtc/static/MODEL/passflow/section.FBX"
}, },

View File

@ -52,8 +52,8 @@ let zhajiout = [];
let deviceaction = []; let deviceaction = [];
// let passerwebwork = new Worker("../../cbtc/static/workertest/passsimulation/passer.js"); // let passerwebwork = new Worker("/cbtc/static/workertest/passsimulation/passer.js");
let stationwebwork = new Worker("../../cbtc/static/workertest/passsimulation/station.js"); let stationwebwork = new Worker("/cbtc/static/workertest/passsimulation/station.js");
let stationzon = new ZoneManager(); let stationzon = new ZoneManager();
//老版本临时ai控制 //老版本临时ai控制
@ -297,7 +297,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup,viewMap) {
// load a resource // load a resource
loader.load( loader.load(
// resource URL // resource URL
'../../cbtc/static/jl3d/path/path.obj', '/cbtc/static/jl3d/path/path.obj',
// called when resource is loaded // called when resource is loaded
function ( object ) { function ( object ) {

View File

@ -68,7 +68,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
for(let i=0,leni=event.data.body.length;i<leni;i++){ for(let i=0,leni=event.data.body.length;i<leni;i++){
// console.log(event.data.body[i]); // console.log(event.data.body[i]);
trainrunnew(event.data.body[i]); trainRunNew(event.data.body[i]);
} }
return; return;
} }
@ -152,7 +152,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
} }
}; };
function trainrunnew(data){ function trainRunNew(data){
let code = data.code; let code = data.code;
if(trainlisttest.list[code].right != data.right){ if(trainlisttest.list[code].right != data.right){
@ -833,20 +833,20 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
function switchupdate(data) { function switchupdate(data) {
code = data.code; code = data.code;
if (actions[code].normal != data.normal) { if (actions[code].normal != data.normal) {
if (data.normal == '02') { if (data.normal == '1') {
// sectionlist.switchs.modellist[j].normal = data.normal; // sectionlist.switchs.modellist[j].normal = data.normal;
actions[code].action.reset(); actions[code].action.reset();
actions[code].action.time = 0; actions[code].action.time = 0;
actions[code].action.timeScale = 1; actions[code].action.timeScale = 1;
actions[code].action.play(); actions[code].action.play();
actions[code].normal = "02"; actions[code].normal = "1";
} else if (data.normal == '01') { } else if (data.normal == '0') {
// sectionlist.switchs.modellist[j].normal = data.normal; // sectionlist.switchs.modellist[j].normal = data.normal;
actions[code].action.reset(); actions[code].action.reset();
actions[code].action.time = actions[code].action._clip.duration; actions[code].action.time = actions[code].action._clip.duration;
actions[code].action.timeScale = -1; actions[code].action.timeScale = -1;
actions[code].action.play(); actions[code].action.play();
actions[code].normal = "01"; actions[code].normal = "0";
} }
} }
} }

View File

@ -103,7 +103,7 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
//连接到通信 //连接到通信
//console.log(this.Subscribe.config); //console.log(this.Subscribe.config);
this.webwork = new Worker("../../cbtc/static/workertest/trainworker.js"); this.webwork = new Worker("/cbtc/static/workertest/trainworker.js");
//初始化加载数据和模型getPublishMapDetail //初始化加载数据和模型getPublishMapDetail
getPublishMapDetail(skinCode).then(data => { getPublishMapDetail(skinCode).then(data => {
let mapnetdata = data.data; let mapnetdata = data.data;
@ -111,14 +111,14 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
let assetsdata = JSON.parse(netdata.data.sections); let assetsdata = JSON.parse(netdata.data.sections);
if(assetsdata.link){ if(assetsdata.link){
scope.datatype = "old"; scope.datatype = "old";
scope.jsonwebwork = new Worker("../../cbtc/static/workertest/jsonworker.js"); scope.jsonwebwork = new Worker("/cbtc/static/workertest/jsonworker.js");
scope.Subscribe = new Jlmap3dSubscribe(scope,routegroup,scope.jsonwebwork); scope.Subscribe = new Jlmap3dSubscribe(scope,routegroup,scope.jsonwebwork);
scope.Subscribe.socketon(scope.Subscribe.topic); scope.Subscribe.socketon(scope.Subscribe.topic);
SimulationLoad(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod); SimulationLoad(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod);
}else{ }else{
scope.datatype = "new"; scope.datatype = "new";
scope.jsonwebworknew = new Worker("../../cbtc/static/workertest/jsonworkernew.js"); scope.jsonwebworknew = new Worker("/cbtc/static/workertest/jsonworkernew.js");
scope.Subscribe = new Jlmap3dSubscribeNew(scope,routegroup,scope.jsonwebworknew); scope.Subscribe = new Jlmap3dSubscribeNew(scope,routegroup,scope.jsonwebworknew);
scope.Subscribe.socketon(scope.Subscribe.topic); scope.Subscribe.socketon(scope.Subscribe.topic);
SimulationLoadNew(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod); SimulationLoadNew(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod);

View File

@ -11,7 +11,7 @@ let defaultsignal = {
deviceType:"signal", deviceType:"signal",
type:"low", type:"low",
picUrl:"", picUrl:"",
url:"../../cbtc/static/MODEL/signal/d3d.FBX" url:"/cbtc/static/MODEL/signal/d3d.FBX"
} }
let defaulttrain = { let defaulttrain = {
@ -20,7 +20,7 @@ let defaulttrain = {
deviceType:"train", deviceType:"train",
type:"num4", type:"num4",
picUrl:"", picUrl:"",
url:"../../cbtc/static/MODEL/train/train.FBX" url:"/cbtc/static/MODEL/train/train.FBX"
} }
@ -30,15 +30,15 @@ let defaultstation = {
deviceType:"stand", deviceType:"stand",
type:"num4", type:"num4",
picUrl:"", picUrl:"",
url:"../../cbtc/static/MODEL/station/fuzhou.FBX" url:"/cbtc/static/MODEL/station/fuzhou.FBX"
}//"../../cbtc/static/MODEL/station/fuzhou/fuzhou.FBX" }//"/cbtc/static/MODEL/station/fuzhou/fuzhou.FBX"
let waicestation = { let waicestation = {
id:"10", id:"10",
name:"外侧车站", name:"外侧车站",
deviceType:"standwaice", deviceType:"standwaice",
type:"num4", type:"num4",
picUrl:"", picUrl:"",
url:"../../cbtc/static/MODEL/station/waicestation.FBX" url:"/cbtc/static/MODEL/station/waicestation.FBX"
} }
let station3 = { let station3 = {
id:"10000", id:"10000",
@ -46,12 +46,12 @@ let station3 = {
deviceType:"station3", deviceType:"station3",
type:"num4", type:"num4",
picUrl:"", picUrl:"",
url:"../../cbtc/static/MODEL/station/station3.FBX" url:"/cbtc/static/MODEL/station/station3.FBX"
} }
//"../../cbtc/static/MODEL/station/fuzhou/fuzhou.FBX" //"/cbtc/static/MODEL/station/fuzhou/fuzhou.FBX"
//https://test.joylink.club/oss/station/fuzhou/fuzhou.FBX //https://test.joylink.club/oss/station/fuzhou/fuzhou.FBX
//https://joylink.club/oss/station/fuzhou/fuzhou.FBX //https://joylink.club/oss/station/fuzhou/fuzhou.FBX
//../../cbtc/static/MODEL/station/zhantai715(2).FBX ///cbtc/static/MODEL/station/zhantai715(2).FBX
let defaultswitch = { let defaultswitch = {
id:"11", id:"11",
@ -59,7 +59,7 @@ let defaultswitch = {
deviceType:"switch", deviceType:"switch",
type:"fuzhou", type:"fuzhou",
picUrl:"", picUrl:"",
url:"../../cbtc/static/MODEL/daocha/daocha.FBX" url:"/cbtc/static/MODEL/daocha/daocha.FBX"
} }
@ -69,7 +69,7 @@ let defaultsuidao = {
deviceType:"suidao", deviceType:"suidao",
type:"suidao", type:"suidao",
picUrl:"", picUrl:"",
url:"../../cbtc/static/MODEL/suidao/suidao.FBX" url:"/cbtc/static/MODEL/suidao/suidao.FBX"
} }
let hebsuidao = { let hebsuidao = {
@ -78,7 +78,7 @@ let hebsuidao = {
deviceType:"hebsuidao", deviceType:"hebsuidao",
type:"hebsuidao", type:"hebsuidao",
picUrl:"", picUrl:"",
url:"../../cbtc/static/MODEL/suidao/hebsuidao.FBX" url:"/cbtc/static/MODEL/suidao/hebsuidao.FBX"
} }
let nbsuidao = { let nbsuidao = {
id:"1010", id:"1010",
@ -86,7 +86,7 @@ let nbsuidao = {
deviceType:"nbsuidao", deviceType:"nbsuidao",
type:"nbsuidao", type:"nbsuidao",
picUrl:"", picUrl:"",
url:"../../cbtc/static/MODEL/suidao/nbsuidao.FBX" url:"/cbtc/static/MODEL/suidao/nbsuidao.FBX"
} }
let defaultbackground = { let defaultbackground = {
id:"16", id:"16",
@ -94,12 +94,12 @@ let defaultbackground = {
deviceType:"background", deviceType:"background",
type:"background", type:"background",
picUrl:"", picUrl:"",
url:"../../cbtc/static/MODEL/suidao/background.FBX" url:"/cbtc/static/MODEL/suidao/background.FBX"
} }
//"../../cbtc/static/MODEL/suidao/suidao.FBX" //"/cbtc/static/MODEL/suidao/suidao.FBX"
//https://test.joylink.club/oss/suidao/suidao.FBX //https://test.joylink.club/oss/suidao/suidao.FBX
//https://joylink.club/oss/suidao/suidao.FBX //https://joylink.club/oss/suidao/suidao.FBX
//../../cbtc/static/MODEL/suidao/suidao.FBX ///cbtc/static/MODEL/suidao/suidao.FBX
let defaultautorail = { let defaultautorail = {
id:"100", id:"100",
@ -107,7 +107,7 @@ let defaultautorail = {
deviceType:"autorail", deviceType:"autorail",
type:"autorail", type:"autorail",
picUrl:"", picUrl:"",
url:"../../cbtc/static/MODEL/auto/rail.FBX" url:"/cbtc/static/MODEL/auto/rail.FBX"
} }
let autoswitch = { let autoswitch = {
@ -116,7 +116,7 @@ let autoswitch = {
deviceType:"autoswitch", deviceType:"autoswitch",
type:"fuzhou", type:"fuzhou",
picUrl:"", picUrl:"",
url:"../../cbtc/static/MODEL/auto/autoswitch.FBX" url:"/cbtc/static/MODEL/auto/autoswitch.FBX"
} }
let autoswitch1 = { let autoswitch1 = {
@ -125,7 +125,7 @@ let autoswitch1 = {
deviceType:"autoswitch1", deviceType:"autoswitch1",
type:"fuzhou", type:"fuzhou",
picUrl:"", picUrl:"",
url:"../../cbtc/static/MODEL/auto/switch1.FBX" url:"/cbtc/static/MODEL/auto/switch1.FBX"
} }
let autoswitch2 = { let autoswitch2 = {
@ -134,7 +134,7 @@ let autoswitch2 = {
deviceType:"autoswitch2", deviceType:"autoswitch2",
type:"fuzhou", type:"fuzhou",
picUrl:"", picUrl:"",
url:"../../cbtc/static/MODEL/auto/switch2.FBX" url:"/cbtc/static/MODEL/auto/switch2.FBX"
} }
export function AssetLoader(){ export function AssetLoader(){

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,13 +2,13 @@ import { BASE_ASSET_API } from '@/api/jlmap3d/assets3d.js';
export function Materialload(jlmap3dedit,standTextureData){ export function Materialload(jlmap3dedit,standTextureData){
if(jlmap3dedit.materiallist){ if(jlmap3dedit.materiallist){
settexture(jlmap3dedit.materiallist,"red",'../../cbtc/static/material/signal/1.jpg'); settexture(jlmap3dedit.materiallist,"red",'/cbtc/static/material/signal/1.jpg');
settexture(jlmap3dedit.materiallist,"yellow",'../../cbtc/static/material/signal/2.jpg'); settexture(jlmap3dedit.materiallist,"yellow",'/cbtc/static/material/signal/2.jpg');
settexture( jlmap3dedit.materiallist,"green",'../../cbtc/static/material/signal/3.jpg'); settexture( jlmap3dedit.materiallist,"green",'/cbtc/static/material/signal/3.jpg');
settexture( jlmap3dedit.materiallist,"black",'../../cbtc/static/material/signal/5.jpg'); settexture( jlmap3dedit.materiallist,"black",'/cbtc/static/material/signal/5.jpg');
} }
if(standTextureData.urls.length > 1){ if(standTextureData.urls.length > 1){
@ -20,98 +20,98 @@ export function Materialload(jlmap3dedit,standTextureData){
// if(assettype){ // if(assettype){
// if(assettype.stationtexture == "xian3"){ // if(assettype.stationtexture == "xian3"){
// if(jlmap3dedit.stationtexture){ // if(jlmap3dedit.stationtexture){
// setstationtexture(jlmap3dedit.stationtexture,"stationlist",'../../cbtc/static/texture/xian3/xian3list.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"stationlist",'/cbtc/static/texture/xian3/xian3list.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'../../cbtc/static/texture/xian3/pingbimen.png'); // setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'/cbtc/static/texture/xian3/pingbimen.png');
// setstationtexture(jlmap3dedit.stationtexture,"Station18000",'../../cbtc/static/texture/xian3/Station18000.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station18000",'/cbtc/static/texture/xian3/Station18000.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station61238",'../../cbtc/static/texture/xian3/Station61238.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station61238",'/cbtc/static/texture/xian3/Station61238.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station41790",'../../cbtc/static/texture/xian3/Station41790.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station41790",'/cbtc/static/texture/xian3/Station41790.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station67945",'../../cbtc/static/texture/xian3/Station67945.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station67945",'/cbtc/static/texture/xian3/Station67945.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station85598",'../../cbtc/static/texture/xian3/Station85598.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station85598",'/cbtc/static/texture/xian3/Station85598.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station4324",'../../cbtc/static/texture/xian3/Station4324.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station4324",'/cbtc/static/texture/xian3/Station4324.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station55755",'../../cbtc/static/texture/xian3/Station55755.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station55755",'/cbtc/static/texture/xian3/Station55755.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station53597",'../../cbtc/static/texture/xian3/Station53597.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station53597",'/cbtc/static/texture/xian3/Station53597.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station68029",'../../cbtc/static/texture/xian3/Station68029.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station68029",'/cbtc/static/texture/xian3/Station68029.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station17596",'../../cbtc/static/texture/xian3/Station17596.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station17596",'/cbtc/static/texture/xian3/Station17596.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station66742",'../../cbtc/static/texture/xian3/Station66742.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station66742",'/cbtc/static/texture/xian3/Station66742.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station90701",'../../cbtc/static/texture/xian3/Station90701.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station90701",'/cbtc/static/texture/xian3/Station90701.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station90652",'../../cbtc/static/texture/xian3/Station90652.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station90652",'/cbtc/static/texture/xian3/Station90652.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station54200",'../../cbtc/static/texture/xian3/Station54200.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station54200",'/cbtc/static/texture/xian3/Station54200.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station19253",'../../cbtc/static/texture/xian3/Station19253.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station19253",'/cbtc/static/texture/xian3/Station19253.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station37821",'../../cbtc/static/texture/xian3/Station37821.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station37821",'/cbtc/static/texture/xian3/Station37821.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station47557",'../../cbtc/static/texture/xian3/Station47557.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station47557",'/cbtc/static/texture/xian3/Station47557.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station78551",'../../cbtc/static/texture/xian3/Station78551.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station78551",'/cbtc/static/texture/xian3/Station78551.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station64474",'../../cbtc/static/texture/xian3/Station64474.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station64474",'/cbtc/static/texture/xian3/Station64474.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station21203",'../../cbtc/static/texture/xian3/Station21203.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station21203",'/cbtc/static/texture/xian3/Station21203.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station34499",'../../cbtc/static/texture/xian3/Station34499.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station34499",'/cbtc/static/texture/xian3/Station34499.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station571",'../../cbtc/static/texture/xian3/Station571.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station571",'/cbtc/static/texture/xian3/Station571.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station99903",'../../cbtc/static/texture/xian3/Station99903.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station99903",'/cbtc/static/texture/xian3/Station99903.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station43447",'../../cbtc/static/texture/xian3/Station43447.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station43447",'/cbtc/static/texture/xian3/Station43447.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station67917",'../../cbtc/static/texture/xian3/Station67917.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station67917",'/cbtc/static/texture/xian3/Station67917.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station60649",'../../cbtc/static/texture/xian3/Station60649.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station60649",'/cbtc/static/texture/xian3/Station60649.jpg');
// } // }
// } // }
// if(assettype.stationtexture == "haerbin1"){ // if(assettype.stationtexture == "haerbin1"){
// if(jlmap3dedit.stationtexture){ // if(jlmap3dedit.stationtexture){
// setstationtexture(jlmap3dedit.stationtexture,"stationlist",'../../cbtc/static/texture/heb/haerbinlist.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"stationlist",'/cbtc/static/texture/heb/haerbinlist.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'../../cbtc/static/texture/heb/pingbimen.png'); // setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'/cbtc/static/texture/heb/pingbimen.png');
// setstationtexture(jlmap3dedit.stationtexture,"Station5361",'../../cbtc/static/texture/heb/Station5361.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station5361",'/cbtc/static/texture/heb/Station5361.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station11094",'../../cbtc/static/texture/heb/Station11094.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station11094",'/cbtc/static/texture/heb/Station11094.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station11136",'../../cbtc/static/texture/heb/Station11136.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station11136",'/cbtc/static/texture/heb/Station11136.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station17293",'../../cbtc/static/texture/heb/Station17293.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station17293",'/cbtc/static/texture/heb/Station17293.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station18398",'../../cbtc/static/texture/heb/Station18398.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station18398",'/cbtc/static/texture/heb/Station18398.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station22163",'../../cbtc/static/texture/heb/Station22163.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station22163",'/cbtc/static/texture/heb/Station22163.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station25464",'../../cbtc/static/texture/heb/Station25464.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station25464",'/cbtc/static/texture/heb/Station25464.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station28090",'../../cbtc/static/texture/heb/Station28090.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station28090",'/cbtc/static/texture/heb/Station28090.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station41999",'../../cbtc/static/texture/heb/Station41999.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station41999",'/cbtc/static/texture/heb/Station41999.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station44338",'../../cbtc/static/texture/heb/Station44338.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station44338",'/cbtc/static/texture/heb/Station44338.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station46464",'../../cbtc/static/texture/heb/Station46464.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station46464",'/cbtc/static/texture/heb/Station46464.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station50565",'../../cbtc/static/texture/heb/Station50565.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station50565",'/cbtc/static/texture/heb/Station50565.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station60068",'../../cbtc/static/texture/heb/Station60068.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station60068",'/cbtc/static/texture/heb/Station60068.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station62429",'../../cbtc/static/texture/heb/Station62429.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station62429",'/cbtc/static/texture/heb/Station62429.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station64444",'../../cbtc/static/texture/heb/Station64444.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station64444",'/cbtc/static/texture/heb/Station64444.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station71700",'../../cbtc/static/texture/heb/Station71700.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station71700",'/cbtc/static/texture/heb/Station71700.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station72132",'../../cbtc/static/texture/heb/Station72132.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station72132",'/cbtc/static/texture/heb/Station72132.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station78164",'../../cbtc/static/texture/heb/Station78164.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station78164",'/cbtc/static/texture/heb/Station78164.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station79537",'../../cbtc/static/texture/heb/Station79537.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station79537",'/cbtc/static/texture/heb/Station79537.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station82618",'../../cbtc/static/texture/heb/Station82618.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station82618",'/cbtc/static/texture/heb/Station82618.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station85520",'../../cbtc/static/texture/heb/Station85520.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station85520",'/cbtc/static/texture/heb/Station85520.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station89483",'../../cbtc/static/texture/heb/Station89483.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station89483",'/cbtc/static/texture/heb/Station89483.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station96090",'../../cbtc/static/texture/heb/Station96090.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station96090",'/cbtc/static/texture/heb/Station96090.jpg');
// } // }
// } // }
// if(assettype.stationtexture == "nb1"){ // if(assettype.stationtexture == "nb1"){
// if(jlmap3dedit.stationtexture){ // if(jlmap3dedit.stationtexture){
// setstationtexture(jlmap3dedit.stationtexture,"stationlist",'../../cbtc/static/texture/nb1/nb1list.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"stationlist",'/cbtc/static/texture/nb1/nb1list.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'../../cbtc/static/texture/nb1/pingbimen.png'); // setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'/cbtc/static/texture/nb1/pingbimen.png');
// setstationtexture(jlmap3dedit.stationtexture,"Station1533",'../../cbtc/static/texture/nb1/Station1533.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station1533",'/cbtc/static/texture/nb1/Station1533.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station11231",'../../cbtc/static/texture/nb1/Station11231.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station11231",'/cbtc/static/texture/nb1/Station11231.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station12421",'../../cbtc/static/texture/nb1/Station12421.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station12421",'/cbtc/static/texture/nb1/Station12421.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station16356",'../../cbtc/static/texture/nb1/Station16356.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station16356",'/cbtc/static/texture/nb1/Station16356.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station18678",'../../cbtc/static/texture/nb1/Station18678.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station18678",'/cbtc/static/texture/nb1/Station18678.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station19817",'../../cbtc/static/texture/nb1/Station19817.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station19817",'/cbtc/static/texture/nb1/Station19817.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station23567",'../../cbtc/static/texture/nb1/Station23567.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station23567",'/cbtc/static/texture/nb1/Station23567.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station24903",'../../cbtc/static/texture/nb1/Station24903.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station24903",'/cbtc/static/texture/nb1/Station24903.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station26416",'../../cbtc/static/texture/nb1/Station26416.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station26416",'/cbtc/static/texture/nb1/Station26416.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station27207",'../../cbtc/static/texture/nb1/Station27207.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station27207",'/cbtc/static/texture/nb1/Station27207.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station28032",'../../cbtc/static/texture/nb1/Station28032.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station28032",'/cbtc/static/texture/nb1/Station28032.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station28958",'../../cbtc/static/texture/nb1/Station28958.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station28958",'/cbtc/static/texture/nb1/Station28958.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station30520",'../../cbtc/static/texture/nb1/Station30520.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station30520",'/cbtc/static/texture/nb1/Station30520.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station32955",'../../cbtc/static/texture/nb1/Station32955.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station32955",'/cbtc/static/texture/nb1/Station32955.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station38286",'../../cbtc/static/texture/nb1/Station38286.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station38286",'/cbtc/static/texture/nb1/Station38286.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station38674",'../../cbtc/static/texture/nb1/Station38674.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station38674",'/cbtc/static/texture/nb1/Station38674.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station44173",'../../cbtc/static/texture/nb1/Station44173.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station44173",'/cbtc/static/texture/nb1/Station44173.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station63100",'../../cbtc/static/texture/nb1/Station63100.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station63100",'/cbtc/static/texture/nb1/Station63100.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station69378",'../../cbtc/static/texture/nb1/Station69378.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station69378",'/cbtc/static/texture/nb1/Station69378.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station72310",'../../cbtc/static/texture/nb1/Station72310.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station72310",'/cbtc/static/texture/nb1/Station72310.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station72764",'../../cbtc/static/texture/nb1/Station72764.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station72764",'/cbtc/static/texture/nb1/Station72764.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station75414",'../../cbtc/static/texture/nb1/Station75414.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station75414",'/cbtc/static/texture/nb1/Station75414.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station75494",'../../cbtc/static/texture/nb1/Station75494.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station75494",'/cbtc/static/texture/nb1/Station75494.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station75703",'../../cbtc/static/texture/nb1/Station75703.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station75703",'/cbtc/static/texture/nb1/Station75703.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station78392",'../../cbtc/static/texture/nb1/Station78392.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station78392",'/cbtc/static/texture/nb1/Station78392.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station81700",'../../cbtc/static/texture/nb1/Station81700.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station81700",'/cbtc/static/texture/nb1/Station81700.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station84098",'../../cbtc/static/texture/nb1/Station84098.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station84098",'/cbtc/static/texture/nb1/Station84098.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station86112",'../../cbtc/static/texture/nb1/Station86112.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station86112",'/cbtc/static/texture/nb1/Station86112.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station99584",'../../cbtc/static/texture/nb1/Station99584.jpg'); // setstationtexture(jlmap3dedit.stationtexture,"Station99584",'/cbtc/static/texture/nb1/Station99584.jpg');
// } // }
// } // }
// } // }

View File

@ -84,7 +84,7 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
} }
} }
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList); assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList,3);
// assetloader.setmodellistnew(netdata.assets); // assetloader.setmodellistnew(netdata.assets);

View File

@ -226,7 +226,7 @@ export function StationStandList() {
//canvas文字贴图方法 //canvas文字贴图方法
//PS:待提炼 增强功能 //PS:待提炼 增强功能
var stationcanvas = new Image(); var stationcanvas = new Image();
stationcanvas.src = "../../cbtc/static/texture/msgt.png"; stationcanvas.src = "/cbtc/static/texture/msgt.png";
function getTextCanvas(text){ function getTextCanvas(text){
let canvas = document.getElementById('canvastexture'); let canvas = document.getElementById('canvastexture');

View File

@ -213,7 +213,7 @@ let onProgress = function ( xhr ) {
let onError = function () { }; let onError = function () { };
var beauty = new Image(); var beauty = new Image();
beauty.src = "../../cbtc/static/texture/guide.png"; beauty.src = "/cbtc/static/texture/guide.png";
//canvas文字贴图方法 //canvas文字贴图方法
//PS:待提炼 增强功能 //PS:待提炼 增强功能
function getTextCanvas(text){ function getTextCanvas(text){

View File

@ -147,9 +147,9 @@ export function RailListN(){
for(let i=0;i<section.length;i++){ for(let i=0;i<section.length;i++){
scope.sectionrail[section[i].code].lineleft = new THREE.CatmullRomCurve3(scope.sectionrail[section[i].code].points); scope.sectionrail[section[i].code].lineleft = new THREE.CatmullRomCurve3(scope.sectionrail[section[i].code].points);
scope.sectionrail[section[i].code].lineleft.curveType = "centripetal"; scope.sectionrail[section[i].code].lineleft.curveType = "chordal";
scope.sectionrail[section[i].code].lineleft.tension = 0.15;
scope.sectionrail[section[i].code].lineleft.name = section[i].code; scope.sectionrail[section[i].code].lineleft.name = section[i].code;
// scope.sectionrail[section[i].code].lineleft.tension = 0.2;
let rightpoints = []; let rightpoints = [];
scope.sectionrail[section[i].code].points.forEach(item=>{ scope.sectionrail[section[i].code].points.forEach(item=>{
rightpoints.push(item); rightpoints.push(item);
@ -157,7 +157,8 @@ export function RailListN(){
); );
rightpoints.reverse(); rightpoints.reverse();
scope.sectionrail[section[i].code].lineright = new THREE.CatmullRomCurve3(rightpoints); scope.sectionrail[section[i].code].lineright = new THREE.CatmullRomCurve3(rightpoints);
scope.sectionrail[section[i].code].lineright.curveType = "centripetal"; scope.sectionrail[section[i].code].lineright.curveType = "chordal";
scope.sectionrail[section[i].code].lineright.tension = 0.15;
scope.sectionrail[section[i].code].lineright.name = section[i].code; scope.sectionrail[section[i].code].lineright.name = section[i].code;
if(section[i].standTrack == true){ if(section[i].standTrack == true){
scope.sectionrail[section[i].code].standTrack = true; scope.sectionrail[section[i].code].standTrack = true;
@ -240,37 +241,37 @@ export function RailListN(){
scope.sectionrail[sectioncode].lineright.closed = false; scope.sectionrail[sectioncode].lineright.closed = false;
scope.sectionrail[sectioncode].lineright.name = sectioncode; scope.sectionrail[sectioncode].lineright.name = sectioncode;
// for(let n=0,nm=scope.sectionrail[sectioncode].lineleft.points.length;n<nm;n++){ for(let n=0,nm=scope.sectionrail[sectioncode].lineleft.points.length;n<nm;n++){
// var geometry = new THREE.CircleGeometry( 0.05, 16 ); var geometry = new THREE.CircleGeometry( 0.05, 16 );
// var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
// var circle = new THREE.Mesh( geometry, material ); var circle = new THREE.Mesh( geometry, material );
// // console.log(n); // console.log(n);
// // console.log(scope.sectionrail[section[i].code].lineleft.points[n]); // console.log(scope.sectionrail[section[i].code].lineleft.points[n]);
// circle.position.x = scope.sectionrail[sectioncode].lineleft.points[n].x; circle.position.x = scope.sectionrail[sectioncode].lineleft.points[n].x;
// circle.position.y = scope.sectionrail[sectioncode].lineleft.points[n].y; circle.position.y = scope.sectionrail[sectioncode].lineleft.points[n].y;
// circle.position.z = scope.sectionrail[sectioncode].lineleft.points[n].z; circle.position.z = scope.sectionrail[sectioncode].lineleft.points[n].z;
// circle.rotation.x = -Math.PI/2; circle.rotation.x = -Math.PI/2;
// scene.add( circle ); scene.add( circle );
// } }
// // scope.sectionrail[section[i].code].lineright.tension = 0.11; // scope.sectionrail[section[i].code].lineright.tension = 0.11;
// var points = scope.sectionrail[sectioncode].lineleft.getPoints( 50 ); var points = scope.sectionrail[sectioncode].lineleft.getPoints( 50 );
// var geometry = new THREE.BufferGeometry().setFromPoints( points ); var geometry = new THREE.BufferGeometry().setFromPoints( points );
// var material; var material;
// if(scope.sectionrail[sectioncode].type == "a"){ if(scope.sectionrail[sectioncode].type == "a"){
// material = new THREE.LineBasicMaterial( { color : 0xff0000 } ); material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
// } }
// if(scope.sectionrail[sectioncode].type == "b"){ if(scope.sectionrail[sectioncode].type == "b"){
// material = new THREE.LineBasicMaterial( { color : 0x00ff00 } ); material = new THREE.LineBasicMaterial( { color : 0x00ff00 } );
// } }
// if(scope.sectionrail[sectioncode].type == "c"){ if(scope.sectionrail[sectioncode].type == "c"){
// material = new THREE.LineBasicMaterial( { color : 0x0000ff } ); material = new THREE.LineBasicMaterial( { color : 0x0000ff } );
// } }
//
//
// // Create the final object to add to the scene // Create the final object to add to the scene
// var curveObject = new THREE.Line( geometry, material ); var curveObject = new THREE.Line( geometry, material );
//
// curveObject.position.y = Math.random(); curveObject.position.y = Math.random();
// scene.add(curveObject); scene.add(curveObject);
} }
} }

View File

@ -19,7 +19,7 @@ export function SectionListN() {
var autorail; var autorail;
this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
var texture = new THREE.TextureLoader().load( '../../cbtc/static/test/z0251.png' ); var texture = new THREE.TextureLoader().load( '/cbtc/static/test/z0251.png' );
texture.wrapS = texture.wrapT = THREE.RepeatWrapping; texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set( 1,1); texture.repeat.set( 1,1);
@ -99,16 +99,30 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
if(newsection.railpoint.length>=3){ if(newsection.railpoint.length>=3){
// console.log(newsection); // console.log(newsection);
let height = Math.random()/1000; let height = Math.random()/1000;
var closedSpline = new THREE.CatmullRomCurve3( [ var closedSpline;
new THREE.Vector3(newsection.railpoint[0].x,newsection.railpoint[0].y,newsection.railpoint[0].z), if(Math.abs(newsection.railpoint[0].y-newsection.railpoint[2].y)>0.01){
new THREE.Vector3(newsection.railpoint[1].x,newsection.railpoint[1].y,newsection.railpoint[1].z+0.0001), console.log(newsection.railpoint);
new THREE.Vector3(newsection.railpoint[2].x,newsection.railpoint[2].y,newsection.railpoint[2].z) closedSpline = new THREE.CatmullRomCurve3( [
] ); new THREE.Vector3(newsection.railpoint[0].x,newsection.railpoint[0].y,newsection.railpoint[0].z),
new THREE.Vector3(newsection.railpoint[1].x,newsection.railpoint[1].y,newsection.railpoint[1].z+0.001),
new THREE.Vector3(newsection.railpoint[2].x,newsection.railpoint[2].y,newsection.railpoint[2].z)
] );
}else{
closedSpline = new THREE.CatmullRomCurve3( [
new THREE.Vector3(newsection.railpoint[0].x,newsection.railpoint[0].y,newsection.railpoint[0].z),
new THREE.Vector3(newsection.railpoint[1].x,newsection.railpoint[0].y,newsection.railpoint[1].z+0.001),
new THREE.Vector3(newsection.railpoint[2].x,newsection.railpoint[0].y,newsection.railpoint[2].z)
] );
}
closedSpline.type = 'catmullrom';
// closedSpline.type = 'catmullrom';
closedSpline.curveType = "chordal";
closedSpline.tension = 0.15;
closedSpline.closed = false; closedSpline.closed = false;
var extrudeSettings = { var extrudeSettings = {
steps : 5, steps : 6,
curveSegments : 1, curveSegments : 1,
bevelSegments : 1, bevelSegments : 1,
bevelEnabled : false, bevelEnabled : false,
@ -117,7 +131,9 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
var shape = new THREE.Shape(); var shape = new THREE.Shape();
len = closedSpline.getLength(); len = closedSpline.getLength();
if(newsection.railpoint[0].y != newsection.railpoint[2].y){
if(Math.abs(newsection.railpoint[0].y - newsection.railpoint[2].y)>0.001){
shape.moveTo( -2, 0 ); shape.moveTo( -2, 0 );
shape.lineTo( 2, 0 ); shape.lineTo( 2, 0 );
}else{ }else{
@ -133,16 +149,16 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
if(i%2 != 0){ if(i%2 != 0){
mesh.geometry.attributes.uv.array[ui] = 0; mesh.geometry.attributes.uv.array[ui] = 0;
mesh.geometry.attributes.uv.array[ui+1] = 1; mesh.geometry.attributes.uv.array[ui+1] = 1;
mesh.geometry.attributes.uv.array[ui+2] = len/5; mesh.geometry.attributes.uv.array[ui+2] = len/6;
mesh.geometry.attributes.uv.array[ui+3] = 1; mesh.geometry.attributes.uv.array[ui+3] = 1;
mesh.geometry.attributes.uv.array[ui+4] = len/5; mesh.geometry.attributes.uv.array[ui+4] = len/6;
mesh.geometry.attributes.uv.array[ui+5] = 0; mesh.geometry.attributes.uv.array[ui+5] = 0;
}else{ }else{
mesh.geometry.attributes.uv.array[ui] = 0; mesh.geometry.attributes.uv.array[ui] = 0;
mesh.geometry.attributes.uv.array[ui+1] = 0; mesh.geometry.attributes.uv.array[ui+1] = 0;
mesh.geometry.attributes.uv.array[ui+2] = 0; mesh.geometry.attributes.uv.array[ui+2] = 0;
mesh.geometry.attributes.uv.array[ui+3] = 1; mesh.geometry.attributes.uv.array[ui+3] = 1;
mesh.geometry.attributes.uv.array[ui+4] = len/5; mesh.geometry.attributes.uv.array[ui+4] = len/6;
mesh.geometry.attributes.uv.array[ui+5] = 0; mesh.geometry.attributes.uv.array[ui+5] = 0;
} }
} }
@ -158,7 +174,9 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
new THREE.Vector3(newsection.railpoint[1].x,height,newsection.railpoint[0].z), new THREE.Vector3(newsection.railpoint[1].x,height,newsection.railpoint[0].z),
] ); ] );
closedSpline.type = 'catmullrom'; // closedSpline.type = 'catmullrom';
closedSpline.curveType = "chordal";
closedSpline.tension = 0.15;
closedSpline.closed = false; closedSpline.closed = false;
// Set up settings for later extrusion // Set up settings for later extrusion
var extrudeSettings = { var extrudeSettings = {

View File

@ -401,7 +401,7 @@ export function StationStandListN() {
//canvas文字贴图方法 //canvas文字贴图方法
//PS:待提炼 增强功能 //PS:待提炼 增强功能
var stationcanvas = new Image(); var stationcanvas = new Image();
stationcanvas.src = "../../cbtc/static/texture/msgtnew.png"; stationcanvas.src = "/cbtc/static/texture/msgtnew.png";
function getTextCanvas(text){ function getTextCanvas(text){
let canvas = document.getElementById('canvastexture'); let canvas = document.getElementById('canvastexture');

View File

@ -77,11 +77,11 @@ export function TrainListN() {
// //
// fclip = new THREE.AnimationClip("four",2,ntracks2); // fclip = new THREE.AnimationClip("four",2,ntracks2);
ntracks2 = assetloader.modellist[n].animations.slice(6,13); ntracks2 = assetloader.modellist[n].animations.slice(6,14);
fclip = new THREE.AnimationClip("four",2,ntracks2); fclip = new THREE.AnimationClip("four",2,ntracks2);
ntracks1 = assetloader.modellist[n].animations.slice(0,5); ntracks1 = assetloader.modellist[n].animations.slice(0,6);
tclip = new THREE.AnimationClip("three",2,ntracks1); tclip = new THREE.AnimationClip("three",2,ntracks1);
@ -218,11 +218,11 @@ export function TrainListN() {
// //
// fclip = new THREE.AnimationClip("four",2,ntracks2); // fclip = new THREE.AnimationClip("four",2,ntracks2);
ntracks2 = assetloader.modellist[n].animations.slice(6,13); ntracks2 = assetloader.modellist[n].animations.slice(6,14);
fclip = new THREE.AnimationClip("four",2,ntracks2); fclip = new THREE.AnimationClip("four",2,ntracks2);
ntracks1 = assetloader.modellist[n].animations.slice(0,5); ntracks1 = assetloader.modellist[n].animations.slice(0,6);
tclip = new THREE.AnimationClip("three",2,ntracks1); tclip = new THREE.AnimationClip("three",2,ntracks1);
n = 0; n = 0;
@ -281,33 +281,33 @@ export function TrainListN() {
} }
}else{ }else{
for(let n=0,lenn = newmesh.children[j].children.length;n<lenn;n++){ for(let n=0,lenn = newmesh.children[j].children.length;n<lenn;n++){
if(newmesh.children[j].children[n].name == "top"){ if(newmesh.children[j].children[n].name == "top"){
newmesh.children[j].children[n].animations = []; newmesh.children[j].children[n].animations = [];
newmesh.children[j].children[n].animations.push(fclip.clone()); newmesh.children[j].children[n].animations.push(fclip.clone());
let mixer = new THREE.AnimationMixer( newmesh.children[j].children[n] ); let mixer = new THREE.AnimationMixer( newmesh.children[j].children[n] );
newmesh.mixer.push(mixer); newmesh.mixer.push(mixer);
newmesh.mixerpush = false; newmesh.mixerpush = false;
// mixers.push(mixer); // mixers.push(mixer);
let action = mixer.clipAction( newmesh.children[j].children[n].animations[ 0 ] ); let action = mixer.clipAction( newmesh.children[j].children[n].animations[ 0 ] );
//action.play(); //action.play();
action.setLoop(THREE.LoopOnce); action.setLoop(THREE.LoopOnce);
action.clampWhenFinished = true; action.clampWhenFinished = true;
actionss[data[i].groupNumber].top.push(action); actionss[data[i].groupNumber].top.push(action);
} }
if(newmesh.children[j].children[n].name == "down"){ if(newmesh.children[j].children[n].name == "down"){
newmesh.children[j].children[n].animations = []; newmesh.children[j].children[n].animations = [];
newmesh.children[j].children[n].animations.push(fclip.clone()); newmesh.children[j].children[n].animations.push(fclip.clone());
let mixer = new THREE.AnimationMixer( newmesh.children[j].children[n] ); let mixer = new THREE.AnimationMixer( newmesh.children[j].children[n] );
newmesh.mixer.push(mixer); newmesh.mixer.push(mixer);
newmesh.mixerpush = false; newmesh.mixerpush = false;
// mixers.push(mixer); // mixers.push(mixer);
let action = mixer.clipAction( newmesh.children[j].children[n].animations[ 0 ] ); let action = mixer.clipAction( newmesh.children[j].children[n].animations[ 0 ] );
//action.play(); //action.play();
action.setLoop(THREE.LoopOnce); action.setLoop(THREE.LoopOnce);
action.clampWhenFinished = true; action.clampWhenFinished = true;
actionss[data[i].groupNumber].down.push(action); actionss[data[i].groupNumber].down.push(action);
} }
} }
} }
//newmesh.children[j].name = data[i].code; //newmesh.children[j].name = data[i].code;
@ -415,7 +415,7 @@ let onProgress = function ( xhr ) {
let onError = function () { }; let onError = function () { };
var beauty = new Image(); var beauty = new Image();
beauty.src = "../../cbtc/static/texture/guidenew.png"; beauty.src = "/cbtc/static/texture/guidenew.png";
//canvas文字贴图方法 //canvas文字贴图方法
//PS:待提炼 增强功能 //PS:待提炼 增强功能
function getTextCanvas(text){ function getTextCanvas(text){

View File

@ -1,5 +0,0 @@
import Group from "zrender/src/container/Group";
class DirectionRod extends Group {
}

View File

@ -756,6 +756,7 @@ class SkinCode extends defaultStyle {
} }
}; };
this[deviceType.FloodGate] = {}; this[deviceType.FloodGate] = {};
this[deviceType.DirectionRod] = {};
} }
} }

View File

@ -683,6 +683,7 @@ class SkinCode extends defaultStyle {
} }
}; };
this[deviceType.FloodGate] = {}; this[deviceType.FloodGate] = {};
this[deviceType.DirectionRod] = {};
} }
} }

View File

@ -872,6 +872,7 @@ class SkinCode extends defaultStyle {
} }
}; };
this[deviceType.FloodGate] = {}; this[deviceType.FloodGate] = {};
this[deviceType.DirectionRod] = {};
} }
} }

View File

@ -710,6 +710,7 @@ class SkinCode extends defaultStyle {
} }
}; };
this[deviceType.FloodGate] = {}; this[deviceType.FloodGate] = {};
this[deviceType.DirectionRod] = {};
} }
} }

View File

@ -718,6 +718,7 @@ class SkinCode extends defaultStyle {
} }
}; };
this[deviceType.FloodGate] = {}; this[deviceType.FloodGate] = {};
this[deviceType.DirectionRod] = {};
} }
} }

View File

@ -249,7 +249,7 @@ class SkinCode extends defaultStyle {
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色 detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
fontSize: 18, // 字体大小 fontSize: 18, // 字体大小
fontWeight: 'bold', fontWeight: 'bolder',
textVerticalAlign: 'middle' // 车站扣车 文字垂直对齐方式 textVerticalAlign: 'middle' // 车站扣车 文字垂直对齐方式
}, },
// 运行等级 // 运行等级
@ -781,6 +781,18 @@ class SkinCode extends defaultStyle {
} }
}; };
this[deviceType.FloodGate] = {}; this[deviceType.FloodGate] = {};
this[deviceType.DirectionRod] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
fillColor: '#0F0',
fontColor: '#FFF',
rodLength: 90,
rodHeight: 10,
triangleLength: 25,
triangleHeight: 20,
fontSize: 14,
fontOffsetX: 45,
fontOffsetY: 24
};
} }
} }

View File

@ -775,6 +775,7 @@ class SkinCode extends defaultStyle {
} }
}; };
this[deviceType.FloodGate] = {}; this[deviceType.FloodGate] = {};
this[deviceType.DirectionRod] = {};
} }
} }

View File

@ -845,6 +845,7 @@ class SkinCode extends defaultStyle {
allowCloseFillColor: '#FF0000', // 允许关门填充颜色 allowCloseFillColor: '#FF0000', // 允许关门填充颜色
allowCLoseStrokeColor: '#FFFF00' // 允许关门描边颜色 allowCLoseStrokeColor: '#FFFF00' // 允许关门描边颜色
}; };
this[deviceType.DirectionRod] = {};
} }
} }

View File

@ -783,6 +783,7 @@ class SkinCode extends defaultStyle {
} }
}; };
this[deviceType.FloodGate] = {}; this[deviceType.FloodGate] = {};
this[deviceType.DirectionRod] = {};
} }
} }

View File

@ -866,6 +866,7 @@ class SkinCode extends defaultStyle {
} }
}; };
this[deviceType.FloodGate] = {}; this[deviceType.FloodGate] = {};
this[deviceType.DirectionRod] = {};
} }
} }

View File

@ -260,8 +260,14 @@ deviceRender[deviceType.OverAp] = {
_type: deviceType.OverAp, _type: deviceType.OverAp,
zlevel: 1 zlevel: 1
}; };
/** 防淹门 */
deviceRender[deviceType.FloodGate] = { deviceRender[deviceType.FloodGate] = {
_type: deviceType.FloodGate, _type: deviceType.FloodGate,
zlevel: 1 zlevel: 1
}; };
/** 方向杆 */
deviceRender[deviceType.DirectionRod] = {
_type: deviceType.DirectionRod,
zlevel: 1
};
export default deviceRender; export default deviceRender;

View File

@ -140,6 +140,9 @@ deviceState[deviceType.StationStand] = {
deviceState[deviceType.FloodGate] = { deviceState[deviceType.FloodGate] = {
/** 防淹门状态 */ /** 防淹门状态 */
}; };
deviceState[deviceType.DirectionRod] = {
/** 方向杆状态 */
};
deviceState[deviceType.Train] = { deviceState[deviceType.Train] = {
// /** 列车类型*/ // /** 列车类型*/
// type: { // type: {

View File

@ -46,7 +46,8 @@ const deviceType = {
Power: 'Power', Power: 'Power',
StationTurnBack: 'StationTurnBack', StationTurnBack: 'StationTurnBack',
OverAp: 'OverAp', OverAp: 'OverAp',
FloodGate: 'FloodGate' FloodGate: 'FloodGate',
DirectionRod: 'DirectionRod'
}; };
export default deviceType; export default deviceType;

View File

@ -124,6 +124,9 @@ class Status {
handleFloodGate(device) { handleFloodGate(device) {
this.statusObj = { }; this.statusObj = { };
} }
handleDirectionRod(device) {
this.statusObj = { };
}
getStatus() { getStatus() {
return this.statusObj; return this.statusObj;
} }

View File

@ -0,0 +1,110 @@
import Group from 'zrender/src/container/Group';
import Polygon from 'zrender/src/graphic/shape/Polygon';
import {isShowThePrdType} from '../../utils/handlePath';
import Text from 'zrender/src/graphic/Text';
export default class DirectionRod extends Group {
constructor(model, style) {
super();
this.z = 5;
this._code = model.code;
this._type = model._type;
this.zlevel = model.zlevel;
this.model = model;
this.style = style;
this.isShowShape = true;
if (isShowThePrdType(model.prdType, style.DirectionRod.displayCondition) || model.previewOrMapDraw) {
this.create();
this.createMouseEvent();
this.setState(model);
}
if (model.previewOrMapDraw) {
this.setShowMode();
}
}
create() {
const model = this.model;
const style = this.style;
this.rod = new Polygon({
zlevel: this.zlevel,
z: this.z,
origin: [model.position.x + (style.DirectionRod.rodLength / 2), model.position.y],
rotation: 0,
shape: {
points: [
[model.position.x, model.position.y],
[model.position.x + style.DirectionRod.triangleLength, model.position.y + (style.DirectionRod.triangleHeight / 2)],
[model.position.x + style.DirectionRod.triangleLength, model.position.y + (style.DirectionRod.rodHeight / 2)],
[model.position.x + style.DirectionRod.rodLength, model.position.y + (style.DirectionRod.rodHeight / 2)],
[model.position.x + style.DirectionRod.rodLength, model.position.y - (style.DirectionRod.rodHeight / 2)],
[model.position.x + style.DirectionRod.triangleLength, model.position.y - (style.DirectionRod.rodHeight / 2)],
[model.position.x + style.DirectionRod.triangleLength, model.position.y - (style.DirectionRod.triangleHeight / 2)]
]
},
style: {
fill: style.DirectionRod.fillColor
}
});
this.tipText = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.position.x + style.DirectionRod.fontOffsetX,
y: model.position.y + style.DirectionRod.fontOffsetY,
fontWeight: 'normal',
fontSize: style.DirectionRod.fontSize,
fontFamily: this.style.fontFamily,
text: model.name,
textFill: style.DirectionRod.fontColor,
textAlign: 'center',
textPosition: 'inside',
textVerticalAlign: 'bottom'
}
});
this.add(this.rod);
this.add(this.tipText);
// setTimeout(()=> {
// console.log('*************');
// this.rod.attr('rotation', Math.PI);
// console.log(this.rod, '----');
// }, 10000);
}
recover() {
}
// 设置状态
setState(model) {
// if (!this.isShowShape) return;
// this.recover();
}
createMouseEvent() {
}
setShowMode() {
const showMode = this.model.showMode;
const showConditions = this.style.DirectionRod.displayCondition;
if (!showConditions || showConditions === '01' || showMode === showConditions) {
this.showMode();
} else {
this.hideMode();
}
}
setShowStation(stationCode) {
if (!stationCode || this.model.stationCode === stationCode) {
this.isShowShape = true;
this.showMode();
} else {
this.isShowShape = false;
this.hideMode();
}
}
showMode() {
this.rod && this.rod.show();
this.tipText && this.tipText.show();
this.setState(this.model);
}
hideMode() {
this.rod && this.rod.hide();
this.tipText && this.tipText.hide();
}
}

View File

@ -28,14 +28,16 @@ class EDetain extends Group {
x: detainX, x: detainX,
y: detainY, y: detainY,
text: deviceParam.text, text: deviceParam.text,
fontSize: `${deviceParam.fontSize}px`, fontSize: deviceParam.fontSize,
fontFamily: style.fontFamily, fontFamily: style.fontFamily,
fontWeight: deviceParam.fontWeight,
textFill: deviceParam.centerTrainColor, textFill: deviceParam.centerTrainColor,
textStroke: style.backgroundColor, textStroke: style.backgroundColor,
textAlign: style.textStyle.textAlign, textAlign: style.textStyle.textAlign,
textVerticalAlign: deviceParam.textVerticalAlign || style.textStyle.textVerticalAlign textVerticalAlign: deviceParam.textVerticalAlign || style.textStyle.textVerticalAlign
} }
}); });
console.log(this.detain, '************');
this.add(this.detain); this.add(this.detain);
} }
} }

View File

@ -28,6 +28,7 @@ import Power from './Power/index';
import StationTurnBack from './StationTurnBack/index'; import StationTurnBack from './StationTurnBack/index';
import OverAp from './OverAp/index.js'; import OverAp from './OverAp/index.js';
import FloodGate from './FloodGate/index'; import FloodGate from './FloodGate/index';
import DirectionRod from './DirectionRod/index';
/** 图库*/ /** 图库*/
const mapShape = {}; const mapShape = {};
@ -77,6 +78,7 @@ mapShape[deviceType.Power] = Power;
mapShape[deviceType.StationTurnBack] = StationTurnBack; mapShape[deviceType.StationTurnBack] = StationTurnBack;
mapShape[deviceType.OverAp] = OverAp; mapShape[deviceType.OverAp] = OverAp;
mapShape[deviceType.FloodGate] = FloodGate; mapShape[deviceType.FloodGate] = FloodGate;
mapShape[deviceType.DirectionRod] = DirectionRod;
function shapefactory(device, jmap) { function shapefactory(device, jmap) {
const type = device._type; const type = device._type;

View File

@ -513,9 +513,7 @@ export default {
{ name: '强解区段', cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, show: false, securityCommand: true } { name: '强解区段', cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, show: false, securityCommand: true }
] : [ ] : [
{ name: '封锁道岔', cmdType: CMD.Switch.CMD_SWITCH_BLOCK, operate: OperationEvent.Switch.block.menuButton, show: false }, { name: '封锁道岔', cmdType: CMD.Switch.CMD_SWITCH_BLOCK, operate: OperationEvent.Switch.block.menuButton, show: false },
{ name: '解封道岔', cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK, operate: OperationEvent.Switch.unblock.menuButton, show: false, securityCommand: true },
{ name: '单锁道岔', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK, operate: OperationEvent.Switch.lock.menuButton, show: false }, { name: '单锁道岔', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK, operate: OperationEvent.Switch.lock.menuButton, show: false },
{ name: '取消锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, operate: OperationEvent.Switch.unlock.menuButton, show: false, securityCommand: true },
{ name: '转换定位', cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION, operate: OperationEvent.Switch.locate.menuButton, show: false, disabledName: 'normalPosition' }, { name: '转换定位', cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION, operate: OperationEvent.Switch.locate.menuButton, show: false, disabledName: 'normalPosition' },
{ name: '转换反位', cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION, operate: OperationEvent.Switch.reverse.menuButton, show: false, disabledName: 'reversePosition' } { name: '转换反位', cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION, operate: OperationEvent.Switch.reverse.menuButton, show: false, disabledName: 'reversePosition' }
// { name: '', cmdType: CMD.Switch.CMD_SWITCH_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show: false } // { name: '', cmdType: CMD.Switch.CMD_SWITCH_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show: false }

View File

@ -234,6 +234,10 @@ export function parser(data, skinCode, showConfig) {
zrUtil.each(data.floodGateList || [], elem=> { zrUtil.each(data.floodGateList || [], elem=> {
mapDevice[elem.code] = createDevice(deviceType.FloodGate, elem, propConvert, showConfig); mapDevice[elem.code] = createDevice(deviceType.FloodGate, elem, propConvert, showConfig);
}, this); }, this);
zrUtil.each(data.directionRodList || [], elem=> {
mapDevice[elem.code] = createDevice(deviceType.DirectionRod, elem, propConvert, showConfig);
}, this);
} }
return mapDevice; return mapDevice;
@ -305,6 +309,7 @@ export function updateMapData(state, model) {
case deviceType.Power: updateForList(model, state, 'powerLineList'); break; case deviceType.Power: updateForList(model, state, 'powerLineList'); break;
case deviceType.StationTurnBack : updateForList(model, state, 'tbStrategyList'); break; case deviceType.StationTurnBack : updateForList(model, state, 'tbStrategyList'); break;
case deviceType.FloodGate: updateForList(model, state, 'floodGateList'); break; case deviceType.FloodGate: updateForList(model, state, 'floodGateList'); break;
case deviceType.DirectionRod: updateForList(model, state, 'directionRodList'); break;
} }
} }
} }

View File

@ -542,6 +542,13 @@ const map = {
return []; return [];
} }
}, },
directionRodList: (state) => {
if (state.map) {
return state.map.directionRodList;
} else {
return [];
}
},
trainDetails: (state) => { trainDetails: (state) => {
return state.trainDetails; return state.trainDetails;
}, },

View File

@ -9,6 +9,9 @@
<el-option v-for="(item, index) in typeList" :key="index" :label="item.name" :value="item.value" /> <el-option v-for="(item, index) in typeList" :key="index" :label="item.name" :value="item.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="旋转角度:" prop="rotation">
<el-input-number v-model="form.rotation" controls-position="right" size="small" />
</el-form-item>
<el-form-item label="宽度:" prop="width"> <el-form-item label="宽度:" prop="width">
<el-input-number v-model="form.width" controls-position="right" :min="1" size="small" /> <el-input-number v-model="form.width" controls-position="right" :min="1" size="small" />
</el-form-item> </el-form-item>
@ -47,7 +50,8 @@ export default {
type: '', type: '',
size: 10, size: 10,
width: 50, width: 50,
height: 50, height: 50,
rotation: 0,
x: 10, x: 10,
y: 10 y: 10
}, },
@ -59,6 +63,22 @@ export default {
{ name: '蓝色FIRE', value: 's'}, { name: '蓝色FIRE', value: 's'},
{ name: '红色FIRE', value: 'a'}, { name: '红色FIRE', value: 'a'},
{ name: 'APF', value: 'APF'}, { name: 'APF', value: 'APF'},
{ name: '手动阀', value: 'hand'},
{ name: '蓝色-阀门', value: 'fmBlue'},
{ name: '灰色-阀门', value: 'fmGray'},
{ name: '绿色-阀门', value: 'fmGreen'},
{ name: '空调', value: 'airCond'},
{ name: '多联空调', value: 'airCondMul'},
{ name: '管件', value: 'setting'},
{ name: '汽包', value: 'drum' },
{ name: '红色-左侧-鼓风机', value: 'blowerRedLeft'},
{ name: '灰色-左侧-鼓风机', value: 'blowerGrayLeft'},
{ name: '红色-右侧-鼓风机', value: 'blowerRedRight'},
{ name: '灰色-右侧-鼓风机', value: 'blowerGrayRight'},
{ name: '排风机', value: 'exhaustFan' },
{ name: '冷水机', value: 'waterCooler'},
{ name: '顶部排风机', value: 'ventilationFan'},
{ name: '文字蓝色背景', value: 'textBgBluePoint'}
], ],
rules: { rules: {
@ -85,7 +105,8 @@ export default {
this.isUpdate = true; this.isUpdate = true;
this.form.code = model.code; this.form.code = model.code;
this.form.type = model.type; this.form.type = model.type;
this.form.size = model.size; this.form.size = model.size;
this.form.rotation = model.rotation;
this.form.width = model.width; this.form.width = model.width;
this.form.height = model.height; this.form.height = model.height;
this.form.x = model.point.x; this.form.x = model.point.x;
@ -106,7 +127,8 @@ export default {
code: this.isUpdate ? this.form.code : getUID('IscsPicture', this.iscs.iscsPictureList), code: this.isUpdate ? this.form.code : getUID('IscsPicture', this.iscs.iscsPictureList),
_type: 'IscsPicture', _type: 'IscsPicture',
type: this.form.type, type: this.form.type,
size: this.form.size, size: this.form.size,
rotation: this.form.rotation,
width: this.form.width, width: this.form.width,
height: this.form.height height: this.form.height
}; };
@ -126,7 +148,8 @@ export default {
code: this.form.code, code: this.form.code,
_type: 'IscsPicture', _type: 'IscsPicture',
type: this.form.type, type: this.form.type,
size: this.form.size size: this.form.size,
rotation: this.form.rotation,
}; };
this.$emit('deleteDataModel', rectModel); this.$emit('deleteDataModel', rectModel);
}, },
@ -137,7 +160,8 @@ export default {
this.form = { this.form = {
code: '', code: '',
type: '', type: '',
size: 10, size: 10,
rotation: 0,
width: 50, width: 50,
height: 50, height: 50,
x: 10, x: 10,

View File

@ -114,15 +114,6 @@ export default {
}).catch(() => { }).catch(() => {
this.$message.error('ISCS数据保存异常'); this.$message.error('ISCS数据保存异常');
}); });
// {
// "graphData": "string",
// "id": 0,
// "lineCode": "string",
// "stationCode": "string",
// "system": "string",
// "totalSystem": "string",
// "userInterface": "string"
// }
} }
} }
}; };

View File

@ -0,0 +1,218 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<operate-property
ref="dataform"
:form="dataForm"
:edit-model="editModel"
:rules="rules"
type="Resource"
@updateMapModel="updateMapModel"
/>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
<create-operate
ref="createForm"
:create-form="makeForm"
:add-model="addModel"
:create-rules="rules"
@create="create"
/>
</el-tab-pane>
</el-tabs>
</template>
<script>
import { mapGetters } from 'vuex';
import { getUID } from '@/jmapNew/utils/Uid';
import OperateProperty from './components/operateProperty';
import CreateOperate from './components/createOperate';
import { deepAssign } from '@/utils/index';
export default {
name: 'DirectionRod',
components: {
OperateProperty,
CreateOperate
},
props: {
selected: {
type: Object,
default: function () {
return null;
}
}
},
data() {
return {
activeName: 'first',
lazy: true,
mapData: null,
editModel: {
code: '',
name: '',
startStationCode: '',
endStationCode: '',
position: {
x: 0,
y: 0
}
},
addModel: {
code: '',
name: '',
startStationCode: '',
endStationCode: '',
position: {
x: 0,
y: 0
}
},
rules: {
name: [
{ required: true, message: '请输入方向杆名称', trigger: 'blur' }
],
startStationCode: [
{ required: true, message: '请选择起始车站', trigger: 'change' }
],
endStationCode: [
{ required: true, message: '请选择中止车站', trigger: 'change'}
],
'position.x': [
{ required: true, message: '请输入x坐标', trigger: 'blur' }
],
'position.y': [
{ required: true, message: '请输入y坐标', trigger: 'blur' }
]
}
};
},
computed: {
...mapGetters('map', [
'directionRodList',
'stationList'
]),
dataForm() {
const form = {
labelWidth: '130px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
{ prop: 'code', label: `方向杆编码`, type: 'select', optionLabel: 'code', optionValue: 'code', options: this.directionRodList, deviceChange: this.deviceChange },
{ prop: 'name', label: '名称:', type: 'input', min: 0 },
{ prop: 'startStationCode', label: '起始车站:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.stationList },
{ prop: 'endStationCode', label: '中止车站:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.stationList },
{ prop: 'position', label: '坐标:', type: 'coordinate', width: '120px', 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' }
] }
]
},
map: {
name: this.$t('map.mapData'),
item: []
}
}
};
return form;
},
makeForm() {
const form = {
labelWidth: '150px',
items:{
all:{
name:'',
item: [
{ prop: 'name', label: '名称:', type: 'input', min: 0 },
{ prop: 'startStationCode', label: '起始车站:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.stationList },
{ prop: 'endStationCode', label: '中止车站:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.stationList },
{ prop: 'position', label: '坐标:', type: 'coordinate', width: '120px', 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' }
] }
]
}
}
};
return form;
}
},
mounted() {
},
methods: {
deviceChange(code) {
this.$emit('setCenter', code);
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
},
deviceSelect(selected) {
this.$refs.form && this.$refs.form.resetFields();
this.$refs.make && this.$refs.make.resetFields();
if (selected && selected._type.toUpperCase() === 'DirectionRod'.toUpperCase()) {
this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected);
}
},
create() {
const uid = getUID('DirectionRod', this.floodGateList || []);
const model = {
_type: 'DirectionRod',
code: uid,
name: this.addModel.name,
startStationCode: this.addModel.startStationCode,
endStationCode: this.addModel.endStationCode,
position: {
x: this.addModel.position.x,
y: this.addModel.position.y
}
};
this.$emit('updateMapModel', model);
this.$refs.createForm.resetForm();
},
updateMapModel(data) {
this.$emit('updateMapModel', data);
},
deleteObj() {
this.$refs.dataform.deleteObj();
},
//
edit() {
this.$refs.dataform.edit();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.card {
height: 100%;
}
.coordinate {
overflow: hidden;
.title {
text-align: right;
font-size: 14px;
color: #606266;
line-height: 40px;
padding: 0 12px 0 0;
-webkit-box-sizing: border-box;
box-sizing: border-box;
line-height: 28px;
width: 160px;
font-weight: bold;
display: block;
float: left;
}
}
.map-draft-group {
color: #3E44BE;
}
</style>

View File

@ -65,6 +65,7 @@ import SplitStation from './splitStation';
import Arrow from './arrow'; import Arrow from './arrow';
import SplitScreen from './splitScreen'; import SplitScreen from './splitScreen';
import FloodGate from './floodGate'; import FloodGate from './floodGate';
import DirectionRod from './directionRod';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
export default { export default {
@ -93,7 +94,8 @@ export default {
SplitStation, SplitStation,
Arrow, Arrow,
SplitScreen, SplitScreen,
FloodGate FloodGate,
DirectionRod
}, },
props: { props: {
selected: { selected: {
@ -132,7 +134,8 @@ export default {
{label: this.$t('map.boundingBox'), name:'CheckBox', menus:CheckboxDraft}, {label: this.$t('map.boundingBox'), name:'CheckBox', menus:CheckboxDraft},
{label: '站间分隔', name:'SplitStation', menus:SplitStation}, {label: '站间分隔', name:'SplitStation', menus:SplitStation},
{label: '箭头', name:'Arrow', menus:Arrow}, {label: '箭头', name:'Arrow', menus:Arrow},
{label: '防淹门', name: 'FloodGate', menus: FloodGate} {label: '防淹门', name: 'FloodGate', menus: FloodGate},
{label: '方向杆', name: 'DirectionRod', menus: DirectionRod}
], ],
selectDevice:'', selectDevice:'',
enabledTab: 'Section', enabledTab: 'Section',