+
+ );
+};
+
+
+
+const FileTable = (props) => {
+ const { roads, fileList, dispatch, fileListLoading, roadsLoading } = props;
+ const [record, setRecord] = useState();
+ const [dateRange, setDateRange] = useState();
+ const [detailVisible, setDetailVisible] = useState(false)
+ const [activeTabKey1, setActiveTabKey1] = useState('1');
+ const [uploadVisible, setUploadVisible] = useState(false);
+ const { RangePicker } = DatePicker;
+
+ useEffect(() => {
+ if (roads && roads instanceof Array) {
+ setRecord(roads[0]);
+ }
+ }, [roads])
+
+ useEffect(() => {
+ if (record) {
+ queryData();
+ }
+ }, [record, dateRange])
+
+ const queryData = () => {
+ const { rId } = record;
+ dispatch(getFileList({ fId: activeTabKey1, limit: 10, offset: 0, roadId: rId }))
+ }
+
+ const onPageChange = (page, pageSize) => {
+ dispatch(getFileList({ fId: activeTabKey1, limit: pageSize, offset: (page - 1) * pageSize, roadId: rId }))
+ }
+
+ useEffect(() => {
+ if (record && activeTabKey1) {
+ queryData();
+ }
+
+ }, [activeTabKey1, record])
+
+ const handelRefresh = () => {
+
+ }
+
+ const handleClose = () => {
+ setDetailVisible(false)
+ }
+ const handleOpen = () => {
+ setDetailVisible(true)
+ }
+
+ const tabList = [
+ {
+ key: '1',
+ tab: '前期资料',
+ }, {
+ key: '2',
+ tab: '施工资料',
+ }, {
+ key: '3',
+ tab: '竣工资料',
+ }, {
+ key: '4',
+ tab: '维修资料',
+ }, {
+ key: '5',
+ tab: '道路资料',
+ },
+ ];
+ const onTab1Change = (key) => {
+ setActiveTabKey1(key);
+ };
+
+ const handleChangeRecord = (newRecord) => {
+ let target = null;
+ if (!record || newRecord.rId != record.rId) {
+ target = newRecord;
+ }
+ setRecord(target);
+ }
+ const hanleUpload = () => {
+
+ }
+
+ return (
+