dengyinhuan 2 years ago
parent
commit
54aa171078
  1. 1
      api/app/lib/controllers/organization/department.js
  2. 140
      code996.sh
  3. 2
      weapp/src/packages/patrol/index.jsx
  4. 36
      web/client/src/components/Upload/index.js
  5. 4
      web/client/src/sections/fillion/components/bridgeTable.js
  6. 2
      web/client/src/sections/fillion/components/inforTable.js
  7. 5
      web/client/src/sections/fillion/components/maintenanceTable.js
  8. 5
      web/client/src/sections/fillion/components/patrolTable.js
  9. 2
      web/client/src/sections/fillion/components/project/project.js
  10. 6
      web/client/src/sections/quanju/containers/example.js
  11. 2
      web/client/src/sections/quanju/containers/footer/conserve/index.js
  12. 10
      web/client/src/sections/quanju/containers/footer/conserve/left.js
  13. 10
      web/client/src/sections/quanju/containers/footer/conserve/right.js
  14. 10
      web/client/src/sections/quanju/containers/footer/gis/gis.js
  15. 2
      web/client/src/sections/quanju/containers/footer/leadership/centerLeft.js
  16. 25
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js
  17. 17
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/handong.js
  18. 10
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/qiqoliang.js
  19. 6
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/top.js
  20. 2
      web/client/src/sections/quanju/containers/footer/leadership/left.js
  21. 12
      web/client/src/sections/quanju/containers/footer/leadership/left/echarts/lefttopecharts.js
  22. 5
      web/client/src/sections/quanju/containers/footer/leadership/left/left-top.js
  23. 2
      web/client/src/sections/quanju/containers/footer/leadership/right.js
  24. 4
      web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js
  25. 4
      web/client/src/sections/quanju/containers/footer/leadership/right/right-top.js
  26. 2
      web/client/src/sections/quanju/containers/footer/operation/index.js
  27. 2
      web/client/src/sections/quanju/containers/footer/operation/left.js
  28. 2
      web/client/src/sections/quanju/containers/footer/operation/right.js
  29. 4
      web/config.js

1
api/app/lib/controllers/organization/department.js

@ -70,6 +70,7 @@ async function editDep (ctx) {
dependence: dependence || null, dependence: dependence || null,
name: name, name: name,
id: { $ne: depId }, id: { $ne: depId },
delete: false
} }
}) })
if (repeatNameCount) { if (repeatNameCount) {

140
code996.sh

@ -0,0 +1,140 @@
#!/usr/bin/env bash
Help()
{
echo "你也可以使用自定义参数进行指定查询"
echo
echo "格式: bash $0 [2021-01-01] [2022-04-04] [author]"
echo "示例: bash code996.sh 2021-01-01 2022-12-31 digua"
echo "参数:"
echo "1st 分析的起始时间."
echo "2nd 分析的结束时间."
echo "3rd 指定提交用户,可以是 name 或 email."
echo
}
OS_DETECT()
{
# Detect OS
case "$(uname -s)" in
Linux)
# echo 'Linux'
open_url="xdg-open"
;;
Darwin)
# echo 'macOS'
open_url="open"
;;
CYGWIN*|MINGW32*|MSYS*|MINGW*)
# echo 'Windows'
open_url="start"
;;
*)
echo 'Other OS'
echo "trying to use xdg-open to open the url"
open_url="xdg-open"
;;
esac
}
OS_DETECT
time_start=$1
if [ "$1" == "--help" ]
then
Help
exit 0
elif [ "$1" == "-h" ]
then
Help
exit 0
fi
if [ -z $1 ]
then
time_start="2021-01-01"
fi
time_end=$2
if [ -z $2 ]
then
time_end=$(date "+%Y-%m-%d")
fi
author=$3
if [ -z $3 ]
then
author=""
fi
by_day_output=`git -C $PWD log --author=$author --date=format:%u --after="$time_start" --before="$time_end" |grep "Date:"|awk '{print $2}'|sort|uniq -c`
by_hour_output=`git -C $PWD log --author=$author --date=format:%H --after="$time_start" --before="$time_end" |grep "Date:"|awk '{print $2}'|sort|uniq -c`
for i in "${by_day_output[@]}"
do
by_day_result=`echo "$i"|sed -E 's/^ +//g'|sed 's/ /_/g'|tr '\n' ','`
done
# should modify by day format %a or %A
# day_sorted=('Monday' 'Tuesday' 'Wednesday' 'Thursday' 'Friday' 'Saturday' 'Sunday')
# day_sorted=('Mon' 'Tue' 'Wed' 'Thu' 'Fri' 'Sat' 'Sun')
RED='\033[1;91m'
NC='\033[0m' # No Color
echo -e "${RED}统计时间范围:$time_start$time_end"
for i in "${by_day_output[@]}"
do
echo
echo -e "${NC}一周七天 commit 分布${RED}"
echo -e " 总提交次数 星期\n$i"|column -t
by_day_result=`echo "$i"|sed -E 's/^ +//g'|sed "s/ /_/g"|tr '\n' ','`
done
for i in "${by_hour_output[@]}"
do
echo
echo -e "${NC}24小时 commit 分布${RED}"
echo -e " 总提交次数 小时\n$i"|column -t
by_hour_result=`echo "$i"|sed -E 's/^ +//g'|sed "s/ /_/g"|tr '\n' ','`
done
by_day_result=`echo "$by_day_result"|sed -E 's/,$//g'`
by_hour_result=`echo "$by_hour_result"|sed -E 's/,$//g'`
result=$time_start"_"$time_end"&week="$by_day_result"&hour="$by_hour_result
# url
github_url="https://hellodigua.github.io/code996/#/result?time=$result"
vercel_url="https://code996.vercel.app/#/result?time=$result"
gitee_url="https://hellodigua.gitee.io/code996/#/result?time=$result"
echo
echo -e "${NC}复制以下url以查看可视化分析结果:"
echo -e "${RED}$github_url"
echo -e "${NC}"
echo -e "${NC}若 GitHub 访问过慢,也可以访问以下镜像链接:"
echo -e "${NC}Vercel节点:"
echo -e "${RED}$vercel_url"
echo -e "${NC}"
echo -e "${NC}Gitee节点:"
echo -e "${RED}$gitee_url"
echo -e "${NC}"
$open_url "$github_url"

2
weapp/src/packages/patrol/index.jsx

