openatc-components 0.0.102 → 0.0.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/kisscomps/components/BoardCard/BoardCard.vue +6 -1
- package/package/kisscomps/components/Channelization/Channelization.vue +13 -10
- package/package/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +18 -12
- package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +54 -69
- package/package/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +1 -4
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +11 -34
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +1 -26
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +18 -37
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +6 -0
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +28 -50
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +29 -53
- package/package/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +1 -4
- package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +147 -130
- package/package/kisscomps/components/DrawChannelization/drawsvg/index.vue +5 -6
- package/package/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +43 -144
- package/package/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +8 -52
- package/package/kisscomps/components/KanBan/kanban.vue +7 -7
- package/package/kisscomps/components/PatternStatus/PatternStatus.vue +153 -38
- package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +16 -0
- package/package/kisscomps/components/SchemeConfig/priorityControl/index.vue +190 -0
- package/package/kisscomps/components/SchemeConfig/priorityControl/utils.js +163 -0
- package/package/kisscomps/components/StageStatus/StageStatus.vue +6 -2
- package/package/kisscomps/components/patternList/patternList.vue +5 -0
- package/package/kisscomps/index.js +2 -0
- package/package/kissui.min.js +1 -1
- package/package.json +13 -12
- package/src/i18n/language/en.js +32 -7
- package/src/i18n/language/zh.js +31 -6
- package/src/kisscomps/components/BoardCard/BoardCard.vue +6 -1
- package/src/kisscomps/components/Channelization/Channelization.vue +13 -10
- package/src/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +18 -12
- package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +54 -69
- package/src/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +1 -4
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +11 -34
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +1 -26
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +18 -37
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +6 -0
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +28 -50
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +29 -53
- package/src/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +1 -4
- package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +147 -130
- package/src/kisscomps/components/DrawChannelization/drawsvg/index.vue +5 -6
- package/src/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +43 -144
- package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.check.vue +191 -0
- package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.syncOper.vue +331 -0
- package/src/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +8 -52
- package/src/kisscomps/components/KanBan/kanban.vue +7 -7
- package/src/kisscomps/components/PatternStatus/PatternStatus.vue +153 -38
- package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +16 -0
- package/src/kisscomps/components/SchemeConfig/priorityControl/index.vue +190 -0
- package/src/kisscomps/components/SchemeConfig/priorityControl/utils.js +163 -0
- package/src/kisscomps/components/StageStatus/StageStatus.vue +6 -2
- package/src/kisscomps/components/patternList/patternList.vue +5 -0
- package/src/kisscomps/index.js +2 -0
- package/src/router/index.js +2 -2
- package/src/views/intersection.vue +5 -3
- package/static/styles/channelizatioon.scss +2 -40
- package/static/styles/schemeconfig.scss +52 -0
- package/package/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +0 -113
- package/src/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +0 -113
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openatc-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.103",
|
|
4
4
|
"description": "A Vue.js project",
|
|
5
5
|
"author": "openatc developer",
|
|
6
6
|
"private": false,
|
|
@@ -21,24 +21,25 @@
|
|
|
21
21
|
"npm2yuanqu": "npm config set registry http://nexus.ctsp.kedacom.com/content/groups/npm-host-yuanqu/"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
+
"@minogin/vue-drag-resize-rotate": "^1.0.5",
|
|
25
|
+
"@openatc/edgebase-front": "^2.4.0",
|
|
26
|
+
"animate.css": "^3.7.2",
|
|
27
|
+
"axios": "0.21.1",
|
|
28
|
+
"echarts": "^4.9.0",
|
|
29
|
+
"element-ui": "^2.7.2",
|
|
24
30
|
"flatpickr": "^4.5.1",
|
|
25
31
|
"jquery": "^3.3.1",
|
|
32
|
+
"js-cookie": "2.2.0",
|
|
33
|
+
"localStorage": "^1.0.4",
|
|
34
|
+
"moment": "^2.24.0",
|
|
26
35
|
"pend": "^1.2.0",
|
|
36
|
+
"scss-loader": "0.0.1",
|
|
27
37
|
"v-tooltip": "^2.0.0-rc.33",
|
|
28
38
|
"vue": "^2.5.2",
|
|
29
|
-
"vue-router": "^3.0.1",
|
|
30
|
-
"element-ui": "^2.7.2",
|
|
31
|
-
"moment": "^2.24.0",
|
|
32
|
-
"axios": "0.21.1",
|
|
33
|
-
"js-cookie": "2.2.0",
|
|
34
|
-
"localStorage": "^1.0.4",
|
|
35
39
|
"vue-i18n": "^8.7.0",
|
|
36
|
-
"
|
|
37
|
-
"scss-loader": "0.0.1",
|
|
40
|
+
"vue-router": "^3.0.1",
|
|
38
41
|
"vuedraggable": "^2.16.0",
|
|
39
|
-
"
|
|
40
|
-
"echarts": "^4.9.0",
|
|
41
|
-
"@minogin/vue-drag-resize-rotate": "^1.0.5"
|
|
42
|
+
"vuex": "3.0.1"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
45
|
"autoprefixer": "^7.1.2",
|
package/src/i18n/language/en.js
CHANGED
|
@@ -129,6 +129,7 @@ const en = {
|
|
|
129
129
|
'phaseclose': 'Close Phase',
|
|
130
130
|
'phaselocking': 'Priority Control',
|
|
131
131
|
'tentativeplan': 'Tentative Plan',
|
|
132
|
+
'prioritycontrol': 'Priority Control',
|
|
132
133
|
'implement': 'Execute',
|
|
133
134
|
'comfirm': 'Comfirm',
|
|
134
135
|
'ipaddress': 'IP',
|
|
@@ -206,7 +207,34 @@ const en = {
|
|
|
206
207
|
'modelList22': 'Priority Control',
|
|
207
208
|
'modelList23': 'Close Phase',
|
|
208
209
|
'modelList100': 'Tentative Plan',
|
|
209
|
-
'modelList24': '
|
|
210
|
+
'modelList24': 'Priority Control',
|
|
211
|
+
'priorityType': 'Priority Type',
|
|
212
|
+
'priorityPhase': 'Priority Phase',
|
|
213
|
+
'typeOption0': 'Regular Priority',
|
|
214
|
+
'typeOption1': 'Urgent Priority',
|
|
215
|
+
'es': 'East-Straight',
|
|
216
|
+
'el': 'East-Left',
|
|
217
|
+
'er': 'East-Right',
|
|
218
|
+
'eb': 'East-Back',
|
|
219
|
+
'ws': 'West-Straight',
|
|
220
|
+
'wl': 'West-Left',
|
|
221
|
+
'wr': 'West-Right',
|
|
222
|
+
'wb': 'West-Back',
|
|
223
|
+
'ns': 'North-Straight',
|
|
224
|
+
'nl': 'North-Left',
|
|
225
|
+
'nr': 'North-Right',
|
|
226
|
+
'nb': 'North-Back',
|
|
227
|
+
'ss': 'South-Straight',
|
|
228
|
+
'sl': 'South-Left',
|
|
229
|
+
'sr': 'South-Right',
|
|
230
|
+
'sb': 'South-Back',
|
|
231
|
+
'level': 'Level',
|
|
232
|
+
'levelOption': 'LevelOption',
|
|
233
|
+
'levelOption1': '1',
|
|
234
|
+
'levelOption2': '2',
|
|
235
|
+
'levelOption3': '3',
|
|
236
|
+
'levelOption4': '4',
|
|
237
|
+
'levelOption5': '5',
|
|
210
238
|
'modelList99': 'Device Mantenance',
|
|
211
239
|
'tips': 'Tips',
|
|
212
240
|
'exitmanul': 'It is necessary to restore self-control before exiting. Do you want to exit?',
|
|
@@ -1156,7 +1184,6 @@ const en = {
|
|
|
1156
1184
|
'xpedestrian': 'X Pedestrian',
|
|
1157
1185
|
'sectionpedestrian': 'Section Pedestrian',
|
|
1158
1186
|
'delete': 'Delete',
|
|
1159
|
-
'clone': 'Clone',
|
|
1160
1187
|
'drawtips': 'Click add on the intersection map after selection',
|
|
1161
1188
|
'canclesetting': 'Cancel the channelization setting of the current intersection?',
|
|
1162
1189
|
'phaseassociated': 'Phase Associated',
|
|
@@ -1170,8 +1197,8 @@ const en = {
|
|
|
1170
1197
|
'pedestriandetector': 'Pedestrian Detector',
|
|
1171
1198
|
'detectorassociated': 'Detector Associated',
|
|
1172
1199
|
'detectorthreshold': 'Detector Threshold',
|
|
1173
|
-
'occupancythreshold': '
|
|
1174
|
-
'saturationthreshold': 'Flow Saturation
|
|
1200
|
+
'occupancythreshold': 'Occupancy threshold',
|
|
1201
|
+
'saturationthreshold': 'Flow Saturation threshold',
|
|
1175
1202
|
'checkthreshold': 'The threshold value cannot be blank. Please fill in a positive integer within the range of 0-100!',
|
|
1176
1203
|
'pedestriancrossing': 'Pedestrian crossing',
|
|
1177
1204
|
'pedestriansecondarycrossing': 'Pedestrian secondary crossing',
|
|
@@ -1179,9 +1206,7 @@ const en = {
|
|
|
1179
1206
|
'sectionpedestriancrossing': 'Section pedestrian crossing',
|
|
1180
1207
|
'flipdisplay': 'Flip display',
|
|
1181
1208
|
'vehiclelane': 'Vehicle lane',
|
|
1182
|
-
'sidewalk': 'Sidewalk'
|
|
1183
|
-
'angle': 'Angle',
|
|
1184
|
-
'basicinfo': 'Basic information'
|
|
1209
|
+
'sidewalk': 'Sidewalk'
|
|
1185
1210
|
}
|
|
1186
1211
|
}
|
|
1187
1212
|
}
|
package/src/i18n/language/zh.js
CHANGED
|
@@ -129,6 +129,34 @@ const zh = {
|
|
|
129
129
|
'phaseclose': '相位关断',
|
|
130
130
|
'phaselocking': '相位锁定',
|
|
131
131
|
'tentativeplan': '临时方案',
|
|
132
|
+
'prioritycontrol': '优先控制',
|
|
133
|
+
'priorityType': '优先类型',
|
|
134
|
+
'priorityPhase': '优先相位',
|
|
135
|
+
'typeOption0': '常规优先',
|
|
136
|
+
'typeOption1': '紧急优先',
|
|
137
|
+
'es': '东直行',
|
|
138
|
+
'el': '东左转',
|
|
139
|
+
'er': '东右转',
|
|
140
|
+
'eb': '东掉头',
|
|
141
|
+
'ws': '西直行',
|
|
142
|
+
'wl': '西左转',
|
|
143
|
+
'wr': '西右转',
|
|
144
|
+
'wb': '西掉头',
|
|
145
|
+
'ns': '北直行',
|
|
146
|
+
'nl': '北左转',
|
|
147
|
+
'nr': '北右转',
|
|
148
|
+
'nb': '北掉头',
|
|
149
|
+
'ss': '南直行',
|
|
150
|
+
'sl': '南左转',
|
|
151
|
+
'sr': '南右转',
|
|
152
|
+
'sb': '南掉头',
|
|
153
|
+
'level': '优先级',
|
|
154
|
+
'levelOption': 'levelOption',
|
|
155
|
+
'levelOption1': '1',
|
|
156
|
+
'levelOption2': '2',
|
|
157
|
+
'levelOption3': '3',
|
|
158
|
+
'levelOption4': '4',
|
|
159
|
+
'levelOption5': '5',
|
|
132
160
|
'implement': '执行',
|
|
133
161
|
'comfirm': '确定',
|
|
134
162
|
'ipaddress': 'IP地址',
|
|
@@ -206,7 +234,7 @@ const zh = {
|
|
|
206
234
|
'modelList22': '相位锁定',
|
|
207
235
|
'modelList23': '相位关断',
|
|
208
236
|
'modelList100': '临时方案',
|
|
209
|
-
'modelList24': '
|
|
237
|
+
'modelList24': '优先控制',
|
|
210
238
|
'modelList99': '设备维护',
|
|
211
239
|
'tips': '提示',
|
|
212
240
|
'exitmanul': '退出前需要先恢复自主控制, 是否退出?',
|
|
@@ -1155,7 +1183,6 @@ const zh = {
|
|
|
1155
1183
|
'xpedestrian': '斜向行人',
|
|
1156
1184
|
'sectionpedestrian': '路段行人',
|
|
1157
1185
|
'delete': '删除',
|
|
1158
|
-
'clone': '克隆',
|
|
1159
1186
|
'drawtips': '选择后在路口图上点击添加',
|
|
1160
1187
|
'canclesetting': '是否取消当前路口渠化设置?',
|
|
1161
1188
|
'phaseassociated': '相位关联',
|
|
@@ -1169,7 +1196,7 @@ const zh = {
|
|
|
1169
1196
|
'pedestriandetector': '行人检测器',
|
|
1170
1197
|
'detectorassociated': '检测器关联',
|
|
1171
1198
|
'detectorthreshold': '检测器阈值',
|
|
1172
|
-
'occupancythreshold': '
|
|
1199
|
+
'occupancythreshold': '占有率阈值',
|
|
1173
1200
|
'saturationthreshold': '流量饱和度阈值',
|
|
1174
1201
|
'checkthreshold': '阈值不可为空,请填0-100范围内的正整数!',
|
|
1175
1202
|
'pedestriancrossing': '行人过街',
|
|
@@ -1178,9 +1205,7 @@ const zh = {
|
|
|
1178
1205
|
'sectionpedestriancrossing': '路段行人过街',
|
|
1179
1206
|
'flipdisplay': '翻转显示',
|
|
1180
1207
|
'vehiclelane': '车道',
|
|
1181
|
-
'sidewalk': '人行道'
|
|
1182
|
-
'angle': '旋转角度',
|
|
1183
|
-
'basicinfo': '基础信息'
|
|
1208
|
+
'sidewalk': '人行道'
|
|
1184
1209
|
}
|
|
1185
1210
|
}
|
|
1186
1211
|
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
:patternStatusList="patternStatusList">
|
|
9
9
|
</StageStatus>
|
|
10
10
|
<PatternStatus
|
|
11
|
+
:showBarrier="showBarrier"
|
|
11
12
|
:localPatternList="localPatternList"
|
|
12
13
|
:contrloType="contrloType"
|
|
13
14
|
:stagesChange="stagesChange"
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
:phaseList="phaseList"
|
|
18
19
|
:cycle="cycle"
|
|
19
20
|
:syncTime="syncTime"
|
|
20
|
-
:style="{'margin-top':cycle ? '25px':'0'}"
|
|
21
|
+
:style="{'margin-top':(cycle || !showBarrier)? '25px':'0'}"
|
|
21
22
|
:patternStatusList="patternStatusList"
|
|
22
23
|
:patternId="patternId"
|
|
23
24
|
:cycles="cycles">
|
|
@@ -52,6 +53,10 @@ export default {
|
|
|
52
53
|
stagesChange: {
|
|
53
54
|
type: Array
|
|
54
55
|
},
|
|
56
|
+
showBarrier: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false
|
|
59
|
+
},
|
|
55
60
|
phaseList: {
|
|
56
61
|
type: Array
|
|
57
62
|
},
|
|
@@ -128,11 +128,6 @@ export default {
|
|
|
128
128
|
},
|
|
129
129
|
CrossMapVisible: true, // 控制底图显示隐藏
|
|
130
130
|
CrossMapData: {
|
|
131
|
-
x: 400,
|
|
132
|
-
y: 100,
|
|
133
|
-
w: 800,
|
|
134
|
-
h: 200,
|
|
135
|
-
angle: 0,
|
|
136
131
|
svgstr: '',
|
|
137
132
|
imgfilesrc: ''
|
|
138
133
|
}, // 管理底图数据
|
|
@@ -302,6 +297,19 @@ export default {
|
|
|
302
297
|
}
|
|
303
298
|
if (key === 'crossMap') {
|
|
304
299
|
this.CrossMapData = JSON.parse(JSON.stringify(value))
|
|
300
|
+
if (value.type === 'vectorgraph') {
|
|
301
|
+
// svg底图,只加载底图870*650区域范围内的元素
|
|
302
|
+
let { svgstr, ...allitem } = value
|
|
303
|
+
this.allitem = allitem
|
|
304
|
+
} else {
|
|
305
|
+
this.allitem = {
|
|
306
|
+
x: 435,
|
|
307
|
+
y: 325,
|
|
308
|
+
w: 870,
|
|
309
|
+
h: 650,
|
|
310
|
+
angle: 0
|
|
311
|
+
}
|
|
312
|
+
}
|
|
305
313
|
}
|
|
306
314
|
}
|
|
307
315
|
this.isSeletable = false
|
|
@@ -320,11 +328,6 @@ export default {
|
|
|
320
328
|
this.Pedwalk = []
|
|
321
329
|
this.Detector = []
|
|
322
330
|
this.CrossMapData = {
|
|
323
|
-
x: 400,
|
|
324
|
-
y: 100,
|
|
325
|
-
w: 800,
|
|
326
|
-
h: 200,
|
|
327
|
-
angle: 0,
|
|
328
331
|
svgstr: '',
|
|
329
332
|
imgfilesrc: ''
|
|
330
333
|
}
|
|
@@ -30,11 +30,9 @@
|
|
|
30
30
|
v-if="CrossMapVisible"
|
|
31
31
|
:UsageMode="UsageMode"
|
|
32
32
|
:CrossMapData="CrossMapData"
|
|
33
|
-
:isSeletable="
|
|
33
|
+
:isSeletable="isSeletable"
|
|
34
34
|
:pointchange="pointchange"
|
|
35
|
-
:chooseIndex="curChooseIconIndex"
|
|
36
35
|
@changeCrossMap="changeCrossMap"
|
|
37
|
-
@handleSelectIcon="handleSelectIcon"
|
|
38
36
|
/>
|
|
39
37
|
<!-- 机动车图标 -->
|
|
40
38
|
<div v-if="resetflag">
|
|
@@ -49,6 +47,18 @@
|
|
|
49
47
|
@handleSelectIcon="handleSelectIcon"
|
|
50
48
|
/>
|
|
51
49
|
</div>
|
|
50
|
+
|
|
51
|
+
<!-- 非机动车图标 -->
|
|
52
|
+
<!-- <BicyclelanesIconSvg
|
|
53
|
+
:UsageMode="UsageMode"
|
|
54
|
+
v-for="bicycleitem in Bicyclelanes"
|
|
55
|
+
:key="bicycleitem.index"
|
|
56
|
+
:chooseIndex="curChooseIconIndex"
|
|
57
|
+
:Data="bicycleitem"
|
|
58
|
+
:isSeletable="isSeletable"
|
|
59
|
+
@changeBicyclelaneItem="changeBicyclelaneItem"
|
|
60
|
+
@handleSelectIcon="handleSelectIcon"
|
|
61
|
+
/>-->
|
|
52
62
|
<!-- 文字图标 -->
|
|
53
63
|
<!-- <EditableText
|
|
54
64
|
:UsageMode="UsageMode"
|
|
@@ -95,16 +105,15 @@
|
|
|
95
105
|
@changeDetectorItem="changeDetectorItem"
|
|
96
106
|
@handleSelectIcon="handleSelectIcon"
|
|
97
107
|
/>
|
|
98
|
-
|
|
108
|
+
<DetectorChart
|
|
99
109
|
:UsageMode="UsageMode"
|
|
100
110
|
v-for="detchartitem in DetectorChart"
|
|
101
111
|
:key="'detectorchart-' + detchartitem.index"
|
|
102
112
|
:chooseIndex="curChooseIconIndex"
|
|
103
113
|
:DetectorChartData="detchartitem"
|
|
104
|
-
:Detector="Detector"
|
|
105
114
|
:isSeletable="isSeletable"
|
|
106
115
|
@changeDetectorChartItem="changeDetectorChartItem"
|
|
107
|
-
@handleSelectIcon="handleSelectIcon" />
|
|
116
|
+
@handleSelectIcon="handleSelectIcon" />
|
|
108
117
|
</drr>
|
|
109
118
|
</div>
|
|
110
119
|
</template>
|
|
@@ -124,6 +133,7 @@ export default {
|
|
|
124
133
|
CrossMap,
|
|
125
134
|
EditableText,
|
|
126
135
|
MotorwayIconSvg,
|
|
136
|
+
// BicyclelanesIconSvg,
|
|
127
137
|
CountdownIcon,
|
|
128
138
|
PedroadIconSvg,
|
|
129
139
|
DetectorIconSvg,
|
|
@@ -182,10 +192,6 @@ export default {
|
|
|
182
192
|
},
|
|
183
193
|
CurChooseIcon: {
|
|
184
194
|
type: Object
|
|
185
|
-
},
|
|
186
|
-
isLockedCrossMap: { // 是否锁定底图(是否允许编辑底图位置,角度等)
|
|
187
|
-
type: Boolean,
|
|
188
|
-
default: true
|
|
189
195
|
}
|
|
190
196
|
},
|
|
191
197
|
data () {
|
|
@@ -200,8 +206,8 @@ export default {
|
|
|
200
206
|
changeMotorwayItem (MotorwayItem, fields) {
|
|
201
207
|
this.$emit('changeMotorwayItem', MotorwayItem, fields)
|
|
202
208
|
},
|
|
203
|
-
handleSelectIcon (iconobj
|
|
204
|
-
this.$emit('handleSelectIcon', iconobj
|
|
209
|
+
handleSelectIcon (iconobj) {
|
|
210
|
+
this.$emit('handleSelectIcon', iconobj)
|
|
205
211
|
},
|
|
206
212
|
changeText (textobj, fields) {
|
|
207
213
|
this.$emit('changeText', textobj, fields)
|
|
@@ -12,30 +12,31 @@
|
|
|
12
12
|
<template>
|
|
13
13
|
<!-- 自定义底图 -->
|
|
14
14
|
<div class="cross-map-part" ref="crossmap">
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class="cross-map" :style="{'width': crossmapitem.w + 'px', 'height': crossmapitem.h + 'px'}" v-html="CrossMapData.svgstr"></div>
|
|
33
|
-
</div>
|
|
15
|
+
<div v-if="mapreset && CrossMapData.type === 'vectorgraph'">
|
|
16
|
+
<!-- 底图可缩放 -->
|
|
17
|
+
<!-- <drr
|
|
18
|
+
id="crossmapdrr"
|
|
19
|
+
:selectable="isSeletable"
|
|
20
|
+
:x="crossmapitem.x"
|
|
21
|
+
:y="crossmapitem.y"
|
|
22
|
+
:w="crossmapitem.w"
|
|
23
|
+
:h="crossmapitem.h"
|
|
24
|
+
:angle="crossmapitem.angle"
|
|
25
|
+
:aspectRatio="true"
|
|
26
|
+
@dragstop="mapDragStop(crossmapitem, ...arguments)"
|
|
27
|
+
@resizestop="mapResizeStop(crossmapitem, ...arguments)"
|
|
28
|
+
@rotatestop="mapRotateStop(crossmapitem, ...arguments)"
|
|
29
|
+
>
|
|
30
|
+
<div class="cross-map" v-html="CrossMapData.svgstr"></div>
|
|
31
|
+
</drr> -->
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
<!-- 底图取消操作 -->
|
|
34
|
+
<div class="cross-map" :style="{'width': crossmapitem.w + 'px', 'height': crossmapitem.h + 'px'}" v-html="CrossMapData.svgstr"></div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div v-if="mapreset && CrossMapData.type === 'picture'" class="cross-map">
|
|
38
|
+
<img height="100%" :src="CrossMapData.imgfilesrc">
|
|
39
|
+
</div>
|
|
39
40
|
</div>
|
|
40
41
|
</template>
|
|
41
42
|
|
|
@@ -54,9 +55,6 @@ export default {
|
|
|
54
55
|
isSeletable: {
|
|
55
56
|
type: Boolean
|
|
56
57
|
},
|
|
57
|
-
chooseIndex: {
|
|
58
|
-
type: Number
|
|
59
|
-
},
|
|
60
58
|
pointchange: {
|
|
61
59
|
type: Boolean
|
|
62
60
|
}
|
|
@@ -64,17 +62,26 @@ export default {
|
|
|
64
62
|
watch: {
|
|
65
63
|
CrossMapData: {
|
|
66
64
|
handler: function (val) {
|
|
67
|
-
this.crossmapitem
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
this.crossmapitem = {
|
|
66
|
+
x: 0,
|
|
67
|
+
y: 0,
|
|
68
|
+
w: 0,
|
|
69
|
+
h: 0,
|
|
70
|
+
angle: 0
|
|
71
|
+
}
|
|
72
72
|
if (val.type === 'vectorgraph') {
|
|
73
73
|
if (val.svgstr === '') {
|
|
74
74
|
this.mapreset = false
|
|
75
75
|
return
|
|
76
76
|
}
|
|
77
77
|
this.mapreset = true
|
|
78
|
+
this.crossmapitem = {
|
|
79
|
+
x: val.x,
|
|
80
|
+
y: val.y,
|
|
81
|
+
w: val.w,
|
|
82
|
+
h: val.h,
|
|
83
|
+
angle: val.angle
|
|
84
|
+
}
|
|
78
85
|
}
|
|
79
86
|
if (val.type === 'picture') {
|
|
80
87
|
if (val.imgfilesrc === undefined || val.imgfilesrc === '') {
|
|
@@ -83,13 +90,22 @@ export default {
|
|
|
83
90
|
}
|
|
84
91
|
this.mapreset = true
|
|
85
92
|
}
|
|
86
|
-
this.$nextTick(() => {
|
|
87
|
-
// 底图大小改变后,需要同步svg的宽高
|
|
88
|
-
this.synchroSVGSize()
|
|
89
|
-
})
|
|
90
93
|
},
|
|
91
94
|
deep: true
|
|
92
95
|
},
|
|
96
|
+
crossmapitem: {
|
|
97
|
+
handler: function (newval, oldval) {
|
|
98
|
+
if ((JSON.stringify(oldval) !== '{}') && !this.isEqual(newval, oldval)) {
|
|
99
|
+
// 更改原数据的位置大小数据
|
|
100
|
+
let data = {
|
|
101
|
+
...this.CrossMapData,
|
|
102
|
+
...newval
|
|
103
|
+
}
|
|
104
|
+
let fields = Object.keys(newval)
|
|
105
|
+
this.$emit('changeCrossMap', data, fields)
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
93
109
|
pointchange: {
|
|
94
110
|
handler: function (val) {
|
|
95
111
|
// 解决光标样式被选区样式覆盖问题
|
|
@@ -116,36 +132,17 @@ export default {
|
|
|
116
132
|
mapDragStop (origin, final) {
|
|
117
133
|
// 底图拖动停止
|
|
118
134
|
this.crossmapitem = JSON.parse(JSON.stringify(final))
|
|
119
|
-
this.handleChangeData()
|
|
120
|
-
},
|
|
121
|
-
synchroSVGSize () {
|
|
122
|
-
let svgdom = document.querySelector('.cross-map svg')
|
|
123
|
-
if (svgdom) {
|
|
124
|
-
// 解决svg源文件里有宽高属性,此时对svg父容器改变宽高,svg尺寸不会改变的问题
|
|
125
|
-
// 因此要修改svg文件的宽高属性
|
|
126
|
-
if (svgdom.getAttribute('width')) {
|
|
127
|
-
svgdom.setAttribute('width', this.crossmapitem.w + 'px')
|
|
128
|
-
}
|
|
129
|
-
if (svgdom.getAttribute('height')) {
|
|
130
|
-
svgdom.setAttribute('height', this.crossmapitem.h + 'px')
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
135
|
},
|
|
134
|
-
|
|
135
136
|
mapResizeStop (origin, final) {
|
|
136
137
|
// 底图改变大小停止
|
|
137
138
|
this.resetMapSvg()
|
|
138
139
|
this.crossmapitem = JSON.parse(JSON.stringify(final))
|
|
139
|
-
this.
|
|
140
|
-
this.
|
|
140
|
+
// this.$refs.crossmap.style.height = final.w + 'px'
|
|
141
|
+
// this.$refs.crossmap.style.width = final.h + 'px'
|
|
141
142
|
},
|
|
142
143
|
mapRotateStop (origin, final) {
|
|
143
144
|
// 底图旋转停止
|
|
144
|
-
this.crossmapitem = JSON.parse(JSON.stringify(final))
|
|
145
|
-
if (this.crossmapitem.angle < 0) {
|
|
146
|
-
this.crossmapitem.angle = this.crossmapitem.angle + 360
|
|
147
|
-
}
|
|
148
|
-
this.handleChangeData()
|
|
145
|
+
this.crossmapitem = JSON.parse(JSON.stringify(final))
|
|
149
146
|
},
|
|
150
147
|
resetMapSvg () {
|
|
151
148
|
// 重绘底图svg
|
|
@@ -169,18 +166,6 @@ export default {
|
|
|
169
166
|
}
|
|
170
167
|
}
|
|
171
168
|
return true
|
|
172
|
-
},
|
|
173
|
-
handleSelectIcon (iconparams) {
|
|
174
|
-
this.$emit('handleSelectIcon', this.CrossMapData, 'crossmap')
|
|
175
|
-
},
|
|
176
|
-
handleChangeData () {
|
|
177
|
-
let data = {
|
|
178
|
-
...this.CrossMapData,
|
|
179
|
-
...this.crossmapitem
|
|
180
|
-
}
|
|
181
|
-
let fields = Object.keys(this.crossmapitem)
|
|
182
|
-
this.$emit('changeCrossMap', data, fields)
|
|
183
|
-
this.handleSelectIcon()
|
|
184
169
|
}
|
|
185
170
|
}
|
|
186
171
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
**/
|
|
12
12
|
<template>
|
|
13
13
|
<div class="first-import-crossmap">
|
|
14
|
-
<ImportDialog ref="importDialog" @loadSvgString="loadSvgString"
|
|
14
|
+
<ImportDialog ref="importDialog" @loadSvgString="loadSvgString" />
|
|
15
15
|
<div class="import-btn">
|
|
16
16
|
<el-button type="primary" @click="clickOpen">{{$t('openatccomponents.channelizationmap.importpicture')}}</el-button>
|
|
17
17
|
<div class="tip">{{$t('openatccomponents.channelizationmap.importtip')}}</div>
|
|
@@ -39,9 +39,6 @@ export default {
|
|
|
39
39
|
},
|
|
40
40
|
loadSvgString (type, imgstr) {
|
|
41
41
|
this.$emit('loadSvgString', type, imgstr)
|
|
42
|
-
},
|
|
43
|
-
loadMapSize (type, mapsize) {
|
|
44
|
-
this.$emit('loadMapSize', type, mapsize)
|
|
45
42
|
}
|
|
46
43
|
},
|
|
47
44
|
mounted () {}
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
:selectable="isSeletable"
|
|
22
22
|
:angle="item.angle"
|
|
23
23
|
:aspectRatio="true"
|
|
24
|
-
:rotatable="false"
|
|
25
24
|
@select="handleSelectIcon(item)"
|
|
26
25
|
@dragstop="boxDragStop(item, ...arguments)"
|
|
27
26
|
@resizestop="boxResizeStop(item, ...arguments)"
|
|
@@ -59,28 +58,18 @@ export default {
|
|
|
59
58
|
}
|
|
60
59
|
},
|
|
61
60
|
watch: {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
// }
|
|
73
|
-
// }
|
|
74
|
-
// },
|
|
75
|
-
CountdownData: {
|
|
76
|
-
handler: function (val) {
|
|
77
|
-
if (this.UsageMode === 'draw') {
|
|
78
|
-
this.item.x = val.x
|
|
79
|
-
this.item.y = val.y
|
|
80
|
-
this.item.angle = val.angle
|
|
61
|
+
item: {
|
|
62
|
+
handler: function (newval, oldval) {
|
|
63
|
+
if ((JSON.stringify(oldval) !== '{}')) {
|
|
64
|
+
// 更改原数据的位置大小数据
|
|
65
|
+
let data = {
|
|
66
|
+
...this.CountdownData,
|
|
67
|
+
...newval
|
|
68
|
+
}
|
|
69
|
+
let fields = Object.keys(newval)
|
|
70
|
+
this.$emit('changeTimeItem', data, fields)
|
|
81
71
|
}
|
|
82
|
-
}
|
|
83
|
-
deep: true
|
|
72
|
+
}
|
|
84
73
|
},
|
|
85
74
|
CountdownList: {
|
|
86
75
|
handler: function (val) {
|
|
@@ -117,16 +106,13 @@ export default {
|
|
|
117
106
|
boxDragStop (origin, final) {
|
|
118
107
|
this.item = JSON.parse(JSON.stringify(final))
|
|
119
108
|
this.$emit('handleSelectIcon', this.CountdownData)
|
|
120
|
-
this.handleChangeData()
|
|
121
109
|
},
|
|
122
110
|
boxResizeStop (origin, final) {
|
|
123
111
|
this.resetSvg()
|
|
124
112
|
this.item = JSON.parse(JSON.stringify(final))
|
|
125
|
-
this.handleChangeData()
|
|
126
113
|
},
|
|
127
114
|
boxRotateStop (origin, final) {
|
|
128
115
|
this.item = JSON.parse(JSON.stringify(final))
|
|
129
|
-
this.handleChangeData()
|
|
130
116
|
},
|
|
131
117
|
resetSvg () {
|
|
132
118
|
this.reset = false
|
|
@@ -143,15 +129,6 @@ export default {
|
|
|
143
129
|
if (this.Fontsize < 14) {
|
|
144
130
|
this.Fontsize = 14
|
|
145
131
|
}
|
|
146
|
-
},
|
|
147
|
-
handleChangeData () {
|
|
148
|
-
let data = {
|
|
149
|
-
...this.CountdownData,
|
|
150
|
-
...this.item
|
|
151
|
-
}
|
|
152
|
-
let fields = Object.keys(this.item)
|
|
153
|
-
this.$emit('changeTimeItem', data, fields)
|
|
154
|
-
this.handleSelectIcon()
|
|
155
132
|
}
|
|
156
133
|
},
|
|
157
134
|
created () {
|