综合演练三维通号增加设备间,三维编辑器资源管理链接配置
This commit is contained in:
parent
671dff4016
commit
0b08bfae9f
@ -4,14 +4,19 @@ import { getBaseUrl } from '@/utils/baseUrl';
|
||||
|
||||
const BASE_API = getBaseUrl();
|
||||
let uploadurl = null;
|
||||
let asseturl = null;
|
||||
if(BASE_API == "https://test.joylink.club/jlcloud"){
|
||||
uploadurl = "https://test.joylink.club/jlfile";
|
||||
asseturl = "https://test.joylink.club/oss/joylink"
|
||||
}else if(BASE_API == "https://joylink.club/jlcloud"){
|
||||
uploadurl = "https://joylink.club/jlfile";
|
||||
asseturl = "https://joylink.club/oss/joylink"
|
||||
}else{
|
||||
uploadurl = "http://192.168.3.41:9300";
|
||||
asseturl = "https://test.joylink.club/oss/joylink"
|
||||
}
|
||||
const BASE_UPLOAD_API = uploadurl;
|
||||
const BASE_ASSET_API = asseturl;
|
||||
|
||||
export function getUploadModelUrl() {
|
||||
return (BASE_UPLOAD_API+"/api/upload/MODEL?appId=00001&appSecret=joylink00001");
|
||||
|
@ -37,6 +37,17 @@ var Staticmodel = {
|
||||
//https://joylink.club/oss/wx/stationstand/stationstand.FBX
|
||||
//../../static/model/device/stationstand.FBX
|
||||
|
||||
},
|
||||
room: {
|
||||
id: "5",
|
||||
name: "通号设备间",
|
||||
deviceType: "room",
|
||||
type: "low",
|
||||
picUrl: "",
|
||||
assetUrl: "../../static/model/device/room/room.FBX"
|
||||
//https://joylink.club/oss/wx/stationstand/stationstand.FBX
|
||||
//../../static/model/device/stationstand.FBX
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -33,12 +33,20 @@ export function ModelManager(){
|
||||
action:null
|
||||
};
|
||||
|
||||
this.roommodel = {
|
||||
code:"room",
|
||||
sectionstatus:"01",
|
||||
mesh:null,
|
||||
action:null
|
||||
};
|
||||
|
||||
this.loadpromise = function (data,mixers){
|
||||
let initlist = [];
|
||||
initlist.push(fbxpromise(data.Switch,mixers,scope.switchmodel));
|
||||
initlist.push(fbxpromise(data.Signal,mixers,scope.signalmodel));
|
||||
initlist.push(fbxpromise(data.stationstand,mixers,scope.standmodel));
|
||||
initlist.push(fbxpromise(data.section,mixers,scope.sectionmodel));
|
||||
initlist.push(fbxpromise(data.room,mixers,scope.roommodel));
|
||||
|
||||
return new Promise(function(resolve, reject){
|
||||
|
||||
|
@ -219,7 +219,7 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
|
||||
|
||||
}
|
||||
|
||||
if (data.type == "PSD") {
|
||||
if (data.type == "STAND") {
|
||||
// console.log(data);
|
||||
scope.modelmanager.standmodel.code = data.code;
|
||||
scope.showmodel = scope.modelmanager.standmodel.mesh;
|
||||
@ -233,15 +233,24 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
|
||||
// scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
if (data.type == "AXLE_COUNTER") {
|
||||
if (data.type == "SECTION") {
|
||||
// console.log(data);
|
||||
scope.modelmanager.sectionmodel.code = data.code;
|
||||
scope.showmodel = scope.modelmanager.sectionmodel.mesh;
|
||||
scope.scene.add(scope.showmodel);
|
||||
|
||||
// scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]];
|
||||
// scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
||||
}
|
||||
if (data.type == "room") {
|
||||
|
||||
scope.showmodel = scope.modelmanager.roommodel.mesh;
|
||||
scope.scene.add(scope.showmodel);
|
||||
scope.camera.position.set(0, 10, 9);
|
||||
scope.controls.target = new THREE.Vector3(0, 9, 8);
|
||||
scope.controls.update();
|
||||
}else{
|
||||
scope.camera.position.set(0, 20, 30);
|
||||
scope.controls.target = new THREE.Vector3(0, 0, 0);
|
||||
scope.controls.update();
|
||||
}
|
||||
if(scope.showmodel){
|
||||
scope.resetmodel();
|
||||
@ -284,7 +293,7 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
|
||||
scope.scene.add(scope.showmodel);
|
||||
}
|
||||
|
||||
if (data.type == "PSD") {;
|
||||
if (data.type == "STAND") {;
|
||||
scope.showmodel = scope.modelmanager.standmodel.mesh;
|
||||
scope.scene.add(scope.showmodel);
|
||||
scope.modelmanager.standmodel.action.reset();
|
||||
@ -295,7 +304,7 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
|
||||
// scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
if (data.type == "AXLE_COUNTER") {
|
||||
if (data.type == "SECTION") {
|
||||
scope.showmodel = scope.modelmanager.sectionmodel.mesh;
|
||||
scope.scene.add(scope.showmodel);
|
||||
|
||||
@ -303,6 +312,18 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
|
||||
// scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
if (data.type == "room") {
|
||||
|
||||
scope.showmodel = scope.modelmanager.roommodel.mesh;
|
||||
scope.scene.add(scope.showmodel);
|
||||
scope.camera.position.set(0, 10, 9);
|
||||
scope.controls.target = new THREE.Vector3(0, 9, 8);;
|
||||
scope.controls.update();
|
||||
}else{
|
||||
scope.camera.position.set(0, 20, 30);
|
||||
scope.controls.target = new THREE.Vector3(0, 0, 0);
|
||||
scope.controls.update();
|
||||
}
|
||||
// initstatus(data);
|
||||
}
|
||||
|
||||
|
@ -71,35 +71,35 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
}
|
||||
if(event.data.body.type == "SIGNAL"){
|
||||
newfault.name = lablecodemap.signal[newfault.code];
|
||||
if(event.data.body.fault == "MAIN_FILAMENT_BROKEN"){
|
||||
newfault.typetext = "信号机";
|
||||
if(event.data.body.fault[1] == "MAIN_FILAMENT_BROKEN"){
|
||||
newfault.text = "主灯丝断丝故障";
|
||||
newfault.typetext = "信号机";
|
||||
}
|
||||
}
|
||||
|
||||
if(event.data.body.type == "SWITCH"){
|
||||
newfault.name = lablecodemap.switch[newfault.code];
|
||||
if(event.data.body.fault == "SPLIT"){
|
||||
newfault.typetext = "道岔";
|
||||
if(event.data.body.fault[1] == "SPLIT"){
|
||||
newfault.text = "道岔挤岔";
|
||||
newfault.typetext = "道岔";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(event.data.body.type == "AXLE_COUNTER"){
|
||||
if(event.data.body.type == "SECTION"){
|
||||
newfault.name = lablecodemap.section[newfault.code];
|
||||
if(event.data.body.fault == "FAULT"){
|
||||
newfault.typetext = "区段";
|
||||
if(event.data.body.fault[1] == "FAULT"){
|
||||
newfault.text = "计轴故障";
|
||||
newfault.typetext = "区段";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(event.data.body.type == "PSD"){
|
||||
newfault.name = lablecodemap.psd[newfault.code];
|
||||
if(event.data.body.fault == "FAULT"){
|
||||
if(event.data.body.type == "STAND"){
|
||||
newfault.name = newfault.code;
|
||||
newfault.typetext = "屏蔽门";
|
||||
if(event.data.body.fault[1] == "FAULT_PSD_OPEN"){
|
||||
newfault.text = "屏蔽门无法关闭故障";
|
||||
newfault.typetext = "屏蔽门";
|
||||
}
|
||||
|
||||
}
|
||||
@ -135,35 +135,35 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
}
|
||||
if(fault[i].type == "SIGNAL"){
|
||||
newfault.name = lablecodemap.signal[newfault.code];
|
||||
if(fault[i].fault == "MAIN_FILAMENT_BROKEN"){
|
||||
newfault.typetext = "信号机";
|
||||
if(fault[i].fault[1] == "MAIN_FILAMENT_BROKEN"){
|
||||
newfault.text = "主灯丝断丝故障";
|
||||
newfault.typetext = "信号机";
|
||||
}
|
||||
}
|
||||
|
||||
if(fault[i].type == "SWITCH"){
|
||||
newfault.name = lablecodemap.switch[newfault.code];
|
||||
if(fault[i].fault == "SPLIT"){
|
||||
newfault.typetext = "道岔";
|
||||
if(fault[i].fault[1] == "SPLIT"){
|
||||
newfault.text = "道岔挤岔";
|
||||
newfault.typetext = "道岔";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(fault[i].type == "AXLE_COUNTER"){
|
||||
if(fault[i].type == "SECTION"){
|
||||
newfault.name = lablecodemap.section[newfault.code];
|
||||
if(fault[i].fault == "FAULT"){
|
||||
newfault.typetext = "区段";
|
||||
if(fault[i].fault[1] == "FAULT"){
|
||||
newfault.text = "计轴故障";
|
||||
newfault.typetext = "区段";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(fault[i].type == "PSD"){
|
||||
newfault.name = lablecodemap.psd[newfault.code];
|
||||
if(fault[i].fault == "FAULT"){
|
||||
if(fault[i].type == "STAND"){
|
||||
newfault.name = newfault.code;
|
||||
newfault.typetext = "屏蔽门";
|
||||
if(fault[i].fault[1] == "FAULT_PSD_OPEN"){
|
||||
newfault.text = "屏蔽门无法关闭故障";
|
||||
newfault.typetext = "屏蔽门";
|
||||
}
|
||||
|
||||
}
|
||||
@ -171,38 +171,38 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(event.data.type == 'TrainRun_3D'){
|
||||
|
||||
for(let i=0,leni=event.data.body.length;i<leni;i++){
|
||||
// console.log(event.data.body[i]);
|
||||
trainrunnew(event.data.body[i]);
|
||||
}
|
||||
return;
|
||||
}
|
||||
//
|
||||
// if(event.data.type == 'TrainRun_3D'){
|
||||
//
|
||||
// for(let i=0,leni=event.data.body.length;i<leni;i++){
|
||||
// // console.log(event.data.body[i]);
|
||||
// trainrunnew(event.data.body[i]);
|
||||
// }
|
||||
// return;
|
||||
// }
|
||||
|
||||
// if(event.data.type == 'TRAIN'){
|
||||
// console.log(event.data);
|
||||
// trainrun(event.data);
|
||||
// }
|
||||
if (event.data.type== 'SIGNAL' && signallist) {
|
||||
signalupdate(event.data);
|
||||
// console.log(event.data);
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.data.type== "PSD" && actions) {
|
||||
standupdate(event.data);
|
||||
return;
|
||||
}
|
||||
if (event.data.type == "SWITCH") {
|
||||
switchupdate(event.data);
|
||||
return;
|
||||
}
|
||||
if (event.data.type == 'TRAIN_DOOR') {
|
||||
traindoorupdate(event.data);
|
||||
return;
|
||||
}
|
||||
// if (event.data.type== 'SIGNAL' && signallist) {
|
||||
// signalupdate(event.data);
|
||||
// // console.log(event.data);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if (event.data.type== "PSD" && actions) {
|
||||
// standupdate(event.data);
|
||||
// return;
|
||||
// }
|
||||
// if (event.data.type == "SWITCH") {
|
||||
// switchupdate(event.data);
|
||||
// return;
|
||||
// }
|
||||
// if (event.data.type == 'TRAIN_DOOR') {
|
||||
// traindoorupdate(event.data);
|
||||
// return;
|
||||
// }
|
||||
|
||||
if(event.data.type == 'Simulation_Reset'){
|
||||
simulationreset(event.data);
|
||||
|
@ -2,11 +2,11 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
|
@ -101,6 +101,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getMap3dModelDataAll,getMap3dModelData } from '@/api/jlmap3d/assets3d.js'
|
||||
|
||||
export default {
|
||||
name: 'EditAction',
|
||||
@ -118,6 +119,15 @@ export default {
|
||||
|
||||
|
||||
},
|
||||
mounted() {
|
||||
getMap3dModelDataAll().then(netdata => {
|
||||
|
||||
|
||||
console.log(netdata);
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
||||
init: function() {
|
||||
@ -162,9 +172,6 @@ export default {
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
//this.init();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -200,14 +200,16 @@ export default {
|
||||
.modellist {
|
||||
float:left;
|
||||
position: relative;
|
||||
width:100px;
|
||||
height:100px;
|
||||
width:120px;
|
||||
height:120px;
|
||||
text-align:center;
|
||||
}
|
||||
.modelpic{
|
||||
left:0;
|
||||
position: absolute;
|
||||
width:100%;
|
||||
height:100%;
|
||||
width:60%;
|
||||
height:60%;
|
||||
text-align:center;
|
||||
background-image: url('/static/texture/modelfile.png');
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="packageName"
|
||||
label="图片名称"
|
||||
label="图片包名称"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -35,7 +35,7 @@
|
||||
<el-option label="cctv闸机" value="CctvGate"></el-option>
|
||||
<el-option label="cctv人物" value="CctvHuman"></el-option>
|
||||
|
||||
<el-option label="通号机房" value="MaintainerRoom"></el-option>
|
||||
<el-option label="通号设备间" value="MaintainerRoom"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="资源所属项目">
|
||||
|
@ -34,7 +34,7 @@
|
||||
<el-option label="cctv闸机" value="CctvGate"></el-option>
|
||||
<el-option label="cctv人物" value="CctvHuman"></el-option>
|
||||
|
||||
<el-option label="通号机房" value="MaintainerRoom"></el-option>
|
||||
<el-option label="通号设备间" value="MaintainerRoom"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="模型信息">
|
||||
|
@ -10,6 +10,7 @@
|
||||
</el-button-group>
|
||||
</div> -->
|
||||
<div id="jl3ddevicerepir" class="repirbutton" @click="devicerepir"></div>
|
||||
|
||||
<div id="jl3dclose" class="backbutton" @click="close3ddeviceview"></div>
|
||||
<Jl3ddevice-Msg v-show="isswitch">
|
||||
</Jl3ddevice-Msg>
|
||||
@ -181,7 +182,7 @@
|
||||
if(this.nowdevice){
|
||||
let command = {
|
||||
code:this.nowdevice.code,
|
||||
faultType:this.nowdevice.fault,
|
||||
faultType:this.nowdevice.fault[1],
|
||||
};
|
||||
sendCommandNew(this.group,"Cancel_Fault", command).then((response) => {
|
||||
// resolve(response);
|
||||
@ -211,10 +212,21 @@
|
||||
//
|
||||
// },
|
||||
showmodel(devicedata){
|
||||
console.log(devicedata);
|
||||
this.jl3d.updatewindowstatus('1');
|
||||
this.jl3d.selectmodel(devicedata);
|
||||
this.nowdevice = devicedata;
|
||||
},
|
||||
showroom(){
|
||||
let roomdata = {
|
||||
code:"room",
|
||||
name:"room",
|
||||
type:"room",
|
||||
};
|
||||
this.jl3d.updatewindowstatus('1');
|
||||
this.jl3d.selectmodel(roomdata);
|
||||
this.nowdevice = roomdata;
|
||||
},
|
||||
back(){
|
||||
this.jl3d.resetmodel();
|
||||
},
|
||||
@ -303,6 +315,8 @@
|
||||
background-size:100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#canvastexture {
|
||||
position: absolute;
|
||||
float: left;
|
||||
@ -312,7 +326,7 @@
|
||||
.jl3dcontrolpane{
|
||||
position: absolute;
|
||||
top:0;
|
||||
right:85px;
|
||||
right:165px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="jl3droom" class="roombutton" @click="showroom"></div>
|
||||
|
||||
|
||||
</div>
|
||||
@ -212,6 +212,10 @@ export default {
|
||||
this.msgshow = false;
|
||||
|
||||
},
|
||||
showroom(){
|
||||
this.deviceShow = true;
|
||||
this.$refs.faultdevice.showroom();
|
||||
},
|
||||
back() {
|
||||
this.$emit('back');
|
||||
this.isswitch = false;
|
||||
@ -301,6 +305,17 @@ export default {
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.roombutton{
|
||||
width:50px;
|
||||
height:50px;
|
||||
position: absolute;
|
||||
right:70px;
|
||||
top:5px;
|
||||
z-index:30;
|
||||
background-image:url("/static/texture/room.png");
|
||||
background-repeat:no-repeat;
|
||||
background-size:100%;
|
||||
}
|
||||
#canvastexture {
|
||||
position: absolute;
|
||||
float: left;
|
||||
|
BIN
static/model/device/room/room.FBX
Normal file
BIN
static/model/device/room/room.FBX
Normal file
Binary file not shown.
BIN
static/texture/room.png
Normal file
BIN
static/texture/room.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
@ -684,7 +684,7 @@ function timedCount(){
|
||||
function callback(Response) {
|
||||
|
||||
data = JSON.parse(Response.body);
|
||||
// console.log(data);
|
||||
console.log(data);
|
||||
// if(data.type == 'TrainRun_3D'){
|
||||
// for (let i=0,leni = data.body.length; i<leni; i++) {
|
||||
// data.body[i].type = "TRAIN";
|
||||
|
Loading…
Reference in New Issue
Block a user