feat(): 白蚁监测调整
parent
f391494d10
commit
256a7035bf
|
|
@ -20,10 +20,8 @@ const Page = ({ mySetTms }) => {
|
||||||
const [ open, setOpen ] = useState(false)
|
const [ open, setOpen ] = useState(false)
|
||||||
const [ key , setkey ] = useState('')
|
const [ key , setkey ] = useState('')
|
||||||
const [ tms , setTms ] = useState([
|
const [ tms , setTms ] = useState([
|
||||||
// moment().add(-1,'days').format('YYYY-MM-DD HH:mm:ss'),
|
moment().add(-1,'days').format('YYYY-MM-DD HH:mm:ss'),
|
||||||
// moment().format('YYYY-MM-DD HH:mm:ss'),
|
moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
moment('2025-09-16').format('YYYY-MM-DD HH:mm:ss'),
|
|
||||||
moment('2025-09-17').format('YYYY-MM-DD HH:mm:ss')
|
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -209,10 +209,10 @@ const Page = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取白蚁所有测点
|
// 获取白蚁所有测点
|
||||||
const getCdList = async () => {
|
const getCdList = async (params) => {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await httpget2(apiurl.rcgl.byfz.bypc.allCd);
|
const res = await httppost2(apiurl.rcgl.byfz.bypc.allCd,params);
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
setAllCdList(res.data);
|
setAllCdList(res.data);
|
||||||
// 添加标记点到地图
|
// 添加标记点到地图
|
||||||
|
|
@ -249,7 +249,9 @@ const Page = () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
// 根据status设置样式
|
// 根据status设置样式
|
||||||
const color = point.status === 1 ? '#d9001b' : '#04d919'; // 1为红色,0为绿色
|
const color = point.status === 1 ? '#d9001b' :
|
||||||
|
point.status === 0 ? '#04d919':'#8c8c8c'
|
||||||
|
; // 1为红色,0为绿色 null 为灰色
|
||||||
|
|
||||||
feature.setStyle(new Style({
|
feature.setStyle(new Style({
|
||||||
image: new CircleStyle({
|
image: new CircleStyle({
|
||||||
|
|
@ -456,10 +458,10 @@ const Page = () => {
|
||||||
|
|
||||||
// 当地图实例创建完成后获取测点数据
|
// 当地图实例创建完成后获取测点数据
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (map) {
|
if (map && searchVal) {
|
||||||
getCdList();
|
getCdList(searchVal);
|
||||||
}
|
}
|
||||||
}, [map]);
|
}, [map,searchVal]);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className='content-root clearFloat xybm' style={{ paddingRight: "0", paddingBottom: "0" }}>
|
<div className='content-root clearFloat xybm' style={{ paddingRight: "0", paddingBottom: "0" }}>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue