From 291b65ba19783994721c9d15a9586e53213beca2 Mon Sep 17 00:00:00 2001 From: XieYongHong <18010623010@163.com> Date: Sat, 15 Jul 2023 16:09:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20bug#16382=E3=80=8116381=E3=80=8116384?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/components/Metadata/Base/Base.vue | 3 +- .../AccessConfig/components/Media/GB28181.vue | 76 +++++++++++++------ yarn.lock | 4 +- 3 files changed, 57 insertions(+), 26 deletions(-) diff --git a/src/views/device/components/Metadata/Base/Base.vue b/src/views/device/components/Metadata/Base/Base.vue index 6cbaa9cc..761f9aab 100644 --- a/src/views/device/components/Metadata/Base/Base.vue +++ b/src/views/device/components/Metadata/Base/Base.vue @@ -210,6 +210,7 @@ import { PropertiesModal, FunctionModal, EventModal, TagsModal } from './DetailM import { Modal } from 'jetlinks-ui-components' import {EventEmitter} from "@/utils/utils"; import {watch} from "vue"; +import {cloneDeep} from "lodash"; const props = defineProps({ target: { @@ -361,7 +362,7 @@ const handleAddClick = async (_data?: any, index?: number) => { }; const copyItem = (record: any, index: number) => { - const copyData = omit(record, ['_uuid', '_sortIndex']) + const copyData = cloneDeep(omit(record, ['_uuid', '_sortIndex'])) copyData.id = `copy_${copyData.id}`.slice(0,64) handleAddClick(copyData, index) } diff --git a/src/views/link/AccessConfig/components/Media/GB28181.vue b/src/views/link/AccessConfig/components/Media/GB28181.vue index 5d09c24a..bbf277c2 100644 --- a/src/views/link/AccessConfig/components/Media/GB28181.vue +++ b/src/views/link/AccessConfig/components/Media/GB28181.vue @@ -151,6 +151,14 @@ /^([0-9]|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.([0-9]|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.([0-9]|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.([0-9]|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])$/, message: '请输入正确的IP地址', }, + { + max: 65535, + message: '请输入1~65535之间的正整数' + }, + { + min: 1, + message: '请输入1~65535之间的正整数' + }, ]" > @@ -238,7 +247,6 @@ v-model:value=" cluster.clusterNodeId " - :options="clustersList" placeholder="请选择节点名称" allowClear show-search @@ -246,6 +254,9 @@ filterOption " > + + {{ i.label}} + @@ -309,16 +320,20 @@
+ > + + {{ i.label }} + + @@ -389,6 +404,7 @@ " :min="1" :max="65535" + :precision="0" /> @@ -450,23 +466,26 @@ -
-

接入方式

-

- {{ provider.name }} -

-

- {{ provider.description }} -

-

消息协议

-

- {{ - provider?.id === 'fixed-media' - ? 'URL' - : 'SIP' - }} -

-
+
+ + + {{ provider.name }} + + {{ provider.description }} + + {{ formState.domain }} + {{ formState.sipId }} + + + + + + +
@@ -667,8 +686,9 @@ const saveData = () => { }; const next = async () => { + let data1: any = await formRef1.value?.validate(); - if (!isNumber(data1.hostPort.port)) { + if (data1.hostPort?.port && !isNumber(data1.hostPort.port) && data1.shareCluster) { data1.hostPort.port = JSON.parse(data1.hostPort.port).port; } if (!data1?.shareCluster) { @@ -721,6 +741,16 @@ const develop = () => { } }; +const getClusterNodeIds = (id?: string) => { + const keys = dynamicValidateForm?.cluster?.map?.(item => item.clusterNodeId) || [] + return clustersList.value.filter(item => item.value === id || !keys.includes(item.value) ) +} + +const getSipListOption = (list: any[], id: string) => { + const keys = dynamicValidateForm?.cluster?.map?.(item => item.port) || [] + return (list || []).filter(item => item.value === id || !keys.includes(item.value) ) +} + onMounted(() => { getResourcesCurrent().then((resp) => { if (resp.status === 200) { diff --git a/yarn.lock b/yarn.lock index c653147c..4ef587f9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3837,8 +3837,8 @@ jetlinks-ui-components@^1.0.23: jetlinks-ui-components@^1.0.24: version "1.0.24" - resolved "http://registry.jetlinks.cn/jetlinks-ui-components/-/jetlinks-ui-components-1.0.24.tgz#0bd3caf482367d46974244558519dfa7919baf1f" - integrity sha512-bXJZUWU27kDpnvhR+zKtUZQjrq+S130abBD2D37PnbHeUtT8g/i1CRV8Qnp1SMzk7aRDH9glVSjbzIQxem3YMQ== + resolved "http://registry.jetlinks.cn/jetlinks-ui-components/-/jetlinks-ui-components-1.0.24.tgz#a1262b3a735a01cd1fd9801406d16291b5070367" + integrity sha512-P4aolPQb1/wq4edN0AZ6WSavVAvQ+KEOEFzAarL/0dy6Oz3tTVemZmtgu20TsGbrNnEe/LheMu0QpvmkOq+3dg== dependencies: "@vueuse/core" "^9.12.0" "@vueuse/router" "^9.13.0"