diff --git a/src/views/map/mapdraft/mapedit/mapoperate/stationcontrol.vue b/src/views/map/mapdraft/mapedit/mapoperate/stationcontrol.vue
index 09d9d1c02..a765c7c70 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/stationcontrol.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/stationcontrol.vue
@@ -74,7 +74,8 @@ export default {
zakContent: '',
jjzkContent: '',
zbjkContent: '',
- zzkContent: ''
+ zzkContent: '',
+ lskContent: ''
},
addModel: {
stationCode: ''
@@ -104,11 +105,12 @@ export default {
name: this.$t('map.drawData'),
item: [
{ prop: 'code', label: this.$t('map.stationControlCode'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.stationControlList, change: true, deviceChange: this.deviceChange },
- { prop: 'name', label: this.$t('map.stationControlName'), type: 'input' },
+ // { prop: 'name', label: this.$t('map.stationControlName'), type: 'input' },
{ prop: 'zokContent', label: this.$t('map.zokContent'), type: 'input' },
{ prop: 'zakContent', label: this.$t('map.zakContent'), type: 'input' },
{ prop: 'jjzkContent', label: this.$t('map.jjzkContent'), type: 'input' },
{ prop: 'zzkContent', label: this.$t('map.zzkContent'), type: 'input' },
+ { prop: 'lskContent', label: `${this.$t('map.interconnected')}:`, type: 'input' },
{ prop: 'position', label: this.$t('map.stationControlPosition'), type: 'coordinate', width: '150px', children: [
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
@@ -184,6 +186,7 @@ export default {
this.editModel.zakContent = selected.zakContent;
this.editModel.jjzkContent = selected.jjzkContent;
this.editModel.zzkContent = selected.zzkContent;
+ this.editModel.lskContent = selected.lskContent;
this.editModel.stationCode = selected.stationCode;
this.editModel.zbjkContent = selected.zbjkContent;
if (selected.hasOwnProperty('position')) {
@@ -208,7 +211,8 @@ export default {
zbjkContent: '总报警',
zakContent: '站控',
jjzkContent: '紧急站控',
- zzkContent: '站中控按钮'
+ zzkContent: '站中控按钮',
+ lskContent: '连锁控'
};
this.stationList.forEach(elem => {
if (elem.code === this.addModel.stationCode) {
@@ -241,6 +245,7 @@ export default {
zbjkContent: this.editModel.zbjkContent,
zakContent: this.editModel.zakContent,
jjzkContent: this.editModel.jjzkContent,
+ lskContent: this.editModel.lskContent,
zzkContent: this.editModel.zzkContent,
stationCode: this.editModel.stationCode,
position: {
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/switch.vue b/src/views/map/mapdraft/mapedit/mapoperate/switch.vue
index 8623b8d64..4af5bd0d3 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/switch.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/switch.vue
@@ -86,12 +86,16 @@ export default {
const list = [];
if (this.sectionList && this.sectionList.length) {
this.sectionList.forEach(elem => {
- if (elem.type === '01') {
- list.push({
- label: elem.name,
- key: elem.code,
- pinyin: elem.name
- });
+ if (elem.type === '01' && elem.isSwitchSection) {
+ const link = this.findLinkData(elem.linkCode);
+ if ((link.leftFdCode && link.leftSdCode) || (link.rightFdCode && link.rightSdCode)) {
+ list.push({
+ label: elem.name,
+ key: elem.code,
+ pinyin: elem.name
+ });
+ }
+
}
});
}
From feac5e0e79ff9cf19c561165217e5e2fdc92b4bf Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Tue, 27 Aug 2019 18:35:10 +0800
Subject: [PATCH 2/8] =?UTF-8?q?=E8=81=94=E5=8A=A8=E5=85=81=E8=AE=B8?=
=?UTF-8?q?=E7=A6=81=E6=AD=A2=E6=8F=90=E7=A4=BA=20=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/assets/ibp_images/rotate_black.png | Bin 0 -> 1330 bytes
src/assets/ibp_images/rotate_red.png | Bin 0 -> 1701 bytes
src/ibp/shape/rotateTip.js | 68 +++++++++++++++++++++++++
3 files changed, 68 insertions(+)
create mode 100644 src/assets/ibp_images/rotate_black.png
create mode 100644 src/assets/ibp_images/rotate_red.png
create mode 100644 src/ibp/shape/rotateTip.js
diff --git a/src/assets/ibp_images/rotate_black.png b/src/assets/ibp_images/rotate_black.png
new file mode 100644
index 0000000000000000000000000000000000000000..cc24ab15f815056ec8c5b5c0c8d69149094dff6e
GIT binary patch
literal 1330
zcmV-21
Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXf1jk84K~#8N?VC#|
zv|kv&&ydE93AxL)Op?gLLbk{ymyK*#p_G!Pg=8ZsJCu~IvQj8=*|9)2atRAlF5`Z`
zo5A~kpYuI`KIXia8UFKq=lK8X>3z;Ib6)2;&$&G3oH0l;k-CYs}F`NYCi*?k0D4cjV^ghV=IKVy-qqdWOMZKgwv-;OMT{Y&Is2;Ietys!C+!|wWaFAI^
zcVu{Y7)$#Fw*x2)nrhReUVg7Wmjh^XbMvU%goJ|^Me
z;rtonPlPLj&fp>F@6+xw*OI@$nIJ2yr+ZBqkRFj2;1^hG{VWQTnt1Hx$@%Q&fjg2tI&@-TFE!%}L#_jDbYRW)ltHzJ=
zjKIJ^)Yu4PjEjp4)Rgh_^Fxizj~YO=5XKmnmzSuq`Fwo9LKtIc?R15PhN7m7Fvd7P
zKSzyCL_`E?$_QhO)6-Mb*hEG~qNa=x#&~^wC5MNHm}2u|Jmc)_3^ir6PSXG(jIpw^
zf|@e1v9YKrBZM*5*Vj=~2EueLgfPbP@-k}5c(t3rY1N-%c6JsuW%PK)w`}e-H8n{E
z1qGP$E=x;G%#EDS;&eLk8_Imi7^9=3Qb)D`~55V`T6+C@4?}4NOB}9&CSh8Jv}{AWo4z5
zoSe*jx0Y;eZDFbEXdV?TE-unjYq&3^hHMNnIXOwa=jG)Ej7*owAfQ7&Y|(?jl|*P^
zxTguNyT89rc6N5i?(Qx*Iy$2FuORQ~=?P2s9Oxo?rd|pdg9WroadEMWm6gO`Fi2*z
zS&}Qr{QI90xiPUu+AxjL($c~#m^UdYDZv`)+6|?^CWqBc~~3I_%LS3)0&i-naO<7
z-z>2Hn3Y}Toql4a((L+E$0I^!F
zba4fD9zfu%0*Zflc%V;6L#WR>7ljjYxWNmD!*C2392`vdEkPjsPDn_gyH&Cm=nKa^
z0gR!Byn>YEfXt<3K1*q7DSm@rGy^qgP57#>PR~J3`&dSQ7X{XakpFHESF#s6#VUuTKVuD0R
oM`JF(aC<}ezu-%rAr^%E1D1Ol_R^Sor~m)}07*qoM6N<$f|GZAOaK4?
literal 0
HcmV?d00001
diff --git a/src/assets/ibp_images/rotate_red.png b/src/assets/ibp_images/rotate_red.png
new file mode 100644
index 0000000000000000000000000000000000000000..0e7994d2d79a20ebbd90fe4a03b780940ed28559
GIT binary patch
literal 1701
zcmV;W23q-vP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXf20BSZK~#8N?VDRj
z)L9(Ie{=UTqm|cHOT}ni+*Nzf3>Rua2!f!eUb;}dMnx381l=ftD2VLYpeT@Dd#T6p
zIugrbJGfVAU$Pe5L#N|C2a^R$oSc_V8N%Wtu0ca5g~m@aCsSea&y6Ew}XTh
z(%91j_Pu-gr^*N^$Y4tgEWdpV#_Vhe`~6_BSfI({;h!oa+>lx9?S+N@ekKM%V)z#q
z;qOO}SXm9>EM&mpfN&tdgoqLjg~0#$Gqh@Gs!$d()7}n#^cnGD5C)?WO!yo-c`{O=
zfKV3FZ7_fZohb>h7HXys#cKKV2`q($yfzVGEM)A&31$V!#2^ePmK80>wQnDkgsrJh3}!O~P?YK0w|UKKbZ;R}iYS<ZGGGSH~Y_=D}aP#;$*s7{{rH(CxdY5`REiniZ(`HKu!@9JP<-tL4
z*4M*YH%jXlrQt)qBZR&q9tl%zM+X$2I>pMm6vTb^F8C%V!DzMenur*4ot+>}PbU?H
z#4w^ol$<%UN|bOg$evXX9~|xsgw+sB5E=>!f~ZaH384gGzClJ1@*(CeTX;zxu`Fa|g{^9nLKd>w1PRU0
z%MTf}5L13WFUTX5AOTvz%1qQKl$y70jT96R%R(^84jIH!P{4EY2qlObrp;s_fw?)5
zw~fe<*;E$7rtCZ~hq<(r=j0Ja5HBv{m0%X4u-hI*96?+zbqgse;W>GP5rnn`l=eo*
zLQMR4Qwd=NSs5CV-3y^T3A&^lABp)mMb}K*q0J
z0aI=+uStY_NLFnvFDbJwL57bUfq@-6Kytf*b~oir_G{tC|Le5d!9ttMDiJ2Pp&?RG
zAuU1N_wTc-2mii!0akn=+PvLpCa+(IzVdPwO4SakXd5~Iz=23Xg_H#Gba#UjO>^SX
zC3X+P{@W)^9%m5ZD=8MXM&ueo**G;#!A;ND{tORTMQ!6hm4Iye8|+)H|;~{
zwOQ!KM6smk;6d1h6GbDw^LmhvGS8pG$kC%LpHh^;M6CKg<=2#BQ*CM(e=_Kak&3+*
zJu$_~^f6C_qp=YRaeh&D`7#U7nLt*MC==(;!{oz<+U6nHJ9K_ZjR<+YF>zRZJsEA!!bJ--QAkUWD7$bK+4SK9Sj)@VZN8Wj)iLW5gs^Sj
v4!hsKhaWmRSTxZ)nxf2RV%-)Z76AVN{N18S$9(JT00000NkvXXu0mjf0^t=}
literal 0
HcmV?d00001
diff --git a/src/ibp/shape/rotateTip.js b/src/ibp/shape/rotateTip.js
new file mode 100644
index 000000000..5c1540487
--- /dev/null
+++ b/src/ibp/shape/rotateTip.js
@@ -0,0 +1,68 @@
+import Group from 'zrender/src/container/Group';
+import Image from 'zrender/src/graphic/Image';
+import rotateBlack from '@/assets/ibp_images/rotate_black.png';
+import rotateRed from '@/assets/ibp_images/rotate_red.png';
+
+export default class rotateTip extends Group {
+
+ constructor(device) {
+ super();
+ this.model = device.model;
+ this.zlevel = device.model.zlevel;
+ this.create();
+ }
+
+ create() {
+ const model = this.model;
+ this.imageBg = new Image({
+ zlevel: this.zlevel,
+ draggable: model.draggable || false,
+ style: {
+ image: this.getRotateColor(),
+ x: model.point.x,
+ y: model.point.y,
+ width: 70,
+ height: 74
+ }
+ });
+ this.add(this.imageBg);
+ }
+
+ getRotateColor() {
+ if (this.model.color) {
+ switch (this.model.color) {
+ case 'black': {
+ return rotateBlack;
+ }
+ case 'red': {
+ return rotateRed;
+ }
+ }
+ } else {
+ return rotateBlack;
+ }
+ }
+
+ setDraggable() {
+ this.arrow.attr('draggable', true);
+ this.createMouseEvent();
+ }
+ createMouseEvent() {
+ this.on('mousedown', this.mousedown, this);
+ this.on('mousemove', this.mousemove, this);
+ this.on('mouseup', this.mouseup, this);
+ }
+
+ mousedown(e) {
+ this.event.disable();
+ }
+
+ mousemove(e) {
+ }
+
+ mouseup(e) {
+ this.event.enable();
+ this.model.point.x = this.model.point.x + e.offsetX;
+ this.model.point.y = this.model.point.y + e.offsetY;
+ }
+}
From a3b43e1e439a9bfc4a6e3b780352cb9f8abe027b Mon Sep 17 00:00:00 2001
From: ival <610568032@qq.com>
Date: Wed, 28 Aug 2019 09:55:40 +0800
Subject: [PATCH 3/8] =?UTF-8?q?=E9=99=90=E5=88=B6=E5=B9=B3=E5=B1=80?=
=?UTF-8?q?=E6=8B=96=E5=8A=A8=E8=8C=83=E5=9B=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/ibp/ibpPan.js | 4 +-
src/ibp/painter.js | 2 +-
src/ibp/transformHandle.js | 20 ++-
src/router/index.js | 14 +-
.../ibp/ibpDraft/ibpEdit/ibpOperate/index.vue | 165 ++++++++----------
src/views/ibp/ibpDraft/ibpEdit/index.vue | 112 ++++++------
src/views/ibp/ibpDraft/index.vue | 107 ++++++------
7 files changed, 212 insertions(+), 212 deletions(-)
diff --git a/src/ibp/ibpPan.js b/src/ibp/ibpPan.js
index f1c6f5a17..dd357bdc2 100644
--- a/src/ibp/ibpPan.js
+++ b/src/ibp/ibpPan.js
@@ -60,12 +60,11 @@ class IbpPan {
return defaultStateDict;
}
setMap(config, ibpDevice) {
- // 保存皮肤类型
+ // 保存平移缩放数据
if (config.config) {
this.$options.scaleRate = config.scaling;
this.$options.offsetX = config.origin.x;
this.$options.offsetY = config.origin.y;
- this.$painter.updateTransform({ scaleRate: config.scaling, offsetX: config.origin.x, offsetY: config.origin.y });
}
// 保存原始数据
@@ -86,6 +85,7 @@ class IbpPan {
// 视图加载完成 回调
if (this.methods.viewLoaded instanceof Function) { this.methods.viewLoaded(this.ibpDevice); }
+ this.$painter.updateTransform(this.$options);
}
setDefaultState() {
diff --git a/src/ibp/painter.js b/src/ibp/painter.js
index 126c11508..edcb09bf0 100644
--- a/src/ibp/painter.js
+++ b/src/ibp/painter.js
@@ -112,7 +112,7 @@ class Painter {
* 更新transform变化
* @param {*} opt
*/
- updateTransform(opt,) {
+ updateTransform(opt) {
this.$transformHandle.updateTransform(opt);
}
diff --git a/src/ibp/transformHandle.js b/src/ibp/transformHandle.js
index 055aed10c..7bac831b2 100644
--- a/src/ibp/transformHandle.js
+++ b/src/ibp/transformHandle.js
@@ -33,7 +33,6 @@ class TransformHandle {
view.decomposeTransform();
this.revisibleView(view);
}
- // return view;
}
// 处理所有视图缩放/平移
@@ -48,6 +47,25 @@ class TransformHandle {
// 更新偏移量
updateTransform(opts) {
+ const elRect = this.parentLevel.getBoundingRect();
+ const zrRect = this.rect;
+
+ if (elRect.x - opts.offsetX > 0) {
+ opts.offsetX = -elRect.x;
+ }
+
+ if (elRect.y - opts.offsetY > 0) {
+ opts.offsetY = -elRect.y;
+ }
+
+ if (elRect.x + elRect.width < zrRect.width) {
+ opts.offsetX -= zrRect.width - (elRect.x + elRect.width);
+ }
+
+ if (elRect.y + elRect.height < zrRect.height) {
+ opts.offsetY -= zrRect.height - (elRect.y + elRect.height);
+ }
+
this.transform = createTransform(opts);
this.transformAll();
}
diff --git a/src/router/index.js b/src/router/index.js
index da4dea946..3a238ba75 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -382,13 +382,13 @@ export const asyncRouter = [
}
]
},
- // {
- // path: 'ibp/edit',
- // component: IbpEdit,
- // meta: {
- // i18n: 'router.ibpDraw'
- // }
- // },
+ {
+ path: 'ibp/edit',
+ component: IbpEdit,
+ meta: {
+ i18n: 'router.ibpDraw'
+ }
+ },
{
path: 'runPlan',
redirect: '/map/runPlan/view/draft',
diff --git a/src/views/ibp/ibpDraft/ibpEdit/ibpOperate/index.vue b/src/views/ibp/ibpDraft/ibpEdit/ibpOperate/index.vue
index 9a2e70cd1..1e06b7d61 100644
--- a/src/views/ibp/ibpDraft/ibpEdit/ibpOperate/index.vue
+++ b/src/views/ibp/ibpDraft/ibpEdit/ibpOperate/index.vue
@@ -1,104 +1,89 @@
-
-
-
-
+
+
+
+
车站名称
请选择车站
- 保存
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
保存
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ibp/ibpDraft/ibpEdit/index.vue b/src/views/ibp/ibpDraft/ibpEdit/index.vue
index eb7f642bb..44a2ea3ef 100644
--- a/src/views/ibp/ibpDraft/ibpEdit/index.vue
+++ b/src/views/ibp/ibpDraft/ibpEdit/index.vue
@@ -1,67 +1,65 @@
-
-
-
+
+
+