Compare commits

..

No commits in common. "a41fb4bf9136edea96998ea99299661dd6eba243" and "6ed971f5eb00f64943dfffd6a979eecc55be87c0" have entirely different histories.

7 changed files with 29 additions and 53 deletions

View File

@ -1,16 +1,13 @@
import React, { useEffect, useState, useRef } from 'react'; import React, { useEffect, useState } 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 = () => {
@ -40,11 +37,9 @@ 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.taskTitle} {data.stnm}
</div> </div>
<div style={{cursor:'pointer',marginRight:'10px'}} onClick={()=>{ <div style={{cursor:'pointer',marginRight:'10px'}} onClick={()=>{setVisible(true)}}>详情</div>
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>
@ -52,11 +47,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?.finishTime || detail?.adnm}</Descriptions.Item> <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?.inspectUserName || detail?.ptcount}</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?.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.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.Item label="待处理" span={3} contentStyle={{padding:"5px 0"}}>{data.htcount || detail?.htcount}</Descriptions.Item>
</Descriptions> </Descriptions>
</div> </div>
</div> </div>
@ -65,17 +60,17 @@ function Wxq({ id, data, dispatch }) {
</div> </div>
<Modal
<BasicCrudModal visible={visible}
width={1000} title={'巡查任务详情'}
ref={refModal} footer={null}
style={{top:'100px'}} onCancel={()=>{setVisible(false)}}
title="" width="60vw"
title1="巡查任务详情" destroyOnClose
component={ModalForm} className="queryDrpModal"
onCrudSuccess={()=>{}} style={{top:"15px", height:"58vh"}}
// 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:'jianceshebeizhuangtai' }, { key:'21', label:'巡查巡检', labelRight:'工程巡检', icon:'shuiku' },
// { 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",width:180, ellipsis: true }, { title: '巡查完成日期', key: 'finishTime', dataIndex: 'finishTime',align: "center", 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,17 +44,6 @@ 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()=>{
@ -164,17 +153,10 @@ const Page = ({mySetTms}) => {
onRow={ onRow={
(data)=>({ (data)=>({
onClick:()=>{ onClick:()=>{
data.data = { addHlLayer(data.data,'HlItem_'+data.stnm,'#00FFFF',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.id, id: data.stnm,
data: data, data: data,
type: 'xunjian', type: 'xunjian',
lgtd: center[0], lgtd: center[0],
@ -223,7 +205,6 @@ 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,myLayerType:'drp'} data:{...item,myParams:tms}
}); });
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 && data.myLayerType==='drp'){ if(data){
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,myLayerType:'wxq'}, data:{...item.properties,geometry:item.geometry},
}); });
return feature return feature
@ -104,7 +104,8 @@ 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='multiple' maxTagCount='responsive' style={{ width: "200px" }}/> ]} allowClear mode='tags' style={{ width: "400px" }}/>
</Form.Item> </Form.Item>
<Form.Item label="发生日期" name="tm"> <Form.Item label="发生日期" name="tm">
<RangePicker <RangePicker

View File

@ -36,7 +36,6 @@ 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,
@ -68,7 +67,7 @@ const Page = ({ title = '标题' }) => {
show:false, show:false,
}, },
labelLine: { labelLine: {
show: true show: false
}, },
itemStyle: { itemStyle: {
normal: { normal: {