diff --git a/src/components/VideoPlay/index.jsx b/src/components/VideoPlay/index.jsx index 4b6c268..fdf4084 100644 --- a/src/components/VideoPlay/index.jsx +++ b/src/components/VideoPlay/index.jsx @@ -8,8 +8,8 @@ let reloadTimes = 0 let flvPlayer = null let lastUrl = null -function VideoPlay (props, ref) { - const {videoType = "flv"} = props +function VideoPlay(props, ref) { + const { videoType = "flv", controlslist } = props const videoElement = useRef() const [videoUrl, setVideoUrl] = useState('') // console.log(videoType) @@ -47,7 +47,7 @@ function VideoPlay (props, ref) { console.log(e) } } - }else{ + } else { console.log("不支持flvjs!!!") } } @@ -84,7 +84,7 @@ function VideoPlay (props, ref) { useImperativeHandle(ref, () => ({ changeUrl: (url) => { - if(lastUrl == url) { + if (lastUrl == url) { flvPlayer.play() return } @@ -99,7 +99,7 @@ function VideoPlay (props, ref) { return ( <div className="video-play-wrap"> <div className="error-layer"></div> - <video ref={videoElement} id='videoElement' className="video-js rm-video" muted src="" controls="controls"></video> + <video ref={videoElement} id='videoElement' className="video-js rm-video" muted src="" controls="controls" controlslist={controlslist}></video> </div> ) } diff --git a/src/pages/OperationCenter/CarMgm/CarAuth/loadable.jsx b/src/pages/OperationCenter/CarMgm/CarAuth/loadable.jsx index 85e0600..ec31f3e 100644 --- a/src/pages/OperationCenter/CarMgm/CarAuth/loadable.jsx +++ b/src/pages/OperationCenter/CarMgm/CarAuth/loadable.jsx @@ -286,10 +286,10 @@ function CarAuth() { </div> </> : null} <div className="ltc-item ltc-item-img"> - <img src={resultData[indexby].disabled_certificate_img1 || require("../../../../../src/assets/images/error-img.png")} onClick={() => { setBigPic(resultData[indexby].disabled_certificate_img1); setBigpicVisible(true) }} /> + <img src={resultData[indexby].disabled_certificate_img1} onError={handleImgError} onClick={() => { setBigPic(resultData[indexby].disabled_certificate_img1); setBigpicVisible(true) }} /> </div> <div className="ltc-item ltc-item-img"> - <img src={resultData[indexby].disabled_certificate_img2 || require("../../../../../src/assets/images/error-img.png")} onClick={() => { setBigPic(resultData[indexby].disabled_certificate_img2); setBigpicVisible(true) }} /> + <img src={resultData[indexby].disabled_certificate_img2} onError={handleImgError} onClick={() => { setBigPic(resultData[indexby].disabled_certificate_img2); setBigpicVisible(true) }} /> </div> </div> </div> diff --git a/src/pages/OperationCenter/OperationSales/CreditScoreMgm/loadable.jsx b/src/pages/OperationCenter/OperationSales/CreditScoreMgm/loadable.jsx index b71c944..94741c4 100644 --- a/src/pages/OperationCenter/OperationSales/CreditScoreMgm/loadable.jsx +++ b/src/pages/OperationCenter/OperationSales/CreditScoreMgm/loadable.jsx @@ -354,6 +354,10 @@ function CreditScoreMgm() { } //积分兑换配置 编辑保存 function getRedeemEdit(e, type) { + if(!addData?.awardId||!addData?.redeem_points||!addData.total_num){ + message.error('请填写完整!') + return + } ajax.getCreditScoreRedeemEdit({ ...e }).then((res) => { let { status, data, total } = res if (status == 20000) { @@ -375,6 +379,10 @@ function CreditScoreMgm() { } //积分兑换配置 添加 function getRedeemAdd(e, type) { + if(!addData?.awardId||!addData?.redeem_points||!addData.total_num){ + message.error('请填写完整!') + return + } ajax.getCreditScoreRedeemAdd({ ...e }).then((res) => { let { status, data, total } = res if (status == 20000) { diff --git a/src/pages/OutRoadMgm/OutDeviceMgm/OutMonitorMgm/loadable.jsx b/src/pages/OutRoadMgm/OutDeviceMgm/OutMonitorMgm/loadable.jsx index 23e1315..7b788d4 100644 --- a/src/pages/OutRoadMgm/OutDeviceMgm/OutMonitorMgm/loadable.jsx +++ b/src/pages/OutRoadMgm/OutDeviceMgm/OutMonitorMgm/loadable.jsx @@ -71,8 +71,9 @@ function OutMonitorMgm(props) { device_name: "", nvr_id: "", device_code: "", - berth_ids: "", - nvr_type: "" + channel_ids: "", + nvr_type: "", + id: '', }; // 行数据 const [rowData, setRowData] = useState(defRowData); @@ -501,9 +502,15 @@ function OutMonitorMgm(props) { // message.error("请选择泊位"); // return; // } + if (form.getFieldValue("nvr_type") == 1) { + if (!rowData?.channel_ids) { + message.error("请选择通道号"); + return; + } + } ajax[values?.id ? "monitorOutEdit" : "monitorOutAdd"]({ ...values, - berth_ids: rowData?.berth_ids, + channel_ids: rowData?.channel_ids, }).then( (res) => { if (res?.status == 20000) { @@ -794,7 +801,8 @@ function OutMonitorMgm(props) { > <Select placeholder="请选择" - options={[{label: '非国标NVR', value: 1} , {label: '国标NVR', value: 2}]} + options={[{ label: '非国标NVR', value: 1 }, { label: '国标NVR', value: 2 }]} + onChange={() => { form.setFieldsValue({ nvr_id: '' }) }} /> </Form.Item> <Form.Item diff --git a/src/pages/OutRoadMgm/OutDeviceMgm/OutNvrMgm/loadable.jsx b/src/pages/OutRoadMgm/OutDeviceMgm/OutNvrMgm/loadable.jsx index fea8c02..192eb3f 100644 --- a/src/pages/OutRoadMgm/OutDeviceMgm/OutNvrMgm/loadable.jsx +++ b/src/pages/OutRoadMgm/OutDeviceMgm/OutNvrMgm/loadable.jsx @@ -276,21 +276,21 @@ function OutNvrMgm(props) { title: "设备名称", dataIndex: "name", align: "center", - width: 150, + width: 220, ellipsis: true }, { title: "区域", dataIndex: "area_name", align: "center", - width: 150, + width: 220, ellipsis: true }, { title: "所属车场", dataIndex: "road_name", align: "center", - width: 150, + width: 200, ellipsis: true }, { @@ -306,7 +306,7 @@ function OutNvrMgm(props) { title: "国际编号", dataIndex: "standard_code", align: "center", - width: 150, + width: 250, ellipsis: true }, { @@ -345,7 +345,7 @@ function OutNvrMgm(props) { title: "更新时间", dataIndex: "update_time", align: "center", - width: 150, + width: 220, ellipsis: true }, { @@ -444,7 +444,11 @@ function OutNvrMgm(props) { return false } } - + let reg=/^[1-9]\d*$/ + if(!reg.test(values.standard_code)&&values.standard_code){ + message.warning("国标编号为纯数字") + return false + } console.log(values, rowData?.id); ajax[rowData?.id ? "doEditOutNvr" : "doAddOutNvr"](values).then( (res) => { @@ -452,6 +456,7 @@ function OutNvrMgm(props) { message.success(res.message); // setPageInfo({ ...pageInfo, ...{ pn: 1 } }); setVisible(false); + form.resetFields(); setIsAjax(!isAjax); } else { message.error(res.message); @@ -777,7 +782,7 @@ function OutNvrMgm(props) { name={"standard_code"} rules={[{ required: true, message: "国标编号不能为空" }]} > - <Input autoComplete="off" /> + <Input autoComplete="off" maxLength={30}/> </Form.Item> </div> diff --git a/src/pages/OutRoadMgm/OutExceptionMgm/LiftUpPoleRecord/loadable.jsx b/src/pages/OutRoadMgm/OutExceptionMgm/LiftUpPoleRecord/loadable.jsx index 35eebf5..94b31cf 100644 --- a/src/pages/OutRoadMgm/OutExceptionMgm/LiftUpPoleRecord/loadable.jsx +++ b/src/pages/OutRoadMgm/OutExceptionMgm/LiftUpPoleRecord/loadable.jsx @@ -113,7 +113,7 @@ function LiftUpPoleRecord(props) { key: 'start_time', }, { - title: '关闸时间', + title: '开闸原因', dataIndex: 'end_reason', key: 'end_reason', }, diff --git a/src/pages/OutRoadMgm/OutRoadOverview/loadable.jsx b/src/pages/OutRoadMgm/OutRoadOverview/loadable.jsx index 7ca143f..64b5ebb 100644 --- a/src/pages/OutRoadMgm/OutRoadOverview/loadable.jsx +++ b/src/pages/OutRoadMgm/OutRoadOverview/loadable.jsx @@ -573,7 +573,7 @@ const OutRoadOverview = () => { onChange={(e) => { getOutRoadVideoPlay({ id: e, type: 1 }); setTodevice(e) }} /> <div> - <VideoPlay ref={videoRef} videoType={videoType} /> + <VideoPlay ref={videoRef} videoType={videoType} controlslist={"noplaybackrate nodownload"}/> </div> </div> </div> diff --git a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/CarGroupMgm.jsx b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/CarGroupMgm.jsx index 9777963..729cc21 100644 --- a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/CarGroupMgm.jsx +++ b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/CarGroupMgm.jsx @@ -114,7 +114,7 @@ function CarGroupMgm({ id }) { }); const [pageData, setPageData] = useState({ pn: 1, - page_size: 10, + page_size: 15, total: 0, }); const [currentId, setCurrentId] = useState(""); diff --git a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/GateControlManagement.jsx b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/GateControlManagement.jsx index 26b97e4..b6f2b4c 100644 --- a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/GateControlManagement.jsx +++ b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/GateControlManagement.jsx @@ -254,7 +254,6 @@ function GateControlManagement(props) { useEffect(()=>{ - getOptionData() getOpenData(pageData) },[]) @@ -263,6 +262,7 @@ function GateControlManagement(props) { <header style={{ margin: "10px 0" }}> <Button type="primary" onClick={()=>{ setOpenVisible(true); + getOptionData(); openForm.setFieldsValue({ group_id:null, option_id:null,