wenlele 1 year ago
parent
commit
989b01213a
  1. 1
      .gitignore
  2. 21
      api/app/lib/controllers/report/index.js
  3. 11223
      api/log/development.log
  4. 4546
      api/yarn.lock
  5. 15650
      weapp/package-lock.json
  6. 3227
      web/client/assets/color.less
  7. 4
      web/client/src/sections/fillion/components/assessModal.js
  8. 13
      web/client/src/sections/fillion/components/feedback/nominateModalcopy.js
  9. 376
      web/client/src/sections/fillion/components/gis/bounds.js
  10. 116
      web/client/src/sections/fillion/components/gis/mock_data.js
  11. 244
      web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js
  12. 270
      web/client/src/sections/quanju/containers/public/olMap.js
  13. 0
      web/log/development.txt
  14. 12210
      web/package-lock.json

1
.gitignore

@ -144,3 +144,4 @@ package-lock.json*
development.text* development.text*
web/package-lock.json* web/package-lock.json*
web/log/development.txt* web/log/development.txt*
web/log/development.txt

21
api/app/lib/controllers/report/index.js

@ -2,7 +2,7 @@
const { QueryTypes } = require('sequelize'); const { QueryTypes } = require('sequelize');
const moment = require('moment'); const moment = require('moment');
async function reportList(ctx) { async function reportList (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { limit, page, startTime, endTime, keyword, userId, reportType, isTop, asc, projectType, handleState = '', performerId = '', codeRoad } = ctx.query const { limit, page, startTime, endTime, keyword, userId, reportType, isTop, asc, projectType, handleState = '', performerId = '', codeRoad } = ctx.query
@ -45,7 +45,8 @@ async function reportList(ctx) {
}, },
attributes: ['id', 'road', 'time', 'projectType', 'roadSectionStart', 'performerId', 'roadSectionEnd', 'reportType', 'address', attributes: ['id', 'road', 'time', 'projectType', 'roadSectionStart', 'performerId', 'roadSectionEnd', 'reportType', 'address',
'content', 'longitude', 'latitude', 'projectName', 'handleState', 'codeRoad', 'handleContent', 'handlePic', 'videoUrl'], 'content', 'longitude', 'latitude', 'projectName', 'handleState', 'codeRoad', 'handleContent', 'handlePic', 'videoUrl',
'scenePic'],
include: [{ include: [{
model: models.User, model: models.User,
attributes: ['name'] attributes: ['name']
@ -147,7 +148,7 @@ async function reportList(ctx) {
} }
} }
async function reportPosition(ctx) { async function reportPosition (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { startTime, endTime, userId, reportType } = ctx.query const { startTime, endTime, userId, reportType } = ctx.query
@ -197,7 +198,7 @@ async function reportPosition(ctx) {
} }
} }
async function reportDetail(ctx) { async function reportDetail (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { reportId } = ctx.params const { reportId } = ctx.params
@ -219,7 +220,7 @@ async function reportDetail(ctx) {
} }
} }
async function reportHandle(ctx) { async function reportHandle (ctx) {
try { try {
const { models } = ctx.fs.dc; const { models } = ctx.fs.dc;
@ -249,7 +250,7 @@ async function reportHandle(ctx) {
} }
} }
async function createReport(ctx) { async function createReport (ctx) {
try { try {
const { userId } = ctx.fs.api const { userId } = ctx.fs.api
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
@ -271,7 +272,7 @@ async function createReport(ctx) {
} }
} }
async function deleteReport(ctx) { async function deleteReport (ctx) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { reportId } = ctx.params; const { reportId } = ctx.params;
@ -294,7 +295,7 @@ async function deleteReport(ctx) {
// TODO 小程序填写道路名称的时候的道路筛选 是一起都返回 还是不断传关键字搜索返回 // TODO 小程序填写道路名称的时候的道路筛选 是一起都返回 还是不断传关键字搜索返回
async function spotPrepare(ctx) { async function spotPrepare (ctx) {
try { try {
const { models } = ctx.fs.dc; const { models } = ctx.fs.dc;
const sequelize = ctx.fs.dc.orm; const sequelize = ctx.fs.dc.orm;
@ -366,7 +367,7 @@ async function spotPrepare(ctx) {
} }
} }
async function spotCheck(ctx) { async function spotCheck (ctx) {
const transaction = await ctx.fs.dc.orm.transaction(); const transaction = await ctx.fs.dc.orm.transaction();
try { try {
const { models } = ctx.fs.dc; const { models } = ctx.fs.dc;
@ -448,7 +449,7 @@ async function spotCheck(ctx) {
} }
} }
} }
async function spotCheckDetail(ctx) { async function spotCheckDetail (ctx) {
const { models } = ctx.fs.dc const { models } = ctx.fs.dc
console.log('txc1', ctx.query) console.log('txc1', ctx.query)
const { startTime, endTime } = ctx.query const { startTime, endTime } = ctx.query

11223
api/log/development.log

File diff suppressed because it is too large

4546
api/yarn.lock

File diff suppressed because it is too large

15650
weapp/package-lock.json

File diff suppressed because it is too large

3227
web/client/assets/color.less

File diff suppressed because it is too large

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

@ -9,6 +9,7 @@ const { Option } = Select;
const AssessModal = ({ editData, check, visible, onCancel, dispatch }) => { const AssessModal = ({ editData, check, visible, onCancel, dispatch }) => {
const [form] = Form.useForm(); const [form] = Form.useForm();
const [loading, setLoading] = useState(false);
return ( return (
<Modal <Modal
@ -22,6 +23,7 @@ const AssessModal = ({ editData, check, visible, onCancel, dispatch }) => {
if (check) { if (check) {
return onCancel() return onCancel()
} }
setLoading(true)
form.validateFields().then(values => { form.validateFields().then(values => {
dispatch(editAssess({ dispatch(editAssess({
...values, ...values,
@ -31,12 +33,14 @@ const AssessModal = ({ editData, check, visible, onCancel, dispatch }) => {
if (res.success) { if (res.success) {
onCancel() onCancel()
} }
setLoading(false)
}) })
}) })
}} }}
onCancel={() => { onCancel={() => {
onCancel() onCancel()
}} }}
confirmLoading={loading}
> >
<Form <Form
form={form} form={form}

13
web/client/src/sections/fillion/components/feedback/nominateModalcopy.js

@ -13,7 +13,7 @@ const { TextArea } = Input;
const NominateModal = (props) => { const NominateModal = (props) => {
const { queryData, recordId, visible, user, onCancel, depMessage, loading, depUser, clientHeight, depData, onVisibleChange, dispatch } = props const { queryData, recordId, visible, user, onCancel, depMessage, loading, depUser, clientHeight, depData, onVisibleChange, dispatch } = props
const [depId, setDepId] = useState(0) const [depId, setDepId] = useState(0)
const [depUsers, setDepUsers] = useState() const [depUsers, setDepUsers] = useState([])
// const [value, setValue] = useState(undefined); // const [value, setValue] = useState(undefined);
const [selectedUserId, setSelectedUserId] = useState(null); const [selectedUserId, setSelectedUserId] = useState(null);
const [form] = Form.useForm(); const [form] = Form.useForm();
@ -24,15 +24,11 @@ const NominateModal = (props) => {
// 根据选择的部门ID获取对应的用户数据 // 根据选择的部门ID获取对应的用户数据
//setDepUsers([]) //setDepUsers([])
const res = await dispatch(getDepUser(value)) const res = await dispatch(getDepUser(value))
const copy = res.payload.data.filter(user => { let processedUsers = res.payload.data?.map((item) => {
if (user.isAdmin) {
return user
}
})
let processedUsers = copy.map((item) => {
return { return {
label: item.name, label: item.name,
value: item.id, value: item.id,
phone: item.phone
} }
}) })
setDepUsers(processedUsers) setDepUsers(processedUsers)
@ -48,6 +44,9 @@ const NominateModal = (props) => {
onCancel() onCancel()
setDepUsers([]) setDepUsers([])
form.resetFields() form.resetFields()
// const phone = depUsers.find(u => u.value == values.nameId)?.phone;
// console.log(phone, 'phone')
// dispatch(pushAppointSMS({ phone, info: 'info...' }))
} }
}) })
}) })

376
web/client/src/sections/fillion/components/gis/bounds.js

@ -1,188 +1,188 @@
import React, { Component } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import { geoJson } from './mock_data'; import { geoJson } from './mock_data';
export default class Bounds extends Component { export default class Bounds extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.map = props.map; this.map = props.map;
this.pl = {}; this.pl = {};
this.textMarker = {}; this.textMarker = {};
} }
static propTypes = { static propTypes = {
prop: PropTypes prop: PropTypes
} }
componentDidMount() { componentDidMount() {
if (!window.BoundPl) { if (!window.BoundPl) {
this.drawBounds(); this.drawBounds();
} }
} }
componentWillUnmount() { componentWillUnmount() {
if (window.local_) if (window.local_)
window.local_.remove(this.pl); window.local_.remove(this.pl);
this.textMarker = null; this.textMarker = null;
window.BoundPl = null; window.BoundPl = null;
} }
drawBounds = () => { drawBounds = () => {
var map = this.map; var map = this.map;
var loca = window.local_; var loca = window.local_;
loca.ambLight = { loca.ambLight = {
intensity: 0.3, intensity: 0.3,
color: '#fff', color: '#fff',
}; };
loca.dirLight = { loca.dirLight = {
intensity: 0.6, intensity: 0.6,
color: '#fff', color: '#fff',
target: [0, 0, 0], target: [0, 0, 0],
position: [0, -1, 1], position: [0, -1, 1],
}; };
loca.pointLight = { loca.pointLight = {
color: 'rgb(100,100,100)', color: 'rgb(100,100,100)',
position: [120.24289, 30.341335, 20000], position: [120.24289, 30.341335, 20000],
intensity: 3, intensity: 3,
// 距离表示从光源到光照强度为 0 的位置,0 就是光不会消失。 // 距离表示从光源到光照强度为 0 的位置,0 就是光不会消失。
distance: 50000, distance: 50000,
}; };
var geo = new Loca.GeoJSONSource({ var geo = new Loca.GeoJSONSource({
data: geoJson data: geoJson
}); });
var colors = ['#04398c', '#04398c', '#0542a5'].reverse(); var colors = ['#04398c', '#04398c', '#0542a5'].reverse();
var height = [500]; var height = [500];
var pl = new Loca.PolygonLayer({ var pl = new Loca.PolygonLayer({
// loca, // loca,
zIndex: 1, zIndex: 1,
opacity: 0.6, opacity: 0.6,
// cullface: 'none', // cullface: 'none',
shininess: 10, shininess: 10,
hasSide: true, hasSide: true,
}); });
pl.setSource(geo); pl.setSource(geo);
pl.setStyle({ pl.setStyle({
topColor: function (index, feature) { topColor: function (index, feature) {
var i = index % 3; var i = index % 3;
return colors[i]; return colors[i];
}, },
sideColor: function (index, feature) { sideColor: function (index, feature) {
return '#023890'; return '#023890';
}, },
borderColor: function () { borderColor: function () {
return '#24dcf7' return '#24dcf7'
}, },
height: function (index, feature) { height: function (index, feature) {
return index == 0 ? height[0] : height[0] + index * 50; return index == 0 ? height[0] : height[0] + index * 50;
}, },
altitude: 0, altitude: 0,
}); });
loca.add(pl); loca.add(pl);
// 创建纯文本标记 // 创建纯文本标记
var text = new AMap.Text({ var text = new AMap.Text({
text: '纯文本标记', text: '纯文本标记',
anchor: 'center', // 设置文本标记锚点 anchor: 'center', // 设置文本标记锚点
draggable: true, draggable: true,
cursor: 'pointer', cursor: 'pointer',
angle: 0, angle: 0,
visible: false, visible: false,
offset: [60, 60], offset: [60, 60],
extData: 'bounds_text', extData: 'bounds_text',
style: { style: {
'padding': '5px 10px', 'padding': '5px 10px',
'margin-bottom': '1rem', 'margin-bottom': '1rem',
'border-radius': '.25rem', 'border-radius': '.25rem',
'background-color': 'rgba(0,0,0,0.5)', 'background-color': 'rgba(0,0,0,0.5)',
// 'width': '12rem', // 'width': '12rem',
'border-width': 0, 'border-width': 0,
'box-shadow': '0 2px 6px 0 rgba(255, 255, 255, .3)', 'box-shadow': '0 2px 6px 0 rgba(255, 255, 255, .3)',
'text-align': 'center', 'text-align': 'center',
'font-size': '16px', 'font-size': '16px',
'color': '#fff', 'color': '#fff',
}, },
}); });
// text.setMap(map); // text.setMap(map);
if (!this.textMarker) if (!this.textMarker)
map.add(text); map.add(text);
this.textMarker = text; this.textMarker = text;
console.log(text) console.log(text)
// 拾取 // 拾取
map.on('mousemove', (e) => { map.on('mousemove', (e) => {
var feat = pl.queryFeature(e.pixel.toArray()); var feat = pl.queryFeature(e.pixel.toArray());
// if (!text) { // if (!text) {
map.add(text); map.add(text);
// text = this.textMarker; // text = this.textMarker;
// } // }
if (feat) { if (feat) {
text.show(); text.show();
text.setText(feat.properties.NAME); text.setText(feat.properties.NAME);
text.setPosition(e.lnglat); text.setPosition(e.lnglat);
pl.setStyle({ pl.setStyle({
topColor: (index, feature) => { topColor: (index, feature) => {
if (feature === feat) { if (feature === feat) {
return [19, 43, 77, 1]; return [19, 43, 77, 1];
} }
// var v = feature.properties.health * 100; // var v = feature.properties.health * 100;
var i = index % 3; var i = index % 3;
return colors[i]; return colors[i];
}, },
sideColor: (index, feature) => { sideColor: (index, feature) => {
if (feature === feat) { if (feature === feat) {
return '#023890'; return '#023890';
} }
return '#023890'; return '#023890';
}, },
borderColor: function () { borderColor: function () {
return '#24dcf7' return '#24dcf7'
}, },
height: function (index, feature) { height: function (index, feature) {
return index == 0 ? height[0] : height[0] + index * 50; return index == 0 ? height[0] : height[0] + index * 50;
}, },
}); });
} else { } else {
pl.setStyle({ pl.setStyle({
topColor: function (index, feature) { topColor: function (index, feature) {
var i = index % 3; var i = index % 3;
return colors[i]; return colors[i];
}, },
sideColor: function (index, feature) { sideColor: function (index, feature) {
return '#023890'; return '#023890';
}, },
borderColor: function () { borderColor: function () {
return '#24dcf7' return '#24dcf7'
}, },
height: function (index, feature) { height: function (index, feature) {
return index == 0 ? height[0] : height[0] + index * 50; return index == 0 ? height[0] : height[0] + index * 50;
}, },
altitude: 0, altitude: 0,
}); });
text.hide(); text.hide();
map.remove(text); map.remove(text);
} }
}); });
map.setZoom(12.88) map.setZoom(12.88)
map.setCenter([115.888149, 28.549851]); map.setCenter([115.888149, 28.549851]);
map.setRotation(-68.7); map.setRotation(-68.7);
map.setPitch(42); map.setPitch(42);
this.pl = pl; this.pl = pl;
window.BoundPl = pl; window.BoundPl = pl;
} }
render() { render() {
return ( return (
<div> <div>
</div> </div>
) )
} }
} }

116
web/client/src/sections/fillion/components/gis/mock_data.js

File diff suppressed because one or more lines are too long

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

@ -12,128 +12,128 @@ import AutoRollComponent from '../../build/AutoRollComponent'
const Rightbottom = (props) => { const Rightbottom = (props) => {
const { dispatch } = props const { dispatch } = props
const style = { height: "28%", marginTop: "4%" } const style = { height: "28%", marginTop: "4%" }
const [beijing, setBeijing] = useState() const [beijing, setBeijing] = useState()
const [list, setList] = useState([]) const [list, setList] = useState([])
const [rightDatas, setrightDatas] = useState([]) const [rightDatas, setrightDatas] = useState([])
const [nums, setNums] = useState([]) const [nums, setNums] = useState([])
const [num, setNum] = useState() const [num, setNum] = useState()
const [rightitemlist, setrightitemlist] = useState([]) const [rightitemlist, setrightitemlist] = useState([])
const requestRightDatas = async () => { const requestRightDatas = async () => {
const res = await dispatch(getZhichaolist()) const res = await dispatch(getZhichaolist())
var pattern = /[\u4e00-\u9fa5]*/; var pattern = /[\u4e00-\u9fa5]*/;
let d = res.payload.data?.overSpeedList?.filter((item, index) => { let d = res.payload.data?.overSpeedList?.filter((item, index) => {
return /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false return /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false
}) })
console.log(res); console.log(res);
d.map((item, index) => { d.map((item, index) => {
if (parseInt(item.processingTime.match(/([^.]*)$/)[0]) < 10) { if (parseInt(item.processingTime.match(/([^.]*)$/)[0]) < 10) {
return item.processingTime = `${(item.processingTime.match(/^([^.]*)(.[^.]*)/)[0])}.0${parseInt(item.processingTime.match(/([^.]*)$/)[0])}` return item.processingTime = `${(item.processingTime.match(/^([^.]*)(.[^.]*)/)[0])}.0${parseInt(item.processingTime.match(/([^.]*)$/)[0])}`
}
})
d.sort((a, b) => b.processingTime.localeCompare(a.processingTime))
// setrightDatas(res.payload.data)
setList(d)
}
useEffect(() => {
// const zhichaolist = dispatch(getZhichaolist()).then((res) => {
// setNums(res.payload?.data?.processed)
// })
// requestRightDatas()
roadManagement()
}, [])
const roadManagement = async () => {
await dispatch(getRoadadministration({})).then(res => {
if (res.success) {
setrightitemlist(res.payload.data?.rows || [])
}
})
}
const renderContent = () => {
return <div style={{ height: "100%" }}>
{rightitemlist && rightitemlist.length !== 0 ? rightitemlist?.map(({ enforcementdate, enforcementreslt, roadname, picfile }, index) => {
if (index < 120) {
return <div key={index} className='guanli-right-item'>
<Tooltip title={<div className='popover-content'>
<div style={{ width: '100%', height: "100%", marginTop: "0", paddingBottom: 20, display: "flex" }}>
{picfile?.length > 0 ? <Carousel autoplay style={{ width: 200, height: 200, margin: "20px 0px 0px 20px" }}>
{picfile?.map(v => <img className='picfileimg'
style={{ width: 200, height: 200, display: 'inline-block', }}
// src={`/_file-server/${v.storageUrl}`}
src={v.url}
width={`200px`}
/>)}
</Carousel>
: <div style={{
width: 200, height: 200, margin: "20px 0px 0px 20px",
}} />
}
<div style={{ width: 240, marginLeft: 20, marginTop: 20, display: "flex", flexDirection: "column", justifyContent: "space-around" }}>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}>
执法日期:<span style={{
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC",
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis"
}}>
{enforcementdate && moment(enforcementdate).format("YYYY-MM-DD") || "--"}
</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}>
执法道路:<span title={roadname} style={{
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC",
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160
}}>
{roadname}
</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}>
执法成果:<span title={enforcementreslt} style={{
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC",
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160
}}>
{enforcementreslt}</span></p>
</div>
</div>
</div>}
placement="leftTop"
overlayStyle={{ minWidth: 500, minHeight: 200, paddingTop: 10, margin: 0, backgroundImage: `url(../../../../../assets/images/leadership/beijinglan.png)` }}
overlayClassName='popover'
>
<div style={{ width: '90%', height: '100%', margin:'auto',display: 'flex', color: "rgba(216, 240, 255, 0.8)" }}>
<div style={{ width: '50%', textAlign: "center", }}>{enforcementdate && moment(enforcementdate).format("YYYY-MM-DD") || "--"}</div>
<div title={enforcementreslt} style={{ width: '50%', textAlign: "center", overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis" }}>{enforcementreslt}</div>
</div>
</Tooltip>
</div>
} }
}) : ""} })
</div> d.sort((a, b) => b.processingTime.localeCompare(a.processingTime))
} // setrightDatas(res.payload.data)
return ( setList(d)
<> }
<Module style={style} title={"道路隐患排查治理"}> useEffect(() => {
// const zhichaolist = dispatch(getZhichaolist()).then((res) => {
<div style={{ width: "90%", margin: "auto", display: "flex", color: "#FFF" }}> // setNums(res.payload?.data?.processed)
<div style={{ width: '50%', textAlign: "center" }}>执法日期</div>
<div style={{ width: '50%', textAlign: "center", }}>执法成果</div> // })
</div> // requestRightDatas()
{rightitemlist && rightitemlist.length !== 0 ? <AutoRollComponent content={renderContent()} roadManagement()
containerStyle={{ position: "relative", height: "90%", }} }, [])
divHeight={"100%"} divId={"chart-overview-deviceList"} /> : <NoData style={{ height: "20%" }} />}
const roadManagement = async () => {
</Module> await dispatch(getRoadadministration({})).then(res => {
</> if (res.success) {
) setrightitemlist(res.payload.data?.rows || [])
}
})
}
const renderContent = () => {
return <div style={{ height: "100%" }}>
{rightitemlist && rightitemlist.length !== 0 ? rightitemlist?.map(({ enforcementdate, enforcementreslt, roadname, picfile }, index) => {
if (index < 120) {
return <div key={index} className='guanli-right-item'>
<Tooltip title={<div className='popover-content'>
<div style={{ width: '100%', height: "100%", marginTop: "0", paddingBottom: 20, display: "flex" }}>
{picfile?.length > 0 ? <Carousel autoplay style={{ width: 200, height: 200, margin: "20px 0px 0px 20px" }}>
{picfile?.map(v => <img className='picfileimg'
style={{ width: 200, height: 200, display: 'inline-block', }}
// src={`/_file-server/${v.storageUrl}`}
src={v.url}
width={`200px`}
/>)}
</Carousel>
: <div style={{
width: 200, height: 200, margin: "20px 0px 0px 20px",
}} />
}
<div style={{ width: 240, marginLeft: 20, marginTop: 20, display: "flex", flexDirection: "column", justifyContent: "space-around" }}>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}>
执法日期:<span style={{
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC",
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis"
}}>
{enforcementdate && moment(enforcementdate).format("YYYY-MM-DD") || "--"}
</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}>
执法道路:<span title={roadname} style={{
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC",
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160
}}>
{roadname}
</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}>
执法成果:<span title={enforcementreslt} style={{
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC",
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160
}}>
{enforcementreslt}</span></p>
</div>
</div>
</div>}
placement="leftTop"
overlayStyle={{ minWidth: 500, minHeight: 200, paddingTop: 10, margin: 0, backgroundImage: `url(../../../../../assets/images/leadership/beijinglan.png)` }}
overlayClassName='popover'
>
<div style={{ width: '90%', height: '100%', margin: 'auto', display: 'flex', color: "rgba(216, 240, 255, 0.8)" }}>
<div style={{ width: '50%', textAlign: "center", }}>{enforcementdate && moment(enforcementdate).format("YYYY-MM-DD") || "--"}</div>
<div title={enforcementreslt} style={{ width: '50%', textAlign: "center", overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis" }}>{enforcementreslt}</div>
</div>
</Tooltip>
</div>
}
}) : ""}
</div>
}
return (
<>
<Module style={style} title={"道路隐患排查治理"}>
<div style={{ width: "90%", margin: "auto", display: "flex", color: "#FFF" }}>
<div style={{ width: '50%', textAlign: "center" }}>执法日期</div>
<div style={{ width: '50%', textAlign: "center", }}>执法成果</div>
</div>
{rightitemlist && rightitemlist.length !== 0 ? <AutoRollComponent content={renderContent()}
containerStyle={{ position: "relative", height: "90%", }}
divHeight={"100%"} divId={"chart-overview-deviceList"} /> : <NoData style={{ height: "20%" }} />}
</Module>
</>
)
} }
export default Rightbottom export default Rightbottom

