联动设备增加创显外拼

This commit is contained in:
fangxiang 2022-12-06 17:00:24 +08:00
parent f133eae00e
commit 3a44fb1fbf
3 changed files with 22 additions and 3 deletions

View File

@ -92,7 +92,10 @@
(val) => (val) =>
(val && val.length > 0) || $t('Please type something'), (val && val.length > 0) || $t('Please type something'),
(val) => (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 lazy-rules
/> />
@ -182,6 +185,15 @@ export default defineComponent({
connect_type: "network", connect_type: "network",
}, },
}, },
{
key: "CX_MISP3000",
label: $t.t("CX_MISP3000"),
value: {
protocol: "CX_MISP3000",
protocol_version: "Normal",
connect_type: "network",
},
},
// { // {
// key: "VTRON2", // key: "VTRON2",
// label: $t.t("VTRON2"), // label: $t.t("VTRON2"),
@ -305,7 +317,8 @@ export default defineComponent({
message: message:
(is_add.value ? $t.t("add") : $t.t("edit")) + (is_add.value ? $t.t("add") : $t.t("edit")) +
$t.t(" ") + $t.t(" ") +
$t.t(" equipment data") + $t.t(" ") +
$t.t("equipment data") +
(success ? $t.t("success") : $t.t("fail")) + (success ? $t.t("success") : $t.t("fail")) +
"!", "!",
position: "top", position: "top",
@ -316,7 +329,7 @@ export default defineComponent({
show_dialog.value = false; show_dialog.value = false;
} }
}, },
isIpAddress(str: string) { isHost(str: string) {
return ( return (
str == "localhost" || 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( /^(\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(

View File

@ -398,4 +398,7 @@ export default {
"server commit hash": "Server Commit Hash", "server commit hash": "Server Commit Hash",
"edit user or password": "Edit User Or Password", "edit user or password": "Edit User Or Password",
"old password error": "Old Password Error", "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",
}; };

View File

@ -668,4 +668,7 @@ export default {
"new password": "新密码", "new password": "新密码",
"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":
"请输入合法地址. 例: 192.168.1.1 或 192.168.1.1:8080",
"equipment data": "联动设备",
}; };