diff --git a/src/jlmap3d/jl3ddevice/config.js b/src/jlmap3d/jl3ddevice/config.js index 94b03a1dc..b245ccb58 100644 --- a/src/jlmap3d/jl3ddevice/config.js +++ b/src/jlmap3d/jl3ddevice/config.js @@ -26,6 +26,17 @@ var Staticmodel = { //https://joylink.club/oss/wx/stationstand/stationstand.FBX //../../static/model/device/stationstand.FBX + }, + section: { + id: "4", + name: "区段", + deviceType: "section", + type: "low", + picUrl: "", + assetUrl: "../../static/model/device/section/section.FBX" + //https://joylink.club/oss/wx/stationstand/stationstand.FBX + //../../static/model/device/stationstand.FBX + } } diff --git a/src/jlmap3d/jl3ddevice/loader.js b/src/jlmap3d/jl3ddevice/loader.js index 7c032965a..e50eb95c6 100644 --- a/src/jlmap3d/jl3ddevice/loader.js +++ b/src/jlmap3d/jl3ddevice/loader.js @@ -26,11 +26,19 @@ export function ModelManager(){ action:null }; + this.sectionmodel = { + code:"section", + 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)); return new Promise(function(resolve, reject){ diff --git a/src/jlmap3d/jl3dmaintainer/Jl3dfaultdevice.js b/src/jlmap3d/jl3dmaintainer/Jl3dfaultdevice.js new file mode 100644 index 000000000..ca4ef180e --- /dev/null +++ b/src/jlmap3d/jl3dmaintainer/Jl3dfaultdevice.js @@ -0,0 +1,681 @@ +import { Staticmodel } from '@/jlmap3d/jl3ddevice/config.js'; +//loader +import { FBXLoader } from '@/jlmap3d/main/loaders/FBXLoader'; +import { OrbitControls } from '@/jlmap3d/main/control/OrbitControls'; + +import { ModelManager } from '@/jlmap3d/jl3ddevice/loader.js'; +import { Standtextureload } from '@/jlmap3d/jl3ddevice/standtextureload.js'; +import { Signallightload } from '@/jlmap3d/jl3ddevice/component/signallight.js'; +import { Moveanimate } from '@/jlmap3d/jl3ddevice/component/moveanimate.js'; +import { Textconfig } from '@/jlmap3d/jl3ddevice/component/textconfig.js'; + +import { getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata'; + + +import StompClient from '@/utils/sock'; + +var clock = new THREE.Clock(); +export function Jl3dfaultdevice(dom,group,token,skinCode) { + var scope = this; + + this.dom = dom; + this.nowcode = null; + this.animateswitch = false; + this.signallights = []; + Signallightload(this.signallights); + this.mixers = []; + this.showmodel = null; + + let helpbox,textplane; + let daochamodel; + + let psdtexturemap = []; + //点击事件状态 + this.raycasterstatus = false; + //动画状态 + this.animastats = false; + //当前选中模型 + this.nowobject = null; + //当前动画播放模型 + this.animationmodel = null; + + this.stationtexture = []; + this.devicetext = new Textconfig(); + + this.windowstatus = '0'; + + //初始化webgl渲染 + this.renderer = new THREE.WebGLRenderer({ antialias: true }); + this.renderer.setClearColor(new THREE.Color(0x000000)); + this.renderer.setSize(window.innerWidth, window.innerHeight); + this.renderer.shadowMap.enabled = true; + this.renderer.shadowMap.type = THREE.PCFSoftShadowMap; + this.dom.appendChild(this.renderer.domElement); + + //定义相机 + + this.camera = new THREE.PerspectiveCamera(70, window.innerWidth / window.innerHeight, 0.01, 200); + this.camera.position.set(0, 20, 30); + this.camera.aspect = window.innerWidth / window.innerHeight; + this.camera.updateProjectionMatrix(); + //定义场景(渲染容器) + this.scene = new THREE.Scene(); + this.scene.background = new THREE.Color(0xa0a0a0); + + var mesh = new THREE.Mesh(new THREE.PlaneBufferGeometry(200, 200), new THREE.MeshPhongMaterial({ color: 0x999999, depthWrite: false })); + mesh.rotation.x = - Math.PI / 2; + mesh.receiveShadow = true; + this.scene.add(mesh); + + var grid = new THREE.GridHelper(200, 20, 0x000000, 0x000000); + grid.material.opacity = 0.2; + grid.material.transparent = true; + this.scene.add(grid); + + let moveanima = new Moveanimate(scope); + + //定义全局光 + let ambientLight = new THREE.AmbientLight(0xffffff, 1.3); + this.scene.add(ambientLight); + + + var spotLight = new THREE.SpotLight(0xececff); + spotLight.position.set(-50, 80, 0); + spotLight.castShadow = true; + spotLight.shadow.mapSize.width = 2048; + spotLight.shadow.mapSize.height = 2048; + this.scene.add(spotLight); + + + + this.controls = new THREE.OrbitControls(this.camera, dom); + this.controls.maxPolarAngle = Math.PI / 2; + this.controls.minPolarangle = Math.PI / 5; + this.controls.maxDistance = 80; + this.controls.screenSpacePanning = true; + this.controls.update(); + + + + document.addEventListener( "mousedown", onselect, false ); + + let teststomp = new StompClient(); + // let topic = '/user/topic/simulation/assistant/'+group; + let topic = '/user/queue/simulation/jl3d/'+group; + let header = {'X-Token': token}; + try { + // console.log("teststomp"); + teststomp.subscribe(topic, callback, header); + } catch (error) { + console.error('websocket订阅失败'); + } + + function callback(Response) { + let data = JSON.parse(Response.body); + + // if(scope.nowcode != data.body.code){ + // scope.nowcode = data.body.code; + // scope.selectmodel(data); + // }else{ + if(data.type == "DeviceCtrl_3D"){ + // console.log(data.body); + if(data.body.code == scope.nowcode){ + scope.updateaction(data.body); + } + + } + + // } + + } + window.onresize = function () { + scope.camera.aspect = window.innerWidth / window.innerHeight; + scope.camera.updateProjectionMatrix(); + scope.renderer.setSize(window.innerWidth, window.innerHeight); + } + this.domresize = function(){ + scope.camera.aspect = window.innerWidth/ window.innerHeight; + scope.camera.updateProjectionMatrix(); + scope.renderer.setSize(window.innerWidth, window.innerHeight); + } + this.anime = null; + + this.modelmanager = new ModelManager(); + getPublish3dMapDetail(skinCode).then(netdata => { + setpsdstationmap(JSON.parse(netdata.data.stands)); + Standtextureload(scope,JSON.parse(netdata.data.assets)); + scope.modelmanager.loadpromise(Staticmodel, scope.mixers).then(function (data) { + moveanima.initlistnew(scope.modelmanager.switchmodel.mesh); + daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA"); + + // scope.stationtexture + animate(); + }) + }); + + function setpsdstationmap(stationlist){ + for(let i=0,leni=stationlist.length;i { let assetsdata = JSON.parse(netdata.data.sections); if(assetsdata.link){ - scope.datatype = "old"; - scope.jsonwebwork = new Worker("../../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("../../static/workertest/jsonworkernew.js"); - scope.Subscribe = new Jlmap3dSubscribeNew(scope,routegroup,scope.jsonwebworknew); + scope.jsonwebworknew = new Worker("../../static/workertest/maintainerworker.js"); + scope.Subscribe = new Maintainerconnect(scope,routegroup,scope.jsonwebworknew); scope.Subscribe.socketon(scope.Subscribe.topic); - SimulationLoadNew(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod); + MaintainerLoad(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod); } }); @@ -304,7 +292,6 @@ export function JLmap3dMaintainer(dom, data,skinCode,storemod,routegroup,project trainlisttest = loadtrainlisttest; realsectionlist = loadrealsectionlist; rails = loadrails; - console.log(stationstandlist); scope.updatecamera(stationstandlist.group.children[0],"station"); } @@ -412,8 +399,7 @@ export function JLmap3dMaintainer(dom, data,skinCode,storemod,routegroup,project } if(scope.raycasterswitch == "section"){ - console.log(sectionlist); - console.log(linklist); + //console.log(sectionlist.sections.modellist); let intersects = raycaster.intersectObjects( linklist.linksgroup.children,true); if(intersects[0]){ @@ -424,7 +410,6 @@ export function JLmap3dMaintainer(dom, data,skinCode,storemod,routegroup,project } if(scope.raycasterswitch == "signal"){ - console.log(signallist); let intersects = raycaster.intersectObjects( signallist.group.children,true); if(intersects[0]){ @@ -435,7 +420,6 @@ export function JLmap3dMaintainer(dom, data,skinCode,storemod,routegroup,project } if(scope.raycasterswitch == "switch"){ - console.log(sectionlist); let intersects = raycaster.intersectObjects( sectionlist.switchs.modellist,true); if(intersects[0]){ diff --git a/src/jlmap3d/jl3dmaintainer/maintainerconnect.js b/src/jlmap3d/jl3dmaintainer/maintainerconnect.js new file mode 100644 index 000000000..d70751ad1 --- /dev/null +++ b/src/jlmap3d/jl3dmaintainer/maintainerconnect.js @@ -0,0 +1,828 @@ +import StompClient from '@/utils/sock'; + +// import { getTrainingCbtcDemon, runDiagramStart, runDiagramOver, setTrainingCbtcInitTime } from '@/api/simulation'; +// import { creatSubscribe, clearSubscribe, displayTopic, screenTopic } from '@/utils/stomp'; +import { getBaseUrl } from '@/utils/baseUrl' +import { getToken } from '@/utils/auth'; + +// 定于仿真socket接口 +export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork) { + + const scope = this; + this.map = null; + + var trainlisttest = null; + var sectionlist = null; + var signallist = null; + var stationstandlist = null; + var sectionlist = null; + var materials = null; + var actions = null; + var rails = null; + var links = null; + + var scenes = null; + + var code = null; + + var drivingcode = null; + var drivingspeed = null; + var drivingaptspeed = null; + + let driverswitch = false; + + let stoptimer = null; + let num = 30; + let pointstand = null; + + let data = null; + // run as plane = 01; + // reset = 02; + + var datatype = '00'; + this.teststomp = new StompClient(); + this.topic = '/user/queue/simulation/jl3d/'+routegroup; + let header = {'X-Token': getToken() }; + let connectmsg = { + type:'init', + baseurl:getBaseUrl(), + topic:this.topic, + token:getToken(), + }; + jsonwebwork.postMessage(connectmsg); + jsonwebwork.onmessage = function (event) { + + + + // if(event.data.deviceType == "TRAIN"){ + // // console.log(event.data); + // + // } + if(event.data.type == "Device_Fault_Set_3D"){ + let newfault = { + code:event.data.body.code, + type:event.data.body.type, + text:event.data.body.fault, + fault:event.data.body.fault, + } + if(event.data.body.type == "SIGNAL"){ + if(event.data.body.fault == "MAIN_FILAMENT_BROKEN"){ + newfault.text = "主灯丝断丝故障"; + } + } + + if(event.data.body.type == "SWITCH"){ + if(event.data.body.fault == "SPLIT"){ + newfault.text = "道岔挤岔"; + } + + } + + if(event.data.body.type == "AXLE_COUNTER"){ + if(event.data.body.fault == "FAULT"){ + newfault.text = "计轴故障"; + } + + } + + if(event.data.body.type == "PSD"){ + if(event.data.body.fault == "FAULT"){ + newfault.text = "屏蔽门无法关闭故障"; + } + + } + warningmsg("新的故障设备:"+event.data.body.code); + updatefault(newfault); + return; + } + + + if(event.data.type == "Device_Fault_Over_3D"){ + warningmsg("已修复故障设备:"+event.data.body.code); + deletefault(event.data.body.code); + + return; + } + + if(event.data.type == "Device_Load_Destroy_3D"){ + DeviceDestroy(event.data); + resetfaultlist(); + let fault = event.data.body.faultInfoList; + for(let i=0,leni= fault.length;i 0 || trainlisttest.list[code].children[2].rotalist.length > 0 || trainlisttest.list[code].children[3].rotalist.length > 0 || trainlisttest.list[code].children[4].rotalist.length > 0|| trainlisttest.list[code].children[5].rotalist.length > 0){ + for(let rs = 1;rs<6;rs++){ + //console.log(rs); + if(trainlisttest.list[code].children[rs].rotalist[0]){ + let offsetz = parseFloat(trainlisttest.list[code].children[rs].rotalist[0].posr.z) - parseFloat(trainlisttest.list[code].children[rs].matrixWorld.elements[14]); + + trainlisttest.list[code].children[rs].position.z += offsetz; + + for(let xh=0;xh=trainlisttest.list[code].children[rs].rotalist[0].posr.x){ + // if(trainlisttest.list[code].groupNumber == "005"){ + // console.log("rs:"+rs); + // console.log(trainlisttest.list[code].children[rs].matrixWorld.elements[12]); + // console.log(trainlisttest.list[code].children[rs].rotalist[0].posr.x); + // } + if(rs != 5){ + let asd = trainlisttest.list[code].children[rs].rotalist[0]; + trainlisttest.list[code].children[rs+1].rotalist.push(asd); + + } + + trainlisttest.list[code].children[rs].rotation.z = trainlisttest.list[code].children[rs].rotalist[0].rota; + trainlisttest.list[code].children[rs].rotalist.splice(0,1) + xh--; + }else{ + xh = trainlisttest.list[code].children[rs].rotalist.length; + } + } + //console.log(trainlisttest.list[code].children[rs].rotalist.length); + } + } + } + + + + } else if (data.right == '0') { // 向左 + trainlisttest.list[code].right = '0'; + trainlisttest.list[code].progress = 1-data.offset; + // trainlisttest.list[code].isstandsection = rails.sectionrail[data.section].standTrack; + // if(rails.sectionrail[data.section].standTrack){ + // trainlisttest.list[code].statsstop = 0; + // } + let point = rails.sectionrail[data.section].lineright.getPointAt(trainlisttest.list[code].progress); + + trainlisttest.list[code].rotation.y = Math.PI; + trainlisttest.list[code].position.x = point.x; + trainlisttest.list[code].position.y = 0; + + // for (let tl=0; tl<6; tl++) { + // trainlisttest.list[code].children[tl].position.z = parseFloat(-point.z); + // } + + // trainlisttest.list[code].curve = rails.sectionrail[data.section].lineright; + // if(data.next){ + // trainlisttest.list[code].nextcode = data.next; + // trainlisttest.list[code].nextcurve = rails.sectionrail[data.next].lineright; + // trainlisttest.list[code].nextlen = rails.sectionrail[data.next].lengthfact; + // } + // trainlisttest.list[code].len = rails.sectionrail[data.section].lengthfact; + trainlisttest.list[code].status = '0'; + if(-trainlisttest.list[code].children[0].position.z != point.z){ + + + trainlisttest.list[code].children[0].up = new THREE.Vector3(-1,0,0); + let tangent = rails.sectionrail[data.section].lineright.getTangentAt(data.offset).normalize(); + trainlisttest.list[code].children[0].axis.crossVectors(trainlisttest.list[code].children[0].up, tangent).normalize(); + let radians = Math.acos(trainlisttest.list[code].children[0].up.dot(tangent)); + trainlisttest.list[code].children[0].quaternion.setFromAxisAngle(trainlisttest.list[code].children[0].axis, radians); + trainlisttest.list[code].children[0].rotation.x = -Math.PI/2; + trainlisttest.list[code].children[0].rotation.z = trainlisttest.list[code].children[0].rotation.y; + trainlisttest.list[code].children[0].rotation.y = 0; + + let rotas = { + posr:point, + rota:trainlisttest.list[code].children[0].rotation.z + } + trainlisttest.list[code].children[1].rotalist.push(rotas); + let offsetz = point.z + trainlisttest.list[code].children[0].position.z; + trainlisttest.list[code].children[0].position.z -= offsetz; + // trainlisttest.list[code].position.z = point.z; + + } + if(trainlisttest.list[code].children[1].rotalist.length > 0 || trainlisttest.list[code].children[2].rotalist.length > 0 || trainlisttest.list[code].children[3].rotalist.length > 0 || trainlisttest.list[code].children[4].rotalist.length > 0|| trainlisttest.list[code].children[5].rotalist.length > 0){ + + for(let rs = 1;rs<6;rs++){ + //console.log(rs); + if(trainlisttest.list[code].children[rs].rotalist[0]){ + + let offsetz = parseFloat(trainlisttest.list[code].children[rs].rotalist[0].posr.z) + parseFloat(trainlisttest.list[code].children[rs].position.z); + trainlisttest.list[code].children[rs].position.z -= offsetz; + + for(let xh=0;xh=0;an--){ + actions[code].top[an].reset(); + actions[code].top[an].time = actions[code].top[an]._clip.duration; + actions[code].top[an].timeScale = -1; + actions[code].top[an].play(); + } + }else if(trainlisttest.list[code].open != data.open && data.open == "1"){ + trainlisttest.list[code].open = "1"; + for(let an=actions[code].top.length-1;an>=0;an--){ + actions[code].top[an].reset(); + actions[code].top[an].time = 0; + actions[code].top[an].timeScale = 1; + actions[code].top[an].play(); + } + } + }else{ + + + if (trainlisttest.list[code].open != data.open && data.open == '0') { + trainlisttest.list[code].open = '0'; + for (let an=actions[code].down.length-1; an>=0; an--) { + actions[code].down[an].reset(); + actions[code].down[an].time = actions[code].down[an]._clip.duration; + actions[code].down[an].timeScale = -1; + actions[code].down[an].play(); + } + } else if (trainlisttest.list[code].open != data.open && data.open == '1') { + trainlisttest.list[code].open = "1"; + for(let an=actions[code].down.length-1;an>=0;an--){ + actions[code].down[an].reset(); + actions[code].down[an].time = 0; + actions[code].down[an].timeScale = 1; + actions[code].down[an].play(); + } + } + + } + }else{ + if(data.doorCode == "1"){ + + if(trainlisttest.list[code].open != data.open && data.open == "0"){ + trainlisttest.list[code].open = "0"; + for(let an=actions[code].top.length-1;an>=0;an--){ + actions[code].top[an].reset(); + actions[code].top[an].time = actions[code].top[an]._clip.duration; + actions[code].top[an].timeScale = -1; + actions[code].top[an].play(); + } + }else if(trainlisttest.list[code].open != data.open && data.open == "1"){ + trainlisttest.list[code].open = "1"; + for(let an=actions[code].top.length-1;an>=0;an--){ + actions[code].top[an].reset(); + actions[code].top[an].time = 0; + actions[code].top[an].timeScale = 1; + actions[code].top[an].play(); + } + } + }else{ + + + if (trainlisttest.list[code].open != data.open && data.open == '0') { + trainlisttest.list[code].open = '0'; + for (let an=actions[code].down.length-1; an>=0; an--) { + actions[code].down[an].reset(); + actions[code].down[an].time = actions[code].down[an]._clip.duration; + actions[code].down[an].timeScale = -1; + actions[code].down[an].play(); + } + } else if (trainlisttest.list[code].open != data.open && data.open == '1') { + trainlisttest.list[code].open = "1"; + for(let an=actions[code].down.length-1;an>=0;an--){ + actions[code].down[an].reset(); + actions[code].down[an].time = 0; + actions[code].down[an].timeScale = 1; + actions[code].down[an].play(); + } + } + + } + } + + } + + function trainstatus(data){ + // 遍历列车对象组 + if (trainlisttest) { + + code = data.code; + // 剔除不显示的车 + // 找到对应列车 + if ( trainlisttest.list[code]) { + + trainlisttest.list[code].driveMode = data.driveMode; + trainlisttest.list[code].status = data.right; + // 车门开关验证 + + + // 遍历获取所在轨道 + if (trainlisttest.list[code].dispose != data.dispose && data.dispose == "0") { + if (rails.sectionrail[data.sectionCode]) { + + trainlisttest.group.add(trainlisttest.list[code]); + trainlisttest.list[code].position.y = 0; + // trainlisttest.list[code].progress = 0; + trainlisttest.list[code].dispose = "0"; + trainlisttest.list[code].nowcode = data.sectionCode; + trainlisttest.list[code].nextcode = null; + trainlisttest.list[code].curve = null; + trainlisttest.list[code].nextcurve = null; + trainlisttest.list[code].pc = 1; + + if(trainlisttest.list[code].mixerpush == false){ + for(let mi=0,lenmi=trainlisttest.list[code].mixer.length;mi
- + + :value="item.value" + :disabled="item.disabled" + >
@@ -143,10 +145,13 @@ import axios from 'axios'; for(let i=0;i +
+
+ +
+

故障列表

+
+
+
+
+
设备编号:{{part.code}}
+
设备类型:{{part.type}}
+
故障内容:
+
{{part.text}}
+
前往确认
+
+
+
+ + + +
+ + +
+ + + + + + + + diff --git a/src/views/jlmap3d/maintainer/component/faultdevice.vue b/src/views/jlmap3d/maintainer/component/faultdevice.vue new file mode 100644 index 000000000..6416d4580 --- /dev/null +++ b/src/views/jlmap3d/maintainer/component/faultdevice.vue @@ -0,0 +1,257 @@ + + + diff --git a/src/views/jlmap3d/maintainer/jl3dmaintainer.vue b/src/views/jlmap3d/maintainer/jl3dmaintainer.vue index ac05aefbd..c7f95e942 100644 --- a/src/views/jlmap3d/maintainer/jl3dmaintainer.vue +++ b/src/views/jlmap3d/maintainer/jl3dmaintainer.vue @@ -10,17 +10,28 @@ - - - + + +
+
+
+ {{controlmsg}} +
+
+ @@ -37,9 +48,8 @@ // import { UrlConfig } from '@/router/index'; import { JLmap3dMaintainer } from '@/jlmap3d/jl3dmaintainer/jlmap3dmaintainer.js'; - -// components -import Jlmap3dMenu from '@/views/jlmap3d/simulation/show/menu'; +import DevicefaultList from '@/views/jlmap3d/maintainer/component/devicefaultlist'; +import FaultDevice from '@/views/jlmap3d/maintainer/component/faultdevice'; import Jlmap3dConfig from '@/views/jlmap3d/simulation/show/configmenu'; import { ProjectIcon } from '@/scripts/ProjectConfig'; @@ -50,17 +60,13 @@ var train; export default { name: 'Jl3dMaintainer', components: { - Jlmap3dMenu, - Jlmap3dConfig + DevicefaultList, + FaultDevice // Jlmap3dMsg // ShowProperty }, data() { return { - trainlist: null, - stationlist: null, - msgdata: null, - training: { id: '', name: '', @@ -72,7 +78,12 @@ export default { selectmodel: null, mapid:null, group:null, - token:null + token:null, + faultlistshow:true, + devicelist:[], + deviceShow:true, + msgshow:false, + controlmsg:"", }; }, beforeDestroy() { @@ -90,7 +101,10 @@ export default { document.querySelector("link[rel*='icon']").href = ProjectIcon[this.$route.query.project]; }, mounted() { - window.updatemenulist = this.updatemenulist; + window.updatefault = this.updatefault; + window.resetfaultlist = this.resetfaultlist; + window.deletefault = this.deletefault; + window.warningmsg = this.warningmsg; this.getParams(); // console.log(""); @@ -101,9 +115,7 @@ export default { this.mapid = this.$route.query.mapId; this.group = this.$route.query.group; this.token = this.$route.query.token; - console.log(this.mapid); - console.log(this.group); - console.log(this.token); + this.init(this.mapid, this.group); }, show: function (skinCode, group) { @@ -121,7 +133,7 @@ export default { const dom = document.getElementById('app'); const project = this.$route.query.project; // console.log(project); - + this.deviceShow = false; if (project) { this.jlmap3d = new JLmap3dMaintainer(dom, mapdata, skinCode, this.$store, group, project); @@ -155,31 +167,41 @@ export default { showtrainmsg(showtype) { this.jlmap3d.showtrainmsg(showtype); }, - updatemenulist(stationlist, trainlist) { - const stations = []; - for (const k in stationlist) { - stations.push(stationlist[k]); - } - const trains = []; - for (const k in trainlist) { - trains.push(trainlist[k]); - } - this.stationlist = stations; - this.trainlist = trains; - // console.log(this.stationlist); + resetfaultlist(){ + this.devicelist = []; }, - - sstation(changedata) { - this.jlmap3d.updatecamera(changedata.mesh, 'station'); + updatefault(fault) { + this.devicelist.push(fault); }, - strain(changedata) { - - if (changedata.dispose == false) { - this.jlmap3d.updatecamera(changedata, 'train'); + deletefault(code){ + for(let i=0,leni=this.devicelist.length;i