Compare commits

..

24 Commits

Author SHA1 Message Date
秦子超 f2aed12182 页面修改 2024-10-16 17:52:43 +08:00
秦子超 7bb758532d 培训记录管理 2024-10-16 15:30:22 +08:00
秦子超 d028c9c825 提交 2024-10-16 15:08:52 +08:00
秦子超 4c54137507 提交 2024-10-16 14:56:14 +08:00
秦子超 f9e1706b4a 提交 2024-10-16 09:06:58 +08:00
秦子超 cbc06063f0 提交监督考核 2024-10-15 16:11:21 +08:00
秦子超 f8931a9518 Merge branch 'master' of http://10.0.41.100:3000/lishenfeng/tsg-web 2024-10-15 14:46:59 +08:00
秦子超 fe5ff18306 布置图修改 2024-10-15 14:46:55 +08:00
xielei f4b6f8d48d 页面搭建 2024-10-15 14:30:53 +08:00
xielei 7e93e1131e 页面搭建 2024-10-15 14:20:11 +08:00
xielei a697614a07 Merge branch 'master' of http://10.0.41.100:3000/lishenfeng/tsg-web 2024-10-15 10:56:37 +08:00
xielei 6c86634500 页面搭建 2024-10-15 10:56:24 +08:00
秦子超 4a0d1e1f94 更新2 2024-10-14 15:26:49 +08:00
秦子超 89eca8b17b 修改 2024-10-14 15:13:43 +08:00
秦子超 5a46b05008 Merge branch 'master' of http://10.0.41.100:3000/lishenfeng/tsg-web 2024-10-14 15:09:07 +08:00
秦子超 23c10829ac 闸门监控 2024-10-14 15:09:02 +08:00
xielei 886e22feef 页面搭建 2024-10-12 16:52:03 +08:00
xielei 7dc9e7d805 Merge branch 'master' of http://10.0.41.100:3000/lishenfeng/tsg-web 2024-10-11 17:54:35 +08:00
xielei 1f34e38afc 页面搭建 2024-10-11 17:54:29 +08:00
秦子超 b31efc6d77 调度记录修改 2024-10-11 09:50:19 +08:00
秦子超 4e6d269a32 合并qzc 2024-10-11 09:42:25 +08:00
李神峰 6f136fc17e fix():水资源调度分析bug修复 2024-10-10 14:27:36 +08:00
李神峰 bc353a29fc Merge branch 'lsf-dev' 2024-10-09 17:04:19 +08:00
李神峰 2dccbd2b45 feat(): 水资源调度开发 2024-10-09 17:03:44 +08:00
64 changed files with 1060 additions and 121 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -301,3 +301,121 @@ background-color: #ecf2f9 !important;
.nonebox .ant-card-body { .nonebox .ant-card-body {
padding: 5px 20px !important; padding: 5px 20px !important;
} }
.ant-radio-button-wrapper{
height:28px;
line-height:26px;
border: 1px solid #0893FF !important;
color:#0893FF;
&.ant-radio-button-wrapper-checked{
color: #fff !important;
}
.ant-radio-button-checked{
background:#0893FF;
border-color:#0893FF !important;
}
}
.normalModalStyle{
width: 100%;
// min-height: 600px;
background-color: #fff;
.ant-card-body{
.ant-table-thead{
.ant-table-cell{
background-color: #e2edfd !important;
}
}
}
.normalModalStyle_title{
height: 40px;
background-color: #f7f7f7;
border-radius: 10px 10px 0 0 ;
display: flex;
align-items: center;
color: #007afd;
font-size: 16px;
font-weight: 500;
margin-bottom: 10px;
.normalModalStyle_title_icon{
margin: 0 10px 0 15px;
width: 5px;
height: 16px;
background: #3477f5;
}
.normalModalStyle_title_cancel{
margin-right: 15px;
flex: 1;
display: flex;
flex-direction: row-reverse;
}
}
}
.home_modal{
.ant-modal-content{
border-radius: 10px;
}
}
.homeModal1{
// .ant-radio-button-wrapper:not(:first-child)::before{
// background-color: red;
// }
display: flex;
flex-direction: column;
.homeModal1_content{
height: 504px;
display: flex;
padding: 5px 20px 20px 20px;
.homeModal1_content_lf{
width: 40%;
height: 100%;
}
.homeModal1_content_rf{
width: 60%;
height: 100%;
}
}
}
.homeModal2{
display: flex;
flex-direction: column;
.homeModal2_content{
height: 504px;
display: flex;
padding: 5px 20px 20px 20px;
}
}
.colorTable{
.ant-table-thead{
th{
height: 40px !important;
background-color: #e2edfd !important;
}
}
.ant-table-tbody{
.ant-table-measure-row{
td{
padding: 0 !important;
}
}
tr:nth-child(odd) {
td{
background-color: #f5f8fe !important;
}
}
}
}

View File

@ -416,12 +416,25 @@ export async function loadMenu(): Promise<MenuItem[]> {
{ id: id(), title: '年度渗流统计表', path: '/mgr/gcaqjc/sjtjcx/ndsltjb' }, { id: id(), title: '年度渗流统计表', path: '/mgr/gcaqjc/sjtjcx/ndsltjb' },
] ]
}, },
{
id: id(), title: '调度记录', path: '/mgr/gcaqjc/gcaqyj/diaodu',
},
], ],
}, },
{
id: id(), title: '水资源调度', redirect: '/mgr/szydd/gsnlfx', icon: 'fxzb',
children: [
{
id: id(), title: '供水能力分析', path: '/mgr/szydd/gsnlfx',
},
{
id: id(), title: '调度记录', path: '/mgr/szydd/diaodu',
},
{
id: id(), title: '供水统计分析', path: '/mgr/szydd/gstjfx',
},
{
id: id(), title: '典型年降雨资料', path: '/mgr/szydd/dxnjyzl',
},
]
},
// { id: id(), title: '基本情况', path: '/mgr/home', icon: 'jbqk' }, // { id: id(), title: '基本情况', path: '/mgr/home', icon: 'jbqk' },

View File

