From d409476963f47c9c285e5a519f5d68364b344c9a Mon Sep 17 00:00:00 2001 From: sunzhenyu Date: Thu, 17 Sep 2020 18:12:37 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=89=E7=BB=B4?= =?UTF-8?q?=E6=B2=99=E7=9B=98=E8=A1=8C=E8=BD=A6=E9=AB=98=E5=BA=A6=E8=A1=8C?= =?UTF-8?q?=E9=A9=B6=E6=95=B0=E6=8D=AE=E6=9B=B4=E6=96=B0=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=89=E7=BB=B4=E8=AE=BE=E5=A4=87=E7=AB=99=E5=8F=B0?= =?UTF-8?q?=E8=B4=B4=E5=9B=BE=E8=8E=B7=E5=8F=96=EF=BC=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=89=E7=BB=B4=E7=BC=96=E8=BE=91=E5=99=A8=E5=8C=BA=E6=AE=B5?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../edit/testEditorModel/SectionList.js | 27 ++++--- .../edit/testEditorModel/SectionModel.js | 4 + src/jlmap3d/jl3ddevice/jl3ddeviceNew.js | 8 +- src/jlmap3d/jl3ddrive/jl3ddrive.js | 6 +- .../jl3ddrive/moveupdate/DrivingConnectNew.js | 80 ++++++++++++++----- src/jlmap3d/jl3dmaintainer/Jl3dfaultdevice.js | 4 +- .../connect/Jlmap3dSubscribeNew.js | 26 +++--- src/jlmap3d/main/newmodel/SectionListN.js | 2 +- src/jlmap3d/main/newmodel/SectionModel.js | 4 + .../main/newmodel/StationStandListN.js | 4 +- src/jlmap3d/main/newmodel/TrainListN.js | 38 +++++---- src/utils/baseUrl.js | 4 +- 12 files changed, 135 insertions(+), 72 deletions(-) diff --git a/src/jlmap3d/edit/testEditorModel/SectionList.js b/src/jlmap3d/edit/testEditorModel/SectionList.js index ca5153584..d2e6e56b7 100644 --- a/src/jlmap3d/edit/testEditorModel/SectionList.js +++ b/src/jlmap3d/edit/testEditorModel/SectionList.js @@ -986,23 +986,26 @@ export function SectionList() { } - + console.log(scope.sections.datalist); for(let i=0;i=trainmodel.children[rs].rotalist[0].posr.x){ @@ -547,7 +555,8 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri } //let offsetx = trainmodel.children[1].matrixWorld.elements[12]-trainmodel.children[0].children[3].matrixWorld.elements[12]; - trainmodel.children[rs].rotation.z = trainmodel.children[rs].rotalist[0].rota; + trainmodel.children[rs].rotation.z = trainmodel.children[rs].rotalist[0].rotz; + trainmodel.children[rs].rotation.y = trainmodel.children[rs].rotalist[0].roty; trainmodel.children[rs].rotalist.splice(0,1) xh--; }else{ @@ -565,7 +574,12 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri }else{ // - if(trainmodel.children[0].position.z < pos.z){ + let rotas = { + posr:null, + roty:null, + rotz:null, + }; + if(trainmodel.children[0].position.z < pos.z ){ trainmodel.children[0].up = new THREE.Vector3(-1,0,0); let tangent = trainmodel.curve.getTangentAt(data.offset).normalize(); trainmodel.children[0].axis.crossVectors(trainmodel.children[0].up, tangent).normalize(); @@ -574,12 +588,10 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri trainmodel.children[0].rotation.x = -Math.PI/2; trainmodel.children[0].rotation.z = trainmodel.children[0].rotation.y; trainmodel.children[0].rotation.y = 0; - let rotas = { - posr:pos, - rota:trainmodel.children[0].rotation.z - } - trainmodel.children[1].rotalist.push(rotas); + rotas.posr = pos; + // rotas.roty = trainmodel.children[0].rotation.y; + rotas.rotz = trainmodel.children[0].rotation.z; let offsetz = parseFloat(pos.z) - parseFloat(trainmodel.children[0].position.z); trainmodel.children[0].position.z += offsetz; @@ -592,26 +604,56 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri trainmodel.children[0].rotation.x = -Math.PI/2; trainmodel.children[0].rotation.z = trainmodel.children[0].rotation.y; trainmodel.children[0].rotation.y = 0; - let rotas = { - posr:pos, - rota:trainmodel.children[0].rotation.z - } - trainmodel.children[1].rotalist.push(rotas); + rotas.posr = pos; + // rotas.roty = trainmodel.children[0].rotation.y; + rotas.rotz = trainmodel.children[0].rotation.z; let offsetz = parseFloat(pos.z) - parseFloat(trainmodel.children[0].position.z); trainmodel.children[0].position.z += offsetz; } + if(trainmodel.children[0].position.y != pos.y){ + if(rotas.posr == null){ + trainmodel.children[0].up = new THREE.Vector3(-1,0,0); + let tangent = trainmodel.curve.getTangentAt(data.offset).normalize(); + trainmodel.children[0].axis.crossVectors(trainmodel.children[0].up, tangent).normalize(); + let radians = Math.acos(trainmodel.children[0].up.dot(tangent)); + trainmodel.children[0].quaternion.setFromAxisAngle(trainmodel.children[0].axis, radians); + trainmodel.children[0].rotation.x = -Math.PI/2; + trainmodel.children[0].rotation.z = trainmodel.children[0].rotation.y; + trainmodel.children[0].rotation.y = 0; + + rotas.posr = pos; + rotas.roty = trainmodel.children[0].rotation.y; + rotas.rotz = trainmodel.children[0].rotation.z; + + let offsetz = parseFloat(pos.z) - parseFloat(trainmodel.children[0].position.z); + trainmodel.children[0].position.z += offsetz; + let offsety = parseFloat(pos.y) - parseFloat(trainmodel.children[0].position.y); + trainmodel.children[0].position.y += offsety; + }else{ + rotas.roty = trainmodel.children[0].rotation.y; + let offsety = parseFloat(rotas.posr.y) - parseFloat(trainmodel.children[0].position.y); + trainmodel.children[0].position.y += offsety; + } + } + + if(rotas.posr!= null){ + trainmodel.children[1].rotalist.push(rotas); + } + if(trainmodel.children[1].rotalist.length > 0 || trainmodel.children[2].rotalist.length > 0 || trainmodel.children[3].rotalist.length > 0 || trainmodel.children[4].rotalist.length > 0|| trainmodel.children[5].rotalist.length > 0){ for(let rs = 1;rs<6;rs++){ //console.log(rs); if(trainmodel.children[rs].rotalist[0]){ let offsetz = parseFloat(trainmodel.children[rs].rotalist[0].posr.z) - parseFloat(trainmodel.children[rs].matrixWorld.elements[14]); - trainmodel.children[rs].position.z += offsetz; + let offsety = parseFloat(trainmodel.children[rs].rotalist[0].posr.y) - parseFloat(trainmodel.children[rs].matrixWorld.elements[13]); + trainmodel.children[rs].position.y += offsety; + for(let xh=0;xh 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++){ @@ -299,8 +299,8 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) { 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; - // let offsety = parseFloat(trainlisttest.list[code].children[rs].rotalist[0].posr.y) - parseFloat(trainlisttest.list[code].children[rs].matrixWorld.elements[13]); - // trainlisttest.list[code].children[rs].position.y += offsety; + let offsety = parseFloat(trainlisttest.list[code].children[rs].rotalist[0].posr.y) - parseFloat(trainlisttest.list[code].children[rs].matrixWorld.elements[13]); + trainlisttest.list[code].children[rs].position.y += offsety; for(let xh=0;xh=trainlisttest.list[code].children[rs].rotalist[0].posr.x){ @@ -316,7 +316,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) { } trainlisttest.list[code].children[rs].rotation.z = trainlisttest.list[code].children[rs].rotalist[0].rotz; - // trainlisttest.list[code].children[rs].rotation.y = trainlisttest.list[code].children[rs].rotalist[0].roty; + trainlisttest.list[code].children[rs].rotation.y = trainlisttest.list[code].children[rs].rotalist[0].roty; trainlisttest.list[code].children[rs].rotalist.splice(0,1) xh--; }else{ @@ -369,7 +369,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) { let newRotationZ = trainlisttest.list[code].children[0].rotation.z; trainlisttest.list[code].children[0].rotation.z = trainlisttest.list[code].children[0].rotation.y; trainlisttest.list[code].children[0].rotation.y = 0; - // trainlisttest.list[code].children[0].rotation.y = -newRotationZ; + trainlisttest.list[code].children[0].rotation.y = -newRotationZ; let rotas = { posr:point, @@ -379,8 +379,8 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) { 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; - // let offsety = parseFloat(point.y) - parseFloat(trainlisttest.list[code].children[0].position.y); - // trainlisttest.list[code].children[0].position.y += offsety; + let offsety = parseFloat(point.y) - parseFloat(trainlisttest.list[code].children[0].position.y); + trainlisttest.list[code].children[0].position.y += offsety; // trainlisttest.list[code].position.z = point.z; } @@ -392,8 +392,8 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) { 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; - // let offsety = parseFloat(trainlisttest.list[code].children[rs].rotalist[0].posr.y) - parseFloat(trainlisttest.list[code].children[rs].matrixWorld.elements[13]); - // trainlisttest.list[code].children[rs].position.y += offsety; + let offsety = parseFloat(trainlisttest.list[code].children[rs].rotalist[0].posr.y) - parseFloat(trainlisttest.list[code].children[rs].matrixWorld.elements[13]); + trainlisttest.list[code].children[rs].position.y += offsety; for(let xh=0;xh Date: Thu, 17 Sep 2020 18:25:37 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=A1=8C=E8=B0=83=E5=A4=A7=E8=B5=9B?= =?UTF-8?q?=E7=90=86=E8=AE=BA=E8=80=83=E8=AF=95&=E7=A6=8F=E5=B7=9EIscs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/iscs/constant/deviceRender.js | 6 + src/iscs/constant/deviceType.js | 3 +- src/iscs/iscs.js | 1 + src/iscs/shape/communicationButcher.js | 216 +++++++++++++++++ src/iscs/shape/factory.js | 2 + src/iscs/shape/fuzhouDoor.js | 35 +-- src/iscs/utils/parser.js | 3 + .../iscs/iscsDraw/IscsNetOperate/index.vue | 22 +- .../iscsCommonElem/communicationButcher.vue | 110 +++++++++ .../iscsDraw/iscsCommonElem/fuzhouDoor.vue | 32 +-- .../dispatherContest/requestQuestion.vue | 116 ++++++++++ .../displayNew/dispatherContest/result.vue | 219 ++++++++++++------ 12 files changed, 653 insertions(+), 112 deletions(-) create mode 100644 src/iscs/shape/communicationButcher.js create mode 100644 src/views/iscs/iscsDraw/iscsCommonElem/communicationButcher.vue create mode 100644 src/views/newMap/displayNew/dispatherContest/requestQuestion.vue diff --git a/src/iscs/constant/deviceRender.js b/src/iscs/constant/deviceRender.js index ac8a21b75..815d588bd 100644 --- a/src/iscs/constant/deviceRender.js +++ b/src/iscs/constant/deviceRender.js @@ -308,4 +308,10 @@ deviceRender[deviceType.FuzhouDoor] = { zlevel: 1, z: 4 }; +// 福州通讯图符 +deviceRender[deviceType.CommunicationButcher] = { + _type: deviceType.CommunicationButcher, + zlevel: 1, + z: 4 +}; export default deviceRender; diff --git a/src/iscs/constant/deviceType.js b/src/iscs/constant/deviceType.js index c64d05cfe..b4295db21 100644 --- a/src/iscs/constant/deviceType.js +++ b/src/iscs/constant/deviceType.js @@ -47,7 +47,8 @@ const deviceType = { Draught: 'Draught', IscsImage: 'IscsImage', OrdinaryDoor: 'OrdinaryDoor', - FuzhouDoor: 'FuzhouDoor' + FuzhouDoor: 'FuzhouDoor', + CommunicationButcher: 'CommunicationButcher' }; export default deviceType; diff --git a/src/iscs/iscs.js b/src/iscs/iscs.js index 5128cd07b..67fad973e 100644 --- a/src/iscs/iscs.js +++ b/src/iscs/iscs.js @@ -131,6 +131,7 @@ class Iscs { updateIscsData(store.state.iscs, elem); const oDevice = this.iscsDevice[code] || deviceFactory(type, elem); const nDevice = deviceFactory(type, Object.assign(oDevice.model || {}, elem)); + console.log(nDevice, '****', this.iscsDevice[code]); delete this.iscsDevice[code]; this.$painter.delete(oDevice); if (!elem._dispose) { diff --git a/src/iscs/shape/communicationButcher.js b/src/iscs/shape/communicationButcher.js new file mode 100644 index 000000000..30aa4e6fc --- /dev/null +++ b/src/iscs/shape/communicationButcher.js @@ -0,0 +1,216 @@ +import Group from 'zrender/src/container/Group'; +import Rect from 'zrender/src/graphic/shape/Rect'; +import Line from 'zrender/src/graphic/shape/Line'; + +export default class CommunicationButcher extends Group { + constructor(device) { + super(); + this.model = device.model; + this.zlevel = device.model.zlevel; + this.z = device.model.z; + this._type = device.model._type; + this._code = device.model.code; + this.create(); + this.setState(this.model); + } + create() { + this.grouper = new Group({ + id: this.model.code, + position: [this.model.point.x, this.model.point.y] + }); + this.add(this.grouper); + this.rect1 = new Rect({ + zlevel: this.zlevel, + z: this.z, + shape: { + x: 0, + y: 0, + width: this.model.width, + height: this.model.width * 5 / 12 + }, + style: { + fill: '#0F0', + stroke: '#000', + lineWidth: 2 + } + }); + this.rect2 = new Rect({ + zlevel: this.zlevel, + z: this.z, + shape: { + x: this.model.width / 30, + y: this.model.width * 5 / 12, + width: this.model.width - this.model.width / 15, + height: this.model.width / 30 + }, + style: { + fill: '#000' + } + }); + this.rect3 = new Rect({ + zlevel: this.zlevel, + z: this.z, + shape: { + x: this.model.width / 4 * 3, + y: this.model.width / 8, + width: this.model.width / 7, + height: this.model.width / 12 + }, + style: { + fill: 'rgba(0,0,0,0)', + lineWidth: 1, + stroke: '#000' + } + }); + this.line1 = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: this.model.width * 7 / 24, + y1: 0, + x2: this.model.width * 7 / 24, + y2: this.model.width * 5 / 12 + }, + style: { + stroke: '#000', + lineWidth: 1 + } + }); + this.line2 = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: this.model.width * 7 / 12, + y1: 0, + x2: this.model.width * 7 / 12, + y2: this.model.width * 5 / 12 + }, + style: { + stroke: '#000', + lineWidth: 1 + } + }); + this.line3 = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: this.model.width * 7 / 24, + y1: this.model.width * 5 / 84, + x2: this.model.width * 7 / 12, + y2: this.model.width * 5 / 84 + }, + style: { + stroke: '#000', + lineWidth: 1 + } + }); + this.line4 = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: this.model.width * 7 / 24, + y1: this.model.width * 5 / 42, + x2: this.model.width * 7 / 12, + y2: this.model.width * 5 / 42 + }, + style: { + stroke: '#000', + lineWidth: 1 + } + }); + this.line5 = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: this.model.width * 7 / 24, + y1: this.model.width * 5 / 28, + x2: this.model.width * 7 / 12, + y2: this.model.width * 5 / 28 + }, + style: { + stroke: '#000', + lineWidth: 1 + } + }); + this.line6 = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: this.model.width * 7 / 24, + y1: this.model.width * 5 / 21, + x2: this.model.width * 7 / 12, + y2: this.model.width * 5 / 21 + }, + style: { + stroke: '#000', + lineWidth: 1 + } + }); + this.line7 = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: this.model.width * 7 / 24, + y1: this.model.width * 25 / 84, + x2: this.model.width * 7 / 12, + y2: this.model.width * 25 / 84 + }, + style: { + stroke: '#000', + lineWidth: 1 + } + }); + this.line8 = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: this.model.width * 7 / 24, + y1: this.model.width * 5 / 14, + x2: this.model.width * 7 / 12, + y2: this.model.width * 5 / 14 + }, + style: { + stroke: '#000', + lineWidth: 1 + } + }); + // x: this.model.width / 4 * 3, + // y: this.model.width / 8, + // width: this.model.width / 7, + // height: this.model.width / 12 + this.line9 = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: this.model.width * 3 / 4, + y1: this.model.width * 10 / 48 + } + }); + this.grouper.add(this.rect1); + this.grouper.add(this.rect2); + this.grouper.add(this.rect3); + this.grouper.add(this.line1); + this.grouper.add(this.line2); + this.grouper.add(this.line3); + this.grouper.add(this.line4); + this.grouper.add(this.line5); + this.grouper.add(this.line6); + this.grouper.add(this.line7); + this.grouper.add(this.line8); + this.add(this.grouper); + console.log(this.grouper, '-----------'); + } + setState(model) { + if (model.state === 'normal') { + this.rect1.setStyle({fill: '#0F0'}); + } else if (model.state === 'fault') { + this.rect1.setStyle({fill: '#F00'}); + } else if (model.state === 'unknow') { + this.rect1.setStyle({fill: '#00F'}); + } + } + setModel(dx, dy) { + this.model.point.x += dx; + this.model.point.y += dy; + } +} diff --git a/src/iscs/shape/factory.js b/src/iscs/shape/factory.js index 709a4ddf2..94ddc2a70 100644 --- a/src/iscs/shape/factory.js +++ b/src/iscs/shape/factory.js @@ -48,6 +48,7 @@ import Draught from './bas/draught'; import IscsImage from './iscsImage'; import OrdinaryDoor from './ordinaryDoor'; import FuzhouDoor from './fuzhouDoor'; +import CommunicationButcher from './communicationButcher'; const iscsShape = {}; iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton; @@ -100,6 +101,7 @@ iscsShape[deviceType.Draught] = Draught; iscsShape[deviceType.IscsImage] = IscsImage; iscsShape[deviceType.OrdinaryDoor] = OrdinaryDoor; iscsShape[deviceType.FuzhouDoor] = FuzhouDoor; +iscsShape[deviceType.CommunicationButcher] = CommunicationButcher; function shapefactory(device, iscs) { const type = device.model._type; diff --git a/src/iscs/shape/fuzhouDoor.js b/src/iscs/shape/fuzhouDoor.js index 9937d320b..7d88dd100 100644 --- a/src/iscs/shape/fuzhouDoor.js +++ b/src/iscs/shape/fuzhouDoor.js @@ -18,7 +18,6 @@ export default class fuzhouDoor extends Group { id: this.model.code, position: [this.model.point.x, this.model.point.y] }); - this.add(this.grouper); this.door = new Rect({ zlevel: this.zlevel, z: this.z, @@ -29,7 +28,9 @@ export default class fuzhouDoor extends Group { height: this.model.width * 25 / 16 }, style: { - fill: '#33CC00'// D3D0C9 + fill: '#33CC00', + stroke: '#000', + lineWidth: 2 } }); this.doorWindow = new Rect({ @@ -49,10 +50,10 @@ export default class fuzhouDoor extends Group { zlevel: this.zlevel, z: this.z, shape: { - x: this.model.width * 13 / 17, - y: this.model.width * 21 / 17, - width: this.model.width / 17, - height: this.model.width / 17 + x: this.model.width * 12 / 17, + y: this.model.width * 20 / 17, + width: this.model.width / 9, + height: this.model.width / 9 }, style: { fill: '#000' @@ -64,7 +65,7 @@ export default class fuzhouDoor extends Group { shape: { points:[ [0, 0], - [this.model.width * 3 / 4, this.model.width * 5 / 16], + [this.model.width * 3 / 4, this.model.width * 7 / 24], [this.model.width * 3 / 4, this.model.width * 7 / 4], [0, this.model.width * 25 / 16] ] @@ -80,10 +81,10 @@ export default class fuzhouDoor extends Group { z: this.z + 2, shape: { points: [ - [this.model.width / 6, this.model.width / 4], - [this.model.width * 2 / 3, this.model.width * 5 / 12], - [this.model.width / 6, this.model.width * 7 / 12], - [this.model.width * 2 / 3, this.model.width * 2 / 3] + [this.model.width / 8, this.model.width / 4], + [this.model.width * 5 / 8, this.model.width * 5 / 12], + [this.model.width * 5 / 8, this.model.width * 3 / 4], + [this.model.width / 8, this.model.width * 7 / 12] ] }, style: { @@ -95,10 +96,10 @@ export default class fuzhouDoor extends Group { z: this.z + 2, shape: { points: [ - [this.model.width * 11 / 24, this.model.width * 55 / 48], - [this.model.width / 3, this.model.width * 29 / 24], - [this.model.width * 11 / 24, this.model.width * 5 / 4], - [this.model.width / 3, this.model.width * 21 / 16] + [this.model.width * 5 / 12, this.model.width * 55 / 48], + [this.model.width * 14 / 24, this.model.width * 29 / 24], + [this.model.width * 14 / 24, this.model.width * 21 / 16], + [this.model.width * 5 / 12, this.model.width * 5 / 4] ] }, style: { @@ -120,12 +121,12 @@ export default class fuzhouDoor extends Group { } setState(model) { if (model.doorOpen) { - this.door.setStyle({fill: 'D3D0C9'}); + this.door.setStyle({fill: '#D3D0C9'}); this.polygon1.show(); this.polygon2.show(); this.polygon3.show(); } else { - this.door.setStyle({fill: 'D3D0C9'}); + this.door.setStyle({fill: '#0F0'}); this.doorWindow.show(); this.doorknob.show(); } diff --git a/src/iscs/utils/parser.js b/src/iscs/utils/parser.js index 2b6d6725f..e0addcbe7 100644 --- a/src/iscs/utils/parser.js +++ b/src/iscs/utils/parser.js @@ -190,6 +190,9 @@ export function parser(data) { zrUtil.each(data.fuzhoudoorList || [], elem => { iscsDevice[elem.code] = deviceFactory(deviceType.FuzhouDoor, elem); }); + zrUtil.each(data.communicationButcherList || [], elem => { + iscsDevice[elem.code] = deviceFactory(deviceType.CommunicationButcher, elem); + }); } return iscsDevice; diff --git a/src/views/iscs/iscsDraw/IscsNetOperate/index.vue b/src/views/iscs/iscsDraw/IscsNetOperate/index.vue index 78be19694..a3f4c7af4 100644 --- a/src/views/iscs/iscsDraw/IscsNetOperate/index.vue +++ b/src/views/iscs/iscsDraw/IscsNetOperate/index.vue @@ -58,6 +58,22 @@ @deleteDataModel="deleteDataModel" /> + + + + + + @@ -71,6 +87,8 @@ import IscsLine from '../iscsCommonElem/line'; import IscsText from '../iscsCommonElem/text'; import IscsRect from '../iscsCommonElem/rect'; import OrdinaryDoor from '../iscsCommonElem/ordinaryDoor'; +import FuzhouDoor from '../iscsCommonElem/fuzhouDoor'; +import CommunicationButcher from '../iscsCommonElem/communicationButcher'; export default { name: 'IscsAcsOperate', @@ -80,7 +98,9 @@ export default { IscsLine, IscsText, IscsRect, - OrdinaryDoor + OrdinaryDoor, + FuzhouDoor, + CommunicationButcher }, mixins: [ ], diff --git a/src/views/iscs/iscsDraw/iscsCommonElem/communicationButcher.vue b/src/views/iscs/iscsDraw/iscsCommonElem/communicationButcher.vue new file mode 100644 index 000000000..c47f5e446 --- /dev/null +++ b/src/views/iscs/iscsDraw/iscsCommonElem/communicationButcher.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/src/views/iscs/iscsDraw/iscsCommonElem/fuzhouDoor.vue b/src/views/iscs/iscsDraw/iscsCommonElem/fuzhouDoor.vue index a49a84f43..8115304f7 100644 --- a/src/views/iscs/iscsDraw/iscsCommonElem/fuzhouDoor.vue +++ b/src/views/iscs/iscsDraw/iscsCommonElem/fuzhouDoor.vue @@ -23,12 +23,12 @@ import {getUID} from '@/iscs/utils/Uid'; import { mapGetters } from 'vuex'; export default { - name: 'OrdinaryDoor', + name: 'FuzhouDoor', data() { return { form:{ code: '', - width: 1, + width: 20, x: 10, y: 10 }, @@ -46,16 +46,14 @@ export default { watch:{ '$store.state.iscs.rightClickCount': function (val) { const model = this.$store.getters['iscs/updateDeviceData']; - if (model._type === 'OrdinaryDoor' ) { + if (model._type === 'FuzhouDoor' ) { this.buttonText = '修改'; this.showDeleteButton = true; this.isUpdate = true; this.form.code = model.code; this.form.x = model.point.x; this.form.y = model.point.y; - this.form.r = model.r; - this.form.doorType = model.doorType; - this.form.rotationAngle = model.rotationAngle; + this.form.width = model.width; } } }, @@ -69,11 +67,9 @@ export default { x: this.form.x, y: this.form.y }, - code: this.isUpdate ? this.form.code : getUID('OrdinaryDoor', this.iscs.ordinaryDoorList), - _type: 'OrdinaryDoor', - rotationAngle: this.form.rotationAngle, - r: this.form.r, - doorType: this.form.doorType + code: this.isUpdate ? this.form.code : getUID('FuzhouDoor', this.iscs.fuzhouDoorList), + _type: 'FuzhouDoor', + width: this.form.width }; this.$emit('createDataModel', model); this.initPage(); @@ -83,18 +79,16 @@ export default { }); }, deleteDevice() { - const lineModel = { + const model = { point: { x: this.form.x, y: this.form.y }, code: this.form.code, - _type: 'OrdinaryDoor', - rotationAngle: this.form.rotationAngle, - r: this.form.r, - doorType: this.form.doorType + _type: 'FuzhouDoor', + width: this.form.width }; - this.$emit('deleteDataModel', lineModel); + this.$emit('deleteDataModel', model); }, initPage() { this.isUpdate = false; @@ -102,9 +96,7 @@ export default { this.showDeleteButton = false; this.form = { code: '', - doorType: '1', - r: 1, - rotationAngle: 0, + width: 20, x: 10, y: 10 }; diff --git a/src/views/newMap/displayNew/dispatherContest/requestQuestion.vue b/src/views/newMap/displayNew/dispatherContest/requestQuestion.vue new file mode 100644 index 000000000..207115cd3 --- /dev/null +++ b/src/views/newMap/displayNew/dispatherContest/requestQuestion.vue @@ -0,0 +1,116 @@ + + + + diff --git a/src/views/newMap/displayNew/dispatherContest/result.vue b/src/views/newMap/displayNew/dispatherContest/result.vue index 4ea2c6818..3c41d373c 100644 --- a/src/views/newMap/displayNew/dispatherContest/result.vue +++ b/src/views/newMap/displayNew/dispatherContest/result.vue @@ -1,82 +1,100 @@ From aa529450030da8a9b6e534f433141b8efc43528e Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 17 Sep 2020 18:30:31 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=A1=8C=E8=B0=83=E5=A4=A7=E8=B5=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/displayNew/dispatherContest/result.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/views/newMap/displayNew/dispatherContest/result.vue b/src/views/newMap/displayNew/dispatherContest/result.vue index 3c41d373c..01b602f2d 100644 --- a/src/views/newMap/displayNew/dispatherContest/result.vue +++ b/src/views/newMap/displayNew/dispatherContest/result.vue @@ -98,6 +98,9 @@ export default { }, close() { this.dialogVisible = false; + }, + returnTop() { + document.querySelector('.el-header').scrollIntoView(true); } } }; From 89fcb3fe2fc9c998464d9dbc7bb5eec0c6639cbb Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 18 Sep 2020 09:26:25 +0800 Subject: [PATCH 4/5] =?UTF-8?q?iscs=E8=B0=83=E6=95=B4&ibp=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=8F=82=E6=95=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/simulation.js | 4 +- src/iscs/iscs.js | 1 - src/iscs/shape/communicationButcher.js | 14 ++++--- src/views/ibp/ibpsystem/index.vue | 2 +- src/views/iscs/iscsDesign/demonList.vue | 42 +++++++++---------- .../iscsCommonElem/communicationButcher.vue | 4 +- 6 files changed, 34 insertions(+), 33 deletions(-) diff --git a/src/api/simulation.js b/src/api/simulation.js index 6e76e9a69..6f5a56f8b 100644 --- a/src/api/simulation.js +++ b/src/api/simulation.js @@ -621,9 +621,9 @@ export function getPlcGateway(group) { // }); // } -export function handlerIbpEvent(group, button) { +export function handlerIbpEvent(group, button, stationCode) { return request({ - url: `/simulation/${group}/ibp/${button}`, + url: `/simulation/${group}/ibp/${button}?stationCode=${stationCode}`, method: 'put' }); } diff --git a/src/iscs/iscs.js b/src/iscs/iscs.js index 67fad973e..5128cd07b 100644 --- a/src/iscs/iscs.js +++ b/src/iscs/iscs.js @@ -131,7 +131,6 @@ class Iscs { updateIscsData(store.state.iscs, elem); const oDevice = this.iscsDevice[code] || deviceFactory(type, elem); const nDevice = deviceFactory(type, Object.assign(oDevice.model || {}, elem)); - console.log(nDevice, '****', this.iscsDevice[code]); delete this.iscsDevice[code]; this.$painter.delete(oDevice); if (!elem._dispose) { diff --git a/src/iscs/shape/communicationButcher.js b/src/iscs/shape/communicationButcher.js index 30aa4e6fc..c3cdf93b4 100644 --- a/src/iscs/shape/communicationButcher.js +++ b/src/iscs/shape/communicationButcher.js @@ -174,16 +174,18 @@ export default class CommunicationButcher extends Group { lineWidth: 1 } }); - // x: this.model.width / 4 * 3, - // y: this.model.width / 8, - // width: this.model.width / 7, - // height: this.model.width / 12 this.line9 = new Line({ zlevel: this.zlevel, z: this.z + 1, shape: { x1: this.model.width * 3 / 4, - y1: this.model.width * 10 / 48 + y1: this.model.width / 6, + x2: this.model.width * 25 / 28, + y2: this.model.width / 6 + }, + style: { + stroke: '#000', + lineWidth: 1 } }); this.grouper.add(this.rect1); @@ -197,8 +199,8 @@ export default class CommunicationButcher extends Group { this.grouper.add(this.line6); this.grouper.add(this.line7); this.grouper.add(this.line8); + this.grouper.add(this.line9); this.add(this.grouper); - console.log(this.grouper, '-----------'); } setState(model) { if (model.state === 'normal') { diff --git a/src/views/ibp/ibpsystem/index.vue b/src/views/ibp/ibpsystem/index.vue index e9d16c2b4..c680dc108 100644 --- a/src/views/ibp/ibpsystem/index.vue +++ b/src/views/ibp/ibpsystem/index.vue @@ -191,7 +191,7 @@ export default { onMouseDown(em) { if (em.deviceModel.mean) { if (IbpOperation[em.deviceModel.mean]) { - handlerIbpEvent(this.$route.query.group, IbpOperation[em.deviceModel.mean].event); + handlerIbpEvent(this.$route.query.group, IbpOperation[em.deviceModel.mean].event, this.stationCode); } } }, diff --git a/src/views/iscs/iscsDesign/demonList.vue b/src/views/iscs/iscsDesign/demonList.vue index 29048ee12..2a7e4aa25 100644 --- a/src/views/iscs/iscsDesign/demonList.vue +++ b/src/views/iscs/iscsDesign/demonList.vue @@ -454,47 +454,47 @@ export default { }, { name: '自动售检票/门禁', - mode: '', - id: '', - type: '', + mode: 'fafc', + id: 'fafc', + type: 'totalSystem', children: [ { name: '自动售检票系统', - mode: '', - id: '', - type: '' + mode: 'autoTicket', + id: 'autoTicket', + type: 'interface' }, { name: '门禁系统', - mode: '', - id: '', - type: '' + mode: 'entranceGuard', + id: 'entranceGuard', + type: 'interface' } ] }, { name: '火灾报警系统', - mode: '', - id: '', - type: '', + mode: 'ffas', + id: 'ffas', + type: 'totalSystem', children: [ { name: '火灾报警系统-FAS联动', - mode: '', - id: '', - type: '' + mode: 'linkage', + id: 'linkage', + type: 'interface' }, { name: '火灾报警系统-站厅层', - mode: '', - id: '', - type: '' + mode: 'stationHall', + id: 'stationHall', + type: 'interface' }, { name: '火灾报警系统-站台层', - mode: '', - id: '', - type: '' + mode: 'platform', + id: 'platform', + type: 'interface' }, { name: '火灾报警系统-区间', diff --git a/src/views/iscs/iscsDraw/iscsCommonElem/communicationButcher.vue b/src/views/iscs/iscsDraw/iscsCommonElem/communicationButcher.vue index c47f5e446..b4352126c 100644 --- a/src/views/iscs/iscsDraw/iscsCommonElem/communicationButcher.vue +++ b/src/views/iscs/iscsDraw/iscsCommonElem/communicationButcher.vue @@ -28,7 +28,7 @@ export default { return { form:{ code: '', - width: 20, + width: 50, x: 10, y: 10 }, @@ -96,7 +96,7 @@ export default { this.showDeleteButton = false; this.form = { code: '', - width: 20, + width: 50, x: 10, y: 10 }; From a37a3214f89f7972a17b3c67ab3bbca9e1fce80e Mon Sep 17 00:00:00 2001 From: sunzhenyu Date: Fri, 18 Sep 2020 09:26:44 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=89=E7=BB=B4?= =?UTF-8?q?=E9=80=9A=E5=8F=B7=E8=AF=BB=E5=8F=96=E6=96=B0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jlmap3d/jl3dmaintainer/Jl3dfaultdevice.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/jlmap3d/jl3dmaintainer/Jl3dfaultdevice.js b/src/jlmap3d/jl3dmaintainer/Jl3dfaultdevice.js index 7d95c774c..fb11b83f3 100644 --- a/src/jlmap3d/jl3dmaintainer/Jl3dfaultdevice.js +++ b/src/jlmap3d/jl3dmaintainer/Jl3dfaultdevice.js @@ -166,8 +166,9 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) { function setpsdstationmap(stationlist){ for(let i=0,leni=stationlist.length;i