fix(): 预警规则配置bug修复
parent
99b0a5e9c0
commit
f579043c5b
|
|
@ -84,7 +84,7 @@ const apiurl = {
|
||||||
},
|
},
|
||||||
syjc: {
|
syjc: {
|
||||||
page: service_ykz + '/osmoticPressRReal/page',
|
page: service_ykz + '/osmoticPressRReal/page',
|
||||||
export: service_ykz + '/osmoticPressRReal/export',
|
export: service_ykz + '/osmoticPressR/export',
|
||||||
list:service_ykz + '/osmoticPressR/list'
|
list:service_ykz + '/osmoticPressR/list'
|
||||||
},
|
},
|
||||||
cdgl: {
|
cdgl: {
|
||||||
|
|
@ -210,6 +210,8 @@ const apiurl = {
|
||||||
jynbb: service_ykz + '/statistics/rjyNb',//降雨年报表上方表格
|
jynbb: service_ykz + '/statistics/rjyNb',//降雨年报表上方表格
|
||||||
jynbbExport:service_ykz + '/statistics/rjyNb/export',//降雨年报表下方总结栏
|
jynbbExport:service_ykz + '/statistics/rjyNb/export',//降雨年报表下方总结栏
|
||||||
jynbbSummary: service_ykz + '/statistics/rjyNb/stat',//降雨年报表导出
|
jynbbSummary: service_ykz + '/statistics/rjyNb/stat',//降雨年报表导出
|
||||||
|
swybb:service_ykz + '/statistics/yb',
|
||||||
|
swybbExport:service_ykz + "/statistics/yb/export",//月报表导出
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
systemM: {
|
systemM: {
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,13 @@ const Page = () => {
|
||||||
0: '闸后流量',
|
0: '闸后流量',
|
||||||
1: '雨量',
|
1: '雨量',
|
||||||
2: '闸前水位',
|
2: '闸前水位',
|
||||||
3:'闸后水位'
|
3: '闸后水位'
|
||||||
}
|
}
|
||||||
|
|
||||||
const bbType = {
|
const bbType = {
|
||||||
0: '日报表',
|
0: '日报表',
|
||||||
1: '年报表',
|
1: '年报表',
|
||||||
|
2:'月报表'
|
||||||
}
|
}
|
||||||
const [searchVal, setSearchVal] = useState(false)
|
const [searchVal, setSearchVal] = useState(false)
|
||||||
const [requsetUrlObj, setRequsetUrlObj] = useState({})
|
const [requsetUrlObj, setRequsetUrlObj] = useState({})
|
||||||
|
|
@ -46,14 +47,8 @@ const Page = () => {
|
||||||
];
|
];
|
||||||
|
|
||||||
const dayColumns = [
|
const dayColumns = [
|
||||||
{ title: '日期', key: 'date', dataIndex: 'date', width: 120, align: "center", fixed: "left" },
|
{ title: '日期', key: 'date', dataIndex: 'date', width: 120, align: "center", render: (v, r, i) => <span>{v ? `${v}号`: ''}</span>},
|
||||||
...Array(30).fill(0).map((item, index) => ({
|
{title: '监测值', key: 'data', dataIndex: 'data', width: 120, align: "center",}
|
||||||
title: `${index + 1}天`,
|
|
||||||
key: `drpM${index + 1}`,
|
|
||||||
dataIndex: `drpM${index + 1}`,
|
|
||||||
width: 100,
|
|
||||||
align: "center",
|
|
||||||
}))
|
|
||||||
];
|
];
|
||||||
const yearColumns = [
|
const yearColumns = [
|
||||||
{ title: '日期', key: 'date', dataIndex: 'date', width: 120, align: "center", fixed: "left" },
|
{ title: '日期', key: 'date', dataIndex: 'date', width: 120, align: "center", fixed: "left" },
|
||||||
|
|
@ -80,9 +75,9 @@ const Page = () => {
|
||||||
changeColumns.forEach((item, i) => {
|
changeColumns.forEach((item, i) => {
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
if (i < 17) {
|
if (i < 17) {
|
||||||
item.sorter = (a,b) => a[`drpH${i + 8}`] - b[`drpH${i + 8}`]
|
item.sorter = (a, b) => a[`drpH${i + 8}`] - b[`drpH${i + 8}`]
|
||||||
} else {
|
} else {
|
||||||
item.sorter = (a,b) => a[`drpH${i - 16}`] - b[`drpH${i - 16}`]
|
item.sorter = (a, b) => a[`drpH${i - 16}`] - b[`drpH${i - 16}`]
|
||||||
}
|
}
|
||||||
cols.push({
|
cols.push({
|
||||||
...item,
|
...item,
|
||||||
|
|
@ -118,33 +113,33 @@ const Page = () => {
|
||||||
// 年报表总结栏
|
// 年报表总结栏
|
||||||
const getStaData = async (params) => {
|
const getStaData = async (params) => {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
try {
|
try {
|
||||||
const res = await httppost2(requsetUrlObjRef.current?.yearSummary, params)
|
const res = await httppost2(requsetUrlObjRef.current?.yearSummary, params)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
res.data.list?.forEach(item => {
|
res.data.list?.forEach(item => {
|
||||||
if (!obj[item.date]) {
|
if (!obj[item.date]) {
|
||||||
let arr = Object.keys(item)
|
let arr = Object.keys(item)
|
||||||
params.type == 1 ? arr.splice(0,1) :arr.splice(0,2)
|
params.type == 1 ? arr.splice(0, 1) : arr.splice(0, 2)
|
||||||
obj[item.date] = arr.map(o => ({[o]:item[o]}))
|
obj[item.date] = arr.map(o => ({ [o]: item[o] }))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
setStaData({...res.data,list:obj})
|
setStaData({ ...res.data, list: obj })
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 导出
|
// 导出
|
||||||
const exportExcel = () => {
|
const exportExcel = () => {
|
||||||
let params = {
|
let params = {
|
||||||
...searchVal,
|
...searchVal,
|
||||||
}
|
}
|
||||||
const fileName =
|
const fileName =
|
||||||
(searchVal?.type1 != 1 ?
|
(searchVal?.type1 == 0 ?
|
||||||
`${formatDate(searchVal?.dateRangeSo?.start)} - ${formatDate(searchVal?.dateRangeSo?.end)}` :
|
`${formatDate(searchVal?.dateRangeSo?.start)} - ${formatDate(searchVal?.dateRangeSo?.end)}` :
|
||||||
searchVal.year) + projectType[searchVal.type] + bbType[searchVal.type1]
|
searchVal?.type1 == 1 ?formatDate(searchVal.year):
|
||||||
httppost5(requsetUrlObjRef.current?.export, params).then(res => {
|
formatDate(searchVal.yearMonth)) + projectType[searchVal.type] + bbType[searchVal.type1]
|
||||||
|
httppost5(requsetUrlObjRef.current?.export, params).then(res => {
|
||||||
exportFile(`${fileName}.xlsx`, res.data)
|
exportFile(`${fileName}.xlsx`, res.data)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -153,7 +148,7 @@ const Page = () => {
|
||||||
let urlObj;
|
let urlObj;
|
||||||
let obj = {
|
let obj = {
|
||||||
page: type == 0 ? apiurl.gcyx.tjbb.swrbb : apiurl.gcyx.tjbb.swnbb,
|
page: type == 0 ? apiurl.gcyx.tjbb.swrbb : apiurl.gcyx.tjbb.swnbb,
|
||||||
export: type == 0 ? apiurl.gcyx.tjbb.swrbbExport : apiurl.gcyx.tjbb.swnbbExport,
|
export: type == 0 ? apiurl.gcyx.tjbb.swrbbExport : type == 1 ?apiurl.gcyx.tjbb.swnbbExport: apiurl.gcyx.tjbb.swybbExport,
|
||||||
yearSummary: type == 1 ? apiurl.gcyx.tjbb.swnbbSummary : ''
|
yearSummary: type == 1 ? apiurl.gcyx.tjbb.swnbbSummary : ''
|
||||||
}
|
}
|
||||||
switch (name) {
|
switch (name) {
|
||||||
|
|
@ -163,8 +158,8 @@ const Page = () => {
|
||||||
case 1:
|
case 1:
|
||||||
urlObj = {
|
urlObj = {
|
||||||
page: type == 0 ? apiurl.gcyx.tjbb.jyrbb : apiurl.gcyx.tjbb.jynbb,
|
page: type == 0 ? apiurl.gcyx.tjbb.jyrbb : apiurl.gcyx.tjbb.jynbb,
|
||||||
export: type == 0 ? apiurl.gcyx.tjbb.jyrbbExport : apiurl.gcyx.tjbb.jynbbExport,
|
export: type == 0 ? apiurl.gcyx.tjbb.jyrbbExport :type == 1 ? apiurl.gcyx.tjbb.jynbbExport: apiurl.gcyx.tjbb.swybbExport,
|
||||||
yearSummary:type == 1 ? apiurl.gcyx.tjbb.jynbbSummary : ''
|
yearSummary: type == 1 ? apiurl.gcyx.tjbb.jynbbSummary : ''
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
|
@ -179,17 +174,32 @@ const Page = () => {
|
||||||
return urlObj
|
return urlObj
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const [monthData, setMonthData] = useState([])
|
||||||
|
const getMonthData = async (params) => {
|
||||||
|
try {
|
||||||
|
const res = await httppost2(apiurl.gcyx.tjbb.swybb, params)
|
||||||
|
if (res.code == 200) {
|
||||||
|
const silceData = res.data.slice(-3)
|
||||||
|
setData(res.data.slice(0,-3))
|
||||||
|
setMonthData(silceData)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
const formatDate = (date1) => {
|
const formatDate = (date1) => {
|
||||||
const date = new Date(date1);
|
const date = new Date(date1);
|
||||||
const year = date.getFullYear();
|
const year = date.getFullYear();
|
||||||
const month = date.getMonth() + 1;
|
const month = date.getMonth() + 1;
|
||||||
const day = date.getDate();
|
const day = date.getDate();
|
||||||
|
const res = searchVal.type1 == 0 ? year + '年' + month + '月' + day + '日' :
|
||||||
return year + '年' + month + '月' + day + '日';
|
searchVal.type1 == 1 ? year + '年' :
|
||||||
|
year + '年' + month + '月'
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (searchVal) {
|
if (searchVal && searchVal.type1 != 1 && searchVal.type1 != 2) {
|
||||||
const params = { ...searchVal }
|
const params = { ...searchVal }
|
||||||
setRequsetUrlObj(getUrl(searchVal.type, searchVal.type1))
|
setRequsetUrlObj(getUrl(searchVal.type, searchVal.type1))
|
||||||
requsetUrlObjRef.current = getUrl(searchVal.type, searchVal.type1)
|
requsetUrlObjRef.current = getUrl(searchVal.type, searchVal.type1)
|
||||||
|
|
@ -198,6 +208,10 @@ const Page = () => {
|
||||||
if (searchVal.type1 == 1) {
|
if (searchVal.type1 == 1) {
|
||||||
getStaData(searchVal)
|
getStaData(searchVal)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (searchVal.type1 == 2) {
|
||||||
|
getMonthData(searchVal)
|
||||||
|
}
|
||||||
}, [searchVal])
|
}, [searchVal])
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -215,11 +229,17 @@ const Page = () => {
|
||||||
<Table
|
<Table
|
||||||
title={() => (
|
title={() => (
|
||||||
<>
|
<>
|
||||||
<h2 style={{ textAlign: "center" }}>{searchVal?.type1 != 1 ? `${formatDate(searchVal?.dateRangeSo?.start)} - ${formatDate(searchVal?.dateRangeSo?.end)}` : searchVal.year}{projectType[searchVal.type]}{bbType[searchVal.type1]}</h2>
|
<h2 style={{ textAlign: "center" }}>
|
||||||
|
{searchVal?.type1 == 0 ?
|
||||||
|
`${formatDate(searchVal?.dateRangeSo?.start)} - ${formatDate(searchVal?.dateRangeSo?.end)}` :
|
||||||
|
searchVal?.type1 == 1 ?
|
||||||
|
formatDate(searchVal.year):formatDate(searchVal.yearMonth)
|
||||||
|
}
|
||||||
|
{projectType[searchVal.type]}{bbType[searchVal.type1]}</h2>
|
||||||
<div style={{ textAlign: "right" }}>单位:{searchVal?.type != 1 ? 'm' : 'mm'}</div>
|
<div style={{ textAlign: "right" }}>单位:{searchVal?.type != 1 ? 'm' : 'mm'}</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
columns={searchVal.type1 == 0 ? newTimeColumns : searchVal.type1 == 1 ? yearColumns : yearColumns}
|
columns={searchVal.type1 == 0 ? newTimeColumns : searchVal.type1 == 1 ? yearColumns : dayColumns}
|
||||||
rowKey="date"
|
rowKey="date"
|
||||||
dataSource={data}
|
dataSource={data}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
|
|
@ -227,113 +247,127 @@ const Page = () => {
|
||||||
summary={(pageData) => {
|
summary={(pageData) => {
|
||||||
return (
|
return (
|
||||||
searchVal.type1 == 1 ?
|
searchVal.type1 == 1 ?
|
||||||
searchVal.type != 1 ?
|
searchVal.type != 1 ?
|
||||||
<Table.Summary fixed>
|
<Table.Summary fixed>
|
||||||
<Table.Summary.Row>
|
<Table.Summary.Row>
|
||||||
<Table.Summary.Cell index={100} align='center' className="xyt-custom-cell">
|
<Table.Summary.Cell index={100} align='center' className="xyt-custom-cell">
|
||||||
<div className='table-summary-ceil'>
|
<div className='table-summary-ceil'>
|
||||||
<div className='summary-left'></div>
|
<div className='summary-left'></div>
|
||||||
<div className='summary-right'>平均</div>
|
<div className='summary-right'>平均</div>
|
||||||
</div>
|
</div>
|
||||||
</Table.Summary.Cell>
|
</Table.Summary.Cell>
|
||||||
{staData?.list?.["平均"]?.map((item, index) => (
|
{staData?.list?.["平均"]?.map((item, index) => (
|
||||||
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</Table.Summary.Row>
|
</Table.Summary.Row>
|
||||||
<Table.Summary.Row>
|
<Table.Summary.Row>
|
||||||
<Table.Summary.Cell index={121} align='center' className="xyt-custom-cell">
|
<Table.Summary.Cell index={121} align='center' className="xyt-custom-cell">
|
||||||
<div className='table-summary-ceil'>
|
<div className='table-summary-ceil'>
|
||||||
<div className='summary-left'></div>
|
<div className='summary-left'></div>
|
||||||
<div className='summary-right'>最高</div>
|
<div className='summary-right'>最高</div>
|
||||||
</div>
|
</div>
|
||||||
</Table.Summary.Cell>
|
</Table.Summary.Cell>
|
||||||
{staData?.list?.["最高"]?.map((item, index) => (
|
{staData?.list?.["最高"]?.map((item, index) => (
|
||||||
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</Table.Summary.Row>
|
</Table.Summary.Row>
|
||||||
<Table.Summary.Row>
|
<Table.Summary.Row>
|
||||||
<Table.Summary.Cell index={46} align='center' className="xyt-custom-cell">
|
<Table.Summary.Cell index={46} align='center' className="xyt-custom-cell">
|
||||||
<div className='table-summary-ceil'>
|
<div className='table-summary-ceil'>
|
||||||
<div className='summary-left'>月统计</div>
|
<div className='summary-left'>月统计</div>
|
||||||
<div className='summary-right'>最高日期</div>
|
<div className='summary-right'>最高日期</div>
|
||||||
</div>
|
</div>
|
||||||
</Table.Summary.Cell>
|
</Table.Summary.Cell>
|
||||||
{staData?.list?.["最高日期"]?.map((item, index) => (
|
{staData?.list?.["最高日期"]?.map((item, index) => (
|
||||||
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</Table.Summary.Row>
|
</Table.Summary.Row>
|
||||||
<Table.Summary.Row>
|
<Table.Summary.Row>
|
||||||
<Table.Summary.Cell index={156} align='center' className="xyt-custom-cell">
|
<Table.Summary.Cell index={156} align='center' className="xyt-custom-cell">
|
||||||
<div className='table-summary-ceil'>
|
<div className='table-summary-ceil'>
|
||||||
<div className='summary-left'></div>
|
<div className='summary-left'></div>
|
||||||
<div className='summary-right'>最低</div>
|
<div className='summary-right'>最低</div>
|
||||||
</div>
|
</div>
|
||||||
</Table.Summary.Cell>
|
</Table.Summary.Cell>
|
||||||
{staData?.list?.["最低"]?.map((item, index) => (
|
{staData?.list?.["最低"]?.map((item, index) => (
|
||||||
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</Table.Summary.Row>
|
</Table.Summary.Row>
|
||||||
<Table.Summary.Row>
|
<Table.Summary.Row>
|
||||||
<Table.Summary.Cell index={155} align='center' className="xyt-custom-cell" >
|
<Table.Summary.Cell index={155} align='center' className="xyt-custom-cell" >
|
||||||
<div className='table-summary-ceil'>
|
<div className='table-summary-ceil'>
|
||||||
<div className='summary-left'></div>
|
<div className='summary-left'></div>
|
||||||
<div className='summary-right'>最低日期</div>
|
<div className='summary-right'>最低日期</div>
|
||||||
</div>
|
</div>
|
||||||
</Table.Summary.Cell>
|
</Table.Summary.Cell>
|
||||||
{staData?.list?.["最低日期"]?.map((item, index) => (
|
{staData?.list?.["最低日期"]?.map((item, index) => (
|
||||||
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</Table.Summary.Row>
|
</Table.Summary.Row>
|
||||||
<Table.Summary.Row>
|
<Table.Summary.Row>
|
||||||
<Table.Summary.Cell index={200} align='center' >年统计</Table.Summary.Cell>
|
<Table.Summary.Cell index={200} align='center' >年统计</Table.Summary.Cell>
|
||||||
<Table.Summary.Cell index={1} align='center' >最高水位</Table.Summary.Cell>
|
<Table.Summary.Cell index={1} align='center' >最高水位</Table.Summary.Cell>
|
||||||
<Table.Summary.Cell index={2} align='center' colSpan={3}>{staData?.max}</Table.Summary.Cell>
|
<Table.Summary.Cell index={2} align='center' colSpan={3}>{staData?.max}</Table.Summary.Cell>
|
||||||
<Table.Summary.Cell index={3} align='center'>最低水位</Table.Summary.Cell>
|
<Table.Summary.Cell index={3} align='center'>最低水位</Table.Summary.Cell>
|
||||||
<Table.Summary.Cell index={4} align='center' colSpan={3}>{staData?.min}</Table.Summary.Cell>
|
<Table.Summary.Cell index={4} align='center' colSpan={3}>{staData?.min}</Table.Summary.Cell>
|
||||||
<Table.Summary.Cell index={3} align='center'>平均水位</Table.Summary.Cell>
|
<Table.Summary.Cell index={3} align='center'>平均水位</Table.Summary.Cell>
|
||||||
<Table.Summary.Cell index={4} align='center' colSpan={3}>{staData?.avg}</Table.Summary.Cell>
|
<Table.Summary.Cell index={4} align='center' colSpan={3}>{staData?.avg}</Table.Summary.Cell>
|
||||||
</Table.Summary.Row>
|
</Table.Summary.Row>
|
||||||
</Table.Summary> :
|
</Table.Summary> :
|
||||||
<Table.Summary fixed>
|
<Table.Summary fixed>
|
||||||
<Table.Summary.Row>
|
<Table.Summary.Row>
|
||||||
<Table.Summary.Cell index={100} align='center' >月降雨量</Table.Summary.Cell>
|
<Table.Summary.Cell index={100} align='center' >月降雨量</Table.Summary.Cell>
|
||||||
{staData?.list?.["月降雨量"]?.map((item, index) => (
|
{staData?.list?.["月降雨量"]?.map((item, index) => (
|
||||||
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</Table.Summary.Row>
|
</Table.Summary.Row>
|
||||||
<Table.Summary.Row>
|
<Table.Summary.Row>
|
||||||
<Table.Summary.Cell index={21} align='center' >降雨日数</Table.Summary.Cell>
|
<Table.Summary.Cell index={21} align='center' >降雨日数</Table.Summary.Cell>
|
||||||
{staData?.list?.["降雨日数"]?.map((item, index) => (
|
{staData?.list?.["降雨日数"]?.map((item, index) => (
|
||||||
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</Table.Summary.Row>
|
</Table.Summary.Row>
|
||||||
<Table.Summary.Row>
|
<Table.Summary.Row>
|
||||||
<Table.Summary.Cell index={22} align='center' >最大日量</Table.Summary.Cell>
|
<Table.Summary.Cell index={22} align='center' >最大日量</Table.Summary.Cell>
|
||||||
{staData?.list?.["最大日量"]?.map((item, index) => (
|
{staData?.list?.["最大日量"]?.map((item, index) => (
|
||||||
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</Table.Summary.Row>
|
</Table.Summary.Row>
|
||||||
<Table.Summary.Row>
|
<Table.Summary.Row>
|
||||||
<Table.Summary.Cell index={12} align='center' >年统计</Table.Summary.Cell>
|
<Table.Summary.Cell index={12} align='center' >年统计</Table.Summary.Cell>
|
||||||
<Table.Summary.Cell index={1} align='center' colSpan={3}>降水量</Table.Summary.Cell>
|
<Table.Summary.Cell index={1} align='center' colSpan={3}>降水量</Table.Summary.Cell>
|
||||||
<Table.Summary.Cell index={2} align='center' colSpan={3}>{staData?.drpSum}</Table.Summary.Cell>
|
<Table.Summary.Cell index={2} align='center' colSpan={3}>{staData?.drpSum}</Table.Summary.Cell>
|
||||||
<Table.Summary.Cell index={3} align='center' colSpan={3}>降雨日数</Table.Summary.Cell>
|
<Table.Summary.Cell index={3} align='center' colSpan={3}>降雨日数</Table.Summary.Cell>
|
||||||
<Table.Summary.Cell index={4} align='center' colSpan={3}>{staData?.dayCount}</Table.Summary.Cell>
|
<Table.Summary.Cell index={4} align='center' colSpan={3}>{staData?.dayCount}</Table.Summary.Cell>
|
||||||
</Table.Summary.Row>
|
</Table.Summary.Row>
|
||||||
</Table.Summary>
|
</Table.Summary>
|
||||||
: null
|
:
|
||||||
|
searchVal.type1 == 2 ?<Table.Summary fixed>
|
||||||
|
<Table.Summary.Row>
|
||||||
|
<Table.Summary.Cell index={12} align='center' >月平均</Table.Summary.Cell>
|
||||||
|
<Table.Summary.Cell index={12} align='center' >{monthData[0]?.data}</Table.Summary.Cell>
|
||||||
|
</Table.Summary.Row>
|
||||||
|
<Table.Summary.Row>
|
||||||
|
<Table.Summary.Cell index={12} align='center' >月最大</Table.Summary.Cell>
|
||||||
|
<Table.Summary.Cell index={12} align='center' >{monthData[1]?.data}</Table.Summary.Cell>
|
||||||
|
</Table.Summary.Row>
|
||||||
|
<Table.Summary.Row>
|
||||||
|
<Table.Summary.Cell index={12} align='center' >月最小</Table.Summary.Cell>
|
||||||
|
<Table.Summary.Cell index={12} align='center' >{monthData[2]?.data}</Table.Summary.Cell>
|
||||||
|
</Table.Summary.Row>
|
||||||
|
</Table.Summary>:null
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
import React, { useEffect,useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { Form, Input, Button, DatePicker } from 'antd';
|
import { Form, Input, Button, DatePicker } from 'antd';
|
||||||
import NormalSelect from '../../../../components/Form/NormalSelect';
|
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, exportFile1 }) => {
|
const ToolBar = ({ setSearchVal, onSave, storeData, exportFile1 }) => {
|
||||||
const start = moment().subtract(7,'days').format('YYYY-MM-DD 00:00:00')
|
const start = moment().subtract(7, 'days').format('YYYY-MM-DD 00:00:00')
|
||||||
const end = moment().format('YYYY-MM-DD 23:59:59')
|
const end = moment().format('YYYY-MM-DD 23:59:59')
|
||||||
const types = [
|
const types = [
|
||||||
{
|
{
|
||||||
|
|
@ -31,10 +31,10 @@ const ToolBar = ({ setSearchVal, onSave, storeData, exportFile1 }) => {
|
||||||
label: "日报表",
|
label: "日报表",
|
||||||
value: 0
|
value: 0
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// label: "月报表",
|
label: "月报表",
|
||||||
// value: 1
|
value: 2
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
label: "年报表",
|
label: "年报表",
|
||||||
value: 1
|
value: 1
|
||||||
|
|
@ -50,34 +50,34 @@ const ToolBar = ({ setSearchVal, onSave, storeData, exportFile1 }) => {
|
||||||
dateRangeSo = timeType == 0 ? {
|
dateRangeSo = timeType == 0 ? {
|
||||||
start: moment(values.tm[0]).format('YYYY-MM-DD HH:mm:ss'),
|
start: moment(values.tm[0]).format('YYYY-MM-DD HH:mm:ss'),
|
||||||
end: moment(values.tm[1]).format('YYYY-MM-DD HH:mm:ss')
|
end: moment(values.tm[1]).format('YYYY-MM-DD HH:mm:ss')
|
||||||
} : {year: moment(values.tm).format('YYYY')}
|
} : timeType == 1 ? { year: moment(values.tm).format('YYYY') }:{ yearMonth: moment(values.tm).format('YYYY-MM') }
|
||||||
}
|
}
|
||||||
delete values.tm
|
delete values.tm
|
||||||
const params = timeType == 0 ? dateRangeSo : undefined;
|
const params = timeType == 0 ? dateRangeSo : undefined;
|
||||||
setSearchVal({
|
setSearchVal({
|
||||||
...values,
|
...values,
|
||||||
dateRangeSo: params,
|
dateRangeSo: params,
|
||||||
year: timeType == 1 ? dateRangeSo.year : undefined
|
year: timeType == 1 ? dateRangeSo.year : undefined,
|
||||||
|
yearMonth:timeType == 2 ? dateRangeSo.yearMonth : undefined
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const onValuesChange = (val) => {
|
const onValuesChange = (val) => {
|
||||||
if ('type1' in val) {
|
if ('type1' in val) {
|
||||||
setTimeType(val.type1)
|
setTimeType(val.type1)
|
||||||
val.type1 == 1 ? form.setFieldValue('tm', moment()) :
|
val.type1 == 0 ? form.setFieldValue('tm', [moment(start), moment(end)]) : form.setFieldValue('tm', moment())
|
||||||
form.setFieldValue('tm',[moment(start),moment(end)])
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
form.setFieldValue('tm',[moment(start),moment(end)])
|
form.setFieldValue('tm', [moment(start), moment(end)])
|
||||||
form.setFieldValue('type1', 0)
|
form.setFieldValue('type1', 0)
|
||||||
form.setFieldValue('type', 0)
|
form.setFieldValue('type', 0)
|
||||||
setSearchVal({type1:0,type:0,dateRangeSo:{start:start,end:end}})
|
setSearchVal({ type1: 0, type: 0, dateRangeSo: { start: start, end: end } })
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div style={{display:'flex',justifyContent:'space-between'}}>
|
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||||
<Form
|
<Form
|
||||||
form={form}
|
form={form}
|
||||||
className='toolbarBox'
|
className='toolbarBox'
|
||||||
|
|
@ -86,37 +86,36 @@ const ToolBar = ({ setSearchVal, onSave, storeData, exportFile1 }) => {
|
||||||
onValuesChange={onValuesChange}
|
onValuesChange={onValuesChange}
|
||||||
>
|
>
|
||||||
<Form.Item label="统计项目" name="type">
|
<Form.Item label="统计项目" name="type">
|
||||||
<NormalSelect allowClear style={{ width: '150px' }} options={types} />
|
<NormalSelect allowClear style={{ width: '150px' }} options={types} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="统计维度" name="type1">
|
<Form.Item label="统计维度" name="type1">
|
||||||
<NormalSelect allowClear style={{ width: '150px' }} options={types1} />
|
<NormalSelect allowClear style={{ width: '150px' }} options={types1} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="统计时间" name="tm">
|
<Form.Item label="统计时间" name="tm">
|
||||||
{timeType == 0 ?
|
{timeType == 0 ?
|
||||||
<RangePicker
|
<RangePicker
|
||||||
|
allowClear
|
||||||
|
style={{ width: "330px" }}
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
/> : timeType == 1 ?
|
||||||
|
<DatePicker
|
||||||
allowClear
|
allowClear
|
||||||
style={{ width: "330px" }}
|
style={{ width: "150px" }}
|
||||||
format="YYYY-MM-DD"
|
picker="year" /> :
|
||||||
/>: timeType == 1 ?
|
<DatePicker
|
||||||
<DatePicker
|
allowClear
|
||||||
allowClear
|
style={{ width: "150px" }}
|
||||||
style={{ width: "150px" }}
|
picker="month" />
|
||||||
picker="year"/> :
|
|
||||||
<DatePicker
|
|
||||||
allowClear
|
|
||||||
style={{ width: "150px" }}
|
|
||||||
picker="year"/>
|
|
||||||
}
|
}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
<Button type="primary" htmlType="submit">查询</Button>
|
<Button type="primary" htmlType="submit">查询</Button>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
<Button onClick={() => form.resetFields()}>重置</Button>
|
<Button onClick={() => form.resetFields()}>重置</Button>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
<Button onClick={()=>exportFile1()}>导出</Button>
|
<Button onClick={() => exportFile1()}>导出</Button>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -248,20 +248,13 @@ export default function Home() {
|
||||||
<div className='content-box'>
|
<div className='content-box'>
|
||||||
<Zmjk />
|
<Zmjk />
|
||||||
</div>
|
</div>
|
||||||
<div style={{
|
{showTabLeft &&
|
||||||
display: "flex",
|
<div
|
||||||
alignItems: "center",
|
style={{ left: 0 }}
|
||||||
justifyContent: "center",
|
className='shouqi-icon'
|
||||||
width: 25,
|
onClick={() => setShowTabLeft(false)}
|
||||||
height: 50,
|
><BarsOutlined style={{ color: "#fff" }} />
|
||||||
backgroundColor: "#3b7cff",
|
</div>}
|
||||||
position: "fixed",
|
|
||||||
top: "57%",
|
|
||||||
left: !showTabLeft ? "20.7%" : 0,
|
|
||||||
cursor: "pointer",
|
|
||||||
}}
|
|
||||||
onClick={() => setShowTabLeft(!showTabLeft)}
|
|
||||||
><BarsOutlined style={{ color: "#fff" }} /></div>
|
|
||||||
{!showTabLeft &&
|
{!showTabLeft &&
|
||||||
<div className='content-left'>
|
<div className='content-left'>
|
||||||
{/* 工程简介 */}
|
{/* 工程简介 */}
|
||||||
|
|
@ -275,6 +268,12 @@ export default function Home() {
|
||||||
</div>
|
</div>
|
||||||
{/* 运行监测数据 */}
|
{/* 运行监测数据 */}
|
||||||
<div className='runWatch'>
|
<div className='runWatch'>
|
||||||
|
<div
|
||||||
|
style={{ right: '-23px', top: '50%' }}
|
||||||
|
className='shouqi-icon'
|
||||||
|
onClick={() => setShowTabLeft(true)}
|
||||||
|
><BarsOutlined style={{ color: "#fff" }} />
|
||||||
|
</div>
|
||||||
<div className='project-title'>运行监测数据</div>
|
<div className='project-title'>运行监测数据</div>
|
||||||
<div className='project-content'>
|
<div className='project-content'>
|
||||||
{RealData.map((item, i) => (
|
{RealData.map((item, i) => (
|
||||||
|
|
@ -326,22 +325,14 @@ export default function Home() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>}
|
</div>}
|
||||||
<div style={{
|
{showTabRight &&
|
||||||
display: "flex",
|
<div
|
||||||
alignItems: "center",
|
style={{ right: 0, }}
|
||||||
justifyContent: "center",
|
className='shouqi-icon'
|
||||||
width: 25,
|
onClick={() => setShowTabRight(false)}
|
||||||
height: 50,
|
>
|
||||||
backgroundColor: "#3b7cff",
|
<BarsOutlined style={{ color: "#fff" }} /></div>}
|
||||||
position: "fixed",
|
|
||||||
top: "57%",
|
|
||||||
right: !showTabRight ? "20.7%" : 0,
|
|
||||||
cursor: "pointer",
|
|
||||||
}}
|
|
||||||
onClick={() => setShowTabRight(!showTabRight)}
|
|
||||||
><BarsOutlined style={{ color: "#fff" }} /></div>
|
|
||||||
{
|
{
|
||||||
!showTabRight &&
|
!showTabRight &&
|
||||||
<div className='content-right'>
|
<div className='content-right'>
|
||||||
|
|
@ -375,6 +366,12 @@ export default function Home() {
|
||||||
</div>
|
</div>
|
||||||
{/* 报警信息 */}
|
{/* 报警信息 */}
|
||||||
<div className='operate-log'>
|
<div className='operate-log'>
|
||||||
|
<div
|
||||||
|
style={{ left: '-23px', top: '50%' }}
|
||||||
|
className='shouqi-icon'
|
||||||
|
onClick={() => setShowTabRight(true)}
|
||||||
|
>
|
||||||
|
<BarsOutlined style={{ color: "#fff" }} /></div>
|
||||||
<div className='project-title'>报警信息</div>
|
<div className='project-title'>报警信息</div>
|
||||||
<div className='project-content'>
|
<div className='project-content'>
|
||||||
<table style={{ width: '100%' }}>
|
<table style={{ width: '100%' }}>
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.runWatch{
|
.runWatch{
|
||||||
|
position: relative;
|
||||||
.run_list{
|
.run_list{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
@ -193,4 +194,16 @@
|
||||||
width:100%;
|
width:100%;
|
||||||
table-layout:fixed;
|
table-layout:fixed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.shouqi-icon{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 25px;
|
||||||
|
height: 50px;
|
||||||
|
background-color: #3b7cff;
|
||||||
|
position: absolute;
|
||||||
|
top: 57%;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -13,7 +13,7 @@ const Sider: React.FC<{
|
||||||
return (
|
return (
|
||||||
<Layer
|
<Layer
|
||||||
x={side === 'left' ? 0 : CanvasW}
|
x={side === 'left' ? 0 : CanvasW}
|
||||||
scaleX={side === 'left' ? 0.8 : -0.8}
|
scaleX={side === 'left' ? 1 : -1}
|
||||||
width={CanvasW * 0.5}
|
width={CanvasW * 0.5}
|
||||||
>
|
>
|
||||||
<ColorPolygon desc='水' fill="#458eab" pts={[[0, Horizontal], [0, CanvasH], [CanvasW * 0.7, CanvasH], [CanvasW * 0.7, Horizontal]]} />
|
<ColorPolygon desc='水' fill="#458eab" pts={[[0, Horizontal], [0, CanvasH], [CanvasW * 0.7, CanvasH], [CanvasW * 0.7, Horizontal]]} />
|
||||||
|
|
|
||||||
|
|
@ -85,9 +85,10 @@ const Topper1: React.FC<{
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layer>
|
<Layer>
|
||||||
<Rect fill='#738b8b' x={pts.TopRectLB.x - 32 } y={pts.TopRectLB.y - TopRoomHeight} width={pts.TopRectRB.x - pts.TopRectLB.x + 63} height={TopRoomHeight} />
|
{/* <Rect fill='#738b8b' x={pts.TopRectLB.x - 32 } y={pts.TopRectLB.y - TopRoomHeight} width={pts.TopRectRB.x - pts.TopRectLB.x + 63} height={TopRoomHeight} /> */}
|
||||||
|
<Rect fill='#738b8b' x={pts.TopRectLB.x -5} y={pts.TopRectLB.y - TopRoomHeight} width={pts.TopRectRB.x - pts.TopRectLB.x + 10} height={TopRoomHeight} />
|
||||||
<ColorPolygon fill='#4a5c5e' pts={[pts.TopRectLB, pts.RoomRBFar, mirror(pts.RoomRBFar), pts.TopRectRB]} />
|
<ColorPolygon fill='#4a5c5e' pts={[pts.TopRectLB, pts.RoomRBFar, mirror(pts.RoomRBFar), pts.TopRectRB]} />
|
||||||
{
|
{/* {
|
||||||
pts.SepsLTLBRBRT.map((s, index) => {
|
pts.SepsLTLBRBRT.map((s, index) => {
|
||||||
if (index == 0 || index == 1 || index == 7 || index == 8) {
|
if (index == 0 || index == 1 || index == 7 || index == 8) {
|
||||||
return (
|
return (
|
||||||
|
|
@ -96,7 +97,7 @@ const Topper1: React.FC<{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
} */}
|
||||||
{
|
{
|
||||||
windows.w.map((o, index) => <Window1 rect={o} key={'w' + index} />)
|
windows.w.map((o, index) => <Window1 rect={o} key={'w' + index} />)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ export type ControlPts = {
|
||||||
export function contextCoordinates(unitWidth: number, hole: number): ControlPts {
|
export function contextCoordinates(unitWidth: number, hole: number): ControlPts {
|
||||||
const C1 = { x: unitWidth * 0.6, y: GroundBase };
|
const C1 = { x: unitWidth * 0.6, y: GroundBase };
|
||||||
const L1 = { x: unitWidth* 1, y: GroundBase };
|
const L1 = { x: unitWidth* 1, y: GroundBase };
|
||||||
const B1 = { x: unitWidth, y: BottomBase }
|
const B1 = { x: unitWidth , y: BottomBase }
|
||||||
|
|
||||||
const C2 = intersection(ViewCenter, C1, { x: 0, y: undefined });
|
const C2 = intersection(ViewCenter, C1, { x: 0, y: undefined });
|
||||||
const L2 = intersection(ViewCenter, L1, { x: 0, y: undefined });
|
const L2 = intersection(ViewCenter, L1, { x: 0, y: undefined });
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="阈值下限"
|
label="阈值下限"
|
||||||
name="upperLimit"
|
name="lowerLimit"
|
||||||
rules={[{ required: true }]}
|
rules={[{ required: true }]}
|
||||||
>
|
>
|
||||||
<InputNumber disabled={mode === 'view'} style={{ width: '100%' }} allowClear />
|
<InputNumber disabled={mode === 'view'} style={{ width: '100%' }} allowClear />
|
||||||
|
|
@ -96,7 +96,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="阈值上限"
|
label="阈值上限"
|
||||||
name="lowerLimit"
|
name="upperLimit"
|
||||||
rules={[{ required: true }]}
|
rules={[{ required: true }]}
|
||||||
>
|
>
|
||||||
<InputNumber disabled={mode === 'view'} style={{ width: '100%' }} allowClear />
|
<InputNumber disabled={mode === 'view'} style={{ width: '100%' }} allowClear />
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@ const Page = () => {
|
||||||
title: '监测类型', key: 'type', dataIndex: 'type', width: 150,
|
title: '监测类型', key: 'type', dataIndex: 'type', width: 150,
|
||||||
render: (v) => <span>{types[v]}</span>
|
render: (v) => <span>{types[v]}</span>
|
||||||
},
|
},
|
||||||
{ title: '阈值下限', key: 'upperLimit', dataIndex: 'upperLimit', width: 150},
|
{ title: '阈值下限', key: 'lowerLimit', dataIndex: 'lowerLimit', width: 150},
|
||||||
{ title: '阈值上限', key: 'lowerLimit ', dataIndex: 'lowerLimit', width: 150},
|
{ title: '阈值上限', key: 'upperLimit ', dataIndex: 'upperLimit', width: 150},
|
||||||
{
|
{
|
||||||
title: '是否启用', key: 'status', dataIndex: 'status', width: 150,
|
title: '是否启用', key: 'status', dataIndex: 'status', width: 150,
|
||||||
render: (v) => <span>{ v == 1 ? '否': v==0?'是':''}</span>
|
render: (v) => <span>{ v == 1 ? '否': v==0?'是':''}</span>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ const Tabledata = ({tableData}) => {
|
||||||
{ title: '水位(mm)', key: 'value', dataIndex: 'value'},
|
{ title: '水位(mm)', key: 'value', dataIndex: 'value'},
|
||||||
{ title: '水压(KPa)', key: 'press', dataIndex: 'press'},
|
{ title: '水压(KPa)', key: 'press', dataIndex: 'press'},
|
||||||
{ title: '水位高程(m)', key: 'waterEle', dataIndex: 'waterEle'},
|
{ title: '水位高程(m)', key: 'waterEle', dataIndex: 'waterEle'},
|
||||||
{ title: '温度(°℃)', key: 'temp', dataIndex: 'temp'},
|
{ title: '温度(℃)', key: 'temp', dataIndex: 'temp'},
|
||||||
{ title: '模数(F)', key: 'modulus', dataIndex: 'modulus'},
|
{ title: '模数(F)', key: 'modulus', dataIndex: 'modulus'},
|
||||||
{title: '监测时间', key: 'tm', dataIndex: 'tm'},
|
{title: '监测时间', key: 'tm', dataIndex: 'tm'},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ const Page = () => {
|
||||||
{ title: '水位(mm)', key: 'value', dataIndex: 'value', width: 150 },
|
{ title: '水位(mm)', key: 'value', dataIndex: 'value', width: 150 },
|
||||||
{ title: '水压(KPa)', key: 'press', dataIndex: 'press', width: 150 },
|
{ title: '水压(KPa)', key: 'press', dataIndex: 'press', width: 150 },
|
||||||
{ title: '水位高程(m)', key: 'waterEle', dataIndex: 'waterEle', width: 150 },
|
{ title: '水位高程(m)', key: 'waterEle', dataIndex: 'waterEle', width: 150 },
|
||||||
{ title: '温度(°℃)', key: 'temp', dataIndex: 'temp', width: 150 },
|
{ title: '温度(℃)', key: 'temp', dataIndex: 'temp', width: 150 },
|
||||||
{ title: '模数(F)', key: 'modulus', dataIndex: 'modulus', width: 150 },
|
{ title: '模数(F)', key: 'modulus', dataIndex: 'modulus', width: 150 },
|
||||||
{ title: '测点位置', key: 'location', dataIndex: 'location', width: 150,ellipse:true },
|
{ title: '测点位置', key: 'location', dataIndex: 'location', width: 150,ellipse:true },
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ const Page = () => {
|
||||||
<BasicCrudModal
|
<BasicCrudModal
|
||||||
width={800}
|
width={800}
|
||||||
ref={refModal}
|
ref={refModal}
|
||||||
title="断面管理"
|
title=""
|
||||||
component={ModalForm}
|
component={ModalForm}
|
||||||
onCrudSuccess={successCallback}
|
onCrudSuccess={successCallback}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ const Page = () => {
|
||||||
<BasicCrudModal
|
<BasicCrudModal
|
||||||
width={1000}
|
width={1000}
|
||||||
ref={refModal}
|
ref={refModal}
|
||||||
title="维护方案"
|
title="考核"
|
||||||
component={ModalForm}
|
component={ModalForm}
|
||||||
onCrudSuccess={successCallback}
|
onCrudSuccess={successCallback}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ const ToolBar = ({ setSearchVal, onSave, onChecked }) => {
|
||||||
<Button type="primary" htmlType="submit">查询</Button>
|
<Button type="primary" htmlType="submit">查询</Button>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
<Button type="primary" onClick={onSave}>新增</Button>
|
<Button onClick={onSave}>新增</Button>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,7 @@ const ModalForm = ({ mode, record, onUerEdit, onSave, close }) => {
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="上级目录"
|
label="上级目录"
|
||||||
name="menuId"
|
name="menuId"
|
||||||
|
rules={[{ required: true }]}
|
||||||
>
|
>
|
||||||
<TreeSelect
|
<TreeSelect
|
||||||
disabled={mode === 'view'}
|
disabled={mode === 'view'}
|
||||||
|
|
@ -128,6 +129,7 @@ const ModalForm = ({ mode, record, onUerEdit, onSave, close }) => {
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="地址"
|
label="地址"
|
||||||
name="path"
|
name="path"
|
||||||
|
rules={[{ required: true }]}
|
||||||
>
|
>
|
||||||
<Input disabled={mode === 'view'} style={{ width: '100%' }} allowClear />
|
<Input disabled={mode === 'view'} style={{ width: '100%' }} allowClear />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
|
||||||
|
|
@ -74,15 +74,6 @@ const Page = () => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// useEffect(() => {
|
|
||||||
// if(searchVal){
|
|
||||||
// const params = {
|
|
||||||
// search: searchVal
|
|
||||||
// };
|
|
||||||
// search(params)
|
|
||||||
// }
|
|
||||||
// }, [searchVal])
|
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (allOpen.num == 2) {
|
if (allOpen.num == 2) {
|
||||||
|
|
@ -126,8 +117,7 @@ useEffect(() => {
|
||||||
scroll={{ x: width, y: "calc( 100vh - 400px )" }}
|
scroll={{ x: width, y: "calc( 100vh - 400px )" }}
|
||||||
expandable={{
|
expandable={{
|
||||||
expandedRowKeys,
|
expandedRowKeys,
|
||||||
onExpandedRowsChange: (v, r) => {
|
onExpandedRowsChange: (v, r) => {
|
||||||
console.log(v,r);
|
|
||||||
setExpandedRowKeys(v)
|
setExpandedRowKeys(v)
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
@ -141,7 +131,6 @@ useEffect(() => {
|
||||||
title=""
|
title=""
|
||||||
component={ModalForm}
|
component={ModalForm}
|
||||||
extraFun={getData}
|
extraFun={getData}
|
||||||
// onCrudSuccess={() => { refresh({ addvcd: localStorage.getItem('ADCD6') }) }}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ const Page = () => {
|
||||||
{ title: '阈值上限', key: 'upperLimit', dataIndex: 'upperLimit', width: 150},
|
{ title: '阈值上限', key: 'upperLimit', dataIndex: 'upperLimit', width: 150},
|
||||||
{
|
{
|
||||||
title: '状态', key: 'status', dataIndex: 'status', width: 150,
|
title: '状态', key: 'status', dataIndex: 'status', width: 150,
|
||||||
render: (v) => <span>{types[v]}</span>
|
render: (v) => <span>{types1[v]}</span>
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '报警时间', key: 'warnTime', dataIndex: 'warnTime', width: 140,
|
title: '报警时间', key: 'warnTime', dataIndex: 'warnTime', width: 140,
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,6 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
label: "闸后流量",
|
label: "闸后流量",
|
||||||
value: 0,
|
value: 0,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: "雨量",
|
|
||||||
value: 1,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: "闸前水位",
|
label: "闸前水位",
|
||||||
value:2,
|
value:2,
|
||||||
|
|
@ -61,7 +57,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="阈值下限"
|
label="阈值下限"
|
||||||
name="upperLimit"
|
name="lowerLimit"
|
||||||
rules={[{ required: true }]}
|
rules={[{ required: true }]}
|
||||||
>
|
>
|
||||||
<InputNumber disabled={mode==='view'} style={{width:'100%'}} allowClear />
|
<InputNumber disabled={mode==='view'} style={{width:'100%'}} allowClear />
|
||||||
|
|
@ -73,7 +69,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="阈值上限"
|
label="阈值上限"
|
||||||
name="lowerLimit"
|
name="upperLimit"
|
||||||
rules={[{ required: true }]}
|
rules={[{ required: true }]}
|
||||||
>
|
>
|
||||||
<InputNumber disabled={mode==='view'} style={{width:'100%'}} allowClear />
|
<InputNumber disabled={mode==='view'} style={{width:'100%'}} allowClear />
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
const types = {
|
const types = {
|
||||||
0: "闸后流量",
|
0: "闸后流量",
|
||||||
1: '雨量',
|
|
||||||
2: "闸前水位",
|
2: "闸前水位",
|
||||||
3:'闸后水位'
|
3:'闸后水位'
|
||||||
}
|
}
|
||||||
|
|
@ -26,8 +25,8 @@ const Page = () => {
|
||||||
title: '监测点', key: 'type', dataIndex: 'type', width: 150,
|
title: '监测点', key: 'type', dataIndex: 'type', width: 150,
|
||||||
render: (v) => <span>{types[v]}</span>
|
render: (v) => <span>{types[v]}</span>
|
||||||
},
|
},
|
||||||
{ title: '阈值下限', key: 'upperLimit', dataIndex: 'upperLimit', width: 150},
|
{ title: '阈值下限', key: 'lowerLimit', dataIndex: 'lowerLimit', width: 150},
|
||||||
{ title: '阈值上限', key: 'lowerLimit ', dataIndex: 'lowerLimit', width: 150},
|
{ title: '阈值上限', key: 'upperLimit ', dataIndex: 'upperLimit', width: 150},
|
||||||
{
|
{
|
||||||
title: '是否启用', key: 'status', dataIndex: 'status', width: 150,
|
title: '是否启用', key: 'status', dataIndex: 'status', width: 150,
|
||||||
render: (v) => <span>{ v == 1 ? '否': v==0?'是':''}</span>
|
render: (v) => <span>{ v == 1 ? '否': v==0?'是':''}</span>
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,6 @@ const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
|
||||||
label: "闸后流量",
|
label: "闸后流量",
|
||||||
value: 0,
|
value: 0,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: "雨量",
|
|
||||||
value: 1,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: "闸前水位",
|
label: "闸前水位",
|
||||||
value: 2,
|
value: 2,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue