Compare commits

..

No commits in common. "9c91131348dcba4913417ca3f0c67452ffc6996e" and "ab01f1d0bc462bcc0fe22905b2a3163656ae260b" have entirely different histories.

8 changed files with 52 additions and 88 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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