Compare commits

..

7 Commits

Author SHA1 Message Date
李神峰 9c91131348 Merge branch 'lsf-dev' 2024-09-30 14:31:59 +08:00
xielei 4545172312 Merge branch 'master' of http://10.0.41.100:3000/lishenfeng/tsg-web 2024-09-30 14:27:53 +08:00
xielei 21994d4217 页面搭建 2024-09-30 14:27:50 +08:00
秦子超 bb849641af 跟路径修改 2024-09-30 13:17:33 +08:00
秦子超 4ce1b9bea7 Merge branch 'qzc-dev' 2024-09-30 13:16:47 +08:00
秦子超 ef4be1433c 巡查巡检修改 2024-09-30 13:16:17 +08:00
秦子超 173772aa72 待处理问题 2024-09-30 10:27:05 +08:00
8 changed files with 89 additions and 53 deletions

View File

@ -1 +1 @@
PUBLIC_URL=/xyt PUBLIC_URL=/tsg

View File

@ -1,2 +1,2 @@
GENERATE_SOURCEMAP=false GENERATE_SOURCEMAP=false
PUBLIC_URL=/xyt PUBLIC_URL=/tsg

View File

@ -3,6 +3,7 @@ import { Descriptions, Modal } from 'antd';
import {CloseOutlined} from '@ant-design/icons'; import {CloseOutlined} from '@ant-design/icons';
import { httpget2 } from '../../../../utils/request'; import { httpget2 } from '../../../../utils/request';
import apiurl from '../../../../service/apiurl'; import apiurl from '../../../../service/apiurl';
import ModalForm from '../../../rcgl/xcxj/xjwtcl/form';
import moment from "moment" import moment from "moment"
function Wxq({ id, data, dispatch }) { function Wxq({ id, data, dispatch }) {
@ -39,7 +40,7 @@ function Wxq({ id, data, dispatch }) {
</div> </div>
</div> </div>
<div className='homeModal2_content'> <div className='homeModal2_content'>
daichuli <ModalForm/>
</div> </div>
</div> </div>
</> </>

View File

@ -1,4 +1,4 @@
import { useEffect, useState } from "react" import { useEffect, useState, useRef } from "react"
import { Button, Modal, message, Table } from 'antd'; import { Button, Modal, message, Table } from 'antd';
import {useDispatch, useSelector} from "react-redux"; import {useDispatch, useSelector} from "react-redux";
@ -9,16 +9,18 @@ import VectorLayer from "ol/layer/Vector";
import Style from "ol/style/Style"; import Style from "ol/style/Style";
import StrokeStyle from "ol/style/Stroke"; import StrokeStyle from "ol/style/Stroke";
import { Vector as VectorSource } from "ol/source"; import { Vector as VectorSource } from "ol/source";
import { httppost2 } from "../../../utils/request"; import { httppost2 } from "../../../utils/request";
import apiurl from "../../../service/apiurl"; import apiurl from "../../../service/apiurl";
import { geometryCenter } from "../../../utils/tools"; import { geometryCenter } from "../../../utils/tools";
import BasicCrudModal from "../../../components/crud/BasicCrudModal"
import ModalForm from "../../rcgl/xcxj/xjwtcl/form"
import moment from "moment"; import moment from "moment";
const Page = ({mySetTms}) => { const Page = ({mySetTms}) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
const refModal = useRef();
let mapObj = useSelector(s => s.map.map) let mapObj = useSelector(s => s.map.map)
const [ dataObj, setDataObj ] = useState({}) const [ dataObj, setDataObj ] = useState({})
const [ data, setData ] = useState([]) const [ data, setData ] = useState([])
@ -34,8 +36,8 @@ const Page = ({mySetTms}) => {
]; ];
const columns2 = [ const columns2 = [
{ title: '上报时间', key: 'handleTime', dataIndex: 'handleTime',align: "center", ellipsis: true }, { title: '上报时间', key: 'finishTime', dataIndex: 'finishTime',align: "center", ellipsis: true },
{ title: '巡检问题描述', key: 'problemDesc', dataIndex: 'problemDesc',align: "center" }, { title: '巡检问题描述', key: 'itemDesc', dataIndex: 'itemDesc',align: "center" },
]; ];
useEffect(()=>{ useEffect(()=>{
@ -117,11 +119,11 @@ const Page = ({mySetTms}) => {
<div className="xunchaxunjian"> <div className="xunchaxunjian">
<div className="bodyBox"> <div className="bodyBox">
<div className="bodyBoxItem"> <div className="bodyBoxItem">
<div className="num" style={{color:'#04D919'}}>{data3||0}</div> <div className="num" style={{color:'#04D919'}}>{data2.length||0}</div>
<div className="content">本月巡查</div> <div className="content">本月巡查</div>
</div> </div>
<div className="bodyBoxItem"> <div className="bodyBoxItem">
<div className="num" style={{color:'#04D919'}}>{data2?.length||0}</div> <div className="num" style={{color:'#04D919'}}>{data3||0}</div>
<div className="content">本年巡查</div> <div className="content">本年巡查</div>
<div></div> <div></div>
</div> </div>
@ -185,19 +187,28 @@ const Page = ({mySetTms}) => {
onRow={ onRow={
(data)=>({ (data)=>({
onClick:()=>{ onClick:()=>{
refModal.current.showView(data);
// dispatch.map.setLayerVisible({"HdswLayer":true}); // dispatch.map.setLayerVisible({"HdswLayer":true});
dispatch.runtime.setFeaturePop({ // dispatch.runtime.setFeaturePop({
id: data.stnm, // id: data.stnm,
data: data, // data: data,
type: 'daichuli', // type: 'daichuli',
lgtd: data.lgtd, // lgtd: data.lgtd,
lttd: data.lttd, // lttd: data.lttd,
}) // })
} }
}) })
} }
/> />
</div> </div>
<BasicCrudModal
width={1000}
ref={refModal}
title=""
component={ModalForm}
title1="详情"
/>
</div> </div>
) )
} }

View File

@ -3,6 +3,7 @@ import { Table, Modal, message } from 'antd';
import {CloseOutlined} from "@ant-design/icons"; import {CloseOutlined} from "@ant-design/icons";
import usePageTable from '../../../../components/crud/usePageTable2' import usePageTable from '../../../../components/crud/usePageTable2'
import { createCrudService } from '../../../../components/crud/_'; import { createCrudService } from '../../../../components/crud/_';
import AiWarn from "../../../../views/spjk/aiWarn"
import { httppost2 } from "../../../../utils/request"; import { httppost2 } from "../../../../utils/request";
import apiurl from "../../../../service/apiurl"; import apiurl from "../../../../service/apiurl";
@ -21,8 +22,9 @@ const Page = () => {
}, []) }, [])
return ( return (
<div className="ant-card-body" style={{padding:"0 10px"}}> <div className="ant-card-body" style={{padding:"0 10px",height:'600px',overflowY:'auto'}}>
<div>时间{moment().format('YYYY-MM-DD HH:mm:ss')} {moment().format('YYYY-MM-DD HH:mm:ss')}</div> <AiWarn/>
{/* <div>时间:{moment().format('YYYY-MM-DD HH:mm:ss')} 至 {moment().format('YYYY-MM-DD HH:mm:ss')}</div> */}
</div> </div>
) )
} }

View File

@ -43,12 +43,10 @@ const Page = ({ title = '标题' }) => {
// hoverAnimation: true, // hoverAnimation: true,
data: plandata, data: plandata,
label: { label: {
normal: { show:false,
show: true, },
position: 'outside', labelLine: {
formatter: '{c}', show: false
}
}, },
itemStyle:{ itemStyle:{
color: function (colors) { color: function (colors) {

View File

@ -56,12 +56,11 @@ const Page = ({ title = '标题' }) => {
// hoverAnimation: true, // hoverAnimation: true,
data: plandata, data: plandata,
label: { label: {
normal: { show:false,
show: true, },
position: 'outside', labelLine: {
formatter: '{c}', show: false
}, },
},
itemStyle:{ itemStyle:{
color: function (colors) { color: function (colors) {
var colorList = [ var colorList = [

View File

@ -18,38 +18,57 @@ let obj =
const Page = ({ title = '标题' }) => { const Page = ({ title = '标题' }) => {
const [echart2, setEchart2] = useState(Object()) const [echart2, setEchart2] = useState(Object())
const [inspectordata, setInspectorData] = useState([{}]) const [inspectordata, setInspectorData] = useState([{}])
const [plandata, setPlanData] = useState(Object()) const [plandata, setPlanData] = useState([])
const [problemdata, setProblemData] = useState(Object()) const [problemdata, setProblemData] = useState(Object())
const [sumTotal, setSum] = useState(0) const [sumTotal, setSum] = useState(0)
const getPlanOption = useMemo((name, data) => { const getPlanOption = useMemo((name, data) => {
return { return {
legend: { legend: {
data: Object.values(obj), show: true,
data: plandata?.map(item=>item.name),
type: 'scroll' type: 'scroll'
}, },
tooltip: {}, tooltip: {},
polar: { polar: {
radius: [0, '80%'] // radius: [0, '80%']
},
radiusAxis: {
min: 0,
max: Math.max.apply(null, Object.values(plandata)),
axisLine:{
show:false
},
}, },
angleAxis: { angleAxis: {
type: 'category', type: 'category',
data: Object.values(obj), data: plandata?.map(item=>item.name),
// startAngle: 75, },
radiusAxis: {
min: 0,
max: 20,
interval: 2,
// 刻度
axisTick:{
show:false
},
//刻度数值
axisLabel:{
show:false
},
// 线
axisLine:{
show:false
},
}, },
series: [ series: [
{ {
name: '案件类型', name: '案件类型',
type: 'bar', stack: 'a',
coordinateSystem: 'polar', type: 'pie',
radius: [0, 140],
center: ['50%', '50%'],
roseType: 'area',
stillShowZeroSum:false,
label: {
show:false,
},
labelLine: {
show: false
},
itemStyle: { itemStyle: {
normal: { normal: {
color: function (colors) { color: function (colors) {
@ -64,13 +83,11 @@ const Page = ({ title = '标题' }) => {
} }
}, },
}, },
data: Object.values(plandata) data: plandata
} }
] ]
} }
}, [plandata]) }, [plandata])
console.log(getPlanOption);
const onOk = (event, index) => { const onOk = (event, index) => {
if (event !== null) { if (event !== null) {
let params = { let params = {
@ -82,15 +99,23 @@ const Page = ({ title = '标题' }) => {
} }
} }
const getInfo = (params) => { const getInfo = (params) => {
let obj1 = []
let sum = 0 let sum = 0
httppost(apiurl.szzf.ajtj.info + 1, params).then(res => { httppost(apiurl.szzf.ajtj.info + 1, params).then(res => {
res.data.map(item => { const arr = Object.values(obj).map(item1=>{
obj1.push({ value: item.count, name: obj[item.type] }) let obj1=res.data.find(item => obj[item.type] == item1)
sum = sum + item.count if(obj1?.count){
sum =sum+1
return { value: obj1?.count, name: item1 }
}else{
return { value: 0, name: item1 }
}
}) })
// debugger; if(sum == 0){
setPlanData(obj1) setPlanData([])
}else{
setPlanData(arr)
}
setSum(sum) setSum(sum)
}) })