Browse Source

fix():bug修改

tags/PMS_V1.0.0_Alpha6
xingjx 1 year ago
parent
commit
d13c47645c
  1. 10
      src/components/VideoPlay/index.jsx
  2. 4
      src/pages/OperationCenter/CarMgm/CarAuth/loadable.jsx
  3. 8
      src/pages/OperationCenter/OperationSales/CreditScoreMgm/loadable.jsx
  4. 16
      src/pages/OutRoadMgm/OutDeviceMgm/OutMonitorMgm/loadable.jsx
  5. 19
      src/pages/OutRoadMgm/OutDeviceMgm/OutNvrMgm/loadable.jsx
  6. 2
      src/pages/OutRoadMgm/OutExceptionMgm/LiftUpPoleRecord/loadable.jsx
  7. 2
      src/pages/OutRoadMgm/OutRoadOverview/loadable.jsx
  8. 2
      src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/CarGroupMgm.jsx
  9. 2
      src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/GateControlManagement.jsx

10
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>
)
}

4
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>

8
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) {

16
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

19
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>

2
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',
},

2
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>

2
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("");

2
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,

Loading…
Cancel
Save