Compare commits
3 Commits
0dbd9d8ad3
...
0f045ab5ec
| Author | SHA1 | Date |
|---|---|---|
|
|
0f045ab5ec | |
|
|
3a0402d7aa | |
|
|
dc6c9f5ef2 |
|
|
@ -7,7 +7,7 @@ const Tabledata = ({tableData}) => {
|
||||||
const columns = [
|
const columns = [
|
||||||
{ title: '序号', key: '', dataIndex: '', align: 'center',width:'40px',render:(a,b,c)=>c+1},
|
{ title: '序号', key: '', dataIndex: '', align: 'center',width:'40px',render:(a,b,c)=>c+1},
|
||||||
{ title: '数据时间', key: 'createTime', dataIndex: 'createTime', align: 'center',width:'200px',render: (rec) => <span>{rec ?? "-"}</span> },
|
{ title: '数据时间', key: 'createTime', dataIndex: 'createTime', align: 'center',width:'200px',render: (rec) => <span>{rec ?? "-"}</span> },
|
||||||
{ title: '湿度', key: 'val', dataIndex: 'val', align: 'center',render: (rec) => <span>{getVal(rec)}</span> },
|
{ title: '湿度(%RH)', key: 'val', dataIndex: 'val', align: 'center',render: (rec) => <span>{getVal(rec)}</span> },
|
||||||
];
|
];
|
||||||
|
|
||||||
const getVal = (v)=>{
|
const getVal = (v)=>{
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ import { useMemo } from 'react';
|
||||||
import echarts from 'echarts/lib/echarts';
|
import echarts from 'echarts/lib/echarts';
|
||||||
|
|
||||||
export default function DrpOption(data, num) {
|
export default function DrpOption(data, num) {
|
||||||
console.log("num",num);
|
|
||||||
const minL = Math.floor(Math.min(...data?.map(s => s.q)));
|
const minL = Math.floor(Math.min(...data?.map(s => s.q)));
|
||||||
const maxL = Math.ceil(Math.max(...data?.map(s => s.q)));
|
const maxL = Math.ceil(Math.max(...data?.map(s => s.q)));
|
||||||
const minS = Math.floor(Math.min(...data?.map(s => s.v)));
|
const minS = Math.floor(Math.min(...data?.map(s => s.v)));
|
||||||
|
|
@ -48,6 +47,7 @@ export default function DrpOption(data, num) {
|
||||||
{
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: data?.map(item => item.tm),
|
data: data?.map(item => item.tm),
|
||||||
|
inverse:true,
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
|
|
@ -115,7 +115,7 @@ export default function DrpOption(data, num) {
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
min: minS - 1,
|
min: minS,
|
||||||
max: maxS
|
max: maxS
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -32,10 +32,10 @@ const Page = () => {
|
||||||
}else{
|
}else{
|
||||||
return [
|
return [
|
||||||
{ title: '监测点', key: 'cdnm', dataIndex: 'cdnm',align: "center",width: 80, ellipsis: true },
|
{ title: '监测点', key: 'cdnm', dataIndex: 'cdnm',align: "center",width: 80, ellipsis: true },
|
||||||
{ title: '监测时间', key: 'tm', dataIndex: 'tm',align: "center",width: 80, ellipsis: true, render:(v,row)=><div style={{color:row.flag===1?'red':'#3B4859'}}><div>{v?.slice(5,10)}</div><div>{v?.slice(11,16)}</div></div> },
|
{ title: '监测时间', key: 'tm', dataIndex: 'tm',align: "center",width: 80, ellipsis: true, render:(v,row)=><div style={{color:row.flag===1?'red':'#3B4859'}}><div>{v?.slice(5,10)}</div><div>{v?.slice(11,16)|| '-'}</div></div> },
|
||||||
{ title: <div><div>x方向</div><div>(mm)</div></div>, key: 'de', dataIndex: 'de',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.xstatus===1?'red':'#3B4859'}}>{v}</div> },
|
{ title: <div><div>x方向</div><div>(mm)</div></div>, key: 'de', dataIndex: 'de',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.xstatus===1?'red':'#3B4859'}}>{v !== null ?v: '-'}</div> },
|
||||||
{ title: <div><div>y方向</div><div>(mm)</div></div>, key: 'dn', dataIndex: 'dn',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.ystatus===1?'red':'#3B4859'}}>{v}</div> },
|
{ title: <div><div>y方向</div><div>(mm)</div></div>, key: 'dn', dataIndex: 'dn',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.ystatus===1?'red':'#3B4859'}}>{v !== null ?v: '-'}</div> },
|
||||||
{ title: <div><div>h方向</div><div>(mm)</div></div>, key: 'du', dataIndex: 'du',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.hstatus===1?'red':'#3B4859'}}>{v}</div> },
|
{ title: <div><div>h方向</div><div>(mm)</div></div>, key: 'du', dataIndex: 'du',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.hstatus===1?'red':'#3B4859'}}>{v !== null ?v: '-'}</div> },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}, [checked]);
|
}, [checked]);
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ const Page = () => {
|
||||||
<div className="home_gongshui_item_text" style={{display:'flex',flexDirection:'column'}}>
|
<div className="home_gongshui_item_text" style={{display:'flex',flexDirection:'column'}}>
|
||||||
<div style={{display:'flex'}}>
|
<div style={{display:'flex'}}>
|
||||||
<div className="lf">实时流量: </div>
|
<div className="lf">实时流量: </div>
|
||||||
<div className="rf">{data1.q}</div>
|
<div className="rf">{data1.q}m³/s</div>
|
||||||
</div>
|
</div>
|
||||||
<div style={{marginBottom:'10px', display:'flex'}}>
|
<div style={{marginBottom:'10px', display:'flex'}}>
|
||||||
{/* <div className="lf2" style={{color:'#70B603'}}></div>
|
{/* <div className="lf2" style={{color:'#70B603'}}></div>
|
||||||
|
|
@ -64,7 +64,7 @@ const Page = () => {
|
||||||
</div>
|
</div>
|
||||||
<div className="home_gongshui_item_text">
|
<div className="home_gongshui_item_text">
|
||||||
<div className="lf">今日水量: </div>
|
<div className="lf">今日水量: </div>
|
||||||
<div className="rf">{data1.v}</div>
|
<div className="rf">{data1.v}m³</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="home_gongshui_item">
|
<div className="home_gongshui_item">
|
||||||
|
|
@ -75,7 +75,7 @@ const Page = () => {
|
||||||
<div className="home_gongshui_item_text" style={{display:'flex',flexDirection:'column'}}>
|
<div className="home_gongshui_item_text" style={{display:'flex',flexDirection:'column'}}>
|
||||||
<div style={{display:'flex'}}>
|
<div style={{display:'flex'}}>
|
||||||
<div className="lf">实时流量: </div>
|
<div className="lf">实时流量: </div>
|
||||||
<div className="rf">{data2.q}</div>
|
<div className="rf">{data2.q}m³/s</div>
|
||||||
</div>
|
</div>
|
||||||
<div style={{marginBottom:'10px', display:'flex'}}>
|
<div style={{marginBottom:'10px', display:'flex'}}>
|
||||||
{/* <div className="lf2" style={{color:'#70B603'}}></div>
|
{/* <div className="lf2" style={{color:'#70B603'}}></div>
|
||||||
|
|
@ -88,7 +88,7 @@ const Page = () => {
|
||||||
</div>
|
</div>
|
||||||
<div className="home_gongshui_item_text">
|
<div className="home_gongshui_item_text">
|
||||||
<div className="lf">今日水量: </div>
|
<div className="lf">今日水量: </div>
|
||||||
<div className="rf">{data2.v}</div>
|
<div className="rf">{data2.v}m³</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ const Page = () => {
|
||||||
const columns = [
|
const columns = [
|
||||||
// { title: '序号', key: 'stationCode', dataIndex: 'stationCode',align: "center",width: 50, ellipsis: true, render: (text, rec, index) => index + 1 },
|
// { title: '序号', key: 'stationCode', dataIndex: 'stationCode',align: "center",width: 50, ellipsis: true, render: (text, rec, index) => index + 1 },
|
||||||
{ title: '视频点名称', key: 'name', dataIndex: 'name',align: "center",width:80, ellipsis: true, },
|
{ title: '视频点名称', key: 'name', dataIndex: 'name',align: "center",width:80, ellipsis: true, },
|
||||||
{ title: '所属区域', key: 'name', dataIndex: 'name',align: "center",width: 150, ellipsis: true },
|
{ title: '所属区域', key: 'menuName', dataIndex: 'menuName',align: "center",width: 150, ellipsis: true },
|
||||||
];
|
];
|
||||||
const getData = async(val)=>{
|
const getData = async(val)=>{
|
||||||
setChecked(val)
|
setChecked(val)
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ const Page = () => {
|
||||||
const [ tableData, setTableData ] = useState([])//在线
|
const [ tableData, setTableData ] = useState([])//在线
|
||||||
const columns = [
|
const columns = [
|
||||||
{ title: '站点', key: 'stnm', dataIndex: 'stnm',align: "center",width:80, ellipsis: true, },
|
{ title: '站点', key: 'stnm', dataIndex: 'stnm',align: "center",width:80, ellipsis: true, },
|
||||||
{ title: '湿度', key: 'val', dataIndex: 'val',align: "center",width:80, ellipsis: true,render:(v)=>typeof v ==='number'?v.toFixed(2):'' },
|
{ title: '湿度(%RH)', key: 'val', dataIndex: 'val',align: "center",width:80, ellipsis: true,render:(v)=>typeof v ==='number'?v.toFixed(2):'' },
|
||||||
{ title: '监测时间', key: 'tm', dataIndex: 'tm',align: "center",width: 150, ellipsis: true },
|
{ title: '监测时间', key: 'tm', dataIndex: 'tm',align: "center",width: 150, ellipsis: true },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,9 +50,9 @@ export default function Page({ isHome }) {
|
||||||
const columnsWy = [
|
const columnsWy = [
|
||||||
{ title: '监测点', key: 'cdnm', dataIndex: 'cdnm', align: "center", width: 150, ellipsis: true },
|
{ title: '监测点', key: 'cdnm', dataIndex: 'cdnm', align: "center", width: 150, ellipsis: true },
|
||||||
{ title: '监测时间', key: 'tm', dataIndex: 'tm', align: "center", width: 80, ellipsis: true, render: (v, row) => <div style={{ color: row.flag === 1 ? 'red' : '#3B4859' }}><div>{v?.slice(5, 10)}</div><div>{v?.slice(11, 16) || '-'}</div></div> },
|
{ title: '监测时间', key: 'tm', dataIndex: 'tm', align: "center", width: 80, ellipsis: true, render: (v, row) => <div style={{ color: row.flag === 1 ? 'red' : '#3B4859' }}><div>{v?.slice(5, 10)}</div><div>{v?.slice(11, 16) || '-'}</div></div> },
|
||||||
{ title: <div><div>x方向</div><div>(mm)</div></div>, key: 'de', dataIndex: 'de', align: "center", ellipsis: true, render: (v, row) => <div style={{ color: row.xstatus === 1 ? 'red' : '#3B4859' }}>{v || '-'}</div> },
|
{ title: <div><div>x方向</div><div>(mm)</div></div>, key: 'de', dataIndex: 'de', align: "center", ellipsis: true, render: (v, row) => <div style={{ color: row.xstatus === 1 ? 'red' : '#3B4859' }}>{v !== null ?v: '-'}</div> },
|
||||||
{ title: <div><div>y方向</div><div>(mm)</div></div>, key: 'dn', dataIndex: 'dn', align: "center", ellipsis: true, render: (v, row) => <div style={{ color: row.ystatus === 1 ? 'red' : '#3B4859' }}>{v || '-'}</div> },
|
{ title: <div><div>y方向</div><div>(mm)</div></div>, key: 'dn', dataIndex: 'dn', align: "center", ellipsis: true, render: (v, row) => <div style={{ color: row.ystatus === 1 ? 'red' : '#3B4859' }}>{v !== null ?v: '-'}</div> },
|
||||||
{ title: <div><div>h方向</div><div>(mm)</div></div>, key: 'du', dataIndex: 'du', align: "center", ellipsis: true, render: (v, row) => <div style={{ color: row.hstatus === 1 ? 'red' : '#3B4859' }}>{v || '-'}</div> },
|
{ title: <div><div>h方向</div><div>(mm)</div></div>, key: 'du', dataIndex: 'du', align: "center", ellipsis: true, render: (v, row) => <div style={{ color: row.hstatus === 1 ? 'red' : '#3B4859' }}>{v !== null ?v: '-'}</div> },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ export default function drpOption (data) {
|
||||||
type: 'value',
|
type: 'value',
|
||||||
// gridIndex:0,
|
// gridIndex:0,
|
||||||
position: 'left',
|
position: 'left',
|
||||||
// name: '水位(m)',
|
name: '供水量(万m³)',
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: true,
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ return{
|
||||||
},
|
},
|
||||||
labelLine: {
|
labelLine: {
|
||||||
normal: {
|
normal: {
|
||||||
length: 80,
|
length: 60,
|
||||||
// length2: 120,
|
// length2: 120,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: "#e6e6e6",
|
color: "#e6e6e6",
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@ export default function DrpOption(data, num) {
|
||||||
{
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: data?.map(item => item.tm),
|
data: data?.map(item => item.tm),
|
||||||
|
inverse:true,
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ export default function Sjcx({ data }) {
|
||||||
const columns = [
|
const columns = [
|
||||||
{ title: '序号', key: '', dataIndex: '', align: 'center',width:'80px',render:(a,b,c)=>c+1},
|
{ title: '序号', key: '', dataIndex: '', align: 'center',width:'80px',render:(a,b,c)=>c+1},
|
||||||
{ title: '数据时间', key: 'createTime', dataIndex: 'createTime', align: 'center',width:'200px',render: (rec) => <span>{rec ?? "-"}</span> },
|
{ title: '数据时间', key: 'createTime', dataIndex: 'createTime', align: 'center',width:'200px',render: (rec) => <span>{rec ?? "-"}</span> },
|
||||||
{ title: '湿度', key: 'val', dataIndex: 'val', align: 'center',render: (rec) => <span>{rec ?? "-"}</span> },
|
{ title: '湿度(%RH)', key: 'val', dataIndex: 'val', align: 'center',render: (rec) => <span>{rec ?? "-"}</span> },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue