openatc-components 0.0.103 → 0.0.104
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/Channelization/Channelization.vue +10 -13
- package/package/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +349 -0
- package/package/kisscomps/components/ChannelizationFlowStatistic/index.js +2 -0
- package/package/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +113 -0
- package/package/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +24 -18
- package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +72 -54
- package/package/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +4 -1
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +56 -14
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +26 -1
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +37 -18
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +0 -6
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +50 -28
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +53 -29
- package/package/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +4 -1
- package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +213 -164
- package/package/kisscomps/components/DrawChannelization/drawsvg/index.vue +6 -5
- package/package/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +144 -43
- package/package/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +52 -8
- package/package/kisscomps/index.js +2 -0
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/i18n/language/en.js +6 -3
- package/src/i18n/language/zh.js +5 -2
- package/src/kisscomps/components/Channelization/Channelization.vue +10 -13
- package/src/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +349 -0
- package/src/kisscomps/components/ChannelizationFlowStatistic/index.js +2 -0
- package/src/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +113 -0
- package/src/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +24 -18
- package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +72 -54
- package/src/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +4 -1
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +56 -14
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +26 -1
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +37 -18
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +0 -6
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +50 -28
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +53 -29
- package/src/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +4 -1
- package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +213 -164
- package/src/kisscomps/components/DrawChannelization/drawsvg/index.vue +6 -5
- package/src/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +144 -43
- package/src/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +52 -8
- package/src/kisscomps/index.js +2 -0
- package/src/router/index.js +9 -10
- package/src/views/customchannelization.vue +1 -1
- package/src/views/intersection.vue +67 -45
- package/src/views/schemeconfig.vue +2 -2
- package/static/styles/channelizatioon.scss +49 -2
- package/static/styles/commonkanban.scss +27 -27
- package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.check.vue +0 -191
- package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.syncOper.vue +0 -331
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<template>
|
|
14
14
|
<div class="custom-cross-part draw-channelization">
|
|
15
15
|
<FirstImportCrossmap v-if="pageindex === 1"
|
|
16
|
-
@loadSvgString="loadSvgString" />
|
|
16
|
+
@loadSvgString="loadSvgString" @loadMapSize="loadMapSize" />
|
|
17
17
|
<CustomDraw v-show="pageindex === 2" ref="CustomDraw"
|
|
18
18
|
:AgentId="AgentId"
|
|
19
19
|
:loadedChannelizatonData="loadedChannelizatonData"
|
|
@@ -23,10 +23,7 @@
|
|
|
23
23
|
<script>
|
|
24
24
|
import FirstImportCrossmap from './firstImportCrossmap'
|
|
25
25
|
import CustomDraw from './index.draw'
|
|
26
|
-
// import { mapState } from 'vuex'
|
|
27
|
-
// import { getIframdevid } from '../../../../utils/auth.js'
|
|
28
26
|
import { getChannelizatonChart } from '../../../../api/cross'
|
|
29
|
-
// import { getMessageByCode } from '../../../utils/responseMessage.js'
|
|
30
27
|
|
|
31
28
|
export default {
|
|
32
29
|
name: 'custom-channelization',
|
|
@@ -72,8 +69,12 @@ export default {
|
|
|
72
69
|
this.$refs.CustomDraw.loadSvgString(type, imgstr)
|
|
73
70
|
})
|
|
74
71
|
},
|
|
72
|
+
loadMapSize (type, mapsize) {
|
|
73
|
+
this.$nextTick(() => {
|
|
74
|
+
this.$refs.CustomDraw.loadMapSize(type, mapsize)
|
|
75
|
+
})
|
|
76
|
+
},
|
|
75
77
|
getChannelizatonChart () {
|
|
76
|
-
// let agentid = getIframdevid()
|
|
77
78
|
let _this = this
|
|
78
79
|
_this.pageindex = 1
|
|
79
80
|
getChannelizatonChart(this.AgentId).then(data => {
|
|
@@ -64,13 +64,6 @@
|
|
|
64
64
|
|
|
65
65
|
<div class="phase-associated">
|
|
66
66
|
<div class="tittle">{{$t('openatccomponents.channelizationmap.phaseassociated')}}</div>
|
|
67
|
-
<!-- 相位可以编辑,增加,删除,校验 -->
|
|
68
|
-
<!-- <PhaseAssociatedComponentCheck
|
|
69
|
-
ref="phaseAssociated"
|
|
70
|
-
:editData="Data"
|
|
71
|
-
:Motorways="Motorways"
|
|
72
|
-
@selectPhase="selectPhase"
|
|
73
|
-
@handleDisassociatePhase="handleDisassociatePhase" /> -->
|
|
74
67
|
<!-- 相位仅可以关联选择,不可修改 -->
|
|
75
68
|
<PhaseAssociatedComponent
|
|
76
69
|
:editData="Data"
|
|
@@ -115,12 +108,6 @@
|
|
|
115
108
|
</div>
|
|
116
109
|
<div class="phase-associated">
|
|
117
110
|
<div class="tittle">{{$t('openatccomponents.channelizationmap.phaseassociated')}}</div>
|
|
118
|
-
<!-- 相位可以编辑,增加,删除,校验 -->
|
|
119
|
-
<!-- <PhaseAssociatedComponentCheck
|
|
120
|
-
ref="phaseAssociated"
|
|
121
|
-
:editData="Data"
|
|
122
|
-
@selectPhase="selectPhase"
|
|
123
|
-
@handleDisassociatePhase="handleDisassociatePhase" /> -->
|
|
124
111
|
<!-- 相位仅可以关联选择,不可修改 -->
|
|
125
112
|
<PhaseAssociatedComponent
|
|
126
113
|
:editData="Data"
|
|
@@ -135,6 +122,12 @@
|
|
|
135
122
|
|
|
136
123
|
<!-- 检测器编辑面板 -->
|
|
137
124
|
<div class="detector" v-if="Data.icontype === 'detector' && Data.detailtype === 'detector'">
|
|
125
|
+
<div class="edit-id">
|
|
126
|
+
<span style="margin-right: 3px;">
|
|
127
|
+
{{$t('openatccomponents.channelizationmap.detector') + ':'}}
|
|
128
|
+
</span>
|
|
129
|
+
<span>{{Data.id}}</span>
|
|
130
|
+
</div>
|
|
138
131
|
<div class="detector-type">
|
|
139
132
|
<div class="tittle">{{$t('openatccomponents.channelizationmap.detectortype')}}</div>
|
|
140
133
|
<div class="each-icon" v-for="(item, index) in detectortypeList" :key="index">
|
|
@@ -160,40 +153,71 @@
|
|
|
160
153
|
<el-form-item
|
|
161
154
|
:label="$t('openatccomponents.channelizationmap.occupancythreshold') + ':'"
|
|
162
155
|
prop="intersection">
|
|
163
|
-
<el-input-number :min="0" :max="100" :precision="0" :step="1" :controls="false"
|
|
156
|
+
<!-- <el-input-number :min="0" :max="100" :precision="0" :step="1" :controls="false"
|
|
164
157
|
:value="occupancythreshold" size="mini"
|
|
165
158
|
@change="handleChangeOccuthreshold" />
|
|
166
|
-
<span class="detector-threshold-formtext">%</span>
|
|
159
|
+
<span class="detector-threshold-formtext">%</span> -->
|
|
160
|
+
<el-select :value="occupancythreshold" @change="handleChangeOccuthreshold">
|
|
161
|
+
<el-option
|
|
162
|
+
v-for="item in occupResholdOptions"
|
|
163
|
+
:key="item.value"
|
|
164
|
+
:label="item.label"
|
|
165
|
+
:value="item.value">
|
|
166
|
+
</el-option>
|
|
167
|
+
</el-select>
|
|
167
168
|
</el-form-item>
|
|
168
169
|
<el-form-item
|
|
169
170
|
:label="$t('openatccomponents.channelizationmap.saturationthreshold') + ':'"
|
|
170
171
|
prop="count">
|
|
171
|
-
<el-input-number :min="0" :max="100" :precision="0" :step="1" :controls="false"
|
|
172
|
+
<!-- <el-input-number :min="0" :max="100" :precision="0" :step="1" :controls="false"
|
|
172
173
|
:value="flowsaturationthreshold" size="mini"
|
|
173
174
|
@change="handleChangeFlowthreshold" />
|
|
174
|
-
<span class="detector-threshold-formtext">%</span>
|
|
175
|
+
<span class="detector-threshold-formtext">%</span> -->
|
|
176
|
+
<el-select :value="minflowsaturationthreshold" @change="handleChangeMinFlowthreshold">
|
|
177
|
+
<el-option
|
|
178
|
+
v-for="item in minflowResholdOptions"
|
|
179
|
+
:key="item.value"
|
|
180
|
+
:label="item.label"
|
|
181
|
+
:value="item.value"
|
|
182
|
+
:disabled="item.disabled">
|
|
183
|
+
</el-option>
|
|
184
|
+
</el-select>
|
|
185
|
+
<span class="flow-separator">-</span>
|
|
186
|
+
<el-select :value="maxflowsaturationthreshold" @change="handleChangeMaxFlowthreshold">
|
|
187
|
+
<el-option
|
|
188
|
+
v-for="item in maxflowResholdOptions"
|
|
189
|
+
:key="item.value"
|
|
190
|
+
:label="item.label"
|
|
191
|
+
:value="item.value"
|
|
192
|
+
:disabled="item.disabled">
|
|
193
|
+
</el-option>
|
|
194
|
+
</el-select>
|
|
175
195
|
</el-form-item>
|
|
176
196
|
</el-form>
|
|
177
197
|
</div>
|
|
178
198
|
</div>
|
|
179
|
-
|
|
199
|
+
<div class="basic-coord" v-if="JSON.stringify(Data) !== '{}' && Data.icontype !== 'countdown' && Data.icontype !== 'crossmap'">
|
|
200
|
+
<div class="tittle">{{$t('openatccomponents.channelizationmap.basicinfo')}}</div>
|
|
201
|
+
<BasicCoordInfo :drawingObjInfo="Data" @handleChangeBasicCoord="handleChangeBasicCoord" />
|
|
202
|
+
</div>
|
|
180
203
|
<div class="delete-drawed-item" v-if="JSON.stringify(Data) !== '{}' && Data.detailtype !== 'detectorChart'">
|
|
181
|
-
<el-button type="primary" @click="handledelete">{{$t('openatccomponents.channelizationmap.delete')}}</el-button>
|
|
204
|
+
<el-button type="primary" @click="handledelete" v-if="Data.icontype !== 'crossmap'">{{$t('openatccomponents.channelizationmap.delete')}}</el-button>
|
|
205
|
+
<el-button type="primary" @click="handleClone" v-if="Data.icontype !== 'countdown' && Data.icontype !== 'crossmap'">{{$t('openatccomponents.channelizationmap.clone')}}</el-button>
|
|
182
206
|
</div>
|
|
183
207
|
</div>
|
|
184
208
|
</template>
|
|
185
209
|
<script>
|
|
186
|
-
import PhaseAssociatedComponentCheck from './phaseAssociatedComponent.check'
|
|
187
210
|
import PhaseAssociatedComponent from './phaseAssociatedComponent.vue'
|
|
188
211
|
import OverlapAssociatedComponent from './overlapAssociatedComponent'
|
|
189
212
|
import DetectorAssociatedComponent from './detectorAssociatedComponent.vue'
|
|
213
|
+
import BasicCoordInfo from './basicCoordInfo'
|
|
190
214
|
export default {
|
|
191
215
|
name: 'lane-edit-panel',
|
|
192
216
|
components: {
|
|
193
217
|
PhaseAssociatedComponent,
|
|
194
|
-
PhaseAssociatedComponentCheck,
|
|
195
218
|
OverlapAssociatedComponent,
|
|
196
|
-
DetectorAssociatedComponent
|
|
219
|
+
DetectorAssociatedComponent,
|
|
220
|
+
BasicCoordInfo
|
|
197
221
|
},
|
|
198
222
|
data () {
|
|
199
223
|
return {
|
|
@@ -373,8 +397,12 @@ export default {
|
|
|
373
397
|
iconclass: 'custom-peddetector',
|
|
374
398
|
name: this.$t('openatccomponents.channelizationmap.pedestriandetector')
|
|
375
399
|
}],
|
|
400
|
+
occupResholdOptions: [],
|
|
401
|
+
minflowResholdOptions: [],
|
|
402
|
+
maxflowResholdOptions: [],
|
|
376
403
|
occupancythreshold: 80,
|
|
377
|
-
|
|
404
|
+
minflowsaturationthreshold: 30,
|
|
405
|
+
maxflowsaturationthreshold: 70
|
|
378
406
|
}
|
|
379
407
|
},
|
|
380
408
|
watch: {
|
|
@@ -394,8 +422,11 @@ export default {
|
|
|
394
422
|
if (data.occupancythreshold !== undefined) {
|
|
395
423
|
this.occupancythreshold = data.occupancythreshold
|
|
396
424
|
}
|
|
397
|
-
if (data.
|
|
398
|
-
this.
|
|
425
|
+
if (data.minflowsaturationthreshold !== undefined) {
|
|
426
|
+
this.minflowsaturationthreshold = data.minflowsaturationthreshold
|
|
427
|
+
}
|
|
428
|
+
if (data.maxflowsaturationthreshold !== undefined) {
|
|
429
|
+
this.maxflowsaturationthreshold = data.maxflowsaturationthreshold
|
|
399
430
|
}
|
|
400
431
|
if (data.flip !== undefined) {
|
|
401
432
|
this.flip = data.flip
|
|
@@ -425,7 +456,6 @@ export default {
|
|
|
425
456
|
this.iconObj.icondireid.splice(index, 1)
|
|
426
457
|
}
|
|
427
458
|
this.$emit('handleChooseDire', this.iconObj)
|
|
428
|
-
// this.handleAssociatedPhase()
|
|
429
459
|
},
|
|
430
460
|
selectLanetype (id) {
|
|
431
461
|
this.iconObj.controltype = id
|
|
@@ -447,8 +477,9 @@ export default {
|
|
|
447
477
|
if (value === 2) {
|
|
448
478
|
// 行人检测器没有阈值设置
|
|
449
479
|
this.iconObj.occupancythreshold = undefined
|
|
450
|
-
this.iconObj.
|
|
451
|
-
this
|
|
480
|
+
this.iconObj.minflowsaturationthreshold = undefined
|
|
481
|
+
this.iconObj.maxflowsaturationthreshold = undefined
|
|
482
|
+
this.$emit('changeIconDataByType', this.iconObj, ['occupancythreshold', 'minflowsaturationthreshold', 'maxflowsaturationthreshold'])
|
|
452
483
|
}
|
|
453
484
|
},
|
|
454
485
|
selectPedPos (value) {
|
|
@@ -461,7 +492,6 @@ export default {
|
|
|
461
492
|
selectLanePos (value) {
|
|
462
493
|
this.iconObj.lanePosition = value
|
|
463
494
|
this.$emit('changeIconDataByType', this.iconObj, ['lanePosition'])
|
|
464
|
-
// this.handleAssociatedPhase()
|
|
465
495
|
},
|
|
466
496
|
selectPhase (phaseid, direction) {
|
|
467
497
|
// 关联相位的同时,会修改相位方向
|
|
@@ -485,12 +515,6 @@ export default {
|
|
|
485
515
|
handleDisassociatePhase (deletePhaseid) {
|
|
486
516
|
this.$emit('handleDisassociatePhase', deletePhaseid)
|
|
487
517
|
},
|
|
488
|
-
// handleAssociatedPhase () {
|
|
489
|
-
// // 如果已关联相位,再改变车道转向或者方位时,需要同步更新选中的关联相位
|
|
490
|
-
// if (this.iconObj.phaseid !== undefined) {
|
|
491
|
-
// this.$refs.phaseAssociated.changeDirection(this.iconObj)
|
|
492
|
-
// }
|
|
493
|
-
// },
|
|
494
518
|
selectAssociatedDetector (detectorid) {
|
|
495
519
|
// 仅关联检测器,不修改
|
|
496
520
|
this.iconObj.detectorid = detectorid
|
|
@@ -506,15 +530,53 @@ export default {
|
|
|
506
530
|
this.iconObj.occupancythreshold = occupancythreshold
|
|
507
531
|
this.$emit('changeIconDataByType', this.iconObj, ['occupancythreshold'])
|
|
508
532
|
},
|
|
509
|
-
|
|
510
|
-
if (
|
|
533
|
+
handleChangeMinFlowthreshold (minflowsaturationthreshold) {
|
|
534
|
+
if (minflowsaturationthreshold === undefined) {
|
|
511
535
|
this.$message.error(this.$t('openatccomponents.channelizationmap.checkthreshold'))
|
|
512
|
-
this.
|
|
536
|
+
this.minflowsaturationthreshold = 30
|
|
513
537
|
return
|
|
514
538
|
}
|
|
515
|
-
this.
|
|
516
|
-
this.iconObj.
|
|
517
|
-
this.$emit('changeIconDataByType', this.iconObj, ['
|
|
539
|
+
this.minflowsaturationthreshold = minflowsaturationthreshold
|
|
540
|
+
this.iconObj.minflowsaturationthreshold = minflowsaturationthreshold
|
|
541
|
+
this.$emit('changeIconDataByType', this.iconObj, ['minflowsaturationthreshold'])
|
|
542
|
+
this.handleDisabledMaxflowOption()
|
|
543
|
+
},
|
|
544
|
+
handleDisabledMinflowOption () {
|
|
545
|
+
// 此处需要排他,恢复上次置灰到默认值
|
|
546
|
+
this.minflowResholdOptions = this.minflowResholdOptions.map(option => ({
|
|
547
|
+
label: option.label,
|
|
548
|
+
value: option.value
|
|
549
|
+
}))
|
|
550
|
+
// 控制流量饱和度最小阈值的禁用范围
|
|
551
|
+
for (let i = 0; i < this.minflowResholdOptions.length; i++) {
|
|
552
|
+
if (this.minflowResholdOptions[i].value >= this.maxflowsaturationthreshold) {
|
|
553
|
+
this.minflowResholdOptions[i].disabled = true
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
handleChangeMaxFlowthreshold (maxflowsaturationthreshold) {
|
|
558
|
+
if (maxflowsaturationthreshold === undefined) {
|
|
559
|
+
this.$message.error(this.$t('openatccomponents.channelizationmap.checkthreshold'))
|
|
560
|
+
this.maxflowsaturationthreshold = 70
|
|
561
|
+
return
|
|
562
|
+
}
|
|
563
|
+
this.maxflowsaturationthreshold = maxflowsaturationthreshold
|
|
564
|
+
this.iconObj.maxflowsaturationthreshold = maxflowsaturationthreshold
|
|
565
|
+
this.$emit('changeIconDataByType', this.iconObj, ['maxflowsaturationthreshold'])
|
|
566
|
+
this.handleDisabledMinflowOption()
|
|
567
|
+
},
|
|
568
|
+
handleDisabledMaxflowOption () {
|
|
569
|
+
// 此处需要排他,恢复上次置灰到默认值
|
|
570
|
+
this.maxflowResholdOptions = this.maxflowResholdOptions.map(option => ({
|
|
571
|
+
label: option.label,
|
|
572
|
+
value: option.value
|
|
573
|
+
}))
|
|
574
|
+
// 控制流量饱和度最大阈值的禁用范围
|
|
575
|
+
for (let i = 0; i < this.maxflowResholdOptions.length; i++) {
|
|
576
|
+
if (this.maxflowResholdOptions[i].value <= this.minflowsaturationthreshold) {
|
|
577
|
+
this.maxflowResholdOptions[i].disabled = true
|
|
578
|
+
}
|
|
579
|
+
}
|
|
518
580
|
},
|
|
519
581
|
getCurPedPosList (iconpedtypeid) {
|
|
520
582
|
// 方位根据行人类型显示
|
|
@@ -532,8 +594,44 @@ export default {
|
|
|
532
594
|
handleChangeFilp (value) {
|
|
533
595
|
this.iconObj.flip = value
|
|
534
596
|
this.$emit('changeIconDataByType', this.iconObj, ['flip'])
|
|
597
|
+
},
|
|
598
|
+
createResholdSelectOptions () {
|
|
599
|
+
for (let i = 5; i < 100; i = i + 5) {
|
|
600
|
+
let option = {
|
|
601
|
+
label: i + '%',
|
|
602
|
+
value: i
|
|
603
|
+
}
|
|
604
|
+
this.occupResholdOptions.push(option)
|
|
605
|
+
if (i <= this.minflowsaturationthreshold) {
|
|
606
|
+
option.disabled = true
|
|
607
|
+
}
|
|
608
|
+
this.maxflowResholdOptions.push(option)
|
|
609
|
+
}
|
|
610
|
+
for (let i = 5; i < 100; i = i + 5) {
|
|
611
|
+
let option = {
|
|
612
|
+
label: i + '%',
|
|
613
|
+
value: i
|
|
614
|
+
}
|
|
615
|
+
if (i >= this.maxflowsaturationthreshold) {
|
|
616
|
+
option.disabled = true
|
|
617
|
+
}
|
|
618
|
+
this.minflowResholdOptions.push(option)
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
handleChangeBasicCoord (basicCoord) {
|
|
622
|
+
// 基础信息面板修改
|
|
623
|
+
this.iconObj.x = basicCoord.x
|
|
624
|
+
this.iconObj.y = basicCoord.y
|
|
625
|
+
this.iconObj.angle = basicCoord.angle
|
|
626
|
+
this.$emit('changeIconDataByType', this.iconObj, ['x', 'y', 'angle'])
|
|
627
|
+
},
|
|
628
|
+
handleClone () {
|
|
629
|
+
this.$emit('cloneItem', this.iconObj)
|
|
535
630
|
}
|
|
536
631
|
},
|
|
632
|
+
created () {
|
|
633
|
+
this.createResholdSelectOptions()
|
|
634
|
+
},
|
|
537
635
|
mounted () {
|
|
538
636
|
if (JSON.stringify(this.Data) === '{}') return
|
|
539
637
|
this.iconObj = JSON.parse(JSON.stringify(this.Data))
|
|
@@ -549,8 +647,11 @@ export default {
|
|
|
549
647
|
if (this.Data.occupancythreshold !== undefined) {
|
|
550
648
|
this.occupancythreshold = this.Data.occupancythreshold
|
|
551
649
|
}
|
|
552
|
-
if (this.Data.
|
|
553
|
-
this.
|
|
650
|
+
if (this.Data.minflowsaturationthreshold !== undefined) {
|
|
651
|
+
this.minflowsaturationthreshold = this.Data.minflowsaturationthreshold
|
|
652
|
+
}
|
|
653
|
+
if (this.Data.maxflowsaturationthreshold !== undefined) {
|
|
654
|
+
this.maxflowsaturationthreshold = this.Data.maxflowsaturationthreshold
|
|
554
655
|
}
|
|
555
656
|
if (this.Data.flip !== undefined) {
|
|
556
657
|
this.flip = this.Data.flip
|
|
@@ -10,10 +10,11 @@
|
|
|
10
10
|
* See the Mulan PSL v2 for more details.
|
|
11
11
|
**/
|
|
12
12
|
export default class Svgmethods {
|
|
13
|
-
clickOpen (call) {
|
|
13
|
+
clickOpen (call, call2) {
|
|
14
14
|
const file = document.getElementById('importimg').files[0]
|
|
15
15
|
const filetype = file.type
|
|
16
16
|
const reader = new FileReader()
|
|
17
|
+
const reader2 = new FileReader()
|
|
17
18
|
const filesize = file.size
|
|
18
19
|
if (filetype !== 'image/svg+xml' && filetype !== 'image/png' && filetype !== 'image/jpeg') {
|
|
19
20
|
call('error', 'type')
|
|
@@ -24,20 +25,63 @@ export default class Svgmethods {
|
|
|
24
25
|
return
|
|
25
26
|
}
|
|
26
27
|
if (filetype === 'image/svg+xml') {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
|
|
28
|
+
reader2.readAsDataURL(file)
|
|
29
|
+
reader2.addEventListener('load', async (readerEvent) => {
|
|
30
|
+
const imageSrc = readerEvent.target.result
|
|
31
|
+
// 调用计算图片大小的方法
|
|
32
|
+
calculateImageSize(imageSrc).then(function ({width, height}) {
|
|
33
|
+
// 通过ES6的结构赋值来得到图片的宽和高
|
|
34
|
+
let svgsize = {
|
|
35
|
+
width,
|
|
36
|
+
height
|
|
37
|
+
}
|
|
38
|
+
call2('vectorgraph', svgsize)
|
|
39
|
+
reader.readAsText(file, 'UTF-8')
|
|
40
|
+
reader.addEventListener('load', async (readerEvent) => {
|
|
41
|
+
const content = readerEvent.target.result
|
|
42
|
+
call('vectorgraph', content)
|
|
43
|
+
})
|
|
44
|
+
})
|
|
31
45
|
})
|
|
32
46
|
}
|
|
33
47
|
if (filetype === 'image/png' || filetype === 'image/jpeg') {
|
|
34
48
|
reader.readAsDataURL(file)
|
|
35
49
|
reader.addEventListener('load', async (readerEvent) => {
|
|
36
50
|
// 图片的 base64 格式, 可以直接当成 img 的 src 属性值
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
51
|
+
const imageSrc = readerEvent.target.result
|
|
52
|
+
// 调用计算图片大小的方法
|
|
53
|
+
calculateImageSize(imageSrc).then(function ({width, height}) {
|
|
54
|
+
// 通过ES6的结构赋值来得到图片的宽和高
|
|
55
|
+
let pngsize = {
|
|
56
|
+
width,
|
|
57
|
+
height
|
|
58
|
+
}
|
|
59
|
+
call2('picture', pngsize)
|
|
60
|
+
const _base64 = reader.result
|
|
61
|
+
const content = _base64
|
|
62
|
+
call('picture', content)
|
|
63
|
+
})
|
|
40
64
|
})
|
|
41
65
|
}
|
|
42
66
|
}
|
|
43
67
|
}
|
|
68
|
+
|
|
69
|
+
// 根据图片地址获取图片的宽和高
|
|
70
|
+
const calculateImageSize = function (url) {
|
|
71
|
+
return new Promise(function (resolve, reject) {
|
|
72
|
+
const image = document.createElement('img')
|
|
73
|
+
image.addEventListener('load', function (e) {
|
|
74
|
+
resolve({
|
|
75
|
+
width: e.target.width,
|
|
76
|
+
height: e.target.height
|
|
77
|
+
})
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
image.addEventListener('error', function () {
|
|
81
|
+
console.log('error')
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
// 将图片的url地址添加到图片地址中
|
|
85
|
+
image.src = url
|
|
86
|
+
})
|
|
87
|
+
}
|
|
@@ -5,6 +5,7 @@ import IntersectionMap from './components/IntersectionMap/index'
|
|
|
5
5
|
import SchemeConfig from './components/SchemeConfig/index'
|
|
6
6
|
import lockingPhaselControlModal from './components/SchemeConfig/lockingPhaselControlModal/index'
|
|
7
7
|
import Channelization from './components/Channelization/index'
|
|
8
|
+
import ChannelizationFlowStatistic from './components/ChannelizationFlowStatistic/index'
|
|
8
9
|
import DrawChannelization from './components/DrawChannelization/index'
|
|
9
10
|
import FaultDetailModal from './components/FaultDetailModal/index'
|
|
10
11
|
import CommonKanban from './components/CommonKanban/index'
|
|
@@ -37,6 +38,7 @@ const components = {
|
|
|
37
38
|
SchemeConfig,
|
|
38
39
|
lockingPhaselControlModal,
|
|
39
40
|
Channelization,
|
|
41
|
+
ChannelizationFlowStatistic,
|
|
40
42
|
DrawChannelization,
|
|
41
43
|
FaultDetailModal,
|
|
42
44
|
PatternStatus,
|