Browse Source

Merge branch 'dev' of https://gitea.anxinyun.cn/gao.zhiyuan/Highways4Good into dev

release_0.0.4
巴林闲侠 3 years ago
parent
commit
db36d560eb
  1. 3
      weapp/src/app.config.js
  2. 2
      weapp/src/packages/components/inputPicker/index.jsx
  3. 332
      weapp/src/packages/patrol/index.jsx
  4. 37
      weapp/src/packages/patrol/index.scss
  5. 2
      weapp/src/packages/patrolView/index.jsx
  6. 11
      weapp/src/services/api.js
  7. 6
      web/client/index.ejs
  8. 6
      web/client/index.html
  9. 46
      web/client/src/sections/quanju/containers/example.js
  10. 8
      web/client/src/sections/quanju/containers/footer/build/style.less
  11. 2
      web/client/src/sections/quanju/containers/footer/conserve/left/left-center.js
  12. 9
      web/client/src/sections/quanju/containers/footer/guanli/index.js
  13. 4
      web/client/src/sections/quanju/containers/footer/guanli/style.less
  14. 6
      web/client/src/sections/quanju/containers/footer/operation/right.js
  15. 1
      web/client/src/sections/quanju/containers/footer/operation/style.less
  16. 4
      web/client/src/sections/quanju/containers/public/noData.js
  17. 9
      web/client/src/sections/quanju/style.less

3
weapp/src/app.config.js

