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*
web/package-lock.json*
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 moment = require('moment');
async function reportList(ctx) {
async function reportList (ctx) {
try {
const models = ctx.fs.dc.models;
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',
'content', 'longitude', 'latitude', 'projectName', 'handleState', 'codeRoad', 'handleContent', 'handlePic', 'videoUrl'],
'content', 'longitude', 'latitude', 'projectName', 'handleState', 'codeRoad', 'handleContent', 'handlePic', 'videoUrl',
'scenePic'],
include: [{
model: models.User,
attributes: ['name']
@ -147,7 +148,7 @@ async function reportList(ctx) {
}
}
async function reportPosition(ctx) {
async function reportPosition (ctx) {
try {
const models = ctx.fs.dc.models;
const { startTime, endTime, userId, reportType } = ctx.query
@ -197,7 +198,7 @@ async function reportPosition(ctx) {
}
}
async function reportDetail(ctx) {
async function reportDetail (ctx) {
try {
const models = ctx.fs.dc.models;
const { reportId } = ctx.params
@ -219,7 +220,7 @@ async function reportDetail(ctx) {
}
}
async function reportHandle(ctx) {
async function reportHandle (ctx) {
try {
const { models } = ctx.fs.dc;
@ -249,7 +250,7 @@ async function reportHandle(ctx) {
}
}
async function createReport(ctx) {
async function createReport (ctx) {
try {
const { userId } = ctx.fs.api
const models = ctx.fs.dc.models;
@ -271,7 +272,7 @@ async function createReport(ctx) {
}
}
async function deleteReport(ctx) {
async function deleteReport (ctx) {
try {
const models = ctx.fs.dc.models;
const { reportId } = ctx.params;
@ -294,7 +295,7 @@ async function deleteReport(ctx) {
// TODO 小程序填写道路名称的时候的道路筛选 是一起都返回 还是不断传关键字搜索返回
async function spotPrepare(ctx) {
async function spotPrepare (ctx) {
try {
const { models } = ctx.fs.dc;
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();
try {
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
console.log('txc1', 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 [form] = Form.useForm();
const [loading, setLoading] = useState(false);
return (
<Modal
@ -22,6 +23,7 @@ const AssessModal = ({ editData, check, visible, onCancel, dispatch }) => {
if (check) {
return onCancel()
}
setLoading(true)
form.validateFields().then(values => {
dispatch(editAssess({
...values,
@ -31,12 +33,14 @@ const AssessModal = ({ editData, check, visible, onCancel, dispatch }) => {
if (res.success) {
onCancel()
}
setLoading(false)
})
})
}}
onCancel={() => {
onCancel()
}}
confirmLoading={loading}
>
<Form
form={form}

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

@ -13,7 +13,7 @@ const { TextArea } = Input;
const NominateModal = (props) => {
const { queryData, recordId, visible, user, onCancel, depMessage, loading, depUser, clientHeight, depData, onVisibleChange, dispatch } = props
const [depId, setDepId] = useState(0)
const [depUsers, setDepUsers] = useState()
const [depUsers, setDepUsers] = useState([])
// const [value, setValue] = useState(undefined);
const [selectedUserId, setSelectedUserId] = useState(null);
const [form] = Form.useForm();
@ -24,15 +24,11 @@ const NominateModal = (props) => {
// 根据选择的部门ID获取对应的用户数据
//setDepUsers([])
const res = await dispatch(getDepUser(value))
const copy = res.payload.data.filter(user => {
if (user.isAdmin) {
return user
}
})
let processedUsers = copy.map((item) => {
let processedUsers = res.payload.data?.map((item) => {
return {
label: item.name,
value: item.id,
phone: item.phone
}
})
setDepUsers(processedUsers)
@ -48,6 +44,9 @@ const NominateModal = (props) => {
onCancel()
setDepUsers([])
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 PropTypes from 'prop-types'
import { geoJson } from './mock_data';
export default class Bounds extends Component {
constructor(props) {
super(props);
this.map = props.map;
this.pl = {};
this.textMarker = {};
}
static propTypes = {
prop: PropTypes
}
componentDidMount() {
if (!window.BoundPl) {
this.drawBounds();
}
}
componentWillUnmount() {
if (window.local_)
window.local_.remove(this.pl);
this.textMarker = null;
window.BoundPl = null;
}
drawBounds = () => {
var map = this.map;
var loca = window.local_;
loca.ambLight = {
intensity: 0.3,
color: '#fff',
};
loca.dirLight = {
intensity: 0.6,
color: '#fff',
target: [0, 0, 0],
position: [0, -1, 1],
};
loca.pointLight = {
color: 'rgb(100,100,100)',
position: [120.24289, 30.341335, 20000],
intensity: 3,
// 距离表示从光源到光照强度为 0 的位置,0 就是光不会消失。
distance: 50000,
};
var geo = new Loca.GeoJSONSource({
data: geoJson
});
var colors = ['#04398c', '#04398c', '#0542a5'].reverse();
var height = [500];
var pl = new Loca.PolygonLayer({
// loca,
zIndex: 1,
opacity: 0.6,
// cullface: 'none',
shininess: 10,
hasSide: true,
});
pl.setSource(geo);
pl.setStyle({
topColor: function (index, feature) {
var i = index % 3;
return colors[i];
},
sideColor: function (index, feature) {
return '#023890';
},
borderColor: function () {
return '#24dcf7'
},
height: function (index, feature) {
return index == 0 ? height[0] : height[0] + index * 50;
},
altitude: 0,
});
loca.add(pl);
// 创建纯文本标记
var text = new AMap.Text({
text: '纯文本标记',
anchor: 'center', // 设置文本标记锚点
draggable: true,
cursor: 'pointer',
angle: 0,
visible: false,
offset: [60, 60],
extData: 'bounds_text',
style: {
'padding': '5px 10px',
'margin-bottom': '1rem',
'border-radius': '.25rem',
'background-color': 'rgba(0,0,0,0.5)',
// 'width': '12rem',
'border-width': 0,
'box-shadow': '0 2px 6px 0 rgba(255, 255, 255, .3)',
'text-align': 'center',
'font-size': '16px',
'color': '#fff',
},
});
// text.setMap(map);
if (!this.textMarker)
map.add(text);
this.textMarker = text;
console.log(text)
// 拾取
map.on('mousemove', (e) => {
var feat = pl.queryFeature(e.pixel.toArray());
// if (!text) {
map.add(text);
// text = this.textMarker;
// }
if (feat) {
text.show();
text.setText(feat.properties.NAME);
text.setPosition(e.lnglat);
pl.setStyle({
topColor: (index, feature) => {
if (feature === feat) {
return [19, 43, 77, 1];
}
// var v = feature.properties.health * 100;
var i = index % 3;
return colors[i];
},
sideColor: (index, feature) => {
if (feature === feat) {
return '#023890';
}
return '#023890';
},
borderColor: function () {
return '#24dcf7'
},
height: function (index, feature) {
return index == 0 ? height[0] : height[0] + index * 50;
},
});
} else {
pl.setStyle({
topColor: function (index, feature) {
var i = index % 3;
return colors[i];
},
sideColor: function (index, feature) {
return '#023890';
},
borderColor: function () {
return '#24dcf7'
},
height: function (index, feature) {
return index == 0 ? height[0] : height[0] + index * 50;
},
altitude: 0,
});
text.hide();
map.remove(text);
}
});
map.setZoom(12.88)
map.setCenter([115.888149, 28.549851]);
map.setRotation(-68.7);
map.setPitch(42);
this.pl = pl;
window.BoundPl = pl;
}
render() {
return (
<div>
</div>
)
}
}
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { geoJson } from './mock_data';
export default class Bounds extends Component {
constructor(props) {
super(props);
this.map = props.map;
this.pl = {};
this.textMarker = {};
}
static propTypes = {
prop: PropTypes
}
componentDidMount() {
if (!window.BoundPl) {
this.drawBounds();
}
}
componentWillUnmount() {
if (window.local_)
window.local_.remove(this.pl);
this.textMarker = null;
window.BoundPl = null;
}
drawBounds = () => {
var map = this.map;
var loca = window.local_;
loca.ambLight = {
intensity: 0.3,
color: '#fff',
};
loca.dirLight = {
intensity: 0.6,
color: '#fff',
target: [0, 0, 0],
position: [0, -1, 1],
};
loca.pointLight = {
color: 'rgb(100,100,100)',
position: [120.24289, 30.341335, 20000],
intensity: 3,
// 距离表示从光源到光照强度为 0 的位置,0 就是光不会消失。
distance: 50000,
};
var geo = new Loca.GeoJSONSource({
data: geoJson
});
var colors = ['#04398c', '#04398c', '#0542a5'].reverse();
var height = [500];
var pl = new Loca.PolygonLayer({
// loca,
zIndex: 1,
opacity: 0.6,
// cullface: 'none',
shininess: 10,
hasSide: true,
});
pl.setSource(geo);
pl.setStyle({
topColor: function (index, feature) {
var i = index % 3;
return colors[i];
},
sideColor: function (index, feature) {
return '#023890';
},
borderColor: function () {
return '#24dcf7'
},
height: function (index, feature) {
return index == 0 ? height[0] : height[0] + index * 50;
},
altitude: 0,
});
loca.add(pl);
// 创建纯文本标记
var text = new AMap.Text({
text: '纯文本标记',
anchor: 'center', // 设置文本标记锚点
draggable: true,
cursor: 'pointer',
angle: 0,
visible: false,
offset: [60, 60],
extData: 'bounds_text',
style: {
'padding': '5px 10px',
'margin-bottom': '1rem',
'border-radius': '.25rem',
'background-color': 'rgba(0,0,0,0.5)',
// 'width': '12rem',
'border-width': 0,
'box-shadow': '0 2px 6px 0 rgba(255, 255, 255, .3)',
'text-align': 'center',
'font-size': '16px',
'color': '#fff',
},
});
// text.setMap(map);
if (!this.textMarker)
map.add(text);
this.textMarker = text;
console.log(text)
// 拾取
map.on('mousemove', (e) => {
var feat = pl.queryFeature(e.pixel.toArray());
// if (!text) {
map.add(text);
// text = this.textMarker;
// }
if (feat) {
text.show();
text.setText(feat.properties.NAME);
text.setPosition(e.lnglat);
pl.setStyle({
topColor: (index, feature) => {
if (feature === feat) {
return [19, 43, 77, 1];
}
// var v = feature.properties.health * 100;
var i = index % 3;
return colors[i];
},
sideColor: (index, feature) => {
if (feature === feat) {
return '#023890';
}
return '#023890';
},
borderColor: function () {
return '#24dcf7'
},
height: function (index, feature) {
return index == 0 ? height[0] : height[0] + index * 50;
},
});
} else {
pl.setStyle({
topColor: function (index, feature) {
var i = index % 3;
return colors[i];
},
sideColor: function (index, feature) {
return '#023890';
},
borderColor: function () {
return '#24dcf7'
},
height: function (index, feature) {
return index == 0 ? height[0] : height[0] + index * 50;
},
altitude: 0,
});
text.hide();
map.remove(text);
}
});
map.setZoom(12.88)
map.setCenter([115.888149, 28.549851]);
map.setRotation(-68.7);
map.setPitch(42);
this.pl = pl;
window.BoundPl = pl;
}
render() {
return (
<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 { dispatch } = props
const style = { height: "28%", marginTop: "4%" }
const [beijing, setBeijing] = useState()
const [list, setList] = useState([])
const [rightDatas, setrightDatas] = useState([])
const [nums, setNums] = useState([])
const [num, setNum] = useState()
const [rightitemlist, setrightitemlist] = useState([])
const requestRightDatas = async () => {
const res = await dispatch(getZhichaolist())
var pattern = /[\u4e00-\u9fa5]*/;
let d = res.payload.data?.overSpeedList?.filter((item, index) => {
return /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false
})
console.log(res);
d.map((item, index) => {
if (parseInt(item.processingTime.match(/([^.]*)$/)[0]) < 10) {
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>
const { dispatch } = props
const style = { height: "28%", marginTop: "4%" }
const [beijing, setBeijing] = useState()
const [list, setList] = useState([])
const [rightDatas, setrightDatas] = useState([])
const [nums, setNums] = useState([])
const [num, setNum] = useState()
const [rightitemlist, setrightitemlist] = useState([])
const requestRightDatas = async () => {
const res = await dispatch(getZhichaolist())
var pattern = /[\u4e00-\u9fa5]*/;
let d = res.payload.data?.overSpeedList?.filter((item, index) => {
return /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false
})
console.log(res);
d.map((item, index) => {
if (parseInt(item.processingTime.match(/([^.]*)$/)[0]) < 10) {
return item.processingTime = `${(item.processingTime.match(/^([^.]*)(.[^.]*)/)[0])}.0${parseInt(item.processingTime.match(/([^.]*)$/)[0])}`
}
}) : ""}
</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>
</>
)
})
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>
}
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

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 { OlMapRequest } from '$utils'
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 = [
{ text: '非运营', value: '0' },
@ -32,6 +36,7 @@ const OlMap = (props) => {
const [pointItem, setPointItem] = useState({})
//
const [busRunData, setBusRunData] = useState([])
const [reportRoadData, setReportRoadData] = useState([])
//
const curTab = useRef(tab)
@ -39,6 +44,7 @@ const OlMap = (props) => {
curTab.current = tab
setOlMapOpenData([])
setPointItem({})
setReportRoadData([])
if (olMap) {
olMap.closeOverlay('clickOpen')
olMap.closeOverlay('pointClickOpen')
@ -51,6 +57,7 @@ const OlMap = (props) => {
if (tab != 'build') {
roadProjectList.forEach((d, index) => {
olMap.removeGeometryLayer('geometry_road_' + index)
olMap.removeGeometryLayer('geometry_road_' + d.id)
})
}
if (tab != 'operation') {
@ -100,6 +107,7 @@ const OlMap = (props) => {
olMapTool.map.on('singleclick', function (p) {
setOlMapOpenData([])
setPointItem({})
setReportRoadData([])
olMapTool.closeOverlay('clickOpen')
olMapTool.closeOverlay('pointClickOpen')
olMapTool.removeGeometryLayer('geometry0')
@ -201,9 +209,6 @@ const OlMap = (props) => {
useEffect(() => {
if (patrolList.length && olMap && tab == 'conserve') {
roadProjectList.forEach((d, index) => {
olMap.removeGeometryLayer('geometry_road_' + index)
})
busRunData.forEach((d, index) => {
olMap.removeGeometryLayer('geometry_bus_' + index)
})
@ -302,58 +307,51 @@ const OlMap = (props) => {
useEffect(() => {
if (roadProjectList.length && olMap && tab == 'build') {
patrolList.forEach((d, index) => {
olMap.removeGeometryLayer('geometry_patrol_' + index)
})
busRunData.forEach((d, index) => {
olMap.removeGeometryLayer('geometry_bus_' + index)
})
// roadProjectList.forEach((d, index) => {
// olMap.addGeometryLayer({
// features: [
// {
// 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: [
{
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'
})
// 查路线
}
},
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
});
});
// }
// },
// 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])
@ -367,9 +365,6 @@ const OlMap = (props) => {
patrolList.forEach((d, index) => {
olMap.removeGeometryLayer('geometry_patrol_' + index)
})
roadProjectList.forEach((d, index) => {
olMap.removeGeometryLayer('geometry_road_' + index)
})
busRunData.forEach((d, index) => {
olMap.addGeometryLayer({
@ -501,6 +496,7 @@ const OlMap = (props) => {
let renderIndex = 0
for (let res of roadRes) {
const corData = projectList[renderIndex]
if (res) {
if (res.status == 200 && res.body && res.body.code == 1) {
const data = res.body.data
@ -508,7 +504,7 @@ const OlMap = (props) => {
if (datalist?.list?.length) {
let dataIndex = 0
for (let d of datalist.list) {
const corData = projectList[renderIndex]
olMap.addGeometryJMLayer({
features: [
{
@ -528,6 +524,8 @@ const OlMap = (props) => {
coordinate = [extent[coordinateIndex], extent[coordinate + 1]]
}
if (coordinate.length) {
setReportRoadData([])
setPointItem(corData)
setOlMapOpenData([{
n: '项目名称',
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++
}
} else {
@ -587,13 +635,14 @@ const OlMap = (props) => {
<div id="clickOpen"
style={{
backgroundImage: `url(../../../../../assets/images/leadership/beijinglan.png)`,
width: 340,
minWidth: 340,
backgroundPosition: 'center',
backgroundSize: '100% 100%',
minHeight: 180,
padding: '24px',
backgroundRepeat: 'no-repeat',
color: '#fff'
color: '#fff',
overflow: 'auto',
}}>
{
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 slot="overlays" style={{ display: 'none', }}>
@ -737,7 +805,87 @@ const OlMap = (props) => {
}
</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