Browse Source

fix(): 解决大屏单位问题

pull/1/head
初见之梦 1 year ago
parent
commit
3cc7d236d8
  1. 188
      src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx

188
src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx

@ -1329,7 +1329,7 @@ const ParkingOverview = connect(function mapStateToProps(state) {
const GetCar = () => { const GetCar = () => {
crtimer = new WebSocket( crtimer = new WebSocket(
sysConfig?.messageConst?.wssUrl || sysConfig?.messageConst?.wssUrl ||
"wss://acb-pre.xihaianparking.com/PMS/ws/re"
"wss://acb-pre.xihaianparking.com/PMS/ws/re"
); );
crtimer.onopen = function (data) { crtimer.onopen = function (data) {
var mess = { var mess = {
@ -1762,7 +1762,7 @@ const ParkingOverview = connect(function mapStateToProps(state) {
if (SpeakStop) { if (SpeakStop) {
SpeakWord(Text); SpeakWord(Text);
} }
return () => {};
return () => { };
}, [SpeakStop, Text]); }, [SpeakStop, Text]);
useEffect(() => { useEffect(() => {
getSelectData(); getSelectData();
@ -1790,95 +1790,95 @@ const ParkingOverview = connect(function mapStateToProps(state) {
<div className="dlex_f"> <div className="dlex_f">
{CarRoad[CarShow]?.type == 2 {CarRoad[CarShow]?.type == 2
? LeftShow.map((ele) => { ? LeftShow.map((ele) => {
return (
<div
className={ele?.url ? "curpoin lf_s" : "lf_s"}
onClick={() => {
if (ele?.url) {
window.location = `/#${ele.url}`;
}
if (ele.text == "停车场泊位总数") {
getData(FormData);
setBoOpenClass({
width: 1632,
title: "泊位列表",
type: 1,
});
setBoOpen(true);
}
}}
key={ele.text}
>
<img src={ele.img} alt="" />
<div className="lf_num">
<div className="pldf">
<p
title={
ele.other
? LeftDataOther[ele.value]
: LeftDataTop[ele.value]
}
>
{ele.other
? ele.tod
? LeftDataOther[ele.value]
: utils.toThousands(LeftDataOther[ele.value])
: ele.tod
return (
<div
className={ele?.url ? "curpoin lf_s" : "lf_s"}
onClick={() => {
if (ele?.url) {
window.location = `/#${ele.url}`;
}
if (ele.text == "停车场泊位总数") {
getData(FormData);
setBoOpenClass({
width: 1632,
title: "泊位列表",
type: 1,
});
setBoOpen(true);
}
}}
key={ele.text}
>
<img src={ele.img} alt="" />
<div className="lf_num">
<div className="pldf">
<p
title={
ele.other
? LeftDataOther[ele.value]
: LeftDataTop[ele.value]
}
>
{ele.other
? ele.tod
? LeftDataOther[ele.value]
: utils.toThousands(LeftDataOther[ele.value])
: ele.tod
? LeftDataTop[ele.value] ? LeftDataTop[ele.value]
: utils.toThousands(LeftDataTop[ele.value])} : utils.toThousands(LeftDataTop[ele.value])}
</p>
<i>{ele.status}</i>
</div>
<span>{ele.text}</span>
</p>
<i>{ele.status}</i>
</div> </div>
<span>{ele.text}</span>
</div> </div>
);
})
</div>
);
})
: LeftShowqu.map((ele) => { : LeftShowqu.map((ele) => {
return (
<div
className={ele?.url ? "curpoin lf_s" : "lf_s"}
onClick={() => {
if (ele?.url) {
window.location = `/#${ele.url}`;
}
// if (ele.text == "") {
// getData(FormData);
// setBoOpenClass({
// width: 1632,
// title: "",
// type: 1,
// });
// setBoOpen(true);
// }
}}
key={ele.text}
>
<img src={ele.img} alt="" />
<div className="lf_num">
<div className="pldf">
<p
title={
ele.other
? LeftDataOther[ele.value]
: LeftDataTopqu[ele.value]
}
>
{ele.other
? ele.tod
? LeftDataOther[ele.value]
: utils.toThousands(LeftDataOther[ele.value])
: ele.tod
return (
<div
className={ele?.url ? "curpoin lf_s" : "lf_s"}
onClick={() => {
if (ele?.url) {
window.location = `/#${ele.url}`;
}
// if (ele.text == "") {
// getData(FormData);
// setBoOpenClass({
// width: 1632,
// title: "",
// type: 1,
// });
// setBoOpen(true);
// }
}}
key={ele.text}
>
<img src={ele.img} alt="" />
<div className="lf_num">
<div className="pldf">
<p
title={
ele.other
? LeftDataOther[ele.value]
: LeftDataTopqu[ele.value]
}
>
{ele.other
? ele.tod
? LeftDataOther[ele.value]
: utils.toThousands(LeftDataOther[ele.value])
: ele.tod
? LeftDataTopqu[ele.value] ? LeftDataTopqu[ele.value]
: utils.toThousands(LeftDataTopqu[ele.value])} : utils.toThousands(LeftDataTopqu[ele.value])}
</p>
<i>{ele.status}</i>
</div>
<span>{ele.text}</span>
</p>
<i>{ele.status}</i>
</div> </div>
<span>{ele.text}</span>
</div> </div>
);
})}
</div>
);
})}
</div> </div>
</div> </div>
<div className="input_h"> <div className="input_h">
@ -2030,8 +2030,8 @@ const ParkingOverview = connect(function mapStateToProps(state) {
{CarRoad[CarShow]?.type == 2 {CarRoad[CarShow]?.type == 2
? "周转率收费率排行榜" ? "周转率收费率排行榜"
: RoadSelect == "2" : RoadSelect == "2"
? "路段周转次数排行榜"
: "车场收入排行榜"}
? "路段周转次数排行榜"
: "车场收入排行榜"}
</div> </div>
{CarRoad[CarShow]?.type == 2 ? ( {CarRoad[CarShow]?.type == 2 ? (
<div className="pos_zs"> <div className="pos_zs">
@ -2095,17 +2095,17 @@ const ParkingOverview = connect(function mapStateToProps(state) {
className="sdfg" className="sdfg"
title={ title={
CarRoad[CarShow]?.type == 2 CarRoad[CarShow]?.type == 2
? ele.rate || 0
? ele.rate + "%"
: RoadSelect == "2" : RoadSelect == "2"
? `${ele.total || 0}`
: `${ele.paid_amount || 0}`
? `${ele.total || 0}`
: `${ele.paid_amount || 0}`
} }
> >
{CarRoad[CarShow]?.type == 2 {CarRoad[CarShow]?.type == 2
? ele.rate || 0
? ele.rate + "%"
: RoadSelect == "2" : RoadSelect == "2"
? `${ele.total || 0}`
: `${ele.paid_amount || 0}`}
? `${ele.total || 0}`
: `${ele.paid_amount || 0}`}
</span> </span>
</div> </div>
<Progress <Progress
@ -2116,8 +2116,8 @@ const ParkingOverview = connect(function mapStateToProps(state) {
CarRoad[CarShow]?.type == 2 CarRoad[CarShow]?.type == 2
? getPercentage(ele.rate || 0, DataTop[0].rate) ? getPercentage(ele.rate || 0, DataTop[0].rate)
: RoadSelect == "2" : RoadSelect == "2"
? getPercentage(ele.total || 0, DataTop[0].total)
: getPercentage(
? getPercentage(ele.total || 0, DataTop[0].total)
: getPercentage(
ele.paid_amount || 0, ele.paid_amount || 0,
DataTop[0].paid_amount DataTop[0].paid_amount
) )
@ -2134,8 +2134,8 @@ const ParkingOverview = connect(function mapStateToProps(state) {
{CarRoad[CarShow]?.type == 2 {CarRoad[CarShow]?.type == 2
? "实时收入占比" ? "实时收入占比"
: RoadSelect == "2" : RoadSelect == "2"
? "路段收费率排行榜"
: "车场周转率TOP3"}
? "路段收费率排行榜"
: "车场周转率TOP3"}
</div> </div>
{CarRoad[CarShow]?.type != 2 ? ( {CarRoad[CarShow]?.type != 2 ? (

Loading…
Cancel
Save