|
|
@ -15,7 +15,7 @@ import { |
|
|
|
import ajax from "@/services"; |
|
|
|
import { useSafeState } from "ahooks"; |
|
|
|
function VideoMonitor(props) { |
|
|
|
const { id } = props; |
|
|
|
const { data } = props; |
|
|
|
const [form] = Form.useForm(); |
|
|
|
const [editform] = Form.useForm(); |
|
|
|
|
|
|
@ -153,7 +153,7 @@ function VideoMonitor(props) { |
|
|
|
const search = () => { |
|
|
|
const params = form.getFieldsValue(); |
|
|
|
ajax |
|
|
|
.getOutNvrList({ road_id: '', operator_id: '', ...pageData, ...params }) |
|
|
|
.getOutNvrList({ road_id: data.id, operator_id: data.operator_id, ...pageData, ...params }) |
|
|
|
.then((res) => { |
|
|
|
if (res.status === 20000) { |
|
|
|
setTableData(res.data.list); |
|
|
@ -192,9 +192,9 @@ function VideoMonitor(props) { |
|
|
|
.validateFields() |
|
|
|
.then((values) => { |
|
|
|
if (modalData.status === "add") { |
|
|
|
doAddOutNvr({ ...values, road_id: currentRecord.road_id ,operator_id: currentRecord.operator_id, address: '', lng_lat: '' }); |
|
|
|
doAddOutNvr({ ...values, road_id: data.id ,operator_id: data.operator_id, address: '', lng_lat: '' }); |
|
|
|
} else if (modalData.status === "edit") { |
|
|
|
doEditOutNvr({ ...values, road_id: currentRecord.road_id ,operator_id: currentRecord.operator_id, address: '', lng_lat: '' }); |
|
|
|
doEditOutNvr({ ...values,id: currentRecord.id, road_id: data.id ,operator_id: data.operator_id, address: '', lng_lat: '' }); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => console.error(err)); |
|
|
|