openatc-components 0.0.97 → 0.0.100
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/DrawChannelization/drawsvg/basicCoordInfo.vue +113 -0
- package/package/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +11 -18
- package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +74 -54
- package/package/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +4 -1
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +34 -11
- 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 +130 -147
- 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 +45 -1
- package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +0 -16
- package/package/kisscomps/index.js +0 -2
- package/package/kissui.min.js +1 -1
- package/package.json +12 -13
- package/src/i18n/language/en.js +7 -32
- package/src/i18n/language/zh.js +6 -31
- package/src/kisscomps/components/Channelization/Channelization.vue +10 -13
- package/src/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +113 -0
- package/src/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +11 -18
- package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +74 -54
- package/src/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +4 -1
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +34 -11
- 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 +130 -147
- 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 +45 -1
- package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +0 -16
- package/src/kisscomps/index.js +0 -2
- package/src/router/index.js +2 -2
- package/static/styles/channelizatioon.scss +40 -2
- package/static/styles/schemeconfig.scss +0 -52
- package/package/kisscomps/components/SchemeConfig/priorityControl/index.vue +0 -190
- package/package/kisscomps/components/SchemeConfig/priorityControl/utils.js +0 -163
- package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.check.vue +0 -191
- package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.syncOper.vue +0 -331
- package/src/kisscomps/components/SchemeConfig/priorityControl/index.vue +0 -190
- package/src/kisscomps/components/SchemeConfig/priorityControl/utils.js +0 -163
|
@@ -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')
|
|
@@ -29,6 +30,19 @@ export default class Svgmethods {
|
|
|
29
30
|
const content = readerEvent.target.result
|
|
30
31
|
call('vectorgraph', content)
|
|
31
32
|
})
|
|
33
|
+
reader2.readAsDataURL(file)
|
|
34
|
+
reader2.addEventListener('load', async (readerEvent) => {
|
|
35
|
+
const imageSrc = readerEvent.target.result
|
|
36
|
+
// 调用计算图片大小的方法
|
|
37
|
+
calculateImageSize(imageSrc).then(function ({width, height}) {
|
|
38
|
+
// 通过ES6的结构赋值来得到图片的宽和高
|
|
39
|
+
let svgsize = {
|
|
40
|
+
width,
|
|
41
|
+
height
|
|
42
|
+
}
|
|
43
|
+
call2('vectorgraph', svgsize)
|
|
44
|
+
})
|
|
45
|
+
})
|
|
32
46
|
}
|
|
33
47
|
if (filetype === 'image/png' || filetype === 'image/jpeg') {
|
|
34
48
|
reader.readAsDataURL(file)
|
|
@@ -37,7 +51,37 @@ export default class Svgmethods {
|
|
|
37
51
|
const _base64 = reader.result
|
|
38
52
|
const content = _base64
|
|
39
53
|
call('picture', content)
|
|
54
|
+
const imageSrc = readerEvent.target.result
|
|
55
|
+
// 调用计算图片大小的方法
|
|
56
|
+
calculateImageSize(imageSrc).then(function ({width, height}) {
|
|
57
|
+
// 通过ES6的结构赋值来得到图片的宽和高
|
|
58
|
+
let pngsize = {
|
|
59
|
+
width,
|
|
60
|
+
height
|
|
61
|
+
}
|
|
62
|
+
call2('picture', pngsize)
|
|
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
|
+
}
|
|
@@ -69,12 +69,6 @@
|
|
|
69
69
|
@closePhaseBack="closePhaseBack"
|
|
70
70
|
@closePhaseControl="closePhaseControl"
|
|
71
71
|
/>
|
|
72
|
-
<priorityControl
|
|
73
|
-
v-if="specialPage === 'prioritycontrol'"
|
|
74
|
-
:phaseList="phaseList"
|
|
75
|
-
@closePhaseBack="closePhaseBack"
|
|
76
|
-
@closePhaseControl="closePhaseControl"
|
|
77
|
-
/>
|
|
78
72
|
</div>
|
|
79
73
|
</transition>
|
|
80
74
|
|
|
@@ -116,7 +110,6 @@ import ManualControlModal from './manualControlModal'
|
|
|
116
110
|
import ClosePhaseControlModal from './closePhaselControlModal'
|
|
117
111
|
import LockingPhaseControlModal from './lockingPhaselControlModal'
|
|
118
112
|
import TentativePlanControlModal from './tentativeplancontrolmodal'
|
|
119
|
-
import priorityControl from './priorityControl'
|
|
120
113
|
// import { getFaultMesZh, getFaultMesEn } from '../../utils/faultcode.js'
|
|
121
114
|
import { getMessageByCode } from '../../../utils/responseMessage'
|
|
122
115
|
import { GetAllFaultRange } from '../../../api/fault'
|
|
@@ -132,7 +125,6 @@ export default {
|
|
|
132
125
|
ManualControlModal,
|
|
133
126
|
ClosePhaseControlModal,
|
|
134
127
|
LockingPhaseControlModal,
|
|
135
|
-
priorityControl,
|
|
136
128
|
TentativePlanControlModal
|
|
137
129
|
},
|
|
138
130
|
props: {
|
|
@@ -300,9 +292,6 @@ export default {
|
|
|
300
292
|
}, {
|
|
301
293
|
id: 100,
|
|
302
294
|
iconClass: 'tentativeplan'
|
|
303
|
-
}, {
|
|
304
|
-
id: 24,
|
|
305
|
-
iconClass: 'tentativeplan'
|
|
306
295
|
}],
|
|
307
296
|
phaseRings: [],
|
|
308
297
|
curFaultList: [],
|
|
@@ -631,11 +620,6 @@ export default {
|
|
|
631
620
|
this.isClosePhase = true
|
|
632
621
|
this.phaseRings = ringDataModel.initRingPhaseData()
|
|
633
622
|
this.specialPage = 'tentativeplan'
|
|
634
|
-
} else if (id === 24) {
|
|
635
|
-
this.toPage = 3
|
|
636
|
-
this.isClosePhase = true
|
|
637
|
-
this.phaseRings = ringDataModel.initRingPhaseData()
|
|
638
|
-
this.specialPage = 'prioritycontrol'
|
|
639
623
|
} else {
|
|
640
624
|
this.isClosePhase = false
|
|
641
625
|
this.specialPage = ''
|
|
@@ -21,7 +21,6 @@ import StageBord from './components/StageBord/index'
|
|
|
21
21
|
import ExpendConfig from './components/ExpendConfig/index'
|
|
22
22
|
import PatternWalkSvg from './components/PatternWalkSvg/index'
|
|
23
23
|
import tentativeplancontrolmodal from './components/SchemeConfig/tentativeplancontrolmodal/index'
|
|
24
|
-
import priorityControl from './components/SchemeConfig/priorityControl/index'
|
|
25
24
|
import { setToken, setHost } from '../utils/auth.js'
|
|
26
25
|
import componentsGlobalParam from '../store/modules/globalParam'
|
|
27
26
|
|
|
@@ -52,7 +51,6 @@ const components = {
|
|
|
52
51
|
StageBord,
|
|
53
52
|
ExpendConfig,
|
|
54
53
|
PatternWalkSvg,
|
|
55
|
-
priorityControl,
|
|
56
54
|
tentativeplancontrolmodal
|
|
57
55
|
}
|
|
58
56
|
|