From 5cfd4b99ed01da9481eca70741dfe4c32efb01c7 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Wed, 19 Jul 2023 19:37:59 +0800 Subject: [PATCH 01/11] gis pinter img --- web/client/assets/images/gis/pointer.png | Bin 0 -> 1460 bytes .../quanju/containers/public/olMap.js | 22 ++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) create mode 100644 web/client/assets/images/gis/pointer.png diff --git a/web/client/assets/images/gis/pointer.png b/web/client/assets/images/gis/pointer.png new file mode 100644 index 0000000000000000000000000000000000000000..941be1e53f1fa08a616196f4b7a8af2e660361bd GIT binary patch literal 1460 zcmV;l1xxygP)Px)Zb?KzR7gv8m0N5SRT#(r-bC6Ac6&Bwhk27q#G)UZ8vFZnwKLJ2U4qvu%-9on(@e znR9;UJKy)6|DW(5PtO5X274eu#QyJ|1FUCiF#YkWX;eR2PfmRqGhq+{Ysp)Pp?M#e zsb>&ka4mV=1024<_Wd>HdmzyPaHP%xl^Doqf{rC(#*vfH()7YW{CQWw%uH)%paf}L)yMVS){?h)x77>Ax`0L( z!v@MxgDO!Sm5@d?T}V#?uq8y~h3*xD&wM(amN*wzI$vl5`b1U_D9_ zZ<{JEMNOJY1*nt`(Nr=3I}s4IxB@7D>jh9HeM1*zB>qsg|YsNCKxrXo6cyo^xTkj|orm^ytKfpa-& z4o%9?aGB%TGRI3cx406;)`0QMkL#&Y2QTio)-dy1FKkWe;#W4~T?I7H+JJJa(%xaLAU&?yeSyITMJ(~~lJDl4OZO>$$dBHJn+ z9MX(u=7Af-V&u98&fSsLCzmDQtvhIME!o_t5SVAdg5cRMl*g7TgKu?f2R}I}8-LBZ zvtaxK_ET|m%-S1NsU;PpOlMqVm#0MO$>k!u^|15Q(P8hQpa#ze6Tpsyq6=8>t=4xo zg~a7=F3N^86K;IC#7%h%?e<(M{NpX!Ro$s8)SWPCC>^H!^$E(~krt(nnBZ3q)z+Oa z$eX}3=`d9|Pv5NVd--(S+zB?^OzRw_ZHYd&V6K=yunNxX-5*0@- zp=;aCzaXQQyKbM#0a0%K_K}JTW zIZ>!`L)qrEBT>|)@${uvsY?F!^YyglJ?jw?c*oFaII5u(3sA8sK&7S-Dq&r?hN$P6 zEf1nlmFh$V!7Ejc7A=mK9gf;Aw<%29#Nlv8+-mGn^$e759CW;y5CyudDuwIZ9!gP%I(y26X8JeeR_ae1B8P|o O0000 { setPointItem(d) olMap.addOverlay('pointClickOpen', { id: 'pointClickOpen', - offset: [0, 25], // 偏移 + offset: [0, 4], // 偏移 position: [d.longitude, d.latitude], // 坐标 autoPan: true, autoPanMargin: 100, @@ -178,9 +178,8 @@ const OlMap = (props) => { ], style: { icon: { - src: '/assets/images/worker.png', - // anchor: [0.5, 1], - scale: 0.08, // 图标引用 + src: '/assets/images/gis/pointer.png', + scale: 1, // 图标引用 }, // stroke: { width: 1, color: '#ffff00' }, // circle: { @@ -191,9 +190,8 @@ const OlMap = (props) => { }, selectStyle: { icon: { - src: '/assets/images/worker.png', - // anchor: [0.5, 1], - scale: 0.08, // 图标引用 + src: '/assets/images/gis/pointer.png', + scale: 1, // 图标引用 }, // circle: { // radius: 16, // 直径 @@ -224,7 +222,7 @@ const OlMap = (props) => { setPointItem(d) olMap.addOverlay('pointClickOpen', { id: 'pointClickOpen', - offset: [0, 25], // 偏移 + offset: [0, 4], // 偏移 position: [d.longitude, d.latitude], // 坐标 // position: [115.944220000000, 28.545380000000], autoPan: true, @@ -240,14 +238,14 @@ const OlMap = (props) => { ], style: { icon: { - src: '/assets/images/worker.png', - scale: 0.08, // 图标引用 + src: '/assets/images/gis/pointer.png', + scale: 1, // 图标引用 }, }, selectStyle: { icon: { - src: '/assets/images/worker.png', - scale: 0.08, // 图标引用 + src: '/assets/images/gis/pointer.png', + scale: 1, // 图标引用 }, }, layerName: 'geometry_road_' + index From 7076bafa545e3ad69b0ee9e104b872ca567bf247 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Wed, 19 Jul 2023 19:57:22 +0800 Subject: [PATCH 02/11] scene_pic --- .../quanju/containers/public/olMap.js | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/web/client/src/sections/quanju/containers/public/olMap.js b/web/client/src/sections/quanju/containers/public/olMap.js index 21cba2b8..7117cefa 100644 --- a/web/client/src/sections/quanju/containers/public/olMap.js +++ b/web/client/src/sections/quanju/containers/public/olMap.js @@ -299,16 +299,23 @@ const OlMap = (props) => {
{ pointItem.id ? - + : '' }
From c83f3a19cffca87e74433bc1c53fe4623c35c2b0 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Wed, 19 Jul 2023 21:25:39 +0800 Subject: [PATCH 03/11] =?UTF-8?q?GIS=20=E5=BB=BA=E8=AE=BE=E7=9A=84?= =?UTF-8?q?=E7=82=B9=E9=83=A8=E5=9C=A8=E5=BB=BA=E8=AE=BEtab=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/sections/quanju/containers/example.js | 4 +++- .../quanju/containers/public/olMap.js | 22 +++++++++++++------ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/web/client/src/sections/quanju/containers/example.js b/web/client/src/sections/quanju/containers/example.js index 7d511841..16076718 100644 --- a/web/client/src/sections/quanju/containers/example.js +++ b/web/client/src/sections/quanju/containers/example.js @@ -32,6 +32,8 @@ const Example = (props) => { setPatrolList(res.payload.data || []) } }) + } + if (tab === 'build') { dispatch(getReportList({ reportType: 'road', isTop: true @@ -56,7 +58,7 @@ const Example = (props) => {
{/* */} - +
diff --git a/web/client/src/sections/quanju/containers/public/olMap.js b/web/client/src/sections/quanju/containers/public/olMap.js index 7117cefa..28c0af62 100644 --- a/web/client/src/sections/quanju/containers/public/olMap.js +++ b/web/client/src/sections/quanju/containers/public/olMap.js @@ -6,14 +6,14 @@ import moment from 'moment'; import { OlMapRequest } from '$utils' const OlMap = (props) => { - const { dispatch, actions, user, olMapArcgisHost, olMapGeoDataHost, patrolList, roadProjectList } = props + const { dispatch, actions, user, olMapArcgisHost, olMapGeoDataHost, patrolList, roadProjectList, tab } = props const [olMapOpenData, setOlMapOpenData] = useState([]) const [olMap, setOlMap] = useState() const [pointItem, setPointItem] = useState({}) useEffect(() => { - }, []) + }, [tab]) useEffect(() => { if (olMapGeoDataHost) { @@ -148,7 +148,11 @@ const OlMap = (props) => { }, [olMapGeoDataHost]) useEffect(() => { - if (patrolList.length && olMap) { + if (patrolList.length && olMap && tab == 'conserve') { + roadProjectList.forEach((d, index) => { + olMap.removeGeometryLayer('geometry_road_' + index) + }) + patrolList.forEach((d, index) => { console.log(d, index); olMap.addGeometryLayer({ @@ -204,10 +208,14 @@ const OlMap = (props) => { }); }); } - }, [patrolList, olMap]) + }, [patrolList, olMap, tab]) useEffect(() => { - if (roadProjectList.length && olMap) { + if (roadProjectList.length && olMap && tab == 'build') { + patrolList.forEach((d, index) => { + olMap.removeGeometryLayer('geometry_patrol_' + index) + }) + roadProjectList.forEach((d, index) => { olMap.addGeometryLayer({ features: [ @@ -248,11 +256,11 @@ const OlMap = (props) => { scale: 1, // 图标引用 }, }, - layerName: 'geometry_road_' + index + layerName: 'geometry_road_'// + index }); }); } - }, [roadProjectList, olMap]) + }, [roadProjectList, olMap, tab]) const isRoadProject = pointItem.report_type == 'road' return ( From 1374be5db9eb53d39896b1685ca0b2d0da3f2c37 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Wed, 19 Jul 2023 21:43:54 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E8=A7=86=E9=A2=915min=E8=BD=AE=E6=92=AD?= =?UTF-8?q?=E4=B8=80=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../quanju/containers/footer/leadership/left/left-center.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js b/web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js index 36aeabe6..7587bf57 100644 --- a/web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js +++ b/web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js @@ -36,7 +36,7 @@ const Leftcenter = ({ videoCenterList }) => { setNum(num + 1); // setTu(list[num].img); } - }, 2000 * 10); + }, 1000 * 60 * 5); return () => clearInterval(timer); }, [num]); From e70c851d62549aba74b14545395efb0047bf59d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=8C=E6=96=87=E9=BE=99?= Date: Wed, 19 Jul 2023 15:03:19 +0000 Subject: [PATCH 05/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'web/Dockerfilenew'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/Dockerfilenew | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/Dockerfilenew b/web/Dockerfilenew index c3597fae..cfcb5948 100644 --- a/web/Dockerfilenew +++ b/web/Dockerfilenew @@ -14,7 +14,7 @@ RUN npm cache clean -f RUN rm -rf package-lock.json RUN npm install --registry https://nexus.ngaiot.com/repository/fs-npm/ -RUN npm run build +RUN npm run build --max-old-space-size=4096 --max-new-space-size=4096 RUN rm -rf client/src From 077888f3b8ff3fc0f96798d287650e24b7794ccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=8C=E6=96=87=E9=BE=99?= Date: Wed, 19 Jul 2023 15:12:37 +0000 Subject: [PATCH 06/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'web/Dockerfilenew'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/Dockerfilenew | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/Dockerfilenew b/web/Dockerfilenew index cfcb5948..c3597fae 100644 --- a/web/Dockerfilenew +++ b/web/Dockerfilenew @@ -14,7 +14,7 @@ RUN npm cache clean -f RUN rm -rf package-lock.json RUN npm install --registry https://nexus.ngaiot.com/repository/fs-npm/ -RUN npm run build --max-old-space-size=4096 --max-new-space-size=4096 +RUN npm run build RUN rm -rf client/src From b8687e9abbfcc3ec8dca6953f6762f13255fdc52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=8C=E6=96=87=E9=BE=99?= Date: Wed, 19 Jul 2023 15:13:22 +0000 Subject: [PATCH 07/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'web/package.json'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/package.json b/web/package.json index add7d5a1..2f412647 100644 --- a/web/package.json +++ b/web/package.json @@ -9,7 +9,7 @@ "start-params": "node server -p 5000 -u http://localhost:13400 --qndmn http://rfkimpwbb.hn-bkt.clouddn.com --vcmpWebUrl https://mediaconsole.ngaiot.com --vcmpMirrorId 24461524032354", "deploy": "export NODE_ENV=production&&npm run color && npm run build && node server", "build-dev": "export NODE_ENV=development&&webpack --config webpack.config.js", - "build": "export NODE_ENV=production&&webpack --config webpack.config.prod.js", + "build": "export NODE_ENV=production&&node --max-old-space-size=4096 --max-new-space-size=4096 && webpack --config webpack.config.prod.js", "color": "node color" }, "keywords": [ From bb12355350c32595d1dc0ced0a466bb62d88867c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=8C=E6=96=87=E9=BE=99?= Date: Wed, 19 Jul 2023 15:18:08 +0000 Subject: [PATCH 08/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'web/package.json'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/package.json b/web/package.json index 2f412647..add7d5a1 100644 --- a/web/package.json +++ b/web/package.json @@ -9,7 +9,7 @@ "start-params": "node server -p 5000 -u http://localhost:13400 --qndmn http://rfkimpwbb.hn-bkt.clouddn.com --vcmpWebUrl https://mediaconsole.ngaiot.com --vcmpMirrorId 24461524032354", "deploy": "export NODE_ENV=production&&npm run color && npm run build && node server", "build-dev": "export NODE_ENV=development&&webpack --config webpack.config.js", - "build": "export NODE_ENV=production&&node --max-old-space-size=4096 --max-new-space-size=4096 && webpack --config webpack.config.prod.js", + "build": "export NODE_ENV=production&&webpack --config webpack.config.prod.js", "color": "node color" }, "keywords": [ From 7e5706e8b4cda0d60b066995809f051f5f8db866 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Wed, 19 Jul 2023 23:39:24 +0800 Subject: [PATCH 09/11] =?UTF-8?q?gis=E5=BC=B9=E6=A1=86=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../footer/leadership/centerleft/hudong.js | 30 +++++++++++++------ .../quanju/containers/public/olMap.js | 12 ++++++-- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/web/client/src/sections/quanju/containers/footer/leadership/centerleft/hudong.js b/web/client/src/sections/quanju/containers/footer/leadership/centerleft/hudong.js index 41ec44a9..4d01525f 100644 --- a/web/client/src/sections/quanju/containers/footer/leadership/centerleft/hudong.js +++ b/web/client/src/sections/quanju/containers/footer/leadership/centerleft/hudong.js @@ -2,7 +2,7 @@ import { values } from 'lodash'; import React, { Component } from 'react'; import './conter.less'; class ReactCarousel extends Component { - chunk(arr, size) { + chunk (arr, size) { var arr1 = new Array(); for (var i = 0; i < Math.ceil(arr.length / size); i++) { arr1[i] = new Array(); @@ -45,7 +45,7 @@ class ReactCarousel extends Component { // arr1: "" dizhi: localStorage.getItem("qndmn") } - // console.log(this.state.imgs); + console.log(this.props.shuzu); this.state.imgs = this.props.shuzu.filter((item) => { return item.imgs !== "" }) @@ -53,7 +53,7 @@ class ReactCarousel extends Component { } - render() { + render () { return (
{ this.start() }} //鼠标退出自动播放 > -
    +
      { this.state.imgs.map((value, index) => { return ( -
    • -
      - +
      +
    • @@ -101,11 +113,11 @@ class ReactCarousel extends Component {
) } - componentDidMount() { //一开始自动播放 + componentDidMount () { //一开始自动播放 this.start(); } - componentWillUnmount() { //销毁前清除定时器 + componentWillUnmount () { //销毁前清除定时器 this.stop(); } stop = () => { //暂停 diff --git a/web/client/src/sections/quanju/containers/public/olMap.js b/web/client/src/sections/quanju/containers/public/olMap.js index 28c0af62..85e7d53c 100644 --- a/web/client/src/sections/quanju/containers/public/olMap.js +++ b/web/client/src/sections/quanju/containers/public/olMap.js @@ -12,7 +12,13 @@ const OlMap = (props) => { const [pointItem, setPointItem] = useState({}) useEffect(() => { - + setOlMapOpenData([]) + setPointItem({}) + if (olMap) { + olMap.closeOverlay('clickOpen') + olMap.closeOverlay('pointClickOpen') + olMap.removeGeometryLayer('geometry0') + } }, [tab]) useEffect(() => { @@ -256,7 +262,7 @@ const OlMap = (props) => { scale: 1, // 图标引用 }, }, - layerName: 'geometry_road_'// + index + layerName: 'geometry_road_' + index }); }); } @@ -307,7 +313,7 @@ const OlMap = (props) => {
{ pointItem.id ? - Date: Thu, 20 Jul 2023 00:13:12 +0800 Subject: [PATCH 10/11] =?UTF-8?q?fix=20=E5=A4=84=E7=90=86=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E5=8F=AA=E6=9C=89=E5=9C=A8=E5=B7=B2=E5=8A=9E=E6=9C=AA?= =?UTF-8?q?=E5=8D=8A=E5=8F=AF=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weapp/src/packages/patrol/index.jsx | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/weapp/src/packages/patrol/index.jsx b/weapp/src/packages/patrol/index.jsx index bc6c80b3..6609e760 100644 --- a/weapp/src/packages/patrol/index.jsx +++ b/weapp/src/packages/patrol/index.jsx @@ -255,7 +255,7 @@ const Index = () => { ]) }, [reportType]) - function report() { + function report () { if (!canReport) { return } if ( (isPatrol && (!projectType || !road)) @@ -332,7 +332,7 @@ const Index = () => { }) } - function deleteReport() { + function deleteReport () { Taro.showModal({ title: '提示', content: '确定删除吗?', @@ -359,7 +359,7 @@ const Index = () => { }) } - function handleInput({ detail: { value } }, type) { + function handleInput ({ detail: { value } }, type) { switch (type) { case 'roadSectionStart': setRoadSectionStart(value) @@ -394,15 +394,15 @@ const Index = () => { } } - function handleTypeChange(e) { + function handleTypeChange (e) { setReportType(e.detail.value) } - function handleImgChange(files, operationType, index, type) { + function handleImgChange (files, operationType, index, type) { if (operationType === 'remove') { setImg(false) } - function setImg(isAdd, url) { + function setImg (isAdd, url) { switch (type) { case 'scenePic': let nextImg = sceneImg @@ -502,12 +502,12 @@ const Index = () => { } } - function handleImgClick(index, file) { + function handleImgClick (index, file) { Taro.previewImage({ urls: [file.url] // 需要预览的图片http链接列表 }) } - function handleImgClicks(index, file) { + function handleImgClicks (index, file) { Taro.previewImage({ urls: [file] // 需要预览的图片http链接列表 }) @@ -529,7 +529,7 @@ const Index = () => { } } }, [road]) - function handleOk() { + function handleOk () { if (!canReport) { return } let str = handleCenter.trim() if (!str) { @@ -574,14 +574,14 @@ const Index = () => { } }) } - function addVideo() { + function addVideo () { wx.chooseMedia({ count: 1, mediaType: ['video'], sourceType: ['album', 'camera'], maxDuration: 15, camera: 'back', - success(res) { + success (res) { const tempFilePaths = res.tempFiles[0].tempFilePath let token = getState('token') || Taro.getStorageSync('token') if (res.tempFiles[0].duration < 15) { @@ -947,7 +947,8 @@ const Index = () => { 上报 } { - handleType == '已处理' || wait == 'wait' || handle == 'handle' ? + // handleType == '已处理' || + wait == 'wait' || handle == 'handle' ? *处理内容: Date: Thu, 20 Jul 2023 00:37:56 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E5=85=BB=E6=8A=A4=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=85=B3=E9=94=AE=E5=AD=97=20conserve?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/client/src/sections/quanju/containers/example.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/client/src/sections/quanju/containers/example.js b/web/client/src/sections/quanju/containers/example.js index 16076718..20a59cf7 100644 --- a/web/client/src/sections/quanju/containers/example.js +++ b/web/client/src/sections/quanju/containers/example.js @@ -24,7 +24,7 @@ const Example = (props) => { console.log(tab); if (tab === 'conserve') { dispatch(getReportList({ - reportType: 'patrol', + reportType: 'conserve', isTop: true })).then(res => { console.log(res);