修改三维背景bug,修改继电器模型和显示,继电器地址,修改三维地图站台偏差
This commit is contained in:
parent
673c059ab7
commit
d32820e1b4
@ -12,7 +12,7 @@ export function SetScene(project) {
|
|||||||
//
|
//
|
||||||
var bgTexture;
|
var bgTexture;
|
||||||
console.log(project);
|
console.log(project);
|
||||||
if(project == "" || project == undefined){
|
if(project == "login" || project == undefined){
|
||||||
bgTexture = new THREE.TextureLoader().load("../../static/background/background.jpg");
|
bgTexture = new THREE.TextureLoader().load("../../static/background/background.jpg");
|
||||||
}else if(project == "hyd"){
|
}else if(project == "hyd"){
|
||||||
bgTexture = new THREE.TextureLoader().load("../../static/background/other.jpg");
|
bgTexture = new THREE.TextureLoader().load("../../static/background/other.jpg");
|
||||||
|
@ -23,8 +23,8 @@ import { SetScene } from '@/jlmap3d/config/SetScene';
|
|||||||
import { SetLights } from '@/jlmap3d/config/SetLights';
|
import { SetLights } from '@/jlmap3d/config/SetLights';
|
||||||
|
|
||||||
//加载器
|
//加载器
|
||||||
import { Jlmap3ddata } from '@/jlmap3d/edit/Jlmap3ddata';
|
// import { Jlmap3ddata } from '@/jlmap3d/edit/Jlmap3ddata';
|
||||||
// import { Jlmap3ddata } from '@/jlmap3d/edit/Jlmap3dnewdata';
|
import { Jlmap3ddata } from '@/jlmap3d/edit/Jlmap3dnewdata';
|
||||||
//操作管理器
|
//操作管理器
|
||||||
import { Actionmanage } from '@/jlmap3d/edit/actionmanage';
|
import { Actionmanage } from '@/jlmap3d/edit/actionmanage';
|
||||||
|
|
||||||
@ -163,8 +163,8 @@ export function JLmap3dEdit(dom, data, mapid) {
|
|||||||
this.export = function(){
|
this.export = function(){
|
||||||
let exporter = new THREE.OBJExporter();
|
let exporter = new THREE.OBJExporter();
|
||||||
console.log(scope.mapdata);
|
console.log(scope.mapdata);
|
||||||
// let exportmodels = scope.mapdata.linklist.linksgroup;
|
let exportmodels = scope.mapdata.linklist.linksgroup;
|
||||||
let exportmodels = scope.mapdata.sectionlist.switchgroup;
|
// let exportmodels = scope.mapdata.sectionlist.switchgroup;
|
||||||
// let exportmodels = scope.mapdata.stationstandlist.group;
|
// let exportmodels = scope.mapdata.stationstandlist.group;
|
||||||
let result = exporter.parse( exportmodels );
|
let result = exporter.parse( exportmodels );
|
||||||
|
|
||||||
@ -256,9 +256,9 @@ export function JLmap3dEdit(dom, data, mapid) {
|
|||||||
this.autoss = function(){
|
this.autoss = function(){
|
||||||
console.log("autoss");
|
console.log("autoss");
|
||||||
console.log(scope.mapdata);
|
console.log(scope.mapdata);
|
||||||
// scope.mapdata.signallist.resetsignal(scope.mapdata);
|
scope.mapdata.signallist.resetsignal(scope.mapdata);
|
||||||
//old
|
//old
|
||||||
scope.mapdata.signallist.resetsignal(scope.mapdata.linklist);
|
// scope.mapdata.signallist.resetsignal(scope.mapdata.linklist);
|
||||||
};
|
};
|
||||||
|
|
||||||
function onWindowResize() {
|
function onWindowResize() {
|
||||||
|
@ -43,20 +43,20 @@ var Staticmodel = {
|
|||||||
},
|
},
|
||||||
Jdq5: {
|
Jdq5: {
|
||||||
id: "1",
|
id: "1",
|
||||||
name: "继电器1000",
|
name: "继电器H125",
|
||||||
deviceType: "jdq",
|
deviceType: "jdq",
|
||||||
type: "training",
|
type: "training",
|
||||||
picUrl: "",
|
picUrl: "",
|
||||||
assetUrl: modelurl + "jdq1000.FBX"
|
assetUrl: modelurl + "jdqH125.FBX"
|
||||||
},
|
},
|
||||||
|
|
||||||
Jdq6: {
|
Jdq6: {
|
||||||
id: "1",
|
id: "1",
|
||||||
name: "继电器480",
|
name: "继电器135",
|
||||||
deviceType: "jdq",
|
deviceType: "jdq",
|
||||||
type: "training",
|
type: "training",
|
||||||
picUrl: "",
|
picUrl: "",
|
||||||
assetUrl: modelurl + "jdq480.FBX"
|
assetUrl: modelurl + "jdq135.FBX"
|
||||||
},
|
},
|
||||||
Jdqg:{
|
Jdqg:{
|
||||||
id: "0",
|
id: "0",
|
||||||
|
@ -171,9 +171,9 @@ export function StationStandList() {
|
|||||||
for(let j=0;j<map[k].mesh.children.length;j++){
|
for(let j=0;j<map[k].mesh.children.length;j++){
|
||||||
map[k].mesh.children[j].code = netstand[map[k].index].code;
|
map[k].mesh.children[j].code = netstand[map[k].index].code;
|
||||||
}
|
}
|
||||||
map[k].mesh.position.x = netstand[map[k].index].position.x;
|
map[k].mesh.position.x = netstand[map[k].index].position.x-2.34;
|
||||||
map[k].mesh.position.y = netstand[map[k].index].position.y;
|
map[k].mesh.position.y = netstand[map[k].index].position.y;
|
||||||
map[k].mesh.position.z = netstand[map[k].index].position.z;
|
map[k].mesh.position.z = netstand[map[k].index].position.z-0.375;
|
||||||
|
|
||||||
// map[k].mesh.rotation.x = netstand[map[k].index].rotation._x;
|
// map[k].mesh.rotation.x = netstand[map[k].index].rotation._x;
|
||||||
// map[k].mesh.rotation.y = netstand[map[k].index].rotation._y;
|
// map[k].mesh.rotation.y = netstand[map[k].index].rotation._y;
|
||||||
|
@ -70,9 +70,7 @@ export function RailListN(){
|
|||||||
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint1.x+0.5,0,switchpoint1.z));
|
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint1.x+0.5,0,switchpoint1.z));
|
||||||
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint1.x+1,0,switchpoint1.z-0.02));
|
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint1.x+1,0,switchpoint1.z-0.02));
|
||||||
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint1.x+1.5,0,switchpoint1.z-0.09));
|
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint1.x+1.5,0,switchpoint1.z-0.09));
|
||||||
scope.sectionrail[section[i].code].points.push(testline.getPointAt(0.7));
|
// scope.sectionrail[section[i].code].points.push(testline.getPointAt(0.7));
|
||||||
scope.sectionrail[section[i].code].points.push(testline.getPointAt(0.8));
|
|
||||||
scope.sectionrail[section[i].code].points.push(testline.getPointAt(0.9));
|
|
||||||
scope.sectionrail[section[i].code].points.push(testline.getPointAt(1));
|
scope.sectionrail[section[i].code].points.push(testline.getPointAt(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,9 +79,7 @@ export function RailListN(){
|
|||||||
if(scope.sectionrail[section[i].code].rswitch){
|
if(scope.sectionrail[section[i].code].rswitch){
|
||||||
let switchpoint2 = scope.sectionrail[section[i].code].rp;
|
let switchpoint2 = scope.sectionrail[section[i].code].rp;
|
||||||
scope.sectionrail[section[i].code].points.push(testline.getPointAt(0));
|
scope.sectionrail[section[i].code].points.push(testline.getPointAt(0));
|
||||||
scope.sectionrail[section[i].code].points.push(testline.getPointAt(0.1));
|
// scope.sectionrail[section[i].code].points.push(testline.getPointAt(0.3));
|
||||||
scope.sectionrail[section[i].code].points.push(testline.getPointAt(0.2));
|
|
||||||
scope.sectionrail[section[i].code].points.push(testline.getPointAt(0.3));
|
|
||||||
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint2.x-1.5,0,switchpoint2.z+0.09));
|
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint2.x-1.5,0,switchpoint2.z+0.09));
|
||||||
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint2.x-1,0,switchpoint2.z+0.02));
|
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint2.x-1,0,switchpoint2.z+0.02));
|
||||||
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint2.x-0.5,0,switchpoint2.z));
|
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint2.x-0.5,0,switchpoint2.z));
|
||||||
@ -104,9 +100,7 @@ export function RailListN(){
|
|||||||
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint1.x+0.5,0,switchpoint1.z));
|
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint1.x+0.5,0,switchpoint1.z));
|
||||||
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint1.x+1,0,switchpoint1.z+0.02));
|
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint1.x+1,0,switchpoint1.z+0.02));
|
||||||
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint1.x+1.5,0,switchpoint1.z+0.09));
|
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint1.x+1.5,0,switchpoint1.z+0.09));
|
||||||
scope.sectionrail[section[i].code].points.push(testline.getPointAt(0.7));
|
// scope.sectionrail[section[i].code].points.push(testline.getPointAt(0.7));
|
||||||
scope.sectionrail[section[i].code].points.push(testline.getPointAt(0.8));
|
|
||||||
scope.sectionrail[section[i].code].points.push(testline.getPointAt(0.9));
|
|
||||||
scope.sectionrail[section[i].code].points.push(testline.getPointAt(1));
|
scope.sectionrail[section[i].code].points.push(testline.getPointAt(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,9 +109,7 @@ export function RailListN(){
|
|||||||
if(scope.sectionrail[section[i].code].rswitch){
|
if(scope.sectionrail[section[i].code].rswitch){
|
||||||
let switchpoint2 = scope.sectionrail[section[i].code].rp;
|
let switchpoint2 = scope.sectionrail[section[i].code].rp;
|
||||||
scope.sectionrail[section[i].code].points.push(testline.getPointAt(0));
|
scope.sectionrail[section[i].code].points.push(testline.getPointAt(0));
|
||||||
scope.sectionrail[section[i].code].points.push(testline.getPointAt(0.1));
|
// scope.sectionrail[section[i].code].points.push(testline.getPointAt(0.3));
|
||||||
scope.sectionrail[section[i].code].points.push(testline.getPointAt(0.2));
|
|
||||||
scope.sectionrail[section[i].code].points.push(testline.getPointAt(0.3));
|
|
||||||
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint2.x-1.5,0,switchpoint2.z-0.09));
|
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint2.x-1.5,0,switchpoint2.z-0.09));
|
||||||
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint2.x-1,0,switchpoint2.z-0.02));
|
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint2.x-1,0,switchpoint2.z-0.02));
|
||||||
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint2.x-0.5,0,switchpoint2.z));
|
scope.sectionrail[section[i].code].points.push(new THREE.Vector3(switchpoint2.x-0.5,0,switchpoint2.z));
|
||||||
|
@ -14,7 +14,7 @@ function hasPermission(roles, permissionRoles) {
|
|||||||
return roles.some(role => permissionRoles.indexOf(role) >= 0);
|
return roles.some(role => permissionRoles.indexOf(role) >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
const whiteList = ['/login', '/design/login', '/xty/login', '/designxty/login', '/gzb/login', '/designgzb/login', '/jlmap3d/devicetrain', '/hyd/login']; // 不重定向白名单
|
const whiteList = ['/login', '/design/login', '/xty/login', '/designxty/login', '/gzb/login', '/designgzb/login', '/gzzbxy/relay', '/hyd/login']; // 不重定向白名单
|
||||||
|
|
||||||
const designPageRegex = [/^\/design/, /^\/scriptDisplay/, /^\/publish/, /^\/orderauthor/, /^\/system/, /^\/display\/record/, /^\/display\/manage/, /^\/apply/, /^\/plan/, /^\/display\/plan/];
|
const designPageRegex = [/^\/design/, /^\/scriptDisplay/, /^\/publish/, /^\/orderauthor/, /^\/system/, /^\/display\/record/, /^\/display\/manage/, /^\/apply/, /^\/plan/, /^\/display\/plan/];
|
||||||
|
|
||||||
@ -130,11 +130,17 @@ router.beforeEach((to, from, next) => {
|
|||||||
handleRoute(to, from, next, routeInfo);
|
handleRoute(to, from, next, routeInfo);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
//继电器使用
|
||||||
|
|
||||||
|
console.log(to);
|
||||||
// 未登录情况下
|
// 未登录情况下
|
||||||
if (whiteList.indexOf(to.path) !== -1) {
|
if (whiteList.indexOf(to.path) !== -1) {
|
||||||
// 在免登录白名单,直接进入
|
// 在免登录白名单,直接进入
|
||||||
next();
|
next();
|
||||||
} else {
|
} else if(to.path.substr(0,13) == whiteList[6]){
|
||||||
|
next();
|
||||||
|
}
|
||||||
|
else{
|
||||||
// 否则全部重定向到登录页
|
// 否则全部重定向到登录页
|
||||||
next(routeInfo.loginPath);
|
next(routeInfo.loginPath);
|
||||||
}
|
}
|
||||||
|
@ -321,7 +321,7 @@ export const constantRoutes = [
|
|||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/jlmap3d/devicetrain',
|
path: '/gzzbxy/relay/:deviceid',
|
||||||
component: Jlmap3dTrain,
|
component: Jlmap3dTrain,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
|
@ -39,9 +39,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="statusdiv">JZJXC-H18
|
<div class="statusdiv">JZJXC-H18
|
||||||
</div>
|
</div>
|
||||||
<div class="statusdiv">JPJXC-1000
|
<div class="statusdiv">JWJXC-H125
|
||||||
</div>
|
</div>
|
||||||
<div class="statusdiv">JPJXC-480
|
<div class="statusdiv">JYJXC-135
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="statusdiv">状态:{{statsa1700}}
|
<div class="statusdiv">状态:{{statsa1700}}
|
||||||
@ -52,9 +52,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="statusdiv">状态:{{statsh18}}
|
<div class="statusdiv">状态:{{statsh18}}
|
||||||
</div>
|
</div>
|
||||||
<div class="statusdiv">状态:{{stats1000}}
|
<div class="statusdiv">状态:{{statsh125}}
|
||||||
</div>
|
</div>
|
||||||
<div class="statusdiv">状态:{{stats480}}
|
<div class="statusdiv">状态:{{stats135}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="statusdiv" @click="switcha1700">{{texta1700}}
|
<div class="statusdiv" @click="switcha1700">{{texta1700}}
|
||||||
@ -65,9 +65,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="statusdiv" @click="switchh18">{{texth18}}
|
<div class="statusdiv" @click="switchh18">{{texth18}}
|
||||||
</div>
|
</div>
|
||||||
<div class="statusdiv" @click="switch1000">{{text1000}}
|
<div class="statusdiv" @click="switch1000">{{texth125}}
|
||||||
</div>
|
</div>
|
||||||
<div class="statusdiv" @click="switch480">{{text480}}
|
<div class="statusdiv" @click="switch480">{{text135}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -85,7 +85,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
device: this.$route.query.device,
|
device: this.$route.params.deviceid,
|
||||||
jl3d: null,
|
jl3d: null,
|
||||||
devicelist:[],
|
devicelist:[],
|
||||||
msgshow:false,
|
msgshow:false,
|
||||||
@ -95,23 +95,23 @@
|
|||||||
statsa1700:"off",
|
statsa1700:"off",
|
||||||
statsb1700:"off",
|
statsb1700:"off",
|
||||||
statsc1700:"off",
|
statsc1700:"off",
|
||||||
stats1000:"off",
|
statsh125:"off",
|
||||||
statsh18:"off",
|
statsh18:"off",
|
||||||
stats480:"off",
|
stats135:"off",
|
||||||
|
|
||||||
texta1700:"关",
|
texta1700:"关",
|
||||||
textb1700:"关",
|
textb1700:"关",
|
||||||
textc1700:"关",
|
textc1700:"关",
|
||||||
text1000:"关",
|
texth125:"关",
|
||||||
texth18:"关",
|
texth18:"关",
|
||||||
text480:"关",
|
text135:"关",
|
||||||
|
|
||||||
ona1700:false,
|
ona1700:false,
|
||||||
onb1700:false,
|
onb1700:false,
|
||||||
onc1700:false,
|
onc1700:false,
|
||||||
on1000:false,
|
onh125:false,
|
||||||
onh18:false,
|
onh18:false,
|
||||||
on480:false,
|
on135:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -252,31 +252,31 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(data[4].on != this.on1000){
|
if(data[4].on != this.onh125){
|
||||||
if(data[4].on == true){
|
if(data[4].on == true){
|
||||||
this.text1000 = "开";
|
this.texth125 = "开";
|
||||||
this.stats1000 = "on";
|
this.statsh125 = "on";
|
||||||
this.on1000 = true;
|
this.onh125 = true;
|
||||||
this.jl3d.upmodelaction(0,4);
|
this.jl3d.upmodelaction(0,4);
|
||||||
}
|
}
|
||||||
if(data[4].on == false){
|
if(data[4].on == false){
|
||||||
this.text1000 = "关";
|
this.texth125 = "关";
|
||||||
this.stats1000 = "off";
|
this.statsh125 = "off";
|
||||||
this.on1000 = false;
|
this.onh125 = false;
|
||||||
this.jl3d.upmodelaction(1,4);
|
this.jl3d.upmodelaction(1,4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(data[5].on != this.on480){
|
if(data[5].on != this.on135){
|
||||||
if(data[5].on == true){
|
if(data[5].on == true){
|
||||||
this.text480 = "开";
|
this.text135 = "开";
|
||||||
this.stats480 = "on";
|
this.stats135 = "on";
|
||||||
this.on480 = true;
|
this.on135 = true;
|
||||||
this.jl3d.upmodelaction(0,5);
|
this.jl3d.upmodelaction(0,5);
|
||||||
}
|
}
|
||||||
if(data[5].on == false){
|
if(data[5].on == false){
|
||||||
this.text480 = "关";
|
this.text135 = "关";
|
||||||
this.stats480 = "off";
|
this.stats135 = "off";
|
||||||
this.on480 = false;
|
this.on135 = false;
|
||||||
this.jl3d.upmodelaction(1,5);
|
this.jl3d.upmodelaction(1,5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -318,19 +318,19 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
switch1000(){
|
switch1000(){
|
||||||
if(this.stats1000 == "off"){
|
if(this.statsh125 == "off"){
|
||||||
|
|
||||||
this.jl3d.sendmsg(0,4);
|
this.jl3d.sendmsg(0,4);
|
||||||
}else if(this.stats1000 == "on"){
|
}else if(this.statsh125 == "on"){
|
||||||
|
|
||||||
this.jl3d.sendmsg(1,4);
|
this.jl3d.sendmsg(1,4);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
switch480(){
|
switch480(){
|
||||||
if(this.stats480 == "off"){
|
if(this.stats135 == "off"){
|
||||||
|
|
||||||
this.jl3d.sendmsg(0,5);
|
this.jl3d.sendmsg(0,5);
|
||||||
}else if(this.stats480 == "on"){
|
}else if(this.stats135 == "on"){
|
||||||
|
|
||||||
this.jl3d.sendmsg(1,5);
|
this.jl3d.sendmsg(1,5);
|
||||||
}
|
}
|
||||||
|
BIN
static/model/jdq/jdq135.FBX
Normal file
BIN
static/model/jdq/jdq135.FBX
Normal file
Binary file not shown.
BIN
static/model/jdq/jdqH125.FBX
Normal file
BIN
static/model/jdq/jdqH125.FBX
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user