diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/cascadeCamera.jsx b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/cascadeCamera.jsx index 5706de5..7a014f1 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/cascadeCamera.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/cascadeCamera.jsx @@ -196,7 +196,7 @@ function cascadeCamera ({ dRef, dispatch, actions, cameraData, parentCamera, tes labelWidth="115px" onValueChange={(values) => { setFormData(values) - let setting = ["externalDomain", "cascadeType", "sip"] + let setting = ["externalDomain", "cascadeType", "streamId"] let b = {} setting.map((item) => { if (values.hasOwnProperty(item)) { @@ -242,7 +242,7 @@ function cascadeCamera ({ dRef, dispatch, actions, cameraData, parentCamera, tes label="SIP编号:" field="streamId" disabled={cameraData.id ? true : false} - initValue={parentCamera || ""} + initValue={cameraData?.topSerialNo || ""} placeholder="请选择SIP编号" style={{ width: 307 }} rules={[{ required: true, message: "请选择SIP编号" }]} diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/fluoriteCamera.jsx b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/fluoriteCamera.jsx index 361bb7b..f993f67 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/fluoriteCamera.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/fluoriteCamera.jsx @@ -82,6 +82,7 @@ function fluoriteCamera ({ cRef, CameraKind, CameraAbility, cameraData, ashTrue, labelAlign="left" labelWidth="115px" onValueChange={(values) => { + console.log(values); let setting = ["abilityId", "cloudControl", "highDefinition", "kindId", "name", "position", "rtmp", "serialNo",] let b = {} setting.map((item) => { @@ -95,7 +96,7 @@ function fluoriteCamera ({ cRef, CameraKind, CameraAbility, cameraData, ashTrue, }} initValues={{ name: cameraData.name || "", - highDefinition: cameraData.highDefinition || "", + highDefinition: cameraData?.highDefinition || "", memoryCard: cameraData.memoryCard || "", position: cameraData.longitude ? `${cameraData.longitude},${cameraData.latitude}` diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/ipcCamera.jsx b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/ipcCamera.jsx index 1b16863..4037c47 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/ipcCamera.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/ipcCamera.jsx @@ -87,7 +87,8 @@ function ipcCamera ({ labelAlign="left" labelWidth="115px" onValueChange={(values) => { - let setting = ["abilityId", "cloudControl", "highDefinition", "kindId", "name", "position", "rtmp", "serialNo"] + console.log(values); + let setting = ["abilityId", "cloudControl", "kindId", "name", "position", "rtmp", "serialNo"] let b = {} setting.map((item) => { if (values.hasOwnProperty(item)) { @@ -96,26 +97,23 @@ function ipcCamera ({ return b.false = values.hasOwnProperty(item) } }) + console.log(b); Object.keys(b).length == 1 ? ashTrue() : ashFalse() }} initValues={{ - name: cameraData ? cameraData.name : "", - venderId: cameraData ? cameraData.venderId : "", - memoryCard: cameraData ? cameraData.memoryCard : "", + name: cameraData.name || "", + venderId: cameraData.venderId || "", + memoryCard: cameraData.memoryCard || "", position: cameraData.longitude ? `${cameraData.longitude},${cameraData.latitude}` : "", - kindId: cameraData ? cameraData.kindId : "", - abilityId: cameraData - ? cameraData.cameraAbilities - ? cameraData.cameraAbilities.map((item) => item.id) - : "" - : "", - cloudControl: cameraData ? cameraData.cloudControl : "", - voice: cameraData ? cameraData.voice : "", - serialNo: cameraData ? cameraData.serialNo : "", - rtmp: cameraData ? cameraData.rtmp : "", + kindId: cameraData.kindId || "", + abilityId: cameraData.cameraAbilities ? cameraData.cameraAbilities.map((item) => item.id) : "", + cloudControl: cameraData.cloudControl || "", + voice: cameraData.voice || "", + serialNo: cameraData.serialNo || "", + rtmp: cameraData.rtmp || "", }} getFormApi={(formApi) => (form.current = formApi)} > @@ -394,7 +392,7 @@ function ipcCamera ({ field="serialNo" label="设备编号接入:" maxLength="39" - disabled={cameraData.id ? true : false} + disabled={cameraData.id ? true : false} placeholder="请输入设备编号" style={{ width: 307 }} rules={[{ required: true, message: "请输入设备编号" }]} @@ -404,7 +402,7 @@ function ipcCamera ({ style={{ width: 320, height: 90 }} field="rtmp" label="RTMP地址接入:" - disabled={cameraData.id ? true : false} + disabled={cameraData.id ? true : false} placeholder="请输入RTMP地址接入" rules={[{ required: true, message: "请输入RTMP地址" }]} /> diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx index 907f8b1..67c9fe9 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx @@ -161,7 +161,7 @@ const CameraHeader = (props) => { setCameraData(row); if (row.type == "cascade") { dispatch(equipmentWarehouse.getParentCamera({ cameraSerialNo: row.serialNo })).then((res) => { - setParentCamera(res.payload.data.sipip) + setParentCamera(res.payload.data.topSerialNo) if (res.success) { setCameraModal(true); setModify(true) diff --git a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/nvr.jsx b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/nvr.jsx index a833447..d61a438 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/nvr.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/nvr.jsx @@ -85,23 +85,22 @@ const NvrHeader = (props) => { const columns = [ { title: "序号", - render: (text, record, index) => { + render: (_, record, index) => { return index + 1; }, }, { title: "设备名称", dataIndex: "name", - render: (text, r, index) => { + render: (_, r, index) => { return r.name }, }, { title: "SIP地址", dataIndex: "owner", - render: (text, r, index) => { - let sipState = r.gbNvr; - return sipState ? sipState.sipip : ""; + render: (_, r, index) => { + return r?.gbNvr?.sipip }, }, { @@ -170,8 +169,7 @@ const NvrHeader = (props) => { dataIndex: "createUserId", key: "accountNumber", render: (_, r, index) => { - let createUserName = r.createUser; - return createUserName ? createUserName.name : ""; + return r?.createUser?.name }, }, {