本月记录修改
parent
bb849641af
commit
f36f999f8c
|
|
@ -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 }) {
|
|||
<div className="title">
|
||||
<div className="name flex flexac">
|
||||
<div className='nameBorder'></div>
|
||||
{data.stnm}
|
||||
{data.taskTitle}
|
||||
</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">
|
||||
<CloseOutlined onClick={closePop} style={{color:"#333"}}/>
|
||||
</div>
|
||||
|
|
@ -47,11 +52,11 @@ function Wxq({ id, data, dispatch }) {
|
|||
|
||||
<div className="body">
|
||||
<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?.ptcount || detail?.ptcount}</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?.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.htcount || 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.problemNum || detail?.htcount}</Descriptions.Item>
|
||||
<Descriptions.Item label="待处理" span={3} contentStyle={{padding:"5px 0"}}>{data.handleNum || detail?.htcount}</Descriptions.Item>
|
||||
</Descriptions>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -60,17 +65,16 @@ function Wxq({ id, data, dispatch }) {
|
|||
</div>
|
||||
|
||||
|
||||
<Modal
|
||||
visible={visible}
|
||||
title={'巡查任务详情'}
|
||||
footer={null}
|
||||
onCancel={()=>{setVisible(false)}}
|
||||
width="60vw"
|
||||
destroyOnClose
|
||||
className="queryDrpModal"
|
||||
style={{top:"15px", height:"58vh"}}
|
||||
>
|
||||
</Modal>
|
||||
|
||||
<BasicCrudModal
|
||||
width={1000}
|
||||
ref={refModal}
|
||||
title=""
|
||||
title1="巡查任务详情"
|
||||
component={ModalForm}
|
||||
onCrudSuccess={()=>{}}
|
||||
// onCrudSuccess={()=>{refresh({addvcd:localStorage.getItem('ADCD6')})}}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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' },
|
||||
] },
|
||||
|
|
|
|||
|
|
@ -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],
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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]],
|
||||
|
|
|
|||
Loading…
Reference in New Issue