diff --git a/src/iscs/constant/deviceRender.js b/src/iscs/constant/deviceRender.js index 957468530..3eec24c79 100644 --- a/src/iscs/constant/deviceRender.js +++ b/src/iscs/constant/deviceRender.js @@ -183,13 +183,13 @@ deviceRender[deviceType.IscsRect] = { zlevel:1, z: 3 }; -/** 电梯 */ +/** 楼梯 */ deviceRender[deviceType.Escalator] = { _type: deviceType.Escalator, zlevel:1, z: 4 }; -/** 楼梯 */ +/** 通道 */ deviceRender[deviceType.StairControl] = { _type: deviceType.StairControl, zlevel:1, @@ -202,4 +202,11 @@ deviceRender[deviceType.FasBrakeMachine] = { z: 4 }; +/** 扶梯 */ +deviceRender[deviceType.Staircase] = { + _type: deviceType.Staircase, + zlevel:1, + z: 4 +}; + export default deviceRender; diff --git a/src/iscs/constant/deviceType.js b/src/iscs/constant/deviceType.js index 4b1456d7f..5178168be 100644 --- a/src/iscs/constant/deviceType.js +++ b/src/iscs/constant/deviceType.js @@ -30,7 +30,8 @@ const deviceType = { IscsRect: 'IscsRect', Escalator:'Escalator', StairControl:'StairControl', - FasBrakeMachine:'FasBrakeMachine' + FasBrakeMachine:'FasBrakeMachine', + Staircase:'Staircase' }; export default deviceType; diff --git a/src/iscs/shape/components/pathsvg.js b/src/iscs/shape/components/pathsvg.js index 0f2fc1bdc..00a7fb5cb 100644 --- a/src/iscs/shape/components/pathsvg.js +++ b/src/iscs/shape/components/pathsvg.js @@ -51,6 +51,10 @@ const map = { FasBrakeMachine:{ width:65, path:'M0,29V21H1.474L9,14.732v-0.7L1.474,7.869H0V0H65V7.869H31.669L22,14.339v0.083L31.669,21H65v8H0ZM62,5.9V1.967H3V5.9H62ZM28.113,7.869H4.53l6,4.918H20.764ZM20.764,16H10.533l-6,5H28.113ZM62,23H3v4H62V23Z' + }, + Staircase:{ + width:133, + path:'M12,131l25-11v8H97v6H37v8ZM3,186V155H132V108H3V77H17V47H10V41h7V24H3V4H136V186H3ZM132,8H7V20H132V8ZM28,41V24H21V41h7Zm-7,6V77h7V47H21Zm19-6V24H32V41h8Zm-8,6V77h8V47H32Zm19-6V24H44V41h7Zm-7,6V77h7V47H44Zm19-6V24H55V41h8Zm-8,6V77h8V47H55Zm15-6V33l4,1.76V24H67V41h3Zm-3,6V77h7V53.24L70,55V47H67Zm19-6.96V24H78V36.52ZM78,51.48V77h8V47.96ZM90,46.2V77h7V24H90V41.8L95,44ZM101,24V77h7V24h-7Zm11,0V77h8V24h-8Zm20,0h-8V77h8V24Zm0,57H7v6H132V81Zm0,10H7v4H132V91Zm0,8H7v5H132V99Zm0,60H7v6H132v-6Zm0,10H7v4H132v-4Zm0,8H7v5H132v-5Z' } }; diff --git a/src/iscs/shape/factory.js b/src/iscs/shape/factory.js index 96fca593d..22bafb4a1 100644 --- a/src/iscs/shape/factory.js +++ b/src/iscs/shape/factory.js @@ -31,6 +31,7 @@ import IscsRect from './rect'; import Escalator from './escalator'; import StairControl from './stairControl'; import FasBrakeMachine from './fasBrakeMachine'; +import Staircase from './staircase'; const iscsShape = {}; iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton; @@ -66,6 +67,7 @@ iscsShape[deviceType.IscsRect] = IscsRect; iscsShape[deviceType.Escalator] = Escalator; iscsShape[deviceType.StairControl] = StairControl; iscsShape[deviceType.FasBrakeMachine] = FasBrakeMachine; +iscsShape[deviceType.Staircase] = Staircase; function shapefactory(device, iscs) { const type = device.model._type; diff --git a/src/iscs/shape/staircase.js b/src/iscs/shape/staircase.js new file mode 100644 index 000000000..707a8ab04 --- /dev/null +++ b/src/iscs/shape/staircase.js @@ -0,0 +1,31 @@ +import Group from 'zrender/src/container/Group'; +import createPathSvg from './components/pathsvg'; + +export default class Staircase 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.path = createPathSvg(this.model); + this.add(this.grouper); + if (this.model.isRight) { + this.grouper.origin = [this.model.width / 2, this.model.width * 1.368 / 2]; + this.grouper.scale = [-1, 1]; + } + this.grouper.add(this.path); + } + setModel(dx, dy) { + this.model.point.x += dx; + this.model.point.y += dy; + } +} diff --git a/src/iscs/utils/parser.js b/src/iscs/utils/parser.js index f6bdcfa1e..6d6b44be8 100644 --- a/src/iscs/utils/parser.js +++ b/src/iscs/utils/parser.js @@ -139,6 +139,9 @@ export function parser(data) { zrUtil.each(data.fasBrakeMachineList || [], elem=> { iscsDevice[elem.code] = deviceFactory(deviceType.FasBrakeMachine, elem); }); + zrUtil.each(data.staircaseList || [], elem=> { + iscsDevice[elem.code] = deviceFactory(deviceType.Staircase, elem); + }); } @@ -258,6 +261,9 @@ export function updateIscsData(state, device) { case deviceType.FasBrakeMachine: updateIscsListByDevice(state, 'fasBrakeMachineList', device); break; + case deviceType.Staircase: + updateIscsListByDevice(state, 'staircaseList', device); + break; } // store.dispatch('iscs/setIscsData', state.iscs); } diff --git a/src/views/iscs/iscsDraw/iscsOperate/index.vue b/src/views/iscs/iscsDraw/iscsOperate/index.vue index eb121f108..4e37ea345 100644 --- a/src/views/iscs/iscsDraw/iscsOperate/index.vue +++ b/src/views/iscs/iscsDraw/iscsOperate/index.vue @@ -34,7 +34,7 @@ @deleteDataModel="deleteDataModel" /> - + - + + + + +
+ + + + + + + + + + + + + + + + + + {{ buttonText }} + {{ $t('global.delete') }} + {{ $t('global.cancel') }} + + +
+ + + + + diff --git a/src/views/iscs/iscsDraw/iscsPsdOperate/index.vue b/src/views/iscs/iscsDraw/iscsPsdOperate/index.vue index 1741ec77d..f5767c33d 100644 --- a/src/views/iscs/iscsDraw/iscsPsdOperate/index.vue +++ b/src/views/iscs/iscsDraw/iscsPsdOperate/index.vue @@ -103,7 +103,6 @@ export default { } }, mounted() { - this.$emit('iscsChange', this.$route.params.id); }, beforeDestroy() {