|
@ -87,7 +87,8 @@ function ipcCamera ({ |
|
|
labelAlign="left" |
|
|
labelAlign="left" |
|
|
labelWidth="115px" |
|
|
labelWidth="115px" |
|
|
onValueChange={(values) => { |
|
|
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 = {} |
|
|
let b = {} |
|
|
setting.map((item) => { |
|
|
setting.map((item) => { |
|
|
if (values.hasOwnProperty(item)) { |
|
|
if (values.hasOwnProperty(item)) { |
|
@ -96,26 +97,23 @@ function ipcCamera ({ |
|
|
return b.false = values.hasOwnProperty(item) |
|
|
return b.false = values.hasOwnProperty(item) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
console.log(b); |
|
|
Object.keys(b).length == 1 ? ashTrue() : ashFalse() |
|
|
Object.keys(b).length == 1 ? ashTrue() : ashFalse() |
|
|
|
|
|
|
|
|
}} |
|
|
}} |
|
|
initValues={{ |
|
|
initValues={{ |
|
|
name: cameraData ? cameraData.name : "", |
|
|
name: cameraData.name || "", |
|
|
venderId: cameraData ? cameraData.venderId : "", |
|
|
venderId: cameraData.venderId || "", |
|
|
memoryCard: cameraData ? cameraData.memoryCard : "", |
|
|
memoryCard: cameraData.memoryCard || "", |
|
|
position: cameraData.longitude |
|
|
position: cameraData.longitude |
|
|
? `${cameraData.longitude},${cameraData.latitude}` |
|
|
? `${cameraData.longitude},${cameraData.latitude}` |
|
|
: "", |
|
|
: "", |
|
|
kindId: cameraData ? cameraData.kindId : "", |
|
|
kindId: cameraData.kindId || "", |
|
|
abilityId: cameraData |
|
|
abilityId: cameraData.cameraAbilities ? cameraData.cameraAbilities.map((item) => item.id) : "", |
|
|
? cameraData.cameraAbilities |
|
|
cloudControl: cameraData.cloudControl || "", |
|
|
? cameraData.cameraAbilities.map((item) => item.id) |
|
|
voice: cameraData.voice || "", |
|
|
: "" |
|
|
serialNo: cameraData.serialNo || "", |
|
|
: "", |
|
|
rtmp: cameraData.rtmp || "", |
|
|
cloudControl: cameraData ? cameraData.cloudControl : "", |
|
|
|
|
|
voice: cameraData ? cameraData.voice : "", |
|
|
|
|
|
serialNo: cameraData ? cameraData.serialNo : "", |
|
|
|
|
|
rtmp: cameraData ? cameraData.rtmp : "", |
|
|
|
|
|
}} |
|
|
}} |
|
|
getFormApi={(formApi) => (form.current = formApi)} |
|
|
getFormApi={(formApi) => (form.current = formApi)} |
|
|
> |
|
|
> |
|
|