openatc-components 0.5.79 → 0.5.81
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/build/package.config.js +62 -58
- package/build/package.dev.config.js +114 -107
- package/build/package.prod.config.js +167 -160
- package/build/utils.js +109 -101
- package/index.html +16 -0
- package/package/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +2 -2
- package/package/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +255 -255
- package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +4 -4
- package/package/kisscomps/components/DrawChannelization/drawsvg/table.vue +2 -2
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/CustomRoadsSvg.vue +1 -1
- package/package/kisscomps/components/MessageBox/index.vue +1 -1
- package/package/kisscomps/components/OverviewComponent/index.vue +0 -6
- package/package/kisscomps/components/PatternWalkSvg/PatternWalkSvg.vue +0 -16
- package/package/kisscomps/components/PhaseLegend/PhaseLegend.vue +2 -3
- package/package/kisscomps/components/PhaseMarker/svg/phaseSvg.vue +1 -1
- package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +0 -82
- package/package/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +3 -4
- package/package/kisscomps/components/Stages/index.vue +2 -3
- package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +0 -28
- package/package/kisscomps/components/overView/index.vue +0 -6
- package/package/kisscomps/components/patternConfig/index.vue +1 -1
- package/package/kisscomps/components/patternConfig/pattern/patternTable.vue +7 -1
- package/package/kisscomps/index.js +7 -2
- package/package/kissui.js +321283 -0
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/App.vue +2 -0
- package/src/i18n/index.js +20 -2
- package/src/i18n/language/ar.js +685 -0
- package/src/i18n/language/en.js +69 -1157
- package/src/i18n/language/index.js +6 -0
- package/src/i18n/language/ru.js +132 -1027
- package/src/i18n/language/zh.js +65 -1150
- package/src/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +2 -2
- package/src/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +255 -255
- package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +4 -4
- package/src/kisscomps/components/DrawChannelization/drawsvg/table.vue +2 -2
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/CustomRoadsSvg.vue +1 -1
- package/src/kisscomps/components/MessageBox/index.vue +1 -1
- package/src/kisscomps/components/OverviewComponent/index.vue +0 -6
- package/src/kisscomps/components/PatternWalkSvg/PatternWalkSvg.vue +0 -16
- package/src/kisscomps/components/PhaseLegend/PhaseLegend.vue +2 -3
- package/src/kisscomps/components/PhaseMarker/svg/phaseSvg.vue +1 -1
- package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +0 -82
- package/src/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +3 -4
- package/src/kisscomps/components/Stages/index.vue +2 -3
- package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +0 -28
- package/src/kisscomps/components/overView/index.vue +0 -6
- package/src/kisscomps/components/patternConfig/index.vue +1 -1
- package/src/kisscomps/components/patternConfig/pattern/patternTable.vue +7 -1
- package/src/kisscomps/index.js +7 -2
- package/src/utils/ControlFormat.js +0 -8
- package/src/utils/fault.js +3 -1
- package/src/utils/faultcode.js +37 -36
- package/src/utils/i18nDirection.js +37 -0
- package/src/utils/phasedesc.js +0 -4
- package/src/utils/responseMessage.js +4 -0
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
/*
|
|
13
|
+
@brief 语言 → 布局方向的单一判定源(RTL 镜像)
|
|
14
|
+
@desc ar(阿拉伯语)为 RTL,其余语言一律 LTR。
|
|
15
|
+
语言存储键 intl_language 与 utils/auth.js 保持一致。
|
|
16
|
+
*/
|
|
17
|
+
const RTL_LANGS = ['ar']
|
|
18
|
+
|
|
19
|
+
export function isRtlLang (lang) {
|
|
20
|
+
return RTL_LANGS.indexOf(lang) !== -1
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function applyDirection (lang) {
|
|
24
|
+
if (lang === undefined || lang === null || lang === '') {
|
|
25
|
+
try {
|
|
26
|
+
lang = window.localStorage.getItem('intl_language')
|
|
27
|
+
} catch (e) {
|
|
28
|
+
lang = ''
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (lang === undefined || lang === null || lang === '') {
|
|
32
|
+
lang = 'zh'
|
|
33
|
+
}
|
|
34
|
+
const el = document.documentElement
|
|
35
|
+
el.setAttribute('lang', lang)
|
|
36
|
+
el.setAttribute('dir', isRtlLang(lang) ? 'rtl' : 'ltr')
|
|
37
|
+
}
|
package/src/utils/phasedesc.js
CHANGED
|
@@ -74,12 +74,10 @@ export function getPhaseDesc (list, i18n) {
|
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
id: 15,
|
|
77
|
-
zname: '南右转',
|
|
78
77
|
name: i18n.t('openatccomponents.overview.sr')
|
|
79
78
|
},
|
|
80
79
|
{
|
|
81
80
|
id: 16,
|
|
82
|
-
zname: '南掉头',
|
|
83
81
|
name: i18n.t('openatccomponents.overview.sb')
|
|
84
82
|
},
|
|
85
83
|
{
|
|
@@ -220,12 +218,10 @@ export function getPhaseImages (i18n) {
|
|
|
220
218
|
},
|
|
221
219
|
{
|
|
222
220
|
id: 15,
|
|
223
|
-
zname: '南右转',
|
|
224
221
|
name: i18n.t('openatccomponents.overview.sr')
|
|
225
222
|
},
|
|
226
223
|
{
|
|
227
224
|
id: 16,
|
|
228
|
-
zname: '南掉头',
|
|
229
225
|
name: i18n.t('openatccomponents.overview.sb')
|
|
230
226
|
},
|
|
231
227
|
{
|
|
@@ -2,6 +2,7 @@ import i18n from '../i18n/index'
|
|
|
2
2
|
import en from '../i18n/language/en'
|
|
3
3
|
import zh from '../i18n/language/zh'
|
|
4
4
|
import ru from '../i18n/language/ru'
|
|
5
|
+
import ar from '../i18n/language/ar'
|
|
5
6
|
|
|
6
7
|
function getMessageByCode (code, langusge) {
|
|
7
8
|
let res = i18n.t('openatccomponents.message.errorcode') + ' ' + code
|
|
@@ -11,6 +12,9 @@ function getMessageByCode (code, langusge) {
|
|
|
11
12
|
message = en.openatccomponents.message
|
|
12
13
|
} else if (langusge === 'ru') {
|
|
13
14
|
message = ru.openatccomponents.message
|
|
15
|
+
} else if (langusge === 'ar') {
|
|
16
|
+
// ar 词表 message 段已翻译,非 zh/en/ru/ar 之外的语言回落 zh 默认值
|
|
17
|
+
message = ar.openatccomponents.message
|
|
14
18
|
}
|
|
15
19
|
if (message[code]) {
|
|
16
20
|
res = message[code]
|