Compare commits

..

8 Commits

7 changed files with 53 additions and 29 deletions

View File

@ -1,13 +1,16 @@
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState, useRef } from 'react';
import { Descriptions, Modal } from 'antd'; import { Descriptions, Modal } from 'antd';
import {CloseOutlined} from '@ant-design/icons'; import {CloseOutlined} from '@ant-design/icons';
import { httpget2 } from '../../../../utils/request'; import { httpget2 } from '../../../../utils/request';
import BasicCrudModal from '../../../../components/crud/BasicCrudModal'
import ModalForm from '../../../rcgl/xcxj/xjrw/detailForm';
import apiurl from '../../../../service/apiurl'; import apiurl from '../../../../service/apiurl';
import moment from "moment" import moment from "moment"
function Wxq({ id, data, dispatch }) { function Wxq({ id, data, dispatch }) {
console.log(data); console.log(data);
const width = 400; const width = 400;
const refModal = useRef();
const [detail, setDetail] = useState({}) const [detail, setDetail] = useState({})
const [visible,setVisible] = useState(false) const [visible,setVisible] = useState(false)
const closePop = () => { const closePop = () => {
@ -37,9 +40,11 @@ function Wxq({ id, data, dispatch }) {
<div className="title"> <div className="title">
<div className="name flex flexac"> <div className="name flex flexac">
<div className='nameBorder'></div> <div className='nameBorder'></div>
{data.stnm} {data.taskTitle}
</div> </div>
<div style={{cursor:'pointer',marginRight:'10px'}} onClick={()=>{setVisible(true)}}>详情</div> <div style={{cursor:'pointer',marginRight:'10px'}} onClick={()=>{
refModal.current.showView(data);
}}>详情</div>
<div className="extra"> <div className="extra">
<CloseOutlined onClick={closePop} style={{color:"#333"}}/> <CloseOutlined onClick={closePop} style={{color:"#333"}}/>
</div> </div>
@ -47,11 +52,11 @@ function Wxq({ id, data, dispatch }) {
<div className="body"> <div className="body">
<Descriptions labelStyle={{padding:"5px 0"}}> <Descriptions labelStyle={{padding:"5px 0"}}>
<Descriptions.Item label="巡查完成日期" span={3} contentStyle={{ padding: "5px 0" }}>{data?.adnm || detail?.adnm}</Descriptions.Item> <Descriptions.Item label="巡查完成日期" span={3} contentStyle={{ padding: "5px 0" }}>{data?.finishTime || detail?.adnm}</Descriptions.Item>
<Descriptions.Item label="检查人" span={3} contentStyle={{padding:"5px 0"}}>{data?.ptcount || detail?.ptcount}</Descriptions.Item> <Descriptions.Item label="检查人" span={3} contentStyle={{padding:"5px 0"}}>{data?.inspectUserName || detail?.ptcount}</Descriptions.Item>
<Descriptions.Item label="任务类型" span={3} contentStyle={{padding:"5px 0"}}>{data?.etcount || detail?.etcount}</Descriptions.Item> <Descriptions.Item label="任务类型" span={3} contentStyle={{padding:"5px 0"}}>{data?.etcount || detail?.etcount}</Descriptions.Item>
<Descriptions.Item label="问题数量" span={3} contentStyle={{padding:"5px 0"}}>{data.htcount || detail?.htcount}</Descriptions.Item> <Descriptions.Item label="问题数量" span={3} contentStyle={{padding:"5px 0"}}>{data.problemNum || detail?.htcount}</Descriptions.Item>
<Descriptions.Item label="待处理" span={3} contentStyle={{padding:"5px 0"}}>{data.htcount || detail?.htcount}</Descriptions.Item> <Descriptions.Item label="待处理" span={3} contentStyle={{padding:"5px 0"}}>{data.handleNum || detail?.htcount}</Descriptions.Item>
</Descriptions> </Descriptions>
</div> </div>
</div> </div>
@ -60,17 +65,17 @@ function Wxq({ id, data, dispatch }) {
</div> </div>
<Modal
visible={visible} <BasicCrudModal
title={'巡查任务详情'} width={1000}
footer={null} ref={refModal}
onCancel={()=>{setVisible(false)}} style={{top:'100px'}}
width="60vw" title=""
destroyOnClose title1="巡查任务详情"
className="queryDrpModal" component={ModalForm}
style={{top:"15px", height:"58vh"}} onCrudSuccess={()=>{}}
> // onCrudSuccess={()=>{refresh({addvcd:localStorage.getItem('ADCD6')})}}
</Modal> />
</> </>
) )
} }

View File

@ -53,7 +53,7 @@ const items = [
// { key:'23', label:'溢洪道', labelRight:'基本信息', icon:'yihongdao' }, // { key:'23', label:'溢洪道', labelRight:'基本信息', icon:'yihongdao' },
// ] }, // ] },
{ key:'2', label:'巡查巡检', children:[ { key:'2', label:'巡查巡检', children:[
{ key:'21', label:'巡查巡检', labelRight:'工程巡检', icon:'shuiku' }, { key:'21', label:'巡查巡检', labelRight:'工程巡检', icon:'jianceshebeizhuangtai' },
// { key:'22', label:'大坝', labelRight:'基本信息', icon:'daba' }, // { key:'22', label:'大坝', labelRight:'基本信息', icon:'daba' },
// { key:'23', label:'溢洪道', labelRight:'基本信息', icon:'yihongdao' }, // { key:'23', label:'溢洪道', labelRight:'基本信息', icon:'yihongdao' },
] }, ] },

View File

@ -30,7 +30,7 @@ const Page = ({mySetTms}) => {
const columns1 = [ 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: 'inspectUserName', dataIndex: 'inspectUserName',align: "center" },
{ title: '异常项次', key: 'problemNum', dataIndex: 'problemNum',align: "center" }, { title: '异常项次', key: 'problemNum', dataIndex: 'problemNum',align: "center" },
]; ];
@ -44,6 +44,17 @@ const Page = ({mySetTms}) => {
getDcl() getDcl()
getBy() getBy()
getBn() 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()=>{ const getDcl = async()=>{
@ -153,10 +164,17 @@ const Page = ({mySetTms}) => {
onRow={ onRow={
(data)=>({ (data)=>({
onClick:()=>{ 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]}); const center = geometryCenter({type:"LineString",coordinates:data.data.coordinates[0]});
dispatch.runtime.setFeaturePop({ dispatch.runtime.setFeaturePop({
id: data.stnm, id: data.id,
data: data, data: data,
type: 'xunjian', type: 'xunjian',
lgtd: center[0], lgtd: center[0],
@ -205,6 +223,7 @@ const Page = ({mySetTms}) => {
<BasicCrudModal <BasicCrudModal
width={1000} width={1000}
ref={refModal} ref={refModal}
style={{top:'100px'}}
title="" title=""
component={ModalForm} component={ModalForm}
title1="详情" title1="详情"

View File

@ -131,7 +131,7 @@ export default function SetDrpStation({tms, setTableData}) {
const point2 = transform([item.lgtd, item.lttd], 'EPSG:4326', 'EPSG:3857'); const point2 = transform([item.lgtd, item.lttd], 'EPSG:4326', 'EPSG:3857');
const feature = new Feature({ const feature = new Feature({
geometry: new Point(point2), geometry: new Point(point2),
data:{...item,myParams:tms} data:{...item,myParams:tms,myLayerType:'drp'}
}); });
return feature return feature
@ -150,7 +150,7 @@ export default function SetDrpStation({tms, setTableData}) {
}); });
if (feature) { if (feature) {
const data = feature.values_.data const data = feature.values_.data
if(data){ if(data && data.myLayerType==='drp'){
dispatch.runtime.setFeaturePop({ dispatch.runtime.setFeaturePop({
id: data.stcd, id: data.stcd,
data:{...data,myParams:tms}, data:{...data,myParams:tms},

View File

@ -84,7 +84,7 @@ export default function SetDrpStation({tms}) {
}); });
const feature = new Feature({ const feature = new Feature({
geometry, geometry,
data:{...item.properties,geometry:item.geometry}, data:{...item.properties,geometry:item.geometry,myLayerType:'wxq'},
}); });
return feature return feature
@ -104,8 +104,7 @@ export default function SetDrpStation({tms}) {
const data = feature.values_.data const data = feature.values_.data
const center = geometryCenter(data.geometry); const center = geometryCenter(data.geometry);
if(data && data.myLayerType==='wxq'){
if(data){
dispatch.runtime.setCameraTarget({ dispatch.runtime.setCameraTarget({
center: [center[0], center[1]], center: [center[0], center[1]],

View File

@ -28,7 +28,7 @@ const ToolBar = ({ setSearchVal, onExport, storeData, role }) => {
<Form.Item label="类型" name="types"> <Form.Item label="类型" name="types">
<Select options={[ <Select options={[
{value:1,label:'大事记'}, {value:2,label:'调度指令'}, {value:3,label:'维修养护'},{value:4,label:'安全鉴定'}, {value:5,label:"除险加固"}, {value:6,label:'白蚁普查'} {value:1,label:'大事记'}, {value:2,label:'调度指令'}, {value:3,label:'维修养护'},{value:4,label:'安全鉴定'}, {value:5,label:"除险加固"}, {value:6,label:'白蚁普查'}
]} allowClear mode='tags' style={{ width: "400px" }}/> ]} allowClear mode='multiple' maxTagCount='responsive' style={{ width: "200px" }}/>
</Form.Item> </Form.Item>
<Form.Item label="发生日期" name="tm"> <Form.Item label="发生日期" name="tm">
<RangePicker <RangePicker

View File

@ -36,6 +36,7 @@ const Page = ({ title = '标题' }) => {
angleAxis: { angleAxis: {
type: 'category', type: 'category',
data: plandata?.map(item=>item.name), data: plandata?.map(item=>item.name),
}, },
radiusAxis: { radiusAxis: {
min: 0, min: 0,
@ -67,7 +68,7 @@ const Page = ({ title = '标题' }) => {
show:false, show:false,
}, },
labelLine: { labelLine: {
show: false show: true
}, },
itemStyle: { itemStyle: {
normal: { normal: {