@ -36,7 +36,7 @@ const Index = () => {
const prjType = [ const prjType = [
{ text: '道路', value: 'road'}, { text: '道路', value: 'road'},
{ text: '桥梁', value: 'birdge'}, { text: '桥梁', value: 'bridge'},
{ text: '涵洞', value: 'culvert'}, { text: '涵洞', value: 'culvert'},
{ text: '其他', value: 'other'}, { text: '其他', value: 'other'},
] ]

36
web/client/src/components/Upload/index.js

@ -27,28 +27,28 @@ class Uploads extends Component {
return showName return showName
} }
// setFileList = (value) => { setFileList = (value) => {
// let defaultFileList = []; let defaultFileList = [];
// defaultFileList = value.map((u, index) => { defaultFileList = value.map((u, index) => {
// let fileUrl = `${this.ApiRoot}/${u.url}`; let fileUrl = `${this.ApiRoot}/${u.url}`;
// return { return {
// uid: -index - 1, uid: -index - 1,
// name: this.dealName(u.url), name: this.dealName(u.url),
// status: 'done', status: 'done',
// storageUrl: u.url, storageUrl: u.url,
// url: fileUrl url: fileUrl
// }; };
// }); });
// onChange(defaultFileList) // onChange(defaultFileList)
// this.setState({ this.setState({
// fileList: defaultFileList fileList: defaultFileList
// }); });
// }; };
componentDidMount() { componentDidMount() {
const { value } = this.props; const { value } = this.props;
if (value) { if (value) {
this.setState(value); this.setFileList(value);
} }
} }

4
web/client/src/sections/fillion/components/bridgeTable.js

