Merge branch 'master' of http://10.0.41.100:3000/lishenfeng/tsg-web
commit
93a2610ae2
|
|
@ -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,16 @@ function Wxq({ id, data, dispatch }) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<Modal
|
|
||||||
visible={visible}
|
<BasicCrudModal
|
||||||
title={'巡查任务详情'}
|
width={1000}
|
||||||
footer={null}
|
ref={refModal}
|
||||||
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>
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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' },
|
||||||
] },
|
] },
|
||||||
|
|
|
||||||
|
|
@ -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],
|
||||||
|
|
|
||||||
|
|
@ -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},
|
||||||
|
|
|
||||||
|
|
@ -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]],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue