openatc-components 0.0.93 → 0.0.94
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/KanBan/kanban.vue +1 -1
- package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +6 -3
- package/package/kisscomps/index.js +1 -11
- package/package/kissui.min.js +1 -1
- package/package.json +2 -4
- package/src/i18n/language/en.js +2 -77
- package/src/i18n/language/zh.js +2 -77
- package/src/kisscomps/components/KanBan/kanban.vue +1 -1
- package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +6 -3
- package/src/kisscomps/index.js +1 -11
- package/src/main.js +0 -3
- package/src/router/index.js +0 -7
- package/src/store/index.js +2 -2
- package/src/store/modules/globalParam.js +16 -56
- package/src/views/intersection.vue +9 -17
- package/static/apiconfig.json +0 -15
- package/static/styles/common.scss +0 -1
- package/package/kisscomps/components/Channelization/Channelization.vue +0 -546
- package/package/kisscomps/components/Channelization/index.js +0 -2
- package/package/kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface.vue +0 -494
- package/package/kisscomps/components/ChannelizationWithInterface/index.js +0 -2
- package/package/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +0 -249
- package/package/kisscomps/components/DrawChannelization/drawsvg/detectorAssociatedComponent.vue +0 -152
- package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/TextBox.vue +0 -91
- package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +0 -176
- package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/editText.vue +0 -108
- package/package/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +0 -48
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +0 -182
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +0 -222
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +0 -191
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +0 -78
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +0 -433
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +0 -195
- package/package/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +0 -71
- package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +0 -940
- package/package/kisscomps/components/DrawChannelization/drawsvg/index.vue +0 -109
- package/package/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +0 -563
- package/package/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +0 -157
- package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.check.vue +0 -191
- package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.syncOper.vue +0 -331
- package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +0 -157
- package/package/kisscomps/components/DrawChannelization/drawsvg/table.vue +0 -99
- package/package/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +0 -43
- package/package/kisscomps/components/DrawChannelization/drawsvg/utils/phaseDataModel.js +0 -32
- package/package/kisscomps/components/DrawChannelization/drawsvg/utils/phasePos.json +0 -20
- package/package/kisscomps/components/DrawChannelization/index.js +0 -2
- package/package/kisscomps/components/DrawChannelization/phaseDataMgr.js +0 -278
- package/package/kisscomps/components/MessageBox/index.vue +0 -96
- package/src/api/cross.js +0 -33
- package/src/icons/svg/custom-BRTlane.svg +0 -40
- package/src/icons/svg/custom-bicyclelane.svg +0 -7
- package/src/icons/svg/custom-buslane.svg +0 -40
- package/src/icons/svg/custom-detector.svg +0 -12
- package/src/icons/svg/custom-east-bottom.svg +0 -32
- package/src/icons/svg/custom-east-top.svg +0 -32
- package/src/icons/svg/custom-ewped.svg +0 -35
- package/src/icons/svg/custom-motorway.svg +0 -7
- package/src/icons/svg/custom-nonmotorizedlane.svg +0 -40
- package/src/icons/svg/custom-north-left.svg +0 -32
- package/src/icons/svg/custom-north-right.svg +0 -32
- package/src/icons/svg/custom-pedcrossing.svg +0 -7
- package/src/icons/svg/custom-peddetector.svg +0 -17
- package/src/icons/svg/custom-pedeastward.svg +0 -9
- package/src/icons/svg/custom-pedestrian.svg +0 -7
- package/src/icons/svg/custom-pednorthward.svg +0 -9
- package/src/icons/svg/custom-pedsouthward.svg +0 -9
- package/src/icons/svg/custom-pedwestward.svg +0 -9
- package/src/icons/svg/custom-secondcrossing.svg +0 -7
- package/src/icons/svg/custom-sectionpedestrian.svg +0 -7
- package/src/icons/svg/custom-snped.svg +0 -35
- package/src/icons/svg/custom-south-left.svg +0 -32
- package/src/icons/svg/custom-south-right.svg +0 -32
- package/src/icons/svg/custom-straightahead.svg +0 -7
- package/src/icons/svg/custom-tramlane.svg +0 -40
- package/src/icons/svg/custom-turnaround.svg +0 -7
- package/src/icons/svg/custom-turnleft.svg +0 -7
- package/src/icons/svg/custom-turnright.svg +0 -7
- package/src/icons/svg/custom-vehiclebranch.svg +0 -40
- package/src/icons/svg/custom-vehiclemainroad.svg +0 -41
- package/src/icons/svg/custom-west-bottom.svg +0 -32
- package/src/icons/svg/custom-west-top.svg +0 -32
- package/src/icons/svg/custom-xlped.svg +0 -14
- package/src/icons/svg/custom-xpedestrian.svg +0 -7
- package/src/icons/svg/custom-xrped.svg +0 -14
- package/src/kisscomps/components/Channelization/Channelization.vue +0 -546
- package/src/kisscomps/components/Channelization/index.js +0 -2
- package/src/kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface.vue +0 -494
- package/src/kisscomps/components/ChannelizationWithInterface/index.js +0 -2
- package/src/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +0 -249
- package/src/kisscomps/components/DrawChannelization/drawsvg/detectorAssociatedComponent.vue +0 -152
- package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/TextBox.vue +0 -91
- package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +0 -176
- package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/editText.vue +0 -108
- package/src/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +0 -48
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +0 -182
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +0 -222
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +0 -191
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +0 -78
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +0 -433
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +0 -195
- package/src/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +0 -71
- package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +0 -940
- package/src/kisscomps/components/DrawChannelization/drawsvg/index.vue +0 -109
- package/src/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +0 -563
- package/src/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +0 -157
- 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/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +0 -157
- package/src/kisscomps/components/DrawChannelization/drawsvg/table.vue +0 -99
- package/src/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +0 -43
- package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phaseDataModel.js +0 -32
- package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phasePos.json +0 -20
- package/src/kisscomps/components/DrawChannelization/index.js +0 -2
- package/src/kisscomps/components/DrawChannelization/phaseDataMgr.js +0 -278
- package/src/kisscomps/components/MessageBox/index.vue +0 -96
- package/src/views/customchannelization.vue +0 -49
- package/static/styles/channelizatioon.scss +0 -365
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2020 kedacom
|
|
3
|
-
* OpenATC is licensed under Mulan PSL v2.
|
|
4
|
-
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
|
5
|
-
* You may obtain a copy of Mulan PSL v2 at:
|
|
6
|
-
* http://license.coscl.org.cn/MulanPSL2
|
|
7
|
-
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
|
8
|
-
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
|
9
|
-
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
10
|
-
* See the Mulan PSL v2 for more details.
|
|
11
|
-
**/
|
|
12
|
-
<template>
|
|
13
|
-
<div v-if="reset">
|
|
14
|
-
<drr
|
|
15
|
-
:x="item.x"
|
|
16
|
-
:y="item.y"
|
|
17
|
-
:w="item.w"
|
|
18
|
-
:h="item.h"
|
|
19
|
-
:angle="item.angle"
|
|
20
|
-
:selectable="isSeletable"
|
|
21
|
-
:aspectRatio="true"
|
|
22
|
-
:hasActiveContent="isSeletable"
|
|
23
|
-
@dragstop="boxDragStop(item, ...arguments)"
|
|
24
|
-
@resizestop="boxResizeStop(item, ...arguments)"
|
|
25
|
-
@rotatestop="boxRotateStop(item, ...arguments)"
|
|
26
|
-
>
|
|
27
|
-
<TextBox :content="TextData.text" @changeText="changeText" />
|
|
28
|
-
</drr>
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<script>
|
|
33
|
-
import TextBox from './TextBox'
|
|
34
|
-
export default {
|
|
35
|
-
data () {
|
|
36
|
-
return {
|
|
37
|
-
reset: true,
|
|
38
|
-
item: {}
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
props: {
|
|
42
|
-
TextData: {
|
|
43
|
-
type: Object
|
|
44
|
-
},
|
|
45
|
-
isSeletable: {
|
|
46
|
-
type: Boolean
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
components: {
|
|
50
|
-
TextBox
|
|
51
|
-
},
|
|
52
|
-
watch: {
|
|
53
|
-
item: {
|
|
54
|
-
handler: function (newval, oldval) {
|
|
55
|
-
if ((JSON.stringify(oldval) !== '{}')) {
|
|
56
|
-
// 更改原数据的位置大小数据
|
|
57
|
-
let data = {
|
|
58
|
-
...this.TextData,
|
|
59
|
-
...newval
|
|
60
|
-
}
|
|
61
|
-
let fields = Object.keys(newval)
|
|
62
|
-
this.$emit('changeText', data, fields)
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
created () {
|
|
68
|
-
this.IconW = this.TextData.w
|
|
69
|
-
this.IconH = this.TextData.h
|
|
70
|
-
this.item = {
|
|
71
|
-
x: this.TextData.x,
|
|
72
|
-
y: this.TextData.y,
|
|
73
|
-
w: this.TextData.w,
|
|
74
|
-
h: this.TextData.h,
|
|
75
|
-
angle: this.TextData.angle
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
methods: {
|
|
79
|
-
changeText (text) {
|
|
80
|
-
let textobj = JSON.parse(JSON.stringify(this.TextData))
|
|
81
|
-
textobj.text = text
|
|
82
|
-
this.$emit('changeText', textobj, ['text'])
|
|
83
|
-
},
|
|
84
|
-
boxDragStop (origin, final) {
|
|
85
|
-
this.item = JSON.parse(JSON.stringify(final))
|
|
86
|
-
},
|
|
87
|
-
boxResizeStop (origin, final) {
|
|
88
|
-
this.IconW = final.w + 'px'
|
|
89
|
-
this.IconH = final.h + 'px'
|
|
90
|
-
// this.resetSvg()
|
|
91
|
-
this.item = JSON.parse(JSON.stringify(final))
|
|
92
|
-
},
|
|
93
|
-
boxRotateStop (origin, final) {
|
|
94
|
-
this.item = JSON.parse(JSON.stringify(final))
|
|
95
|
-
},
|
|
96
|
-
resetSvg () {
|
|
97
|
-
this.reset = false
|
|
98
|
-
this.$nextTick(() => {
|
|
99
|
-
this.reset = true
|
|
100
|
-
})
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
</script>
|
|
105
|
-
|
|
106
|
-
<style>
|
|
107
|
-
|
|
108
|
-
</style>
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2020 kedacom
|
|
3
|
-
* OpenATC is licensed under Mulan PSL v2.
|
|
4
|
-
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
|
5
|
-
* You may obtain a copy of Mulan PSL v2 at:
|
|
6
|
-
* http://license.coscl.org.cn/MulanPSL2
|
|
7
|
-
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
|
8
|
-
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
|
9
|
-
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
10
|
-
* See the Mulan PSL v2 for more details.
|
|
11
|
-
**/
|
|
12
|
-
<template>
|
|
13
|
-
<div class="first-import-crossmap">
|
|
14
|
-
<ImportDialog ref="importDialog" @loadSvgString="loadSvgString" />
|
|
15
|
-
<div class="import-btn">
|
|
16
|
-
<el-button type="primary" @click="clickOpen">{{$t('openatccomponents.channelizationmap.importpicture')}}</el-button>
|
|
17
|
-
<div class="tip">{{$t('openatccomponents.channelizationmap.importtip')}}</div>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
</template>
|
|
21
|
-
<script>
|
|
22
|
-
import ImportDialog from './importDialog'
|
|
23
|
-
export default {
|
|
24
|
-
name: 'first-import-crossmap',
|
|
25
|
-
components: {
|
|
26
|
-
ImportDialog
|
|
27
|
-
},
|
|
28
|
-
data () {
|
|
29
|
-
return {
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
watch: {
|
|
33
|
-
},
|
|
34
|
-
props: {
|
|
35
|
-
},
|
|
36
|
-
methods: {
|
|
37
|
-
clickOpen () {
|
|
38
|
-
this.$refs.importDialog.clickOpen()
|
|
39
|
-
},
|
|
40
|
-
loadSvgString (type, imgstr) {
|
|
41
|
-
this.$emit('loadSvgString', type, imgstr)
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
mounted () {}
|
|
45
|
-
}
|
|
46
|
-
</script>
|
|
47
|
-
<style scoped>
|
|
48
|
-
</style>
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2020 kedacom
|
|
3
|
-
* OpenATC is licensed under Mulan PSL v2.
|
|
4
|
-
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
|
5
|
-
* You may obtain a copy of Mulan PSL v2 at:
|
|
6
|
-
* http://license.coscl.org.cn/MulanPSL2
|
|
7
|
-
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
|
8
|
-
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
|
9
|
-
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
10
|
-
* See the Mulan PSL v2 for more details.
|
|
11
|
-
**/
|
|
12
|
-
<template>
|
|
13
|
-
<div v-if="reset" class="countdown-icon">
|
|
14
|
-
<drr
|
|
15
|
-
style="z-index: 10"
|
|
16
|
-
:x="item.x"
|
|
17
|
-
:y="item.y"
|
|
18
|
-
:w="item.w"
|
|
19
|
-
:h="item.h"
|
|
20
|
-
:selected="chooseIndex === CountdownData.index"
|
|
21
|
-
:selectable="isSeletable"
|
|
22
|
-
:angle="item.angle"
|
|
23
|
-
:aspectRatio="true"
|
|
24
|
-
@select="handleSelectIcon(item)"
|
|
25
|
-
@dragstop="boxDragStop(item, ...arguments)"
|
|
26
|
-
@resizestop="boxResizeStop(item, ...arguments)"
|
|
27
|
-
@rotatestop="boxRotateStop(item, ...arguments)"
|
|
28
|
-
>
|
|
29
|
-
<div v-if="UsageMode === 'draw'" class="centerText" :class="{'defaultBg': chooseIndex !== CountdownData.index, 'highlightBg': chooseIndex === CountdownData.index }" :style="{'width': item.w + 'px', 'height': item.h + 'px'}">
|
|
30
|
-
<div class="phaseCountdown drawPhaseCountdown" :style="{'width': item.w + 'px', 'fontSize': Fontsize + 'px'}">
|
|
31
|
-
{{$t('openatccomponents.channelizationmap.countdown')}}
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
<div v-if="UsageMode === 'show' && isHasPhase" class="centerText showCenterText" :class="{'defaultBg': chooseIndex !== CountdownData.index, 'highlightBg': chooseIndex === CountdownData.index }" :style="{'width': item.w + 'px', 'height': item.h + 'px'}">
|
|
35
|
-
<div class="phaseCountdown" :style="{'width': item.w + 'px', 'fontSize': Fontsize + 'px'}">
|
|
36
|
-
<div v-if="phaseCountdownList.length > 0">
|
|
37
|
-
<div v-for="curPhase in phaseCountdownList" :key="curPhase.id" :style="{color: curPhase.phaseCountdownColor}">
|
|
38
|
-
<span style="float: left;color: #fff;margin-right: 5px;">{{$t('openatccomponents.overview.phase')}}{{curPhase.id}}:</span>
|
|
39
|
-
<span style="float: left;">{{curPhase.phaseCountdown}}</span>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
</drr>
|
|
45
|
-
</div>
|
|
46
|
-
</template>
|
|
47
|
-
<script>
|
|
48
|
-
export default {
|
|
49
|
-
name: 'countdownsvg',
|
|
50
|
-
data () {
|
|
51
|
-
return {
|
|
52
|
-
defaultColor: '#ccc', // 默认状态颜色
|
|
53
|
-
item: {},
|
|
54
|
-
reset: true,
|
|
55
|
-
phaseCountdownList: [],
|
|
56
|
-
phaseCountdownIcon: 999,
|
|
57
|
-
Fontsize: 20 // 倒计时默认字号
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
watch: {
|
|
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)
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
CountdownList: {
|
|
75
|
-
handler: function (val) {
|
|
76
|
-
// 接收倒计时数据进行显示
|
|
77
|
-
this.phaseCountdownList = val
|
|
78
|
-
this.culculateFontsize()
|
|
79
|
-
},
|
|
80
|
-
deep: true
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
props: {
|
|
84
|
-
CountdownData: {
|
|
85
|
-
type: Object
|
|
86
|
-
},
|
|
87
|
-
isSeletable: {
|
|
88
|
-
type: Boolean
|
|
89
|
-
},
|
|
90
|
-
CountdownList: {
|
|
91
|
-
type: Array
|
|
92
|
-
},
|
|
93
|
-
chooseIndex: {
|
|
94
|
-
type: Number
|
|
95
|
-
},
|
|
96
|
-
UsageMode: { // 当前图标模式: 绘制draw 展示show
|
|
97
|
-
type: String,
|
|
98
|
-
default: 'draw'
|
|
99
|
-
},
|
|
100
|
-
isHasPhase: {
|
|
101
|
-
type: Boolean,
|
|
102
|
-
default: true
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
methods: {
|
|
106
|
-
boxDragStop (origin, final) {
|
|
107
|
-
this.item = JSON.parse(JSON.stringify(final))
|
|
108
|
-
this.$emit('handleSelectIcon', this.CountdownData)
|
|
109
|
-
},
|
|
110
|
-
boxResizeStop (origin, final) {
|
|
111
|
-
this.resetSvg()
|
|
112
|
-
this.item = JSON.parse(JSON.stringify(final))
|
|
113
|
-
},
|
|
114
|
-
boxRotateStop (origin, final) {
|
|
115
|
-
this.item = JSON.parse(JSON.stringify(final))
|
|
116
|
-
},
|
|
117
|
-
resetSvg () {
|
|
118
|
-
this.reset = false
|
|
119
|
-
this.$nextTick(() => {
|
|
120
|
-
this.reset = true
|
|
121
|
-
})
|
|
122
|
-
},
|
|
123
|
-
handleSelectIcon (iconparams) {
|
|
124
|
-
this.$emit('handleSelectIcon', this.CountdownData)
|
|
125
|
-
},
|
|
126
|
-
culculateFontsize () {
|
|
127
|
-
// 根据倒计时图标大小,动态计算内部文字大小
|
|
128
|
-
this.Fontsize = Math.floor(this.CountdownData.w / 140 * 20)
|
|
129
|
-
if (this.Fontsize < 14) {
|
|
130
|
-
this.Fontsize = 14
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
created () {
|
|
135
|
-
this.item = {
|
|
136
|
-
x: this.CountdownData.x,
|
|
137
|
-
y: this.CountdownData.y,
|
|
138
|
-
w: this.CountdownData.w,
|
|
139
|
-
h: this.CountdownData.h,
|
|
140
|
-
angle: this.CountdownData.angle
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
</script>
|
|
145
|
-
<style scoped>
|
|
146
|
-
.centerText {
|
|
147
|
-
position: absolute;
|
|
148
|
-
left: 50%;
|
|
149
|
-
top: 50%;
|
|
150
|
-
transform: translateX(-50%) translateY(-50%);
|
|
151
|
-
z-index: 9;
|
|
152
|
-
display: flex;
|
|
153
|
-
align-items: center;
|
|
154
|
-
}
|
|
155
|
-
.showCenterText {
|
|
156
|
-
padding-left: 16px;
|
|
157
|
-
}
|
|
158
|
-
.phaseCountdown {
|
|
159
|
-
font-family: SourceHanSansCN-Regular;
|
|
160
|
-
font-weight: normal;
|
|
161
|
-
font-stretch: normal;
|
|
162
|
-
letter-spacing: 0px;
|
|
163
|
-
color: #fff;
|
|
164
|
-
margin: 0 auto;
|
|
165
|
-
}
|
|
166
|
-
.drawPhaseCountdown {
|
|
167
|
-
text-align: center;
|
|
168
|
-
}
|
|
169
|
-
.defaultBg {
|
|
170
|
-
border-radius: 50%;
|
|
171
|
-
background-color: rgba(94, 90, 90, 0.8);
|
|
172
|
-
}
|
|
173
|
-
.highlightBg {
|
|
174
|
-
border-radius: 50%;
|
|
175
|
-
background-color: #409eff;
|
|
176
|
-
}
|
|
177
|
-
.centerText .text {
|
|
178
|
-
display: inline-block;
|
|
179
|
-
color: #409eff;
|
|
180
|
-
margin-top: 20px;
|
|
181
|
-
}
|
|
182
|
-
</style>
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2020 kedacom
|
|
3
|
-
* OpenATC is licensed under Mulan PSL v2.
|
|
4
|
-
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
|
5
|
-
* You may obtain a copy of Mulan PSL v2 at:
|
|
6
|
-
* http://license.coscl.org.cn/MulanPSL2
|
|
7
|
-
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
|
8
|
-
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
|
9
|
-
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
10
|
-
* See the Mulan PSL v2 for more details.
|
|
11
|
-
**/
|
|
12
|
-
<template>
|
|
13
|
-
<div class="detector-chart-icon">
|
|
14
|
-
<drr
|
|
15
|
-
:style="{'z-index': chooseIndex === DetectorChartData.index ? 9 : 0}"
|
|
16
|
-
:x="item.x"
|
|
17
|
-
:y="item.y"
|
|
18
|
-
:w="item.w"
|
|
19
|
-
:h="item.h"
|
|
20
|
-
:selected="chooseIndex === DetectorChartData.index"
|
|
21
|
-
:selectable="isSeletable"
|
|
22
|
-
:angle="item.angle"
|
|
23
|
-
:resizable="false"
|
|
24
|
-
:rotatable="false"
|
|
25
|
-
@select="handleSelectIcon(item)"
|
|
26
|
-
@dragstop="boxDragStop(item, ...arguments)"
|
|
27
|
-
>
|
|
28
|
-
<div v-if="UsageMode === 'draw'" class="centerText" :class="{'defaultBg': chooseIndex !== DetectorChartData.index, 'highlightBg': chooseIndex === DetectorChartData.index }" :style="{'width': item.w + 'px', 'height': item.h + 'px'}">
|
|
29
|
-
<div class="detector-statistics-echarts" :id="'detectorStatisticsEcharts' + DetectorChartData.index"></div>
|
|
30
|
-
</div>
|
|
31
|
-
<div v-if="UsageMode === 'show'" class="centerText" :class="{'defaultBg': chooseIndex !== DetectorChartData.index, 'highlightBg': chooseIndex === DetectorChartData.index }" :style="{'width': item.w + 'px', 'height': item.h + 'px'}">
|
|
32
|
-
</div>
|
|
33
|
-
</drr>
|
|
34
|
-
</div>
|
|
35
|
-
</template>
|
|
36
|
-
<script>
|
|
37
|
-
import echart from 'echarts'
|
|
38
|
-
import { getTheme } from '../../../../../utils/auth.js'
|
|
39
|
-
export default {
|
|
40
|
-
name: 'countdownsvg',
|
|
41
|
-
data () {
|
|
42
|
-
return {
|
|
43
|
-
defaultColor: 'DeepSkyBlue', // 默认状态颜色
|
|
44
|
-
item: {},
|
|
45
|
-
reset: true,
|
|
46
|
-
Fontsize: 16, // 默认字号
|
|
47
|
-
flowsaturation: [100],
|
|
48
|
-
occupancysaturation: [50]
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
watch: {
|
|
52
|
-
item: {
|
|
53
|
-
handler: function (newval, oldval) {
|
|
54
|
-
if ((JSON.stringify(oldval) !== '{}')) {
|
|
55
|
-
// 更改原数据的位置大小数据
|
|
56
|
-
let data = {
|
|
57
|
-
...this.DetectorChartData,
|
|
58
|
-
...newval
|
|
59
|
-
}
|
|
60
|
-
let fields = Object.keys(newval)
|
|
61
|
-
this.$emit('changeDetectorItem', data, fields)
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
props: {
|
|
67
|
-
DetectorChartData: {
|
|
68
|
-
type: Object
|
|
69
|
-
},
|
|
70
|
-
isSeletable: {
|
|
71
|
-
type: Boolean
|
|
72
|
-
},
|
|
73
|
-
chooseIndex: {
|
|
74
|
-
type: Number
|
|
75
|
-
},
|
|
76
|
-
UsageMode: { // 当前图标模式: 绘制draw 展示show
|
|
77
|
-
type: String,
|
|
78
|
-
default: 'draw'
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
methods: {
|
|
82
|
-
boxDragStop (origin, final) {
|
|
83
|
-
this.item = JSON.parse(JSON.stringify(final))
|
|
84
|
-
this.$emit('handleSelectIcon', this.DetectorChartData)
|
|
85
|
-
},
|
|
86
|
-
resetSvg () {
|
|
87
|
-
this.reset = false
|
|
88
|
-
this.$nextTick(() => {
|
|
89
|
-
this.reset = true
|
|
90
|
-
})
|
|
91
|
-
},
|
|
92
|
-
handleSelectIcon (iconparams) {
|
|
93
|
-
this.$emit('handleSelectIcon', this.DetectorChartData)
|
|
94
|
-
},
|
|
95
|
-
culculateFontsize () {
|
|
96
|
-
// 根据倒计时图标大小,动态计算内部文字大小
|
|
97
|
-
this.Fontsize = Math.floor(this.DetectorChartData.w / 140 * 20)
|
|
98
|
-
},
|
|
99
|
-
initEcharts () {
|
|
100
|
-
this.detectorEcharts = echart.init(document.getElementById('detectorStatisticsEcharts' + this.DetectorChartData.index))
|
|
101
|
-
},
|
|
102
|
-
getEchartsData () {
|
|
103
|
-
let option = {
|
|
104
|
-
tooltip: {
|
|
105
|
-
trigger: 'item'
|
|
106
|
-
},
|
|
107
|
-
grid: {
|
|
108
|
-
left: '2%',
|
|
109
|
-
right: '2%',
|
|
110
|
-
top: '10',
|
|
111
|
-
bottom: '10',
|
|
112
|
-
containLabel: true
|
|
113
|
-
},
|
|
114
|
-
xAxis: {
|
|
115
|
-
type: 'category',
|
|
116
|
-
axisLabel: {
|
|
117
|
-
textStyle: {
|
|
118
|
-
color: getTheme() === 'light' ? '#666666' : '#B9BABF'
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
axisTick: {
|
|
122
|
-
lineStyle: {
|
|
123
|
-
color: getTheme() === 'light' ? '#D7DFE1' : '#30384D'
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
axisLine: {
|
|
127
|
-
lineStyle: {
|
|
128
|
-
color: getTheme() === 'light' ? '#D7DFE1' : '#30384D'
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
splitLine: {
|
|
132
|
-
show: false
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
yAxis: {
|
|
136
|
-
type: 'value',
|
|
137
|
-
max: 100,
|
|
138
|
-
axisTick: {
|
|
139
|
-
show: false
|
|
140
|
-
// lineStyle: {
|
|
141
|
-
// color: getTheme() === 'light' ? '#D7DFE1' : '#30384D'
|
|
142
|
-
// }
|
|
143
|
-
},
|
|
144
|
-
axisLine: {
|
|
145
|
-
lineStyle: {
|
|
146
|
-
color: getTheme() === 'light' ? '#D7DFE1' : '#30384D'
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
splitLine: {
|
|
150
|
-
show: false
|
|
151
|
-
// lineStyle: {
|
|
152
|
-
// color: getTheme() === 'light' ? '#DCDFE6' : '#30384d'
|
|
153
|
-
// }
|
|
154
|
-
},
|
|
155
|
-
splitArea: {
|
|
156
|
-
show: false
|
|
157
|
-
// areaStyle: {
|
|
158
|
-
// color: getTheme() === 'light' ? ['#fafafa', '#fff'] : ['#202940', '#1a2338']
|
|
159
|
-
// }
|
|
160
|
-
},
|
|
161
|
-
axisLabel: {
|
|
162
|
-
textStyle: {
|
|
163
|
-
color: getTheme() === 'light' ? '#666666' : '#B9BABF'
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
series: [{
|
|
168
|
-
type: 'bar',
|
|
169
|
-
barWidth: '10',
|
|
170
|
-
itemStyle: {
|
|
171
|
-
color: 'red'
|
|
172
|
-
},
|
|
173
|
-
data: this.flowsaturation
|
|
174
|
-
}, {
|
|
175
|
-
type: 'bar',
|
|
176
|
-
barWidth: '10',
|
|
177
|
-
itemStyle: {
|
|
178
|
-
color: 'green'
|
|
179
|
-
},
|
|
180
|
-
data: this.occupancysaturation
|
|
181
|
-
}]
|
|
182
|
-
}
|
|
183
|
-
this.detectorEcharts.setOption(option)
|
|
184
|
-
},
|
|
185
|
-
handleTooltipEvent () {
|
|
186
|
-
let _this = this
|
|
187
|
-
this.detectorEcharts.on('mouseover', function (params) {
|
|
188
|
-
_this.detectorEcharts.dispatchAction({
|
|
189
|
-
type: 'showTip',
|
|
190
|
-
seriesIndex: 0,
|
|
191
|
-
dataIndex: params.dataIndex,
|
|
192
|
-
position: ['0', '0']
|
|
193
|
-
})
|
|
194
|
-
})
|
|
195
|
-
this.detectorEcharts.on('mouseout', function (params) {
|
|
196
|
-
_this.detectorEcharts.dispatchAction({
|
|
197
|
-
type: 'hideTip'
|
|
198
|
-
})
|
|
199
|
-
})
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
|
-
created () {
|
|
203
|
-
this.item = {
|
|
204
|
-
x: this.DetectorChartData.x,
|
|
205
|
-
y: this.DetectorChartData.y,
|
|
206
|
-
w: this.DetectorChartData.w,
|
|
207
|
-
h: this.DetectorChartData.h,
|
|
208
|
-
angle: this.DetectorChartData.angle
|
|
209
|
-
}
|
|
210
|
-
},
|
|
211
|
-
mounted () {
|
|
212
|
-
this.initEcharts()
|
|
213
|
-
this.getEchartsData()
|
|
214
|
-
this.handleTooltipEvent()
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
</script>
|
|
218
|
-
<style scoped>
|
|
219
|
-
.detector-statistics-echarts {
|
|
220
|
-
height: 100%;
|
|
221
|
-
}
|
|
222
|
-
</style>
|