Compare commits

...

3 Commits

Author SHA1 Message Date
李神峰 7773488800 feat(): 水质功能开发 2025-05-26 21:26:20 +08:00
秦子超 5f6ef70695 Merge branch 'qzc-dev' 2025-05-26 16:58:25 +08:00
秦子超 745d10cfaa 新建图层 2025-05-26 16:26:39 +08:00
44 changed files with 19683 additions and 237 deletions

BIN
public/assets/pie.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
public/assets/shuiz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
public/assets/sl.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
public/assets/yy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
public/assets/yytc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 MiB

View File

@ -286,5 +286,85 @@
"y": 256,
"pixelRatio": 1,
"visible": true
}
},
"变形监测": {
"width": 32,
"height": 32,
"x": 64,
"y": 256,
"pixelRatio": 1,
"visible": true
},
"渗压监测": {
"width": 32,
"height": 32,
"x": 64,
"y": 256,
"pixelRatio": 1,
"visible": true
},
"渗流监测": {
"width": 32,
"height": 32,
"x": 64,
"y": 256,
"pixelRatio": 1,
"visible": true
},
"白蚁监测": {
"width": 32,
"height": 32,
"x": 64,
"y": 256,
"pixelRatio": 1,
"visible": true
},
"水闸2": {
"width": 32,
"height": 32,
"x": 64,
"y": 256,
"pixelRatio": 1,
"visible": true
},
"泵站2": {
"width": 32,
"height": 32,
"x": 64,
"y": 256,
"pixelRatio": 1,
"visible": true
},
"水表": {
"width": 32,
"height": 32,
"x": 64,
"y": 256,
"pixelRatio": 1,
"visible": true
},
"渠道": {
"width": 32,
"height": 32,
"x": 64,
"y": 256,
"pixelRatio": 1,
"visible": true
},
"水质": {
"width": 32,
"height": 32,
"x": 64,
"y": 256,
"pixelRatio": 1,
"visible": true
},
"土壤墒情": {
"width": 32,
"height": 32,
"x": 64,
"y": 256,
"pixelRatio": 1,
"visible": true
}
}

BIN
src/assets/yy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -258,13 +258,14 @@ const map = {
layerVisible = {
RealDrpLayer: false,
RealHDLayer: false,
RealSkLayer: true,
BxSkLayer: true,
RealSkLayer: false,
BxSkLayer: false,
FzdxLayer: false,
WataLayer: false,
AdcdLayer: true,
RoadLayer: true,
RivlLayer: true,
BxjcLayer:true,
};
Object.keys(DCPJ_TYPES).forEach(key => {
layerVisible['Dcpj_' + key + 'Layer'] = false;
@ -338,10 +339,18 @@ const map = {
if(id===201||id===205){
dispatch.map.setLayerSetting({dom: false});
map.setLayoutProperty('热力图', 'visibility', 'visible');
}else{
// dispatch.map.setLayerSetting({dom: true});
map.setLayoutProperty('热力图', 'visibility', 'none');
}
if (id != 504) {
dispatch.runtime.setYyfa({})
}
}
})
};

View File

@ -107,20 +107,6 @@ export default function calcLayout(view, rightStack, hidePanels) {
{ key: '预警信息管理', style: { height: '40%', flexGrow: 1 } },
];
leftFullHeight = true;
} else if (view === 507) {
left = [
{ key: '工程巡查', style: { height: '20%', flexGrow: 1 } },
{ key: '本月巡查记录', style: { height: '40%', flexGrow: 1 } },
{ key: '待处理巡查问题清单', style: { height: '40%', flexGrow: 1 } },
]
leftFullHeight = true;
}else if (view === 506) {
left = [
{ key: '水政统计', style: { height: '30%', flexGrow: 1 } },
{ key: '区域统计', style: { height: '35%', flexGrow: 1 } },
{ key: '本月水政巡查问题统计', style: { height: '35%', flexGrow: 1 } },
]
leftFullHeight = true;
}else if (view === 505) {
left = [
{ key: '灌区统计', style: { height: '30%', flexGrow: 1 } },
@ -238,9 +224,9 @@ export default function calcLayout(view, rightStack, hidePanels) {
// rightFullHeight = true;
} else if (view === 507) {
right = [
{ key: '维护统计', style: { height: '20%', flexGrow: 1 } },
{ key: '本月工程维护', style: { height: '40%', flexGrow: 1 } },
{ key: '待处理维护问题清单', style: { height: '40%', flexGrow: 1 } },
{ key: '维护统计', style: { height: '30%', flexGrow: 1 } },
{ key: '本月工程维护', style: { height: '35%', flexGrow: 1 } },
{ key: '待处理维护问题清单', style: { height: '35%', flexGrow: 1 } },
];
rightFullHeight = true;
}else if (view === 505) {
@ -257,6 +243,13 @@ export default function calcLayout(view, rightStack, hidePanels) {
// { key: '渠道分配比例', style: { height: '35%', flexGrow: 1 } },
]
rightFullHeight = true;
}else if (view === 506) {
right = [
{ key: '水政统计', style: { height: '30%', flexGrow: 1 } },
{ key: '区域统计', style: { height: '35%', flexGrow: 1 } },
{ key: '本月水政巡查问题统计', style: { height: '35%', flexGrow: 1 } },
]
rightFullHeight = true;
}
}
}

View File

