fix(): 修改下载附件
parent
a0e09f6481
commit
582a6cf4cd
|
|
@ -1,2 +1,3 @@
|
|||
GENERATE_SOURCEMAP=true
|
||||
PUBLIC_URL=/tsg
|
||||
REACT_APP_API_URL=http://local.gunshiiot.com:18083
|
||||
|
|
@ -1,2 +1,3 @@
|
|||
GENERATE_SOURCEMAP=false
|
||||
PUBLIC_URL=/tsg
|
||||
REACT_APP_API_URL=http://local.gunshiiot.com:18083
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ const { toString } = class2type;
|
|||
|
||||
export const fileDownload = (url,params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/${url}/${params?.fileId}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/${url}/${params?.fileId}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ const ModalForm = ({ mode, record, onEdit, onSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/xfflood/xfEmerDispatchR/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/xfflood/xfEmerDispatchR/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export default function Page({ selectDiv1, detail }) {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/xfflood/xfEmerRespR/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/xfflood/xfEmerRespR/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ console.log("data",data);
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/xfflood/xfEmerRespR/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/xfflood/xfEmerRespR/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ const ModalForm = ({ mode, record, onEdit, onSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/xfflood/bzFldPred/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/xfflood/bzFldPred/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ const ModalForm = ({ mode, record, onEdit, onSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/xfflood/bzFldPred/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/xfflood/bzFldPred/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
|||
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/resPlanB/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/resPlanB/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
@ -217,7 +217,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
|||
</Row>
|
||||
<Row gutter={[16]} style={{margin:"-25px 0 0 14px"}}>
|
||||
{
|
||||
loading ? <span>文件正在上传中,请等待</span> :
|
||||
// loading ? <span>文件正在上传中,请等待</span> :
|
||||
fileList.length > 0 && fileList.map(file => {
|
||||
return (
|
||||
<Col span={12}>
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ export default function Zrtx() {
|
|||
}
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/resPlanB/file/download/${params?.fileId}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/resPlanB/file/download/${params?.fileId}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -15,13 +15,13 @@
|
|||
height: 40px;
|
||||
// margin-right: 10px;
|
||||
}
|
||||
span{
|
||||
display: block;
|
||||
width: 180px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
// span{
|
||||
// display: block;
|
||||
// width: 180px;
|
||||
// overflow: hidden;
|
||||
// text-overflow: ellipsis;
|
||||
// white-space: nowrap;
|
||||
// }
|
||||
|
||||
}
|
||||
.delete-icon{
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
|||
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/resPlanB/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/resPlanB/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
@ -217,7 +217,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
|||
</Row>
|
||||
<Row gutter={[16]} style={{margin:"-25px 0 0 14px"}}>
|
||||
{
|
||||
loading ? <span>文件正在上传中,请等待</span> :
|
||||
// loading ? <span>文件正在上传中,请等待</span> :
|
||||
fileList.length > 0 && fileList.map(file => {
|
||||
return (
|
||||
<Col span={12}>
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ export default function Zrtx() {
|
|||
}
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/resPlanB/file/download/${params?.fileId}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/resPlanB/file/download/${params?.fileId}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/xfflood/bzProjectManipulationRecord/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/xfflood/bzProjectManipulationRecord/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ console.log("record",record);
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/xfflood/bzProjectManipulationRecord/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/xfflood/bzProjectManipulationRecord/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ const ModalForm = ({ mode, record, onEdit, onSave,onDeleteGet,onCrudSuccess }) =
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/xfflood/bzProjectManipulationRecord/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/xfflood/bzProjectManipulationRecord/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/rescue/team/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/rescue/team/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/xfflood/rescue/team/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/xfflood/rescue/team/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/rescue/goods/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/rescue/goods/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
@ -295,7 +295,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
|
|||
}
|
||||
<Row gutter={[16]}>
|
||||
{
|
||||
loading ? <span>文件正在上传中,请等待</span> :
|
||||
// loading ? <span>文件正在上传中,请等待</span> :
|
||||
fileList.length > 0 && fileList.map(file => {
|
||||
return (
|
||||
<Col span={12}>
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/xfflood/rescue/goods/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/xfflood/rescue/goods/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onCrudSuccess }) => {
|
|||
*/
|
||||
const download = params => {
|
||||
let downloadLink = document.createElement('a')
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/xfflood/xfIdeoHmB/file/download/${params}`
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/xfflood/xfIdeoHmB/file/download/${params}`
|
||||
downloadLink.download = `${params.fileName}`
|
||||
downloadLink.style.display = 'none'
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/xfflood/xfIdeoFcB/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/xfflood/xfIdeoFcB/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ const Page = ({data,fileList,isMeetData=false}) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/xfflood/xfIdeoFcB/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/xfflood/xfIdeoFcB/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ console.log(record);
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/xfflood/xfIdeoTcB/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/xfflood/xfIdeoTcB/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ const ModalForm = ({ mode, record,onEdit,onSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/xfflood/xfIdeoImgB/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/xfflood/xfIdeoImgB/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/xfflood/bzPredictionScheme/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/xfflood/bzPredictionScheme/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ const ToolBar = ({ setSearchVal, onFileChange, onDelete, adcd, id }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/xfflood/bzOrganizationFile/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/xfflood/bzOrganizationFile/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ const Page = () => {
|
|||
const [trData, setTrData] = useState([])
|
||||
const [table2Data, setTable2Data] = useState([])
|
||||
const [loading, setLoading] = useState(false)
|
||||
const [wyObj, setWyObj] = useState(false)
|
||||
const wyList = ["X","Y","H"]
|
||||
const columns1 = [
|
||||
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 150, align:"center"},
|
||||
|
|
@ -23,6 +24,24 @@ const Page = () => {
|
|||
{ title: '监测日期', key: 'tm', dataIndex: 'tm', width: 250, align:"center" },
|
||||
];
|
||||
|
||||
const demoColumns = [
|
||||
columns1[0],
|
||||
columns2[0],
|
||||
{
|
||||
title: 'WY-01',
|
||||
width: 100,
|
||||
align: "center",
|
||||
children: {
|
||||
title: "X",
|
||||
key: `X_WY-01`,
|
||||
dataIndex: `X_WY-01`,
|
||||
width: 100,
|
||||
align: "center",
|
||||
render: (rec, record) => <span>{rec ?? "-"}</span>
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
const getDmTree = async() => {
|
||||
try {
|
||||
|
|
@ -33,7 +52,7 @@ const Page = () => {
|
|||
}
|
||||
}
|
||||
const newCols = useMemo(() => {
|
||||
if (trData.length > 0) {
|
||||
if (trData.length > 0 && wyObj) {
|
||||
let dm = trData?.map(item => (
|
||||
{
|
||||
title: item.stationCode,
|
||||
|
|
@ -49,10 +68,12 @@ const Page = () => {
|
|||
}))
|
||||
}
|
||||
))
|
||||
return [...columns1,...columns2, ...dm]
|
||||
|
||||
const newDm = dm.filter(item => item.title == wyObj.wy)
|
||||
return [...columns1,...columns2, ...newDm]
|
||||
}
|
||||
|
||||
}, [trData])
|
||||
}, [trData,wyObj])
|
||||
|
||||
const getTableData = async (params) => {
|
||||
setLoading(true)
|
||||
|
|
@ -88,6 +109,7 @@ const Page = () => {
|
|||
...obj,
|
||||
}
|
||||
})
|
||||
// const demo = [{tm:"2025-01-01",inx:1,"H_WY-03":0.87,"X_WY-01":0.1}]
|
||||
setDataSource(result)
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
|
@ -161,12 +183,14 @@ const Page = () => {
|
|||
<Card className='nonebox'>
|
||||
<ToolBar
|
||||
setSearchVal={setSearchVal}
|
||||
list={trData}
|
||||
setWyObj={setWyObj}
|
||||
exportFile={exportExcel}
|
||||
role={role}
|
||||
/>
|
||||
</Card>
|
||||
<div className="ant-card-body" style={{ padding: "20px 0 0 0" }}>
|
||||
{/* <Table
|
||||
<Table
|
||||
columns={newCols}
|
||||
rowKey="inx"
|
||||
loading={loading}
|
||||
|
|
@ -209,17 +233,17 @@ const Page = () => {
|
|||
</Table.Summary>
|
||||
)
|
||||
}}
|
||||
/> */}
|
||||
{
|
||||
/>
|
||||
{/* {
|
||||
(newCols?.length>0 && width!==undefined)?
|
||||
<MyTable
|
||||
columns={newCols}
|
||||
columns={demoColumns}
|
||||
dataSource={dataSource}
|
||||
width={width}
|
||||
loading={loading}
|
||||
table2Data={table2Data}
|
||||
/>:null
|
||||
}
|
||||
} */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import React, { useEffect, useRef, useState } from 'react';
|
|||
import { VariableSizeGrid as Grid } from 'react-window';
|
||||
const VirtualTable = (props) => {
|
||||
const { columns, scroll, table2Data } = props;
|
||||
debugger
|
||||
const [tableWidth, setTableWidth] = useState(0);
|
||||
const widthColumnCount = columns.filter(({ width }) => !width).length;
|
||||
const mergedColumns = columns.map((column) => {
|
||||
|
|
@ -16,6 +17,10 @@ const VirtualTable = (props) => {
|
|||
width: Math.floor(tableWidth / widthColumnCount),
|
||||
};
|
||||
});
|
||||
console.log("mergedColumns", mergedColumns);
|
||||
console.log("props",{...props});
|
||||
|
||||
|
||||
const gridRef = useRef();
|
||||
const [connectObject] = useState(() => {
|
||||
const obj = {};
|
||||
|
|
|
|||
|
|
@ -7,10 +7,11 @@ import { config } from '../../../../config';
|
|||
import moment from 'moment';
|
||||
import { httppost2 } from '../../../../utils/request';
|
||||
import apiurl from '../../../../service/apiurl';
|
||||
const ToolBar = ({ setSearchVal, setDmName, exportFile, role }) => {
|
||||
const ToolBar = ({ setSearchVal, setDmName, exportFile, role,list,setWyObj }) => {
|
||||
const exportBtn = role?.rule?.find(item => item.menuName == "导出")||true;
|
||||
const searchBtn = role?.rule?.find(item => item.menuName == "查询")||true;
|
||||
const [form] = Form.useForm();
|
||||
const [source, setSource] = useState()
|
||||
const onFinish = (values) => {
|
||||
let dateSo;
|
||||
if (values.tm) {
|
||||
|
|
@ -20,16 +21,34 @@ const ToolBar = ({ setSearchVal, setDmName, exportFile, role }) => {
|
|||
setSearchVal({ ...values, year: dateSo });
|
||||
}
|
||||
|
||||
const valuesChange = (v) => {
|
||||
if ('wy' in v) {
|
||||
setWyObj(v)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
let time = moment()
|
||||
form.setFieldValue("tm", time)
|
||||
setSearchVal({ year: moment().format("YYYY")})
|
||||
}, [])
|
||||
form.setFieldValue("wy","WY-01")
|
||||
setSearchVal({ year: moment().format("YYYY")})
|
||||
setWyObj({ wy: "WY-01"})
|
||||
}, [])
|
||||
useEffect(() => {
|
||||
if (list.length > 0) {
|
||||
const newList = list.map(item => ({
|
||||
label: item.stationCode,
|
||||
value:item.stationCode
|
||||
}))
|
||||
setSource(newList)
|
||||
}
|
||||
}, [list])
|
||||
|
||||
return (
|
||||
<>
|
||||
<div style={{display:'flex',justifyContent:'space-between'}}>
|
||||
<Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish}>
|
||||
<Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish} onValuesChange={valuesChange}>
|
||||
<Form.Item label="上报时间" name="tm">
|
||||
<DatePicker
|
||||
allowClear
|
||||
|
|
@ -38,6 +57,9 @@ const ToolBar = ({ setSearchVal, setDmName, exportFile, role }) => {
|
|||
format={'YYYY'}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label="位移" name="wy">
|
||||
<NormalSelect options={source} style={{ width: '180px' }} />
|
||||
</Form.Item>
|
||||
{searchBtn ? <Form.Item>
|
||||
<Button type="primary" htmlType="submit">查询</Button>
|
||||
</Form.Item> : null }
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ export default function Gsnlfx() {
|
|||
<span>水厂流量(m³/s)</span>
|
||||
</div>
|
||||
<div className='card-value'>
|
||||
<span className='nl-value'>{ssgData?.fsg?.v ?? "--"}</span>
|
||||
<span className='nl-value'>{ssgData?.fsg?.q ?? "--"}</span>
|
||||
<span className='nl-time'>({ssgData?.fsg?.tm ?? "--"})</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/safety/check/file/download/${params.fileId}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/safety/check/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/safety/identify/file/download/${params.fileId}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/safety/identify/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/safety/accident/reg/file/download/${params.fileId}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/safety/accident/reg/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/safety/hazard/invest/file/download/${params.fileId}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/safety/hazard/invest/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/safety/reinforcement/file/download/${params.fileId}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/safety/reinforcement/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ const getResultList = async() => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/risk/info/file/download/${params.fileId}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/risk/info/file/download/${params.fileId}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ const Page = () => {
|
|||
}
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/termite/adver/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/termite/adver/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/projectEvents/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/projectEvents/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ const Page = () => {
|
|||
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/projectEvents/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/projectEvents/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/assessTask/file/download/${params.fileId}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/assessTask/file/download/${params.fileId}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
@ -662,7 +662,7 @@ const [selectPerson, setSelectPerson] = useState([])
|
|||
}
|
||||
<Row gutter={[16]}>
|
||||
{
|
||||
loading ? <span>文件正在上传中,请等待</span> :
|
||||
// loading ? <span>文件正在上传中,请等待</span> :
|
||||
fileList?.length > 0 && fileList?.map(file => {
|
||||
return (
|
||||
<Col span={12}>
|
||||
|
|
@ -670,7 +670,7 @@ const [selectPerson, setSelectPerson] = useState([])
|
|||
<div className='file-description'>
|
||||
{file.name.indexOf('.docx') > -1 ?
|
||||
<div
|
||||
onClick={() => { download(file.response?.data?.fileId) }}
|
||||
onClick={() => { download(file.response?.data) }}
|
||||
style={{ cursor: 'pointer' }}
|
||||
>
|
||||
<FileWordOutlined
|
||||
|
|
@ -688,7 +688,7 @@ const [selectPerson, setSelectPerson] = useState([])
|
|||
:
|
||||
file.name.indexOf('.zip') > -1 ?
|
||||
<div
|
||||
onClick={() => { download(file.response?.data?.fileId) }}
|
||||
onClick={() => { download(file.response?.data) }}
|
||||
style={{ cursor: 'pointer' }}
|
||||
>
|
||||
<FileZipOutlined style={{ fontSize: 40 }} />
|
||||
|
|
@ -696,7 +696,7 @@ const [selectPerson, setSelectPerson] = useState([])
|
|||
:
|
||||
file.name.indexOf('.xlsx') > -1 ?
|
||||
<div
|
||||
onClick={() => { download(file.response?.data?.fileId) }}
|
||||
onClick={() => { download(file.response?.data) }}
|
||||
style={{ cursor: 'pointer' }}
|
||||
>
|
||||
<FileExcelOutlined style={{ fontSize: 40 }} />
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ console.log("record",record);
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/assessTeamRating/file/download/${params.fileId}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/assessTeamRating/file/download/${params.fileId}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -16,11 +16,10 @@ const url = "http://223.75.53.141:9100/gs-tsg"
|
|||
|
||||
|
||||
const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave,submit }) => {
|
||||
console.log(record);
|
||||
const taskTypes = [
|
||||
{label:"日常巡查",value:0},
|
||||
{label:"特别检查",value:1},
|
||||
{label:"汛前巡检",value:2},
|
||||
{label:"日常巡查",value:1},
|
||||
{label:"特别检查",value:2},
|
||||
{label:"汛前巡检",value:3},
|
||||
]
|
||||
const statusTypes = [
|
||||
{label:"未完成",value:0},
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
|||
{label:"特别检查",value:2},
|
||||
{label:"汛前巡检",value:3},
|
||||
]
|
||||
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const handleTree = (arr) => {
|
||||
|
|
@ -312,7 +313,12 @@ try {
|
|||
<Col span={12}>
|
||||
<Form.Item
|
||||
label="开始日期"
|
||||
name="startDate"
|
||||
name="startDate"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
},
|
||||
]}
|
||||
getValueFromEvent={(e,dateString) => dateString}
|
||||
getValueProps={(value) => ({ value: value ? moment(value) : undefined })}
|
||||
|
||||
|
|
@ -323,7 +329,12 @@ try {
|
|||
<Col span={12}>
|
||||
<Form.Item
|
||||
label="结束日期"
|
||||
name="endDate"
|
||||
name="endDate"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
},
|
||||
]}
|
||||
getValueFromEvent={(e,dateString) => dateString}
|
||||
getValueProps={(value) => ({ value: value ? moment(value) : undefined })}
|
||||
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ const Page = () => {
|
|||
const [zfjkSwData, setzfjkSwData] = useState([])
|
||||
const getZfjkSwData = async () => {
|
||||
try {
|
||||
const res = await httppost2(apiurl.gsxl.zfzl.swInfo)
|
||||
const res = await httppost2(apiurl.gsxl.zfzl.swInfo,{stcd:"10196"})
|
||||
if (res.code == 200) {
|
||||
const {
|
||||
rz,
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/projectEvents/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/projectEvents/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ const Page = () => {
|
|||
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/projectEvents/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/projectEvents/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ const Page = () => {
|
|||
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/projectEvents/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/projectEvents/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ const ToolBar = ({ setSearchVal, onExport, storeData, role }) => {
|
|||
<Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish}>
|
||||
<Form.Item label="类型" name="types">
|
||||
<Select options={[
|
||||
{value:1,label:'大事记'}, {value:2,label:'调度指令'}, {value:3,label:'维修养护'},{value:4,label:'安全鉴定'}, {value:5,label:"除险加固"}, {value:6,label:'白蚁监测'}
|
||||
{value:1,label:'大事记'}, {value:2,label:'调度指令'}, {value:3,label:'维修养护'},{value:4,label:'安全鉴定'}, {value:5,label:"除险加固"}
|
||||
]} allowClear mode='multiple' maxTagCount='responsive' style={{ width: "200px" }}/>
|
||||
</Form.Item>
|
||||
<Form.Item label="发生日期" name="tm">
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/SzRuleByLaw/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/SzRuleByLaw/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/rescue/team/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/rescue/team/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -47,14 +47,14 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
|||
const [pdfViewOPen, setPdfViewOPen] = useState(false)
|
||||
|
||||
const [loading, setLoading] = useState(false)
|
||||
|
||||
/**
|
||||
* @description 文件下载
|
||||
* @param {String} params 文件fileId
|
||||
*/
|
||||
const download = (params) => {
|
||||
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/personnelPlan/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/personnelPlan/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/personnelPlanLog/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/personnelPlanLog/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
@ -115,7 +115,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
|||
|
||||
const download1 = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/personnelPlanLog/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/personnelPlanLog/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ const Page = ({ mode, onCrudSuccess,record,submit }) => {
|
|||
if (mode == 'save') {
|
||||
addBasic(params)
|
||||
} else if (mode == 'edit') {
|
||||
editBasic({...params,caseDate:undefined})
|
||||
editBasic({...params})
|
||||
}
|
||||
}
|
||||
const addBasic = (params) => {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,12 @@ const FormZdy = ({ fileKey,typeName = "ddForm", formJson, getFormInfo, type, for
|
|||
const getInfo = () => {
|
||||
form.validateFields().then((values) => {
|
||||
|
||||
getFormInfo({ ...values,caseDate:type != 'edit'? values?.caseDate:"", [fileKey]: fileList, fileIds: fileList.map(item => item.fileId) })
|
||||
getFormInfo({
|
||||
...values,
|
||||
// caseDate: type != 'edit' ? values?.caseDate : "",
|
||||
caseDate: values?.caseDate,
|
||||
[fileKey]: fileList, fileIds: fileList.map(item => item.fileId)
|
||||
})
|
||||
|
||||
setFileList([])
|
||||
}).catch((errorInfo) => {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/projectEvents/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/projectEvents/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
|||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/tsg/dispatchRecord/file/download/${params.fileId}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/tsg/dispatchRecord/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ const ToolBar = ({ value, onChange, tm, callback,role }) => {
|
|||
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://223.75.53.141:83/gunshiApp/xfflood/bzPredictionScheme/file/download/${params}`;
|
||||
downloadLink.href = `${process.env.REACT_APP_API_URL}/gunshiApp/xfflood/bzPredictionScheme/file/download/${params}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
|
|
|
|||
Loading…
Reference in New Issue