diff --git a/src/jlmap3d/jl3dtrafficplan/jl3dtrafficplan.js b/src/jlmap3d/jl3dtrafficplan/jl3dtrafficplan.js index 8e2a8ea83..5909a1f4e 100644 --- a/src/jlmap3d/jl3dtrafficplan/jl3dtrafficplan.js +++ b/src/jlmap3d/jl3dtrafficplan/jl3dtrafficplan.js @@ -59,7 +59,7 @@ let passerWebWork = new Worker(JL3D_LOCAL_STATIC+"/workertest/trafficplan/traffi //老版本临时ai控制 let olddataai = false; -export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap) { +export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap,initCode) { // let stats = new Stats(); // dom.appendChild( stats.dom ); @@ -185,7 +185,7 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap) { }); this.initTrafficStart = function(){ - + passerStation.initCodeStation(initCode); scope.humanWaitTop = passerStation.nowStation.toppassers; scope.humanWaitDown = passerStation.nowStation.downpassers; scope.humanInSpeed = 0; @@ -194,6 +194,8 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap) { passerAi.initPasser(humanlist,topWaitPassers,downWaitPassers,passerHuman,scope); updatePasserData(humanlist.children.length,topWaitPassers.children.length,downWaitPassers.children.length,outStationPassers.children.length,passerHuman.speed); + + } this.changestation = function(stationname){ @@ -229,7 +231,7 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap) { this.updateNowLeaveData = function(direct,outNum){ if(direct == "top"){ waitForCreatOutTop = getnum(outNum,17); - console.log(waitForCreatOutTop); + // console.log(waitForCreatOutTop); for(let i=0;i
-
+
@@ -8,7 +8,8 @@ import Vue from 'vue'; import Iscs from '@/iscs/iscs'; import { parser } from '@/iscs/utils/parser'; -import {getIscsData} from '@/iscs/constant/iscsData'; +// import { getIscsData } from '@/iscs/constant/iscsData'; +import { getIscsData } from '@/api/iscs'; export default { name: 'Iscs', @@ -45,7 +46,6 @@ export default { showBackButton: true, initTime: '', started: false, - loading: false, stationCode: '', banUpOpenScreenDoor: false, banDownOpenScreenDoor: false @@ -78,7 +78,20 @@ export default { this.iscsDestroy(); }, methods: { - show (mode, system, part) { + async getDetail(mode, system, part) { + const params = { + lineCode: this.$route.query.lineCode, + totalSystem: mode, + system: system, + userInterface : part + }; + const resp = await getIscsData(params); + if (resp.data) { + const data = JSON.parse(resp.data.graphData); + return data; + } + }, + async show (mode, system, part) { if (!mode || !system || !part) { return; } @@ -86,8 +99,8 @@ export default { return false; }; this.iscsDestroy(); - this.loading = true; - const data = parser(getIscsData(mode, system, part), {width: this.widthCanvas, height: this.canvasHeight}); + const dataIscs = await this.getDetail(mode, system, part); + const data = parser(dataIscs, {width: this.widthCanvas, height: this.canvasHeight}); this.$iscs = new Iscs({ dom: document.getElementById(this.iscsId), config: { @@ -109,8 +122,8 @@ export default { if (this.$route.params.mode) { this.$iscs.on('selected', this.onSelected, this); } - this.setIscs(data, getIscsData(mode, system, part)); - this.$store.dispatch('iscs/setIscsData', getIscsData(mode, system, part)); + this.setIscs(data, dataIscs); + this.$store.dispatch('iscs/setIscsData', dataIscs); window.document.oncontextmenu = function () { return false; }; @@ -118,8 +131,9 @@ export default { setIscs(data, oldData) { this.$iscs.setIscs(oldData, data, this.$route.query.lineCode); }, - iscsLoadData(mode, system, part) { - this.$iscs.loadData(parser(getIscsData(mode, system, part), {width: this.widthCanvas, height: this.canvasHeight})); + async iscsLoadData(mode, system, part) { + const dataIscs = await this.getDetail(mode, system, part); + this.$iscs.loadData(parser(dataIscs, {width: this.widthCanvas, height: this.canvasHeight})); }, // 点击选择事件 onSelected(em) { @@ -147,7 +161,7 @@ export default { } }, handleViewLoaded() { - this.loading = false; + }, statusMessage(val) { this.$iscs && this.$iscs.setDeviceStatus(val); diff --git a/src/views/iscs/iscsSystem/config/fire-alarm/stand.vue b/src/views/iscs/iscsSystem/config/fire-alarm/stand.vue index bdbc598fa..28bfa04ff 100644 --- a/src/views/iscs/iscsSystem/config/fire-alarm/stand.vue +++ b/src/views/iscs/iscsSystem/config/fire-alarm/stand.vue @@ -26,7 +26,6 @@ export default { this.$nextTick(() => { this.$refs.iscsPlate.iscsLoadData('fas', 'stand', 'standPublicArea'); }); - console.log(this.width); } else if (device && device._type === 'IscsButton' && device.function === 'GoBack') { this.width = 1100; this.$nextTick(() => { diff --git a/src/views/jlmap3d/trafficplan/jl3dtrafficplan.vue b/src/views/jlmap3d/trafficplan/jl3dtrafficplan.vue index e1ab6ae3e..169a70730 100644 --- a/src/views/jlmap3d/trafficplan/jl3dtrafficplan.vue +++ b/src/views/jlmap3d/trafficplan/jl3dtrafficplan.vue @@ -47,6 +47,7 @@ export default { }, data() { return { + initCode:null, localStatic:JL3D_LOCAL_STATIC, jl3d: null, rendermode:'监控视角', @@ -81,7 +82,8 @@ export default { this.group = this.$route.query.group; this.mapId = this.$route.query.mapId; this.lineCode = this.$route.query.lineCode; - this.init(); + this.initCode = this.$route.query.deviceCode; + this.init(this.initCode); window.updatestationlist = this.updatestationlist; if (this.$route.query.type == 'CCTV') { this.isCctv = false; @@ -91,10 +93,10 @@ export default { beforeDestroy() { }, methods: { - init: function () { + init: function (code) { // let mapdata = this.$store.state.socket.device; const dom = document.getElementById('jl3d'); - this.jl3d = new Jl3dTrafficPlan(dom, this.$route.query.mapid, this.$route.query.group, 'normal'); + this.jl3d = new Jl3dTrafficPlan(dom, this.$route.query.mapid, this.$route.query.group, 'normal',code); }, switchrender() { if (this.renderswitch == true) { @@ -108,9 +110,14 @@ export default { } }, - updatestationlist(list) { + updatestationlist(list,nowname) { // console.log(list); - this.value = list[0].name; + if(nowname){ + this.value = nowname; + }else{ + this.value = list[0].name; + } + this.stationlist = list; }, currentsel(selVal) { diff --git a/src/views/jlmap3d/trafficplan/jl3dtraffictrain.vue b/src/views/jlmap3d/trafficplan/jl3dtraffictrain.vue index ad00e8717..610ebb438 100644 --- a/src/views/jlmap3d/trafficplan/jl3dtraffictrain.vue +++ b/src/views/jlmap3d/trafficplan/jl3dtraffictrain.vue @@ -15,6 +15,7 @@
@@ -114,7 +115,7 @@ export default { }, data() { return { - + initCode:null, isActive:0, localStatic:JL3D_LOCAL_STATIC, openeds:['2','3','4','5','6','7'], @@ -159,8 +160,8 @@ export default { // document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project]; }, mounted() { - - this.init(); + this.initCode = this.$route.query.deviceCode; + this.init(this.initCode); this.takelist = this.getnum(this.allPassers,6); // console.log(this.takelist); if (this.$route.query.type == 'CCTV') { @@ -173,10 +174,11 @@ export default { beforeDestroy() { }, methods: { - init: function () { + init: function (code) { // let mapdata = this.$store.state.socket.device; + this.value = code; const dom = document.getElementById('jl3d'); - this.jl3d = new Jl3dTrafficTrain(dom, this.$route.query.mapid, this.$route.query.group, 'normal'); + this.jl3d = new Jl3dTrafficTrain(dom, this.$route.query.mapid, this.$route.query.group, 'normal',code); }, assetSelect(index){ // console.log(index); @@ -213,6 +215,7 @@ export default { // } // // console.log(this.trainlist); }, + updateTrainCode(selVal) { // console.log(selVal); // this.jl3d.changeTrain(selVal); diff --git a/src/views/lesson/lessoncategory/edit/lesson/publish.vue b/src/views/lesson/lessoncategory/edit/lesson/publish.vue index 0fc49a88f..0ee244475 100644 --- a/src/views/lesson/lessoncategory/edit/lesson/publish.vue +++ b/src/views/lesson/lessoncategory/edit/lesson/publish.vue @@ -1,5 +1,5 @@