@ -16,6 +16,9 @@ export default {
"desc": '需要获取您的地理位置' "desc": '需要获取您的地理位置'
} }
}, },
requiredPrivateInfos: [
'getLocation',
],
window: { window: {
backgroundTextStyle: 'light', backgroundTextStyle: 'light',
navigationBarBackgroundColor: "#2C66F3", navigationBarBackgroundColor: "#2C66F3",

2
weapp/src/packages/components/inputPicker/index.jsx

@ -17,7 +17,7 @@ export default function InputPicker(props) {
function handleInput({ detail: { value: v } }) { function handleInput({ detail: { value: v } }) {
onInput(v) onInput(v)
if (v) { if (v) {
setCurSelector(selector.filter(item => item.includes(v))) setCurSelector(selector.filter(item => item && item.includes(v)))
} else { } else {
setCurSelector(selector) setCurSelector(selector)
} }

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

@ -1,18 +1,10 @@
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import Taro, { useRouter } from '@tarojs/taro'; import Taro, { useRouter } from '@tarojs/taro';
import { import { View, RadioGroup, Radio, Image, Input, Picker } from '@tarojs/components';
View, import { AtButton, AtTextarea, AtImagePicker } from 'taro-ui';
RadioGroup,
Radio,
Button,
Image,
Input,
Picker
} from '@tarojs/components';
import { AtButton, AtTextarea, AtImagePicker, AtAvatar } from 'taro-ui';
import InputPicker from '../components/inputPicker'; import InputPicker from '../components/inputPicker';
import request from '@/services/request'; import request from '@/services/request';
import { postReport, getReportDetail } from '@/services/api'; import { postReport, getReportDetail, delReport, getRoadSection } from '@/services/api';
import './index.scss'; import './index.scss';
import arrowIcon from '../../static/img/patrol/arrow-down.svg'; import arrowIcon from '../../static/img/patrol/arrow-down.svg';
@ -21,7 +13,6 @@ const Index = () => {
const { params: { type } } = router const { params: { type } } = router
const isView = type === 'view' ? true : false const isView = type === 'view' ? true : false
const [reportType, setReportType] = useState('patrol') // const [reportType, setReportType] = useState('patrol') //
const [projectType, setProjectType] = useState('') // const [projectType, setProjectType] = useState('') //
const [road, setRoad] = useState('') // const [road, setRoad] = useState('') //
@ -33,9 +24,16 @@ const Index = () => {
const [conserveBeforePic, setConserveBeforePic] = useState([]) // const [conserveBeforePic, setConserveBeforePic] = useState([]) //
const [conserveUnderwayPic, setConserveUnderwayPic] = useState([]) // const [conserveUnderwayPic, setConserveUnderwayPic] = useState([]) //
const [conserveAfterPic, setConserveAfterPic] = useState([]) // const [conserveAfterPic, setConserveAfterPic] = useState([]) //
const [longitude, setLongitude] = useState(0) //
const [latitude, setLatitude] = useState(0) //
const [sourceRoadSel, setSourceRoadSel] = useState([])
const [sourceRoadStartSel, setSourceRoadStartSel] = useState([])
const [sourceRoadEndSel, setSourceRoadEndSel] = useState([])
const [roadStartSelector, setRoadStartSelector] = useState([]) const prjTypeSelector = ['道路', '桥梁', '涵洞', '其他']
const [roadEndSelector, setRoadEndSelector] = useState([]) const [roadStartSel, setRoadStartSel] = useState([])
const [roadEndSel, setRoadEndSel] = useState([])
const [canReport, setCanReport] = useState(true) const [canReport, setCanReport] = useState(true)
@ -52,17 +50,9 @@ const Index = () => {
} }
]) ])
const rPrjTypeSelector = ['道路', '桥梁', '涵洞', '其他']
const rRoadSelector = ['富山一路', '金沙大道', '玉湖路']
const rRoadStartSelector = ['一段', '二段', '三段']
const rRoadEndSelector = ['一段', '二段', '三段']
useEffect(() => { useEffect(() => {
if (isView) { if (isView) { //
Taro.showLoading({ Taro.showLoading({ title: '加载中' })
title: '加载中'
})
request.get(getReportDetail(router.params.id)).then(res => { request.get(getReportDetail(router.params.id)).then(res => {
Taro.hideLoading() Taro.hideLoading()
if (res.statusCode == 200 || res.statusCode == 204) { if (res.statusCode == 200 || res.statusCode == 204) {
@ -84,10 +74,51 @@ const Index = () => {
}, err => { }, err => {
Taro.showToast({ title: err.message || '请求出错', icon: 'none' }) Taro.showToast({ title: err.message || '请求出错', icon: 'none' })
}) })
} else { //
Taro.showLoading({ title: '加载中' })
let key = 'ODQBZ-3FZAU-6VIVL-2XXNM-F7CP7-WVFCY' // key
Taro.getLocation({
type: 'wgs84',
success: function (res) {
setLongitude(res.longitude)
setLatitude(res.latitude)
Taro.request({
url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${res.latitude},${res.longitude}&key=${key}`,
success: function (res) {
// res
let addresscity = res.data.result.address_component.province + res.data.result.address_component.city + res.data.result.address_component.district
setAddress(addresscity + res.data.result.address_component.street_number)
}
})
}
})
request.get(getRoadSection()).then(res => {
Taro.hideLoading()
if (res.statusCode == 200 || res.statusCode == 204) {
const { data } = res
let nextSourceRoadSel = []
let nextSourceRoadStartSel = []
let nextSourceRoadEndSel = []
data.map(item => {
nextSourceRoadSel.push(item.routeName)
nextSourceRoadStartSel.push(item.startingPlaceName)
nextSourceRoadEndSel.push(item.stopPlaceName)
})
setSourceRoadSel(nextSourceRoadSel)
setSourceRoadStartSel(nextSourceRoadStartSel)
setSourceRoadEndSel(nextSourceRoadEndSel)
} else {
Taro.showToast({ title: res.data.message || '请求出错', icon: 'none' })
}
}, err => {
Taro.showToast({ title: err.message || '请求出错', icon: 'none' })
})
} }
setRoadStartSelector(rRoadStartSelector)
setRoadEndSelector(rRoadEndSelector)
}, []) }, [])
useEffect(() => {
setRoadStartSel(sourceRoadStartSel)
setRoadEndSel(sourceRoadEndSel)
}, [sourceRoadStartSel, sourceRoadEndSel])
useEffect(() => { useEffect(() => {
setTypeList([ setTypeList([
@ -110,7 +141,7 @@ const Index = () => {
Taro.showToast({ title: '请完善必填信息', icon: 'none' }) Taro.showToast({ title: '请完善必填信息', icon: 'none' })
return return
} }
if (rPrjTypeSelector.indexOf(projectType) === -1) { if (prjTypeSelector.indexOf(projectType) === -1) {
Taro.showToast({ title: '工程类型错误', icon: 'none' }) Taro.showToast({ title: '工程类型错误', icon: 'none' })
return return
} }
@ -122,8 +153,8 @@ const Index = () => {
roadSectionEnd, roadSectionEnd,
address, address,
content, content,
// longitude: 37.000000000000, longitude,
// latitude: 69.000000000000 latitude
} }
if (reportType === 'patrol') { if (reportType === 'patrol') {
data['scenePic'] = scenePic.length > 0 ? scenePic.map(item => item.url) : null data['scenePic'] = scenePic.length > 0 ? scenePic.map(item => item.url) : null
@ -165,22 +196,49 @@ const Index = () => {
}) })
} }
function deleteReport() {
Taro.showModal({
title: '提示',
content: '确定删除吗?',
success: function (res) {
if (res.confirm) {
Taro.showLoading({
title: '删除中'
})
request.del(delReport(router.params.id)).then(res => {
Taro.hideLoading()
if (res.statusCode == 200 || res.statusCode == 204) {
Taro.showToast({ title: '删除成功', icon: 'none', duration: 1500 })
setTimeout(() => {
Taro.navigateBack()
}, 1000)
} else {
Taro.showToast({ title: res.data.message || '请求出错', icon: 'none' })
}
}, err => {
Taro.showToast({ title: err.message || '请求出错', icon: 'none' })
})
}
}
})
}
function handleInput({ detail: { value } }, type) { function handleInput({ detail: { value } }, type) {
switch (type) { switch (type) {
case 'roadSectionStart': case 'roadSectionStart':
setRoadSectionStart(value) setRoadSectionStart(value)
if (value) { if (value) {
setRoadStartSelector(rRoadStartSelector.filter(item => item.includes(value))) setRoadStartSel(sourceRoadStartSel.filter(item => item && item.includes(value)))
} else { } else {
setRoadStartSelector(rRoadStartSelector) setRoadStartSel(sourceRoadStartSel)
} }
break; break;
case 'roadSectionEnd': case 'roadSectionEnd':
setRoadSectionEnd(value) setRoadSectionEnd(value)
if (value) { if (value) {
setRoadEndSelector(rRoadEndSelector.filter(item => item.includes(value))) setRoadEndSel(sourceRoadEndSel.filter(item => item && item.includes(value)))
} else { } else {
setRoadEndSelector(rRoadEndSelector) setRoadEndSel(sourceRoadEndSel)
} }
break; break;
case 'address': case 'address':
@ -221,106 +279,6 @@ const Index = () => {
}) })
} }
function renderAddImg() {
return (
reportType === 'patrol' ?
<View className='patrol-img'>
现场图片
<AtImagePicker
className='img-picker'
count={3 - scenePic.length}
showAddBtn={scenePic.length >= 3 ? false : true}
files={scenePic}
onChange={files => handleImgChange(files, 'scenePic')}
onImageClick={handleImgClick}
/>
</View> :
<View className='conserve-img'>
养护图片:
<View className='horizontal-line hl-one'>
<View className='circle c-one'></View>
<View className='text t-one'>养护前</View>
</View>
<AtImagePicker
className='img-picker'
count={3 - conserveBeforePic.length}
showAddBtn={conserveBeforePic.length >= 3 ? false : true}
files={conserveBeforePic}
onChange={files => handleImgChange(files, 'conserveBeforePic')}
onImageClick={handleImgClick}
/>
<View className='horizontal-line hl-two'>
<View className='circle c-two'></View>
<View className='text t-two'>养护中</View>
</View>
<AtImagePicker
className='img-picker'
count={3 - conserveUnderwayPic.length}
showAddBtn={conserveUnderwayPic.length >= 3 ? false : true}
files={conserveUnderwayPic}
onChange={files => handleImgChange(files, 'conserveUnderwayPic')}
onImageClick={handleImgClick}
/>
<View className='horizontal-line hl-three'>
<View className='circle c-three'></View>
<View className='text t-three'>养护后</View>
</View>
<AtImagePicker
className='img-picker'
count={3 - conserveAfterPic.length}
showAddBtn={conserveAfterPic.length >= 3 ? false : true}
files={conserveAfterPic}
onChange={files => handleImgChange(files, 'conserveAfterPic')}
onImageClick={handleImgClick}
/>
</View>
)
}
function renderViewImg() {
return (
reportType === 'patrol' ?
<View className='patrol-img'>
现场图片
<View className='img-box'>
{scenePic.map(item => (
<Image className='img' src={item.url} onClick={() => handleImgClick(undefined, item)} />
))}
</View>
</View> :
<View className='conserve-img'>
养护图片:
<View className='horizontal-line hl-one'>
<View className='circle c-one'></View>
<View className='text t-one'>养护前</View>
</View>
<View className='img-box'>
{conserveBeforePic.map(item => (
<Image className='img' src={item.url} onClick={() => handleImgClick(undefined, item)} />
))}
</View>
<View className='horizontal-line hl-two'>
<View className='circle c-two'></View>
<View className='text t-two'>养护中</View>
</View>
<View className='img-box'>
{conserveUnderwayPic.map(item => (
<Image className='img' src={item.url} onClick={() => handleImgClick(undefined, item)} />
))}
</View>
<View className='horizontal-line hl-three'>
<View className='circle c-three'></View>
<View className='text t-three'>养护后</View>
</View>
<View className='img-box'>
{conserveAfterPic.map(item => (
<Image className='img' src={item.url} onClick={() => handleImgClick(undefined, item)} />
))}
</View>
</View>
)
}
return ( return (
<View className='patrol'> <View className='patrol'>
<View className='report-type'> <View className='report-type'>
@ -350,15 +308,16 @@ const Index = () => {
placeholder='请选择工程类型' placeholder='请选择工程类型'
value={projectType} value={projectType}
onInput={setProjectType} onInput={setProjectType}
selector={rPrjTypeSelector} selector={prjTypeSelector}
isView={isView} isView={isView}
/> />
<InputPicker <InputPicker
key={sourceRoadSel} // keyselector
title='所在道路:' title='所在道路:'
placeholder='请选择或输入您所在的道路' placeholder='请选择或输入您所在的道路'
value={road} value={road}
onInput={setRoad} onInput={setRoad}
selector={rRoadSelector} selector={sourceRoadSel}
isView={isView} isView={isView}
/> />
@ -374,11 +333,11 @@ const Index = () => {
disabled={isView} disabled={isView}
/> />
{ {
isView && !isView &&
<Picker <Picker
mode='selector' mode='selector'
range={roadStartSelector} range={roadStartSel}
onChange={e => setRoadSectionStart(roadStartSelector[e.detail.value])} onChange={e => setRoadSectionStart(roadStartSel[e.detail.value])}
> >
<Image src={arrowIcon} className='img-l' /> <Image src={arrowIcon} className='img-l' />
</Picker> </Picker>
@ -394,11 +353,11 @@ const Index = () => {
disabled={isView} disabled={isView}
/> />
{ {
isView && !isView &&
<Picker <Picker
mode='selector' mode='selector'
range={roadEndSelector} range={roadEndSel}
onChange={e => setRoadSectionEnd(roadEndSelector[e.detail.value])} onChange={e => setRoadSectionEnd(roadEndSel[e.detail.value])}
> >
<Image src={arrowIcon} className='img-r' /> <Image src={arrowIcon} className='img-r' />
</Picker> </Picker>
@ -426,12 +385,95 @@ const Index = () => {
disabled={isView} disabled={isView}
/> />
{ {
isView ? reportType === 'patrol' ?
renderViewImg() : <View className='patrol-img'>
renderAddImg() 现场图片
{
isView ?
<View className='img-box'>
{scenePic.map(item => (
<Image className='img' src={item.url} onClick={() => handleImgClick(undefined, item)} />
))}
</View> :
<AtImagePicker
className='img-picker'
count={3 - scenePic.length}
showAddBtn={scenePic.length >= 3 ? false : true}
files={scenePic}
onChange={files => handleImgChange(files, 'scenePic')}
onImageClick={handleImgClick}
/>
}
</View> :
<View className='conserve-img'>
养护图片:
<View className='horizontal-line hl-one'>
<View className='circle c-one'></View>
<View className='text t-one'>养护前</View>
</View>
{
isView ?
<View className='img-box'>
{conserveBeforePic.map(item => (
<Image className='img' src={item.url} onClick={() => handleImgClick(undefined, item)} />
))}
</View> :
<AtImagePicker
className='img-picker'
count={3 - conserveBeforePic.length}
showAddBtn={conserveBeforePic.length >= 3 ? false : true}
files={conserveBeforePic}
onChange={files => handleImgChange(files, 'conserveBeforePic')}
onImageClick={handleImgClick}
/>
}
<View className='horizontal-line hl-two'>
<View className='circle c-two'></View>
<View className='text t-two'>养护中</View>
</View>
{
isView ?
<View className='img-box'>
{conserveUnderwayPic.map(item => (
<Image className='img' src={item.url} onClick={() => handleImgClick(undefined, item)} />
))}
</View> :
<AtImagePicker
className='img-picker'
count={3 - conserveUnderwayPic.length}
showAddBtn={conserveUnderwayPic.length >= 3 ? false : true}
files={conserveUnderwayPic}
onChange={files => handleImgChange(files, 'conserveUnderwayPic')}
onImageClick={handleImgClick}
/>
}
<View className='horizontal-line hl-three'>
<View className='circle c-three'></View>
<View className='text t-three'>养护后</View>
</View>
{
isView ?
<View className='img-box'>
{conserveAfterPic.map(item => (
<Image className='img' src={item.url} onClick={() => handleImgClick(undefined, item)} />
))}
</View> :
<AtImagePicker
className='img-picker'
count={3 - conserveAfterPic.length}
showAddBtn={conserveAfterPic.length >= 3 ? false : true}
files={conserveAfterPic}
onChange={files => handleImgChange(files, 'conserveAfterPic')}
onImageClick={handleImgClick}
/>
}
</View>
} }
{ {
!isView && <AtButton type='primary' className='sub-btn' onClick={report}>上报</AtButton> isView ?
<AtButton type='primary' className='del-btn' onClick={deleteReport}>删除</AtButton> :
<AtButton type='primary' className='sub-btn' onClick={report}>上报</AtButton>
} }
</View> </View>
) )

37
weapp/src/packages/patrol/index.scss

@ -26,7 +26,7 @@ page {
.road-section { .road-section {
display: flex; display: flex;
justify-content: space-between; justify-content: left;
height: 96px; height: 96px;
align-items: center; align-items: center;
background-color: #fff; background-color: #fff;
@ -38,17 +38,18 @@ page {
.input { .input {
width: 200px; width: 200px;
margin: 0 10px;
} }
.img-r { .img-r {
width: 24px; width: 24px;
height: 14px; height: 14px;
margin-right: 30px; margin: 0 10px;
} }
.img-l { .img-l {
width: 24px; width: 24px;
height: 14px; height: 14px;
margin-right: 10px; margin: 0 10px;
} }
} }
@ -72,17 +73,6 @@ page {
.patrol-img { .patrol-img {
background-color: #fff; background-color: #fff;
padding: 20px; padding: 20px;
.img-box {
display: flex;
flex-wrap: wrap;
.img {
width: 170px;
height: 170px;
margin: 10px 0 0 10px;
}
}
} }
.conserve-img { .conserve-img {
@ -93,6 +83,7 @@ page {
height: 30px; height: 30px;
width: 100%; width: 100%;
border-radius: 5px; border-radius: 5px;
margin-top: 10px;
display: flex; display: flex;
justify-content: left; justify-content: left;
align-items: center; align-items: center;
@ -149,8 +140,26 @@ page {
} }
} }
.img-box {
display: flex;
flex-wrap: wrap;
.img {
width: 170px;
height: 170px;
margin: 10px 0 0 10px;
}
}
.sub-btn { .sub-btn {
width: 70%; width: 70%;
margin: 80px auto; margin: 80px auto;
} }
.del-btn {
width: 70%;
margin: 80px auto;
background-color: #C23434;
border-color: #C23434;
}
} }

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

@ -37,7 +37,7 @@ function Index() {
useEffect(() => { useEffect(() => {
request.get(getReportList(), {}, { hideErrorToast: true, hideLoading: true }).then(res => { request.get(getReportList(), {}, { hideErrorToast: true, hideLoading: true }).then(res => {
if (res.statusCode == 200) { if (res.statusCode == 200) {
console.log(res); // console.log(res);
setListData(res.data) setListData(res.data)
return res.data; return res.data;
} else { } else {

11
weapp/src/services/api.js

@ -22,6 +22,17 @@ export const getReportDetail = id => {
return `/report/${id}/detail`; return `/report/${id}/detail`;
}; };
// 删除上报
export const delReport = id => {
console.log(id)
return `/report/${id}`;
};
// 获取道路路段
export const getRoadSection = () => {
return `/road/section`;
};
//行业查询 //行业查询
export const getIndustryUrl = () => { export const getIndustryUrl = () => {
return `/elec/business/industry` return `/elec/business/industry`

6
web/client/index.ejs

@ -9,6 +9,12 @@
type="text/css" type="text/css"
href="/assets/font_sc/iconfont.css" href="/assets/font_sc/iconfont.css"
/> />
<script type="text/javascript">
window._AMapSecurityConfig = {
securityJsCode: 'e955cd5ddfc3a752aa27d1e1c67d182d',
}
</script>
<script src="https://webapi.amap.com/maps?v=2.0&key=00f9a29dedcdbd8befec3dfe0cef5003&plugin=AMap.Adaptor,AMap.Scale,AMap.ToolBar,AMap.DistrictSearch,AMap.Geocoder,AMap.CustomLayer,Map3D,ElasticMarker"></script>
</head> </head>
<body style="background: transparent"> <body style="background: transparent">

6
web/client/index.html

@ -10,6 +10,12 @@
href="/assets/font_sc/iconfont.css" href="/assets/font_sc/iconfont.css"
/> />
<link rel="stylesheet" href="/assets/fontziti/font.css" /> <link rel="stylesheet" href="/assets/fontziti/font.css" />
<script type="text/javascript">
window._AMapSecurityConfig = {
securityJsCode: 'e955cd5ddfc3a752aa27d1e1c67d182d',
}
</script>
<script src="https://webapi.amap.com/maps?v=2.0&key=00f9a29dedcdbd8befec3dfe0cef5003&plugin=AMap.Adaptor,AMap.Scale,AMap.ToolBar,AMap.DistrictSearch,AMap.Geocoder,AMap.CustomLayer,Map3D,ElasticMarker"></script>
</head> </head>
<body> <body>
<link <link

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

@ -21,20 +21,62 @@ const Example = (props) => {
// dispatch({ type: 'TAB-CHANGE', data: tab }) // dispatch({ type: 'TAB-CHANGE', data: tab })
} }
useEffect(() => {
const timer = setTimeout(() => {
const map = new AMap.Map("amapId", {
//resizeEnable: true,
center: [115.912663, 28.543149],//地图中心点,初始定位加载显示楼块
// center: [115.857952, 28.683003],//地图中心点
zoom: 13,//地图显示的缩放级别
zooms: [8, 18],
pitch: 65, // 地图俯仰角度,有效范围 0 度- 83 度
viewMode: '3D', // 地图模式
// rotation: 60
// showLabel: false
});
let styleName = 'amap://styles/fb26776387242721c2fc32e2cb1daccc';
map.setMapStyle(styleName);
let mapComplete = false;
let windowOnload = false;
window.onload = function () {
windowOnload = true;
}
}, 100);
//主题样式
return () => {
const amapKeys = Object.keys(localStorage).filter(key => key.match(/^_AMap_/)) // 销毁地图
amapKeys.forEach(key => {
localStorage.removeItem(key)
})
clearTimeout(timer)
}
}, [])
return ( return (
<Spin tip="biubiubiu~" spinning={loading}> <Spin tip="biubiubiu~" spinning={loading}>
<div id='example2' style={{ <div style={{
backgroundColor: "#031839", width: "100vw", height: "100vh", /* transform: `scale(${Math.min( backgroundColor: "#031839", width: "100vw", height: "100vh", /* transform: `scale(${Math.min(
document.body.clientWidth / 1920, document.body.clientWidth / 1920,
document.body.clientHeight / 1080 document.body.clientHeight / 1080
)})`, */ )})`, */
}}> }}>
<div id='amapId' style={{ position: 'absolute', width: "100%", height: "100%" }}></div>
<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={{ width: "100%", height: "90%" }}>
<div style={{ position: 'absolute', width: "100%", height: "90%" }}>
<Footer tabKey={tabKey} /> <Footer tabKey={tabKey} />
</div> </div>
{/* </div> */}
</div> </div>
</Spin> </Spin>
) )

8
web/client/src/sections/quanju/containers/footer/build/style.less

@ -45,8 +45,8 @@
align-items: center; align-items: center;
span{ span{
&:nth-child(1){ &:nth-child(1){
width: 8px; width: 0.5rem;
height: 8px; height: 0.5rem;
margin-right: 5px; margin-right: 5px;
background: #07B9FE; background: #07B9FE;
clip-path: polygon(0 0, 100% 0, 0 100%, 0 0); clip-path: polygon(0 0, 100% 0, 0 100%, 0 0);
@ -115,7 +115,7 @@
font-size: 1.75rem; font-size: 1.75rem;
font-family: YouSheBiaoTiHei; font-family: YouSheBiaoTiHei;
color: #FFFFFF; color: #FFFFFF;
line-height: 36px; // line-height: 36px;
text-shadow: 0px 0px 4px #07B9FE; text-shadow: 0px 0px 4px #07B9FE;
} }
} }
@ -221,7 +221,7 @@
h2{ h2{
height: 30%; height: 30%;
width: 100%; width: 100%;
padding-left: 15px; padding-left: 0.9375rem;
font-size: 1.5rem; font-size: 1.5rem;
font-family: YouSheBiaoTiHei; font-family: YouSheBiaoTiHei;
color: #FFFFFF; color: #FFFFFF;

2
web/client/src/sections/quanju/containers/footer/conserve/left/left-center.js

@ -230,7 +230,7 @@ const LeftCenter = (props) => {
<img src='assets/images/quanju/kelvhua_icon.png' alt='icon' style={{ width: '26%' }} /> <img src='assets/images/quanju/kelvhua_icon.png' alt='icon' style={{ width: '26%' }} />
<span style={{ color: '#C2EEFF', marginLeft: 5 }}>可绿化里程总数</span> <span style={{ color: '#C2EEFF', marginLeft: 5 }}>可绿化里程总数</span>
</Col> </Col>
<Col span={9} style={{ fontSize: 24, fontFamily: 'YouSheBiaoTiHei', color: '#fff' }}>{totalData}</Col> <Col span={9} style={{ fontSize: 24, fontFamily: 'YouSheBiaoTiHei', color: '#fff' }}>{totalData.toFixed(3) || 0}</Col>
</Row> </Row>
<div ref={chartRef} style={{ height: "14.5vh", width: "100%" }}></div> <div ref={chartRef} style={{ height: "14.5vh", width: "100%" }}></div>

9
web/client/src/sections/quanju/containers/footer/guanli/index.js

@ -6,6 +6,7 @@ import Module from '../../public/module'
import LeftItem from './LeftItem' import LeftItem from './LeftItem'
import {getjiandmanage,getjiandetail} from '../../../actions/example' import {getjiandmanage,getjiandetail} from '../../../actions/example'
import './style.less' import './style.less'
import NoData from '../../public/noData';
const Guanli = (props) => { const Guanli = (props) => {
const {dispatch} = props const {dispatch} = props
const [leftDatas,setleftDatas] = useState([]) const [leftDatas,setleftDatas] = useState([])
@ -56,9 +57,9 @@ const Guanli = (props) => {
<div className='guanli'> <div className='guanli'>
<div className='guanli-left'> <div className='guanli-left'>
<Module style={{height:"100%"}} title="检测点治超处理占比" customize={true}> <Module style={{height:"100%"}} title="检测点治超处理占比" customize={true}>
<AutoRollComponent content={renderLeftContent()} {leftDatas && leftDatas.length!==0?<AutoRollComponent content={renderLeftContent()}
containerStyle={{ position: "relative", height: "90%", }} containerStyle={{ position: "relative", height: "90%", }}
divHeight={"100%"} divId={"chart-overview-left"} /> divHeight={"100%"} divId={"chart-overview-left"} />:<NoData/>}
</Module> </Module>
</div> </div>
<div className='guanli-right'> <div className='guanli-right'>
@ -75,9 +76,9 @@ const Guanli = (props) => {
<span>处罚</span> <span>处罚</span>
<span>日期</span> <span>日期</span>
</div> </div>
<AutoRollComponent content={renderContent()} {rightDatas && rightDatas.length!==0?<AutoRollComponent content={renderContent()}
containerStyle={{ position: "relative", height: "90%", }} containerStyle={{ position: "relative", height: "90%", }}
divHeight={"100%"} divId={"chart-overview-deviceList"} /> divHeight={"100%"} divId={"chart-overview-deviceList"} />:<NoData style={{height:"70%"}}/>}
</Module> </Module>
</div> </div>
</div> </div>

4
web/client/src/sections/quanju/containers/footer/guanli/style.less

@ -1,6 +1,6 @@
@media screen and (max-width:1366px){ @media screen and (max-width:1366px){
html{ html{
font-size: 10px; font-size: 12px;
} }
} }
.guanli{ .guanli{
@ -72,7 +72,7 @@
width: 8px; width: 8px;
height: 8px; height: 8px;
background-color: #fff; background-color: #fff;
top: 1.5%; bottom: 7.0625rem;
left: 50%; left: 50%;
z-index: 10; z-index: 10;
border-radius: 4px; border-radius: 4px;

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

@ -47,15 +47,15 @@ const Right = () => {
</div> </div>
<div className='busVideo'> <div className='busVideo'>
<div style={{ <div style={{
width:'98%',margin:'1% 1%',height:171,display:'block',float:'left',boxShadow: '0px 1px 5px 0px #1C60FE', width:'98%',margin:'1% 1%',height:152,display:'block',float:'left',boxShadow: '0px 1px 5px 0px #1C60FE',
border:'1px solid #1C60FE' border:'1px solid #1C60FE'
}}><img src='assets/images/quanju/busVideo.png' style={{width:'100%',height:'100%'}} /></div> }}><img src='assets/images/quanju/busVideo.png' style={{width:'100%',height:'100%'}} /></div>
<div style={{ <div style={{
width:'48%',margin:'1% 1%',height:140,display:'block',float:'left',boxShadow: '0px 1px 5px 0px #1C60FE', width:'48%',margin:'1% 1%',height:100,display:'block',float:'left',boxShadow: '0px 1px 5px 0px #1C60FE',
border:'1px solid #1C60FE' border:'1px solid #1C60FE'
}}><img src='assets/images/quanju/busVideo.png' style={{width:'100%',height:'100%'}} /></div> }}><img src='assets/images/quanju/busVideo.png' style={{width:'100%',height:'100%'}} /></div>
<div style={{ <div style={{
width:'48%',margin:'1% 1%',height:140,display:'block',float:'left',boxShadow: '0px 1px 5px 0px #1C60FE', width:'48%',margin:'1% 1%',height:100,display:'block',float:'left',boxShadow: '0px 1px 5px 0px #1C60FE',
border:'1px solid #1C60FE' border:'1px solid #1C60FE'
}}><img src='assets/images/quanju/busVideo.png' style={{width:'100%',height:'100%'}} /></div> }}><img src='assets/images/quanju/busVideo.png' style={{width:'100%',height:'100%'}} /></div>
</div> </div>

1
web/client/src/sections/quanju/containers/footer/operation/style.less

@ -74,4 +74,5 @@
.busVideo{ .busVideo{
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
margin-bottom: 2%;
} }

4
web/client/src/sections/quanju/containers/public/noData.js

@ -1,7 +1,7 @@
import React from 'react' import React from 'react'
export default function NoData() { export default function NoData({style}) {
return ( return (
<div style={{color:"#fff",textAlign:'center',height:"100%",display:'flex',alignItems: "center",justifyContent: "space-around"}}>暂无数据</div> <div style={{color:"#fff",textAlign:'center',height:style?.height||"100%",display:'flex',alignItems: "center",justifyContent: "space-around"}}>暂无数据</div>
) )
} }

9
web/client/src/sections/quanju/style.less

@ -1,3 +1,8 @@
#example:hover { #example:hover {
font-size: larger; font-size: larger;
} }
.amap-logo {
display: none;
opacity: 0 !important;
}

Loading…
Cancel
Save