This commit is contained in:
lVAL 2020-10-10 18:40:19 +08:00
commit a8c7e81890
71 changed files with 916 additions and 8384 deletions

View File

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

View File

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

View File

@ -1,5 +1,5 @@
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);
return renderer;
}

View File

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

View File

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

View File

@ -19,10 +19,10 @@ export function TrainList() {
// model
THREE.Loader.Handlers.add( /\.dds$/i, new THREE.DDSLoader() ) ;
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();
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;

View File

@ -384,7 +384,7 @@ export function JLmap3dEdit(dom, data, mapid) {
alignmentModel.railpoint[1].x -= offsetX;
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].y -= offsetY;
@ -405,7 +405,7 @@ export function JLmap3dEdit(dom, data, mapid) {
alignmentModel.railpoint[1].x -= offsetX;
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].y -= offsetY;

View File

@ -733,7 +733,7 @@ export function SectionList() {
// console.log("-------------------");
// console.log(jlmap3ddata.sectionlist.sections.datalist);
// 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.repeat.set( 1,1);

View File

@ -20,7 +20,7 @@ export function SectionList() {
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.repeat.set( 1,1);
@ -414,7 +414,7 @@ export function SectionList() {
};
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.repeat.set( 1,1);
@ -455,7 +455,7 @@ export function SectionList() {
})
let testmesh2;
if(scope.sections.datalist[start].standTrack == false){
testmesh2 = new THREE.Mesh( geometry, randomMaterail );
testmesh2 = new THREE.Mesh( geometry, selectmaterial );
}else{
testmesh2 = new THREE.Mesh( geometry, selectmaterial );
}
@ -804,7 +804,7 @@ export function SectionList() {
}
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.repeat.set( 1,1);
@ -862,7 +862,7 @@ export function SectionList() {
});
if(newsection.standTrack == false){
testmesh2 = new THREE.Mesh( geometry, randomMaterail );
testmesh2 = new THREE.Mesh( geometry, selectmaterial );
}else{
testmesh2 = new THREE.Mesh( geometry, selectmaterial );
}

View File

@ -1,13 +1,13 @@
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) {

View File

@ -7,14 +7,14 @@ var Staticmodel = {
picUrl: "",
assetUrl: "./../cbtc/static/MODEL/device/switch/ZD6D.FBX"
},//"https://joylink.club/oss/wx/switch/switch.FBX"
//../../cbtc/static/MODEL/device/switch.FBX
///cbtc/static/MODEL/device/switch.FBX
Signal: {
id: "2",
name: "信号机",
deviceType: "Signal",
type: "low",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/device/signal/signal.FBX"
assetUrl: "/cbtc/static/MODEL/device/signal/signal.FBX"
},
stationstand: {
id: "3",
@ -22,9 +22,9 @@ var Staticmodel = {
deviceType: "stationstand",
type: "low",
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
//../../cbtc/static/MODEL/device/stationstand.FBX
///cbtc/static/MODEL/device/stationstand.FBX
},
section: {
@ -33,9 +33,9 @@ var Staticmodel = {
deviceType: "section",
type: "low",
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
//../../cbtc/static/MODEL/device/stationstand.FBX
///cbtc/static/MODEL/device/stationstand.FBX
},
room: {
@ -44,9 +44,9 @@ var Staticmodel = {
deviceType: "room",
type: "low",
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
//../../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();
beauty.src = "../../cbtc/static/texture/guide.png";
beauty.src = "/cbtc/static/texture/guide.png";
//canvas文字贴图方法
//PS:待提炼 增强功能
function getTextCanvas(text){

View File

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

View File

@ -1,7 +1,7 @@
import { getBaseUrl } from '@/utils/baseUrl';
const BASE_API = getBaseUrl();
let modelurl = "../../cbtc/static/MODEL/jdq/";
let modelurl = "/cbtc/static/MODEL/jdq/";
// if(BASE_API == 'https://joylink.club/jlcloud'){
// modelurl = "https://joylink.club/oss/jdq/";
// }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();
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;
//定义全局光
@ -540,7 +540,7 @@ export function Jl3ddevice(dom,serviceid) {
}
var beauty = new Image();
beauty.src = "../../cbtc/static/texture/guide.png";
beauty.src = "/cbtc/static/texture/guide.png";
//canvas文字贴图方法
//PS:待提炼 增强功能
function getTextCanvas(text){

View File

@ -56,7 +56,7 @@ export function Jl3ddevice(dom,serviceid) {
//定义场景(渲染容器)
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;
//定义全局光
@ -537,7 +537,7 @@ export function Jl3ddevice(dom,serviceid) {
}
var beauty = new Image();
beauty.src = "../../cbtc/static/texture/guide.png";
beauty.src = "/cbtc/static/texture/guide.png";
//canvas文字贴图方法
//PS:待提炼 增强功能
function getTextCanvas(text){

View File

@ -110,7 +110,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
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();
@ -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
// 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.setLoop( true );
// sound.setVolume( 0 );
@ -144,10 +144,11 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
scene.add(controls3.getObject());
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;
camera.add(cameracctv);
cameracctv.rotation.y = -Math.PI/2;
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){
scope.datatype = "old";
// 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.socketon(scope.Subscribe.topic);
@ -208,7 +209,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
}, 2000);
}else{
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);
datanew();
@ -433,6 +434,9 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
trainlisttest = loadtrainlisttest;
realsectionlist = loadrealsectionlist;
rails = loadrails;
console.log(trainlisttest.group.children[0]);
trainlisttest.group.children[0].getObjectByName("c1").add(cameracctv);
}
this.eventon = function() {

View File

@ -50,8 +50,10 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
driverWebWorker.onmessage = function (event) {
let data = event.data;
// console.log(data);
if(data.type == "Train_Position"){
trainrun(data.body);
nowTrainRun(data.body);
return;
}
@ -60,7 +62,15 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
otherTrainRun(data.body);
return;
}
if(data.type == "Train_Hmi_3D"){
//改变当前列车code
if(data.body.groupNumber){
changeNowTrain(data.body);
}
updatestatus(data.body);
return;
}
@ -92,7 +102,88 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
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) {
// console.log(mapdata);
// console.log(newtrainlisttest);
@ -115,7 +206,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
this.socketon = function(topic) {
try {
// console.log("teststomp");
scope.teststomp.subscribe(topic, callback, header);
// scope.teststomp.subscribe(topic, callback, header);
} catch (error) {
console.error('websocket订阅失败');
}
@ -153,9 +244,9 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
let data = JSON.parse(Response.body);
// stats.update();
// 遍历后台数据
// console.log(data);
console.log(data);
if(data.type == "Train_Position"){
trainrun(data.body);
nowTrainRun(data.body);
return;
}
@ -405,13 +496,10 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
}
//更新当前驾驶车辆
function nowTrainRun(data){
function trainrun(data){
// console.log(data);
// if(data.code = "336"){
// console.log(data);
// }
//改变当前列车code
if(data.code != trainmodel.code){
if(trainlisttest.otherTrainList[trainmodel.code] && trainmodel.code){
trainlisttest.otherTrainList[trainmodel.code].offset = 0;
@ -421,11 +509,13 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
trainmodel.nowcode = data.code;
}
//改变当前列车行驶的区段code
if(data.section != trainmodel.nowsection){
trainmodel.nowsection = data.section;
trainmodel.curve = rails.sectionrail[data.section].lineleft;
}
// console.log(trainmodel.right);
//判断转向
if(trainmodel.right != data.right){
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;
trainmodel.children[0].position.z -= offsetz;
let offsety = pos.y - trainmodel.children[0].position.y;
trainmodel.children[0].position.y += offsetz;
// let offsety = pos.y - trainmodel.children[0].position.y;
// trainmodel.children[0].position.y += offsetz;
// trainmodel.position.z = point.z;
}
@ -768,8 +858,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
}
}
}else{
if (trainmodel.openright != data.open && data.open == '0') {
trainmodel.openright = '0';
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();
}
}
}
}
}
}

View File

@ -701,7 +701,7 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
}
}
var beauty = new Image();
beauty.src = "../../cbtc/static/texture/guide.png";
beauty.src = "/cbtc/static/texture/guide.png";
//canvas文字贴图方法
//PS:待提炼 增强功能
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 targetPosition = new THREE.Vector3();
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.wrapT=THREE.RepeatWrapping;
textureNav.repeat.x = 40;
@ -195,7 +195,7 @@ export function Jl3dfaultdeviceVR(dom,group,skinCode) {
// load a resource
loaderObj.load(
// resource URL
'../../cbtc/static/vrtest/path.obj',
'/cbtc/static/vrtest/path.obj',
// called when resource is loaded
function ( object ) {
@ -267,7 +267,7 @@ export function Jl3dfaultdeviceVR(dom,group,skinCode) {
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 = {
type:'init',
@ -1144,7 +1144,7 @@ export function Jl3dfaultdeviceVR(dom,group,skinCode) {
var loader = new THREE.TextureLoader();
var circle;
loader.load(
'../../cbtc/static/vrtest/ring.png',
'/cbtc/static/vrtest/ring.png',
// onLoad callback
function ( texture ) {
@ -1404,7 +1404,7 @@ export function Jl3dfaultdeviceVR(dom,group,skinCode) {
}
}
var beauty = new Image();
beauty.src = "../../cbtc/static/texture/scene.png";
beauty.src = "/cbtc/static/texture/scene.png";
//canvas文字贴图方法
//PS:待提炼 增强功能
function getTextCanvas(text){

View File

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

View File

@ -105,7 +105,7 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
this.controls.update();
this.modelmanager = new ModelManagerVR();
loader.load(
'../../cbtc/static/vrtest/ring.png',
'/cbtc/static/vrtest/ring.png',
// onLoad callback
function ( texture ) {
@ -163,7 +163,7 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
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 = {
type:'init',
@ -611,7 +611,7 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
}
}
var beauty = new Image();
beauty.src = "../../cbtc/static/texture/scene.png";
beauty.src = "/cbtc/static/texture/scene.png";
//canvas文字贴图方法
//PS:待提炼 增强功能
function getTextCanvas(text){

View File

@ -4,36 +4,36 @@ var TrainRescueStatic = {
name: "动画模型",
deviceType: "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"
//../../cbtc/static/MODEL/device/switch.FBX
///cbtc/static/MODEL/device/switch.FBX
floorplane: {
id: "2",
name: "行走范围",
deviceType: "runplane",
type: "runplane",
url: "../../cbtc/static/vrtest/trainrescue/diban.FBX"
url: "/cbtc/static/vrtest/trainrescue/diban.FBX"
},
controlmodel: {
id: "3",
name: "控制台",
deviceType: "controlmodel",
type: "controlmodel",
url: "../../cbtc/static/vrtest/trainrescue/kongzhigan.FBX"
url: "/cbtc/static/vrtest/trainrescue/kongzhigan.FBX"
},
other: {
id: "4",
name: "其他",
deviceType: "other",
type: "other",
url: "../../cbtc/static/vrtest/trainrescue/TK.FBX"
url: "/cbtc/static/vrtest/trainrescue/TK.FBX"
},
handR: {
id: "5",
name: "handr",
deviceType: "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();
this.webwork = new Worker("../../cbtc/static/workertest/trainworker.js");
this.webwork = new Worker("/cbtc/static/workertest/trainworker.js");
//初始化加载数据和模型getPublishMapDetail
getPublishMapDetail(skinCode).then(data => {
let mapnetdata = data.data;
@ -124,7 +124,7 @@ export function JLmap3dMaintainer(dom, data,skinCode,storemod,routegroup,project
}else{
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.socketon(scope.Subscribe.topic);
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
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.setLoop( true );
scope.sound.setVolume( 3 );

View File

@ -17,7 +17,7 @@ export function VrGui(){
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( {
map: texturePlane,
side: THREE.DoubleSide,
@ -36,7 +36,7 @@ export function VrGui(){
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( {
map: texture,
transparent: true,
@ -48,7 +48,7 @@ export function VrGui(){
buttonHome.position.z = 0.02;
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( {
map: texture,
transparent: true,
@ -60,7 +60,7 @@ export function VrGui(){
buttonStationList.position.z = 0.02;
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( {
map: texture,
transparent: true,
@ -78,7 +78,7 @@ export function VrGui(){
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( {
map: texture,
transparent: true,
@ -90,7 +90,7 @@ export function VrGui(){
buttonPreviousFault.position.z = 0.02;
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( {
// map: texture,
// transparent: true,
@ -102,7 +102,7 @@ export function VrGui(){
// buttonPrevious.position.z = 0.02;
// 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( {
map: texture,
transparent: true,
@ -114,7 +114,7 @@ export function VrGui(){
buttonNextFault.position.z = 0.02;
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( {
map: texture,
transparent: true,
@ -127,7 +127,7 @@ export function VrGui(){
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( {
map: texture,
transparent: true,
@ -145,7 +145,7 @@ export function VrGui(){
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( {
map: texture,
transparent: true,
@ -157,7 +157,7 @@ export function VrGui(){
button1.position.z = 0.02;
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( {
map: texture,
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( {
map: texture,
transparent: true,
@ -183,7 +183,7 @@ export function VrGui(){
button2.position.z = 0.02;
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( {
map: texture,
transparent: true,
@ -208,7 +208,7 @@ export function VrGui(){
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( {
map: textureshebei,
transparent: true,
@ -220,7 +220,7 @@ export function VrGui(){
buttonShiBei.position.z = 0.02;
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( {
map: texturezhankong,
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( {
map: texture,
transparent: true,
@ -246,7 +246,7 @@ export function VrGui(){
buttonStation1.position.z = 0.02;
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( {
map: texture,
transparent: true,
@ -452,7 +452,7 @@ export function VrGui(){
var beauty = new Image();
beauty.src = "../../cbtc/static/texture/scene.png";
beauty.src = "/cbtc/static/texture/scene.png";
//canvas文字贴图方法
//PS:待提炼 增强功能
function getTextCanvas(text,type){

View File

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

View File

@ -5,16 +5,16 @@ var Staticmodel = {
deviceType: "man",
type: "man",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/man1.FBX"
assetUrl: "/cbtc/static/MODEL/passflow/man1.FBX"
},//"https://joylink.club/oss/wx/switch/switch.FBX"
//../../cbtc/static/MODEL/device/switch.FBX
///cbtc/static/MODEL/device/switch.FBX
man2: {
id: "2",
name: "人物2",
deviceType: "man",
type: "man",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/man2.FBX"
assetUrl: "/cbtc/static/MODEL/passflow/man2.FBX"
},
station: {
id: "3",
@ -22,7 +22,7 @@ var Staticmodel = {
deviceType: "station",
type: "hrb",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/station.FBX"
assetUrl: "/cbtc/static/MODEL/passflow/station.FBX"
},
zhajiin: {
id: "4",
@ -30,7 +30,7 @@ var Staticmodel = {
deviceType: "zhajiin",
type: "hrb",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/zhajiin.FBX"
assetUrl: "/cbtc/static/MODEL/passflow/zhajiin.FBX"
},
zhajiout: {
id: "5",
@ -38,7 +38,7 @@ var Staticmodel = {
deviceType: "zhajiout",
type: "hrb",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/zhajiout.FBX"
assetUrl: "/cbtc/static/MODEL/passflow/zhajiout.FBX"
},
monitor: {
id: "6",
@ -46,7 +46,7 @@ var Staticmodel = {
deviceType: "monitor",
type: "hrb",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/monitor.FBX"
assetUrl: "/cbtc/static/MODEL/passflow/monitor.FBX"
},
train: {
id: "7",
@ -54,7 +54,7 @@ var Staticmodel = {
deviceType: "train",
type: "hrb",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/train/train.FBX"
assetUrl: "/cbtc/static/MODEL/train/train.FBX"
},
section: {
id: "8",
@ -62,7 +62,7 @@ var Staticmodel = {
deviceType: "section",
type: "hrb",
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 passerwebwork = new Worker("../../cbtc/static/workertest/passsimulation/passer.js");
let stationwebwork = new Worker("../../cbtc/static/workertest/passsimulation/station.js");
// let passerwebwork = new Worker("/cbtc/static/workertest/passsimulation/passer.js");
let stationwebwork = new Worker("/cbtc/static/workertest/passsimulation/station.js");
let stationzon = new ZoneManager();
//老版本临时ai控制
@ -297,7 +297,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup,viewMap) {
// load a resource
loader.load(
// resource URL
'../../cbtc/static/jl3d/path/path.obj',
'/cbtc/static/jl3d/path/path.obj',
// called when resource is loaded
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++){
// console.log(event.data.body[i]);
trainrunnew(event.data.body[i]);
trainRunNew(event.data.body[i]);
}
return;
}
@ -152,7 +152,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
}
};
function trainrunnew(data){
function trainRunNew(data){
let code = data.code;
if(trainlisttest.list[code].right != data.right){
@ -833,20 +833,20 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
function switchupdate(data) {
code = data.code;
if (actions[code].normal != data.normal) {
if (data.normal == '02') {
if (data.normal == '1') {
// sectionlist.switchs.modellist[j].normal = data.normal;
actions[code].action.reset();
actions[code].action.time = 0;
actions[code].action.timeScale = 1;
actions[code].action.play();
actions[code].normal = "02";
} else if (data.normal == '01') {
actions[code].normal = "1";
} else if (data.normal == '0') {
// sectionlist.switchs.modellist[j].normal = data.normal;
actions[code].action.reset();
actions[code].action.time = actions[code].action._clip.duration;
actions[code].action.timeScale = -1;
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);
this.webwork = new Worker("../../cbtc/static/workertest/trainworker.js");
this.webwork = new Worker("/cbtc/static/workertest/trainworker.js");
//初始化加载数据和模型getPublishMapDetail
getPublishMapDetail(skinCode).then(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);
if(assetsdata.link){
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.socketon(scope.Subscribe.topic);
SimulationLoad(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod);
}else{
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.socketon(scope.Subscribe.topic);
SimulationLoadNew(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod);

View File

@ -11,7 +11,7 @@ let defaultsignal = {
deviceType:"signal",
type:"low",
picUrl:"",
url:"../../cbtc/static/MODEL/signal/d3d.FBX"
url:"/cbtc/static/MODEL/signal/d3d.FBX"
}
let defaulttrain = {
@ -20,7 +20,7 @@ let defaulttrain = {
deviceType:"train",
type:"num4",
picUrl:"",
url:"../../cbtc/static/MODEL/train/train.FBX"
url:"/cbtc/static/MODEL/train/train.FBX"
}
@ -30,15 +30,15 @@ let defaultstation = {
deviceType:"stand",
type:"num4",
picUrl:"",
url:"../../cbtc/static/MODEL/station/fuzhou.FBX"
}//"../../cbtc/static/MODEL/station/fuzhou/fuzhou.FBX"
url:"/cbtc/static/MODEL/station/fuzhou.FBX"
}//"/cbtc/static/MODEL/station/fuzhou/fuzhou.FBX"
let waicestation = {
id:"10",
name:"外侧车站",
deviceType:"standwaice",
type:"num4",
picUrl:"",
url:"../../cbtc/static/MODEL/station/waicestation.FBX"
url:"/cbtc/static/MODEL/station/waicestation.FBX"
}
let station3 = {
id:"10000",
@ -46,12 +46,12 @@ let station3 = {
deviceType:"station3",
type:"num4",
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://joylink.club/oss/station/fuzhou/fuzhou.FBX
//../../cbtc/static/MODEL/station/zhantai715(2).FBX
///cbtc/static/MODEL/station/zhantai715(2).FBX
let defaultswitch = {
id:"11",
@ -59,7 +59,7 @@ let defaultswitch = {
deviceType:"switch",
type:"fuzhou",
picUrl:"",
url:"../../cbtc/static/MODEL/daocha/daocha.FBX"
url:"/cbtc/static/MODEL/daocha/daocha.FBX"
}
@ -69,7 +69,7 @@ let defaultsuidao = {
deviceType:"suidao",
type:"suidao",
picUrl:"",
url:"../../cbtc/static/MODEL/suidao/suidao.FBX"
url:"/cbtc/static/MODEL/suidao/suidao.FBX"
}
let hebsuidao = {
@ -78,7 +78,7 @@ let hebsuidao = {
deviceType:"hebsuidao",
type:"hebsuidao",
picUrl:"",
url:"../../cbtc/static/MODEL/suidao/hebsuidao.FBX"
url:"/cbtc/static/MODEL/suidao/hebsuidao.FBX"
}
let nbsuidao = {
id:"1010",
@ -86,7 +86,7 @@ let nbsuidao = {
deviceType:"nbsuidao",
type:"nbsuidao",
picUrl:"",
url:"../../cbtc/static/MODEL/suidao/nbsuidao.FBX"
url:"/cbtc/static/MODEL/suidao/nbsuidao.FBX"
}
let defaultbackground = {
id:"16",
@ -94,12 +94,12 @@ let defaultbackground = {
deviceType:"background",
type:"background",
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://joylink.club/oss/suidao/suidao.FBX
//../../cbtc/static/MODEL/suidao/suidao.FBX
///cbtc/static/MODEL/suidao/suidao.FBX
let defaultautorail = {
id:"100",
@ -107,7 +107,7 @@ let defaultautorail = {
deviceType:"autorail",
type:"autorail",
picUrl:"",
url:"../../cbtc/static/MODEL/auto/rail.FBX"
url:"/cbtc/static/MODEL/auto/rail.FBX"
}
let autoswitch = {
@ -116,7 +116,7 @@ let autoswitch = {
deviceType:"autoswitch",
type:"fuzhou",
picUrl:"",
url:"../../cbtc/static/MODEL/auto/autoswitch.FBX"
url:"/cbtc/static/MODEL/auto/autoswitch.FBX"
}
let autoswitch1 = {
@ -125,7 +125,7 @@ let autoswitch1 = {
deviceType:"autoswitch1",
type:"fuzhou",
picUrl:"",
url:"../../cbtc/static/MODEL/auto/switch1.FBX"
url:"/cbtc/static/MODEL/auto/switch1.FBX"
}
let autoswitch2 = {
@ -134,7 +134,7 @@ let autoswitch2 = {
deviceType:"autoswitch2",
type:"fuzhou",
picUrl:"",
url:"../../cbtc/static/MODEL/auto/switch2.FBX"
url:"/cbtc/static/MODEL/auto/switch2.FBX"
}
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){
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){
@ -20,98 +20,98 @@ export function Materialload(jlmap3dedit,standTextureData){
// if(assettype){
// if(assettype.stationtexture == "xian3"){
// if(jlmap3dedit.stationtexture){
// setstationtexture(jlmap3dedit.stationtexture,"stationlist",'../../cbtc/static/texture/xian3/xian3list.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'../../cbtc/static/texture/xian3/pingbimen.png');
// setstationtexture(jlmap3dedit.stationtexture,"Station18000",'../../cbtc/static/texture/xian3/Station18000.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station61238",'../../cbtc/static/texture/xian3/Station61238.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station41790",'../../cbtc/static/texture/xian3/Station41790.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station67945",'../../cbtc/static/texture/xian3/Station67945.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station85598",'../../cbtc/static/texture/xian3/Station85598.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station4324",'../../cbtc/static/texture/xian3/Station4324.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station55755",'../../cbtc/static/texture/xian3/Station55755.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station53597",'../../cbtc/static/texture/xian3/Station53597.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station68029",'../../cbtc/static/texture/xian3/Station68029.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station17596",'../../cbtc/static/texture/xian3/Station17596.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station66742",'../../cbtc/static/texture/xian3/Station66742.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station90701",'../../cbtc/static/texture/xian3/Station90701.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station90652",'../../cbtc/static/texture/xian3/Station90652.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station54200",'../../cbtc/static/texture/xian3/Station54200.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station19253",'../../cbtc/static/texture/xian3/Station19253.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station37821",'../../cbtc/static/texture/xian3/Station37821.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station47557",'../../cbtc/static/texture/xian3/Station47557.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station78551",'../../cbtc/static/texture/xian3/Station78551.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station64474",'../../cbtc/static/texture/xian3/Station64474.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station21203",'../../cbtc/static/texture/xian3/Station21203.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station34499",'../../cbtc/static/texture/xian3/Station34499.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station571",'../../cbtc/static/texture/xian3/Station571.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station99903",'../../cbtc/static/texture/xian3/Station99903.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station43447",'../../cbtc/static/texture/xian3/Station43447.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station67917",'../../cbtc/static/texture/xian3/Station67917.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station60649",'../../cbtc/static/texture/xian3/Station60649.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"stationlist",'/cbtc/static/texture/xian3/xian3list.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'/cbtc/static/texture/xian3/pingbimen.png');
// setstationtexture(jlmap3dedit.stationtexture,"Station18000",'/cbtc/static/texture/xian3/Station18000.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station61238",'/cbtc/static/texture/xian3/Station61238.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station41790",'/cbtc/static/texture/xian3/Station41790.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station67945",'/cbtc/static/texture/xian3/Station67945.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station85598",'/cbtc/static/texture/xian3/Station85598.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station4324",'/cbtc/static/texture/xian3/Station4324.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station55755",'/cbtc/static/texture/xian3/Station55755.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station53597",'/cbtc/static/texture/xian3/Station53597.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station68029",'/cbtc/static/texture/xian3/Station68029.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station17596",'/cbtc/static/texture/xian3/Station17596.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station66742",'/cbtc/static/texture/xian3/Station66742.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station90701",'/cbtc/static/texture/xian3/Station90701.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station90652",'/cbtc/static/texture/xian3/Station90652.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station54200",'/cbtc/static/texture/xian3/Station54200.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station19253",'/cbtc/static/texture/xian3/Station19253.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station37821",'/cbtc/static/texture/xian3/Station37821.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station47557",'/cbtc/static/texture/xian3/Station47557.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station78551",'/cbtc/static/texture/xian3/Station78551.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station64474",'/cbtc/static/texture/xian3/Station64474.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station21203",'/cbtc/static/texture/xian3/Station21203.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station34499",'/cbtc/static/texture/xian3/Station34499.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station571",'/cbtc/static/texture/xian3/Station571.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station99903",'/cbtc/static/texture/xian3/Station99903.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station43447",'/cbtc/static/texture/xian3/Station43447.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station67917",'/cbtc/static/texture/xian3/Station67917.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station60649",'/cbtc/static/texture/xian3/Station60649.jpg');
// }
// }
// if(assettype.stationtexture == "haerbin1"){
// if(jlmap3dedit.stationtexture){
// setstationtexture(jlmap3dedit.stationtexture,"stationlist",'../../cbtc/static/texture/heb/haerbinlist.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'../../cbtc/static/texture/heb/pingbimen.png');
// setstationtexture(jlmap3dedit.stationtexture,"Station5361",'../../cbtc/static/texture/heb/Station5361.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station11094",'../../cbtc/static/texture/heb/Station11094.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station11136",'../../cbtc/static/texture/heb/Station11136.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station17293",'../../cbtc/static/texture/heb/Station17293.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station18398",'../../cbtc/static/texture/heb/Station18398.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station22163",'../../cbtc/static/texture/heb/Station22163.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station25464",'../../cbtc/static/texture/heb/Station25464.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station28090",'../../cbtc/static/texture/heb/Station28090.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station41999",'../../cbtc/static/texture/heb/Station41999.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station44338",'../../cbtc/static/texture/heb/Station44338.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station46464",'../../cbtc/static/texture/heb/Station46464.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station50565",'../../cbtc/static/texture/heb/Station50565.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station60068",'../../cbtc/static/texture/heb/Station60068.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station62429",'../../cbtc/static/texture/heb/Station62429.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station64444",'../../cbtc/static/texture/heb/Station64444.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station71700",'../../cbtc/static/texture/heb/Station71700.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station72132",'../../cbtc/static/texture/heb/Station72132.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station78164",'../../cbtc/static/texture/heb/Station78164.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station79537",'../../cbtc/static/texture/heb/Station79537.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station82618",'../../cbtc/static/texture/heb/Station82618.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station85520",'../../cbtc/static/texture/heb/Station85520.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station89483",'../../cbtc/static/texture/heb/Station89483.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station96090",'../../cbtc/static/texture/heb/Station96090.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"stationlist",'/cbtc/static/texture/heb/haerbinlist.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'/cbtc/static/texture/heb/pingbimen.png');
// setstationtexture(jlmap3dedit.stationtexture,"Station5361",'/cbtc/static/texture/heb/Station5361.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station11094",'/cbtc/static/texture/heb/Station11094.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station11136",'/cbtc/static/texture/heb/Station11136.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station17293",'/cbtc/static/texture/heb/Station17293.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station18398",'/cbtc/static/texture/heb/Station18398.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station22163",'/cbtc/static/texture/heb/Station22163.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station25464",'/cbtc/static/texture/heb/Station25464.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station28090",'/cbtc/static/texture/heb/Station28090.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station41999",'/cbtc/static/texture/heb/Station41999.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station44338",'/cbtc/static/texture/heb/Station44338.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station46464",'/cbtc/static/texture/heb/Station46464.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station50565",'/cbtc/static/texture/heb/Station50565.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station60068",'/cbtc/static/texture/heb/Station60068.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station62429",'/cbtc/static/texture/heb/Station62429.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station64444",'/cbtc/static/texture/heb/Station64444.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station71700",'/cbtc/static/texture/heb/Station71700.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station72132",'/cbtc/static/texture/heb/Station72132.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station78164",'/cbtc/static/texture/heb/Station78164.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station79537",'/cbtc/static/texture/heb/Station79537.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station82618",'/cbtc/static/texture/heb/Station82618.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station85520",'/cbtc/static/texture/heb/Station85520.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station89483",'/cbtc/static/texture/heb/Station89483.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station96090",'/cbtc/static/texture/heb/Station96090.jpg');
// }
// }
// if(assettype.stationtexture == "nb1"){
// if(jlmap3dedit.stationtexture){
// setstationtexture(jlmap3dedit.stationtexture,"stationlist",'../../cbtc/static/texture/nb1/nb1list.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'../../cbtc/static/texture/nb1/pingbimen.png');
// setstationtexture(jlmap3dedit.stationtexture,"Station1533",'../../cbtc/static/texture/nb1/Station1533.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station11231",'../../cbtc/static/texture/nb1/Station11231.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station12421",'../../cbtc/static/texture/nb1/Station12421.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station16356",'../../cbtc/static/texture/nb1/Station16356.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station18678",'../../cbtc/static/texture/nb1/Station18678.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station19817",'../../cbtc/static/texture/nb1/Station19817.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station23567",'../../cbtc/static/texture/nb1/Station23567.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station24903",'../../cbtc/static/texture/nb1/Station24903.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station26416",'../../cbtc/static/texture/nb1/Station26416.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station27207",'../../cbtc/static/texture/nb1/Station27207.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station28032",'../../cbtc/static/texture/nb1/Station28032.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station28958",'../../cbtc/static/texture/nb1/Station28958.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station30520",'../../cbtc/static/texture/nb1/Station30520.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station32955",'../../cbtc/static/texture/nb1/Station32955.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station38286",'../../cbtc/static/texture/nb1/Station38286.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station38674",'../../cbtc/static/texture/nb1/Station38674.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station44173",'../../cbtc/static/texture/nb1/Station44173.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station63100",'../../cbtc/static/texture/nb1/Station63100.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station69378",'../../cbtc/static/texture/nb1/Station69378.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station72310",'../../cbtc/static/texture/nb1/Station72310.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station72764",'../../cbtc/static/texture/nb1/Station72764.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station75414",'../../cbtc/static/texture/nb1/Station75414.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station75494",'../../cbtc/static/texture/nb1/Station75494.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station75703",'../../cbtc/static/texture/nb1/Station75703.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station78392",'../../cbtc/static/texture/nb1/Station78392.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station81700",'../../cbtc/static/texture/nb1/Station81700.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station84098",'../../cbtc/static/texture/nb1/Station84098.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station86112",'../../cbtc/static/texture/nb1/Station86112.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station99584",'../../cbtc/static/texture/nb1/Station99584.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"stationlist",'/cbtc/static/texture/nb1/nb1list.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'/cbtc/static/texture/nb1/pingbimen.png');
// setstationtexture(jlmap3dedit.stationtexture,"Station1533",'/cbtc/static/texture/nb1/Station1533.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station11231",'/cbtc/static/texture/nb1/Station11231.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station12421",'/cbtc/static/texture/nb1/Station12421.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station16356",'/cbtc/static/texture/nb1/Station16356.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station18678",'/cbtc/static/texture/nb1/Station18678.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station19817",'/cbtc/static/texture/nb1/Station19817.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station23567",'/cbtc/static/texture/nb1/Station23567.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station24903",'/cbtc/static/texture/nb1/Station24903.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station26416",'/cbtc/static/texture/nb1/Station26416.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station27207",'/cbtc/static/texture/nb1/Station27207.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station28032",'/cbtc/static/texture/nb1/Station28032.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station28958",'/cbtc/static/texture/nb1/Station28958.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station30520",'/cbtc/static/texture/nb1/Station30520.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station32955",'/cbtc/static/texture/nb1/Station32955.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station38286",'/cbtc/static/texture/nb1/Station38286.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station38674",'/cbtc/static/texture/nb1/Station38674.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station44173",'/cbtc/static/texture/nb1/Station44173.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station63100",'/cbtc/static/texture/nb1/Station63100.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station69378",'/cbtc/static/texture/nb1/Station69378.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station72310",'/cbtc/static/texture/nb1/Station72310.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station72764",'/cbtc/static/texture/nb1/Station72764.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station75414",'/cbtc/static/texture/nb1/Station75414.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station75494",'/cbtc/static/texture/nb1/Station75494.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station75703",'/cbtc/static/texture/nb1/Station75703.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station78392",'/cbtc/static/texture/nb1/Station78392.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station81700",'/cbtc/static/texture/nb1/Station81700.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station84098",'/cbtc/static/texture/nb1/Station84098.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station86112",'/cbtc/static/texture/nb1/Station86112.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);

View File

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

View File

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

View File

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

View File

@ -19,7 +19,7 @@ export function SectionListN() {
var autorail;
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.repeat.set( 1,1);
@ -99,16 +99,30 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
if(newsection.railpoint.length>=3){
// console.log(newsection);
let height = Math.random()/1000;
var closedSpline = new THREE.CatmullRomCurve3( [
var closedSpline;
if(Math.abs(newsection.railpoint[0].y-newsection.railpoint[2].y)>0.01){
console.log(newsection.railpoint);
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.0001),
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;
var extrudeSettings = {
steps : 5,
steps : 6,
curveSegments : 1,
bevelSegments : 1,
bevelEnabled : false,
@ -117,7 +131,9 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
var shape = new THREE.Shape();
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.lineTo( 2, 0 );
}else{
@ -133,16 +149,16 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
if(i%2 != 0){
mesh.geometry.attributes.uv.array[ui] = 0;
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+4] = len/5;
mesh.geometry.attributes.uv.array[ui+4] = len/6;
mesh.geometry.attributes.uv.array[ui+5] = 0;
}else{
mesh.geometry.attributes.uv.array[ui] = 0;
mesh.geometry.attributes.uv.array[ui+1] = 0;
mesh.geometry.attributes.uv.array[ui+2] = 0;
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;
}
}
@ -158,7 +174,9 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
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;
// Set up settings for later extrusion
var extrudeSettings = {

View File

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

View File

@ -77,11 +77,11 @@ export function TrainListN() {
//
// 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);
ntracks1 = assetloader.modellist[n].animations.slice(0,5);
ntracks1 = assetloader.modellist[n].animations.slice(0,6);
tclip = new THREE.AnimationClip("three",2,ntracks1);
@ -218,11 +218,11 @@ export function TrainListN() {
//
// 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);
ntracks1 = assetloader.modellist[n].animations.slice(0,5);
ntracks1 = assetloader.modellist[n].animations.slice(0,6);
tclip = new THREE.AnimationClip("three",2,ntracks1);
n = 0;
@ -415,7 +415,7 @@ let onProgress = function ( xhr ) {
let onError = function () { };
var beauty = new Image();
beauty.src = "../../cbtc/static/texture/guidenew.png";
beauty.src = "/cbtc/static/texture/guidenew.png";
//canvas文字贴图方法
//PS:待提炼 增强功能
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.DirectionRod] = {};
}
}

View File

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

View File

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

View File

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

View File

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

View File

@ -249,7 +249,7 @@ class SkinCode extends defaultStyle {
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
fontSize: 18, // 字体大小
fontWeight: 'bold',
fontWeight: 'bolder',
textVerticalAlign: 'middle' // 车站扣车 文字垂直对齐方式
},
// 运行等级
@ -781,6 +781,18 @@ class SkinCode extends defaultStyle {
}
};
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.DirectionRod] = {};
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -124,6 +124,9 @@ class Status {
handleFloodGate(device) {
this.statusObj = { };
}
handleDirectionRod(device) {
this.statusObj = { };
}
getStatus() {
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,
y: detainY,
text: deviceParam.text,
fontSize: `${deviceParam.fontSize}px`,
fontSize: deviceParam.fontSize,
fontFamily: style.fontFamily,
fontWeight: deviceParam.fontWeight,
textFill: deviceParam.centerTrainColor,
textStroke: style.backgroundColor,
textAlign: style.textStyle.textAlign,
textVerticalAlign: deviceParam.textVerticalAlign || style.textStyle.textVerticalAlign
}
});
console.log(this.detain, '************');
this.add(this.detain);
}
}

View File

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

View File

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

View File

@ -15,23 +15,14 @@ export default {
default() {
return null;
}
},
widthCanvas: {
type: Number,
default: 1200
},
canvasHeight: {
type: Number,
default: 500
},
scaleRate:{
type: Number,
default: 1
}
},
data() {
return {
loading:false
loading:false,
widthCanvas:1200,
canvasHeight:500,
scaleRate:1
};
},
computed: {
@ -40,8 +31,11 @@ export default {
}
},
methods:{
show (iscsData) {
show(iscsData, widthCanvas, canvasHeight, scaleRate) {
this.loading = true;
this.widthCanvas = widthCanvas;
this.canvasHeight = canvasHeight;
this.scaleRate = scaleRate;
const parserData = parser(iscsData, {width: this.widthCanvas, height: this.canvasHeight});
this.$iscs = new Iscs({
dom: document.getElementById(this.iscsId),

View File

@ -1,5 +1,5 @@
<template>
<div style="height: 100%; width: 100%;overflow-y: auto;">
<div style="height: 100%; width: 100%;overflow-y:hidden;overflow-x:hidden;position: relative;">
<psd-system v-if="mode=='psdSystem'" />
<substation v-else-if="mode=='substation'" />
</div>

View File

@ -1,14 +1,16 @@
<template>
<div class="Substation">
<div class="Substation_header">黄山主变电所接线图</div>
<div v-loading="loading" element-loading-background="rgba(0, 0, 0, 0.6)" style="width:100%;height:100%;">
<div class="Substation" :style="{'background':bacground}">
<div class="Substation_header">{{ title }}</div>
<div>
<iscsSystem ref="iscsPlate" :width-canvas="width" :canvas-height="height" :scale-rate="scaleRate" />
<iscsSystem ref="iscsPlate" />
</div>
<!-- <div class="psdSystem_footer">
<div class="prevButton">{{}}</div>
<div class="nextButton">{{}}</div>
</div> -->
</div>
</div>
</template>
<script>
import iscsSystem from '../canvas/iscsCanvas';
@ -18,34 +20,81 @@ export default {
components:{
iscsSystem
},
data() {
return {
title:'',
bacground:'rgba(0,0,0,0)',
loading:false,
width:window.innerWidth,
scaleRate:window.innerWidth / 2200
};
},
computed:{
stationName() {
return this.$route.query.stationName;
},
width() {
return window.innerWidth;
stationId() {
return this.$route.query.stationId;
},
height() {
return 970;
}
},
scaleRate() {
return window.innerWidth / 2200;
watch:{
$route() {
this.getInitData();
}
},
mounted() {
this.getInitData();
},
methods:{
getInitData() {
const params = {
lineCode: this.$route.query.lineCode,
totalSystem: 'powerMonitoring02',
system: 'powerMonitoring',
userInterface: 'substation'
totalSystem :'powerMonitoring02'
};
if (this.stationId == 'mainHouseOne' || this.stationId == 'mainHouseTwo') {
this.bacground = 'rgba(0,0,0,0)';
if (this.stationId == 'mainHouseOne') {
this.title = '黄山主变电所接线图';
} else {
this.title = '茶亭主变电所接线图';
}
params.userInterface = 'substation';
// parkingLotName
// stationDepotName
} else if (this.stationId == 'controlCenter') {
this.title = '';
this.bacground = '#000';
this.scaleRate = window.innerWidth / 2000;
params.userInterface = 'hybrid';
} else if (this.stationId == 'parkingLot') {
this.title = '清凉山停车场接触网图';
this.bacground = 'rgba(0,0,0,0)';
params.userInterface = 'catenary';
} else if (this.stationId == 'stationDepot') {
this.title = '新店车辆段接触网图';
this.bacground = 'rgba(0,0,0,0)';
params.userInterface = 'catenary';
} else {
this.title = this.stationName + '牵引降压混合变电所主接线图';
this.bacground = 'rgba(0,0,0,0)';
params.userInterface = 'combined';
}
this.loading = true;
this.$refs.iscsPlate.show({}, this.width, this.height, this.scaleRate);
getIscsData(params).then(resp=>{
if (resp.data) {
this.loading = false;
const data = JSON.parse(resp.data.graphData);
this.$refs.iscsPlate.show(data);
this.$refs.iscsPlate.show(data, this.width, this.height, this.scaleRate);
document.querySelector('.Substation').scrollTop = 0;
}
});
}
}
};
</script>
<style lang="scss" scoped>
@ -55,6 +104,14 @@ export default {
color: #d8e9a5;
}
.Substation{
display: inline-block;
width:100%;
height:100%;
overflow-x: hidden;
overflow-y: auto;
vertical-align: top;
}
.SubstationIn{
display: inline-block;
}
</style>

View File

@ -2,7 +2,8 @@
<div class="psdSystem">
<div class="psdSystem_header">{{ stationName+' 屏蔽门系统' }}</div>
<div>
<iscsSystem ref="iscsPlate" :width-canvas="width" :canvas-height="height" />
<iscsSystem ref="iscsPlate" />
<!-- :width-canvas="width" :canvas-height="height" -->
</div>
<!-- <div class="psdSystem_footer">
<div class="prevButton">{{}}</div>

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