闸门监控
parent
b31efc6d77
commit
23c10829ac
|
|
@ -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">
|
||||||
|
|
|
||||||
|
|
@ -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)=>{
|
||||||
return (
|
if(item.type===1){
|
||||||
<div className='sg_zmjk_right_information_content'>
|
return (
|
||||||
<div>{myType[item.type]}</div>
|
<div className='sg_zmjk_right_information_content'>
|
||||||
<div>112.079 / 1.279</div>
|
<div>{myType[item.type]}</div>
|
||||||
<div>07-10 12:09:00</div>
|
<div>{item.value||'-'} / {getNum(item.value,data.inEle)}</div>
|
||||||
</div>
|
<div>{item.tm?.slice(5,19)}</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>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue