From 0abd0aaba519238b275f94e29ab663290f8e1a51 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 17 Sep 2020 09:01:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=A6=8F=E5=BB=BA=E7=BB=BC=E5=90=88?= =?UTF-8?q?=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/iscs/constant/deviceRender.js | 5 + src/iscs/constant/deviceType.js | 3 +- src/iscs/shape/factory.js | 2 + src/iscs/shape/ordinaryDoor.js | 105 ++++++++++++ src/iscs/utils/parser.js | 3 + src/views/iscs/iscsDesign/demonList.vue | 96 +++++++++++ .../iscs/iscsDraw/IscsNetOperate/index.vue | 12 +- .../iscsDraw/iscsCommonElem/ordinaryDoor.vue | 149 ++++++++++++++++++ 8 files changed, 373 insertions(+), 2 deletions(-) create mode 100644 src/iscs/shape/ordinaryDoor.js create mode 100644 src/views/iscs/iscsDraw/iscsCommonElem/ordinaryDoor.vue diff --git a/src/iscs/constant/deviceRender.js b/src/iscs/constant/deviceRender.js index 831d229c1..e3c9c1ffa 100644 --- a/src/iscs/constant/deviceRender.js +++ b/src/iscs/constant/deviceRender.js @@ -296,4 +296,9 @@ deviceRender[deviceType.IscsImage] = { zlevel: 1, z: 5 }; +deviceRender[deviceType.OrdinaryDoor] = { + _type: deviceType.OrdinaryDoor, + zlevel: 1, + z: 4 +}; export default deviceRender; diff --git a/src/iscs/constant/deviceType.js b/src/iscs/constant/deviceType.js index f3d551e4c..848be06aa 100644 --- a/src/iscs/constant/deviceType.js +++ b/src/iscs/constant/deviceType.js @@ -45,7 +45,8 @@ const deviceType = { Stairs: 'Stairs', Elevator: 'Elevator', Draught: 'Draught', - IscsImage: 'IscsImage' + IscsImage: 'IscsImage', + OrdinaryDoor: 'ordinaryDoor' }; export default deviceType; diff --git a/src/iscs/shape/factory.js b/src/iscs/shape/factory.js index 18ea5403c..5284ca043 100644 --- a/src/iscs/shape/factory.js +++ b/src/iscs/shape/factory.js @@ -46,6 +46,7 @@ import Stairs from './bas/stairs'; import Elevator from './bas/elevator'; import Draught from './bas/draught'; import IscsImage from './iscsImage'; +import OrdinaryDoor from './ordinaryDoor'; const iscsShape = {}; iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton; @@ -96,6 +97,7 @@ iscsShape[deviceType.Stairs] = Stairs; iscsShape[deviceType.Elevator] = Elevator; iscsShape[deviceType.Draught] = Draught; iscsShape[deviceType.IscsImage] = IscsImage; +iscsShape[deviceType.OrdinaryDoor] = OrdinaryDoor; function shapefactory(device, iscs) { const type = device.model._type; diff --git a/src/iscs/shape/ordinaryDoor.js b/src/iscs/shape/ordinaryDoor.js new file mode 100644 index 000000000..b5566eb5a --- /dev/null +++ b/src/iscs/shape/ordinaryDoor.js @@ -0,0 +1,105 @@ +import Group from 'zrender/src/container/Group'; +import Rect from 'zrender/src/graphic/shape/Rect'; +import Sector from 'zrender/src/graphic/shape/Sector'; +import Line from 'zrender/src/graphic/shape/Line'; + +export default class OrdinaryDoor 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(); + } + create() { + this.grouper = new Group({ + id: this.model.code, + position: [this.model.point.x, this.model.point.y] + }); + this.sector1 = new Sector({ + zlevel: this.zlevel, + z: this.z, + shape: { + cx: this.model.point.x, + cy: this.model.point.y - this.model.r, + r: this.model.r, + startAngle: Math.PI / 2, + endAngle: Math.PI + }, + style: { + fill: 'rgba(0, 0, 0, 0)', + stroke: '#FFF', + lineWidth: 1 + } + }); + if (this.model.doorType === '1') { + this.createLine(this.model.r); + } else if (this.model.doorType === '2') { + this.createSector2(); + this.createLine(this.model.r * 2); + } else if (this.model.doorType === '3') { + this.createRect(this.model.r); + this.createLine(this.model.r); + } else if (this.model.doorType === '4') { + this.createSector2(); + this.createRect(this.model.r * 2); + this.createLine(this.model.r * 2); + } + } + createSector2() { + this.sector2 = new Sector({ + zlevel: this.zlevel, + z: this.z, + shape: { + cx: this.model.point.x + this.model.r * 2, + cy: this.model.point.y, + r: this.model.r, + startAngle: 0, + endAngle: Math.PI / 2 + }, + style: { + fill: 'rgba(0,0,0,0)', + stroke: '#FFF', + lineWidth: 1 + } + }); + this.grouper.add(this.sector2); + } + createLine(length) { + this.maskLine = new Line({ + zlevel: this.zlevel, + z: this.z, + shape: { + x1: this.model.point.x, + y1: this.model.point.y - this.model.r, + x2: this.model.point.x + length, + y2: this.model.point.y - this.model.r + }, + style: { + stroke: '#45607B', + lineWidth: 2 + } + }); + this.grouper.add(this.maskLine); + } + createRect(length) { + this.bottomRect = new Rect({ + zlevel: this.zlevel, + z: this.z, + shape: { + x: this.model.point.x, + y: this.model.point.y - this.model.r, + width: length, + height: this.model.r + }, + style: { + stroke: '#FFF', + lineWidth: 1, + fill: 'rgba(0, 0, 0, 0)' + } + }); + this.grouper.add(this.bottomRect); + } +} diff --git a/src/iscs/utils/parser.js b/src/iscs/utils/parser.js index f11c30280..9cf3fce92 100644 --- a/src/iscs/utils/parser.js +++ b/src/iscs/utils/parser.js @@ -184,6 +184,9 @@ export function parser(data) { zrUtil.each(data.iscsImageList || [], elem => { iscsDevice[elem.code] = deviceFactory(deviceType.IscsImage, elem); }); + zrUtil.each(data.ordinaryDoorList || [], elem => { + iscsDevice[elem.code] = deviceFactory(deviceType.OrdinaryDoor, elem); + }); } return iscsDevice; diff --git a/src/views/iscs/iscsDesign/demonList.vue b/src/views/iscs/iscsDesign/demonList.vue index 5af612c99..29048ee12 100644 --- a/src/views/iscs/iscsDesign/demonList.vue +++ b/src/views/iscs/iscsDesign/demonList.vue @@ -451,6 +451,102 @@ export default { ] } ] + }, + { + name: '自动售检票/门禁', + mode: '', + id: '', + type: '', + children: [ + { + name: '自动售检票系统', + mode: '', + id: '', + type: '' + }, + { + name: '门禁系统', + mode: '', + id: '', + type: '' + } + ] + }, + { + name: '火灾报警系统', + mode: '', + id: '', + type: '', + children: [ + { + name: '火灾报警系统-FAS联动', + mode: '', + id: '', + type: '' + }, + { + name: '火灾报警系统-站厅层', + mode: '', + id: '', + type: '' + }, + { + name: '火灾报警系统-站台层', + mode: '', + id: '', + type: '' + }, + { + name: '火灾报警系统-区间', + mode: '', + id: '', + type: '' + }, + { + name: '感温光纤探测系统', + mode: '', + id: '', + type: '' + }, + { + name: '气体灭火系统', + mode: '', + id: '', + type: '' + } + ] + }, + { + name: '信号系统', + mode: '', + id: '', + type: '', + children: [ + { + name: 'TIS管理器', + mode: '', + id: '', + type: '' + }, + { + name: '列车时刻表', + mode: '', + id: '', + type: '' + }, + { + name: '信号系统', + mode: '', + id: '', + type: '' + }, + { + name: '全线信号系统界面', + mode: '', + id: '', + type: '' + } + ] } ]; }, diff --git a/src/views/iscs/iscsDraw/IscsNetOperate/index.vue b/src/views/iscs/iscsDraw/IscsNetOperate/index.vue index 31714e05c..f07fa488c 100644 --- a/src/views/iscs/iscsDraw/IscsNetOperate/index.vue +++ b/src/views/iscs/iscsDraw/IscsNetOperate/index.vue @@ -50,6 +50,14 @@ @deleteDataModel="deleteDataModel" /> + + + @@ -62,6 +70,7 @@ import IscsButton from '../iscsCommonElem/button'; import IscsLine from '../iscsCommonElem/line'; import IscsText from '../iscsCommonElem/text'; import IscsRect from '../iscsCommonElem/rect'; +import OrdinaryDoor from '../iscsCommonElem/ordinaryDoor'; export default { name: 'IscsAcsOperate', @@ -70,7 +79,8 @@ export default { IscsButton, IscsLine, IscsText, - IscsRect + IscsRect, + OrdinaryDoor }, mixins: [ ], diff --git a/src/views/iscs/iscsDraw/iscsCommonElem/ordinaryDoor.vue b/src/views/iscs/iscsDraw/iscsCommonElem/ordinaryDoor.vue new file mode 100644 index 000000000..5b410dd7c --- /dev/null +++ b/src/views/iscs/iscsDraw/iscsCommonElem/ordinaryDoor.vue @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + {{ buttonText }} + 删除 + 取消 + + + + + + + + From f586cced67882b1bb33fdeeb01a8db6d4b1d3963 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 17 Sep 2020 09:50:52 +0800 Subject: [PATCH 2/2] =?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?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/competitionManage/theoryReview.vue | 1 - src/views/newMap/displayNew/demonMenu.vue | 4 + .../displayNew/dispatherContest/index.vue | 11 +- .../displayNew/dispatherContest/question.vue | 91 +++++ .../displayNew/dispatherContest/quiz.vue | 334 ++++++++++++++++++ 5 files changed, 437 insertions(+), 4 deletions(-) create mode 100644 src/views/newMap/displayNew/dispatherContest/question.vue create mode 100644 src/views/newMap/displayNew/dispatherContest/quiz.vue diff --git a/src/views/competitionManage/theoryReview.vue b/src/views/competitionManage/theoryReview.vue index efc2d4be4..f10a9ac53 100644 --- a/src/views/competitionManage/theoryReview.vue +++ b/src/views/competitionManage/theoryReview.vue @@ -27,7 +27,6 @@ + diff --git a/src/views/newMap/displayNew/dispatherContest/quiz.vue b/src/views/newMap/displayNew/dispatherContest/quiz.vue new file mode 100644 index 000000000..6edeb1c0d --- /dev/null +++ b/src/views/newMap/displayNew/dispatherContest/quiz.vue @@ -0,0 +1,334 @@ + + + + + + {{ formModel.name }} + {{ formModel.description }} + + + + + {{ index2UnicodeList[i] }}、{{ el.title }} + + + + + + 温馨提示:考试过程中请退出或关闭本页面不会终止计时! + {{ '剩余时间:'+countdownTime }} + + 提 交 + + + + + + + + +