@ -434,6 +434,7 @@ const apiurl = {
}, },
// 供水兴利 // 供水兴利
gsxl: { gsxl: {
gsWater:service_fxdd + "/gateValveReal/predict/water",
dxnjyzl: { dxnjyzl: {
page: service_fxdd + '/tyYearRainfall/page', page: service_fxdd + '/tyYearRainfall/page',
edit: service_fxdd + '/tyYearRainfall/update', edit: service_fxdd + '/tyYearRainfall/update',
@ -921,6 +922,7 @@ const apiurl = {
// 水库弹框详情 // 水库弹框详情
reservoirmonitor: service_fxdd + '/reservoir/water/monitor/data', //图像监测-列表 reservoirmonitor: service_fxdd + '/reservoir/water/monitor/data', //图像监测-列表
reservoirmonitor1: service_fxdd + '/reservoir/water/data/page', //图像监测-列表
// 水库基础信息 // 水库基础信息
attResBase: service_fxdd + '/attResBase/attResBase', //基本信息 attResBase: service_fxdd + '/attResBase/attResBase', //基本信息

View File

@ -40,12 +40,12 @@ async function send(url, options) {
} }
const { code } = res.data; const { code } = res.data;
if (code === 401) { // if (code === 401) {
//debugger; // // debugger;
//window.location.href = '/mgr/home';// /mgr/home /login // //window.location.href = '/mgr/home';// /mgr/home /login
window.location.href = '/xfflood/#/login'; // window.location.href = '/tsg/#/login';
// window.location.hash = '#/login'; // // window.location.hash = '#/login';
} // }
return res.data; return res.data;
} catch (e) { } catch (e) {
//message.error(e); //message.error(e);

View File

@ -110,6 +110,7 @@ import Ajtj from './sz/szzf/ajtj'
import Clyj from './sz/szzf/clyj' import Clyj from './sz/szzf/clyj'
import Krgl from './KrLine' import Krgl from './KrLine'
import Gsnlfx from './gxsl/gsnlfx'
import Ddjl from './szydd/ddjl' import Ddjl from './szydd/ddjl'
@ -175,7 +176,6 @@ const AppRouters: React.FC = () => {
{ path: 'gcaqjc/gcaqyj/bzt', element: <Bzt isHome={false}/> }, { path: 'gcaqjc/gcaqyj/bzt', element: <Bzt isHome={false}/> },
{ path: 'gcaqjc/gcaqyj/yhyj', element: <Yhyj /> }, { path: 'gcaqjc/gcaqyj/yhyj', element: <Yhyj /> },
{ path: 'gcaqjc/gcaqyj/yjgzpz', element: <Yjgzpz /> }, { path: 'gcaqjc/gcaqyj/yjgzpz', element: <Yjgzpz /> },
{ path: 'gcaqjc/gcaqyj/diaodu', element: <Ddjl/> },
//统计 //统计
{ path: 'gcaqjc/sjtjcx/syjx', element: <Syjc /> }, { path: 'gcaqjc/sjtjcx/syjx', element: <Syjc /> },
@ -224,8 +224,11 @@ const AppRouters: React.FC = () => {
// 供水兴利 // 供水兴利
{ path: 'gsxl/zfzl', element: <Zfzl /> }, { path: 'gsxl/zfzl', element: <Zfzl /> },
{ path: 'gsxl/zfjk', element: <Zfjk /> }, { path: 'gsxl/zfjk', element: <Zfjk /> },
{ path: 'gsxl/gstjfx', element: <Gstjfx /> },
{ path: 'gsxl/dxnjyzl', element: <Dxnjyzl /> }, { path: 'szydd/diaodu', element: <Ddjl/> },
{ path: 'szydd/gsnlfx', element: <Gsnlfx /> },
{ path: 'szydd/gstjfx', element: <Gstjfx /> },
{ path: 'szydd/dxnjyzl', element: <Dxnjyzl /> },
{ path: 'fxzb/jczw/yqz', element: <HomePage /> }, { path: 'fxzb/jczw/yqz', element: <HomePage /> },
{ path: 'fxzb/jczw/sqz', element: <HomePage /> }, { path: 'fxzb/jczw/sqz', element: <HomePage /> },

View File

@ -31,7 +31,7 @@ export default function drpOption(data) {
{ {
type: 'category', type: 'category',
data: data.map(o => o.tm), data: data.map(o => o.tm),
inverse: true, inverse: false,
splitLine: { splitLine: {
show: false show: false
}, },

View File

@ -18,7 +18,7 @@ const ToolBar = ({search, setTabVal, setTms}) => {
<Form className='toolbarBox' layout="inline" onFinish={onFinish}> <Form className='toolbarBox' layout="inline" onFinish={onFinish}>
<Form.Item label="时间段" name="imgName"> <Form.Item label="时间段" name="imgName">
<RangePicker <RangePicker
allowClear allowClear={false}
defaultValue={[moment().add(-1,'months'),moment()]} defaultValue={[moment().add(-1,'months'),moment()]}
onChange={onFinish} onChange={onFinish}
style={{ width: "300px" }} style={{ width: "300px" }}

View File

@ -1,10 +1,26 @@
export default function drpOption(data) { export default function drpOption(data,yjData) {
console.log("data",data); console.log("data",data);
const maxVal = 0//Math.max(...data.map(obj => obj.drp)) const maxVal = 0//Math.max(...data.map(obj => obj.drp))
const max1 = Math.max(...data.map(obj => obj.value)) const max1 = Math.max(...[...data.map(obj => obj.value),...yjData.map(obj => obj.value)])
const min1 = Math.min(...data.map(obj => obj.value)) const min1 = Math.min(...[...data.map(obj => obj.value),...yjData.map(obj => obj.value)])
const max2 = Math.max(...data.map(obj => obj.rz)) const max2 = Math.max(...data.map(obj => obj.rz))
const min2 = Math.min(...data.map(obj => obj.rz)) const min2 = Math.min(...data.map(obj => obj.rz))
const yj = yjData?.map((item,index)=>{
return {
yAxisIndex: 0,
name: item.yjName,
type: 'line',
color: item.color,
lineStyle: {
type: "dashed",
width: 1,
},
data: data.map(o => item.value),
symbol: 'none', // 设置标记点为'none',即去掉圆点
smooth: 0.5
}
})
return { return {
tooltip: { tooltip: {
@ -85,8 +101,8 @@ export default function drpOption(data) {
axisTick: { axisTick: {
show: false, show: false,
}, },
min: Math.floor(max1*0.8), min: Math.floor(min1*0.8),
max: Math.floor(min1*1.2), max: Math.ceil(max1*1.2),
}, },
// { // {
// // gridIndex: 1, // // gridIndex: 1,
@ -120,8 +136,8 @@ export default function drpOption(data) {
// axisTick: { // axisTick: {
// show: false, // show: false,
// }, // },
// min: Math.floor(max2*0.8), // min: Math.floor(min2*0.8),
// max: Math.floor(min2*1.2), // max: Math.ceil(max2*1.2),
// } // }
], ],
series: [ series: [
@ -138,6 +154,7 @@ export default function drpOption(data) {
symbol: 'none', // 设置标记点为'none',即去掉圆点 symbol: 'none', // 设置标记点为'none',即去掉圆点
smooth: 0.5 smooth: 0.5
}, },
...yj
// { // {
// // xAxisIndex: 1, // // xAxisIndex: 1,
// yAxisIndex: 1, // yAxisIndex: 1,

View File

@ -12,7 +12,8 @@ import drpOption from './drpOption';
function ShenLiu({ id, data, dispatch, onCancel }) { function ShenLiu({ id, data, dispatch, onCancel }) {
console.log(data); console.log(data);
const [ tableData, setTableData ] = useState([]) const [ tableData, setTableData ] = useState([])
const option = useMemo(() => drpOption(tableData), [tableData]) const [ yjData, setYjData ] = useState([])
const option = useMemo(() => drpOption(tableData,yjData), [tableData,yjData])
const width = 780; const width = 780;
const closePop = () => { const closePop = () => {
@ -38,7 +39,44 @@ function ShenLiu({ id, data, dispatch, onCancel }) {
setTableData(data) setTableData(data)
} }
const getYjData = async(stationCode)=>{
const params = {
"pageSo": {
"pageSize": 10,
"pageNumber": 1
},
"stationCode": stationCode
}
const { code, data:{records}} = await httppost2(apiurl.gcaqjc.gcaqyj.yjgzpz.page,params)
if(code!==200){
return
}
const linshi = []
records?.map((item)=>{
if(item.status===0){
return
}
if(item.valueOne||0){
linshi.push({
yjName:item.level ===1?'黄色预警':'红色预警',
value:item.valueOne,
color:item.level ===1?'#f1bf42':'red'
})
}
if(item.valueTwo||0){
linshi.push({
yjName:item.level ===1?'黄色预警':'红色预警',
value:item.valueTwo,
color:item.level ===1?'#f1bf42':'red'
})
}
})
setYjData(linshi)
}
useEffect(()=>{ useEffect(()=>{
getYjData(data.stationCode)
getData([moment().add(-1,'months'),moment()],data.stationCode) getData([moment().add(-1,'months'),moment()],data.stationCode)
},[]) },[])

View File

@ -23,7 +23,7 @@ const ToolBar = ({search, defaultParams}) => {
<Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish}> <Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish}>
<Form.Item label="时间段" name="tms"> <Form.Item label="时间段" name="tms">
<RangePicker <RangePicker
allowClear allowClear={false}
defaultValue={[moment().add(-1,'months'),moment()]} defaultValue={[moment().add(-1,'months'),moment()]}
onChange={(e)=>{ onChange={(e)=>{
form.setFieldValue('cysd',null) form.setFieldValue('cysd',null)

View File

@ -1,10 +1,26 @@
export default function drpOption(data) { export default function drpOption(data,yjData) {
console.log("data",data); console.log("data",data);
const maxVal = 0//Math.max(...data.map(obj => obj.drp)) const maxVal = 0//Math.max(...data.map(obj => obj.drp))
const max1 = Math.max(...data.map(obj => obj.value)) const max1 = Math.max(...[...data.map(obj => obj.value),...yjData.map(obj => obj.value)])
const min1 = Math.min(...data.map(obj => obj.value)) const min1 = Math.min(...[...data.map(obj => obj.value),...yjData.map(obj => obj.value)])
const max2 = Math.max(...data.map(obj => obj.rz)) const max2 = Math.max(...data.map(obj => obj.rz))
const min2 = Math.min(...data.map(obj => obj.rz)) const min2 = Math.min(...data.map(obj => obj.rz))
const yj = yjData?.map((item,index)=>{
return {
yAxisIndex: 0,
name: item.yjName,
type: 'line',
color: item.color,
lineStyle: {
type: "dashed",
width: 1,
},
data: data.map(o => item.value),
symbol: 'none', // 设置标记点为'none',即去掉圆点
smooth: 0.5
}
})
return { return {
tooltip: { tooltip: {
@ -85,8 +101,8 @@ export default function drpOption(data) {
axisTick: { axisTick: {
show: false, show: false,
}, },
min: Math.floor(max1*0.8), min: Math.floor(min1*0.8),
max: Math.floor(min1*1.2), max: Math.ceil(max1*1.2),
}, },
{ {
// gridIndex: 1, // gridIndex: 1,
@ -120,8 +136,8 @@ export default function drpOption(data) {
axisTick: { axisTick: {
show: false, show: false,
}, },
min: Math.floor(max2*0.8), min: Math.floor(min2*0.8),
max: Math.floor(min2*1.2), max: Math.ceil(max2*1.2),
} }
], ],
series: [ series: [
@ -151,6 +167,7 @@ export default function drpOption(data) {
symbol: 'none', // 设置标记点为'none',即去掉圆点 symbol: 'none', // 设置标记点为'none',即去掉圆点
smooth: 0.5 smooth: 0.5
}, },
...yj
] ]
}; };
} }

View File

@ -10,10 +10,11 @@ import TableData from './TableData'
import drpOption from './drpOption'; import drpOption from './drpOption';
function ShenYa({ id, data, dispatch, onCancel }) { function ShenYa({ id, data, dispatch, onCancel }) {
console.log(data); console.log('SY',data);
const [ tableData, setTableData ] = useState([]) const [ tableData, setTableData ] = useState([])
const [ yjData, setYjData ] = useState([])
const [ tabVal, setTabVal ] = useState('1') const [ tabVal, setTabVal ] = useState('1')
const option = useMemo(() => drpOption(tableData), [tableData]) const option = useMemo(() => drpOption(tableData,yjData), [tableData,yjData])
const width = 780; const width = 780;
const closePop = () => { const closePop = () => {
@ -40,7 +41,44 @@ function ShenYa({ id, data, dispatch, onCancel }) {
setTableData(data) setTableData(data)
} }
const getYjData = async(stationCode)=>{
const params = {
"pageSo": {
"pageSize": 10,
"pageNumber": 1
},
"stationCode": stationCode
}
const { code, data:{records}} = await httppost2(apiurl.gcaqjc.gcaqyj.yjgzpz.page,params)
if(code!==200){
return
}
const linshi = []
records?.map((item)=>{
if(item.status===0){
return
}
if(item.valueOne||0){
linshi.push({
yjName:item.level ===1?'黄色预警':'红色预警',
value:item.valueOne,
color:item.level ===1?'#f1bf42':'red'
})
}
if(item.valueTwo||0){
linshi.push({
yjName:item.level ===1?'黄色预警':'红色预警',
value:item.valueTwo,
color:item.level ===1?'#f1bf42':'red'
})
}
})
setYjData(linshi)
}
useEffect(()=>{ useEffect(()=>{
getYjData(data.stationCode)
getData([moment().add(-1,'months'),moment()],data.stationCode) getData([moment().add(-1,'months'),moment()],data.stationCode)
},[]) },[])

View File

@ -17,7 +17,7 @@ const ToolBar = ({search, setTabVal}) => {
<Form className='toolbarBox' layout="inline" onFinish={onFinish}> <Form className='toolbarBox' layout="inline" onFinish={onFinish}>
<Form.Item label="时间段" name="imgName"> <Form.Item label="时间段" name="imgName">
<RangePicker <RangePicker
allowClear allowClear={false}
defaultValue={[moment().add(-1,'months'),moment()]} defaultValue={[moment().add(-1,'months'),moment()]}
onChange={onFinish} onChange={onFinish}
style={{ width: "300px" }} style={{ width: "300px" }}

View File

@ -1,10 +1,28 @@
export default function drpOption(data) { export default function drpOption(data,yjData) {
console.log("data",data); console.log("data",data);
const maxVal = 0//Math.max(...data.map(obj => obj.drp)) 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 max1 = Math.max(...data.map(obj => obj.x)) 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 min1 = Math.min(...data.map(obj => obj.x))
const max2 = Math.max(...data.map(obj => obj.rz)) const max2 = Math.max(...data.map(obj => obj.rz))
const min2 = Math.min(...data.map(obj => obj.rz)) const min2 = Math.min(...data.map(obj => obj.rz))
const yj = yjData?.map((item,index)=>{
return {
yAxisIndex: 0,
name: item.yjName,
type: 'line',
color: item.color,
lineStyle: {
type: "dashed",
width: 1,
},
data: data.map(o => item.value),
symbol: 'none', // 设置标记点为'none',即去掉圆点
smooth: 0.5
}
})
return { return {
tooltip: { tooltip: {
@ -31,7 +49,7 @@ export default function drpOption(data) {
{ {
type: 'category', type: 'category',
data: data.map(o => o.tm), data: data.map(o => o.tm),
inverse: true, inverse: false,
splitLine: { splitLine: {
show: false show: false
}, },
@ -85,8 +103,8 @@ export default function drpOption(data) {
axisTick: { axisTick: {
show: false, show: false,
}, },
max: Math.floor(max1*1.2)||100,
min: Math.floor(min1*0.8)||0, min: Math.floor(min1*0.8)||0,
max: Math.ceil(max1*1.2)||100,
}, },
{ {
// gridIndex: 1, // gridIndex: 1,
@ -120,8 +138,8 @@ export default function drpOption(data) {
axisTick: { axisTick: {
show: false, show: false,
}, },
max: Math.floor(max2*1.2),
min: Math.floor(min2*0.8), min: Math.floor(min2*0.8),
max: Math.ceil(max2*1.2),
} }
], ],
series: [ series: [
@ -177,6 +195,7 @@ export default function drpOption(data) {
symbol: 'none', // 设置标记点为'none',即去掉圆点 symbol: 'none', // 设置标记点为'none',即去掉圆点
smooth: 0.5 smooth: 0.5
}, },
...yj
] ]
}; };
} }

View File

@ -12,8 +12,10 @@ import drpOption from './drpOption';
function ShenYa({ id, data, dispatch, onCancel }) { function ShenYa({ id, data, dispatch, onCancel }) {
console.log(data); console.log(data);
const [ tableData, setTableData ] = useState([]) const [ tableData, setTableData ] = useState([])
const [ yjData, setYjData ] = useState([])
const [ tabVal, setTabVal ] = useState('1') const [ tabVal, setTabVal ] = useState('1')
const option = useMemo(() => drpOption(tableData), [tableData]) // const option = useMemo(() => drpOption(tableData), [tableData])
const option = useMemo(() => drpOption(tableData,yjData), [tableData,yjData])
const width = 780; const width = 780;
const closePop = () => { const closePop = () => {
@ -40,7 +42,44 @@ function ShenYa({ id, data, dispatch, onCancel }) {
setTableData(data) setTableData(data)
} }
const getYjData = async(stationCode)=>{
const params = {
"pageSo": {
"pageSize": 10,
"pageNumber": 1
},
"stationCode": stationCode
}
const { code, data:{records}} = await httppost2(apiurl.gcaqjc.gcaqyj.yjgzpz.page,params)
if(code!==200){
return
}
const linshi = []
records?.map((item)=>{
if(item.status===0){
return
}
if(item.valueOne||0){
linshi.push({
yjName:item.level ===1?'黄色预警':'红色预警',
value:item.valueOne,
color:item.level ===1?'#f1bf42':'red'
})
}
if(item.valueTwo||0){
linshi.push({
yjName:item.level ===1?'黄色预警':'红色预警',
value:item.valueTwo,
color:item.level ===1?'#f1bf42':'red'
})
}
})
setYjData(linshi)
}
useEffect(()=>{ useEffect(()=>{
getYjData(data.stationCode)
getData([moment().add(-1,'months'),moment()],data.stationCode) getData([moment().add(-1,'months'),moment()],data.stationCode)
},[]) },[])

View File

@ -17,7 +17,7 @@ const ToolBar = ({search, setTabVal}) => {
<Form className='toolbarBox' layout="inline" onFinish={onFinish}> <Form className='toolbarBox' layout="inline" onFinish={onFinish}>
<Form.Item label="时间段" name="imgName"> <Form.Item label="时间段" name="imgName">
<RangePicker <RangePicker
allowClear allowClear={false}
defaultValue={[moment().add(-1,'months'),moment()]} defaultValue={[moment().add(-1,'months'),moment()]}
onChange={onFinish} onChange={onFinish}
style={{ width: "300px" }} style={{ width: "300px" }}

View File

@ -51,8 +51,8 @@ const Page = () => {
<div className="rf2">{data1.q}</div> <div className="rf2">{data1.q}</div>
</div> </div>
<div style={{marginBottom:'10px', display:'flex'}}> <div style={{marginBottom:'10px', display:'flex'}}>
<div className="lf2" style={{color:'#70B603'}}>7月核定流量: </div> <div className="lf2" style={{color:'#70B603'}}>{data1?.resMonthEcoFlow?.month||'-'}月核定流量: </div>
<div className="rf2" style={{color:'#70B603'}}>{data1.value}</div> <div className="rf2" style={{color:'#70B603'}}>{data1?.resMonthEcoFlow?.value}</div>
</div> </div>
</div> </div>
<div className="home_gongshui_item_text"> <div className="home_gongshui_item_text">

View File

@ -116,7 +116,7 @@ const Page = () => {
</div> </div>
</div> </div>
<div style={{padding:'10px 60px 60px 60px'}}> <div style={{padding:'10px 60px 60px 60px'}}>
<h4>标准文件<a>GB3838-2002地表水环境质量标准.pdf</a></h4> <h4>标准文件<a href='http://local.gunshiiot.com:18083/tsg/GB3838-2002地表水环境质量标准.pdf' target="_blank">GB3838-2002地表水环境质量标准.pdf</a></h4>
<h4>本系统根据以下水质检测项目进行判断</h4> <h4>本系统根据以下水质检测项目进行判断</h4>
<img width={'100%'} src={`${process.env.PUBLIC_URL}/assets/xyt/homeImg/shuizhi2.png`} alt="" /> <img width={'100%'} src={`${process.env.PUBLIC_URL}/assets/xyt/homeImg/shuizhi2.png`} alt="" />
</div> </div>

View File

@ -37,7 +37,7 @@ const Page = ({mySetTms}) => {
const columns2 = [ const columns2 = [
{ title: '上报时间', key: 'finishTime', dataIndex: 'finishTime',align: "center", ellipsis: true }, { title: '上报时间', key: 'finishTime', dataIndex: 'finishTime',align: "center", ellipsis: true },
{ title: '巡检问题描述', key: 'itemDesc', dataIndex: 'itemDesc',align: "center" }, { title: '巡检问题描述', key: 'problemDesc', dataIndex: 'problemDesc',align: "center" },
]; ];
useEffect(()=>{ useEffect(()=>{

View File

@ -12,12 +12,13 @@ const { Panel } = Collapse;
const Page = ({showPanels}) => { const Page = ({showPanels}) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
const [myKey, setMyKey] = useState('1') const [myKey, setMyKey] = useState('1')
const [badgeType, setBadgeType] = useState('雷达回波') const [badgeType, setBadgeType] = useState('')
const [tmObj,setTmObj] = useState({ const [tmObj,setTmObj] = useState({
tm:moment(), tm:moment(),
hours:'08' hours:'08'
}) })
useEffect(()=>{ useEffect(()=>{
setBadgeType('雷达回波')
dispatch.runtime.setCameraTarget({ dispatch.runtime.setCameraTarget({
center: [115.2, 31.18], center: [115.2, 31.18],
zoom: 9, zoom: 9,
@ -66,8 +67,7 @@ const Page = ({showPanels}) => {
</div> </div>
{ {
(badgeType === '雷达回波'&&myKey==='1') (badgeType === '雷达回波'&&myKey==='1') ? (
? (
<div className='radarPageBox'> <div className='radarPageBox'>
<RadarPage <RadarPage
activeKey={'0'} activeKey={'0'}

View File

@ -203,7 +203,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
{mode == "view" ? null : {mode == "view" ? null :
<div style={{display:"flex",alignItems:"center",columnGap:10,color:"#4f85ec",cursor:"pointer"}}> <div style={{display:"flex",alignItems:"center",columnGap:10,color:"#4f85ec",cursor:"pointer"}}>
<PaperClipOutlined /> <PaperClipOutlined />
<a style={{ cursor: "pointer" }}>上传PDF文 <a style={{ cursor: "pointer" }}>上传
<span style={{ marginLeft:10,color:"#dfdfdf" }}>(支持扩展名.xls .xlsx .doc .docx .pdf .jpg .png)</span></a> <span style={{ marginLeft:10,color:"#dfdfdf" }}>(支持扩展名.xls .xlsx .doc .docx .pdf .jpg .png)</span></a>
</div> </div>
} }

View File

@ -203,7 +203,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
{mode == "view" ? null : {mode == "view" ? null :
<div style={{display:"flex",alignItems:"center",columnGap:10,color:"#4f85ec",cursor:"pointer"}}> <div style={{display:"flex",alignItems:"center",columnGap:10,color:"#4f85ec",cursor:"pointer"}}>
<PaperClipOutlined /> <PaperClipOutlined />
<a style={{ cursor: "pointer" }}>上传PDF文 <a style={{ cursor: "pointer" }}>上传
<span style={{ marginLeft:10,color:"#dfdfdf" }}>(支持扩展名.xls .xlsx .doc .docx .pdf .jpg .png)</span></a> <span style={{ marginLeft:10,color:"#dfdfdf" }}>(支持扩展名.xls .xlsx .doc .docx .pdf .jpg .png)</span></a>
</div> </div>
} }

View File

@ -37,7 +37,7 @@ export default function Page({isHome}) {
const columnsSl = [ const columnsSl = [
{ title: '监测点', key: 'stationCode', dataIndex: 'stationCode',align: "center", ellipsis: true }, { title: '监测点', key: 'stationCode', dataIndex: 'stationCode',align: "center", ellipsis: true },
{ title: '监测时间', key: 'tm', dataIndex: 'tm',align: "center",width: 150, ellipsis: true, render:(v,row)=><div style={{color:row.flag===1?'red':'#3B4859'}}>{v?.slice(5,16)}</div> }, { title: '监测时间', key: 'tm', dataIndex: 'tm',align: "center",width: 150, ellipsis: true, render:(v,row)=><div style={{color:row.flag===1?'red':'#3B4859'}}>{v?.slice(5,16)}</div> },
{ title: '渗流量(L/s)', key: 'q', dataIndex: 'q',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.status===1?'red':'#3B4859'}}>{v}</div> }, { title: '渗流量(L/s)', key: 'value', dataIndex: 'value',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.status===1?'red':'#3B4859'}}>{v}</div> },
] ]
const columnsWy = [ const columnsWy = [
@ -57,7 +57,7 @@ export default function Page({isHome}) {
console.log(1111) console.log(1111)
// 大于0:滚轮向上滚动 小于0:滚轮向下滚动 // 大于0:滚轮向上滚动 小于0:滚轮向下滚动
if (e.wheelDelta > 0) { if (e.wheelDelta > 0) {
scale += 0.05; scale += 0.02;
img.style.transform = `scale(${scale})`; img.style.transform = `scale(${scale})`;
} else { } else {
if (scale == 1) { if (scale == 1) {
@ -66,7 +66,7 @@ export default function Page({isHome}) {
} }
// 缩放值大于1时,可以缩小,反之亦然 // 缩放值大于1时,可以缩小,反之亦然
if (scale > 1) { if (scale > 1) {
scale -= 0.05; scale -= 0.02;
img.style.transform = `scale(${scale})`; img.style.transform = `scale(${scale})`;
} }
} }
@ -138,7 +138,7 @@ export default function Page({isHome}) {
setModalData(item) setModalData(item)
}}> }}>
{item.stationCode} {item.stationCode}
<img width={20} src={`${process.env.PUBLIC_URL}/assets/xyt/fxdd/sy.png`} alt="" id="img" draggable="false" /> <img width={20} src={`${process.env.PUBLIC_URL}/assets/xyt/fxdd/${item.status===1?'sy2.png':'sy.png'}`} alt="" id="img" draggable="false" />
</div> </div>
) )
} }
@ -149,7 +149,7 @@ export default function Page({isHome}) {
setModalData(item) setModalData(item)
}}> }}>
{item.stationCode} {item.stationCode}
<img width={20} src={`${process.env.PUBLIC_URL}/assets/xyt/fxdd/sl.png`} alt="" id="img" draggable="false" /> <img width={20} src={`${process.env.PUBLIC_URL}/assets/xyt/fxdd/${item.status===1?'sl2.png':'sl.png'}`} alt="" id="img" draggable="false" />
</div> </div>
) )
} }
@ -160,7 +160,7 @@ export default function Page({isHome}) {
setModalData(item) setModalData(item)
}}> }}>
{item.stationCode} {item.stationCode}
<img width={20} src={`${process.env.PUBLIC_URL}/assets/xyt/fxdd/wy.png`} alt="" id="img" draggable="false" /> <img width={20} src={`${process.env.PUBLIC_URL}/assets/xyt/fxdd/${(item.xstatus===1||item.ystatus===1||item.hstatus===1)?'wy2.png':'wy.png'}`} alt="" id="img" draggable="false" />
</div> </div>
) )
} }

View File

@ -185,6 +185,11 @@
top: 594px; top: 594px;
} }
.gcaqjc_bzt_sl_SL02{
left: 679px;
top: 594px;
}
.gcaqjc_bzt_wy_WY-G100{ .gcaqjc_bzt_wy_WY-G100{
left: 394px; left: 394px;
top: 376px; top: 376px;

View File

@ -74,6 +74,7 @@ const Page = () => {
tm:c.tm tm:c.tm
}))) })))
return { return {
drp:s.drp,
tm: s.tm, tm: s.tm,
rz: s.rz, rz: s.rz,
inx:i+1 inx:i+1

View File

@ -34,7 +34,7 @@ const Page = () => {
const columns4 = [ const columns4 = [
{ {
title: '降雨量(mm)', key: 'drp', dataIndex: 'drp', width: 120, align: "center", title: '降雨量(mm)', key: 'drp', dataIndex: 'drp', width: 120, align: "center",
render: (rec, record) => <span>{ rec ?? "-"}</span> render: (rec, record) => <span>{ record?.drp ?? "-"}</span>
}, },
]; ];
const getDmTree = async() => { const getDmTree = async() => {
@ -76,6 +76,7 @@ const Page = () => {
tm:c.tm tm:c.tm
}))) })))
return { return {
drp:s.drp,
tm: s.tm, tm: s.tm,
rz: s.rz, rz: s.rz,
inx:i+1 inx:i+1

View File

@ -11,9 +11,9 @@ import {CrudOpRender_text} from '../../../components/crud/CrudOpRender';
const Page = () => { const Page = () => {
const role = useSelector(state => state.auth.role); const role = useSelector(state => state.auth.role);
const editBtn = role?.rule?.find(item => item.menuName == "编辑"); const editBtn = role?.rule?.find(item => item.menuName == "编辑") || true;
const viewBtn = role?.rule?.find(item => item.menuName == "查看"); const viewBtn = role?.rule?.find(item => item.menuName == "查看") || true;
const delBtn = role?.rule?.find(item => item.menuName == "删除"); const delBtn = role?.rule?.find(item => item.menuName == "删除") || true;
const expandedRowRender = (record) => { const expandedRowRender = (record) => {
const columns = [ const columns = [
{ {

View File

@ -4,8 +4,8 @@ import NormalSelect from '../../../components/Form/NormalSelect';
import moment from 'moment'; import moment from 'moment';
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;
const ToolBar = ({ setSearchVal, onSave, storeData, role }) => { const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
const addBtn = role?.rule?.find(item => item.menuName == "新增"); const addBtn = role?.rule?.find(item => item.menuName == "新增") || true;
const searchBtn = role?.rule?.find(item => item.menuName == "查询"); const searchBtn = role?.rule?.find(item => item.menuName == "查询") || true;
const [form] = Form.useForm(); const [form] = Form.useForm();
const types = [ const types = [
{ {

View File

@ -0,0 +1,108 @@
import React,{useEffect,useMemo,useState} from 'react'
import { Button, DatePicker, Table } from 'antd';
import { createCrudService } from '../../../components/crud/_';
import usePageTable from '../../../components/crud/usePageTable2';
import moment from 'moment';
import apiurl from '../../../service/apiurl';
import {reservoirmonitor} from '../../../service/sssq'
import ReactEcharts from 'echarts-for-react';
import drpOption from './drpOption';
const {RangePicker} = DatePicker;
export default function KrLine({ record }) {
const tm = [
moment().subtract(7, 'days').add(1, 'hour').set({ minute: 0, second: 0 }),
moment().add(1, 'hour').set({ minute: 0, second: 0 }),
];
const stm = moment().subtract(7, 'days').add(1, 'hour').set({ minute: 0, second: 0 }).format("YYYY-MM-DD HH:mm:ss");
const etm = moment().add(1, 'hour').set({ minute: 0, second: 0 }).format("YYYY-MM-DD HH:mm:ss");
const columns = [
{title: '时间', key: '', dataIndex: '', align: 'center',render:(rec)=>moment(rec.tm).format('MM-DD HH:mm')},
{
title: '水位(m)', key: 'rz', dataIndex: 'rz', align: 'center',
render: (rec) => <span>{rec ? rec.toFixed(2) : "-"}</span>},
{
title: '库容(万m³)', key: 'w', dataIndex: 'w', align: 'center',
render: (rec) => <span>{rec ??"-"}</span>,
},
];
const [data, setData] = useState([]);
const [params, setParams] = useState({})
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.sssq.reservoirmonitor1).find_noCode);
const option = useMemo(() => {
return drpOption({data});
}, [data])
const searchTm = (e) => {
setParams({
...params,
stm: e[0].format("YYYY-MM-DD HH:mm:ss"),
etm: e[1].format("YYYY-MM-DD HH:mm:ss"),
tm:e,
})
};
const doSearch = () => {
const exportParams={
...params,
stm: params.tm[0].format("YYYY-MM-DD HH:mm:ss"),
etm: params.tm[1].format("YYYY-MM-DD HH:mm:ss"),
tm:params.tm,
}
search({ search: exportParams })
// debugger;
getData(exportParams)
}
const getData = async (params) => {
setData(await reservoirmonitor(params));
}
useEffect(() => {
const params = {
search: {
stm,
etm,
stcd:record.stcd
}
}
if (record?.stcd) {
search(params)
getData({stcd:record.stcd,...params.search})
setParams({tm,stcd:record.stcd})
}
}, [record])
return (
<div>
<div className="top-toobar" style={{marginBottom:20,width:"100%"}}>
<RangePicker showTime allowClear style={{width: "330px"}}
onChange={searchTm}
format="YYYY-MM-DD HH:mm"
value={params.tm}
/>
<Button type="primary" onClick={doSearch} style={{marginLeft: "10px"}}>查询</Button>
<Button onClick={()=>setParams({...params,tm,stm,etm})} style={{marginLeft: "10px"}}>重置</Button>
</div>
<div style={{width:"100%"}}>
<Table
columns={columns}
rowKey="inx"
{...tableProps}
scroll={{ y: "calc( 100vh - 700px )" }}
style={{height:"calc( 100vh - 650px )"}}
/>
<div className="top-right" style={{height:"40vh",marginTop:40}}>
{
data.length > 0 ?
<ReactEcharts
option={option}
style={{width: "100%", height: '100%'}}
/> : <div style={{textAlign: "center", margin: "10%"}}>
<img src={`${process.env.PUBLIC_URL}/assets/noData.png`} alt=""/>
</div>
}
</div>
</div>
</div>
)
}

View File

@ -0,0 +1,130 @@
import echarts from 'echarts/lib/echarts'
export default function drpOption ({
data,
}) {
const maxVal = Math.max(...data.map(obj => obj.drp))
// const minVal = Math.min(...data.map(obj => obj.drp))
const maxSw = Math.ceil(Math.max(...data.map(obj => obj.rz)))
const minSw = Math.floor(Math.min(...data.map(obj => obj.rz)))
const maxKr = Math.max(...data.map(obj => obj.w))
const minKr = Math.min(...data.map(obj => obj.w))
return {
tooltip: {
trigger: 'axis'
},
grid: {
top: '18%',
left: '5%',
right: '5%',
width: '90%',
height: '70%'
},
legend: {
// 显示图例
show: true,
left:60
},
xAxis: [
{
type: 'category',
data: data.map(o => o.tm),
inverse: true,
splitLine: {
show: false
},
axisLabel: {
color: '#333',
fontSize: 12,
formatter: val => val.substr('2020-'.length, 11)
},
axisLine: {
lineStyle: {
color: '#07a6ff',
width: 0.5
}
},
axisTick: {
show: false
}
}
],
yAxis: [
{
type: 'value',
position: 'left',
name: '水位(m)',
splitLine: {
show: true,
lineStyle: {
color: '#07a6ff',
width: 0.25,
type: 'dotted'
}
},
axisLabel: {
color: '#333',
fontSize: 12
},
axisLine: {
show: false
},
axisTick: {
show: false
},
min: minSw,
max: maxSw
},
{
type: 'value',
position: 'right',
name: '库容(万m³)',
splitLine: {
show: false,
lineStyle: {
color: '#07a6ff',
width: 0.25,
type: 'dotted'
}
},
axisLabel: {
color: '#333',
fontSize: 12
},
axisLine: {
show: false
},
axisTick: {
show: false
},
min: minKr - 0.1,
max: maxKr + 0.1
}
],
series: [
{
yAxisIndex:0,
name: '水位',
type: 'line',
symbol: 'none',
color: '#0AE0B5',
label: {
show: false
},
data: data.map(o => o.rz ? o.rz.toFixed(2):null )
},
{
yAxisIndex:1,
name: '库容',
type: 'line',
color: '#007AFD',
symbol: 'none',
showSymbol: false,
label: {
show: false
},
data: data.map(o => o.w)
}
]
}
}

View File

@ -0,0 +1,236 @@
import React, { useEffect, useState,useMemo } from 'react'
import { Button ,Modal,Form,Row,Col} from "antd"
import { reservoirlist, } from "../../../service/sssq";
import apiurl from '../../../service/apiurl';
import MyImg from '../../Home/MapCtrl/components/Skssjc/myImg'
import { httppost2, httpget2, httppost5 } from '../../../utils/request';
import NormalSelect from '../../../components/Form/NormalSelect';
import moment from 'moment';
import KrLine from './KrLine';
import "./index.less"
export default function Gsnlfx() {
const month = moment().month() + 1;
const optionsType = Array(12 - month + 1).fill(0).map((item,i) => ({label: (i + month) + "月",value: i + month}))
const typeObj = {
1: "枯 ",
2: "偏枯 ",
3: "平",
4: "偏丰",
5:"丰"
}
const [form] = Form.useForm()
const [tableData, setTableData] = useState([])
const [ssgData, setSsGData] = useState({}) //输水管数据
const [gsDays, setGsDays] = useState()
const [lslOpen, setLslOpen] = useState(false)
const [simailarData, setSimailarData] = useState([])
const [lslData, setlslData] = useState(null)
const getData = async (params) => {
setTableData(await reservoirlist(params));
}
// 相似年下拉
const getSimilarData = async() => {
try {
const res = await httppost2(apiurl.gsxl.zfzl.similar)
setSimailarData(res.data.map(item => ({
label: item.year + "年" + `(${typeObj[item.status]},${item.drp}mm)`,
value:item.year
})))
} catch (error) {
console.log(error);
}
}
// 输水管流量数据
const getInputData = async() => {
try {
const res = await httppost2(apiurl.gsxl.zfzl.input)
const ssg = res.data.find(item => item.sttp == "PQ");
const fsg = res.data.find(item => item.sttp == "QQ");
setSsGData({ssg,fsg})
} catch (error) {
console.log(error);
}
}
// 获取可供水时间
const getWaterTimeData = async(params={}) => {
try {
const res = await httpget2(apiurl.gsxl.zfzl.kyTime,params)
let r = {
type: "可供水天数",
value: Object.keys(res.data)[0],
tm: Object.values(res.data)[0]
}
setGsDays(r)
} catch (error) {
console.log(error);
}
}
const providerWater = useMemo(() => {
if (tableData[0]?.nowCap && tableData[0]?.deadCap) {
let num = ((tableData[0]?.nowCap - tableData[0]?.deadCap) / 10000).toFixed(2)
return num
} else {
return "--"
}
}, [tableData])
const generate = () => {
setLslOpen(true)
}
const computerResult = async() => {
const values = form.getFieldsValue();
try {
const res = await httpget2(apiurl.gsxl.gsWater, values)
if (res.code == 200) {
setLslOpen(false);
setlslData((res.data / 10000).toFixed(2))
getWaterTimeData(values)
}
} catch (error) {
console.log(error);
}
}
useEffect(() => {
let option = {
sources: ["SW", "SK"],
args: "",
};
getData(option)
getInputData()
getWaterTimeData()
getSimilarData()
}, [])
return (
<div div className='content-root clearFloat xybm' style={{ paddingRight: "0", paddingBottom: "0" }}>
<div className="gsnl-content">
<div className='content-left'>
<div className='gb-top-title'>
<span className='gb-top-icon'></span>
<span style={{fontSize:18}}>供水能力分析</span>
</div>
<div className='content-card'>
<div className='card-item'>
<div className='card-title'>
<img alt='' src={`${process.env.PUBLIC_URL}/assets/images/ksw.jpg`} />
<span>当前库水位m</span>
</div>
<div className='card-value'>
<span className='nl-value'>{tableData[0]?.rz ?? "-"}</span>
<span className='nl-time'>{tableData[0]?.drpTm ?? "--"}</span>
</div>
</div>
<div className='card-item'>
<div className='card-title'>
<img alt='' src={`${process.env.PUBLIC_URL}/assets/images/gsl.jpg`} />
<span>可供水量万m³</span>
</div>
<div className='card-value'>
<span className='nl-value'>{providerWater}</span>
<span className='nl-time'>{tableData[0]?.drpTm ?? "--"}</span>
</div>
</div>
<div className='card-item'>
<div className='card-title'>
<img alt='' src={`${process.env.PUBLIC_URL}/assets/images/ggll.jpg`} />
<span>灌溉流量/s</span>
</div>
<div className='card-value'>
<span className='nl-value'>{ssgData?.ssg?.v ?? "--"}</span>
<span className='nl-time'>{ssgData?.ssg?.tm ?? "--"}</span>
</div>
</div>
<div className='card-item'>
<div className='card-title'>
<img alt='' src={`${process.env.PUBLIC_URL}/assets/images/scll.jpg`} />
<span>水厂流量/s</span>
</div>
<div className='card-value'>
<span className='nl-value'>{ssgData?.fsg?.v ?? "--"}</span>
<span className='nl-time'>{ssgData?.fsg?.tm ?? "--"}</span>
</div>
</div>
<div className='card-item'>
<div className='card-title'>
<img alt='' src={`${process.env.PUBLIC_URL}/assets/images/yclsl.jpg`} />
<span>预测来水量万m³</span>
</div>
<div className='yc-content'>
<span className='yc-input'>{lslData ?? "预测生成"}</span>
<Button
type='primary'
style={{ width: "30%", marginBottom: 10, marginLeft: "40%" }}
onClick={generate}
>预测生成</Button>
</div>
</div>
<div className='card-item'>
<div className='card-title' style={{marginBottom:30}}>
<img alt='' src={`${process.env.PUBLIC_URL}/assets/images/gsts.jpg`} />
<span>可供水天数</span>
</div>
<div className='card-value'>
<span className='nl-value'>{gsDays?.value ?? "--"}</span>
<span className='nl-time'>{gsDays?.tm ?? "--"}</span>
</div>
{/* <div className='yc-content'>
<Button type='primary' style={{width:"30%",marginBottom:10,marginLeft:"40%"}}>计算</Button>
</div> */}
</div>
<MyImg record={tableData[0] || {}}/>
</div>
</div>
<div className='content-right'>
<div className='gb-top-title'>
<span className='gb-top-icon'></span>
<span style={{fontSize:18}}>库容过程线</span>
</div>
<KrLine record={tableData[0] || {}}/>
</div>
</div>
<Modal
title="预测来水量"
open={lslOpen}
onCancel={() => setLslOpen(false)}
width={500}
okText="计算"
destroyOnClose
onOk={computerResult}
>
<Form form={form}>
<Row>
<Col span={24}>
<Form.Item
label="选择相似年"
name="year"
rules={[{ required: true }]}
wrapperCol={{span:19}}
labelCol={{span:6}}
>
<NormalSelect options={simailarData} allowClear/>
</Form.Item >
</Col>
</Row>
<Row>
<Col span={24}>
<Form.Item
label="预测截止月份"
name="month"
rules={[{ required: true }]}
wrapperCol={{span:19}}
labelCol={{span:6}}
>
<NormalSelect options={optionsType} allowClear/>
</Form.Item>
</Col>
</Row>
</Form>
</Modal>
</div>
)
}

View File

@ -0,0 +1,83 @@
.gb-top-title{
display: flex;
align-items: center;
column-gap: 10px;
margin-bottom: 10px;
.gb-top-icon{
width: 5px;
height: 20px;
background-color: #0079fe;
}
}
.gsnl-content{
display: flex;
column-gap: 10px;
padding-right:10px;
.content-left{
width: 700px;
padding: 10px;
border: 1px solid #dfdfdf;
border-radius: 5px;
overflow-y: auto;
height: calc( 100vh - 100px);
.content-card{
display: flex;
flex-wrap: wrap;
column-gap: 20px;
padding-top: 10px;
.card-item{
width: 325px;
border: 1px solid #dfdfdf;
border-radius: 5px;
margin-bottom: 20px;
padding: 10px;
padding-bottom: 0;
box-shadow: 5px 5px 5px 0px rgba(0, 0, 0, 0.4);
.card-title{
display: flex;
align-items: center;
column-gap: 10px;
font-size: 18px;
margin-bottom: 10px;
}
.card-value{
display: flex;
align-items: baseline;
flex-wrap: nowrap;
.nl-value{
font-size: 36px;
font-weight: 700;
color:#02a7f0;
}
.nl-time{
font-size: 14px;
font-weight: bold;
}
}
img{
width: 40px;
}
}
.yc-content{
display: flex;
flex-direction: column;
.yc-input{
display: inline-block;
width: 80%;
height: 40px;
padding: 10px;
border-radius: 5px;
background-color: #f0f6ff;
margin-bottom: 15px;
}
}
}
}
.content-right{
width: 850px;
border: 1px solid #dfdfdf;
padding: 10px;
border-radius: 5px;
}
}

View File

@ -18,7 +18,7 @@ const Page = () => {
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" }, { title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" },
{ title: '时间', key: 'tm', dataIndex: 'tm', width: 200, ellipsis: true, align:"center" }, { title: '时间', key: 'tm', dataIndex: 'tm', width: 200, ellipsis: true, align:"center" },
{ {
title: '生态供水', title: '发电灌溉',
align: "center", align: "center",
children: [ children: [
{ {
@ -36,7 +36,7 @@ const Page = () => {
] ]
}, },
{ {
title: '生活供水', title: '水厂取水',
align: "center", align: "center",
children: [ children: [
{ {
@ -62,7 +62,7 @@ const Page = () => {
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" }, { title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" },
{ title: '时间', key: 'tm', dataIndex: 'tm', width: 100, ellipsis: true, align:"center" }, { title: '时间', key: 'tm', dataIndex: 'tm', width: 100, ellipsis: true, align:"center" },
{ {
title: '生态供水', title: '发电灌溉',
align: "center", align: "center",
children: [ children: [
{ {
@ -104,7 +104,7 @@ const Page = () => {
] ]
}, },
{ {
title: '生活供水', title: '水厂取水',
align: "center", align: "center",
children: [ children: [
{ {

View File

@ -4,11 +4,11 @@ let color = ["#73a0fa", "#52c1f5"];
let echartData = [ let echartData = [
{ {
name: "生活供水", name: "生活供水",
value: obj?.shgs value: parseFloat(obj?.shgs?.toFixed(2))
}, },
{ {
name: "生态供水", name: "生态供水",
value: obj?.stgs, value: parseFloat(obj?.stgs?.toFixed(2)),
}, },
]; ];

View File

@ -7,7 +7,8 @@ const ToolBar = ({ setSearchVal, exportFile, role }) => {
const exportBtn = role?.rule?.find(item => item.menuName == "导出"); const exportBtn = role?.rule?.find(item => item.menuName == "导出");
const [form] = Form.useForm(); const [form] = Form.useForm();
const onFinish = (values) => { const onFinish = (values) => {
setSearchVal({...values,year: String(values.year)}); // setSearchVal({...values,year: String(values.year)});
setSearchVal({...values,year: moment(values.year).format("YYYY")});
} }
useEffect(() => { useEffect(() => {

View File

@ -86,8 +86,8 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
const surveyType = [ const surveyType = [
{label:"日常检查排查",value:1}, {label:"日常检查排查",value:1},
{label:"定期普查",value:1}, {label:"定期普查",value:2},
{label:"专项调查",value:1}, {label:"专项调查",value:3},
] ]
const surveyWay = [ const surveyWay = [
{label:"人工排查法",value:1}, {label:"人工排查法",value:1},

View File

@ -241,6 +241,23 @@ const EditableRow = ({ index, ...props }) => {
}) })
return arr return arr
} }
const handleTableData2 = (obj) => {
const names = Object.values(obj)?.[0]?.map(o=>o.teamUserName)
const obj2 = {}
for(let key in obj){
const arr = []
names?.map((name)=>{
obj?.[key]?.map((item)=>{
if(name===item.teamUserName){
arr.push(item)
}
})
})
obj2[key] = arr
}
return obj2
}
// 获取清单查看数据 // 获取清单查看数据
const [qdColumns, setQdColumns] = useState(newcolumns) const [qdColumns, setQdColumns] = useState(newcolumns)
const [qdWidth, setQdWidth] = useState() const [qdWidth, setQdWidth] = useState()
@ -248,7 +265,8 @@ const EditableRow = ({ index, ...props }) => {
try { try {
const res = await httpget2(apiurl.rcgl.jdkh.khrwgl.qdView + `/${id}`) const res = await httpget2(apiurl.rcgl.jdkh.khrwgl.qdView + `/${id}`)
if (res.code == 200) { if (res.code == 200) {
const result = handleTableData(res.data); const linshi = handleTableData2(res.data)//将接口里用户的顺序统一
const result = handleTableData(linshi);
const insertCols = []; const insertCols = [];
result.forEach((item, index, arr) => { result.forEach((item, index, arr) => {
const total = arr?.reduce((total, cur) => total + (cur["assessScore" + index] || 0), 0) const total = arr?.reduce((total, cur) => total + (cur["assessScore" + index] || 0), 0)
@ -355,6 +373,18 @@ const EditableRow = ({ index, ...props }) => {
rectifyStatus:0 rectifyStatus:0
})) }))
} }
if(tableData.length>0){
let flag = true //fasle有位评分的
params.ratings?.map((item)=>{
if(item.assessScore==null){
flag = false
}
})
if(!flag){
message.error('请输入全部考核评分')
return
}
}
try { try {
const res = await httppost2(apiurl.rcgl.jdkh.khrwgl.confirmpf, params) const res = await httppost2(apiurl.rcgl.jdkh.khrwgl.confirmpf, params)
if (res.code == 200) { if (res.code == 200) {

View File

@ -206,6 +206,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
values.standardScore = standardScore1; values.standardScore = standardScore1;
if (mode === 'edit') { if (mode === 'edit') {
values.id = record.id; values.id = record.id;
values.status = record.status;
onEdit(apiurl.rcgl.jdkh.khzbgl.edit,values) onEdit(apiurl.rcgl.jdkh.khzbgl.edit,values)
} }
if (mode === 'save') { if (mode === 'save') {

View File

@ -28,7 +28,7 @@ const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
<div style={{display:'flex',justifyContent:'space-between'}}> <div style={{display:'flex',justifyContent:'space-between'}}>
<Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish}> <Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish}>
{ {
(onSave && addBtn) ? (onSave) ?
<Form.Item> <Form.Item>
<Button onClick={onSave} type='primary'>新增</Button> <Button onClick={onSave} type='primary'>新增</Button>
</Form.Item> </Form.Item>

View File

@ -5,7 +5,7 @@ import moment from 'moment';
import NormalSelect from '../../../../components/Form/NormalSelect'; import NormalSelect from '../../../../components/Form/NormalSelect';
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;
const ToolBar = ({ setSearchVal, onSave, storeData, role }) => { const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
const searchBtn = role?.rule?.find(item => item.menuName == "查询"); const searchBtn = role?.rule?.find(item => item.menuName == "查询")||true;
const [form] = Form.useForm(); const [form] = Form.useForm();
const onFinish = (values) => { const onFinish = (values) => {

View File

@ -18,6 +18,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
values.pointId = record.code; values.pointId = record.code;
if (mode === 'edit') { if (mode === 'edit') {
values.id = record.id; values.id = record.id;
values.status = record.status;
onEdit(apiurl.rcgl.xcxj.xjxpz.edit,values) onEdit(apiurl.rcgl.xcxj.xjxpz.edit,values)
} }
if (mode === 'save') { if (mode === 'save') {

View File

@ -28,7 +28,7 @@ const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
<div style={{display:'flex',justifyContent:'space-between'}}> <div style={{display:'flex',justifyContent:'space-between'}}>
<Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish}> <Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish}>
{ {
(onSave && addBtn) ? (onSave) ?
<Form.Item> <Form.Item>
<Button onClick={onSave} type='primary'>新增</Button> <Button onClick={onSave} type='primary'>新增</Button>
</Form.Item> </Form.Item>

View File

@ -14,7 +14,7 @@ import apiurl from '../../../service/apiurl';
const url = "http://223.75.53.141:9102/test.by-lyf.tmp" const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
const CanvasW = 1080 const CanvasW = 1080
const CanvasH = 640 const CanvasH = 640
const waterRatio = 0 // const waterRatio = 0
const zmobj ={ const zmobj ={
"hpCode": "HP0074208040002120", "hpCode": "HP0074208040002120",
"stcd": "4265630075", "stcd": "4265630075",
@ -177,6 +177,7 @@ const myType = {
const Page = () => { const Page = () => {
const [itemIndex,setItemIndex] = useState(null) const [itemIndex,setItemIndex] = useState(null)
const [waterRatio,setWaterRatio] = useState(0)
const [data,setData] = useState({}) const [data,setData] = useState({})
const [list, setList ] = useState([]) const [list, setList ] = useState([])
const [damList, setDamList ] = useState([]) const [damList, setDamList ] = useState([])
@ -211,6 +212,11 @@ const Page = () => {
if(code!==200){ if(code!==200){
return return
} }
data.map((item)=>{
if(item.type===2){
setWaterRatio(item.value/5||0)
}
})
setList(data) setList(data)
} }
@ -223,7 +229,6 @@ const Page = () => {
data.map((item)=>{ data.map((item)=>{
list.push({ list.push({
...item ...item
// ,realAperture:item.realAperture*1000
}) })
}) })
setDamList(list) setDamList(list)
@ -246,6 +251,12 @@ const Page = () => {
} }
} }
const getNum = (a,b)=>{
const aa = Number(a||0)
const bb = Number(b||0)
const num = Number(aa-bb).toFixed(3)
return num
}
return ( return (
<> <>
@ -330,13 +341,31 @@ const Page = () => {
<div style={{height:'144px',overflowY:'auto',padding:'20px'}}> <div style={{height:'144px',overflowY:'auto',padding:'20px'}}>
{ {
list?.map((item)=>{ list?.map((item)=>{
if(item.type===1){
return ( return (
<div className='sg_zmjk_right_information_content'> <div className='sg_zmjk_right_information_content'>
<div>{myType[item.type]}</div> <div>{myType[item.type]}</div>
<div>112.079 / 1.279</div> <div>{item.value||'-'} / {getNum(item.value,data.inEle)}</div>
<div>07-10 12:09:00</div> <div>{item.tm?.slice(5,19)}</div>
</div> </div>
) )
}else if(item.type===2){
return (
<div className='sg_zmjk_right_information_content'>
<div>{myType[item.type]}</div>
<div>{item.value||'-'} / {getNum(item.value,data.inEle)}</div>
<div>{item.tm?.slice(5,19)}</div>
</div>
)
}else{
return (
<div className='sg_zmjk_right_information_content'>
<div>{myType[item.type]}</div>
<div>{item.value}</div>
<div>{item.tm?.slice(5,19)}</div>
</div>
)
}
}) })
} }
</div> </div>

View File

@ -7,11 +7,11 @@ const ToolBar = ({ setSearchVal }) => {
const [form] = Form.useForm(); const [form] = Form.useForm();
const types = [ const types = [
{ {
label: '培训期数', label: '培训人次',
value: 1 value: 1
}, },
{ {
label: '培训人次', label: '培训期数',
value: 2 value: 2
}, },
] ]

View File

@ -372,7 +372,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
label="参训人员" label="参训人员"
name="trainees" name="trainees"
> >
<InputNumber min={0} disabled={mode==='view'} style={{width:'100%'}} allowClear /> <Input disabled={mode==='view'} style={{width:'100%'}} allowClear />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>

View File

@ -77,9 +77,9 @@ const Page = () => {
const [staData, setStaData] = useState() const [staData, setStaData] = useState()
const pxOptions = useMemo(() => { const pxOptions = useMemo(() => {
if (staData) { if (staData) {
return options(staData) return options(staData,searchChartVal.teamName)
} else { } else {
return options({}) return options({},searchChartVal.teamName)
} }
}, [staData]) }, [staData])
const getStaData = async (params) => { const getStaData = async (params) => {
@ -91,6 +91,9 @@ const Page = () => {
} else { } else {
setStaData({...res.data,list:res.data.list2}) setStaData({...res.data,list:res.data.list2})
} }
}else{
message.error(res.description)
setStaData([])
} }
} catch (error) { } catch (error) {
console.log(error); console.log(error);
@ -133,7 +136,7 @@ const Page = () => {
<div className='second-item'> <div className='second-item'>
<img src={`${process.env.PUBLIC_URL}/assets/images/renchi.jpg`} alt='' /> <img src={`${process.env.PUBLIC_URL}/assets/images/renchi.jpg`} alt='' />
<div className='children-itm'> <div className='children-itm'>
<span>本年培训期数</span> <span>本年培训人次</span>
<span>计划/实际</span> <span>计划/实际</span>
<span><span style={{fontSize:22,fontWeight:"bold"}}>{ staData?.personNum2 ?? 1}</span>&nbsp;人次/ <span><span style={{fontSize:22,fontWeight:"bold"}}>{ staData?.personNum2 ?? 1}</span>&nbsp;人次/
<span style={{fontSize:22,fontWeight:"bold"}}>{ staData?.personNum1 ?? 1}</span>&nbsp;</span> <span style={{fontSize:22,fontWeight:"bold"}}>{ staData?.personNum1 ?? 1}</span>&nbsp;</span>

View File

@ -1,4 +1,4 @@
export default function options(data={}) { export default function options(data={},teamName) {
const xAxisData = data?.list?.map(item => item.month + "月") const xAxisData = data?.list?.map(item => item.month + "月")
const maxCount = data?.list ? Math.ceil(Math.max(...data?.list?.map(obj => [obj.num1,obj.num2]).flat())) : 0 const maxCount = data?.list ? Math.ceil(Math.max(...data?.list?.map(obj => [obj.num1,obj.num2]).flat())) : 0
const minCount = data?.list ? Math.floor(Math.min(...data?.list?.map(obj => [obj.num1, obj.num2]).flat())) : 100 const minCount = data?.list ? Math.floor(Math.min(...data?.list?.map(obj => [obj.num1, obj.num2]).flat())) : 100
@ -36,18 +36,18 @@ export default function options(data={}) {
}, },
xAxis: { xAxis: {
data:xAxisData, data:xAxisData,
axisLine: { // axisLine: {
show: true // 隐藏X轴轴线 // show: false // 隐藏X轴轴线
}, // },
axisTick: { // axisTick: {
show: true // 隐藏X轴轴线 // show: false // 隐藏X轴轴线
}, // },
axisLabel: { // axisLabel: {
show: true, // show: true,
margin: 14, // margin: 14,
// formatter: '{value}月' // // formatter: '{value}月'
} // }
}, },
yAxis: [ yAxis: [
{ {
@ -55,6 +55,7 @@ export default function options(data={}) {
offset: 10, offset: 10,
min: minCount, min: minCount,
max: maxCount, max: maxCount,
// splitLine:false,
axisTick: { axisTick: {
show: false show: false
}, },
@ -71,6 +72,7 @@ export default function options(data={}) {
{ {
type: 'value', type: 'value',
name: '(%)', name: '(%)',
splitLine:false,
min: minRate, min: minRate,
max: maxRate, max: maxRate,
@ -94,7 +96,7 @@ export default function options(data={}) {
], ],
series: [ series: [
{ {
name: '计划期数', name: teamName===1?'计划人次':'计划期数',
type: 'bar', type: 'bar',
barWidth: 25, barWidth: 25,
data: data?.list?.map(item =>item.num2), data: data?.list?.map(item =>item.num2),
@ -103,7 +105,7 @@ export default function options(data={}) {
} }
}, },
{ {
name: '实际期数', name: teamName===1?'实际人次':'实际期数',
type: 'bar', type: 'bar',
barWidth: 25, barWidth: 25,
data: data?.list?.map(item =>item.num1), data: data?.list?.map(item =>item.num1),

View File

@ -36,8 +36,8 @@ const ToolBar = ({ setSearchVal, onSave, storeData, role = [],callback,exportFil
let dateSo; let dateSo;
if (values.tm) { if (values.tm) {
dateSo = { dateSo = {
stm: moment(values.tm[0]).format('YYYY'), stm: moment(values.tm[0]),
etm: moment(values.tm[1]).format('YYYY') etm: moment(values.tm[1])
} }
} }
delete values.tm delete values.tm

View File

@ -290,7 +290,7 @@ const clqkData = [
{ {
label: '结案时间', label: '结案时间',
key: 'closeDate', key: 'closeDate',
type: 'input', type: 'DatePicker',
span: 12 span: 12
}, },
{ {

View File

@ -62,9 +62,9 @@ const Page = ({ mode, onCrudSuccess,record,submit }) => {
...formData, ...formData,
...e, ...e,
caseDate: dayjs(e.caseDate).format("YYYY-MM-DD HH:mm:ss"), caseDate: dayjs(e.caseDate).format("YYYY-MM-DD HH:mm:ss"),
illegalDate: e.illegalDate ? dayjs(e.v).format("YYYY-MM-DD HH:mm:ss") : e.illegalDate, illegalDate: e.illegalDate ? dayjs(e.illegalDate).format("YYYY-MM-DD HH:mm:ss") : null,
closeDate:e.closeDate ? dayjs(e.closeDate).format("YYYY-MM-DD HH:mm:ss") :null,
} }
if (mode == 'save') { if (mode == 'save') {
addBasic(params) addBasic(params)
} else if (mode == 'edit') { } else if (mode == 'edit') {
@ -106,6 +106,9 @@ const Page = ({ mode, onCrudSuccess,record,submit }) => {
if(res.data?.illegalDate){ if(res.data?.illegalDate){
obj.illegalDate=dayjs(res.data.illegalDate) obj.illegalDate=dayjs(res.data.illegalDate)
} }
if(res.data?.closeDate){
obj.closeDate=dayjs(res.data.closeDate)
}
setFormData({...res.data,...obj}) setFormData({...res.data,...obj})
}) })
}else if(mode == 'save'){ }else if(mode == 'save'){

View File

@ -31,7 +31,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
*/ */
const download = (params) => { const download = (params) => {
let downloadLink = document.createElement("a"); let downloadLink = document.createElement("a");
downloadLink.href = `http://local.gunshiiot.com:18083/gunshiApp/tsg/safety/hazard/invest/file/download/${params.fileId}`; downloadLink.href = `http://local.gunshiiot.com:18083/gunshiApp/tsg/dispatchRecord/file/download/${params.fileId}`;
downloadLink.download = `${params.fileName}`; downloadLink.download = `${params.fileName}`;
downloadLink.style.display = "none"; downloadLink.style.display = "none";
// 将链接添加到页面中 // 将链接添加到页面中
@ -206,7 +206,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
<Dragger <Dragger
name='file' name='file'
// multiple // multiple
action="/gunshiApp/tsg/safety/hazard/invest/file/upload/singleSimple" action="/gunshiApp/tsg/dispatchRecord/file/upload/singleSimple"
onChange={fileChange} onChange={fileChange}
onDrop={(info) => { console.log(info.dataTransfer.files); }} onDrop={(info) => { console.log(info.dataTransfer.files); }}
fileList={fileList} fileList={fileList}
@ -219,7 +219,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
</p> </p>
</Dragger> </Dragger>
} }
<Row gutter={[16]}> <Row gutter={[16]} style={{marginTop:"30px"}}>
{ {
fileList?.length > 0 && fileList?.map(file => { fileList?.length > 0 && fileList?.map(file => {
return ( return (
@ -305,7 +305,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
border: 0, border: 0,
marginTop: 20, marginTop: 20,
}} }}
src={`${process.env.PUBLIC_URL}/static/pdf/web/viewer.html?file=${encodeURIComponent(`/gunshiApp/tsg/safety/hazard/invest/file/download/${iframeSrc}`)}`} src={`${process.env.PUBLIC_URL}/static/pdf/web/viewer.html?file=${encodeURIComponent(`/gunshiApp/tsg/dispatchRecord/file/download/${iframeSrc}`)}`}
/> />
</Modal> </Modal>
</> </>

View File

@ -148,6 +148,7 @@ const Page = () => {
<div className='CalendarBox' style={{margin:20}}> <div className='CalendarBox' style={{margin:20}}>
<Calendar <Calendar
mode="month" mode="month"
onChange={onChange} onChange={onChange}
headerRender={({ value, onChange }) => <HeaderRender value={value} onChange={onChange} tm={tm} callback={getData} role={role} />}//doUpload={this.canOp ? this.doUpload : null} headerRender={({ value, onChange }) => <HeaderRender value={value} onChange={onChange} tm={tm} callback={getData} role={role} />}//doUpload={this.canOp ? this.doUpload : null}
dateCellRender={dateCellRender} dateCellRender={dateCellRender}

View File

@ -114,7 +114,7 @@ const ToolBar = ({ value, onChange, tm, callback,role }) => {
<Button <Button
type="primary" type="primary"
className='but4' className='but4'
onClick={() => onChange(moment().subtract(1, 'months'))} onClick={() => onChange(tm.clone().subtract(1, 'month'))}
icon={<LeftOutlined />} icon={<LeftOutlined />}
>上一月</Button> >上一月</Button>
</Form.Item> </Form.Item>
@ -152,7 +152,7 @@ const ToolBar = ({ value, onChange, tm, callback,role }) => {
<Button <Button
type="primary" type="primary"
className='but4' className='but4'
onClick={() => onChange(moment().startOf('month'))} onClick={() => onChange(tm.clone().add(1, 'month'))}
icon={<RightOutlined />} icon={<RightOutlined />}
>下一月</Button> >下一月</Button>
</Form.Item> </Form.Item>

View File

@ -20,7 +20,7 @@ const ToolBar = ({ setSearchVal, onSave, exportFile,role }) => {
} }
} }
delete values.tm delete values.tm
setSearchVal({...values, startTime:dateSo?.start,endTime:dateSo?.end}); setSearchVal({...values, dateSo});
} }
@ -31,7 +31,7 @@ const ToolBar = ({ setSearchVal, onSave, exportFile,role }) => {
end:moment(time[1]).format('YYYY-MM-DD 23:59:59'), end:moment(time[1]).format('YYYY-MM-DD 23:59:59'),
} }
form.setFieldValue("tm",time) form.setFieldValue("tm",time)
setSearchVal(dateSo) setSearchVal({dateSo})
}, []) }, [])
return ( return (
<> <>