import React, { Fragment, useRef, useMemo,useEffect,useState } from 'react'; import { useSelector } from 'react-redux'; import BasicCrudModal from '../../../../components/crud/BasicCrudModal'; import { Table, Card, Row, Col, Divider,Image,Modal } from 'antd'; import { DeleteOutlined,FileWordOutlined,FilePdfOutlined,FileZipOutlined,FileExcelOutlined } from '@ant-design/icons'; import ToolBar from './toolbar'; import ModalForm from './form'; import apiurl from '../../../../service/apiurl'; import { getDictService } from '../../../../service/SelectValue' import usePageTable from '../../../../components/crud/usePageTable'; import { createCrudService } from '../../../../components/crud/_'; import {CrudOpRender_text} from '../../../../components/crud/CrudOpRender'; import { dealValue } from '../../../../utils/tools'; import ListSelect from "../../../../components/Form/ListSelect"; import Form from './form' import moment from 'moment'; const Page = ({data,fileList,isMeetData=false}) => { const url = "http://223.75.53.141:9100/gs-tsg" const [iframeSrc, setIframeSrc] = useState('') const [pdfViewOPen, setPdfViewOPen] = useState(false) /** * @description pdf文件预览 * @param {String} params 文件预览url */ const viewPdf = (params) => { console.log(params); setIframeSrc(params) setPdfViewOPen(true) } /** * @description 文件下载 * @param {String} params 文件fileId */ const download = (params) => { let downloadLink = document.createElement("a"); downloadLink.href = `http://local.gunshiiot.com:18083/gunshiApp/xfflood/xfIdeoFcB/file/download/${params}`; downloadLink.download = `${params.fileName}`; downloadLink.style.display = "none"; // 将链接添加到页面中 document.body.appendChild(downloadLink); // 模拟点击事件,开始下载 downloadLink.click(); } return ( <>