From 5ba3adb5ca2d2a577c252232444ee343374ad0a8 Mon Sep 17 00:00:00 2001 From: orange Date: Tue, 15 Nov 2022 12:02:43 +0800 Subject: [PATCH] feat(error code): add fins error code --- .../config/useNodeConfigParamItem.ts | 2 - src/i18n/error.ts | 64 +++++++++++++++---- src/utils/constants.ts | 3 +- 3 files changed, 52 insertions(+), 17 deletions(-) diff --git a/src/composables/config/useNodeConfigParamItem.ts b/src/composables/config/useNodeConfigParamItem.ts index c3addef5..ecb3e17c 100644 --- a/src/composables/config/useNodeConfigParamItem.ts +++ b/src/composables/config/useNodeConfigParamItem.ts @@ -12,8 +12,6 @@ type Props = Readonly<{ }> export default (props: Props) => { - console.log('props', props) - const { t } = useI18n() const rules: Ref | Record> = ref([]) diff --git a/src/i18n/error.ts b/src/i18n/error.ts index 87c7b34b..9a267279 100644 --- a/src/i18n/error.ts +++ b/src/i18n/error.ts @@ -319,32 +319,68 @@ export default { en: 'Fins error', }, 10502: { - zh: '第一个地址处于无效区域', - en: 'Fins first address in inaccessible area', + zh: '本地节点错误', + en: 'Fins local node error', }, 10503: { - zh: '最后一个字超出范围', - en: 'Fins end of word exceed range', + zh: '目标节点错误', + en: 'Fins dest node error', }, 10504: { - zh: '无效的数据大小', - en: 'Fins invalid size of data', + zh: '控制器错误', + en: 'Fins communication controller error', }, 10505: { - zh: '响应块太长', - en: 'Fins response too long', + zh: '服务不受支持', + en: 'Fins not executable', }, 10506: { - zh: '数据受保护', - en: 'Fins data is protected', + zh: '路由表错误', + en: 'Fins routing error', }, 10507: { - zh: '区域只读', - en: 'Fins area read-only', + zh: '命令格式错误', + en: 'Fins command format error', }, 10508: { - zh: '数据不可更改', - en: 'Fins data cannot change', + zh: '参数错误', + en: 'Fins parameter error', + }, + 10509: { + zh: '无法读取', + en: 'Fins read not possible', + }, + 10510: { + zh: '无法写入', + en: 'Fins write not possible', + }, + 10511: { + zh: '当前模式不可执行', + en: 'Fins not executable in current mode', + }, + 10512: { + zh: '单元不存在', + en: 'Fins no unit', + }, + 10513: { + zh: '无法启动/停止', + en: 'Fins start/stop not possible', + }, + 10514: { + zh: '单元错误', + en: 'Fins unit error', + }, + 10515: { + zh: '命令错误', + en: 'Fins command error', + }, + 10516: { + zh: '访问权限错误', + en: 'Fins access error', + }, + 10517: { + zh: '中止', + en: 'Fins abort', }, 10001: { zh: 'Opcua tag 不存在', diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 572e2668..e99bd4f5 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -18,7 +18,8 @@ export const ERROR_CODE_ARR = [ 2006, 2007, 2008, 2009, 2010, 2011, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2407, 3000, 3001, 3002, 3003, 3004, 3007, 3008, 3009, 3010, 3011, 3012, 10101, 10103, 10105, 10106, 10107, 10110, 10150, 10151, - 10200, 10400, 10500, 10501, 10502, 10503, 10504, 10505, 10506, 10507, 10508, 10001, 10002, 10003, 10004, 10005, + 10200, 10400, 10500, 10501, 10502, 10503, 10504, 10505, 10506, 10507, 10508, 10509, 10510, 10511, 10512, 10513, 10514, + 10515, 10516, 10517, 10001, 10002, 10003, 10004, 10005, ] export const FILLER_IN_TAG_ATTR = ' '