From 3a44fb1fbf52ccc97a2245ed7ee1ded6ef7fea72 Mon Sep 17 00:00:00 2001 From: fangxiang Date: Tue, 6 Dec 2022 17:00:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=94=E5=8A=A8=E8=AE=BE=E5=A4=87=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=88=9B=E6=98=BE=E5=A4=96=E6=8B=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EditJointActionEquipmentDialog.vue | 19 ++++++++++++++++--- src/i18n/en-US/index.ts | 3 +++ src/i18n/zh-CN/index.ts | 3 +++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/components/EditJointActionEquipmentDialog.vue b/src/components/EditJointActionEquipmentDialog.vue index 41c5b12..f8d9466 100644 --- a/src/components/EditJointActionEquipmentDialog.vue +++ b/src/components/EditJointActionEquipmentDialog.vue @@ -92,7 +92,10 @@ (val) => (val && val.length > 0) || $t('Please type something'), (val) => - isIpAddress(val) || $t('Please input vaild ip address'), + isHost(val) || + $t( + 'Please input vaild host. example: 192.168.1.1 or 192.168.1.1:8080' + ), ]" lazy-rules /> @@ -182,6 +185,15 @@ export default defineComponent({ connect_type: "network", }, }, + { + key: "CX_MISP3000", + label: $t.t("CX_MISP3000"), + value: { + protocol: "CX_MISP3000", + protocol_version: "Normal", + connect_type: "network", + }, + }, // { // key: "VTRON2", // label: $t.t("VTRON2"), @@ -305,7 +317,8 @@ export default defineComponent({ message: (is_add.value ? $t.t("add") : $t.t("edit")) + $t.t(" ") + - $t.t(" equipment data") + + $t.t(" ") + + $t.t("equipment data") + (success ? $t.t("success") : $t.t("fail")) + "!", position: "top", @@ -316,7 +329,7 @@ export default defineComponent({ show_dialog.value = false; } }, - isIpAddress(str: string) { + isHost(str: string) { return ( str == "localhost" || /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test( diff --git a/src/i18n/en-US/index.ts b/src/i18n/en-US/index.ts index 8d9e02c..e2194b3 100644 --- a/src/i18n/en-US/index.ts +++ b/src/i18n/en-US/index.ts @@ -398,4 +398,7 @@ export default { "server commit hash": "Server Commit Hash", "edit user or password": "Edit User Or Password", "old password error": "Old Password Error", + "Please input vaild host. example: 192.168.1.1 or 192.168.1.1:8080": + "Please Input Vaild Host. Example: 192.168.1.1 or 192.168.1.1:8080", + "equipment data": "Equipment Data", }; diff --git a/src/i18n/zh-CN/index.ts b/src/i18n/zh-CN/index.ts index c090c28..94c433b 100644 --- a/src/i18n/zh-CN/index.ts +++ b/src/i18n/zh-CN/index.ts @@ -668,4 +668,7 @@ export default { "new password": "新密码", "edit user or password": "修改用户名和密码", "old password error": "旧密码不匹配", + "Please input vaild host. example: 192.168.1.1 or 192.168.1.1:8080": + "请输入合法地址. 例: 192.168.1.1 或 192.168.1.1:8080", + "equipment data": "联动设备", };