diff --git a/src/service/apiurl.js b/src/service/apiurl.js
index 8c63985d5..387ca0b9a 100644
--- a/src/service/apiurl.js
+++ b/src/service/apiurl.js
@@ -413,7 +413,10 @@ const apiurl = {
edit: service_fxdd + "/termite/survey/update",
delete: service_fxdd + "/termite/survey/del",
detail: service_fxdd + "/termite/survey/detail",
- dictionary:service_fxdd + "/sysDictB/listByCd"
+ dictionary: service_fxdd + "/sysDictB/listByCd",
+ allCd: service_fxdd + '/termite/survey/list/allOrder',
+ historyPage: service_fxdd + '/termite/survey/detail',
+ process:service_fxdd + '/termite/survey/process'
},
fzxc: {
page: service_fxdd + "/termite/adver/file/page",
diff --git a/src/views/Home/MapCtrl/Markers/ShuiKuLayer.js b/src/views/Home/MapCtrl/Markers/ShuiKuLayer.js
index ca20e2945..fca29726a 100644
--- a/src/views/Home/MapCtrl/Markers/ShuiKuLayer.js
+++ b/src/views/Home/MapCtrl/Markers/ShuiKuLayer.js
@@ -96,7 +96,7 @@ export default class ShuiKuLayer extends BaseLayer {
// }
- const list = data.filter(o=>o.stnm==='檀树岗' || o.stnm==='檀树岗(新)')
+ const list = data.filter(o=>o.stcd==="61610700" || o.stcd==="10818")
.map((i) => {
return {
id : i.stcd,
@@ -104,7 +104,6 @@ export default class ShuiKuLayer extends BaseLayer {
...i
}
})
-
this._dispatch.runtime.setMarkers({
[this.getLayerName()]: list || []
});
diff --git a/src/views/Home/MapCtrl/Pops/ShenLiu/drpOption.js b/src/views/Home/MapCtrl/Pops/ShenLiu/drpOption.js
index a8487ff29..bf7393ac5 100644
--- a/src/views/Home/MapCtrl/Pops/ShenLiu/drpOption.js
+++ b/src/views/Home/MapCtrl/Pops/ShenLiu/drpOption.js
@@ -47,7 +47,7 @@ export default function drpOption(data,yjData) {
{
type: 'category',
data: data.map(o => o.tm),
- inverse: false,
+ inverse: true,
splitLine: {
show: false
},
diff --git a/src/views/Home/MapCtrl/Pops/ShenYa/drpOption.js b/src/views/Home/MapCtrl/Pops/ShenYa/drpOption.js
index 136e632f1..7fb7368dc 100644
--- a/src/views/Home/MapCtrl/Pops/ShenYa/drpOption.js
+++ b/src/views/Home/MapCtrl/Pops/ShenYa/drpOption.js
@@ -47,7 +47,7 @@ export default function drpOption(data,yjData) {
{
type: 'category',
data: data.map(o => o.tm),
- inverse: false,
+ inverse: true,
splitLine: {
show: false
},
diff --git a/src/views/Home/MapCtrl/Pops/WeiYi/TableData.js b/src/views/Home/MapCtrl/Pops/WeiYi/TableData.js
index eff5e41e9..c16f66cb9 100644
--- a/src/views/Home/MapCtrl/Pops/WeiYi/TableData.js
+++ b/src/views/Home/MapCtrl/Pops/WeiYi/TableData.js
@@ -3,14 +3,14 @@ import React, {useEffect, useState} from 'react';
import moment from 'moment'
-const Tabledata = ({tableData}) => {
+const Tabledata = ({ tableData }) => {
const columns = [
{ title: '序号', key: '', dataIndex: '', align: 'center',render:(a,b,c)=>c+1},
{ title: '时间', key: 'tm', dataIndex: 'tm', align: 'center',render: (rec) => {rec ?? "-"} },
{ title: '库水位(m)', key: 'rz', dataIndex: 'rz', align: 'center',render: (rec) => {rec ?? "-"} },
- { title: 'X方向位移(mm)', key: 'x', dataIndex: 'x', align: 'center',render: (rec) => {rec ?? "-"}},
- { title: 'Y方向位移(mm)', key: 'y', dataIndex: 'y', align: 'center',render: (rec) => {rec ?? "-"}},
- { title: 'H方向位移(mm)', key: 'h', dataIndex: 'h', align: 'center',render: (rec) => {rec ?? "-"}},
+ { title: 'X方向位移(mm)', key: 'de', dataIndex: 'de', align: 'center',render: (rec) => {rec ?? "-"}},
+ { title: 'Y方向位移(mm)', key: 'dn', dataIndex: 'dn', align: 'center',render: (rec) => {rec ?? "-"}},
+ { title: 'H方向位移(mm)', key: 'du', dataIndex: 'du', align: 'center',render: (rec) => {rec ?? "-"}},
];
diff --git a/src/views/Home/MapCtrl/Pops/WeiYi/drpOption.js b/src/views/Home/MapCtrl/Pops/WeiYi/drpOption.js
index 9af0d8484..232d44289 100644
--- a/src/views/Home/MapCtrl/Pops/WeiYi/drpOption.js
+++ b/src/views/Home/MapCtrl/Pops/WeiYi/drpOption.js
@@ -1,7 +1,7 @@
export default function drpOption(data,yjData) {
console.log("data",data);
- const max1 = Math.max(...[...data.map(obj => obj.x),...data.map(obj => obj.y),...data.map(obj => obj.h),...yjData.map(obj => obj.value)])
- const min1 = Math.min(...[...data.map(obj => obj.x),...data.map(obj => obj.y),...data.map(obj => obj.h),...yjData.map(obj => obj.value)])
+ const max1 = Math.max(...[...data.map(obj => obj.de),...data.map(obj => obj.dn),...data.map(obj => obj.du),...yjData.map(obj => obj.value)])
+ const min1 = Math.min(...[...data.map(obj => obj.de),...data.map(obj => obj.dn),...data.map(obj => obj.du),...yjData.map(obj => obj.value)])
const max2 = Math.max(...data.map(obj => obj.rz))
const min2 = Math.min(...data.map(obj => obj.rz))
@@ -49,7 +49,7 @@ export default function drpOption(data,yjData) {
{
type: 'category',
data: data.map(o => o.tm),
- inverse: false,
+ inverse: true,
splitLine: {
show: false
},
@@ -75,7 +75,7 @@ export default function drpOption(data,yjData) {
// gridIndex: 1,
type: 'value',
position: 'left',
- name: "位移(m)",
+ name: "位移(mm)",
nameTextStyle: {
padding: [0, 0, 10, 10],
color:'#333333',
diff --git a/src/views/Home/MapCtrl/Pops/WeiYi/index.js b/src/views/Home/MapCtrl/Pops/WeiYi/index.js
index c355605e2..6af84fd08 100644
--- a/src/views/Home/MapCtrl/Pops/WeiYi/index.js
+++ b/src/views/Home/MapCtrl/Pops/WeiYi/index.js
@@ -88,7 +88,7 @@ function ShenYa({ id, data, dispatch, onCancel }) {
- {data.stationCode}
+ {data.cdnm}
diff --git a/src/views/Home/homePanelsLayoutPage/index.js b/src/views/Home/homePanelsLayoutPage/index.js
index 132ac12cf..e05ea4aaf 100644
--- a/src/views/Home/homePanelsLayoutPage/index.js
+++ b/src/views/Home/homePanelsLayoutPage/index.js
@@ -677,7 +677,7 @@ const HomePage = ({ showPanels }) => {
>
{
item.children.map((item) =>
-
{
+ {
// 清空搜索输入框
setSearchVal('')
setCheckedObj(item)
@@ -699,7 +699,7 @@ const HomePage = ({ showPanels }) => {
: null
}
-
+
)
}
diff --git a/src/views/Home/homePanelsLayoutPage/item_daba.js b/src/views/Home/homePanelsLayoutPage/item_daba.js
index 50e934797..1aff78cb2 100644
--- a/src/views/Home/homePanelsLayoutPage/item_daba.js
+++ b/src/views/Home/homePanelsLayoutPage/item_daba.js
@@ -40,50 +40,50 @@ const Page = () => {
return (
<>
-
+
建筑物型式:
{tableData.buildType}
-
-
+
+
地基特性:
{tableData.foundCharacter}
-
-
+
+
坝顶高程(m):
{tableData.damTopElev}
-
-
+
+
最大坝高(m):
{tableData.damMaxHeig}
-
-
+
+
坝顶长度(m):
{tableData.damTopLen}
-
-
+
+
坝顶宽度(m):
{tableData.damTopWid}
-
- {/*
+
+ {/*
防浪墙顶高程(m):
{tableData.damWaveWall}
-
-
+
+
开工日期:
{tableData?.startDate?.slice(0,10)}
-
-
+
+
竣工日期:
{tableData?.endDate?.slice(0,10)}
-
-
+
+
蓄水日期:
{tableData?.storageDate?.slice(0,10)}
- */}
- {/*
+ */}
+ {/*
{
@@ -120,10 +120,10 @@ const Page = () => {
/>
*/}
{/* */}
- {/*
+ {/* */}
>
)
diff --git a/src/views/Home/homePanelsLayoutPage/item_gongcheng.js b/src/views/Home/homePanelsLayoutPage/item_gongcheng.js
index 7b8929544..7044ed496 100644
--- a/src/views/Home/homePanelsLayoutPage/item_gongcheng.js
+++ b/src/views/Home/homePanelsLayoutPage/item_gongcheng.js
@@ -29,7 +29,7 @@ const Page = () => {
]
}else{
return [
- { title: '监测点', key: 'cd', dataIndex: 'cd',align: "center",width: 80, ellipsis: true },
+ { title: '监测点', key: 'cdnm', dataIndex: 'cdnm',align: "center",width: 80, ellipsis: true },
{ title: '监测时间', key: 'tm', dataIndex: 'tm',align: "center",width: 80, ellipsis: true, render:(v,row)=>{v?.slice(5,10)}
{v?.slice(11,16)}
},
{ title: , key: 'de', dataIndex: 'de',align: "center", ellipsis: true, render:(v,row)=>{v}
},
{ title: , key: 'dn', dataIndex: 'dn',align: "center", ellipsis: true, render:(v,row)=>{v}
},
diff --git a/src/views/Home/homePanelsLayoutPage/item_gongchengshuiku.js b/src/views/Home/homePanelsLayoutPage/item_gongchengshuiku.js
index 62b034e43..c1630121d 100644
--- a/src/views/Home/homePanelsLayoutPage/item_gongchengshuiku.js
+++ b/src/views/Home/homePanelsLayoutPage/item_gongchengshuiku.js
@@ -37,11 +37,11 @@ const Page = () => {
return (
<>
-
+
工程位置:
{tableData.resLoc}
-
-
+
+
水库规模:
{
{
@@ -53,51 +53,51 @@ const Page = () => {
9:'其他',
}[tableData.engScal]
}
-
-
+
+
主要功能:
{tableData.rsvFunction}
-
-
+
+
坝址以上流域面积(km²):
{getNum(tableData.watShedArea)}
-
-
+
+
总库容(万m³):
{getNum(tableData.totCap)}
-
-
+
+
校核洪水位(m):
{getNum(tableData.calFloodLev)}
-
-
+
+
设计洪水位(m):
{getNum(tableData.desFloodLev)}
-
-
+
+
正常蓄水位(m):
{getNum(tableData.normWatLev)}
-
-
+
+
汛限水位(m):
{getNum(tableData.flLowLimLev)}
-
-
+
+
死水位(m):
{getNum(tableData.deadLev)}
-
-
+
+
兴利库容(万m³):
{getNum(tableData.benResCap)}
-
-
+
+
死库容(万m³):
{getNum(tableData.deadCap)}
-
-
+
+
工程特性表:
setOpen(true)}>工程特性表详情
-
+
{/* 更多详情
*/}
diff --git a/src/views/Home/homePanelsLayoutPage/item_shuiku.js b/src/views/Home/homePanelsLayoutPage/item_shuiku.js
index be6309441..4a6dddd31 100644
--- a/src/views/Home/homePanelsLayoutPage/item_shuiku.js
+++ b/src/views/Home/homePanelsLayoutPage/item_shuiku.js
@@ -11,12 +11,12 @@ import Ykqk from './item_shuiku/yhqk'
const Page = () => {
const dispatch = useDispatch();
- const [ checked, setChecked ] = useState(0)
+ const [ checked, setChecked ] = useState(1)
const [data,setData] = useState([])
console.log('data',data);
useEffect(()=>{
dispatch.map.setLayerVisible({ ShuiKuLayer: true })
- dispatch.map.setLayerVisible({ HdswLayer: true })
+ dispatch.map.setLayerVisible({ HdswLayer: false })
getData()
return ()=>{
dispatch.map.setLayerVisible({ ShuiKuLayer: false })
@@ -27,7 +27,7 @@ const Page = () => {
const getData = async (params) => {
const data = await reservoirlist(params) || []
// const list = [...data.filter(o=>o.stnm==='檀树岗(新)'),...data.filter(o=>o.stnm!=='檀树岗(新)')]
- const list = [...data.filter(o=>o.stnm==='檀树岗'),...data.filter(o=>o.stnm==='檀树岗(新)')]
+ const list = [...data.filter(o=>o.stcd==="61610700"),...data.filter(o=>o.stcd==="10818")]
setData(list)
}
@@ -41,7 +41,7 @@ const Page = () => {
}
})
// const list2 = [...list.filter(o=>o.stnm==='檀树岗(新)'),...list.filter(o=>o.stnm!=='檀树岗(新)')]
- const list2 = [...list.filter(o=>o.stnm==='檀树岗'),...list.filter(o=>o.stnm==='檀树岗(新)')]
+ const list2 = [...list.filter(o=>o.stcd==="61610700"),...list.filter(o=>o.stcd==="10818")]
console.log('res',list2);
const data = list2[checked]
dispatch.runtime.setFeaturePop({
@@ -64,7 +64,7 @@ const Page = () => {
{
data.map((item,index)=>
-
setChecked(index)}>{item.stnm}
+
setChecked(index)}>{item.stnm}
)
}
diff --git a/src/views/Home/homePanelsLayoutPage/item_yihongdao.js b/src/views/Home/homePanelsLayoutPage/item_yihongdao.js
index 61eaa0df4..d2dde1877 100644
--- a/src/views/Home/homePanelsLayoutPage/item_yihongdao.js
+++ b/src/views/Home/homePanelsLayoutPage/item_yihongdao.js
@@ -30,38 +30,38 @@ const Page = () => {
return (
<>
-
+
型式:
{tableData.buildType}
-
-
+
+
堰顶高程(m):
{tableData.crestEle}
-
-
+
+
总净宽(m):
{tableData.netWidth}
-
-
+
+
最大单宽流量m³/(s·m):
{tableData.bwidQ}
-
-
+
+
消能方式:
{tableData.elimMethod}
-
-
+
+
消能防冲流量(m³/s):
{tableData.elimQ}
-
-
+
+
设计泄洪流量(m³/s):
{tableData.desQ}
-
-
+
+
校核泄洪流量(m³/s):
{tableData.caliQ}
-
+
>
)
diff --git a/src/views/Home/homePanelsLayoutPage/item_yujing/index.js b/src/views/Home/homePanelsLayoutPage/item_yujing/index.js
index fa7984389..f266f241e 100644
--- a/src/views/Home/homePanelsLayoutPage/item_yujing/index.js
+++ b/src/views/Home/homePanelsLayoutPage/item_yujing/index.js
@@ -6,14 +6,16 @@ import apiurl from "../../../../service/apiurl";
import moment from "moment";
import Table_qx from './table_qx'
import Table_wy from './table_wy'
+import Table_by from './table_by'
import Table_sl from './table_sl'
import Table_sy from './table_sy'
import Table_AI from './table_AI'
+import { useNavigate } from "react-router";
-const Page = ({mySetTms}) => {
- const [ dataObj, setDataObj ] = useState({})
+const Page = ({ mySetTms }) => {
+ const [dataObj, setDataObj] = useState({})
console.log(dataObj)
const [ open, setOpen ] = useState(false)
const [ key , setkey ] = useState('')
@@ -22,6 +24,8 @@ const Page = ({mySetTms}) => {
moment().format('YYYY-MM-DD HH:mm:ss'),
])
+
+
useEffect(()=>{
(async()=>{
const params = {
@@ -39,6 +43,7 @@ const Page = ({mySetTms}) => {
])
setDataObj(data)
})()
+
},[])
@@ -85,6 +90,11 @@ const Page = ({mySetTms}) => {
AI告警
+
{setOpen(true);setkey('白蚁告警')}}>
+
{dataObj.byWarn?.length || 0}处
+
白蚁告警
+
+
{
- {key}
+ {key == '白蚁告警' ? key + "(" + tms[0]?.slice(0,16) + "至" + tms[1]?.slice(0,16) + ')':key }
setOpen(false)} style={{color:"#333"}}/>
@@ -111,7 +121,8 @@ const Page = ({mySetTms}) => {
{ key==='位移告警'?
setOpen(false)}/>:null }
{ key==='渗压告警'?setOpen(false)}/>:null }
{ key==='渗流告警'?setOpen(false)}/>:null }
- { key==='AI告警'?:null }
+ {key === 'AI告警' ? : null}
+ { key==='白蚁告警'?setOpen(false)}/>:null }
diff --git a/src/views/Home/homePanelsLayoutPage/item_yujing/table_by.js b/src/views/Home/homePanelsLayoutPage/item_yujing/table_by.js
new file mode 100644
index 000000000..b8cd67b86
--- /dev/null
+++ b/src/views/Home/homePanelsLayoutPage/item_yujing/table_by.js
@@ -0,0 +1,56 @@
+import React, { Fragment, useRef, useMemo, useEffect, useState } from 'react';
+import { Table, Modal, message,Tag } from 'antd';
+import { CloseOutlined } from "@ant-design/icons";
+import usePageTable from '../../../../components/crud/usePageTable2'
+import { createCrudService } from '../../../../components/crud/_';
+
+import { httppost2 } from "../../../../utils/request";
+import apiurl from "../../../../service/apiurl";
+
+
+const Page = ({ data }) => {
+ const columns = [
+ { title: '序号', key: 'inx', dataIndex: 'inx', align: "center", render: (text, rec, index) => index + 1 },
+ { title: '最近报警时间', key: 'obDate', dataIndex: 'obDate', ellipsis: true },
+ { title: '测点编号', key: 'order', dataIndex: 'order' },
+ {
+ title: '有无白蚁',
+ dataIndex: 'status',
+ align: 'center',
+ key: 'status',
+ width: 100,
+ render: (text, record) => {
+ // 如果 isHarm 为 null 或 undefined,显示无
+ if (text == null) {
+ return 无;
+ }
+
+ // 如果 isHandle 为 null 或 undefined,当作 false 处理
+ const isHandle = record.isHandle ?? false;
+
+ return (
+
+ {!text ? '无' : '有'}
+
+ );
+ }
+ },
+ ];
+
+ return (
+
+ )
+}
+
+export default Page
diff --git a/src/views/gcaqjc/gcaqfx/jrx/jrxOptions.js b/src/views/gcaqjc/gcaqfx/jrx/jrxOptions.js
index f04eaf5c5..2c2f4b815 100644
--- a/src/views/gcaqjc/gcaqfx/jrx/jrxOptions.js
+++ b/src/views/gcaqjc/gcaqfx/jrx/jrxOptions.js
@@ -115,6 +115,12 @@ export default function jrxOptions(data = {}, type = "1",typeName='1') {
[85, data[alltype[3]]]
]
: []
+ const filteredArray = line.filter(subArray => {
+ return subArray.every(item => item !== null && item !== undefined);
+ });
+ console.log("line",line);
+
+
return {
toolbox: {
show: true,
@@ -377,7 +383,7 @@ export default function jrxOptions(data = {}, type = "1",typeName='1') {
lineStyle: {
color: '#5487FF',
},
- data: line
+ data: filteredArray
},
]
};
diff --git a/src/views/gcaqjc/gcaqyj/yhyj/index.js b/src/views/gcaqjc/gcaqyj/yhyj/index.js
index c8ac6d487..7caafc747 100644
--- a/src/views/gcaqjc/gcaqyj/yhyj/index.js
+++ b/src/views/gcaqjc/gcaqyj/yhyj/index.js
@@ -57,7 +57,8 @@ const Page = () => {
{record.valueTwo || ''}
},
- { title: '校验规则描述', key: 'ruleDesc', dataIndex: 'ruleDesc', width: 250, ellipsis: true,align:"center", },
+ { title: '校验规则描述', key: 'ruleDesc', dataIndex: 'ruleDesc', width: 250, ellipsis: true, align: "center", },
+ { title: '处理建议', key: 'resolveSuggest', dataIndex: 'resolveSuggest', width: 200, ellipsis: true, align:"center" },
];
diff --git a/src/views/gcaqjc/gcaqyj/yjgzpz/form.js b/src/views/gcaqjc/gcaqyj/yjgzpz/form.js
index 8416a0b13..1ed629d96 100644
--- a/src/views/gcaqjc/gcaqyj/yjgzpz/form.js
+++ b/src/views/gcaqjc/gcaqyj/yjgzpz/form.js
@@ -1,92 +1,92 @@
-import React,{useEffect,useState,useMemo} from 'react';
-import { Form, Button, Input, Row, Col, DatePicker, Upload,message,Image,Modal,Radio } from 'antd';
+import React, { useEffect, useState, useMemo } from 'react';
+import { Form, Button, Input, Row, Col, DatePicker, Upload, message, Image, Modal, Radio } from 'antd';
import { formItemLayout, btnItemLayout } from '../../../../components/crud/FormLayoutProps';
import apiurl from '../../../../service/apiurl';
import NormalSelect from '../../../../components/Form/NormalSelect';
import { httppost2 } from '../../../../utils/request';
import moment from 'moment';
-const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
+const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
const optionsType = [
{
label: "渗压监测",
- value:1
+ value: 1
},
{
label: "渗流监测",
- value:2
+ value: 2
},
{
- label:"位移监测",
- value:3
+ label: "位移监测",
+ value: 3
},
]
const optionsLevel = [
{
label: "黄色告警",
- value:1
+ value: 1
},
{
label: "红色告警",
- value:2
+ value: 2
},
]
const conditionOneType = [
{
label: ">",
- value:">"
+ value: ">"
},
{
label: "<",
- value:"<"
+ value: "<"
},
{
label: "=",
- value:"="
+ value: "="
},
{
label: ">=",
- value:">="
+ value: ">="
},
{
label: "<=",
- value:"<="
+ value: "<="
},
{
label: "!=",
- value:"!="
+ value: "!="
},
]
-
+
const condition = [
{
label: "且",
- value:1
+ value: 1
},
{
label: "或",
- value:2
+ value: 2
},
]
const wyOptions = [
{
label: "X方向",
- value:"x"
+ value: "x"
},
{
label: "Y方向",
- value:"y"
+ value: "y"
},
{
label: "H方向",
- value:"h"
+ value: "h"
},
]
- console.log("record",record);
+ console.log("record", record);
const [form] = Form.useForm();
const [staCodeList, setStaCodeList] = useState([])//渗压
const [Condition, setCondition] = useState("")
@@ -94,16 +94,16 @@ const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
const [slStacodeList, setSlStacodeList] = useState([])//渗流
const onFinish = (values) => {
values.valueOne = values.valueOne ? Number(values.valueOne) : ''
- values.valueTwo = values.valueTwo ? Number(values.valueTwo) : ''
+ values.valueTwo = values.valueTwo ? Number(values.valueTwo) : ''
if (mode === 'edit') {
values.id = record.id;
values.createTime = record.createTime
- onEdit(apiurl.gcaqjc.gcaqyj.yjgzpz.edit,values)
+ onEdit(apiurl.gcaqjc.gcaqyj.yjgzpz.edit, values)
}
if (mode === 'save') {
- onSave(apiurl.gcaqjc.gcaqyj.yjgzpz.save,values)
+ onSave(apiurl.gcaqjc.gcaqyj.yjgzpz.save, values)
}
-
+
}
const [codeList, setCodeList] = useState([])//位移
@@ -111,7 +111,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
const getwYCode = async () => {
try {
const res = await httppost2(apiurl.gcaqjc.sjtjcx.wycx.list)
- setCodeList(res.data.map(s=>({stationCode:s.cd,label:s.cdNm,value:s.cd})));//
+ setCodeList(res.data.map(s => ({ stationCode: s.cd, label: s.cdNm, value: s.cd })));//
} catch (error) {
console.log(error);
}
@@ -120,23 +120,23 @@ const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
const getSlCode = async () => {
try {
const res = await httppost2(apiurl.gcaqjc.sjtjcx.wycx.slList)
- setSlStacodeList(res.data.map(s=>({stationCode:s.dvcd,label:s.dvcd,value:s.dvcd})));
+ setSlStacodeList(res.data.map(s => ({ stationCode: s.dvcd, label: s.dvcd, value: s.dvcd })));
} catch (error) {
console.log(error);
}
}
- const getStationCode = async () => {
- try {
- const res = await httppost2(apiurl.gcaqjc.gcaqyj.yjgzpz.list)
- setStaCodeList(res.data.map(s=>({stationCode:s.dvcd,label:s.dvcd,value:s.dvcd})));
- } catch (error) {
- console.log(error);
+ const getStationCode = async () => {
+ try {
+ const res = await httppost2(apiurl.gcaqjc.gcaqyj.yjgzpz.list)
+ setStaCodeList(res.data.map(s => ({ stationCode: s.dvcd, label: s.dvcd, value: s.dvcd })));
+ } catch (error) {
+ console.log(error);
+ }
}
-}
-
- useEffect(()=>{
- if (mode !== "save" ) {
- // getFileInfo(record)
+
+ useEffect(() => {
+ if (mode !== "save") {
+ // getFileInfo(record)
setCondition(record?.condition)
setTypes(record.type)
}
@@ -149,10 +149,10 @@ const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
}, [])
useEffect(() => {
if (mode == "save") {
- form.setFieldValue("status", 1)
+ form.setFieldValue("status", 1)
}
}, [mode])
-
+
return (
<>
-
+
+
+
+
+
+
+
+
+
+ {
+ mode === 'view' ? null : (
+ <>
+
+
-
- >
- )
- }
+ '修改'}
+
+
+ >
+ )
+ }
>
);
diff --git a/src/views/gcaqjc/sjtjcx/czcx/dtOptions1.js b/src/views/gcaqjc/sjtjcx/czcx/dtOptions1.js
index 434c92f0a..d6bc6bdc6 100644
--- a/src/views/gcaqjc/sjtjcx/czcx/dtOptions1.js
+++ b/src/views/gcaqjc/sjtjcx/czcx/dtOptions1.js
@@ -11,7 +11,7 @@ export default function dtOption(doubleData) {
const textColor = '#666'
return {
title: {
- text: `${doubleData?.stationCode}测压管水位过程线`,
+ text: `${doubleData?.cd}测压管水位过程线`,
bottom: "5%",
left: "40%",
textStyle: {
@@ -26,7 +26,7 @@ const textColor = '#666'
show: true,
excludeComponents: ['toolbox'],
pixelRatio: 2,
- name:`${doubleData?.stationCode}测压管水位过程线`
+ name:`${doubleData?.cd}测压管水位过程线`
}
},
right: "20%",
@@ -144,7 +144,7 @@ const textColor = '#666'
series: [
{
- name: doubleData?.stationCode,
+ name: doubleData?.cd,
type: 'line',
yAxisIndex: 0,
symbol: 'circle',
diff --git a/src/views/rcgl/byfz/bypc/index.js b/src/views/rcgl/byfz/bypc/index.js
index 396b37fa6..5f84f6abb 100644
--- a/src/views/rcgl/byfz/bypc/index.js
+++ b/src/views/rcgl/byfz/bypc/index.js
@@ -1,51 +1,65 @@
-import React, { Fragment, useRef, useMemo,useEffect,useState } from 'react';
+import React, { Fragment, useRef, useMemo, useEffect, useState } from 'react';
import BasicCrudModal from '../../../../components/crud/BasicCrudModal';
-import { Table, Card, Modal, Form, Input, Button, Row,Col, Timeline, message, Tabs,Image,Tag } from 'antd';
-import {FileWordOutlined,FilePdfOutlined,FileZipOutlined,FileExcelOutlined } from '@ant-design/icons';
-import { useSelector } from 'react-redux';
+import { Table, Card, Modal, Form, Input, Button, Row, Col, Timeline, message, Tabs, Image, Tag } from 'antd';
+import { FileWordOutlined, FilePdfOutlined, FileZipOutlined, FileExcelOutlined } from '@ant-design/icons';
+import { useSelector, useDispatch } from 'react-redux';
import ToolBar from './toolbar';
import ModalForm from './form';
import apiurl from '../../../../service/apiurl';
import usePageTable from '../../../../components/crud/usePageTable2';
import { createCrudService } from '../../../../components/crud/_';
-import { httppost2 } from '../../../../utils/request';
-import {CrudOpRender_text} from '../../../../components/crud/CrudOpRender';
+import { httppost2, httpget2 } from '../../../../utils/request';
+import { CrudOpRender_text } from '../../../../components/crud/CrudOpRender';
+import PointHistory from './pointHistory';
+import PrecessForm from './precessForm'
import './index.less';
import moment from 'moment';
+// 引入OpenLayers相关依赖
+import Map from 'ol/Map';
+import View from 'ol/View';
+import TileLayer from 'ol/layer/Tile';
+import XYZSource from 'ol/source/XYZ';
+import * as proj from 'ol/proj';
+import Feature from 'ol/Feature';
+import Point from 'ol/geom/Point';
+import { Vector as VectorLayer } from 'ol/layer';
+import { Vector as VectorSource } from 'ol/source';
+import { Circle as CircleStyle, Fill, Stroke, Style, Text } from 'ol/style';
+import Overlay from 'ol/Overlay';
const url = "http://223.75.53.141:9100/gs-tsg"
const Page = () => {
const role = useSelector(state => state.auth.role);
const editBtn = role?.rule?.find(item => item.menuName == "编辑") || true;
- const viewBtn = role?.rule?.find(item => item.menuName == "查看")|| true;
+ const viewBtn = role?.rule?.find(item => item.menuName == "查看") || true;
const delBtn = role?.rule?.find(item => item.menuName == "删除") || true;
const initData = {
obDate: moment().format('YYYY-MM-DD')
}
-
- const [stats, setStats] = useState({
- total: 400,
- withMosquito: 14,
- withoutMosquito: 382,
- noData: 4
- });
- const surveyType = {
- 1: "日常检查排查",
- 2: "定期普查",
- 3:"专项调查"
- }
- const surveyWay = {
- 1: "人工排查法",
- 2: "引诱法",
- 3: "仪器探测法",
- 4:"其他"
- }
- const isHarm = {
- 0: "无危害",
- 1: "有危害",
- }
+ // 添加地图相关的状态和引用
+ const mapContainerRef = useRef(null);
+ const [map, setMap] = useState(null);
+ const [vectorLayer, setVectorLayer] = useState(null);
+ const [selectedFeature, setSelectedFeature] = useState(null);
+ const [popupOverlay, setPopupOverlay] = useState(null);
+ const popupRef = useRef(null);
+ // 在组件顶部的状态声明中添加一个新的状态
+ const [highlightLayer, setHighlightLayer] = useState(null);
+ // 点位弹框
+ const [modalVisible, setModalVisible] = useState(false)
+ const [detailPoint, setDetailPoint] = useState({})
+
+
+ // 白蚁处理弹框
+ const [precessVisible, setPrecessVisible] = useState(false)
+ const [mode, setMode] = useState('save')
+
+ const dispatch = useDispatch();
+
+
const refModal = useRef();
- const [searchVal, setSearchVal] = useState({...initData})
+ const [searchVal, setSearchVal] = useState({ ...initData })
const [count, setCount] = useState({})
+ const [allCdList, setAllCdList] = useState([])
// const columns = [
// { title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align: "center" },
// {title: '填报日期', key: 'reportDate', dataIndex: 'reportDate', width: 140,},
@@ -56,7 +70,7 @@ const Page = () => {
// {
// title: '普查方式', key: 'surveyWay', dataIndex: 'surveyWay', width: 200,
// render: (value) => {value ? surveyWay[value] : ''}
-
+
// },
// {
// title: '危害情况', key: 'isHarm', dataIndex: 'isHarm', width: 200,
@@ -83,43 +97,63 @@ const Page = () => {
dataIndex: 'obDate',
key: 'obDate',
width: 180,
- align:'center'
+ align: 'center'
},
{
title: '测点编号',
dataIndex: 'order',
key: 'order',
width: 120,
- align:'center'
+ align: 'center'
},
{
title: '有无白蚁',
dataIndex: 'status',
- align:'center',
+ align: 'center',
key: 'status',
width: 100,
- render:(text, record) => {
+ render: (text, record) => {
// 如果 isHarm 为 null 或 undefined,显示无
if (text == null) {
- return 无;
+ return 无;
}
-
+
// 如果 isHandle 为 null 或 undefined,当作 false 处理
const isHandle = record.isHandle ?? false;
-
+
return (
-
{!text ? '无' : '有'}
);
}
- }
+ },
+ {
+ title: '操作',
+ dataIndex: 'opreate',
+ key: 'opreate',
+ width: 120,
+ align: 'center',
+ render: (v, r) => {
+ let renderTag;
+ if (!r.isProcess && r.status == 1) {
+ renderTag = ;
+ }
+ if (r.hasInspectTask && r.jcskByRProcessVo) {
+ renderTag = ;
+ }
+ return (<>
+ {renderTag}
+
+ >)
+ }
+ },
];
const width = useMemo(() => columns.reduce((total, cur) => total + (cur.width), 0), [columns]);
-
+
const command = (type) => (params) => {
if (type === 'save') {
refModal.current.showSave();
@@ -131,18 +165,31 @@ const Page = () => {
refModal.current.onDeleteGet(apiurl.rcgl.byfz.bypc.delete + `/${params.id}`);
}
}
-
-
+
+
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.rcgl.byfz.bypc.page).find_noCode);
- /**
- * @description 处理成功的回调
- */
- const successCallback = () => {
- refresh()
+ /**
+ * @description 处理成功的回调
+ */
+ const successCallback = () => {
+ refresh()
}
-
+
+
+ // 表格操作栏 查看按钮回调
+ const viewDetail = (r) => {
+ setDetailPoint(r);
+ setModalVisible(true)
+ }
+// 表格操作栏 处理按钮回调
+ const handlerPrecess = (r,type) => {
+ setDetailPoint(r);
+ setPrecessVisible(true)
+ setMode(type)
+ }
+
// 获取白蚁统计数量
const getCount = async () => {
const params = {
@@ -157,82 +204,360 @@ const Page = () => {
setCount(res.data);
} catch (error) {
console.log(error);
-
+
}
}
+
+ // 获取白蚁所有测点
+ const getCdList = async (params) => {
+
+ try {
+ const res = await httppost2(apiurl.rcgl.byfz.bypc.allCd,params);
+ if (res.code == 200) {
+ setAllCdList(res.data);
+ // 添加标记点到地图
+ if (map && res.data && res.data.length > 0) {
+ addMarkersToMap(res.data);
+ }
+ }
+ } catch (error) {
+ console.log(error);
+
+ }
+ }
+
+ // 添加标记点到地图
+ const addMarkersToMap = (points) => {
+ if (!map) return;
+
+ // 如果已存在矢量图层,先移除
+ if (vectorLayer) {
+ map.removeLayer(vectorLayer);
+ }
+
+ // 创建矢量数据源
+ const vectorSource = new VectorSource();
+
+ // 遍历所有点位数据
+ points.forEach(point => {
+ // 确保点位有经纬度
+ if (point.lgtd && point.lttd) {
+ // 创建要素
+ const feature = new Feature({
+ geometry: new Point(proj.fromLonLat([point.lgtd, point.lttd])),
+ properties: point // 保存点位的所有属性
+ });
+
+ // 根据status设置样式
+ const color = point.status === 1 ? '#d9001b' :
+ point.status === 0 ? '#04d919':'#8c8c8c'
+ ; // 1为红色,0为绿色 null 为灰色
+
+ feature.setStyle(new Style({
+ image: new CircleStyle({
+ radius: 4,
+ fill: new Fill({ color: color }),
+ stroke: new Stroke({ color: '#ffffff', width: 1 })
+ })
+ }));
+
+ // 添加要素到数据源
+ vectorSource.addFeature(feature);
+ }
+ });
+
+ // 创建矢量图层
+ const newVectorLayer = new VectorLayer({
+ source: vectorSource,
+ zIndex: 10 // 确保点位在地图上层显示
+ });
+
+ // 添加图层到地图
+ map.addLayer(newVectorLayer);
+
+ // 保存矢量图层引用
+ setVectorLayer(newVectorLayer);
+
+ // 添加点击事件处理
+ // map.on('click', (event) => {
+ // const feature = map.forEachFeatureAtPixel(event.pixel, function(feature) {
+ // return feature;
+ // });
+
+ // if (feature) {
+ // const properties = feature.get('properties');
+ // if (properties) {
+ // // 可以在这里处理点击事件,比如显示详情等
+ // console.log('点击了标记点:', properties);
+ // // 可以添加弹窗或其他交互
+ // }
+ // }
+ // });
+ };
+
+
+ // 修改高亮显示选中的测点函数
+ const highlightFeature = (feature) => {
+ if (!feature || !highlightLayer) return;
+
+ // 清除之前的高亮
+ highlightLayer.getSource().clear();
+
+ // 获取要素属性
+ const properties = feature.get('properties');
+ const color = properties.status === 1 ? '#d9001b' : '#04d919';
+
+ // 创建一个新的要素用于高亮显示
+ const highlightFeature = new Feature({
+ geometry: feature.getGeometry().clone(),
+ properties: properties
+ });
+
+ // 设置高亮样式
+ highlightFeature.setStyle(new Style({
+ image: new CircleStyle({
+ radius: 10, // 放大图标
+ fill: new Fill({ color: color }),
+ stroke: new Stroke({ color: '#ffffff', width: 3 })
+ }),
+ text: new Text({
+ text: properties.order || '未命名测点',
+ offsetY: -20,
+ font: 'bold 14px Arial',
+ fill: new Fill({ color: '#333' }),
+ stroke: new Stroke({ color: '#fff', width: 3 })
+ })
+ }));
+
+ // 添加到高亮图层
+ highlightLayer.getSource().addFeature(highlightFeature);
+
+ // 更新选中的要素引用
+ setSelectedFeature(feature);
+
+ // 平移地图到选中的要素位置
+ const geometry = feature.getGeometry();
+ const coordinate = geometry.getCoordinates();
+ map.getView().animate({
+ center: coordinate,
+ duration: 500,
+ zoom: map.getView().getZoom() < 18 ? 18 : map.getView().getZoom()
+ });
+ };
+
+ // 根据测点ID查找对应的要素
+ const findFeatureByDeviceId = (deviceId) => {
+ if (!vectorLayer) return null;
+
+ let targetFeature = null;
+ vectorLayer.getSource().forEachFeature((feature) => {
+ const properties = feature.get('properties');
+ if (properties && properties.order === deviceId) {
+ targetFeature = feature;
+ }
+ });
+
+ return targetFeature;
+ };
+
+ // 处理表格行点击事件
+ const handleRowClick = (record,event) => {
+ // 如果点击的是操作列中的元素,不触发地图交互
+ if (event && (event.target.closest('button') || event.target.closest('.ant-btn'))) {
+ return;
+ }
+ const feature = findFeatureByDeviceId(record.order);
+ if (feature) {
+ highlightFeature(feature);
+ }
+ };
useEffect(() => {
const params = {
search: {
...searchVal,
}
- };
+ };
search(params)
getCount();
}, [searchVal])
-
-
+
+ // 初始化地图
+ useEffect(() => {
+ if (!mapContainerRef.current) return;
+
+ // 创建地图实例
+ const mapInstance = new Map({
+ target: mapContainerRef.current,
+ controls: [],
+ view: new View({
+ center: proj.fromLonLat([114.764317000, 31.496800000]), // 设置地图中心点坐标
+ zoom: 18.4, // 设置初始缩放级别
+ minZoom: 5.5,
+ maxZoom: 30,
+ }),
+ });
+
+ // 添加天地图卫星影像图层
+ const satelliteLayer = new TileLayer({
+ source: new XYZSource({
+ url: "https://t{0-7}.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=efc861f25f96dc6e5f884f0403ebfefd",
+ }),
+ maxZoom: 30,
+ });
+
+ // 设置图层名称
+ satelliteLayer.set('name', 'SatelliteImage');
+
+ // 添加图层到地图
+ mapInstance.addLayer(satelliteLayer);
+
+ // 创建高亮图层
+ const highlightVectorLayer = new VectorLayer({
+ source: new VectorSource(),
+ zIndex: 999, // 确保高亮图层在最上面
+ style: null
+ });
+
+ // 添加高亮图层到地图
+ mapInstance.addLayer(highlightVectorLayer);
+ setHighlightLayer(highlightVectorLayer);
+
+ // 创建弹出层
+ const overlay = new Overlay({
+ element: popupRef.current,
+ positioning: 'bottom-center',
+ stopEvent: false,
+ offset: [0, -10]
+ });
+ mapInstance.addOverlay(overlay);
+ setPopupOverlay(overlay);
+
+ // 添加地图点击事件
+ mapInstance.on('click', (event) => {
+ const feature = mapInstance.forEachFeatureAtPixel(event.pixel, function (feature) {
+ return feature;
+ });
+
+ if (feature) {
+ setModalVisible(true)
+ setDetailPoint(feature?.values_?.properties)
+ highlightFeature(feature);
+ }
+ });
+
+ // 保存地图实例
+ setMap(mapInstance);
+
+ // 组件卸载时清理地图
+ return () => {
+ if (mapInstance) {
+ mapInstance.setTarget(null);
+ }
+ };
+ }, []);
+
+ // 当地图实例创建完成后获取测点数据
+ useEffect(() => {
+ if (map && searchVal) {
+ getCdList(searchVal);
+ }
+ }, [map,searchVal]);
return (
<>
-
-
-
-
-
-
-
{count.totalPoint}
-
个
+
+
+
+
+
+
+
+
+ {count.totalPoint}
+ 个
+
+
总监测点数
- 总监测点数
-
-
-
-
-
- {count.hasAnt}
- 个
-
-
有白蚁
-
-
-
-
-
- {count.notAnt}
- 个
-
-
无白蚁
-
-
-
-
-
- {count.noData}
- 个
-
-
离线
-
-
-
-
-
+
+
+
+ {count.hasAnt}
+ 个
+
+
有白蚁
+
+
+
+
+
+ {count.notAnt}
+ 个
+
+
无白蚁
+
+
+
+
+
+ {count.noData}
+ 个
+
+
离线
+
+
+
+
+
-
-
-
+ />
+
+
+
({
+ onClick: (event) => handleRowClick(record,event), // 添加行点击事件
+ style: { cursor: 'pointer' } // 添加鼠标指针样式
+ })}
+ />
+
-
+
+ {/* 添加测点详情Modal */}
+ setModalVisible(false)}
+ width={1000}
+ footer={null}
+ destroyOnClose
+ >
+
+
+ {/*处理弹框 */}
+ setPrecessVisible(false)}
+ width={1000}
+ footer={null}
+ destroyOnClose
+ >
+
+
{refresh({addvcd:localStorage.getItem('ADCD6')})}}
+ // onCrudSuccess={()=>{refresh({addvcd:localStorage.getItem('ADCD6')})}}
/>
>
diff --git a/src/views/rcgl/byfz/bypc/pointHistory.js b/src/views/rcgl/byfz/bypc/pointHistory.js
new file mode 100644
index 000000000..ae0f71ac6
--- /dev/null
+++ b/src/views/rcgl/byfz/bypc/pointHistory.js
@@ -0,0 +1,109 @@
+import React,{useEffect,useState} from 'react'
+import { DatePicker, Table, Button, Form } from 'antd'
+import usePageTable from '../../../../components/crud/usePageTable2';
+import { createCrudService } from '../../../../components/crud/_';
+import apiurl from '../../../../service/apiurl';
+import moment from 'moment';
+const {RangePicker} = DatePicker
+export default function PointHistory({data}) {
+ const columns = [
+ {
+ title: '序号',
+ dataIndex: 'inx',
+ key: 'inx',
+ width: 60,
+ // render: (_, __, index) => index + 1
+ },
+ {
+ title: '测点编号',
+ dataIndex: 'order',
+ key: 'order',
+ width: 130
+ },
+ {
+ title: '监测时间',
+ dataIndex: 'obDate',
+ key: 'obDate',
+ width: 180
+ },
+ {
+ title: '白蚁入侵',
+ dataIndex: 'status',
+ key: 'status',
+ width: 100,
+ render: (status) => {status === 1 ? '有' : '无'}
+ },
+ {
+ title: '电量',
+ dataIndex: 'electricity',
+ key: 'electricity',
+ width: 80
+ }
+ ]
+ const [searchVal, setSearchVal] = useState({
+ dateTimeRangeSo: {
+ start: moment().subtract(1, 'days').format('YYYY-MM-DD HH:mm:ss'),
+ end:moment().format('YYYY-MM-DD HH:mm:ss')
+ }
+ })
+
+ const [form] = Form.useForm();
+
+ const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.rcgl.byfz.bypc.historyPage).find_noCode);
+ const onReset = () => {
+ form.resetFields();
+ };
+ const onFinish = (values) => {
+ let dateSo;
+ if (values.tm) {
+ dateSo = {
+ start: moment(values.tm[0]).format('YYYY-MM-DD HH:mm:ss'),
+ end: moment(values.tm[1]).format('YYYY-MM-DD HH:mm:ss')
+ }
+ }
+ delete values.tm
+ setSearchVal({...values, dateTimeRangeSo:dateSo});
+ }
+ useEffect(() => {
+ const params = {
+ search: {
+ ...searchVal,
+ order:data?.order
+ }
+ };
+ search(params)
+ }, [searchVal,data])
+
+ useEffect(() => {
+ form.setFieldValue('tm',[moment().subtract(1,'days'),moment()])
+ }, [])
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/views/rcgl/byfz/bypc/precessForm.js b/src/views/rcgl/byfz/bypc/precessForm.js
new file mode 100644
index 000000000..f2ffd1803
--- /dev/null
+++ b/src/views/rcgl/byfz/bypc/precessForm.js
@@ -0,0 +1,716 @@
+import React, { useEffect, useState, useMemo, useRef } from 'react';
+import { Form, Button, Input, Row, Upload, Col, Table, TreeSelect, DatePicker, InputNumber, message, Image, Radio, Modal, Descriptions, Tabs, Tooltip } from 'antd';
+import { VideoCameraOutlined } from '@ant-design/icons';
+import { formItemLayout, btnItemLayout } from '../../../../components/crud/FormLayoutProps';
+import BasicCrudModal from '../../../../components/crud/BasicCrudModal';
+import { CrudOpRender_text } from '../../../../components/crud/CrudOpRender';
+import apiurl from '../../../../service/apiurl';
+import FormComponent from "./formCom"
+import NormalSelect from '../../../../components/Form/NormalSelect';
+
+import "./index.less"
+import moment from 'moment';
+import { httpget2, xyt_httpget2, httppost2 } from '../../../../utils/request';
+const { RangePicker } = DatePicker
+const { Dragger } = Upload;
+const url = "http://223.75.53.141:9100/gs-tsg"
+
+
+const ModalForm = ({ mode, record, refresh, setPrecessVisible }) => {
+ const taskTypes = [
+ { label: "日常巡查", value: 1 },
+ { label: "特别检查", value: 2 },
+ { label: "汛前巡检", value: 3 },
+ ]
+
+ const xjStatus = {
+ 0: "cha",
+ 1: "gou"
+ }
+ const [form] = Form.useForm();
+ const [form1] = Form.useForm();
+ const [precessType, setPrecessType] = useState()
+ const [itemList, setItemList] = useState([])
+ const [itemParams, setItemParams] = useState([])
+ const [list, setList] = useState([])
+ const [totals, setTotals] = useState({})
+ const [tabsRender, setTabsRender] = useState([])
+ const [imgVisible, setImgVisible] = useState(false)
+ const [imgList, setImgList] = useState([])
+ const [videoOpen, setVideoOpen] = useState(false)
+ const [videoParams, setVideoParams] = useState({})
+ const [handleDetailsOpen, setHandleDetailsOpen] = useState(false)
+ const [handleDetails, setHandleDetails] = useState({})
+ const [handleImgfileList, setHandleImgFileList] = useState([]) //上传文件列表
+ const [handleVideoFileList, setHandleVideoFileList] = useState([]) //上传文件列表
+ const handleDetail = (row) => {
+ setHandleDetailsOpen(true)
+ setHandleDetails(row)
+ }
+ const reviewPic = (arrPic) => {
+ if (arrPic.length > 0) {
+ setImgVisible(true)
+ setImgList(arrPic)
+ }
+ }
+
+ const reviewVideo = (arrVideo) => {
+ if (arrVideo.length > 0) {
+ setVideoOpen(true)
+ setVideoParams(arrVideo[0])
+ }
+ }
+
+
+ const renderTooltip = (value) => {
+ return (
+ <>
+
+
+ {value?.itemProblemDesc}
+
+
+ {value?.handleSuggestion}
+
+
+ >
+ )
+ }
+ const columns = [
+ {
+ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align: "center",
+ render: (value, row, index) => {index + 1}
+ },
+ {
+ title: '巡查项', key: 'itemDesc', dataIndex: 'itemDesc', width: 200,
+ render: (value, row, index) =>
+
+
{value}
+
+
+
+
+
+
+ },
+ {
+ title: '巡查状态', key: 'isNormal', dataIndex: 'isNormal', width: 100, align: "center",
+ render: (value) =>
+ {value === null ? '' :
+

+ }
+
+ },
+ { title: '巡查问题描述', key: 'problemDesc', dataIndex: 'problemDesc', width: 300, ellipsis: true },
+ {
+ title: '巡查图片', key: 'inspectPics', dataIndex: 'inspectPics', width: 100, align: "center",
+ render: (value) =>
+
+ },
+ {
+ title: '巡查视频', key: 'inspectVideos', dataIndex: 'inspectVideos', width: 100, align: "center",
+ render: (value) =>
+
+ },
+ {
+ title: '是否处理', key: 'isHandle', dataIndex: 'isHandle', width: 100, align: "center",
+ render: (value) => {value ? "是" : "否"}
+ },
+ { title: '处理人', key: 'handleUserName', dataIndex: 'handleUserName', width: 150 },
+ {
+ title: '操作', key: 'operator', dataIndex: 'operator', width: 150,
+ render: (value, row) => handleDetail(row)}>处理详情
+ },
+
+ ]
+ const width = useMemo(() => columns.reduce((total, cur) => total + (cur.width), 0), [columns]);
+
+ const renderItems = (items) => {
+ const result = items.map(o => ({
+ key: o.pointId,
+ label: o.name + `(${o.children.filter(r => r.isNormal == 0).length})`,
+ children:
+
+ }))
+ setTabsRender(result)
+ }
+
+ const getTabsDetail = async (id) => {
+ let items = {};
+ try {
+ const res = await httpget2(apiurl.rcgl.xcxj.xjrw.info, { taskId: id });
+ renderItems(res.data)
+ res.data.forEach(o => {
+ items.isNormalTotal = o.children.filter(item => item.isNormal == 0).length;
+ items.normalTotal = o.children.filter(item => item.isNormal == 1).length;
+ })
+ setTotals(items);
+ } catch (error) {
+ console.log(error);
+ }
+ }
+ const handleTree = (arr) => {
+
+ const res = arr.map(item => {
+ item.value = item.id;
+ item.title = item.itemDesc;
+ if (item.children) {
+ item.children = handleTree(item.children)
+ }
+ return item;
+ })
+ return res
+ }
+
+
+ const getItemList = async () => {
+ try {
+ const res = await httpget2(apiurl.rcgl.xcxj.xjrw.list);
+ if (res.code === 200) {
+ const arr1 = res.data.map(item => ({
+ id: item.id,
+ itemDesc: item.name,
+ children: item.children,
+ disabled: item.children.length > 0 ? false : true
+ }));
+ const result = handleTree(arr1)
+ setList(res.data)
+ console.log(result);
+ setItemList(result)
+ }
+ } catch (error) {
+ console.log(error);
+
+ }
+ }
+
+ const onfinish = (values) => {
+ const userId = localStorage.getItem('userId')
+ const userName = localStorage.getItem('userName')
+ values.inspectTask = values.isWarn == 2 ? {
+ startDate: values.startDate || '',
+ endDate: values.endDate || '',
+ inspectUserName: deptUserList?.find(item => item.userId == values.inspectUserId)?.nickName,
+ items: itemParams,
+ inspectUserId: values?.inspectUserId,
+ taskContent: values?.taskContent,
+ taskTitle: values?.taskTitle,
+ taskType: values?.taskType,
+ createUserId: userId,
+ createUserName: userName
+ } : null
+ if (mode === 'save') {
+ onSave(apiurl.rcgl.byfz.bypc.process, values)
+ }
+
+ }
+
+ const onSave = async (url, params) => {
+ const newParams = { ...params, order: record?.order, obDate: record?.obDate }
+ try {
+ const { code, data } = await httppost2(url, newParams);
+ if (code == 200) {
+ message.success('处理成功')
+ setPrecessVisible(false)
+ refresh();
+ }
+ } catch (error) {
+ console.log(error);
+
+ }
+ }
+
+ const onValuesChange = (v, r) => {
+ setPrecessType(r.isWarn)
+ }
+
+ const itemChange = (a, b, c) => {
+ const itemArr = a.map(item => {
+ let pointId;
+ list.forEach(o => {
+ if (o.id != item && !pointId) {
+ pointId = o.children?.find(t => t.id == item)?.pointId;
+ }
+ })
+ return {
+ itemId: item,
+ pointId
+ }
+ })
+ setItemParams(itemArr)
+ }
+
+
+ const [deptList, setDeptList] = useState([])
+ const [deptUserList, setDeptUserList] = useState([])
+ const buildTree = (data, parentId) => {
+ let tree = [];
+ data.forEach((node) => {
+ node.title = node.deptName;
+ node.key = node.deptId;
+
+ if (node.parentId === parentId) {
+ let children = buildTree(data, node.deptId);
+ if (children.length) {
+ node.children = children;
+ }
+ tree.push(node);
+ }
+ });
+ return tree;
+ }
+
+ const handleTreeList = (dept, user) => {
+ const deptArr = dept.map(item => {
+ return {
+ ...item,
+ value: item.deptId,
+ title: item.deptName,
+ disabled: item.userId ? false : true,
+ children: user.filter(u => u.deptId == item.deptId).map(u => ({
+ ...u,
+ value: u.userId,
+ title: u.nickName
+ }))
+ }
+ })
+ console.log("deptArr", deptArr);
+ const treelist = buildTree(deptArr, 0)
+ return treelist
+ }
+ const treeList = useMemo(() => {
+ if (deptUserList?.length > 0 && deptList?.length > 0) {
+ return handleTreeList(deptList, deptUserList)
+ } else {
+ return []
+ }
+ }, [deptUserList, deptList])
+
+ // 获取部门数据
+ const getDeptList = async () => {
+ try {
+ const result = await xyt_httpget2(apiurl.rcgl.zbgl.zbb.deptlist);
+ if (result.code == 200) {
+ setDeptList(result.data);
+ getDeptUser(result.data[0])
+ }
+
+ } catch (error) {
+ console.log(error);
+ }
+ }
+
+ // 获取部门人员数据
+ const getDeptUser = async () => {
+ try {
+ const result = await xyt_httpget2(apiurl.rcgl.zbgl.zbb.userList, { pageNum: 1, pageSize: 9999 });
+ if (result.code == 200) {
+ setDeptUserList(result.rows)
+ }
+ } catch (error) {
+ console.log(error);
+ }
+ }
+ useEffect(() => {
+ getDeptList()
+ getItemList()
+ }, [])
+
+ const handleFile = (arr = []) => {
+ const newArr = arr?.map(item => ({
+ name: item.fileName,
+ filePath: item.filePath,
+ fileId: item.fileId
+ }))
+ return newArr
+ }
+ useEffect(() => {
+ const handleImgFile = handleFile(handleDetails?.handlePics || []);
+ const hanldeVideoFile = handleFile(handleDetails?.handleVideos || []);
+ setHandleImgFileList(handleImgFile)
+ setHandleVideoFileList(hanldeVideoFile)
+ }, [handleDetails])
+
+ useEffect(() => {
+ if (mode != 'save' && record.jcskByRProcessVo) {
+ const backParmas = {
+ ...record.jcskByRProcessVo,
+ isWarn: 2,
+ }
+ form.setFieldsValue(backParmas)
+ setPrecessType(2)
+ getTabsDetail(record?.jcskByRProcessVo?.id)
+ }
+ }, [mode, record])
+
+
+ return (
+
+ {mode == 'view' &&
+
+ 基本信息
+
+ }
+
+
+
+ >
+ )
+ }
+
+
+ setImgVisible(vis),
+ }}
+ >
+ {
+ imgList.length > 0 ? imgList.map(item => (
+
+ ))
+ : null
+ }
+
+
+
+
+
+
+
+
setVideoOpen(false)}
+ >
+
+
+
+
setHandleDetailsOpen(false)}
+ >
+ <>
+
+ >
+
+
+
+ );
+}
+
+export default ModalForm;
diff --git a/src/views/rcgl/byfz/bypc/toolbar.js b/src/views/rcgl/byfz/bypc/toolbar.js
index bee981df4..e2c052468 100644
--- a/src/views/rcgl/byfz/bypc/toolbar.js
+++ b/src/views/rcgl/byfz/bypc/toolbar.js
@@ -34,13 +34,13 @@ const ToolBar = ({ setSearchVal, onSave, storeData, role, initData }) => {
{/*
diff --git a/src/views/rcgl/xcxj/xjrw/detailForm.js b/src/views/rcgl/xcxj/xjrw/detailForm.js
index 992ee7570..b2cdb9123 100644
--- a/src/views/rcgl/xcxj/xjrw/detailForm.js
+++ b/src/views/rcgl/xcxj/xjrw/detailForm.js
@@ -152,12 +152,8 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave,submit }) => {
const handleFile = (arr=[]) => {
const newArr = arr?.map(item => ({
name: item.fileName,
- response: {
- data: {
- filePath: item.filePath,
- fileId:item.fileId
- }
- },
+ filePath: item.filePath,
+ fileId:item.fileId
}))
return newArr
}
diff --git a/src/views/sq/qth/sksq/index.js b/src/views/sq/qth/sksq/index.js
index 1bea7b587..d5feb909b 100644
--- a/src/views/sq/qth/sksq/index.js
+++ b/src/views/sq/qth/sksq/index.js
@@ -17,7 +17,7 @@ export default function Sksq() {
const getData = async (params) => {
const data = await reservoirlist(params)
- setTableData(data.filter(o=>o.stnm==='檀树岗' || o.stnm==='檀树岗(新)'));
+ setTableData(data);
}
useEffect(() => {
let option = {
@@ -38,8 +38,8 @@ export default function Sksq() {
站点:
({ label: item.stnm, value: index }))}
+ style={{ width: '250px' }}
+ options={tableData.map((item,index)=>({ label: item.stnm, value:index }))}
value={selected}
onChange={(e) => setSelected(e)}
/>