@ -18,6 +18,22 @@ import YuwaiLayer from '../../MapCtrl/mapstyle/yuwailayer';
import PicStLayer from '../../MapCtrl/mapstyle/picstlayer';
import PumpLayer from '../../MapCtrl/mapstyle/tmp/pumplayer';
import BxSkLayer from '../../MapCtrl/mapstyle/tmp/bxsk';
//这里是新的
import BxjcLayer from '../../MapCtrl/mapstyle/bxjclayer';
import SyjcLayer from '../../MapCtrl/mapstyle/syjclayer';
import SljcLayer from '../../MapCtrl/mapstyle/sljclayer';
import ByjcLayer from '../../MapCtrl/mapstyle/byjclayer';
import ShuiZhaLayer from '../../MapCtrl/mapstyle/shuizhalayer';
import BzLayer from '../../MapCtrl/mapstyle/bzlayer';
import SbLayer from '../../MapCtrl/mapstyle/sblayer';
import QdLayer from '../../MapCtrl/mapstyle/qdlayer';
import ShuizhiLayer from '../../MapCtrl/mapstyle/shuizhilayer';
import TrsqLayer from '../../MapCtrl/mapstyle/trsqlayer';
const useStyles = makeStyles({
catRoot: {
@ -39,7 +55,6 @@ function LayersDlg({ onClose }) {
const layerSetting = useSelector(getLayerSetting);
const dispatch = useDispatch();
const classes = useStyles();
debugger
const layerVisibleChanged = (event) => {
const vo = { [event.target.name]: event.target.checked };
dispatch.map.setLayerVisible(vo);
@ -61,7 +76,7 @@ function LayersDlg({ onClose }) {
>
<div className="boxhead"></div>
<DpAppBar position="sticky">
<Typography variant="h6" style={{ alignSelf: 'center', marginLeft: '0.5rem', flexGrow: 1 }}>图层显示设置</Typography>
<Typography variant="h6" style={{ alignSelf: 'center', marginLeft: '0.5rem', flexGrow: 1,color:'#fff' }}>图层显示设置</Typography>
<DpCloseButton onClick={onClose} />
</DpAppBar>
@ -97,6 +112,36 @@ function LayersDlg({ onClose }) {
<div className={classes.catItem}>
<RowItem icon="picst" label="图像站" name={PicStLayer.LayerName} checked={!!layerVisible[PicStLayer.LayerName]} onChange={layerVisibleChanged} />
</div>
<div className={classes.catItem}>
<RowItem icon="picst" label="变形监测" name={BxjcLayer.LayerName} checked={!!layerVisible[BxjcLayer.LayerName]} onChange={layerVisibleChanged} />
</div>
<div className={classes.catItem}>
<RowItem icon="picst" label="渗压监测" name={SyjcLayer.LayerName} checked={!!layerVisible[SyjcLayer.LayerName]} onChange={layerVisibleChanged} />
</div>
<div className={classes.catItem}>
<RowItem icon="picst" label="渗流监测" name={SljcLayer.LayerName} checked={!!layerVisible[SljcLayer.LayerName]} onChange={layerVisibleChanged} />
</div>
<div className={classes.catItem}>
<RowItem icon="picst" label="白蚁监测" name={ByjcLayer.LayerName} checked={!!layerVisible[ByjcLayer.LayerName]} onChange={layerVisibleChanged} />
</div>
<div className={classes.catItem}>
<RowItem icon="picst" label="水闸" name={ShuiZhaLayer.LayerName} checked={!!layerVisible[ShuiZhaLayer.LayerName]} onChange={layerVisibleChanged} />
</div>
<div className={classes.catItem}>
<RowItem icon="picst" label="泵站" name={BzLayer.LayerName} checked={!!layerVisible[BzLayer.LayerName]} onChange={layerVisibleChanged} />
</div>
<div className={classes.catItem}>
<RowItem icon="picst" label="水表" name={SbLayer.LayerName} checked={!!layerVisible[SbLayer.LayerName]} onChange={layerVisibleChanged} />
</div>
<div className={classes.catItem}>
<RowItem icon="picst" label="渠道" name={QdLayer.LayerName} checked={!!layerVisible[QdLayer.LayerName]} onChange={layerVisibleChanged} />
</div>
<div className={classes.catItem}>
<RowItem icon="picst" label="水质" name={ShuizhiLayer.LayerName} checked={!!layerVisible[ShuizhiLayer.LayerName]} onChange={layerVisibleChanged} />
</div>
<div className={classes.catItem}>
<RowItem icon="picst" label="土壤墒情" name={TrsqLayer.LayerName} checked={!!layerVisible[TrsqLayer.LayerName]} onChange={layerVisibleChanged} />
</div>
</div>
<div className={classes.catRoot}>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,227 @@
import clone from "clone";
import { PicStPromise, TestPicStPromise } from "../../../../models/_/real";
import { parseGeoJSON } from "../../../../utils/tools";
import { InfoPopNames } from "../../InfoPops";
import BaseLayer from "./baselayer";
const SourceName = '白蚁监测';
const ShapeStyle = {
id: SourceName,
type: 'symbol',
source: SourceName,
layout: {
'icon-allow-overlap': true,
'text-allow-overlap': true,
'icon-image': '白蚁监测',
'icon-size': [
'interpolate', ['linear'], ['zoom'],
10, 0.4,
14, 0.8,
],
'text-allow-overlap': true,
'text-size': [
'interpolate', ['linear'], ['zoom'],
10, 10,
14, 14,
],
'text-font': ['Roboto Black'],
'text-field': [
'step',
['zoom'],
'',
12, ['get', 'stnm']
],
'text-anchor': 'top',
'text-offset': [0, 1],
'visibility': 'none',
},
paint: {
'text-color': '#fff'
}
};
export default class ByjcLayer extends BaseLayer {
static LayerName = 'ByjcLayer';
static SourceName = SourceName;
getStyle() {
const ret = clone(ShapeStyle);
this._setStyleVisibility(ret);
return ret;
}
getName() {
return ByjcLayer.LayerName;
}
getSubLayers() {
return [ShapeStyle.id];
}
async doRefreshLayer(mapCtrl) {
const ms = mapCtrl.getSource(SourceName);
let data =
// await PicStPromise.get();
[
{
"res_cd": "42118140004",
"res_nm": "永丰水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181003000",
"town_nm": "南湖办事处",
"rv_name": "举水",
"bas_guid": "鄂东五河片区",
"res_lon": 115.05541,
"res_lat": 31.11106,
"res_reg_cd": "42118140042-A4",
"eng_scal": "小1型",
"eng_g": "IV",
"children": [
{
"res_cd": "42118140004",
"res_nm": "永丰水库",
"cd": 5821,
"cd_nm": "永丰水库",
"termite_status": "n",
"tm": "2025-05-21 09:18:28",
"is_main_cd": "y"
}
]
},
{
"res_cd": "42118140015",
"res_nm": "麻城坳水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181107000",
"town_nm": "盐田河镇",
"rv_name": "举水",
"bas_guid": "鄂东五河片区",
"res_lon": 115.22541,
"res_lat": 30.98156,
"res_reg_cd": "42118140025-A4",
"eng_scal": "小1型",
"eng_g": "IV",
"children": [
{
"res_cd": "42118140015",
"res_nm": "麻城坳水库",
"cd": 5820,
"cd_nm": "麻城坳水库",
"termite_status": "y",
"tm": "2025-05-21 04:27:18",
"is_main_cd": "y"
}
]
},
{
"res_cd": "42118140023",
"res_nm": "游家冲水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181109000",
"town_nm": "木子店镇",
"rv_name": "巴河",
"bas_guid": "鄂东五河片区",
"res_lon": 115.29541,
"res_lat": 31.20317,
"res_reg_cd": "42118140044-A4",
"eng_scal": "小1型",
"eng_g": "IV",
"children": [
{
"res_cd": "42118140023",
"res_nm": "游家冲水库",
"cd": 5819,
"cd_nm": "游家冲水库",
"termite_status": "n",
"tm": "2025-05-21 04:25:56",
"is_main_cd": "y"
}
]
},
{
"res_cd": "42118140013",
"res_nm": "高峰水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181106000",
"town_nm": "龟山镇",
"rv_name": "举水",
"bas_guid": "鄂东五河片区",
"res_lon": 115.21201,
"res_lat": 31.05011,
"res_reg_cd": "42118140010-A4",
"eng_scal": "小1型",
"eng_g": "IV",
"children": null
},
{
"res_cd": "42118140039",
"res_nm": "姚家河水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181113000",
"town_nm": "乘马岗镇",
"rv_name": "举水",
"bas_guid": "鄂东五河片区",
"res_lon": 114.9355,
"res_lat": 31.28804,
"res_reg_cd": "42118140041-A4",
"eng_scal": "小1型",
"eng_g": "IV",
"children": null
}
].map((item)=>{
const obj = {...item}
obj.lgtd = item.res_lon
obj.lttd = item.res_lat
return obj
})
ms.setData(parseGeoJSON(data));
return true;
}
getFeatureTip(record) {
return record.stnm;
}
featureClicked(properties, dispatch) {
dispatch.runtime.setFeaturePop({
type: InfoPopNames.PicStPop,
properties,
coordinates: [properties.lgtd, properties.lttd],
offsetPop: true,
});
}
}

File diff suppressed because it is too large Load Diff

View File

@ -19,6 +19,17 @@ import YuwaiLayer from "./yuwailayer";
import PicStLayer from "./picstlayer";
import PumpLayer from "./tmp/pumplayer";
import BxSkLayer from "./tmp/bxsk";
import BxjcLayer from "./bxjclayer"
import SyjcLayer from "./syjclayer"
import SljcLayer from "./sljclayer"
import ByjcLayer from "./byjclayer"
import ShuiZhaLayer from "./shuizhalayer"
import BzLayer from "./bzlayer"
import SbLayer from "./sblayer"
import QdLayer from "./qdlayer"
import ShuizhiLayer from "./shuizhilayer"
import TrsqLayer from "./trsqlayer"
class LayerMgr {
@ -35,6 +46,16 @@ class LayerMgr {
this.sublayerMap = {};
this.layers = [];
this.layers.push(new BxjcLayer());
this.layers.push(new SyjcLayer());
this.layers.push(new SljcLayer());
this.layers.push(new ByjcLayer());
this.layers.push(new ShuiZhaLayer());
this.layers.push(new BzLayer());
this.layers.push(new SbLayer());
this.layers.push(new QdLayer());
this.layers.push(new ShuizhiLayer());
this.layers.push(new TrsqLayer());
this.layers.push(new RealDrpLayer());
this.layers.push(new RealHDLayer());
this.layers.push(new RealSkLayer());
@ -152,6 +173,16 @@ class LayerMgr {
this.layerMap.AdcdLayer.getStyle(0),
this.layerMap.FzdxLayer.getStyle(),
this.layerMap.BxjcLayer.getStyle(),
this.layerMap.SyjcLayer.getStyle(),
this.layerMap.SljcLayer.getStyle(),
this.layerMap.ByjcLayer.getStyle(),
this.layerMap.ShuiZhaLayer.getStyle(),
this.layerMap.BzLayer.getStyle(),
this.layerMap.SbLayer.getStyle(),
this.layerMap.QdLayer.getStyle(),
this.layerMap.ShuizhiLayer.getStyle(),
this.layerMap.TrsqLayer.getStyle(),
this.layerMap.RivlLayer.getStyle('rivlLabel'),

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,783 @@
import clone from "clone";
import { PicStPromise, TestPicStPromise } from "../../../../models/_/real";
import { parseGeoJSON } from "../../../../utils/tools";
import { InfoPopNames } from "../../InfoPops";
import BaseLayer from "./baselayer";
const SourceName = '水表';
const ShapeStyle = {
id: SourceName,
type: 'symbol',
source: SourceName,
layout: {
'icon-allow-overlap': true,
'text-allow-overlap': true,
'icon-image': '水表',
'icon-size': [
'interpolate', ['linear'], ['zoom'],
10, 0.4,
14, 0.8,
],
'text-allow-overlap': true,
'text-size': [
'interpolate', ['linear'], ['zoom'],
10, 10,
14, 14,
],
'text-font': ['Roboto Black'],
'text-field': [
'step',
['zoom'],
'',
12, ['get', 'stnm']
],
'text-anchor': 'top',
'text-offset': [0, 1],
'visibility': 'none',
},
paint: {
'text-color': '#fff'
}
};
const page1 = [
{
"addvcd": "420800000000000",
"moditime": "2022-12-01 19:30:00",
"src": "zhzj",
"mvalue": {
"formatTm": null,
"formatHq": "0.298",
"vol": 1072,
"formatAccq": null,
"stcd": "42080204",
"rz": null,
"tm": "2025-05-26 15:00",
"hq": 0.298,
"fr": 0,
"chan": "1",
"accq": 87999472
},
"lttd": 31.021727,
"sttp": "PQ",
"irrCode": "D00001300",
"sort": 3001,
"hasImg": false,
"stlc": "荆门市",
"flowType_dictText": "工业",
"stcd": "42080204",
"stnm": "荆门热电厂",
"addvcd_dictText": "荆门市",
"lgtd": 112.099215,
"irrCode_dictText": "水库枢纽",
"bsnm": "漳河流域",
"flowType": "3"
},
{
"addvcd": "420800000000000",
"moditime": "2022-12-01 19:30:00",
"comments": "漳河水库供水",
"src": "zhzj",
"esstym": " ",
"mvalue": {
"formatTm": null,
"formatHq": "0.217",
"vol": 782,
"formatAccq": null,
"stcd": "42000003",
"rz": null,
"tm": "2025-05-26 15:00",
"hq": 0.217,
"fr": 0,
"chan": "1",
"accq": 33193457
},
"lttd": 30.953887,
"sttp": "PQ",
"irrCode": "D00000020",
"sort": 3002,
"hasImg": false,
"stlc": "荆门市",
"flowType_dictText": "工业",
"usfl": "1",
"stcd": "42000003",
"stnm": "格林美",
"addvcd_dictText": "荆门市",
"lgtd": 112.190551,
"irrCode_dictText": "三干渠",
"bsnm": "漳河流域",
"flowType": "3"
},
{
"addvcd": "420800000000000",
"moditime": "2022-12-01 19:30:00",
"comments": "漳河水库供水",
"src": "zhzj",
"mvalue": {
"formatTm": null,
"formatHq": "0.009",
"vol": 31,
"formatAccq": null,
"stcd": "42000005",
"rz": null,
"tm": "2025-05-26 06:00",
"hq": 0.009,
"fr": null,
"chan": "1",
"accq": 1541415
},
"lttd": 30.93926,
"sttp": "PQ",
"irrCode": "D00000020",
"sort": 3003,
"hasImg": false,
"stlc": "荆门市",
"flowType_dictText": "工业",
"stcd": "42000005",
"stnm": "福耀玻璃",
"addvcd_dictText": "荆门市",
"lgtd": 112.191703,
"irrCode_dictText": "三干渠",
"bsnm": "漳河流域",
"flowType": "3"
},
{
"addvcd": "420800000000000",
"moditime": "2022-12-01 19:30:00",
"comments": "漳河水库供水",
"src": "zhzj",
"mvalue": {
"formatTm": null,
"formatHq": "0.065",
"vol": 235,
"formatAccq": null,
"stcd": "42000011",
"rz": null,
"tm": "2025-05-26 15:00",
"hq": 0.065,
"fr": null,
"chan": "1",
"accq": 8643445
},
"lttd": 30.923904,
"sttp": "PQ",
"irrCode": "D00000020",
"sort": 3004,
"hasImg": false,
"stlc": "荆门市",
"flowType_dictText": "工业",
"stcd": "42000011",
"stnm": "绿动集团取水点",
"addvcd_dictText": "荆门市",
"lgtd": 112.19131,
"irrCode_dictText": "三干渠",
"bsnm": "漳河流域",
"flowType": "3"
},
{
"addvcd": "420800000000000",
"moditime": "2022-12-01 19:30:00",
"comments": "漳河水库供水",
"src": "zhzj",
"chidCount": 1,
"mvalue": {
"formatTm": null,
"formatHq": "0.482",
"vol": 1734,
"formatAccq": null,
"stcd": "42080202",
"rz": null,
"tm": "2025-05-26 15:00",
"hq": 0.482,
"fr": 0,
"chan": "1",
"accq": 120347052
},
"lttd": 31.020675,
"sttp": "PQ",
"irrCode": "D00001300",
"sort": 3005,
"hasImg": true,
"stlc": "荆门市",
"flowType_dictText": "工业",
"usfl": "1",
"stcd": "42080202",
"stnm": "荆门石化总厂",
"addvcd_dictText": "荆门市",
"lgtd": 112.096162,
"irrCode_dictText": "水库枢纽",
"bsnm": "漳河流域",
"flowType": "3"
},
{
"addvcd": "420800000000000",
"moditime": "2022-12-01 19:30:00",
"comments": "漳河水库供水",
"src": "zhzj",
"mvalue": {
"formatTm": null,
"formatHq": "0.264",
"vol": 947,
"formatAccq": null,
"stcd": "42000010",
"rz": null,
"tm": "2025-05-26 15:00",
"hq": 0.264,
"fr": 0,
"chan": "1",
"accq": 11497137
},
"lttd": 31.074535,
"sttp": "PQ",
"irrCode": "D00000310",
"sort": 3006,
"hasImg": false,
"stlc": "荆门市",
"flowType_dictText": "工业",
"usfl": "1",
"stcd": "42000010",
"stnm": "华能热电",
"addvcd_dictText": "荆门市",
"lgtd": 112.199915,
"irrCode_dictText": "四干渠",
"bsnm": "漳河流域",
"flowType": "3"
},
{
"addvcd": "420800000000000",
"moditime": "2022-12-01 19:30:00",
"comments": "漳河水库供水2024年1月12号变更rtu编码 4208020800",
"src": "zhzj",
"esstym": "",
"mvalue": {
"formatTm": null,
"formatHq": "0.370",
"vol": 1332,
"formatAccq": null,
"stcd": "42080208",
"rz": null,
"tm": "2025-05-26 15:00",
"hq": 0.37,
"fr": 0,
"chan": "1",
"accq": 45187209
},
"lttd": 31.033908,
"sttp": "PQ",
"irrCode": "D00000310",
"sort": 3007,
"hasImg": false,
"stlc": "荆门市",
"flowType_dictText": "生活",
"stcd": "42080208",
"stnm": "荆门一水厂",
"addvcd_dictText": "荆门市",
"lgtd": 112.189707,
"irrCode_dictText": "四干渠",
"bsnm": "漳河流域",
"flowType": "1"
},
{
"addvcd": "420800000000000",
"moditime": "2022-12-01 19:30:00",
"comments": "漳河水库供水",
"src": "zhzj",
"mvalue": {
"formatTm": null,
"formatHq": "0.048",
"vol": 1564,
"formatAccq": null,
"stcd": "42080201",
"rz": null,
"tm": "2025-05-26 16:00",
"hq": 0.048,
"fr": null,
"chan": "1",
"accq": 59409048
},
"lttd": 31.014198,
"sttp": "PQ",
"irrCode": "D00001300",
"sort": 3008,
"hasImg": false,
"stlc": "荆门市",
"flowType_dictText": "生活",
"stcd": "42080201",
"stnm": "荆门二水厂",
"addvcd_dictText": "荆门市",
"lgtd": 112.059217,
"irrCode_dictText": "水库枢纽",
"bsnm": "漳河流域",
"flowType": "1"
},
{
"addvcd": "420800000000000",
"moditime": "2022-12-01 19:30:00",
"comments": "漳河水库供水",
"src": "zhzj",
"mvalue": {
"formatTm": null,
"formatHq": "0.000",
"vol": 0,
"formatAccq": null,
"stcd": "42080401",
"rz": null,
"tm": "2025-05-26 15:00",
"hq": 0,
"fr": 0,
"chan": "1",
"accq": 41103262
},
"lttd": 30.972017,
"sttp": "PQ",
"irrCode": "D00000290",
"sort": 3009,
"hasImg": false,
"stlc": "荆门市",
"flowType_dictText": "生活",
"stcd": "42080401",
"stnm": "荆门三水厂",
"addvcd_dictText": "荆门市",
"lgtd": 112.184665,
"irrCode_dictText": "总干渠",
"bsnm": "漳河流域",
"flowType": "1"
},
{
"addvcd": "420800000000000",
"moditime": "2022-12-01 19:30:00",
"comments": "漳河水库供水",
"src": "zhzj",
"esstym": "",
"mvalue": {
"formatTm": null,
"formatHq": "0.090",
"vol": 3213,
"formatAccq": null,
"stcd": "42080207",
"rz": null,
"tm": "2025-05-26 16:00",
"hq": 0.09,
"fr": null,
"chan": "1",
"accq": 262192755
},
"lttd": 31.013848,
"sttp": "PQ",
"irrCode": "D00001300",
"sort": 3010,
"hasImg": false,
"stlc": "荆门市",
"flowType_dictText": "生活",
"stcd": "42080207",
"stnm": "三水厂备用水源",
"addvcd_dictText": "荆门市",
"lgtd": 112.059227,
"irrCode_dictText": "水库枢纽",
"bsnm": "漳河流域",
"flowType": "1"
},
{
"addvcd": "420800000000000",
"moditime": "2023-04-14 10:25:52",
"comments": "水资源多孔闸门控制系统",
"src": "zhzj",
"mvalue": {
"formatTm": null,
"formatHq": "0.000",
"vol": 18,
"formatAccq": null,
"stcd": "0020230414",
"rz": null,
"tm": "2025-05-26 15:00",
"hq": 0,
"fr": 0,
"chan": "1",
"accq": 372776
},
"lttd": 30.971243,
"sttp": "PQ",
"irrCode": "D00000290",
"sort": 3012,
"hasImg": false,
"stlc": "荆门市",
"flowType_dictText": "农业",
"stcd": "0020230414",
"stnm": "杨家冲秀江南取水点",
"addvcd_dictText": "荆门市",
"lgtd": 112.154102,
"irrCode_dictText": "总干渠",
"bsnm": "漳河流域",
"flowType": "4"
},
{
"comments": "大表系统",
"src": "other",
"mvalue": {
"formatTm": null,
"formatHq": "0.439",
"vol": 1579,
"formatAccq": null,
"stcd": "42999999",
"rz": null,
"tm": "2025-05-26 15:00",
"hq": 0.439,
"fr": null,
"chan": "1",
"accq": 31584428
},
"lttd": 31.006966,
"sttp": "PQ",
"irrCode": "D00001300",
"sort": 3013,
"hasImg": false,
"stlc": "宜昌市当阳市育溪镇",
"flowType_dictText": "工业生活",
"stcd": "42999999",
"stnm": "引漳入城站",
"lgtd": 111.982362,
"irrCode_dictText": "水库枢纽",
"flowType": "5"
},
{
"addvcd": "420800000000000",
"moditime": "2022-05-31 21:00:00",
"comments": "漳河遥测",
"src": "zhzj",
"chidCount": 2,
"mvalue": {
"formatTm": null,
"formatHq": "3.208",
"vol": 10373,
"formatAccq": null,
"stcd": "0000000185",
"rz": null,
"tm": "2025-05-26 16:00",
"hq": 3.208,
"fr": 0,
"chan": "1",
"accq": 164381452
},
"lttd": 31.0656,
"sttp": "PQ",
"irrCode": "D00001300",
"sort": 3014,
"hasImg": true,
"stlc": "荆门市",
"flowType_dictText": "发电",
"stcd": "0000000185",
"stnm": "电站八百车间",
"addvcd_dictText": "荆门市",
"lgtd": 111.931,
"irrCode_dictText": "水库枢纽",
"bsnm": "漳河流域",
"flowType": "2"
},
{
"addvcd": "420800000000000",
"moditime": "2022-05-31 21:00:00",
"comments": "漳河遥测",
"src": "zhzj",
"chidCount": 1,
"mvalue": {
"formatTm": null,
"formatHq": "0.000",
"vol": 0,
"formatAccq": null,
"stcd": "0000000186",
"rz": null,
"tm": "2025-05-26 15:00",
"hq": 0,
"fr": 0,
"chan": "1",
"accq": 82137899
},
"lttd": 31.0617,
"sttp": "PQ",
"irrCode": "D00001300",
"sort": 3015,
"hasImg": true,
"stlc": "荆门市",
"flowType_dictText": "发电",
"stcd": "0000000186",
"stnm": "电站三千车间",
"addvcd_dictText": "荆门市",
"lgtd": 111.9308,
"irrCode_dictText": "水库枢纽",
"bsnm": "漳河流域",
"flowType": "2"
},
{
"moditime": "2023-09-07 09:17:13",
"comments": "16+500",
"src": "zhzj",
"esstym": "202309",
"mvalue": {
"formatTm": null,
"formatHq": "0.000",
"vol": 0,
"formatAccq": null,
"stcd": "2023090001",
"rz": null,
"tm": "2025-05-26 15:00",
"hq": 0,
"fr": null,
"chan": "1",
"accq": 36120
},
"lttd": 30.973775,
"sttp": "PQ",
"irrCode": "D00000290",
"sort": 3016,
"hasImg": false,
"stcd": "2023090001",
"stnm": "汉通闸流量站",
"lgtd": 112.17597,
"irrCode_dictText": "总干渠"
}
]
const page2 = [
{
"moditime": "2023-11-17 09:38:47",
"src": "zhzj",
"esstym": "",
"mvalue": {
"formatTm": null,
"formatHq": "0.004",
"vol": 15,
"formatAccq": null,
"stcd": "2023111501",
"rz": null,
"tm": "2025-05-26 15:00",
"hq": 0.004,
"fr": 0,
"chan": "1",
"accq": 61933
},
"lttd": 30.972626,
"sttp": "PQ",
"irrCode": "D00000290",
"sort": 9999,
"hasImg": false,
"stcd": "2023111501",
"stnm": "可可取水点",
"lgtd": 112.126579,
"irrCode_dictText": "总干渠"
},
{
"moditime": "2024-03-19 15:36:57",
"src": "zhzj",
"esstym": "",
"mvalue": {
"formatTm": null,
"formatHq": "0.000",
"vol": 0,
"formatAccq": null,
"stcd": "2024031901",
"rz": null,
"tm": "2025-05-26 15:00",
"hq": 0,
"fr": null,
"chan": "1",
"accq": 91497
},
"lttd": 31.027036,
"sttp": "PQ",
"irrCode": "D00000310",
"sort": 9999,
"hasImg": false,
"stcd": "2024031901",
"stnm": "团结水库取水口",
"lgtd": 112.187742,
"irrCode_dictText": "四干渠"
},
{
"moditime": "2024-03-19 16:24:14",
"src": "zhzj",
"esstym": "",
"mvalue": {
"formatTm": null,
"formatHq": "0.000",
"vol": 0,
"formatAccq": null,
"stcd": "2024031902",
"rz": null,
"tm": "2025-05-26 15:00",
"hq": 0,
"fr": null,
"chan": "1",
"accq": 14580
},
"lttd": 31.031071,
"sttp": "PQ",
"irrCode": "D00000310",
"sort": 9999,
"hasImg": false,
"stcd": "2024031902",
"stnm": "文明湖取水口",
"lgtd": 112.189671,
"irrCode_dictText": "四干渠"
},
{
"moditime": "2024-04-26 14:17:34",
"src": "zhzj",
"esstym": "",
"mvalue": {
"formatTm": null,
"formatHq": "0.016",
"vol": 17,
"formatAccq": null,
"stcd": "7724042601",
"rz": null,
"tm": "2025-05-26 16:00",
"hq": 0.016,
"fr": null,
"chan": "1",
"accq": 102474
},
"lttd": 31.040052,
"sttp": "PQ",
"irrCode": "D00000310",
"sort": 9999,
"hasImg": false,
"stcd": "7724042601",
"stnm": "西山林语取水口(四干渠管道)",
"lgtd": 112.191118,
"irrCode_dictText": "四干渠"
},
{
"moditime": "2024-07-26 11:37:05",
"src": "zhzj",
"esstym": "",
"mvalue": {
"formatTm": null,
"formatHq": "0.255",
"vol": 919,
"formatAccq": null,
"stcd": "4208020669",
"rz": null,
"tm": "2025-05-26 15:00",
"hq": 0.255,
"fr": null,
"chan": "1",
"accq": 6684229
},
"lttd": 30.886438,
"sttp": "PQ",
"irrCode": "D00000290",
"sort": 9999,
"hasImg": false,
"stcd": "4208020669",
"stnm": "岳飞城",
"lgtd": 112.209508,
"irrCode_dictText": "总干渠"
},
{
"moditime": "2024-07-27 08:09:52",
"src": "zhzj",
"esstym": "",
"mvalue": {
"formatTm": null,
"formatHq": "0.000",
"vol": 30,
"formatAccq": null,
"stcd": "7720240725",
"rz": null,
"tm": "2025-05-26 15:00",
"hq": 0,
"fr": 0,
"chan": "1",
"accq": 1187333
},
"lttd": 33.33333,
"sttp": "PQ",
"irrCode": "D00000290",
"sort": 9999,
"hasImg": false,
"stcd": "7720240725",
"stnm": "象山大道桥取水点(掇刀)",
"lgtd": 111.111111,
"irrCode_dictText": "总干渠"
},
{
"moditime": "2024-11-27 15:20:43",
"src": "zhzj",
"esstym": "",
"mvalue": {
"formatTm": null,
"formatHq": "0.000",
"vol": 0,
"formatAccq": null,
"stcd": "2024112701",
"rz": null,
"tm": "2025-05-06 18:00",
"hq": 0,
"fr": null,
"chan": "1",
"accq": 103355
},
"lttd": 30.952161,
"sttp": "PQ",
"irrCode": "D00000290",
"sort": 9999,
"hasImg": false,
"stcd": "2024112701",
"stnm": "总干渠夹园闸管道流量",
"lgtd": 112.081919,
"irrCode_dictText": "总干渠"
}
]
export default class SbLayer extends BaseLayer {
static LayerName = 'SbLayer';
static SourceName = SourceName;
getStyle() {
const ret = clone(ShapeStyle);
this._setStyleVisibility(ret);
return ret;
}
getName() {
return SbLayer.LayerName;
}
getSubLayers() {
return [ShapeStyle.id];
}
async doRefreshLayer(mapCtrl) {
const ms = mapCtrl.getSource(SourceName);
let data =
// await PicStPromise.get();
[...page1,...page2].map((item)=>{
const obj = {...item}
obj.lgtd = item.lgtd + 2.9619
obj.lttd = item.lttd + 0.2002
return obj
})
ms.setData(parseGeoJSON(data));
return true;
}
getFeatureTip(record) {
return record.stnm;
}
featureClicked(properties, dispatch) {
dispatch.runtime.setFeaturePop({
type: InfoPopNames.PicStPop,
properties,
coordinates: [properties.lgtd, properties.lttd],
offsetPop: true,
});
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,553 @@
import clone from "clone";
import { PicStPromise, TestPicStPromise } from "../../../../models/_/real";
import { parseGeoJSON } from "../../../../utils/tools";
import { InfoPopNames } from "../../InfoPops";
import BaseLayer from "./baselayer";
const SourceName = '水质';
const ShapeStyle = {
id: SourceName,
type: 'symbol',
source: SourceName,
layout: {
'icon-allow-overlap': true,
'text-allow-overlap': true,
'icon-image': '水质',
'icon-size': [
'interpolate', ['linear'], ['zoom'],
10, 0.4,
14, 0.8,
],
'text-allow-overlap': true,
'text-size': [
'interpolate', ['linear'], ['zoom'],
10, 10,
14, 14,
],
'text-font': ['Roboto Black'],
'text-field': [
'step',
['zoom'],
'',
12, ['get', 'stnm']
],
'text-anchor': 'top',
'text-offset': [0, 1],
'visibility': 'none',
},
paint: {
'text-color': '#fff'
}
};
const page1 = [
{
"stcd": "24108810",
"stnm": "麻城水站",
"mvalue": {
"exceeded": 0,
"data": {
"cr6Level": null,
"pbMultiple": null,
"hgLevelStr": null,
"cond": 300,
"nh3nLevelStr": null,
"vlph": null,
"nh3nMultiple": null,
"hgMultiple": null,
"turbMultiple": null,
"wimpLevel": null,
"doxStan": 6,
"cuMultiple": null,
"cr6Stan": 0.05,
"codcrLevel": null,
"turbLevelStr": null,
"tnMultiple": null,
"no3LevelStr": null,
"zn": null,
"no2Level": null,
"tocLevel": null,
"arsLevel": null,
"codmnStan": 4,
"waterQualityStr": null,
"cuLevel": null,
"pbLevelStr": null,
"codcr": null,
"no2Stan": null,
"wimpLevelStr": null,
"vlphMultiple": null,
"vlphLevelStr": null,
"nh3nStan": 0.5,
"flevelStr": null,
"turb": 6,
"toc": null,
"fmultiple": null,
"wimpMultiple": null,
"dox": 11.63,
"tnLevel": null,
"no3Stan": null,
"sb": null,
"no3Multiple": null,
"znLevelStr": null,
"znMultiple": null,
"cdLevelStr": null,
"cd": null,
"ars": null,
"cdMultiple": null,
"f": null,
"cuStan": 1,
"fstan": 1,
"doxMultiple": null,
"arsLevelStr": null,
"hgLevel": null,
"tmStr": null,
"chlaStan": null,
"cu": null,
"sbLevel": null,
"doxLevelStr": "Ⅰ类",
"vlphStan": 0.002,
"tm": "2025-03-21 08",
"tn": null,
"znLevel": null,
"nh3nLevel": null,
"tp": null,
"sbMultiple": null,
"arsMultiple": null,
"sbLevelStr": null,
"condLevel": null,
"no2Multiple": null,
"mainPollutants": null,
"no2": null,
"arsStan": 0.05,
"chlaMultiple": null,
"no3": null,
"chlaLevelStr": null,
"turbLevel": null,
"phLevelStr": null,
"codcrLevelStr": null,
"tpMultiple": null,
"cr6": null,
"hgStan": 0.00005,
"tpStan": 0.1,
"condMultiple": null,
"codcrMultiple": null,
"tpLevelStr": null,
"cdLevel": null,
"cr6Multiple": null,
"codcrStan": 15,
"stcd": "24108810 ",
"chla": 0.006,
"cr6LevelStr": null,
"spt": "2025-03-21 08",
"tpLevel": null,
"tocMultiple": null,
"condLevelStr": null,
"codmn": null,
"wimp": 10.44,
"znStan": 1,
"codmnLevelStr": null,
"codmnLevel": null,
"tocLevelStr": null,
"pbStan": 0.01,
"codmnMultiple": null,
"tnStan": 100.5,
"cdStan": 0.005,
"doxLevel": 1,
"tnLevelStr": null,
"tocStan": null,
"pbLevel": null,
"nh3n": null,
"cuLevelStr": null,
"no3Level": null,
"phMultiple": null,
"vlphLevel": null,
"flevel": null,
"pb": null,
"sbStan": 1,
"ph": 8.25,
"no2LevelStr": null,
"phLevel": null,
"chlaLevel": null,
"hg": null
},
"outMin": null,
"outMax": null,
"dataList": [
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "cond",
"waterQualityStr": null,
"value": 300
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "fStan",
"waterQualityStr": null,
"value": 1
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "vlph",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "doxStan",
"waterQualityStr": null,
"value": 6
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "cr6Stan",
"waterQualityStr": null,
"value": 0.05
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "zn",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "codmnStan",
"waterQualityStr": null,
"value": 4
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "waterQualityStr",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "codcr",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "no2Stan",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "nh3nStan",
"waterQualityStr": null,
"value": 0.5
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "turb",
"waterQualityStr": null,
"value": 6
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "toc",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": 1,
"label": "dox",
"waterQualityStr": "Ⅰ类",
"value": 11.63
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "no3Stan",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "sb",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "cd",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "ars",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "f",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "cuStan",
"waterQualityStr": null,
"value": 1
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "chlaStan",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "cu",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "vlphStan",
"waterQualityStr": null,
"value": 0.002
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "tn",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "tp",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "arsStan",
"waterQualityStr": null,
"value": 0.05
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "no2",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "no3",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "cr6",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "hgStan",
"waterQualityStr": null,
"value": 0.00005
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "tpStan",
"waterQualityStr": null,
"value": 0.1
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "codcrStan",
"waterQualityStr": null,
"value": 15
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "chla",
"waterQualityStr": null,
"value": 0.006
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "codmn",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "wimp",
"waterQualityStr": null,
"value": 10.44
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "znStan",
"waterQualityStr": null,
"value": 1
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "pbStan",
"waterQualityStr": null,
"value": 0.01
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "tnStan",
"waterQualityStr": null,
"value": 100.5
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "cdStan",
"waterQualityStr": null,
"value": 0.005
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "tocStan",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "nh3n",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "pb",
"waterQualityStr": null,
"value": null
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "sbStan",
"waterQualityStr": null,
"value": 1
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "ph",
"waterQualityStr": null,
"value": 8.25
},
{
"waterQualityMultiple": null,
"waterQuality": null,
"label": "hg",
"waterQualityStr": null,
"value": null
}
],
"waterQuality": 1,
"outMid": null,
"waterQualityStr": "Ⅰ类"
},
"lgtd": 112.071,
"lttd": 30.9641
}
]
export default class ShuizhiLayer extends BaseLayer {
static LayerName = 'ShuizhiLayer';
static SourceName = SourceName;
getStyle() {
const ret = clone(ShapeStyle);
this._setStyleVisibility(ret);
return ret;
}
getName() {
return ShuizhiLayer.LayerName;
}
getSubLayers() {
return [ShapeStyle.id];
}
async doRefreshLayer(mapCtrl) {
const ms = mapCtrl.getSource(SourceName);
let data =
// await PicStPromise.get();
[...page1].map((item)=>{
const obj = {...item}
obj.lgtd = item.lgtd + 2.9619
obj.lttd = item.lttd + 0.2002
return obj
})
ms.setData(parseGeoJSON(data));
return true;
}
getFeatureTip(record) {
return record.stnm;
}
featureClicked(properties, dispatch) {
dispatch.runtime.setFeaturePop({
type: InfoPopNames.PicStPop,
properties,
coordinates: [properties.lgtd, properties.lttd],
offsetPop: true,
});
}
}

View File

@ -0,0 +1,123 @@
import clone from "clone";
import { PicStPromise, TestPicStPromise } from "../../../../models/_/real";
import { parseGeoJSON } from "../../../../utils/tools";
import { InfoPopNames } from "../../InfoPops";
import BaseLayer from "./baselayer";
const SourceName = '渗流监测';
const ShapeStyle = {
id: SourceName,
type: 'symbol',
source: SourceName,
layout: {
'icon-allow-overlap': true,
'text-allow-overlap': true,
'icon-image': '渗流监测',
'icon-size': [
'interpolate', ['linear'], ['zoom'],
10, 0.4,
14, 0.8,
],
'text-allow-overlap': true,
'text-size': [
'interpolate', ['linear'], ['zoom'],
10, 10,
14, 14,
],
'text-font': ['Roboto Black'],
'text-field': [
'step',
['zoom'],
'',
12, ['get', 'stnm']
],
'text-anchor': 'top',
'text-offset': [0, 1],
'visibility': 'none',
},
paint: {
'text-color': '#fff'
}
};
export default class SljcLayer extends BaseLayer {
static LayerName = 'SljcLayer';
static SourceName = SourceName;
getStyle() {
const ret = clone(ShapeStyle);
this._setStyleVisibility(ret);
return ret;
}
getName() {
return SljcLayer.LayerName;
}
getSubLayers() {
return [ShapeStyle.id];
}
async doRefreshLayer(mapCtrl) {
const ms = mapCtrl.getSource(SourceName);
let data =
// await PicStPromise.get();
[{
"cd": "1",
"cd_nm": "WE",
"ch": "1",
"res_reg_cd": "42118140042-A4",
"res_cd": "42118140004",
"res_nm": "永丰水库",
"res_lon": 115.05541,
"res_lat": 31.11106,
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181003000",
"town_nm": "南湖办事处",
"danger_stat": "非病险水库",
"bas_guid": "鄂东五河片区",
"label": "2023高标准",
"eng_scal": "小1型",
"value": 0.3,
"diff_value": -0.02,
"trend": -1,
"dt": "2025-05-20",
"is_has_data": "y",
"max_value": 0.3
}].map((item)=>{
const obj = {...item}
obj.lgtd = item.res_lon
obj.lttd = item.res_lat
return obj
})
ms.setData(parseGeoJSON(data));
return true;
}
getFeatureTip(record) {
return record.stnm;
}
featureClicked(properties, dispatch) {
dispatch.runtime.setFeaturePop({
type: InfoPopNames.PicStPop,
properties,
coordinates: [properties.lgtd, properties.lttd],
offsetPop: true,
});
}
}

View File

@ -10,6 +10,17 @@ import PicStLayer from "./picstlayer";
import config from "../../../../config";
import PumpLayer from "./tmp/pumplayer";
import BxSkLayer from "./tmp/bxsk";
import BxjcLayer from './bxjclayer'
import SyjcLayer from './syjclayer'
import SljcLayer from './sljclayer'
import ByjcLayer from "./byjclayer";
import ShuiZhaLayer from "./shuizhalayer";
import BzLayer from "./bzlayer";
import SbLayer from "./sblayer";
import QdLayer from "./qdlayer";
import ShuizhiLayer from "./shuizhilayer";
import TrsqLayer from "./trsqlayer";
const hash = window.location.origin;
@ -117,6 +128,48 @@ const sources = {
),
//新图层
[BxjcLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[SyjcLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[SljcLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[ByjcLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[ShuiZhaLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[BzLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[SbLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[QdLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[ShuizhiLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[TrsqLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[RealDrpLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },

View File

@ -0,0 +1,782 @@
import clone from "clone";
import { PicStPromise, TestPicStPromise } from "../../../../models/_/real";
import { parseGeoJSON } from "../../../../utils/tools";
import { InfoPopNames } from "../../InfoPops";
import BaseLayer from "./baselayer";
const SourceName = '渗压监测';
const ShapeStyle = {
id: SourceName,
type: 'symbol',
source: SourceName,
layout: {
'icon-allow-overlap': true,
'text-allow-overlap': true,
'icon-image': '渗压监测',
'icon-size': [
'interpolate', ['linear'], ['zoom'],
10, 0.4,
14, 0.8,
],
'text-allow-overlap': true,
'text-size': [
'interpolate', ['linear'], ['zoom'],
10, 10,
14, 14,
],
'text-font': ['Roboto Black'],
'text-field': [
'step',
['zoom'],
'',
12, ['get', 'stnm']
],
'text-anchor': 'top',
'text-offset': [0, 1],
'visibility': 'none',
},
paint: {
'text-color': '#fff'
}
};
export default class SyjcLayer extends BaseLayer {
static LayerName = 'SyjcLayer';
static SourceName = SourceName;
getStyle() {
const ret = clone(ShapeStyle);
this._setStyleVisibility(ret);
return ret;
}
getName() {
return SyjcLayer.LayerName;
}
getSubLayers() {
return [ShapeStyle.id];
}
async doRefreshLayer(mapCtrl) {
const ms = mapCtrl.getSource(SourceName);
let data =
// await PicStPromise.get();
[
{
"cd": "1",
"cd_nm": "UPD1",
"ch": "0+060",
"res_reg_cd": "42118140011-A4",
"res_cd": "42118140038",
"res_lon": 115.01664,
"res_lat": 31.40681,
"res_nm": "蛤蟆岗水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181113000",
"town_nm": "乘马岗镇",
"bas_guid": "鄂东五河片区",
"eng_scal": "小1型",
"danger_stat": "非病险水库",
"label": "2023高标准",
"value": 164.8742,
"diff_value": -0.0275,
"trend": -1,
"is_has_data": "y",
"diff_rz": -0.6958,
"stcd": "4239",
"diff_rz_cd": 5.0554,
"max_cd_value": -0.0225,
"rz": 165.57,
"dt": "2025-05-20",
"diff5_value": -0.0737,
"trend5": -1,
"diff10_value": -0.1204,
"trend10": -1,
"diff30_value": -0.0633,
"trend30": -1
},
{
"cd": "1",
"cd_nm": "UPD1",
"ch": "0+027",
"res_reg_cd": "42118140006-A4",
"res_cd": "42118140035",
"res_lon": 115.14137,
"res_lat": 31.55095,
"res_nm": "大堰口水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181112000",
"town_nm": "福田河镇",
"bas_guid": "鄂东五河片区",
"eng_scal": "小1型",
"danger_stat": "非病险水库",
"label": "2023高标准",
"value": 209.4042,
"diff_value": -0.0258,
"trend": -1,
"is_has_data": "y",
"diff_rz": -2.5358,
"stcd": "4159",
"diff_rz_cd": 48.6446,
"max_cd_value": -0.01,
"rz": 211.94,
"dt": "2025-05-20",
"diff5_value": -0.0983,
"trend5": -1,
"diff10_value": -0.1329,
"trend10": -1,
"diff30_value": -0.0954,
"trend30": -1
},
{
"cd": "3",
"cd_nm": "UPD3",
"ch": "0+060",
"res_reg_cd": "42118140011-A4",
"res_cd": "42118140038",
"res_lon": 115.01664,
"res_lat": 31.40681,
"res_nm": "蛤蟆岗水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181113000",
"town_nm": "乘马岗镇",
"bas_guid": "鄂东五河片区",
"eng_scal": "小1型",
"danger_stat": "非病险水库",
"label": "2023高标准",
"value": 162.6908,
"diff_value": -0.0246,
"trend": -1,
"is_has_data": "y",
"diff_rz": -2.8792,
"stcd": "4239",
"diff_rz_cd": 5.0554,
"max_cd_value": -0.0225,
"rz": 165.57,
"dt": "2025-05-20",
"diff5_value": -0.095,
"trend5": -1,
"diff10_value": -0.123,
"trend10": -1,
"diff30_value": -0.0588,
"trend30": -1
},
{
"cd": "1",
"cd_nm": "UPD1",
"ch": "0+038",
"res_reg_cd": "42118140014-A4",
"res_cd": "42118140022",
"res_lon": 115.39612,
"res_lat": 31.1526,
"res_nm": "何门咀水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181109000",
"town_nm": "木子店镇",
"bas_guid": "鄂东五河片区",
"eng_scal": "小1型",
"danger_stat": "非病险水库",
"label": "2023高标准",
"value": 139.2533,
"diff_value": -0.0171,
"trend": -1,
"is_has_data": "y",
"diff_rz": -3.0767,
"stcd": "4268",
"diff_rz_cd": 24.9337,
"max_cd_value": -0.0045,
"rz": 142.33,
"dt": "2025-05-20",
"diff5_value": -0.0675,
"trend5": -1,
"diff10_value": -0.0627,
"trend10": -1,
"diff30_value": -0.0342,
"trend30": -1
},
{
"cd": "4",
"cd_nm": "UPR1",
"ch": "0+055",
"res_reg_cd": "42118140043-A4",
"res_cd": "42118140029",
"res_lon": 115.12048,
"res_lat": 31.18362,
"res_nm": "永红水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181105000",
"town_nm": "阎家河镇",
"bas_guid": "鄂东五河片区",
"eng_scal": "小1型",
"danger_stat": "非病险水库",
"label": "2023高标准",
"value": 116.1513,
"diff_value": -0.0208,
"trend": -1,
"is_has_data": "y",
"diff_rz": -3.1187,
"stcd": "5320",
"diff_rz_cd": 38.1171,
"max_cd_value": 0.0009,
"rz": 119.27,
"dt": "2025-05-20",
"diff5_value": -0.082,
"trend5": -1,
"diff10_value": -0.1333,
"trend10": -1,
"diff30_value": -0.0041,
"trend30": -1
},
{
"cd": "4",
"cd_nm": "UPR1",
"ch": "0+085",
"res_reg_cd": "42118140020-A4",
"res_cd": "42118140032",
"res_lon": 115.13073,
"res_lat": 31.35489,
"res_nm": "鸡翅关水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181111000",
"town_nm": "黄土岗镇",
"bas_guid": "鄂东五河片区",
"eng_scal": "小1型",
"danger_stat": "待除险加固",
"label": "2023高标准",
"value": 483.1646,
"diff_value": -0.0108,
"trend": -1,
"is_has_data": "y",
"diff_rz": -3.2454,
"stcd": "4151",
"diff_rz_cd": 14.6887,
"max_cd_value": -0.0108,
"rz": 486.41,
"dt": "2025-05-20",
"diff5_value": -0.0742,
"trend5": -1,
"diff10_value": -0.1258,
"trend10": -1,
"diff30_value": -0.1708,
"trend30": -1
},
{
"cd": "1",
"cd_nm": "UPD1",
"ch": "0+51.6",
"res_reg_cd": "42118140042-A4",
"res_cd": "42118140004",
"res_lon": 115.05541,
"res_lat": 31.11106,
"res_nm": "永丰水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181003000",
"town_nm": "南湖办事处",
"bas_guid": "鄂东五河片区",
"eng_scal": "小1型",
"danger_stat": "非病险水库",
"label": "2023高标准",
"value": 68.1333,
"diff_value": -0.0142,
"trend": -1,
"is_has_data": "y",
"diff_rz": -3.2767,
"stcd": "340",
"diff_rz_cd": 23.0069,
"max_cd_value": -0.0142,
"rz": 71.41,
"dt": "2025-05-20",
"diff5_value": -0.0109,
"trend5": -1,
"diff10_value": 0.0087,
"trend10": 1,
"diff30_value": 0.0683,
"trend30": 1
},
{
"cd": "7",
"cd_nm": "UPR3",
"ch": "0+060",
"res_reg_cd": "42118140022-A4",
"res_cd": "42118140024",
"res_lon": 115.4501,
"res_lat": 31.3021,
"res_nm": "界岭水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181109000",
"town_nm": "木子店镇",
"bas_guid": "鄂东五河片区",
"eng_scal": "小1型",
"danger_stat": "非病险水库",
"label": "2023高标准",
"value": 374.7421,
"diff_value": -0.0412,
"trend": -1,
"is_has_data": "y",
"diff_rz": -3.4679,
"stcd": "4276",
"diff_rz_cd": 27.0054,
"max_cd_value": -0.0171,
"rz": 378.21,
"dt": "2025-05-20",
"diff5_value": -0.1442,
"trend5": -1,
"diff10_value": -0.1617,
"trend10": -1,
"diff30_value": -0.1121,
"trend30": -1
},
{
"cd": "5",
"cd_nm": "UPR2",
"ch": "0+085",
"res_reg_cd": "42118140011-A4",
"res_cd": "42118140038",
"res_lon": 115.01664,
"res_lat": 31.40681,
"res_nm": "蛤蟆岗水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181113000",
"town_nm": "乘马岗镇",
"bas_guid": "鄂东五河片区",
"eng_scal": "小1型",
"danger_stat": "非病险水库",
"label": "2023高标准",
"value": 161.9071,
"diff_value": -0.0246,
"trend": -1,
"is_has_data": "y",
"diff_rz": -3.6629,
"stcd": "4239",
"diff_rz_cd": 5.0554,
"max_cd_value": -0.0225,
"rz": 165.57,
"dt": "2025-05-20",
"diff5_value": -0.0704,
"trend5": -1,
"diff10_value": -0.0804,
"trend10": -1,
"diff30_value": -0.1242,
"trend30": -1
},
{
"cd": "1",
"cd_nm": "UPD1",
"ch": "0+145",
"res_reg_cd": "42118140015-A4",
"res_cd": "42118140042",
"res_lon": 114.84792,
"res_lat": 31.44124,
"res_nm": "黑龙潭水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181114000",
"town_nm": "顺河镇",
"bas_guid": "鄂东五河片区",
"eng_scal": "小1型",
"danger_stat": "非病险水库",
"label": "2023高标准",
"value": 121.0708,
"diff_value": -0.028,
"trend": -1,
"is_has_data": "y",
"diff_rz": -4.0992,
"stcd": "5356",
"diff_rz_cd": 37.8067,
"max_cd_value": -0.0254,
"rz": 125.17,
"dt": "2025-05-20",
"diff5_value": -0.1067,
"trend5": -1,
"diff10_value": -0.115,
"trend10": -1,
"diff30_value": 0.3258,
"trend30": 1
},
{
"cd": "1",
"cd_nm": "UPD1",
"ch": "0+042",
"res_reg_cd": "42118140031-A4",
"res_cd": "42118140017",
"res_lon": 115.14545,
"res_lat": 30.95398,
"res_nm": "群建水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181107000",
"town_nm": "盐田河镇",
"bas_guid": "鄂东五河片区",
"eng_scal": "小1型",
"danger_stat": "非病险水库",
"label": "2023高标准",
"value": 115.0463,
"diff_value": -0.0254,
"trend": -1,
"is_has_data": "y",
"diff_rz": -4.1337,
"stcd": "5331",
"diff_rz_cd": 11.2642,
"max_cd_value": -0.0238,
"rz": 119.18,
"dt": "2025-05-20",
"diff5_value": -0.0929,
"trend5": -1,
"diff10_value": -0.1241,
"trend10": -1,
"diff30_value": -0.1004,
"trend30": -1
},
{
"cd": "2",
"cd_nm": "UPD2",
"ch": "0+060",
"res_reg_cd": "42118140011-A4",
"res_cd": "42118140038",
"res_lon": 115.01664,
"res_lat": 31.40681,
"res_nm": "蛤蟆岗水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181113000",
"town_nm": "乘马岗镇",
"bas_guid": "鄂东五河片区",
"eng_scal": "小1型",
"danger_stat": "非病险水库",
"label": "2023高标准",
"value": 161.3038,
"diff_value": -0.0225,
"trend": -1,
"is_has_data": "y",
"diff_rz": -4.2662,
"stcd": "4239",
"diff_rz_cd": 5.0554,
"max_cd_value": -0.0225,
"rz": 165.57,
"dt": "2025-05-20",
"diff5_value": -0.085,
"trend5": -1,
"diff10_value": -0.1233,
"trend10": -1,
"diff30_value": -0.0695,
"trend30": -1
},
{
"cd": "3",
"cd_nm": "UPD3",
"ch": "0+080",
"res_reg_cd": "42118140023-A4",
"res_cd": "42118140033",
"res_lon": 114.99636,
"res_lat": 30.70309,
"res_nm": "刘家冲水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181111000",
"town_nm": "黄土岗镇",
"bas_guid": "鄂东五河片区",
"eng_scal": "小1型",
"danger_stat": "非病险水库",
"label": "2023高标准",
"value": 83.9746,
"diff_value": -0.0271,
"trend": -1,
"is_has_data": "y",
"diff_rz": -4.7254,
"stcd": "5385",
"diff_rz_cd": 29.575,
"max_cd_value": -0.0196,
"rz": 88.7,
"dt": "2025-05-20",
"diff5_value": -0.0717,
"trend5": -1,
"diff10_value": -0.0979,
"trend10": -1,
"diff30_value": -0.155,
"trend30": -1
},
{
"cd": "4",
"cd_nm": "UPR1",
"ch": "0+142",
"res_reg_cd": "42118140015-A4",
"res_cd": "42118140042",
"res_lon": 114.84792,
"res_lat": 31.44124,
"res_nm": "黑龙潭水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181114000",
"town_nm": "顺河镇",
"bas_guid": "鄂东五河片区",
"eng_scal": "小1型",
"danger_stat": "非病险水库",
"label": "2023高标准",
"value": 120.4183,
"diff_value": -0.0338,
"trend": -1,
"is_has_data": "y",
"diff_rz": -4.7517,
"stcd": "5356",
"diff_rz_cd": 37.8067,
"max_cd_value": -0.0254,
"rz": 125.17,
"dt": "2025-05-20",
"diff5_value": -0.1488,
"trend5": -1,
"diff10_value": -0.2259,
"trend10": -1,
"diff30_value": -0.2617,
"trend30": -1
},
{
"cd": "6",
"cd_nm": "UPR3",
"ch": "0+085",
"res_reg_cd": "42118140011-A4",
"res_cd": "42118140038",
"res_lon": 115.01664,
"res_lat": 31.40681,
"res_nm": "蛤蟆岗水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181113000",
"town_nm": "乘马岗镇",
"bas_guid": "鄂东五河片区",
"eng_scal": "小1型",
"danger_stat": "非病险水库",
"label": "2023高标准",
"value": 160.5146,
"diff_value": -0.0254,
"trend": -1,
"is_has_data": "y",
"diff_rz": -5.0554,
"stcd": "4239",
"diff_rz_cd": 5.0554,
"max_cd_value": -0.0225,
"rz": 165.57,
"dt": "2025-05-20",
"diff5_value": -0.0867,
"trend5": -1,
"diff10_value": -0.0787,
"trend10": -1,
"diff30_value": -0.0375,
"trend30": -1
},
{
"cd": "1",
"cd_nm": "UPD1",
"ch": "0+030",
"res_reg_cd": "42118140022-A4",
"res_cd": "42118140024",
"res_lon": 115.4501,
"res_lat": 31.3021,
"res_nm": "界岭水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181109000",
"town_nm": "木子店镇",
"bas_guid": "鄂东五河片区",
"eng_scal": "小1型",
"danger_stat": "非病险水库",
"label": "2023高标准",
"value": 372.9888,
"diff_value": -0.0233,
"trend": -1,
"is_has_data": "y",
"diff_rz": -5.2212,
"stcd": "4276",
"diff_rz_cd": 27.0054,
"max_cd_value": -0.0171,
"rz": 378.21,
"dt": "2025-05-20",
"diff5_value": -0.0862,
"trend5": -1,
"diff10_value": -0.1062,
"trend10": -1,
"diff30_value": -0.1783,
"trend30": -1
},
{
"cd": "3",
"cd_nm": "UPD3",
"ch": "0+100",
"res_reg_cd": "42118140022-A4",
"res_cd": "42118140024",
"res_lon": 115.4501,
"res_lat": 31.3021,
"res_nm": "界岭水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181109000",
"town_nm": "木子店镇",
"bas_guid": "鄂东五河片区",
"eng_scal": "小1型",
"danger_stat": "非病险水库",
"label": "2023高标准",
"value": 372.6217,
"diff_value": -0.0171,
"trend": -1,
"is_has_data": "y",
"diff_rz": -5.5883,
"stcd": "4276",
"diff_rz_cd": 27.0054,
"max_cd_value": -0.0171,
"rz": 378.21,
"dt": "2025-05-20",
"diff5_value": -0.0954,
"trend5": -1,
"diff10_value": -0.1379,
"trend10": -1,
"diff30_value": -0.235,
"trend30": -1
},
{
"cd": "1",
"cd_nm": "UPD1",
"ch": "0+095",
"res_reg_cd": "42118140020-A4",
"res_cd": "42118140032",
"res_lon": 115.13073,
"res_lat": 31.35489,
"res_nm": "鸡翅关水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181111000",
"town_nm": "黄土岗镇",
"bas_guid": "鄂东五河片区",
"eng_scal": "小1型",
"danger_stat": "待除险加固",
"label": "2023高标准",
"value": 480.7392,
"diff_value": -0.0237,
"trend": -1,
"is_has_data": "y",
"diff_rz": -5.6708,
"stcd": "4151",
"diff_rz_cd": 14.6887,
"max_cd_value": -0.0108,
"rz": 486.41,
"dt": "2025-05-20",
"diff5_value": -0.0804,
"trend5": -1,
"diff10_value": -0.1033,
"trend10": -1,
"diff30_value": -0.0479,
"trend30": -1
}
].map((item)=>{
const obj = {...item}
obj.lgtd = item.res_lon
obj.lttd = item.res_lat
return obj
})
ms.setData(parseGeoJSON(data));
return true;
}
getFeatureTip(record) {
return record.stnm;
}
featureClicked(properties, dispatch) {
dispatch.runtime.setFeaturePop({
type: InfoPopNames.PicStPop,
properties,
coordinates: [properties.lgtd, properties.lttd],
offsetPop: true,
});
}
}

View File

@ -0,0 +1,252 @@
import clone from "clone";
import { PicStPromise, TestPicStPromise } from "../../../../models/_/real";
import { parseGeoJSON } from "../../../../utils/tools";
import { InfoPopNames } from "../../InfoPops";
import BaseLayer from "./baselayer";
const SourceName = '土壤墒情';
const ShapeStyle = {
id: SourceName,
type: 'symbol',
source: SourceName,
layout: {
'icon-allow-overlap': true,
'text-allow-overlap': true,
'icon-image': '土壤墒情',
'icon-size': [
'interpolate', ['linear'], ['zoom'],
10, 0.4,
14, 0.8,
],
'text-allow-overlap': true,
'text-size': [
'interpolate', ['linear'], ['zoom'],
10, 10,
14, 14,
],
'text-font': ['Roboto Black'],
'text-field': [
'step',
['zoom'],
'',
12, ['get', 'stnm']
],
'text-anchor': 'top',
'text-offset': [0, 1],
'visibility': 'none',
},
paint: {
'text-color': '#fff'
}
};
const page1 = [
{
"addvcd": "420800000000000",
"moditime": "2022-05-01 21:00:00",
"comments": "漳河遥测",
"src": "zhzj",
"esstym": "",
"mvalue": {
"slmmmt": null,
"slm60": 0,
"exkey": "@",
"slm80": 0,
"hitrsn": null,
"crpty": null,
"crpgrwprd": null,
"srlslm": null,
"stcd": "ZH201417",
"slm10": 24,
"slm20": 5.3,
"slm30": 44.3,
"slm40": 44.3,
"tm": "2024-08-03 05:00",
"slm100": 0,
"vtavslm": null,
"slmAvg": 24.5
},
"lttd": 30.8456,
"sttp": "SS",
"irrCode": "D00000010",
"sort": 9999,
"hasImg": false,
"stlc": "荆门市",
"dtmel": 0,
"stcd": "ZH201417",
"stnm": "马山二组(墒情)",
"addvcd_dictText": "荆门市",
"lgtd": 112.2321,
"irrCode_dictText": "漳河实验站",
"bsnm": "漳河流域"
},
{
"addvcd": "420800000000000",
"moditime": "2022-05-01 21:00:00",
"comments": "漳河遥测",
"src": "zhzj",
"esstym": "",
"mvalue": {
"slmmmt": null,
"slm60": 0,
"exkey": "@",
"slm80": 0,
"hitrsn": null,
"crpty": null,
"crpgrwprd": null,
"srlslm": null,
"stcd": "ZH201421",
"slm10": 12.1,
"slm20": 16.2,
"slm30": 12.8,
"slm40": 12.8,
"tm": "2024-08-15 08:00",
"slm100": 0,
"vtavslm": null,
"slmAvg": 13.7
},
"lttd": 30.8446,
"sttp": "SS",
"irrCode": "D00000010",
"sort": 9999,
"hasImg": false,
"stlc": "荆门市",
"dtmel": 0,
"stcd": "ZH201421",
"stnm": "槐桥四组(墒情)",
"addvcd_dictText": "荆门市",
"lgtd": 112.203,
"irrCode_dictText": "漳河实验站",
"bsnm": "漳河流域"
},
{
"addvcd": "420800000000000",
"moditime": "2022-05-01 21:00:00",
"src": "zhzj",
"esstym": "",
"mvalue": {
"slmmmt": null,
"slm60": 0,
"exkey": "@",
"slm80": 0,
"hitrsn": null,
"crpty": null,
"crpgrwprd": null,
"srlslm": null,
"stcd": "ZH201418",
"slm10": 16.5,
"slm20": 12.5,
"slm30": 0,
"slm40": 0,
"tm": "2024-09-19 11:00",
"slm100": 0,
"vtavslm": null,
"slmAvg": 14.5
},
"lttd": 30.8866,
"sttp": "SS",
"irrCode": "D00000010",
"sort": 9999,
"hasImg": false,
"stlc": "荆门市",
"dtmel": 0,
"stcd": "ZH201418",
"stnm": "双碑一组(墒情)",
"addvcd_dictText": "荆门市",
"lgtd": 112.2006,
"irrCode_dictText": "漳河实验站",
"bsnm": "漳河流域"
},
{
"addvcd": "420800000000000",
"moditime": "2022-05-01 21:00:00",
"comments": "水资源多孔闸门控制系统",
"src": "zhzj",
"esstym": "",
"mvalue": {
"slmmmt": null,
"slm60": null,
"exkey": "@",
"slm80": null,
"hitrsn": null,
"crpty": null,
"crpgrwprd": null,
"srlslm": null,
"stcd": "4211221031",
"slm10": 31,
"slm20": 42.6,
"slm30": null,
"slm40": 26.6,
"tm": "2025-05-26 09:00",
"slm100": null,
"vtavslm": null,
"slmAvg": 33.4
},
"lttd": 30.904191,
"sttp": "SS",
"irrCode": "D00000010",
"sort": 9999,
"hasImg": false,
"stlc": "荆门市",
"stcd": "4211221031",
"stnm": "试验站墒情",
"addvcd_dictText": "荆门市",
"lgtd": 112.087806,
"irrCode_dictText": "漳河实验站",
"bsnm": "漳河流域"
}
]
export default class TrsqLayer extends BaseLayer {
static LayerName = 'TrsqLayer';
static SourceName = SourceName;
getStyle() {
const ret = clone(ShapeStyle);
this._setStyleVisibility(ret);
return ret;
}
getName() {
return TrsqLayer.LayerName;
}
getSubLayers() {
return [ShapeStyle.id];
}
async doRefreshLayer(mapCtrl) {
const ms = mapCtrl.getSource(SourceName);
let data =
// await PicStPromise.get();
[...page1].map((item)=>{
const obj = {...item}
obj.lgtd = item.lgtd + 2.9619
obj.lttd = item.lttd + 0.2002
return obj
})
ms.setData(parseGeoJSON(data));
return true;
}
getFeatureTip(record) {
return record.stnm;
}
featureClicked(properties, dispatch) {
dispatch.runtime.setFeaturePop({
type: InfoPopNames.PicStPop,
properties,
coordinates: [properties.lgtd, properties.lttd],
offsetPop: true,
});
}
}

View File

@ -17,12 +17,22 @@ export default function Demo1() {
const layout = useSelector(getLayout);
const hp = useSelector(hidePanels);
console.log("hp",hp);
const yyRes = useSelector(s => s.runtime.yyObj);
return (
<div className="demo1">
<div style={{ position: 'absolute', left: 0, bottom: 0, right: 0, top: 0, zIndex: 0 }}>
<div style={{ position: 'absolute', left: 0, bottom: 0, right: 0, top: 0, zIndex: 0 }}>
<MapCtrl />
</div>
</div>
{
yyRes.yy &&
<>
<img src={`${process.env.PUBLIC_URL}/assets/yytc.png`} alt="" style={{ zIndex: 0.1, position: 'absolute' }} />
<img src={`${process.env.PUBLIC_URL}/assets/yy.png`} alt="" style={{ zIndex: 0.2, position: 'absolute',bottom:100,left:'28%' }} />
</>
}
<div className="bottom">
<ActionDock />
</div>

View File

@ -1,5 +1,6 @@
import React, { useMemo, useState } from 'react';
import useRequest from '../../../../utils/useRequest';
import { useDispatch, useSelector } from 'react-redux';
import PanelBox from '../../components/PanelBox';
import Table from '@material-ui/core/Table';
@ -1457,6 +1458,8 @@ const data4 = [
function DrpReal({ style }) {
const [tab,setTab] = useState('1')
const dispatch = useDispatch();
return (
<PanelBox
@ -1465,10 +1468,34 @@ function DrpReal({ style }) {
color="green"
tabs={
<span className="button-group">
<span className={clsx({ active: tab==='1' })} onClick={() => setTab('1')}>变形监测</span>
<span className={clsx({ active: tab==='2' })} onClick={() => setTab('2')}>渗压监测</span>
<span className={clsx({ active: tab==='3' })} onClick={() => setTab('3')}>渗流监测</span>
<span className={clsx({ active: tab==='4' })} onClick={() => setTab('4')}>白蚁监测</span>
<span className={clsx({ active: tab==='1' })} onClick={() => {
dispatch.map.setLayerVisible({'BxjcLayer':true});
dispatch.map.setLayerVisible({'SyjcLayer':false});
dispatch.map.setLayerVisible({'SljcLayer':false});
dispatch.map.setLayerVisible({'ByjcLayer':false});
setTab('1')
}}>变形监测</span>
<span className={clsx({ active: tab==='2' })} onClick={() => {
dispatch.map.setLayerVisible({'BxjcLayer':false});
dispatch.map.setLayerVisible({'SyjcLayer':true});
dispatch.map.setLayerVisible({'SljcLayer':false});
dispatch.map.setLayerVisible({'ByjcLayer':false});
setTab('2')
}}>渗压监测</span>
<span className={clsx({ active: tab==='3' })} onClick={() => {
dispatch.map.setLayerVisible({'BxjcLayer':false});
dispatch.map.setLayerVisible({'SyjcLayer':false});
dispatch.map.setLayerVisible({'SljcLayer':true});
dispatch.map.setLayerVisible({'ByjcLayer':false});
setTab('3')
}}>渗流监测</span>
<span className={clsx({ active: tab==='4' })} onClick={() => {
dispatch.map.setLayerVisible({'BxjcLayer':false});
dispatch.map.setLayerVisible({'SyjcLayer':false});
dispatch.map.setLayerVisible({'SljcLayer':false});
dispatch.map.setLayerVisible({'ByjcLayer':true});
setTab('4')
}}>白蚁监测</span>
</span>
}
>

View File

@ -12,7 +12,7 @@
"wagaCode": "HP0074208020000170",
"adCode": "420802102000000",
"adCode_dictText": "漳河镇",
"lgtd": 112.075597 -2.9619,
"lgtd": 112.075597 +2.9619,
"updserInvst": null,
"engGrad": null,
"runStat": "1",
@ -38,7 +38,7 @@
"engManCode": "ENG100051",
"chidCount": null,
"whthInWat_dictText": "是",
"lttd": 30.961122 - 0.2002,
"lttd": 30.961122 +0.2002,
"whthInWat": "1",
"hasImg": false,
"stfl": 131,
@ -73,7 +73,7 @@
"wagaCode": "HP0074208020000185",
"adCode": "420802102000000",
"adCode_dictText": "漳河镇",
"lgtd": 112.078158 -2.9619,
"lgtd": 112.078158 +2.9619,
"updserInvst": null,
"engGrad": null,
"runStat": "1",
@ -135,7 +135,7 @@
"wagaCode": "HP007420804000188X",
"adCode": "420804004213000",
"adCode_dictText": "车桥村",
"lgtd": 112.118889 -2.9619,
"lgtd": 112.118889 +2.9619,
"updserInvst": 20,
"engGrad": "2",
"runStat": "1",
@ -161,7 +161,7 @@
"engManCode": "ENG100037",
"chidCount": null,
"whthInWat_dictText": "否",
"lttd": 30.974167 - 0.2002,
"lttd": 30.974167 +0.2002,
"whthInWat": "2",
"hasImg": false,
"stfl": 5,
@ -195,7 +195,7 @@ const bzData = [
"engManCode": "ENG200038",
"wasuRang": "生态用水",
"wainWasoType": null,
"lttd": 30.97131 - 0.2002,
"lttd": 30.97131 +0.2002,
"updserRsn": null,
"updDate": "2023-03-21",
"pustCode": "HP0104208040001543",
@ -206,7 +206,7 @@ const bzData = [
"stfl": 0.1,
"adCode": "420804004000000",
"adCode_dictText": "双喜街道办事处",
"lgtd": 112.18575 -2.9619,
"lgtd": 112.18575 +2.9619,
"actIrrA": null,
"updserInvst": null,
"engGrad": null,
@ -252,7 +252,7 @@ const bzData = [
"stfl": 0.1,
"adCode": "420804001003000",
"adCode_dictText": "白石坡社区",
"lgtd": 112.19441 -2.9619,
"lgtd": 112.19441 +2.9619,
"actIrrA": null,
"updserInvst": null,
"engGrad": null,

View File

@ -35,7 +35,8 @@ function HDReal({ style }) {
// let { data } = useRequest(HDRealPromise.get, t);
const [setting, showSetting] = useState(false);
const flyTo = (record,type) => {
const flyTo = (record, type) => {
toggleStType(type)
const { lgtd, lttd } = record;
if (lgtd && lttd) {
dispatch.runtime.setFeaturePop({ type, properties: record, coordinates: [lgtd, lttd] });
@ -49,6 +50,13 @@ function HDReal({ style }) {
const [type, setType] = useState('sz')
const toggleStType = (type) => {
if (type == 'sz') {
dispatch.map.setLayerVisible({'ShuiZhaLayer':true})
dispatch.map.setLayerVisible({'BzLayer':false})
} else {
dispatch.map.setLayerVisible({'ShuiZhaLayer':false})
dispatch.map.setLayerVisible({'BzLayer':true})
}
setType(type)
}

View File

@ -49,10 +49,14 @@ function WF() {
}, [contourSetting]);
const genWeatherContour24H = () => {
dispatch.runtime.setYyfa({})
dispatch.shyjview.showWeather24h();
}
const genWeatherContourRadar = () => {
dispatch.runtime.setYyfa({})
dispatch.shyjview.showWeatherRadar();
}

View File

@ -15,7 +15,7 @@ export default function WeatherForcast({ style }) {
return (
<PanelBox
style={style}
title="天气预报"
title="天气预报1"
color="orange"
extra={
<i className="ionicons close cursor-pointer" onClick={closeLayer}></i>

View File

@ -17,21 +17,15 @@ import { renderHDRz } from '../../../../utils/renutils';
import Setting from './Setting';
import { InfoPopNames } from '../../InfoPops';
import config from '../../../../config';
function rzRender(rz, base) {
return (
<DpTableCell align="right" style={{ color: rz >= base ? 'red' : '#fff' }}>
{typeof base === 'number' ? base.toFixed(2) : ''}
</DpTableCell>
);
}
import { Switch, FormControlLabel,InputLabel, Select, MenuItem,FormControl } from '@material-ui/core/index'
import { styled } from '@material-ui/styles';
function HDReal({ style }) {
const dispatch = useDispatch();
const tableRzFilter = useSelector(s => s.realview.tableRzFilter);
const hdAutoRefresh = useSelector(s => s.realview.hdAutoRefresh);
const t = useRefresh(hdAutoRefresh ? 60 * 1000 : 0);
const [checked, setChecked] = React.useState(false);
// let { data } = useRequest(HDRealPromise.get, t);
const [setting, showSetting] = useState(false);
@ -54,15 +48,15 @@ function HDReal({ style }) {
const obj = {
0: '东干渠',
1: '西干渠',
2:'邓家河干渠'
2: '邓家河干渠'
}
const showData = Array(10).fill(0).map((o,i) => ({
const showData = Array(10).fill(0).map((o, i) => ({
id: `#${i + 1}`,
type:obj[i % 2],
type: obj[i % 2],
status: '--',
kd: (Math.random() * 100).toFixed(2),
ll:(Math.random() * 100).toFixed(1)
ll: (Math.random() * 100).toFixed(1)
}))
const flyTo = (record) => {
@ -86,29 +80,29 @@ function HDReal({ style }) {
dispatch.realview.setHdAutoRefresh(!hdAutoRefresh);
}
const renderStatus = (row) => {
let bz = '运行'
switch (row.status) {
case 0:
bz = '停止'
break;
case 1:
bz = '运行'
break;
case 2:
bz = '故障'
break;
case 3:
bz = '维护中'
break;
case 4:
bz = '待机'
break;
default:
break;
}
return bz
const CustomSwitch = styled(Switch)({
'& .MuiSwitch-switchBase': {
color: '#fff',
'&.Mui-checked': {
color: '#1890ff',
'& + .MuiSwitch-track': {
backgroundColor: '#1890ff',
opacity: 0.5,
},
},
},
'& .MuiSwitch-track': {
backgroundColor: 'rgba(255, 255, 255, 0.3)',
},
});
const StyledFormControlLabel = styled(FormControlLabel)({
'& .MuiFormControlLabel-label': {
color: '#fff'
}
});
const [dimension, setDimension] =useState('fqh');
return (
<PanelBox
@ -128,7 +122,7 @@ function HDReal({ style }) {
</>
}
>
<TableContainer style={{ height: '100%' }}>
<TableContainer style={{ height: '100%', position: 'relative' }}>
<Table size="small" stickyHeader>
<TableHead>
<TableRow>
@ -142,13 +136,13 @@ function HDReal({ style }) {
<TableBody>
{showData.map((row) => (
<DpTableRow key={row.id}>
<DpTableCell component="th" scope="row">
<DpTableCell component="th" scope="row">
<div
className="table-ellipsis cursor-pointer"
>{row.type}</div>
</DpTableCell>
<DpTableCell align="center">
{row.kd}
{row.kd}
</DpTableCell>
<DpTableCell align="center">{row.ll}</DpTableCell>
<DpTableCell align="center">{row.status}</DpTableCell>
@ -158,10 +152,54 @@ function HDReal({ style }) {
))}
</TableBody>
</Table>
</TableContainer>
{
setting && <Setting onClose={() => showSetting(false)} />
}
<div style={{ position: 'absolute',color:'#fff',top:70,left:-280,display:'flex',alignItems:'center' }}>
<StyledFormControlLabel
control={
<CustomSwitch
checked={checked}
onChange={(e) => setChecked(e.target.checked)}
/>
}
label="多灌区模式"
/>
{checked &&<div style={{marginTop:"-15px"}}>
<FormControl sx={{ minWidth: 200, marginBottom: 2 }}>
<InputLabel id="analysis-select-label"></InputLabel>
<Select
labelId="analysis-select-label"
value={dimension}
label=""
onChange={(event) => {
const value = event.target.value;
setDimension(value);
}}
sx={{
color: '#fff',
'.MuiOutlinedInput-notchedOutline': {
borderColor: 'rgba(255, 255, 255, 0.3)',
},
'&:hover .MuiOutlinedInput-notchedOutline': {
borderColor: 'rgba(255, 255, 255, 0.6)',
},
'&.Mui-focused .MuiOutlinedInput-notchedOutline': {
borderColor: '#fff',
}
}}
>
<MenuItem value="fqh">浮桥河灌区</MenuItem>
<MenuItem value="shk">三河口水库灌区</MenuItem>
<MenuItem value="qjs">群建水库灌区</MenuItem>
<MenuItem value="dsb">大石板灌区</MenuItem>
</Select>
</FormControl>
</div>}
</div>
</PanelBox>
)
}

View File

@ -18,7 +18,7 @@ const data =[
"chan": "1",
"accq": 120057496
},
"lttd": 31.240848 -0.2002,
"lttd": 31.240848 +0.2002,
"sttp": "QQ",
"irrCode": "D00001300",
"sort": 6001,
@ -28,7 +28,7 @@ const data =[
"stcd": "4211221029",
"stnm": "口泉测流站",
"addvcd_dictText": "荆门市",
"lgtd": 111.826413 - 2.9619,
"lgtd": 111.826413 +2.9619,
"irrCode_dictText": "水库枢纽",
"bsnm": "漳河流域"
},
@ -60,7 +60,7 @@ const data =[
"stcd": "4211221030",
"stnm": "苍坪测流站",
"addvcd_dictText": "荆门市",
"lgtd": 111.866217 -2.9619,
"lgtd": 111.866217 +2.9619,
"irrCode_dictText": "水库枢纽",
"bsnm": "漳河流域"
},
@ -82,7 +82,7 @@ const data =[
"chan": "1",
"accq": 377902272
},
"lttd": 30.959561 - 0.2002,
"lttd": 30.959561 +0.2002,
"sttp": "QQ",
"irrCode": "D00000290",
"sort": 6030,
@ -92,7 +92,7 @@ const data =[
"stcd": "4208820100",
"stnm": "渠首时差法流量站",
"addvcd_dictText": "荆门市",
"lgtd": 112.077549 -2.9619,
"lgtd": 112.077549 +2.9619,
"irrCode_dictText": "总干渠",
"bsnm": "漳河流域"
},
@ -114,7 +114,7 @@ const data =[
"chan": "0",
"accq": null
},
"lttd": 30.946457 -0.2002,
"lttd": 30.946457 +0.2002,
"sttp": "QQ",
"irrCode": "D00000300",
"sort": 6031,
@ -124,7 +124,7 @@ const data =[
"stcd": "4211223302",
"stnm": "二干进口流量",
"addvcd_dictText": "荆门市",
"lgtd": 112.07475 -2.9619,
"lgtd": 112.07475 +2.9619,
"irrCode_dictText": "二干渠",
"bsnm": "漳河流域"
},
@ -147,7 +147,7 @@ const data =[
"chan": "1",
"accq": 151531776
},
"lttd": 30.964597 - 0.2002,
"lttd": 30.964597 +0.2002,
"sttp": "QQ",
"irrCode": "D00000020,D00000290",
"sort": 6032,
@ -157,7 +157,7 @@ const data =[
"stcd": "4208820200",
"stnm": "三干渠进口时差法",
"addvcd_dictText": "荆门市",
"lgtd": 112.190279 -2.9619,
"lgtd": 112.190279 +2.9619,
"irrCode_dictText": "三干渠,总干渠",
"bsnm": "漳河流域"
}]

View File

@ -66,34 +66,35 @@ function HDReal({ style }) {
type: '工业',
time: '2025-05-26 10:00',
stcd: 42000002,
stnm: '热电厂',
stnm: '汉通闸流量站',
water:30,
flow: 0.222,
"lttd": 30.959561,
"lgtd": 112.077549,
"lttd": 30.973775 + 0.2002,
"lgtd": 112.17597 +2.9619,
},
{ water:12,
type: '工业',
stcd: 42000001,
time: '2025-05-26 10:00',
stnm: '福繕泪耀玻璃',
stnm: '福耀玻璃',
flow: 0.355,
"lttd": 30.959561,
"lgtd": 112.077549,
"lttd": 30.93926+0.2002,
"lgtd": 112.191703+ 2.9619,
}, {
water:21,
type: '工业',
time: '2025-05-26 10:00',
stnm: '格林美',
flow: 0.09,
"lttd": 30.959561,
"lgtd": 112.077549,
"lttd": 30.953887 + 0.2002,
"lgtd": 112.190551 + 2.9619,
stcd: 42000005
}
]
const flyTo = (record,type) => {
const flyTo = (record, type) => {
toggleStType(type == '渠道流量站' ?'qd':'sb')
const { lgtd, lttd } = record;
if (lgtd && lttd) {
dispatch.runtime.setFeaturePop({ type, properties: record, coordinates: [lgtd, lttd] });
@ -107,9 +108,15 @@ function HDReal({ style }) {
const [type, setType] = useState('sb')
const toggleStType = (type) => {
const toggleStType = (type) => {
if (type == 'sb') {
dispatch.map.setLayerVisible({'SbLayer':true})
dispatch.map.setLayerVisible({'QdLayer':false})
} else {
dispatch.map.setLayerVisible({'SbLayer':false})
dispatch.map.setLayerVisible({'QdLayer':true})
}
setType(type)
}
const toggleAutoRefresh = () => {

View File

@ -11,7 +11,7 @@ export default function Overall({ style }) {
return (
<PanelBox
style={style}
title="区域分类统计"
title="数据统计"
color="green"
>
<OverallContent data={data} />

View File

@ -53,14 +53,15 @@ function HDReal({ style }) {
// }, [data, tableRzFilter]);
const showData = Array(1).fill(0).map((o, i) => ({
"lgtd": 112.071,
"lttd": 30.9641,
"lgtd": 112.071 +2.9619,
"lttd": 30.9641 +0.2002,
"tm": "2025-03-21 08",
"doxLevelStr": "Ⅰ类",
stnm:'水质站'
}))
const flyTo = (record) => {
dispatch.map.setLayerVisible({'ShuizhiLayer':true})
const { lgtd, lttd } = record;
if (lgtd && lttd) {
dispatch.runtime.setFeaturePop({ type: '水质站', properties: record, coordinates: [lgtd, lttd] });

View File

@ -1,4 +1,4 @@
import React, { useMemo, useState } from 'react';
import React, { useMemo, useState,useEffect } from 'react';
import useRequest from '../../../../utils/useRequest';
import PanelBox from '../../components/PanelBox';
@ -17,7 +17,10 @@ import { renderHDRz } from '../../../../utils/renutils';
import Setting from './Setting';
import { InfoPopNames } from '../../InfoPops';
import config from '../../../../config';
import { DatePicker } from 'antd';
import moment from 'moment';
import './index.less'
const { RangePicker } = DatePicker;
function rzRender(rz, base) {
return (
@ -52,11 +55,12 @@ function HDReal({ style }) {
// return ret;
// }, [data, tableRzFilter]);
const showData = Array(10).fill(0).map((o,i) => ({
id:`#${i + 1}`,
cl: (Math.random() * 100).toFixed(0),
kd: (Math.random() * 100).toFixed(0),
ll:(Math.random() * 100).toFixed(0)
const showData = Array(1).fill(0).map((o,i) => ({
date: '2025-05-26',
event: '侵占河道',
type: '侵占河道',
status: '待处理',
place:'浮桥河灌区'
}))
const flyTo = (record) => {
@ -75,39 +79,37 @@ function HDReal({ style }) {
const visible = !tableRzFilter[type];
dispatch.realview.setTableRzFilter({ [type]: visible });
}
const [params, setParams] = useState({ tm: [] })
const toggleAutoRefresh = () => {
dispatch.realview.setHdAutoRefresh(!hdAutoRefresh);
}
const renderStatus = (row) => {
let bz = '运行'
switch (row.status) {
case 0:
bz = '停止'
break;
case 1:
bz = '运行'
break;
case 2:
bz = '故障'
break;
case 3:
bz = '维护中'
break;
case 4:
bz = '待机'
break;
default:
break;
}
return bz
}
const searchTm = (e) => {
setParams({
...params,
stm: e[0].format("YYYY-MM-DD HH:mm"),
etm: e[1].format("YYYY-MM-DD HH:mm"),
tm:e,
})
};
useEffect(() => {
let options = "";
options = {
etm: moment().add(1, 'hour').set({minute: 0, second: 0}).format("YYYY-MM-DD HH:mm"),
stm: moment().subtract(7, 'days').add(1, 'hour').set({minute: 0, second: 0}).format("YYYY-MM-DD HH:mm"),
tm: [
moment().subtract(7, 'days').add(1, 'hour').set({ minute: 0, second: 0 }),
moment().add(1, 'hour').set({ minute: 0, second: 0 }),
],
}
setParams(options)
}, [])
return (
<PanelBox
style={style}
title="水政巡查"
title="水政事件"
color="green"
// tabs={
// <span className="button-group">
@ -122,33 +124,50 @@ function HDReal({ style }) {
</>
}
>
<TableContainer style={{ height: '100%' }}>
<div className='tm' style={{position:"relative",zIndex:999999,color:"#fff",width:"60%",margin:'10px'}}>
<RangePicker
// width="100%"
className='time-picker'
style={{
flex:1,
background: "transparent",
border: "none",
color: "#fff",
}}
onChange={searchTm}
allowClear
format="YYYY-MM-DD HH:mm"
showTime={{
format: 'HH:mm',
}}
value={params.tm}
getPopupContainer={trigger => trigger.parentElement}
/>
</div>
<img src={`${process.env.PUBLIC_URL}/assets/shuiz.png`} alt="" style={{ width: 421, height: '50%' }} />
<TableContainer style={{ height: '30%',marginTop:'10px' }}>
<Table size="small" stickyHeader>
<TableHead>
<TableRow>
<DpTableCell style={{ width: '10%' }} align="left">区域</DpTableCell>
<DpTableCell style={{ width: '20%' }} align="left">巡查次数</DpTableCell>
<DpTableCell align="center" style={{ width: '20%' }}>事件数量</DpTableCell>
<DpTableCell align="center" style={{ width: '30%' }}>处理中</DpTableCell>
{/* <DpTableCell align="right">警戒水位</DpTableCell> */}
<TableRow >
<DpTableCell style={{ width: '20%' }} align="center">日期</DpTableCell>
<DpTableCell style={{ width: '20%' }} align="center">事件名称</DpTableCell>
<DpTableCell align="center" style={{ width: '20%' }}>事件类型</DpTableCell>
<DpTableCell align="center" style={{ width: '20%' }}>所在灌区</DpTableCell>
<DpTableCell align="center" style={{ width: '20%' }}>待处理</DpTableCell>
</TableRow>
</TableHead>
<TableBody>
{showData.map((row) => (
<DpTableRow key={row.id}>
<DpTableCell component="th" scope="row">
<DpTableRow key={row.id} onClick={() => flyTo(row)}>
<DpTableCell align="center">
<div
className="table-ellipsis cursor-pointer"
>{row.id}</div>
>{row.date}</div>
</DpTableCell>
<DpTableCell component="th" scope="row">
<div
className="table-ellipsis cursor-pointer"
// onClick={() => flyTo(row)}
>{row.kd}</div>
</DpTableCell>
<DpTableCell align="center">{row.ll}</DpTableCell>
<DpTableCell align="center">{row.cl}</DpTableCell>
<DpTableCell align="center">{row.event}</DpTableCell>
<DpTableCell align="center">{row.type}</DpTableCell>
<DpTableCell align="center">{row.place}</DpTableCell>
<DpTableCell align="center">{row.status}</DpTableCell>
{/* {rzRender(row.rz, row.grz)}
{rzRender(row.rz, row.wrz)} */}
</DpTableRow>

View File

@ -0,0 +1,90 @@
.tm{
width: 40%;
display: flex;
justify-content: center;
font-size: 14px;
font-weight: 400;
border-radius: 2px;
color: #fff;
background: linear-gradient(270deg,rgba(65,76,217,.4),rgba(58,85,218,.2) 14%,rgba(54,90,218,0) 49%,rgba(51,94,218,.2) 86%,rgba(44,102,219,.4));
border: 1px solid #0e4e93;
.MuiInput-underline:before{
border: 0px;
}
.time-picker{
.ant-picker-input > input{
color: #fff;
}
.ant-picker-separator{
color: #fff;
}
}
}
.time-type {
margin-left: 10rem;
display: flex;
cursor: pointer;
background-color: #393e45;
border-radius: 5%;
padding: 0.01% !important;
border: 1px solid #585e64;
div {
width: 80px;
border-radius: 5%;
text-align: center;
border: 1px solid #585e64;
padding: 4px 0;
}
.active {
color: #5FB7FF;
// background: #F0F7FF;
border: 1px solid #5FB7FF;
}
}
.ant-picker-panel-container{
background-color: rgba(36, 46, 92,1) !important;
}
.ant-picker-header,.ant-picker-body{
color: #fff !important;
border-color: #242e5c;
}
.ant-picker-content th{
color: #fff !important;
}
.ant-picker-cell,
.ant-picker-header-super-prev-btn,
.ant-picker-header-prev-btn,
.ant-picker-header-next-btn,
.ant-picker-header-super-next-btn
{
color: #fff !important;
}
.ant-picker-cell:hover:not(.ant-picker-cell-selected):not(.ant-picker-cell-range-start):not(.ant-picker-cell-range-end):not(.ant-picker-cell-range-hover-start):not(.ant-picker-cell-range-hover-end) .ant-picker-cell-inner{
// background: transparent !important;
color: #000;
}
.ant-picker-cell-in-view.ant-picker-cell-in-range::before,
.ant-picker-cell-in-view.ant-picker-cell-range-end:not(.ant-picker-cell-range-end-single)::before,
.ant-picker-cell-in-view.ant-picker-cell-range-start:not(.ant-picker-cell-range-start-single)::before
{
background-color:transparent !important;
}
.ant-picker-time-panel-column > li.ant-picker-time-panel-cell-selected .ant-picker-time-panel-cell-inner{
background-color: #1890ff !important;
}
.ant-picker-time-panel-column > li.ant-picker-time-panel-cell .ant-picker-time-panel-cell-inner:hover{
// background-color:transparent !important;
color: #000 !important;
}
.ant-picker-header-super-next-btn,.ant-picker-time-panel-cell-inner
{
color: #fff !important;
}

View File

@ -1,4 +1,4 @@
import React, { useMemo, useState } from 'react';
import React, { useMemo, useState,useEffect } from 'react';
import useRequest from '../../../../utils/useRequest';
import PanelBox from '../../components/PanelBox';
@ -18,6 +18,8 @@ import Setting from './Setting';
import { InfoPopNames } from '../../InfoPops';
import config from '../../../../config';
import moment from 'moment';
import { DatePicker } from 'antd';
const { RangePicker } = DatePicker;
function rzRender(rz, base) {
return (
@ -53,14 +55,12 @@ function HDReal({ style }) {
// }, [data, tableRzFilter]);
const randomMinutes = Math.floor(Math.random() * 60) + 1;
const format = 'YYYY-MM-DD HH:mm';
const showData = Array(10).fill(0).map((o,i) => ({
id: `#${i + 1}`,
time: moment()
.subtract(i * 60 + randomMinutes, 'minutes')
.format(format),
cl: "--",
kd: (Math.random() * 100).toFixed(0),
ll:(Math.random() * 100).toFixed(0)
const showData = Array(1).fill(0).map((o,i) => ({
date: '2025-05-26',
event: '东干渠巡查',
type: '2',
status: '已完成',
place:'1'
}))
const flyTo = (record) => {
@ -83,11 +83,35 @@ function HDReal({ style }) {
const toggleAutoRefresh = () => {
dispatch.realview.setHdAutoRefresh(!hdAutoRefresh);
}
const [params, setParams] = useState({ tm: [] })
const searchTm = (e) => {
setParams({
...params,
stm: e[0].format("YYYY-MM-DD HH:mm"),
etm: e[1].format("YYYY-MM-DD HH:mm"),
tm:e,
})
};
useEffect(() => {
let options = "";
options = {
etm: moment().add(1, 'hour').set({minute: 0, second: 0}).format("YYYY-MM-DD HH:mm"),
stm: moment().subtract(7, 'days').add(1, 'hour').set({minute: 0, second: 0}).format("YYYY-MM-DD HH:mm"),
tm: [
moment().subtract(7, 'days').add(1, 'hour').set({ minute: 0, second: 0 }),
moment().add(1, 'hour').set({ minute: 0, second: 0 }),
],
}
setParams(options)
}, [])
return (
<PanelBox
style={style}
title="本月水政巡查问题统计"
title="水政巡查"
color="green"
// tabs={
// <span className="button-group">
@ -102,37 +126,50 @@ function HDReal({ style }) {
</>
}
>
<TableContainer style={{ height: '100%' }}>
<div className='tm' style={{position:"relative",zIndex:999999,color:"#fff",width:"60%",margin:'10px'}}>
<RangePicker
// width="100%"
className='time-picker'
style={{
flex:1,
background: "transparent",
border: "none",
color: "#fff",
}}
onChange={searchTm}
allowClear
format="YYYY-MM-DD HH:mm"
showTime={{
format: 'HH:mm',
}}
value={params.tm}
getPopupContainer={trigger => trigger.parentElement}
/>
</div>
<img src={`${process.env.PUBLIC_URL}/assets/pie.png`} alt="" style={{ width: 421, height: '50%' }} />
<TableContainer style={{ height: '50%',marginTop:'10px' }}>
<Table size="small" stickyHeader>
<TableHead>
<TableRow>
<DpTableCell style={{ width: '35%' }} align="left">日期</DpTableCell>
<DpTableCell style={{ width: '12%' }} align="left">管理单位</DpTableCell>
<DpTableCell align="center" style={{ width: '12%' }}>问题类型</DpTableCell>
<DpTableCell align="center" style={{ width: '12%' }}>处理状态</DpTableCell>
<DpTableCell align="center" style={{ width: '12%' }}>问题描述</DpTableCell>
<DpTableCell align="center" style={{ width: '12%' }}>操作</DpTableCell>
{/* <DpTableCell align="right">警戒水位</DpTableCell> */}
<TableRow >
<DpTableCell style={{ width: '20%' }} align="center">日期</DpTableCell>
<DpTableCell style={{ width: '20%' }} align="center">巡检名称</DpTableCell>
<DpTableCell align="center" style={{ width: '20%' }}>发现问题数</DpTableCell>
<DpTableCell align="center" style={{ width: '20%' }}>未处理问题数</DpTableCell>
<DpTableCell align="center" style={{ width: '20%' }}>执行状态</DpTableCell>
</TableRow>
</TableHead>
<TableBody>
{showData.map((row) => (
<DpTableRow key={row.id}>
<DpTableCell component="th" scope="row">
<DpTableRow key={row.id} onClick={() => flyTo(row)}>
<DpTableCell align="center">
<div
className="table-ellipsis cursor-pointer"
>{row.time}</div>
>{row.date}</div>
</DpTableCell>
<DpTableCell component="th" scope="row">
<div
className="table-ellipsis cursor-pointer"
// onClick={() => flyTo(row)}
>{row.cl}</div>
</DpTableCell>
<DpTableCell align="center">{row.cl}</DpTableCell>
<DpTableCell align="center">{row.cl}</DpTableCell>
<DpTableCell align="center">{row.cl}</DpTableCell>
<DpTableCell align="center">{row.cl}</DpTableCell>
<DpTableCell align="center">{row.event}</DpTableCell>
<DpTableCell align="center">{row.type}</DpTableCell>
<DpTableCell align="center">{row.place}</DpTableCell>
<DpTableCell align="center">{row.status}</DpTableCell>
{/* {rzRender(row.rz, row.grz)}
{rzRender(row.rz, row.wrz)} */}
</DpTableRow>

View File

@ -24,7 +24,7 @@ const data = [
"vtavslm": null,
"slmAvg": 24.5
},
"lttd": 30.8456 -0.2002,
"lttd": 30.8456 +0.2002,
"sttp": "SS",
"irrCode": "D00000010",
"sort": 9999,
@ -34,7 +34,7 @@ const data = [
"stcd": "ZH201417",
"stnm": "马山二组(墒情)",
"addvcd_dictText": "荆门市",
"lgtd": 112.2321 -2.9619,
"lgtd": 112.2321 +2.9619,
"irrCode_dictText": "漳河实验站",
"bsnm": "漳河流域"
},
@ -63,7 +63,7 @@ const data = [
"vtavslm": null,
"slmAvg": 13.7
},
"lttd": 30.8446 -0.2002,
"lttd": 30.8446 +0.2002,
"sttp": "SS",
"irrCode": "D00000010",
"sort": 9999,
@ -73,7 +73,7 @@ const data = [
"stcd": "ZH201421",
"stnm": "槐桥四组(墒情)",
"addvcd_dictText": "荆门市",
"lgtd": 112.203 -2.9619,
"lgtd": 112.203 +2.9619,
"irrCode_dictText": "漳河实验站",
"bsnm": "漳河流域"
},
@ -101,7 +101,7 @@ const data = [
"vtavslm": null,
"slmAvg": 14.5
},
"lttd": 30.8866 -0.2002,
"lttd": 30.8866 +0.2002,
"sttp": "SS",
"irrCode": "D00000010",
"sort": 9999,
@ -111,7 +111,7 @@ const data = [
"stcd": "ZH201418",
"stnm": "双碑一组(墒情)",
"addvcd_dictText": "荆门市",
"lgtd": 112.2006 -2.9619,
"lgtd": 112.2006 +2.9619,
"irrCode_dictText": "漳河实验站",
"bsnm": "漳河流域"
},
@ -140,7 +140,7 @@ const data = [
"vtavslm": null,
"slmAvg": 33.4
},
"lttd": 30.904191 -0.2002,
"lttd": 30.904191 +0.2002,
"sttp": "SS",
"irrCode": "D00000010",
"sort": 9999,
@ -149,7 +149,7 @@ const data = [
"stcd": "4211221031",
"stnm": "试验站墒情",
"addvcd_dictText": "荆门市",
"lgtd": 112.087806 -2.9619,
"lgtd": 112.087806 +2.9619,
"irrCode_dictText": "漳河实验站",
"bsnm": "漳河流域"
}

View File

@ -105,6 +105,7 @@ function HDReal({ style }) {
// }))
const flyTo = (record) => {
dispatch.map.setLayerVisible({'TrsqLayer':true})
const { lgtd, lttd } = record;
if (lgtd && lttd) {
dispatch.runtime.setFeaturePop({ type: '墒情站', properties: record, coordinates: [lgtd, lttd] });

View File

@ -116,24 +116,35 @@ export default function OverallContent({ data }) {
return (
<div className={classes.root}>
<div className={classes.grid}>
<div style={{padding:20, background: "linear-gradient(to bottom, #001529, #003366)"}}>
<div className="value" style={{color:'#5ecd45'}}>2</div>
<div className="key" style={{color:'#fff',fontSize:16}}>本月维护</div>
<div className={classes.grid} style={{flexWrap:'wrap'}}>
<div style={{padding:10, background: "linear-gradient(to bottom, #001529, #003366)"}}>
<div className="value" style={{color:'#5ecd45'}}>35</div>
<div className="key" style={{color:'#fff',fontSize:16}}>累计巡查次数</div>
</div>
<div style={{padding:20, background: "linear-gradient(to bottom, #001529, #003366)"}}>
<div className="value" style={{color:'#5ecd45'}}>5</div>
<div className="key" style={{color:'#fff',fontSize:16}}>本年维护</div>
<div style={{padding:10, background: "linear-gradient(to bottom, #001529, #003366)"}}>
<div className="value" style={{color:'#5ecd45'}}>35</div>
<div className="key" style={{color:'#fff',fontSize:16}}>累计维护次数</div>
</div>
<div style={{padding:20, background: "linear-gradient(to bottom, #001529, #003366)"}}>
<div style={{padding:10, background: "linear-gradient(to bottom, #001529, #003366)"}}>
<div className="value" style={{color:'#5ecd45'}}>35</div>
<div className="key" style={{color:'#fff',fontSize:16}}>累计问题次数</div>
</div>
<div style={{padding:10, background: "linear-gradient(to bottom, #001529, #003366)"}}>
<div
className="value"
style={{ cursor: 'pointer',color:'#ba292a' }}
// onClick={() => showRecord(h24?.max)}
style={{ cursor: 'pointer',color:'#5ecd45' }}
>
1
15
</div>
<div className="key" style={{color:'#fff',fontSize:16}}>未处理异常</div>
<div className="key" style={{color:'#fff',fontSize:16}}>本月巡查次数</div>
</div>
<div style={{padding:10, background: "linear-gradient(to bottom, #001529, #003366)"}}>
<div className="value" style={{color:'#5ecd45'}}>15</div>
<div className="key" style={{color:'#fff',fontSize:16}}>本月维护次数</div>
</div>
<div style={{padding:10, background: "linear-gradient(to bottom, #001529, #003366)"}}>
<div className="value" style={{color:'#5ecd45'}}>15</div>
<div className="key" style={{color:'#fff',fontSize:16}}>本月问题次数</div>
</div>
</div>
</div>

View File

@ -11,7 +11,7 @@ export default function Overall({ style }) {
return (
<PanelBox
style={style}
title="维护统计"
title="巡查维护统计"
color="green"
>
<OverallContent data={data} />

View File

@ -46,10 +46,9 @@ function HDReal({ style }) {
});
}
}
const [type, setType] = useState('xc')
const toggleStType = (type) => {
const visible = !tableRzFilter[type];
dispatch.realview.setTableRzFilter({ [type]: visible });
setType(type)
}
const randomMinutes = Math.floor(Math.random() * 60) + 1;
const format = 'YYYY-MM-DD HH:mm';
@ -69,13 +68,23 @@ const givenNames = [
const givenName = givenNames[Math.floor(Math.random() * givenNames.length)];
return familyName + givenName;
};
const showData = Array(2).fill(0).map((o, i) => ({
const showData = Array(1).fill(0).map((o, i) => ({
id:i + 1,
time: moment()
.subtract(i * 60 + randomMinutes, 'minutes')
.format(format),
status:0,
name:generateRandomName()
time: '2025-5-26',
name: '渠首闸巡查',
fxwt:1,
wfxwt: 1,
status:'未完成',
}))
const wData = Array(1).fill(0).map((o, i) => ({
id:i + 1,
time: '2025-5-26',
name: '渠首闸维护',
obj:'渠首闸',
fxwt:1,
wfxwt: 1,
status:'未完成',
}))
const toggleAutoRefresh = () => {
@ -87,14 +96,14 @@ const showData = Array(2).fill(0).map((o, i) => ({
return (
<PanelBox
style={style}
title="本月维护记录"
title="统计分析"
color="green"
// tabs={
// <span className="button-group">
// <span className={clsx({ active: tableRzFilter.sh })} onClick={() => toggleStType('sh')}>山洪</span>
// <span className={clsx({ active: tableRzFilter.sw })} onClick={() => toggleStType('sw')}>水文</span>
// </span>
// }
tabs={
<span className="button-group">
<span className={clsx({ active: type=='xc' })} onClick={() => toggleStType('xc')}>巡查</span>
<span className={clsx({ active: type=='wh' })} onClick={() => toggleStType('wh')}>维护</span>
</span>
}
extra={
<>
<i style={{ marginRight: '0.5rem', color: hdAutoRefresh ? '#00deff' : '#aaa' }} className="ionicons loop cursor-pointer" onClick={toggleAutoRefresh}></i>
@ -102,13 +111,16 @@ const showData = Array(2).fill(0).map((o, i) => ({
</>
}
>
<TableContainer style={{ height: '100%' }}>
{
type == 'xc' ?<TableContainer style={{ height: '100%' }}>
<Table size="small" stickyHeader>
<TableHead>
<TableRow>
<DpTableCell style={{ width: '50%' }} align="left">维护完成日期</DpTableCell>
<DpTableCell style={{ width: '20%' }} align="left">维护人</DpTableCell>
<DpTableCell align="center" style={{ width: '30%' }}>异常项次</DpTableCell>
<DpTableCell style={{ width: '20%' }} align="center">日期</DpTableCell>
<DpTableCell style={{ width: '20%' }} align="center">巡查名称</DpTableCell>
<DpTableCell align="center" style={{ width: '20%' }}>发现问题数</DpTableCell>
<DpTableCell align="center" style={{ width: '20%' }}>未发现问题数</DpTableCell>
<DpTableCell align="center" style={{ width: '20%' }}>执行状态</DpTableCell>
{/* <DpTableCell align="center" style={{ width: '40%' }}>监测时间</DpTableCell> */}
{/* <DpTableCell align="right">警戒水位</DpTableCell> */}
</TableRow>
@ -127,6 +139,47 @@ const showData = Array(2).fill(0).map((o, i) => ({
// onClick={() => flyTo(row)}
>{row.name}</div>
</DpTableCell>
<DpTableCell align="center">{row.fxwt}</DpTableCell>
<DpTableCell align="center">{row.wfxwt}</DpTableCell>
<DpTableCell align="center">{row.status}</DpTableCell>
{/* <DpTableCell align="center">{row.time}</DpTableCell> */}
{/* {rzRender(row.rz, row.grz)}
{rzRender(row.rz, row.wrz)} */}
</DpTableRow>
))}
</TableBody>
</Table>
</TableContainer> :
<TableContainer style={{ height: '100%' }}>
<Table size="small" stickyHeader>
<TableHead>
<TableRow>
<DpTableCell style={{ width: '25%' }} align="center">日期</DpTableCell>
<DpTableCell style={{ width: '25%' }} align="center">维护名称</DpTableCell>
<DpTableCell align="center" style={{ width: '25%' }}>维护对象</DpTableCell>
<DpTableCell align="center" style={{ width: '25%' }}>执行状态</DpTableCell>
{/* <DpTableCell align="center" style={{ width: '20%' }}>执行状态</DpTableCell> */}
{/* <DpTableCell align="center" style={{ width: '40%' }}>监测时间</DpTableCell> */}
{/* <DpTableCell align="right">警戒水位</DpTableCell> */}
</TableRow>
</TableHead>
<TableBody>
{wData.map((row) => (
<DpTableRow key={row.id}>
<DpTableCell component="th" scope="row">
<div
className="table-ellipsis cursor-pointer"
>{row.time}</div>
</DpTableCell>
<DpTableCell component="th" scope="row">
<div
className="table-ellipsis cursor-pointer"
// onClick={() => flyTo(row)}
>{row.name}</div>
</DpTableCell>
{/* <DpTableCell align="center">{row.fxwt}</DpTableCell>
<DpTableCell align="center">{row.wfxwt}</DpTableCell> */}
<DpTableCell align="center">{row.obj}</DpTableCell>
<DpTableCell align="center">{row.status}</DpTableCell>
{/* <DpTableCell align="center">{row.time}</DpTableCell> */}
{/* {rzRender(row.rz, row.grz)}
@ -136,6 +189,7 @@ const showData = Array(2).fill(0).map((o, i) => ({
</TableBody>
</Table>
</TableContainer>
}
{
setting && <Setting onClose={() => showSetting(false)} />
}

View File

@ -88,7 +88,7 @@ const showData = Array(30).fill(0).map((o, i) => ({
return (
<PanelBox
style={style}
title="待处理维护清单"
title="待处理问题清单"
color="green"
// tabs={
// <span className="button-group">

View File

@ -18,6 +18,7 @@ import Setting from './Setting';
import { InfoPopNames } from '../../InfoPops';
import config from '../../../../config';
import moment from 'moment';
import {Empty} from 'antd'
// import showData from './constant'
function rzRender(rz, base) {
return (
@ -31,6 +32,7 @@ function HDReal({ style }) {
const dispatch = useDispatch();
const tableRzFilter = useSelector(s => s.realview.tableRzFilter);
const hdAutoRefresh = useSelector(s => s.realview.hdAutoRefresh);
const yyRes = useSelector(s => s.runtime.yyObj);
const t = useRefresh(hdAutoRefresh ? 60 * 1000 : 0);
// let { data } = useRequest(HDRealPromise.get, t);
const [setting, showSetting] = useState(false);
@ -128,7 +130,9 @@ function HDReal({ style }) {
</>
}
>
<TableContainer style={{ height: '100%' }}>
{
yyRes.yy ? <>
<TableContainer style={{ height: '100%' }}>
<Table size="small" stickyHeader>
<TableHead>
<TableRow>
@ -212,6 +216,9 @@ function HDReal({ style }) {
</Table>
</TableContainer>
</> :
<Empty description={<span style={{color:"#fff"}}>暂无数据</span>}/>
}
{
setting && <Setting onClose={() => showSetting(false)} />
}

View File

@ -1,5 +1,5 @@
import clsx from 'clsx';
import React,{useState} from 'react';
import React,{useState,useEffect} from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { hdyjUnclose } from '../../../../models/_/hdyj';
import { OverallPromise } from '../../../../models/_/real';
@ -16,12 +16,15 @@ import ShYj from './ShYj';
import { styled } from '@material-ui/styles';
import { RadioGroup, FormControlLabel, Radio, FormControl, FormLabel } from '@material-ui/core/index';
import { backgroundColor } from 'echarts/lib/theme/dark';
import { Description } from '@material-ui/icons';
import DescriptionItem from '../../components/DescrptionItem';
import { log } from '@craco/craco/lib/logger';
export default function Warn({ style }) {
const [value, setValue] = React.useState('');
const handleChange = (event) => {
setValue(event.target.value);
};
const dispatch = useDispatch();
const res = useSelector(s=>s.runtime.yyObj)
const [value, setValue] = React.useState(res.yy ?? '');
const [yyValue, setYyValue] = React.useState(false);
const StyledFormControlLabel = styled(FormControlLabel)({
display: 'flex',
// justifyContent: 'space-around',
@ -36,14 +39,25 @@ const [value, setValue] = React.useState('');
color: '#fff',
padding: '4px'
}
});
});
const fayy = () => {
setYyValue(true)
if (value) {
dispatch.runtime.setYyfa({yy:value})
}
}
useEffect(() => {
setValue(res.yy)
}, [res])
return (
<PanelBox
style={style}
style={{...style,position:'relative'}}
title="预演方案"
color="green"
tabs={
<span style={{marginLeft:'70%', cursor:'pointer',color:'#0066e4',padding:'4px 6px', border:'1px solid #175898'}}>方案预演</span>
<span style={{marginLeft:'70%', cursor:'pointer',color:'#0066e4',padding:'4px 6px', border:'1px solid #175898'}} onClick={fayy}>方案预演</span>
}
>
<div >
@ -57,7 +71,20 @@ const [value, setValue] = React.useState('');
<StyledFormControlLabel value="2025003" control={<Radio />} label="2025003预案" style={{color:"#fff"}}/>
</RadioGroup>
</FormControl>
</div>
{res.yy && <div style={{ color: "#fff", position: 'absolute', top: 100, left: '-450px' }}>
<div style={{ background: '#020c2b',padding:'5px 10px',opacity:1 }}>
<div style={{color:'#c5d02c',fontSize:20}}>最大淹没范围</div>
<div style={{display:'flex',columnGap:10}}>
<span>淹没耕地:1824.8(公顷)</span>
<span>淹没面积:48.9(平方公里)</span>
</div>
<span>淹没人口:3.211(万人)</span>
</div>
<div>
<img src={`${process.env.PUBLIC_URL}/assets/sl.jpg`} alt="" style={{ width: 421}} />
</div>
</div>}
</div>
</PanelBox>
)
}