diff --git a/src/views/Home/MapCtrl/Pops/XunJian.js b/src/views/Home/MapCtrl/Pops/XunJian.js index 4318121e0..a9ed68915 100644 --- a/src/views/Home/MapCtrl/Pops/XunJian.js +++ b/src/views/Home/MapCtrl/Pops/XunJian.js @@ -1,13 +1,16 @@ -import React, { useEffect, useState } from 'react'; +import React, { useEffect, useState, useRef } from 'react'; import { Descriptions, Modal } from 'antd'; import {CloseOutlined} from '@ant-design/icons'; import { httpget2 } from '../../../../utils/request'; +import BasicCrudModal from '../../../../components/crud/BasicCrudModal' +import ModalForm from '../../../rcgl/xcxj/xjrw/detailForm'; import apiurl from '../../../../service/apiurl'; import moment from "moment" function Wxq({ id, data, dispatch }) { console.log(data); const width = 400; + const refModal = useRef(); const [detail, setDetail] = useState({}) const [visible,setVisible] = useState(false) const closePop = () => { @@ -37,9 +40,11 @@ function Wxq({ id, data, dispatch }) {
- {data.stnm} + {data.taskTitle}
-
{setVisible(true)}}>详情
+
{ + refModal.current.showView(data); + }}>详情
@@ -47,11 +52,11 @@ function Wxq({ id, data, dispatch }) {
- {data?.adnm || detail?.adnm} - {data?.ptcount || detail?.ptcount} + {data?.finishTime || detail?.adnm} + {data?.inspectUserName || detail?.ptcount} {data?.etcount || detail?.etcount} - {data.htcount || detail?.htcount} - {data.htcount || detail?.htcount} + {data.problemNum || detail?.htcount} + {data.handleNum || detail?.htcount}
@@ -60,17 +65,16 @@ function Wxq({ id, data, dispatch }) { - {setVisible(false)}} - width="60vw" - destroyOnClose - className="queryDrpModal" - style={{top:"15px", height:"58vh"}} - > - + + {}} + // onCrudSuccess={()=>{refresh({addvcd:localStorage.getItem('ADCD6')})}} + /> ) } diff --git a/src/views/Home/homePanelsLayoutPage/index.js b/src/views/Home/homePanelsLayoutPage/index.js index e708d4b81..d58285db9 100644 --- a/src/views/Home/homePanelsLayoutPage/index.js +++ b/src/views/Home/homePanelsLayoutPage/index.js @@ -53,7 +53,7 @@ const items = [ // { key:'23', label:'溢洪道', labelRight:'基本信息', icon:'yihongdao' }, // ] }, { key:'2', label:'巡查巡检', children:[ - { key:'21', label:'巡查巡检', labelRight:'工程巡检', icon:'shuiku' }, + { key:'21', label:'巡查巡检', labelRight:'工程巡检', icon:'jianceshebeizhuangtai' }, // { key:'22', label:'大坝', labelRight:'基本信息', icon:'daba' }, // { key:'23', label:'溢洪道', labelRight:'基本信息', icon:'yihongdao' }, ] }, diff --git a/src/views/Home/homePanelsLayoutPage/item_xunchaxunjian.js b/src/views/Home/homePanelsLayoutPage/item_xunchaxunjian.js index f1de3079d..9eb3608f9 100644 --- a/src/views/Home/homePanelsLayoutPage/item_xunchaxunjian.js +++ b/src/views/Home/homePanelsLayoutPage/item_xunchaxunjian.js @@ -30,7 +30,7 @@ const Page = ({mySetTms}) => { const columns1 = [ - { title: '巡查完成日期', key: 'finishTime', dataIndex: 'finishTime',align: "center", ellipsis: true }, + { title: '巡查完成日期', key: 'finishTime', dataIndex: 'finishTime',align: "center",width:180, ellipsis: true }, { title: '巡查人', key: 'inspectUserName', dataIndex: 'inspectUserName',align: "center" }, { title: '异常项次', key: 'problemNum', dataIndex: 'problemNum',align: "center" }, ]; @@ -44,6 +44,17 @@ const Page = ({mySetTms}) => { getDcl() getBy() getBn() + + + return ()=>{ + mapObj && mapObj.getLayers().getArray().forEach((layer)=> { + const a = layer.values_ + if( (layer.values_.name) && ((layer.values_.name).indexOf("HlSX_") !== -1 || (layer.values_.name).indexOf("HlItem_") !== -1 || (layer.values_.name).indexOf("LyItem_") !== -1) ){ + layer.getSource().clear(); + } + }) + dispatch.runtime.closeFeaturePopAll() + } },[]) const getDcl = async()=>{ @@ -153,10 +164,17 @@ const Page = ({mySetTms}) => { onRow={ (data)=>({ onClick:()=>{ - addHlLayer(data.data,'HlItem_'+data.stnm,'#00FFFF',data) + data.data = { + "type":"MultiLineString", + "coordinates":[[ + [114.746, 31.479], + [114.776, 31.509] + ]] + } + addHlLayer(data.data,'HlItem_'+data.id,'#00FFFF',data) const center = geometryCenter({type:"LineString",coordinates:data.data.coordinates[0]}); dispatch.runtime.setFeaturePop({ - id: data.stnm, + id: data.id, data: data, type: 'xunjian', lgtd: center[0], diff --git a/src/views/Home/setMapStation/drp.js b/src/views/Home/setMapStation/drp.js index a9fa8af25..a8cbe9ce7 100644 --- a/src/views/Home/setMapStation/drp.js +++ b/src/views/Home/setMapStation/drp.js @@ -131,7 +131,7 @@ export default function SetDrpStation({tms, setTableData}) { const point2 = transform([item.lgtd, item.lttd], 'EPSG:4326', 'EPSG:3857'); const feature = new Feature({ geometry: new Point(point2), - data:{...item,myParams:tms} + data:{...item,myParams:tms,myLayerType:'drp'} }); return feature @@ -150,7 +150,7 @@ export default function SetDrpStation({tms, setTableData}) { }); if (feature) { const data = feature.values_.data - if(data){ + if(data && data.myLayerType==='drp'){ dispatch.runtime.setFeaturePop({ id: data.stcd, data:{...data,myParams:tms}, diff --git a/src/views/Home/setMapStation/wxq.js b/src/views/Home/setMapStation/wxq.js index e60014c62..dbc49c37c 100644 --- a/src/views/Home/setMapStation/wxq.js +++ b/src/views/Home/setMapStation/wxq.js @@ -84,7 +84,7 @@ export default function SetDrpStation({tms}) { }); const feature = new Feature({ geometry, - data:{...item.properties,geometry:item.geometry}, + data:{...item.properties,geometry:item.geometry,myLayerType:'wxq'}, }); return feature @@ -104,8 +104,7 @@ export default function SetDrpStation({tms}) { const data = feature.values_.data const center = geometryCenter(data.geometry); - - if(data){ + if(data && data.myLayerType==='wxq'){ dispatch.runtime.setCameraTarget({ center: [center[0], center[1]],