@ -48,7 +48,7 @@ const BrideTable = (props) => {
tab1: [ tab1: [
{ {
title: '桥梁代码', title: '桥梁代码',
dataIndex: 'placeName', dataIndex: 'placeName1',
fixed: 'left', fixed: 'left',
width: 120, width: 120,
options: 1, options: 1,
@ -64,7 +64,7 @@ const BrideTable = (props) => {
}, },
{ {
title: '桥梁名称', title: '桥梁名称',
dataIndex: 'containers', dataIndex: 'placeName',
fixed: 'left', fixed: 'left',
width: 120, width: 120,
render: (dom, record) => { render: (dom, record) => {

2
web/client/src/sections/fillion/components/inforTable.js

@ -75,7 +75,7 @@ const InForTable = (props) => {
onChange: (value, cs) => { onChange: (value, cs) => {
setNameOfInspectionPoint(value.currentTarget.value) setNameOfInspectionPoint(value.currentTarget.value)
}, },
placeholder: '请输入车牌号进行搜索', placeholder: '请输入检测点进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode, getPopupContainer: (triggerNode) => triggerNode.parentNode,
} }
}, { }, {

5
web/client/src/sections/fillion/components/maintenanceTable.js

@ -13,7 +13,8 @@ import moment from 'moment';
const DetailForm = (props) => { const DetailForm = (props) => {
const { visible, data, handleClose, loading } = props; const { visible, data, handleClose, loading } = props;
const keyList = [ const keyList = [
{ key: '问题编号', name: 'id' }, { key: '编号', name: 'id' },
{ key: '工程类型', name: 'projectType' },
{ key: '所在路段', name: 'road' }, { key: '所在路段', name: 'road' },
{ key: '具体位置', name: 'address' }, { key: '具体位置', name: 'address' },
{ key: '巡查内容', name: 'content' }, { key: '巡查内容', name: 'content' },
@ -91,7 +92,7 @@ const DetailList = (props) => {
const columns = [ const columns = [
{ {
title: '问题编号', title: '编号',
key: 'id', key: 'id',
dataIndex: 'id', dataIndex: 'id',
align: 'center', align: 'center',

5
web/client/src/sections/fillion/components/patrolTable.js

@ -14,7 +14,8 @@ import moment from 'moment';
const DetailForm = (props) => { const DetailForm = (props) => {
const { visible, data, handleClose, loading } = props; const { visible, data, handleClose, loading } = props;
const keyList = [ const keyList = [
{ key: '问题编号', name: 'id' }, { key: '编号', name: 'id' },
{ key: '工程类型', name: 'projectType' },
{ key: '所在路段', name: 'road' }, { key: '所在路段', name: 'road' },
{ key: '具体位置', name: 'address' }, { key: '具体位置', name: 'address' },
{ key: '巡查内容', name: 'content' }, { key: '巡查内容', name: 'content' },
@ -92,7 +93,7 @@ const DetailList = (props) => {
const columns = [ const columns = [
{ {
title: '问题编号', title: '编号',
key: 'id', key: 'id',
dataIndex: 'id', dataIndex: 'id',
align: 'center', align: 'center',

2
web/client/src/sections/fillion/components/project/project.js

@ -113,7 +113,7 @@ const ProjectModal = (props) => {
} }
} }
}} }}
initialValues={{ ...recortd, done: recortd.done ? 'true' : 'false' }} initialValues={{ ...recortd, done: typecard == 'compile'?recortd?.done ? 'true' : 'false':'' }}
> >
{typecard == 'compile' ? {typecard == 'compile' ?
<ProForm.Group <ProForm.Group

6
web/client/src/sections/quanju/containers/example.js

@ -35,12 +35,14 @@ const Example = (props) => {
document.body.clientHeight / 1080 document.body.clientHeight / 1080
)})`, */ )})`, */
}}> }}>
<Gis />
<div style={{ width: "100%", height: "10%" }}> <div style={{ width: "100%", height: "10%" }}>
<Header tabChange={tabChange} tabKey={tabKey} dispatch={dispatch} /> <Header tabChange={tabChange} tabKey={tabKey} dispatch={dispatch} />
</div> </div>
<div style={{position: 'absolute', width: "100%", height: "90%" }}> <div style={{ position: 'absolute', width: "100%", height: "90%" }}>
<Gis />
<Footer tabKey={tabKey} dispatch={dispatch} /> <Footer tabKey={tabKey} dispatch={dispatch} />
</div> </div>
</div> </div>

2
web/client/src/sections/quanju/containers/footer/conserve/index.js

@ -29,10 +29,8 @@ const Conserve = (props) => {
return ( return (
<div style={{ width: '100%', height: '100%', }}> <div style={{ width: '100%', height: '100%', }}>
<div style={{ display: 'flex', width: '100%', height: '100%', justifyContent: 'space-between' }}>
<Left roadData={roadData} loading={loading} /> <Left roadData={roadData} loading={loading} />
<Right highwaysData={highwaysData} roadMaintenances={roadMaintenances}/> <Right highwaysData={highwaysData} roadMaintenances={roadMaintenances}/>
</div>
</div> </div>
) )
} }

10
web/client/src/sections/quanju/containers/footer/conserve/left.js

@ -4,12 +4,12 @@ import LeftCenter from './left/left-center'
import LeftTop from './left/left-top' import LeftTop from './left/left-top'
const Left = (props) => { const Left = (props) => {
const { roadData,loading } = props const { roadData, loading } = props
return ( return (
<div style={{ display: 'flex', flexDirection: 'column', width: "23%", height: "100%", marginLeft: "1%" }}> <div style={{ position: 'absolute', left: 0, width: "23%", height: "100%", marginLeft: "1%" }}>
<LeftTop roadData={roadData} loading ={loading}/> <LeftTop roadData={roadData} loading={loading} />
<LeftCenter roadData={roadData} loading ={loading}/> <LeftCenter roadData={roadData} loading={loading} />
<LeftBottom roadData={roadData} loading ={loading}/> <LeftBottom roadData={roadData} loading={loading} />
</div> </div>
) )
} }

10
web/client/src/sections/quanju/containers/footer/conserve/right.js

@ -4,12 +4,12 @@ import RightCenter from './right/right-center'
import RightTop from './right/right-top' import RightTop from './right/right-top'
const Right = (props) => { const Right = (props) => {
const { highwaysData,roadMaintenances } = props const { highwaysData, roadMaintenances } = props
return ( return (
<div style={{ display: 'flex', flexDirection: 'column', width: "23%", height: "100%", marginRight: "1%", }}> <div style={{ position: 'absolute', right: 0, width: "23%", height: "100%", marginRight: "1%", }}>
<RightTop highwaysData={highwaysData}/> <RightTop highwaysData={highwaysData} />
<RightCenter highwaysData={highwaysData}/> <RightCenter highwaysData={highwaysData} />
<RightBottom roadMaintenances={roadMaintenances}/> <RightBottom roadMaintenances={roadMaintenances} />
</div> </div>
) )
} }

10
web/client/src/sections/quanju/containers/footer/gis/gis.js

@ -21,9 +21,9 @@ const Gis = (props) => {
const loadMap = () => { const loadMap = () => {
const map = new AMap.Map(MAPID, { const map = new AMap.Map(MAPID, {
resizeEnable: true, resizeEnable: true,
center: [115.912663, 28.543149],//地图中心点,初始定位加载显示楼块 center: [115.99255, 28.503617],//地图中心点,初始定位加载显示楼块
zoom: 15,//地图显示的缩放级别 zoom: 8,//地图显示的缩放级别
zooms: [10, 12], zooms: [8, 18],
pitch: 0, // 地图俯仰角度,有效范围 0 度- 83 度 pitch: 0, // 地图俯仰角度,有效范围 0 度- 83 度
viewMode: '3D', // 地图模式 viewMode: '3D', // 地图模式
mapStyle: 'amap://styles/fb26776387242721c2fc32e2cb1daccc', mapStyle: 'amap://styles/fb26776387242721c2fc32e2cb1daccc',
@ -42,8 +42,8 @@ const Gis = (props) => {
}; };
return ( return (
<div style={{ position: 'absolute', width: '100%', backgroundColor: '#101824', height: '100%', minHeight: 700 }}> <div style={{ position: 'absolute', width: '100%', height: '100%' }}>
<div id={MAPID} style={{ width: '100%', height: '100%', background: "#101824", minHeight: 700 }} /> <div id={MAPID} style={{ width: '100%', height: '100%',}} />
{mapObj ? <Bounds map={mapObj} /> : ''} {mapObj ? <Bounds map={mapObj} /> : ''}
</div > </div >
) )

2
web/client/src/sections/quanju/containers/footer/leadership/centerLeft.js

@ -8,7 +8,7 @@ const CenterLeft = (props) => {
const { dispatch } = props const { dispatch } = props
return ( return (
<> <>
<div style={{ width: "48%", height: "100%", float: "left", marginLeft: "1%" }}> <div style={{ width: "48%", height: "100%", position: "absolute", left: "25%" }}>
<Centerlefttop dispatch={dispatch} /> <Centerlefttop dispatch={dispatch} />
<Centerleftbottom dispatch={dispatch} /> <Centerleftbottom dispatch={dispatch} />
</div> </div>

25
web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js

@ -18,7 +18,7 @@ const Right = (props) => {
setNums(res.payload.data.reportCount.filter((item, index) => { setNums(res.payload.data.reportCount.filter((item, index) => {
return item.projectType == "road" return item.projectType == "road"
})) }))
console.log(res.payload.data); // console.log(res.payload.data);
}) })
}, []) }, [])
useEffect(() => { useEffect(() => {
@ -33,6 +33,7 @@ const Right = (props) => {
return ( return (
<div style={{ width: "100%", height: "100%" }}> <div style={{ width: "100%", height: "100%" }}>
{/* <Spin spinning={!nums} tip="Loading" style={{ width: "100%", height: "100%" }}> */}
{ {
list.map((item, index) => { list.map((item, index) => {
return ( return (
@ -53,30 +54,35 @@ const Right = (props) => {
) )
}) })
} }
{/* </Spin> */}
</div> </div>
) )
} }
return ( return (
<> <>
{/* <Spin spinning={!nums && list && roads} tip="Loading" size="large" > */}
<div style={{ width: "100%", height: "100%", float: "right", marginRight: "1%", position: "relative" }}> <div style={{ width: "100%", height: "100%", float: "right", marginRight: "1%", position: "relative" }}>
<div style={{ width: "100%", height: "43%", position: "relative", left: "1%" }}> <div style={{ width: "100%", height: "43%", position: "relative", left: "1%" }}>
<div style={{ width: "96%", position: "relative", left: "2%" }}> <div style={{ width: "96%", position: "relative", left: "2%" }}>
<p style={{ position: "absolute", color: "rgba(216,240,255,0.8)", top: "10px" }}>占比<span style={{ fontFamily: " PingFangSC-Regular, PingFang SC" }}>{((roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)}</span>%</p> {/* <Spin spinning={!roads} tip="Loading" > */}
<p style={{ width: "50%", position: "absolute", right: "0%", fontFamily: "YouSheBiaoTiHei", textAlign: "right", fontSize: "24px", color: "#F5FCFF", marginLeft: "10%" }}>{roads?.["县"].toFixed(3)}<span style={{ color: "#F5FCFF", fontSize: "16px", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}>公里</span><span style={{ fontSize: "18px", color: "rgba(216,240,255,0.8)", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span></p> <p style={{ position: "absolute", color: "rgba(216,240,255,0.8)", top: "10px" }}>占比<span style={{ fontFamily: " PingFangSC-Regular, PingFang SC" }}>{isNaN(((roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)) ? "" : ((roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)}</span>%</p>
<p style={{ width: "50%", position: "absolute", right: "0%", fontFamily: "YouSheBiaoTiHei", textAlign: "right", fontSize: "24px", color: "#F5FCFF", marginLeft: "10%" }}>{isNaN(roads?.["县"].toFixed(3)) ? "" : roads?.["县"].toFixed(3)}<span style={{ color: "#F5FCFF", fontSize: "16px", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}>公里</span><span style={{ fontSize: "18px", color: "rgba(216,240,255,0.8)", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span></p>
{/* </Spin> */}
</div> </div>
<div style={{ width: "96%", position: "relative", left: "2%", height: "50%" }}> <div style={{ width: "96%", position: "relative", left: "2%", height: "50%" }}>
<div style={{ width: parseInt((roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100) + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%" }}> <div style={{ width: parseInt((roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100) + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%" }}>
</div> </div>
{/* <div style={{ width: "15%", height: "20%", backgroundColor: "#df0001", float: "left", marginTop: "5.6%" }}>
</div> */}
<div style={{ width: parseInt(((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100) + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#0A72FF", float: "left", marginTop: "5.6%" }}></div> <div style={{ width: parseInt(((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100) + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#0A72FF", float: "left", marginTop: "5.6%" }}></div>
</div> </div>
<div style={{ width: "96%", position: "relative", left: "2%" }}> <div style={{ width: "96%", position: "relative", left: "2%" }}>
<p style={{ width: "50%", position: "absolute", color: "rgba(216,240,255,0.8)", fontSize: "18px" }}>乡村道道路<span style={{ marginLeft: "4%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF" }}>{(roads?.["乡"] + roads?.["村"]).toFixed(3)}</span><span style={{ marginLeft: "4%" }}></span></p> {/* <Spin spinning={!roads} tip="Loading" > */}
<p style={{ position: "absolute", right: "0", color: "rgba(216,240,255,0.8)", top: "10px" }}>占比<span>{(((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)}</span><span>%</span></p>
<p style={{ width: "50%", position: "absolute", color: "rgba(216,240,255,0.8)", fontSize: "18px" }}>乡村道道路<span style={{ marginLeft: "4%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF" }}>{isNaN((roads?.["乡"] + roads?.["村"]).toFixed(3)) ? "" : (roads?.["乡"] + roads?.["村"]).toFixed(3)}</span><span style={{ marginLeft: "4%" }}></span></p>
<p style={{ position: "absolute", right: "0", color: "rgba(216,240,255,0.8)", top: "10px" }}>占比<span>{isNaN((((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)) ? "" : (((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)}</span><span>%</span></p>
{/* </Spin> */}
</div> </div>
</div> </div>
<div style={{ height: "80%", width: "100%", position: "relative", left: "5%", top: "-8%" }}> <div style={{ height: "80%", width: "100%", position: "relative", left: "5%", top: "-8%" }}>
@ -84,7 +90,7 @@ const Right = (props) => {
{/* <p>{title || []}</p> */} {/* <p>{title || []}</p> */}
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "-1%", top: "23%" }} /> <img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "-1%", top: "23%" }} />
<span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "3%" }}>养护事件</span> <span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "3%" }}>养护事件</span>
<p style={{ position: "absolute", color: "#D8F0FF", fontSize: "14px", right: "6%" }}><span style={{ marginLeft: "-20%" }}>道路</span><span style={{ fontSize: "18px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", marginLeft: "10%" }}>{nums ? nums[0]?.count : []}</span><span style={{ marginLeft: "10%" }}></span></p> <p style={{ position: "absolute", color: "#D8F0FF", fontSize: "14px", right: "6%" }}><span style={{ marginLeft: "-20%" }}>道路</span><span style={{ fontSize: "18px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", marginLeft: "10%" }}>{nums ? nums[0]?.count : 0}</span><span style={{ marginLeft: "10%" }}></span></p>
{/* <img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "34px", position: "absolute", top: "12px", left: "6%" }} /> */} {/* <img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "34px", position: "absolute", top: "12px", left: "6%" }} /> */}
</div> </div>
{/* <Spin spinning={true} style={{ height: "80%" }}> */} {/* <Spin spinning={true} style={{ height: "80%" }}> */}
@ -99,6 +105,7 @@ const Right = (props) => {
</div> </div>
</div> </div>
{/* </Spin> */}
</> </>
) )
} }

17
web/client/src/sections/quanju/containers/footer/leadership/centerleft/handong.js

@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react'
import Lun from "../right/lunbo" import Lun from "../right/lunbo"
import { getRoadmaintain, getdaolutongji } from "../../../../actions/example" import { getRoadmaintain, getdaolutongji } from "../../../../actions/example"
import moment from 'moment' import moment from 'moment'
// import { Spin } from 'antd'
const Right = (props) => { const Right = (props) => {
@ -34,6 +35,8 @@ const Right = (props) => {
return ( return (
<div style={{ width: "100%", height: "100%" }}> <div style={{ width: "100%", height: "100%" }}>
{/* <Spin spinning={!nums} tip="Loading" style={{ width: "100%", height: "100%" }}> */}
{ {
list.map((item, index) => { list.map((item, index) => {
console.log(list); console.log(list);
@ -57,17 +60,20 @@ const Right = (props) => {
) )
}) })
} }
{/* </Spin> */}
</div> </div>
) )
} }
return ( return (
<> <>
<div style={{ width: "100%", height: "100%", float: "right", marginRight: "1%", position: "relative" }}> <div style={{ width: "100%", height: "100%", float: "right", marginRight: "1%", position: "relative" }}>
<div style={{ width: "100%", height: "43%", position: "relative", left: "1%" }}> <div style={{ width: "100%", height: "43%", position: "relative", left: "1%" }}>
{/* <Spin spinning={!roads} tip="Loading" ></Spin> */}
<div style={{ width: "96%", position: "relative", left: "2%" }}> <div style={{ width: "96%", position: "relative", left: "2%" }}>
<p style={{ position: "absolute", color: "rgba(216,240,255,0.8)", top: "10px" }}>占比<span style={{ fontFamily: " PingFangSC-Regular, PingFang SC" }}>{((roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)}</span>%</p> <p style={{ position: "absolute", color: "rgba(216,240,255,0.8)", top: "10px" }}>占比<span style={{ fontFamily: " PingFangSC-Regular, PingFang SC" }}>{isNaN(((roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)) ? "" : ((roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)}</span>%</p>
<p style={{ width: "50%", position: "absolute", right: "0%", textAlign: "right", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF", marginLeft: "10%" }}>{roads?.["县"].toFixed(0)}<span style={{ color: "#F5FCFF", fontSize: "16px", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span><span style={{ fontSize: "18px", color: "rgba(216,240,255,0.8)", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span></p> <p style={{ width: "50%", position: "absolute", right: "0%", textAlign: "right", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF", marginLeft: "10%" }}>{isNaN(roads?.["县"].toFixed(0)) ? "" : roads?.["县"].toFixed(0)}<span style={{ color: "#F5FCFF", fontSize: "16px", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span><span style={{ fontSize: "18px", color: "rgba(216,240,255,0.8)", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span></p>
</div> </div>
<div style={{ width: "96%", position: "relative", left: "2%", height: "50%" }}> <div style={{ width: "96%", position: "relative", left: "2%", height: "50%" }}>
<div style={{ width: parseInt((roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100) + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%" }}> <div style={{ width: parseInt((roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100) + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%" }}>
@ -79,16 +85,17 @@ const Right = (props) => {
<div style={{ width: parseInt(((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100) + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#0A72FF", float: "left", marginTop: "5.6%" }}></div> <div style={{ width: parseInt(((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100) + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#0A72FF", float: "left", marginTop: "5.6%" }}></div>
</div> </div>
<div style={{ width: "96%", position: "relative", left: "2%" }}> <div style={{ width: "96%", position: "relative", left: "2%" }}>
<p style={{ width: "50%", position: "absolute", color: "rgba(216,240,255,0.8)", fontSize: "18px" }}>乡村涵洞<span style={{ marginLeft: "4%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF" }}>{(roads?.["乡"] + roads?.["村"]).toFixed(0)}</span><span style={{ marginLeft: "4%" }}></span></p> <p style={{ width: "50%", position: "absolute", color: "rgba(216,240,255,0.8)", fontSize: "18px" }}>乡村涵洞<span style={{ marginLeft: "4%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF" }}>{isNaN((roads?.["乡"] + roads?.["村"]).toFixed(0)) ? "" : (roads?.["乡"] + roads?.["村"]).toFixed(0)}</span><span style={{ marginLeft: "4%" }}></span></p>
<p style={{ position: "absolute", right: "0", color: "rgba(216,240,255,0.8)", top: "10px" }}>占比<span>{(((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)}</span><span>%</span></p> <p style={{ position: "absolute", right: "0", color: "rgba(216,240,255,0.8)", top: "10px" }}>占比<span>{isNaN((((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)) ? "" : (((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])) * 100).toFixed(2)}</span><span>%</span></p>
</div> </div>
</div> </div>
<div style={{ height: "80%", width: "100%", position: "relative", left: "5%", top: "-8%" }}> <div style={{ height: "80%", width: "100%", position: "relative", left: "5%", top: "-8%" }}>
<div style={{ width: "100%", height: "40px"/* , backgroundColor: "#fff" */, position: "relative" }}> <div style={{ width: "100%", height: "40px"/* , backgroundColor: "#fff" */, position: "relative" }}>
{/* <p>{title || []}</p> */} {/* <p>{title || []}</p> */}
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "-1%", top: "23%" }} /> <img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "-1%", top: "23%" }} />
<span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "3%" }}>养护事件</span> <span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "3%" }}>养护事件</span>
<p style={{ position: "absolute", color: "#D8F0FF", fontSize: "14px", right: "6%" }}><span style={{ marginLeft: "-20%" }}>涵洞</span><span style={{ fontSize: "18px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", marginLeft: "10%" }}>{nums ? nums[0]?.count : []}</span><span style={{ marginLeft: "10%" }}></span></p> <p style={{ position: "absolute", color: "#D8F0FF", fontSize: "14px", right: "6%" }}><span style={{ marginLeft: "-20%" }}>涵洞</span><span style={{ fontSize: "18px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", marginLeft: "10%" }}>{nums ? nums[0]?.count : 0}</span><span style={{ marginLeft: "10%" }}></span></p>
{/* <img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "34px", position: "absolute", top: "12px", left: "6%" }} /> */} {/* <img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "34px", position: "absolute", top: "12px", left: "6%" }} /> */}
</div> </div>
<Lun <Lun

10
web/client/src/sections/quanju/containers/footer/leadership/centerleft/qiqoliang.js

@ -61,8 +61,8 @@ const Right = (props) => {
<div style={{ width: "100%", height: "43%", position: "relative", left: "1%" }}> <div style={{ width: "100%", height: "43%", position: "relative", left: "1%" }}>
<div style={{ width: "96%", position: "relative", left: "2%" }}> <div style={{ width: "96%", position: "relative", left: "2%" }}>
<p style={{ position: "absolute", color: "rgba(216,240,255,0.8)", top: "10px" }}>占比<span style={{ fontFamily: " PingFangSC-Regular, PingFang SC" }}>{((roads?.["大桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])) * 100).toFixed(2)}</span>%</p> <p style={{ position: "absolute", color: "rgba(216,240,255,0.8)", top: "10px" }}>占比<span style={{ fontFamily: " PingFangSC-Regular, PingFang SC" }}>{isNaN(((roads?.["大桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])) * 100).toFixed(2)) ? "" : ((roads?.["大桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])) * 100).toFixed(2)}</span>%</p>
<p style={{ width: "25%", position: "absolute", right: "0%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF", marginLeft: "10%", textAlign: "right" }}>{roads?.["大桥"]}<span style={{ color: "#F5FCFF", fontSize: "16px", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span><span style={{ fontSize: "18px", color: "rgba(216,240,255,0.8)", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span></p> <p style={{ width: "25%", position: "absolute", right: "0%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF", marginLeft: "10%", textAlign: "right" }}>{isNaN(roads?.["大桥"]) ? "" : roads?.["大桥"]}<span style={{ color: "#F5FCFF", fontSize: "16px", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span><span style={{ fontSize: "18px", color: "rgba(216,240,255,0.8)", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span></p>
</div> </div>
<div style={{ width: "96%", position: "relative", left: "2%", height: "50%" }}> <div style={{ width: "96%", position: "relative", left: "2%", height: "50%" }}>
<div style={{ width: parseInt((roads?.["大桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])) * 100) + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%" }}> <div style={{ width: parseInt((roads?.["大桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])) * 100) + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%" }}>
@ -74,8 +74,8 @@ const Right = (props) => {
{/* <div style={{ width: (roads?.["小桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])).toFixed(2) * 100 + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%", borderRadius: "0 2% 2% 0" }}></div> */} {/* <div style={{ width: (roads?.["小桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])).toFixed(2) * 100 + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%", borderRadius: "0 2% 2% 0" }}></div> */}
</div> </div>
<div style={{ width: "96%", position: "relative", left: "2%" }}> <div style={{ width: "96%", position: "relative", left: "2%" }}>
<p style={{ width: "50%", position: "absolute", color: "rgba(216,240,255,0.8)", fontSize: "18px" }}>中小桥梁<span style={{ marginLeft: "4%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF" }}>{roads?.["小桥"] + roads?.["中桥"]}</span><span style={{ marginLeft: "4%" }}></span></p> <p style={{ width: "50%", position: "absolute", color: "rgba(216,240,255,0.8)", fontSize: "18px" }}>中小桥梁<span style={{ marginLeft: "4%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF" }}>{isNaN(roads?.["小桥"] + roads?.["中桥"]) ? "" : roads?.["小桥"] + roads?.["中桥"]}</span><span style={{ marginLeft: "4%" }}></span></p>
<p style={{ position: "absolute", right: "0", color: "rgba(216,240,255,0.8)", top: "10px" }}>占比<span>{(((roads?.["小桥"] + roads?.["中桥"]) / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])) * 100).toFixed(2)}</span><span>%</span></p> <p style={{ position: "absolute", right: "0", color: "rgba(216,240,255,0.8)", top: "10px" }}>占比<span>{isNaN((((roads?.["小桥"] + roads?.["中桥"]) / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])) * 100).toFixed(2)) ? "" : (((roads?.["小桥"] + roads?.["中桥"]) / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])) * 100).toFixed(2)}</span><span>%</span></p>
</div> </div>
</div> </div>
<div style={{ height: "80%", width: "100%", position: "relative", left: "5%", top: "-8%" }}> <div style={{ height: "80%", width: "100%", position: "relative", left: "5%", top: "-8%" }}>
@ -83,7 +83,7 @@ const Right = (props) => {
{/* <p>{title || []}</p> */} {/* <p>{title || []}</p> */}
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "-1%", top: "23%" }} /> <img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "-1%", top: "23%" }} />
<span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "3%" }}>养护事件</span> <span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "3%" }}>养护事件</span>
<p style={{ position: "absolute", color: "#D8F0FF", fontSize: "14px", right: "6%" }}><span style={{ marginLeft: "-20%" }}>桥梁</span><span style={{ fontSize: "18px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", marginLeft: "10%" }}>{nums ? nums[0]?.count : []}</span><span style={{ marginLeft: "10%" }}></span></p> <p style={{ position: "absolute", color: "#D8F0FF", fontSize: "14px", right: "6%" }}><span style={{ marginLeft: "-20%" }}>桥梁</span><span style={{ fontSize: "18px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", marginLeft: "10%" }}>{nums ? nums[0]?.count : 0}</span><span style={{ marginLeft: "10%" }}></span></p>
{/* <img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "34px", position: "absolute", top: "12px", left: "6%" }} /> */} {/* <img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "34px", position: "absolute", top: "12px", left: "6%" }} /> */}
</div> </div>
<Lun <Lun

6
web/client/src/sections/quanju/containers/footer/leadership/centerleft/top.js

@ -39,7 +39,7 @@ const Leftcenter = (props) => {
</div> </div>
<div style={{ width: "50%", height: "100%", position: "absolute", left: "50%", top: "11%" }}> <div style={{ width: "50%", height: "100%", position: "absolute", left: "50%", top: "11%" }}>
<p style={{ fontSize: "2vh", color: "#D8F0FF", fontFamily: "PingFangSC-Regular, PingFang SC", marginTop: "3%" }}>道路统计<span style={{ marginLeft: "10px", color: "rgba(216,240,255,0.8000)" }}>公里</span></p> <p style={{ fontSize: "2vh", color: "#D8F0FF", fontFamily: "PingFangSC-Regular, PingFang SC", marginTop: "3%" }}>道路统计<span style={{ marginLeft: "10px", color: "rgba(216,240,255,0.8000)" }}>公里</span></p>
<p style={{ fontFamily: "YouSheBiaoTiHei", color: "#ffffff", fontSize: "2.5vh", marginTop: "-2%" }}>{(list?.["县"] + list?.["乡"] + list?.["村"]).toFixed(3)}</p> <p style={{ fontFamily: "YouSheBiaoTiHei", color: "#ffffff", fontSize: "2.5vh", marginTop: "-2%" }}>{isNaN((list?.["县"] + list?.["乡"] + list?.["村"]).toFixed(3)) ? "" : (list?.["县"] + list?.["乡"] + list?.["村"]).toFixed(3)}</p>
</div> </div>
</div> </div>
<div style={{ width: "30%", height: "10vh", backgroundColor: "", position: "relative", left: "35%", top: "-105%" }} onClick={() => { <div style={{ width: "30%", height: "10vh", backgroundColor: "", position: "relative", left: "35%", top: "-105%" }} onClick={() => {
@ -53,7 +53,7 @@ const Leftcenter = (props) => {
</div> </div>
<div style={{ width: "50%", height: "100%", position: "absolute", left: "50%", top: "8%" }}> <div style={{ width: "50%", height: "100%", position: "absolute", left: "50%", top: "8%" }}>
<p style={{ fontSize: "2vh", color: "#D8F0FF", fontFamily: "PingFangSC-Regular, PingFang SC", marginTop: "3%" }}>涵洞统计<span style={{ fontSize: "14px", marginLeft: "10px", color: "rgba(216,240,255,0.8000)" }}></span></p> <p style={{ fontSize: "2vh", color: "#D8F0FF", fontFamily: "PingFangSC-Regular, PingFang SC", marginTop: "3%" }}>涵洞统计<span style={{ fontSize: "14px", marginLeft: "10px", color: "rgba(216,240,255,0.8000)" }}></span></p>
<p style={{ fontFamily: "YouSheBiaoTiHei", color: "#ffffff", fontSize: "2.5vh" }}>{(culvert?.["县"] + culvert?.["乡"] + culvert?.["村"]).toFixed(0)}</p> <p style={{ fontFamily: "YouSheBiaoTiHei", color: "#ffffff", fontSize: "2.5vh" }}>{isNaN((culvert?.["县"] + culvert?.["乡"] + culvert?.["村"]).toFixed(0)) ? "" : (culvert?.["县"] + culvert?.["乡"] + culvert?.["村"]).toFixed(0)}</p>
</div> </div>
</div> </div>
<div style={{ width: "30%", height: "10vh", backgroundColor: "", position: "relative", left: "68%", top: "-315%" }} onClick={() => { <div style={{ width: "30%", height: "10vh", backgroundColor: "", position: "relative", left: "68%", top: "-315%" }} onClick={() => {
@ -67,7 +67,7 @@ const Leftcenter = (props) => {
</div> </div>
<div style={{ width: "50%", height: "100%", position: "absolute", left: "50%", top: "8%" }}> <div style={{ width: "50%", height: "100%", position: "absolute", left: "50%", top: "8%" }}>
<p style={{ fontSize: "2vh", color: "#D8F0FF", fontFamily: "PingFangSC-Regular, PingFang SC", marginTop: "3%" }}>桥梁统计<span style={{ fontSize: "14px", marginLeft: "10px", color: "rgba(216,240,255,0.8000)" }}></span></p> <p style={{ fontSize: "2vh", color: "#D8F0FF", fontFamily: "PingFangSC-Regular, PingFang SC", marginTop: "3%" }}>桥梁统计<span style={{ fontSize: "14px", marginLeft: "10px", color: "rgba(216,240,255,0.8000)" }}></span></p>
<p style={{ fontFamily: "YouSheBiaoTiHei", color: "#ffffff", fontSize: "2.5vh", marginTop: "-2%" }}>{(bridge?.["小桥"] + bridge?.["中桥"] + bridge?.["大桥"])}</p> <p style={{ fontFamily: "YouSheBiaoTiHei", color: "#ffffff", fontSize: "2.5vh", marginTop: "-2%" }}>{isNaN((bridge?.["小桥"] + bridge?.["中桥"] + bridge?.["大桥"])) ? "" : (bridge?.["小桥"] + bridge?.["中桥"] + bridge?.["大桥"])}</p>
</div> </div>
</div> </div>
</div> </div>

2
web/client/src/sections/quanju/containers/footer/leadership/left.js

@ -7,7 +7,7 @@ const Left = (props) => {
const { dispatch } = props const { dispatch } = props
return ( return (
<> <>
<div style={{ width: "23%", height: "100%", float: "left", marginLeft: "1%" }}> <div style={{ width: "23%", height: "100%", position: "absolute", left: "1%" }}>
<Lefttop dispatch={dispatch} /> <Lefttop dispatch={dispatch} />
<Leftbottom dispatch={dispatch} /> <Leftbottom dispatch={dispatch} />

12
web/client/src/sections/quanju/containers/footer/leadership/left/echarts/lefttopecharts.js

@ -104,13 +104,13 @@ const Lefttopecharts = (props) => {
if (value !== 0) { if (value !== 0) {
// var num = Math.round(value); // var num = Math.round(value);
return ( return (
value + isNaN(value) ? "" : value +
"\n" + "\n" +
"\n" + "\n" +
"\n" + "\n" +
"\n" + "\n" +
"\n" "\n"
); );
} else { } else {

5
web/client/src/sections/quanju/containers/footer/leadership/left/left-top.js

@ -15,9 +15,12 @@ const Lefttop = (props) => {
const shuju = dispatch(getGodshuju()).then((res) => { const shuju = dispatch(getGodshuju()).then((res) => {
// console.log(res); // console.log(res);
setMass(res.payload.data.index) setMass(res.payload.data.index)
// setMass(70)
setspeed(res.payload.data.speed) setspeed(res.payload.data.speed)
}) })
}, []) }, [])
// console.log(mass);
return ( return (
<> <>
<Module style={style} title={"道路拥堵指数"} > <Module style={style} title={"道路拥堵指数"} >
@ -45,7 +48,7 @@ const Lefttop = (props) => {
fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", color: "rgba(216,240,255,0.8000)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", color: "rgba(216,240,255,0.8000)",
position: "absolute", left: "30%", top: "65%" position: "absolute", left: "30%", top: "65%"
}}>预测明日</p> }}>预测明日</p>
<p style={{ fontSize: "24px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", position: "absolute", top: "72%", left: "30%" }}>{(speed + ((Math.random() * (6) - 3))).toFixed(2)}<span style={{ fontSize: "2px", color: "#EEF4FF" }}>Km/h</span></p> <p style={{ fontSize: "24px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", position: "absolute", top: "72%", left: "30%" }}>{isNaN((speed + ((Math.random() * (6) - 3))).toFixed(2)) ? "" : (speed + ((Math.random() * (6) - 3))).toFixed(2)}<span style={{ fontSize: "2px", color: "#EEF4FF" }}>Km/h</span></p>
</div> </div>
</div> </div>

2
web/client/src/sections/quanju/containers/footer/leadership/right.js

@ -7,7 +7,7 @@ const Right = (props) => {
const { dispatch } = props const { dispatch } = props
return ( return (
<> <>
<div style={{ width: "25%", height: "100%", float: "right", marginRight: "1%" }}> <div style={{ width: "25%", height: "100%", position: "absolute", left: "74%" }}>
<Righttop dispatch={dispatch} /> <Righttop dispatch={dispatch} />
<Rightbottom dispatch={dispatch} /> <Rightbottom dispatch={dispatch} />
</div> </div>

4
web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js

@ -22,6 +22,7 @@ const Rightbottom = (props) => {
const renderBody = () => { const renderBody = () => {
return ( return (
<div style={{ width: "100%", height: "50%" }}> <div style={{ width: "100%", height: "50%" }}>
{/* <Spin spinning={!list} tip="Loading" size="large"> */}
{list?.map((item, index) => { {list?.map((item, index) => {
return <li style={{ width: "100%", height: "3vh", marginTop: "5px", position: "relative", }} onMouseEnter={() => { return <li style={{ width: "100%", height: "3vh", marginTop: "5px", position: "relative", }} onMouseEnter={() => {
setBeijing(index) setBeijing(index)
@ -38,6 +39,7 @@ const Rightbottom = (props) => {
}) })
} }
{/* </Spin> */}
</div> </div>
) )
} }
@ -47,7 +49,7 @@ const Rightbottom = (props) => {
<div style={{ position: "relative", width: "90%", height: "5%", left: "5%", textAlign: "right", fontSize: "16px", top: "-3%", color: "rgba(216,240,255,0.8)" }}> <div style={{ position: "relative", width: "90%", height: "5%", left: "5%", textAlign: "right", fontSize: "16px", top: "-3%", color: "rgba(216,240,255,0.8)" }}>
<img src='/assets/images/leadership/jiejue.png' style={{ width: "4.5%", height: "2vh", marginTop: "-1%" }} /> <img src='/assets/images/leadership/jiejue.png' style={{ width: "4.5%", height: "2vh", marginTop: "-1%" }} />
已处理<span style={{ color: "#FFFFFF", fontSize: "18px", paddingLeft: "2%", paddingRight: "2%" }}>{nums}</span> 已处理<span style={{ color: "#FFFFFF", fontSize: "18px", paddingLeft: "2%", paddingRight: "2%" }}>{nums ? nums : 0}</span>
</div> </div>
<div style={{ width: "90%", height: "3vh", backgroundColor: "rgba(21,77,160,0.2)", position: "relative", left: "5%", top: "5%" }}> <div style={{ width: "90%", height: "3vh", backgroundColor: "rgba(21,77,160,0.2)", position: "relative", left: "5%", top: "5%" }}>
<p style={{ width: "30%", fontSize: "12px", color: "#FFFFFF", height: "100%", textAlign: "center", position: "absolute", lineHeight: "3vh" }}>车牌号</p> <p style={{ width: "30%", fontSize: "12px", color: "#FFFFFF", height: "100%", textAlign: "center", position: "absolute", lineHeight: "3vh" }}>车牌号</p>

4
web/client/src/sections/quanju/containers/footer/leadership/right/right-top.js

@ -77,8 +77,8 @@ const Righttop = () => {
<Module style={style} title={"路面执法监控"}> <Module style={style} title={"路面执法监控"}>
<div style={{ width: "100%", height: "65%", position: "relative" }}> <div style={{ width: "100%", height: "65%", position: "relative" }}>
<p style={{ position: "absolute", left: "30%", top: "2%", fontSize: "14px", color: "#FFFFFF" }}>监控总数</p><p style={{ position: "absolute", left: "42%", fontSize: "24px", marginLeft: "1%", top: "-0.5%", color: "#FFFFFF", fontFamily: "YouSheBiaoTiHei" }}>129</p> <p style={{ position: "absolute", left: "25%", top: "2%", fontSize: "14px", color: "#FFFFFF" }}>监控总数</p><p style={{ position: "absolute", left: "37%", fontSize: "24px", marginLeft: "1%", top: "-0.5%", color: "#FFFFFF", fontFamily: "YouSheBiaoTiHei" }}>129</p>
<p style={{ position: "absolute", left: "60%", top: "2%", fontSize: "14px", color: "#FFFFFF" }}>在线率</p><p style={{ position: "absolute", left: "68%", fontSize: "24px", marginLeft: "2%", top: "-0.5%", color: "#FFFFFF", fontFamily: "YouSheBiaoTiHei" }}>88.87%</p> <p style={{ position: "absolute", left: "55%", top: "2%", fontSize: "14px", color: "#FFFFFF" }}>在线率</p><p style={{ position: "absolute", right: "15%", fontSize: "24px", marginLeft: "2%", top: "-0.5%", color: "#FFFFFF", fontFamily: "YouSheBiaoTiHei" }}>88.87%</p>
<div style={{ width: "100%", height: "10%", position: "relative" }}> <div style={{ width: "100%", height: "10%", position: "relative" }}>
<img src='/assets/images/leadership/head.png' style={{ width: "15%", marginLeft: "5%" }} /> <img src='/assets/images/leadership/head.png' style={{ width: "15%", marginLeft: "5%" }} />

2
web/client/src/sections/quanju/containers/footer/operation/index.js

@ -17,7 +17,7 @@ const Operation = (props) => {
}, []) }, [])
return ( return (
<div style={{ display: 'flex', width: '100%', height: '100%', justifyContent: 'space-between' }}> <div style={{ width: '100%', height: '100%' }}>
<Left roadData={roadData} loading={loading} /> <Left roadData={roadData} loading={loading} />
<Right roadData={roadData} loading={loading} /> <Right roadData={roadData} loading={loading} />
</div> </div>

2
web/client/src/sections/quanju/containers/footer/operation/left.js

@ -128,7 +128,7 @@ const Left = (props) => {
setTreeDataList(dataList) setTreeDataList(dataList)
}, [busTier]) }, [busTier])
return ( return (
<div style={{ display: 'flex', flexDirection: 'column', width: "23%", height: "100%", marginLeft: "1%" }}> <div style={{ position:'absolute',left:0, width: "23%", height: "100%", marginLeft: "1%" }}>
<Module style={style} customize={true} title={"公交车辆信息"}> <Module style={style} customize={true} title={"公交车辆信息"}>
<div style={{ width: '90%', height: '96%', margin: '2% 5%', overflow: 'hidden' }}> <div style={{ width: '90%', height: '96%', margin: '2% 5%', overflow: 'hidden' }}>
<div style={{ border: '1px solid rgba(10, 114, 255, 1)', backgroundColor: 'rgba(10, 114, 255, 0.1)' }}> <div style={{ border: '1px solid rgba(10, 114, 255, 1)', backgroundColor: 'rgba(10, 114, 255, 0.1)' }}>

2
web/client/src/sections/quanju/containers/footer/operation/right.js

@ -23,7 +23,7 @@ const Right = () => {
]) ])
const style = { height: "97%", marginTop: "3%" } const style = { height: "97%", marginTop: "3%" }
return ( return (
<div style={{ display: 'flex', flexDirection: 'column', width: "23%", height: "100%", marginRight: "1%", }}> <div style={{ position:'absolute',right:0, width: "23%", height: "100%", marginRight: "1%", }}>
<Module style={style} customize={true} title={"车辆视频监控"}> <Module style={style} customize={true} title={"车辆视频监控"}>
<div style={{ width: '90%', height: '96%', margin: '2% 5%', overflow: 'hidden' }}> <div style={{ width: '90%', height: '96%', margin: '2% 5%', overflow: 'hidden' }}>
<Carousel <Carousel

4
web/config.js

@ -15,12 +15,14 @@ dev && console.log('\x1B[33m%s\x1b[0m', '请遵循并及时更新 readme.md,
// // 启动参数 // // 启动参数
args.option(['p', 'port'], '启动端口'); args.option(['p', 'port'], '启动端口');
args.option(['u', 'api-url'], 'webapi的URL'); args.option(['u', 'api-url'], 'webapi的URL');
args.option('apiUrl', '可外网访问的 webapi 的URL');
args.option(['r', 'report-node'], '报表进程地址'); args.option(['r', 'report-node'], '报表进程地址');
args.option('qndmn', '七牛'); args.option('qndmn', '七牛');
const flags = args.parse(process.argv); const flags = args.parse(process.argv);
const FS_UNIAPP_API = process.env.FS_UNIAPP_API || flags.apiUrl; const FS_UNIAPP_API = process.env.FS_UNIAPP_API || flags.apiUrl;
const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURC || flags.qndmn; const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURC || flags.qndmn;
const API_URL = process.env.API_URL || flags.apiUrl;
if (!FS_UNIAPP_API) { if (!FS_UNIAPP_API) {
console.log('缺少启动参数,异常退出'); console.log('缺少启动参数,异常退出');
@ -52,7 +54,7 @@ const product = {
}, { }, {
entry: require('./routes').entry, entry: require('./routes').entry,
opts: { opts: {
apiUrl: FS_UNIAPP_API, apiUrl: API_URL,
qndmn: QINIU_DOMAIN_QNDMN_RESOURCE, qndmn: QINIU_DOMAIN_QNDMN_RESOURCE,
staticRoot: './client', staticRoot: './client',
} }

Loading…
Cancel
Save