270
web/client/src/sections/quanju/containers/public/olMap.js

@ -5,6 +5,10 @@ import Hua from '../footer/leadership/centerleft/hudong'
import moment from 'moment'; import moment from 'moment';
import { OlMapRequest } from '$utils' import { OlMapRequest } from '$utils'
import { useRef } from 'react'; import { useRef } from 'react';
import { getReportList } from '../../../fillion/actions/patrol'
import AutoRollComponent from '../footer/build/AutoRollComponent'
import { Carousel } from 'antd'
import { CloseOutlined } from '@ant-design/icons'
export const busWillRun = [ export const busWillRun = [
{ text: '非运营', value: '0' }, { text: '非运营', value: '0' },
@ -32,6 +36,7 @@ const OlMap = (props) => {
const [pointItem, setPointItem] = useState({}) const [pointItem, setPointItem] = useState({})
// //
const [busRunData, setBusRunData] = useState([]) const [busRunData, setBusRunData] = useState([])
const [reportRoadData, setReportRoadData] = useState([])
// //
const curTab = useRef(tab) const curTab = useRef(tab)
@ -39,6 +44,7 @@ const OlMap = (props) => {
curTab.current = tab curTab.current = tab
setOlMapOpenData([]) setOlMapOpenData([])
setPointItem({}) setPointItem({})
setReportRoadData([])
if (olMap) { if (olMap) {
olMap.closeOverlay('clickOpen') olMap.closeOverlay('clickOpen')
olMap.closeOverlay('pointClickOpen') olMap.closeOverlay('pointClickOpen')
@ -51,6 +57,7 @@ const OlMap = (props) => {
if (tab != 'build') { if (tab != 'build') {
roadProjectList.forEach((d, index) => { roadProjectList.forEach((d, index) => {
olMap.removeGeometryLayer('geometry_road_' + index) olMap.removeGeometryLayer('geometry_road_' + index)
olMap.removeGeometryLayer('geometry_road_' + d.id)
}) })
} }
if (tab != 'operation') { if (tab != 'operation') {
@ -100,6 +107,7 @@ const OlMap = (props) => {
olMapTool.map.on('singleclick', function (p) { olMapTool.map.on('singleclick', function (p) {
setOlMapOpenData([]) setOlMapOpenData([])
setPointItem({}) setPointItem({})
setReportRoadData([])
olMapTool.closeOverlay('clickOpen') olMapTool.closeOverlay('clickOpen')
olMapTool.closeOverlay('pointClickOpen') olMapTool.closeOverlay('pointClickOpen')
olMapTool.removeGeometryLayer('geometry0') olMapTool.removeGeometryLayer('geometry0')
@ -201,9 +209,6 @@ const OlMap = (props) => {
useEffect(() => { useEffect(() => {
if (patrolList.length && olMap && tab == 'conserve') { if (patrolList.length && olMap && tab == 'conserve') {
roadProjectList.forEach((d, index) => {
olMap.removeGeometryLayer('geometry_road_' + index)
})
busRunData.forEach((d, index) => { busRunData.forEach((d, index) => {
olMap.removeGeometryLayer('geometry_bus_' + index) olMap.removeGeometryLayer('geometry_bus_' + index)
}) })
@ -302,58 +307,51 @@ const OlMap = (props) => {
useEffect(() => { useEffect(() => {
if (roadProjectList.length && olMap && tab == 'build') { if (roadProjectList.length && olMap && tab == 'build') {
patrolList.forEach((d, index) => { // roadProjectList.forEach((d, index) => {
olMap.removeGeometryLayer('geometry_patrol_' + index) // olMap.addGeometryLayer({
}) // features: [
busRunData.forEach((d, index) => { // {
olMap.removeGeometryLayer('geometry_bus_' + index) // name: 'roadPoint',
}) // attributes: {
// callbackParams: {
// type: 'roadPoint',
// id: d.id,
// },
// callback: (p) => {
// setPointItem(d)
// olMap.addOverlay('pointClickOpen', {
// id: 'pointClickOpen',
// offset: [0, 4], // 偏移
// position: [d.longitude, d.latitude], // 坐标
// // position: [115.944220000000, 28.545380000000],
// autoPan: true,
// autoPanMargin: 100,
// positioning: 'top-right'
// })
// // 查路线
roadProjectList.forEach((d, index) => { // }
olMap.addGeometryLayer({ // },
features: [ // geometry: [d.longitude, d.latitude],
{ // // geometry: [115.944220000000, 28.545380000000],
name: 'roadPoint', // geometryType: 'Point',
attributes: { // },
callbackParams: { // ],
type: 'roadPoint', // style: {
id: d.id, // icon: {
}, // src: '/assets/images/gis/pointer.png',
callback: (p) => { // scale: 1, // 图标引用
setPointItem(d) // },
olMap.addOverlay('pointClickOpen', { // },
id: 'pointClickOpen', // selectStyle: {
offset: [0, 4], // 偏移 // icon: {
position: [d.longitude, d.latitude], // 坐标 // src: '/assets/images/gis/pointer.png',
// position: [115.944220000000, 28.545380000000], // scale: 1, // 图标引用
autoPan: true, // },
autoPanMargin: 100, // },
positioning: 'top-right' // layerName: 'geometry_road_' + index
}) // });
// 查路线 // });
}
},
geometry: [d.longitude, d.latitude],
// geometry: [115.944220000000, 28.545380000000],
geometryType: 'Point',
},
],
style: {
icon: {
src: '/assets/images/gis/pointer.png',
scale: 1, // 图标引用
},
},
selectStyle: {
icon: {
src: '/assets/images/gis/pointer.png',
scale: 1, // 图标引用
},
},
layerName: 'geometry_road_' + index
});
});
} }
}, [roadProjectList, olMap, tab]) }, [roadProjectList, olMap, tab])
@ -367,9 +365,6 @@ const OlMap = (props) => {
patrolList.forEach((d, index) => { patrolList.forEach((d, index) => {
olMap.removeGeometryLayer('geometry_patrol_' + index) olMap.removeGeometryLayer('geometry_patrol_' + index)
}) })
roadProjectList.forEach((d, index) => {
olMap.removeGeometryLayer('geometry_road_' + index)
})
busRunData.forEach((d, index) => { busRunData.forEach((d, index) => {
olMap.addGeometryLayer({ olMap.addGeometryLayer({
@ -501,6 +496,7 @@ const OlMap = (props) => {
let renderIndex = 0 let renderIndex = 0
for (let res of roadRes) { for (let res of roadRes) {
const corData = projectList[renderIndex]
if (res) { if (res) {
if (res.status == 200 && res.body && res.body.code == 1) { if (res.status == 200 && res.body && res.body.code == 1) {
const data = res.body.data const data = res.body.data
@ -508,7 +504,7 @@ const OlMap = (props) => {
if (datalist?.list?.length) { if (datalist?.list?.length) {
let dataIndex = 0 let dataIndex = 0
for (let d of datalist.list) { for (let d of datalist.list) {
const corData = projectList[renderIndex]
olMap.addGeometryJMLayer({ olMap.addGeometryJMLayer({
features: [ features: [
{ {
@ -528,6 +524,8 @@ const OlMap = (props) => {
coordinate = [extent[coordinateIndex], extent[coordinate + 1]] coordinate = [extent[coordinateIndex], extent[coordinate + 1]]
} }
if (coordinate.length) { if (coordinate.length) {
setReportRoadData([])
setPointItem(corData)
setOlMapOpenData([{ setOlMapOpenData([{
n: '项目名称', n: '项目名称',
v: corData.entryName v: corData.entryName
@ -569,6 +567,56 @@ const OlMap = (props) => {
} }
} }
} }
if (corData.roadCodeStart) {
// 画对应的巡查上报的点
const corProjectRoadReport = roadProjectList.find(d => d.project_name == corData.entryName)
if (corProjectRoadReport) {
const d = corProjectRoadReport
olMap.addGeometryLayer({
features: [
{
name: 'roadPoint',
attributes: {
callbackParams: {
type: 'roadPoint',
id: d.id,
},
callback: (p) => {
setPointItem(d)
setReportRoadData([])
olMap.addOverlay('pointClickOpen', {
id: 'pointClickOpen',
offset: [0, 4], // 偏移
position: [d.longitude, d.latitude], // 坐标
// position: [115.944220000000, 28.545380000000],
autoPan: true,
autoPanMargin: 100,
positioning: 'top-right'
})
}
},
geometry: [d.longitude, d.latitude],
// geometry: [115.944220000000, 28.545380000000],
geometryType: 'Point',
},
],
style: {
icon: {
src: '/assets/images/gis/pointer.png',
scale: 1, // 图标引用
},
},
selectStyle: {
icon: {
src: '/assets/images/gis/pointer.png',
scale: 1, // 图标引用
},
},
layerName: 'geometry_road_' + d.id
});
}
}
renderIndex++ renderIndex++
} }
} else { } else {
@ -587,13 +635,14 @@ const OlMap = (props) => {
<div id="clickOpen" <div id="clickOpen"
style={{ style={{
backgroundImage: `url(../../../../../assets/images/leadership/beijinglan.png)`, backgroundImage: `url(../../../../../assets/images/leadership/beijinglan.png)`,
width: 340, minWidth: 340,
backgroundPosition: 'center', backgroundPosition: 'center',
backgroundSize: '100% 100%', backgroundSize: '100% 100%',
minHeight: 180, minHeight: 180,
padding: '24px', padding: '24px',
backgroundRepeat: 'no-repeat', backgroundRepeat: 'no-repeat',
color: '#fff' color: '#fff',
overflow: 'auto',
}}> }}>
{ {
olMapOpenData.map(s => { olMapOpenData.map(s => {
@ -613,6 +662,25 @@ const OlMap = (props) => {
) )
}) })
} }
{
pointItem.roadCodeStart ?
<a style={{ float: 'right' }} onClick={() => {
dispatch(getReportList({
reportType: 'road',
keyword: pointItem.entryName
})).then(res => {
if (res.success) {
let data = res.payload.data || []
if (!data.length) {
message.warning('暂无上报记录')
} else {
setReportRoadData(data)
}
}
})
}}>上报记录</a>
: ''
}
</div> </div>
</div> </div>
<div slot="overlays" style={{ display: 'none', }}> <div slot="overlays" style={{ display: 'none', }}>
@ -737,7 +805,87 @@ const OlMap = (props) => {
} }
</div> </div>
</div> </div>
</div>
{/* 展示在建项目的上报记录 */}
{
tab == 'build' && reportRoadData.length ?
<div style={{
backgroundColor: 'rgba(0, 33, 98, 0.8)',
height: 'calc(100vh - 103px)',
top: 0,
width: 320,
position: 'absolute',
right: 485,
zIndex: 9999
}}>
<div>
<CloseOutlined style={{
fontSize: 'large',
color: "#fff",
margin: 12
}} onClick={() => {
setReportRoadData([])
}} />
</div>
<AutoRollComponent
content={reportRoadData.map(r => {
return (
<div style={{
display: 'flex', backgroundImage: 'url(/assets/images/leadership/beijinglan.png)',
backgroundSize: '100% 100%',
margin: 8
}}>
<div style={{
width: 80, margin: "4px 0px 0px 4px",
}}>
{
r.scenePic?.length > 0 ?
<Carousel autoplay >
{
r.scenePic?.map(v => <img className='picfileimg'
style={{ width: 80, display: 'inline-block', }}
src={
v.startsWith("http") ? v :
`${localStorage.getItem("qndmn")}/${v}`
}
width={`200px`}
/>)
}
</Carousel>
: ''
}
</div>
<div style={{ flex: 1, marginLeft: 4, marginTop: 4, display: "flex", flexDirection: "column", justifyContent: "space-around" }}>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}>
上报时间:
<span style={{
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC",
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis"
}}>
{r.time ? moment(r.time).format("YYYY-MM-DD") : "--"}
</span>
</p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}>
上报内容:
<span title={r.content} style={{
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC",
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 120
}}>
{r.content}
</span>
</p>
</div>
</div>
)
})}
containerStyle={{ position: "relative", height: "90%", }}
divHeight={'calc(100vh - 154px)'} divId={"chart-overview-report-list"}
/>
</div>
: ''
}
</div >
) )
} }

0
web/log/development.txt

12210
web/package-lock.json

File diff suppressed because it is too large
Loading…
Cancel
Save