|
@ -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)} |
|
|
> |
|
|
> |
|
@ -394,7 +392,7 @@ function ipcCamera ({ |
|
|
field="serialNo" |
|
|
field="serialNo" |
|
|
label="设备编号接入:" |
|
|
label="设备编号接入:" |
|
|
maxLength="39" |
|
|
maxLength="39" |
|
|
disabled={cameraData.id ? true : false} |
|
|
disabled={cameraData.id ? true : false} |
|
|
placeholder="请输入设备编号" |
|
|
placeholder="请输入设备编号" |
|
|
style={{ width: 307 }} |
|
|
style={{ width: 307 }} |
|
|
rules={[{ required: true, message: "请输入设备编号" }]} |
|
|
rules={[{ required: true, message: "请输入设备编号" }]} |
|
@ -404,7 +402,7 @@ function ipcCamera ({ |
|
|
style={{ width: 320, height: 90 }} |
|
|
style={{ width: 320, height: 90 }} |
|
|
field="rtmp" |
|
|
field="rtmp" |
|
|
label="RTMP地址接入:" |
|
|
label="RTMP地址接入:" |
|
|
disabled={cameraData.id ? true : false} |
|
|
disabled={cameraData.id ? true : false} |
|
|
placeholder="请输入RTMP地址接入" |
|
|
placeholder="请输入RTMP地址接入" |
|
|
rules={[{ required: true, message: "请输入RTMP地址" }]} |
|
|
rules={[{ required: true, message: "请输入RTMP地址" }]} |
|
|
/> |
|
|
/> |
|
|