tsg-web/src/views/fxzb/gczx/ytygc/GcTreeSelector/Skjcxx/gctp.js

37 lines
946 B
JavaScript
Raw Normal View History

2024-09-20 15:02:50 +08:00
import React, {useEffect, useState} from 'react';
import {Descriptions} from "antd";
import {projectimg, fileget} from "../../../../../../service/sssq";
import {projDict} from "../../../../../../utils/dictType"
function Gctp({record}) {
const [data, setData] = useState([])
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
const getData = async (params) => {
setData(await projectimg(params))
}
useEffect(() => {
getData({resCode: record.resCode})
}, [record]);
return (
<>
<Descriptions bordered layout="vertical" column={3}>
{
data?.length > 0 ? data?.map(o => <Descriptions.Item label={projDict(o?.projType)}>
<div className="no-data">
<img src={url + o?.filePath} style={{width: "100%"}} alt=""/>
</div>
</Descriptions.Item>
)
: ""
}
</Descriptions>
</>
)
}
export default Gctp;