|
@ -1,33 +1,473 @@ |
|
|
|
|
|
// import React, { useEffect, useState, useRef } from 'react';
|
|
|
|
|
|
// import { connect } from 'react-redux';
|
|
|
|
|
|
// import { Spin, Button, Popconfirm, Badge } from 'antd';
|
|
|
|
|
|
// import ProTable from '@ant-design/pro-table';
|
|
|
|
|
|
// import './protable.less'
|
|
|
|
|
|
// import { getHighways,getCustodyunit } from "../actions/infor"
|
|
|
|
|
|
// import HightModal from './highways/highwaysdata';
|
|
|
|
|
|
// import Guanli from './highways/guanli';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const HigwaysTable = (props) => {
|
|
|
|
|
|
// const { dispatch, user, } = props
|
|
|
|
|
|
// const [rowSelected, setRowSelected] = useState([])
|
|
|
|
|
|
// const [modalVisible, setModalVisible] = useState(false);
|
|
|
|
|
|
// const [counts, setCounts] = useState()//shuju
|
|
|
|
|
|
// const [modalVisibleyilan, setModalVisibleyilan] = useState(false);
|
|
|
|
|
|
// const [modalVisibleyilans, setModalVisibleyilans] = useState(false);
|
|
|
|
|
|
// const [modalRecord, setModalRecord] = useState();
|
|
|
|
|
|
// const [typecard, setTypecard] = useState();
|
|
|
|
|
|
// const [recortd, setRecortd] = useState()
|
|
|
|
|
|
// const [sitename, setSitename] = useState()//桥梁名称
|
|
|
|
|
|
// const [delet, setDelet] = useState()
|
|
|
|
|
|
// const [activeKey, setActiveKey] = useState('tab1');
|
|
|
|
|
|
// const [whichofits, setWhichofits] = useState('sheshi')
|
|
|
|
|
|
// const [differentiate, setDifferentiate] = useState('bridge')
|
|
|
|
|
|
|
|
|
|
|
|
// const ref = useRef()
|
|
|
|
|
|
// useEffect(() => { ref.current.reload() }, [delet])
|
|
|
|
|
|
// //打开弹窗
|
|
|
|
|
|
// const hightModal = (type, record) => {
|
|
|
|
|
|
// setModalVisibleyilan(true);
|
|
|
|
|
|
// // setModalType(type);
|
|
|
|
|
|
// if (type == 'edit') {
|
|
|
|
|
|
// setModalRecord(record);
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
// setModalRecord(null);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// const openModal = (type, record) => {
|
|
|
|
|
|
// setModalVisible(true);
|
|
|
|
|
|
// // setModalType(type);
|
|
|
|
|
|
// if (type == 'edit') {
|
|
|
|
|
|
// setModalRecord(record);
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
// setModalRecord(null);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
// const yilanModal = (type, record) => {
|
|
|
|
|
|
// setModalVisibleyilans(true);
|
|
|
|
|
|
// // setModalType(type);
|
|
|
|
|
|
// if (type == 'edit') {
|
|
|
|
|
|
// setModalRecord(record);
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
// setModalRecord(null);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
// const columns = {
|
|
|
|
|
|
// tab1: [
|
|
|
|
|
|
// {
|
|
|
|
|
|
// title: '类型',
|
|
|
|
|
|
// dataIndex: 'placeName',
|
|
|
|
|
|
// fixed: 'left',
|
|
|
|
|
|
// width: 120,
|
|
|
|
|
|
// search: false,
|
|
|
|
|
|
// options: 1,
|
|
|
|
|
|
// backgroundColor: "#ffffff",
|
|
|
|
|
|
// fieldProps: {
|
|
|
|
|
|
// onChange: (value, cs) => {
|
|
|
|
|
|
// setSitename(value.currentTarget.value)
|
|
|
|
|
|
// },
|
|
|
|
|
|
// placeholder: '请输入类型进行搜索',
|
|
|
|
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
// render: (dom, record) => {
|
|
|
|
|
|
// return record.name
|
|
|
|
|
|
// },
|
|
|
|
|
|
// },
|
|
|
|
|
|
// {
|
|
|
|
|
|
// title: '数量',
|
|
|
|
|
|
// search: false,
|
|
|
|
|
|
// dataIndex: 'containers',
|
|
|
|
|
|
|
|
|
|
|
|
// fixed: 'left',
|
|
|
|
|
|
// width: 120,
|
|
|
|
|
|
// render: (dom, record) => {
|
|
|
|
|
|
// return record.count
|
|
|
|
|
|
// },
|
|
|
|
|
|
// fieldProps: {
|
|
|
|
|
|
// getPopupContainer: (triggerNode) => triggerNode.parentNode,
|
|
|
|
|
|
// }
|
|
|
|
|
|
// },
|
|
|
|
|
|
// {
|
|
|
|
|
|
// title: '操作',
|
|
|
|
|
|
// dataIndex: 'creatTime',
|
|
|
|
|
|
// valueType: 'dateTimeRange',
|
|
|
|
|
|
// hideInSearch: true,
|
|
|
|
|
|
// width: 160,
|
|
|
|
|
|
// fixed: 'right',
|
|
|
|
|
|
// render: (dom, record) => {
|
|
|
|
|
|
// return <div><Button type="link"
|
|
|
|
|
|
// onClick={() => {
|
|
|
|
|
|
// hightModal('edit', record)
|
|
|
|
|
|
// setTypecard('compile')
|
|
|
|
|
|
// setRecortd(record)
|
|
|
|
|
|
// }}
|
|
|
|
|
|
// >编辑</Button></div>
|
|
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
// tab2: [
|
|
|
|
|
|
// {
|
|
|
|
|
|
// title: '管养责单位',
|
|
|
|
|
|
// dataIndex: 'placeName',
|
|
|
|
|
|
// fixed: 'left',
|
|
|
|
|
|
// width: 120,
|
|
|
|
|
|
// options: 1,
|
|
|
|
|
|
// backgroundColor: "#ffffff",
|
|
|
|
|
|
// fieldProps: {
|
|
|
|
|
|
// onChange: (value, cs) => {
|
|
|
|
|
|
// setSitename(value.currentTarget.value)
|
|
|
|
|
|
// },
|
|
|
|
|
|
// placeholder: '请输入项目名称进行搜索',
|
|
|
|
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
// render: (dom, record) => {
|
|
|
|
|
|
// return record.entryName
|
|
|
|
|
|
// },
|
|
|
|
|
|
// },
|
|
|
|
|
|
// {
|
|
|
|
|
|
// title: '养护单位',
|
|
|
|
|
|
// search: false,
|
|
|
|
|
|
// dataIndex: 'time1',
|
|
|
|
|
|
// valueType: 'dateRange',
|
|
|
|
|
|
|
|
|
|
|
|
// // fixed: 'left',
|
|
|
|
|
|
// width: 120,
|
|
|
|
|
|
// render: (dom, record) => {
|
|
|
|
|
|
// return record.projectMileage
|
|
|
|
|
|
// },
|
|
|
|
|
|
// fieldProps: {
|
|
|
|
|
|
// getPopupContainer: (triggerNode) => triggerNode.parentNode,
|
|
|
|
|
|
// }
|
|
|
|
|
|
// },
|
|
|
|
|
|
// {
|
|
|
|
|
|
// title: '管理人员(人)',
|
|
|
|
|
|
// search: false,
|
|
|
|
|
|
// dataIndex: 'time2',
|
|
|
|
|
|
// valueType: 'dateRange',
|
|
|
|
|
|
// // align: 'right',
|
|
|
|
|
|
// width: 120,
|
|
|
|
|
|
// render: (dom, record) => {
|
|
|
|
|
|
// return record.investment
|
|
|
|
|
|
// },
|
|
|
|
|
|
// fieldProps: {
|
|
|
|
|
|
// getPopupContainer: (triggerNode) => triggerNode.parentNode,
|
|
|
|
|
|
// }
|
|
|
|
|
|
// },
|
|
|
|
|
|
// {
|
|
|
|
|
|
// title: '工人(人)',
|
|
|
|
|
|
// search: false,
|
|
|
|
|
|
// dataIndex: 'time3',
|
|
|
|
|
|
// valueType: 'dateRange',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// width: 120,
|
|
|
|
|
|
// render: (dom, record) => {
|
|
|
|
|
|
// return record.buildUnit
|
|
|
|
|
|
// },
|
|
|
|
|
|
// fieldProps: {
|
|
|
|
|
|
// getPopupContainer: (triggerNode) => triggerNode.parentNode,
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }, {
|
|
|
|
|
|
// title: '公益岗位(人)',
|
|
|
|
|
|
// search: false,
|
|
|
|
|
|
// dataIndex: 'time4',
|
|
|
|
|
|
// valueType: 'dateRange',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// width: 120,
|
|
|
|
|
|
// render: (dom, record) => {
|
|
|
|
|
|
// return record.constructionControlUnit
|
|
|
|
|
|
// },
|
|
|
|
|
|
// fieldProps: {
|
|
|
|
|
|
// getPopupContainer: (triggerNode) => triggerNode.parentNode,
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }, {
|
|
|
|
|
|
// title: '县道(km)',
|
|
|
|
|
|
// search: false,
|
|
|
|
|
|
// dataIndex: 'time5',
|
|
|
|
|
|
// valueType: 'dateRange',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// width: 120,
|
|
|
|
|
|
// render: (dom, record) => {
|
|
|
|
|
|
// return record.designUnit
|
|
|
|
|
|
// },
|
|
|
|
|
|
// fieldProps: {
|
|
|
|
|
|
// getPopupContainer: (triggerNode) => triggerNode.parentNode,
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }, {
|
|
|
|
|
|
// title: '乡道(km)',
|
|
|
|
|
|
// search: false,
|
|
|
|
|
|
// dataIndex: 'time6',
|
|
|
|
|
|
// valueType: 'dateRange',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// width: 120,
|
|
|
|
|
|
// render: (dom, record) => {
|
|
|
|
|
|
// return record.constructionUnit
|
|
|
|
|
|
// },
|
|
|
|
|
|
// fieldProps: {
|
|
|
|
|
|
// getPopupContainer: (triggerNode) => triggerNode.parentNode,
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }, {
|
|
|
|
|
|
// title: '村道(km)',
|
|
|
|
|
|
// search: false,
|
|
|
|
|
|
// dataIndex: 'time7',
|
|
|
|
|
|
// valueType: 'dateRange',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// width: 120,
|
|
|
|
|
|
// render: (dom, record) => {
|
|
|
|
|
|
// return record.supervisorAndSupervisor
|
|
|
|
|
|
// },
|
|
|
|
|
|
// fieldProps: {
|
|
|
|
|
|
// getPopupContainer: (triggerNode) => triggerNode.parentNode,
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }, {
|
|
|
|
|
|
// title: '桥梁(座)',
|
|
|
|
|
|
// search: false,
|
|
|
|
|
|
// dataIndex: 'time8',
|
|
|
|
|
|
// valueType: 'dateRange',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// width: 120,
|
|
|
|
|
|
// render: (dom, record) => {
|
|
|
|
|
|
// return record.projectProgress
|
|
|
|
|
|
// },
|
|
|
|
|
|
// fieldProps: {
|
|
|
|
|
|
// getPopupContainer: (triggerNode) => triggerNode.parentNode,
|
|
|
|
|
|
// }
|
|
|
|
|
|
// },
|
|
|
|
|
|
// {
|
|
|
|
|
|
// title: '操作',
|
|
|
|
|
|
// dataIndex: 'creatTime',
|
|
|
|
|
|
// valueType: 'dateTimeRange',
|
|
|
|
|
|
// hideInSearch: true,
|
|
|
|
|
|
// width: 160,
|
|
|
|
|
|
// fixed: 'right',
|
|
|
|
|
|
// render: (dom, record) => {
|
|
|
|
|
|
// return <div><Button type="link"
|
|
|
|
|
|
// onClick={() => {
|
|
|
|
|
|
// yilanModal('edit', record)
|
|
|
|
|
|
// setTypecard('compile')
|
|
|
|
|
|
// setRecortd(record)
|
|
|
|
|
|
// }}
|
|
|
|
|
|
// >编辑</Button><Popconfirm title='是否确认删除' onConfirm={() => { deldatas(record.id) }}>
|
|
|
|
|
|
// <Button type="link">删除</Button>
|
|
|
|
|
|
// </Popconfirm></div>
|
|
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
// },
|
|
|
|
|
|
// {
|
|
|
|
|
|
// key: "direction",
|
|
|
|
|
|
// hideInTable: true,
|
|
|
|
|
|
// dataIndex: "direction",
|
|
|
|
|
|
// order: 6,
|
|
|
|
|
|
// renderFormItem: (item, { type, defaultRender, ...rest }, form, record) => {
|
|
|
|
|
|
// return (
|
|
|
|
|
|
// <div> <Button
|
|
|
|
|
|
// type="primary"
|
|
|
|
|
|
// style={{ width: "100px" }}
|
|
|
|
|
|
// onClick={() => {
|
|
|
|
|
|
// yilanModal('edit', record)
|
|
|
|
|
|
// setTypecard('')
|
|
|
|
|
|
// }}
|
|
|
|
|
|
// >
|
|
|
|
|
|
// 新增
|
|
|
|
|
|
// </Button>
|
|
|
|
|
|
// {/* <Button
|
|
|
|
|
|
// type="primary"
|
|
|
|
|
|
// style={{ width: "100px", marginLeft: 20 }}
|
|
|
|
|
|
|
|
|
|
|
|
// >
|
|
|
|
|
|
// 导入
|
|
|
|
|
|
// </Button> */}
|
|
|
|
|
|
// </div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
// },
|
|
|
|
|
|
// },
|
|
|
|
|
|
// ]
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// return (
|
|
|
|
|
|
|
|
|
|
|
|
// <Spin spinning={false}>
|
|
|
|
|
|
// <div className='protable-transpor'>
|
|
|
|
|
|
// <ProTable
|
|
|
|
|
|
// actionRef={ref}
|
|
|
|
|
|
// toolbar={{
|
|
|
|
|
|
// multipleLine: true,
|
|
|
|
|
|
|
|
|
|
|
|
// menu: {
|
|
|
|
|
|
// activeKey,
|
|
|
|
|
|
// onChange: (key) => setActiveKey(key),
|
|
|
|
|
|
// items: [
|
|
|
|
|
|
// {
|
|
|
|
|
|
// key: 'tab1',
|
|
|
|
|
|
// label: <span onClick={() => {
|
|
|
|
|
|
// setWhichofits('sheshi')
|
|
|
|
|
|
// setDifferentiate('bridge')
|
|
|
|
|
|
// }}>设施统计{activeKey === 'tab1'}</span>,
|
|
|
|
|
|
// },
|
|
|
|
|
|
// {
|
|
|
|
|
|
// key: 'tab2',
|
|
|
|
|
|
// label: <span onClick={() => {
|
|
|
|
|
|
// setWhichofits('guanli')
|
|
|
|
|
|
// setDifferentiate('project')
|
|
|
|
|
|
// }}>管理养护{activeKey === 'tab2'}</span>,
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
// },
|
|
|
|
|
|
// }}
|
|
|
|
|
|
// form={{
|
|
|
|
|
|
// submitter: whichofits == "sheshi" ? false : true
|
|
|
|
|
|
// }}
|
|
|
|
|
|
// scroll={{ x: 800 }}
|
|
|
|
|
|
// options={false}
|
|
|
|
|
|
// ref={c => { finishedProductTable = c; }}
|
|
|
|
|
|
// style={{ width: "100% ", overflow: "auto", height: '760px' }}
|
|
|
|
|
|
// rowKey='id'
|
|
|
|
|
|
|
|
|
|
|
|
// // rowSelection={{
|
|
|
|
|
|
// // selectedRowKeys: rowSelected,
|
|
|
|
|
|
// // onChange: (selectedRowKeys) => {
|
|
|
|
|
|
// // setRowSelected(selectedRowKeys);
|
|
|
|
|
|
// // },
|
|
|
|
|
|
// // }}
|
|
|
|
|
|
// columns={columns[activeKey]}
|
|
|
|
|
|
// dataSource={counts || []}
|
|
|
|
|
|
// request={async (params) => {
|
|
|
|
|
|
|
|
|
|
|
|
// if (whichofits == 'sheshi') {
|
|
|
|
|
|
// console.log('differentiate','我我我我吧')
|
|
|
|
|
|
// const query = {
|
|
|
|
|
|
// name: sitename
|
|
|
|
|
|
// }
|
|
|
|
|
|
// setRowSelected([]);
|
|
|
|
|
|
// const res = await dispatch(getHighways(query));
|
|
|
|
|
|
// setCounts(res.payload.data)
|
|
|
|
|
|
// return {
|
|
|
|
|
|
// ...res,
|
|
|
|
|
|
// total: res.payload.data ? res.payload.data.count : 0
|
|
|
|
|
|
// }
|
|
|
|
|
|
// } if (whichofits == 'guanli') {
|
|
|
|
|
|
// console.log('first','afsvcsvcsvsdfv fsdv fdv b')
|
|
|
|
|
|
// const query = {
|
|
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
// setRowSelected([]);
|
|
|
|
|
|
// const res = await dispatch(getCustodyunit(query));
|
|
|
|
|
|
// setCounts(res.payload.data)
|
|
|
|
|
|
// return {
|
|
|
|
|
|
// ...res,
|
|
|
|
|
|
// total: res.payload.data ? res.payload.data.count : 0
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// >
|
|
|
|
|
|
// </ProTable>
|
|
|
|
|
|
// </div>
|
|
|
|
|
|
// {modalVisibleyilan ? <HightModal
|
|
|
|
|
|
// visible={modalVisibleyilan}
|
|
|
|
|
|
// onVisibleChange={setModalVisibleyilan}
|
|
|
|
|
|
// modalRecord={modalRecord}
|
|
|
|
|
|
// typecard={typecard}
|
|
|
|
|
|
// rewkeys={'highways'}
|
|
|
|
|
|
// recortd={recortd}
|
|
|
|
|
|
// setRecortd={setRecortd}
|
|
|
|
|
|
// setDelet={setDelet}
|
|
|
|
|
|
// /> : ''}
|
|
|
|
|
|
// {modalVisibleyilans ? <Guanli
|
|
|
|
|
|
// visible={modalVisibleyilans}
|
|
|
|
|
|
// onVisibleChange={setModalVisibleyilans}
|
|
|
|
|
|
// modalRecord={modalRecord}
|
|
|
|
|
|
// typecard={typecard}
|
|
|
|
|
|
// rewkeys={'guanli'}
|
|
|
|
|
|
// recortd={recortd}
|
|
|
|
|
|
// setRecortd={setRecortd}
|
|
|
|
|
|
// setDelet={setDelet}
|
|
|
|
|
|
// /> : ''}
|
|
|
|
|
|
// </Spin >
|
|
|
|
|
|
// )
|
|
|
|
|
|
// }
|
|
|
|
|
|
// const date = {
|
|
|
|
|
|
// "bridgeCode": "桥梁代码",
|
|
|
|
|
|
// "bridgeName": "桥梁名称",
|
|
|
|
|
|
// "centralStation": "中心桩号",
|
|
|
|
|
|
// "crossingFigureType": "跨越地物类型",
|
|
|
|
|
|
// "crossingFigureName": "跨越地物名称",
|
|
|
|
|
|
// "natureOfCharges": "收费性质",
|
|
|
|
|
|
// "rampCode": "匝道编码",
|
|
|
|
|
|
// "sectionType": "路段类型",
|
|
|
|
|
|
// "crossingFigureType1": "跨越地物类型1",
|
|
|
|
|
|
// "crossingFigureName1": "跨越地物名称1",
|
|
|
|
|
|
// "originalBridgeCode": "原桥梁代码",
|
|
|
|
|
|
// "whetherWideRoadAndNarrowBridge": "是否宽路窄桥",
|
|
|
|
|
|
// }
|
|
|
|
|
|
// function mapStateToProps(state) {
|
|
|
|
|
|
// const { auth, depMessage } = state;
|
|
|
|
|
|
// const pakData = (dep) => {
|
|
|
|
|
|
// return dep.map((d) => {
|
|
|
|
|
|
// return {
|
|
|
|
|
|
// title: d.name,
|
|
|
|
|
|
// value: d.id,
|
|
|
|
|
|
// // children: d.type >= 2 ? [] : pakData(d.subordinate)
|
|
|
|
|
|
// children: pakData(d.subordinate)
|
|
|
|
|
|
// }
|
|
|
|
|
|
// })
|
|
|
|
|
|
// }
|
|
|
|
|
|
// let depData = pakData(depMessage.data || [])
|
|
|
|
|
|
// return {
|
|
|
|
|
|
// user: auth.user,
|
|
|
|
|
|
// depMessage: depMessage.data || [],
|
|
|
|
|
|
// depLoading: depMessage.isRequesting,
|
|
|
|
|
|
// depData,
|
|
|
|
|
|
// };
|
|
|
|
|
|
// }
|
|
|
|
|
|
// export default connect(mapStateToProps)(HigwaysTable);
|
|
|
import React, { useEffect, useState, useRef } from 'react'; |
|
|
import React, { useEffect, useState, useRef } from 'react'; |
|
|
import { connect } from 'react-redux'; |
|
|
import { connect } from 'react-redux'; |
|
|
import { Spin, Button, Popconfirm, Badge } from 'antd'; |
|
|
import { Spin, Button, Popconfirm } from 'antd'; |
|
|
import ProTable from '@ant-design/pro-table'; |
|
|
import ProTable from '@ant-design/pro-table'; |
|
|
import './protable.less' |
|
|
import './protable.less' |
|
|
import { getHighways } from "../actions/infor" |
|
|
import { getRoadway, getHighways, getCustodyunit, delProject } from "../actions/infor" |
|
|
import HightModal from './highways/highwaysdata'; |
|
|
import HightModal from './highways/highwaysdata'; |
|
|
import Guanli from './highways/guanli'; |
|
|
import Guanli from './highways/guanli'; |
|
|
|
|
|
|
|
|
|
|
|
const TransporTationTable = (props) => { |
|
|
const HigwaysTable = (props) => { |
|
|
const { dispatch, user, depData, depMessage, depLoading } = props |
|
|
const { dispatch, user, } = props |
|
|
|
|
|
const [rowSelected, setRowSelected] = useState([]) |
|
|
const [rowSelected, setRowSelected] = useState([]) |
|
|
const [modalVisible, setModalVisible] = useState(false); |
|
|
const [sitename, setSitename] = useState()//名称
|
|
|
const [counts, setCounts] = useState()//shuju
|
|
|
const [counts, setCounts] = useState()//shuju
|
|
|
|
|
|
const [modalVisible, setModalVisible] = useState(false); |
|
|
const [modalVisibleyilan, setModalVisibleyilan] = useState(false); |
|
|
const [modalVisibleyilan, setModalVisibleyilan] = useState(false); |
|
|
const [modalVisibleyilans, setModalVisibleyilans] = useState(false); |
|
|
const [modalVisibleyilans, setModalVisibleyilans] = useState(false); |
|
|
|
|
|
|
|
|
const [modalRecord, setModalRecord] = useState(); |
|
|
const [modalRecord, setModalRecord] = useState(); |
|
|
const [typecard, setTypecard] = useState(); |
|
|
const [typecard, setTypecard] = useState(); |
|
|
|
|
|
const [activeKey, setActiveKey] = useState('tab1'); |
|
|
const [recortd, setRecortd] = useState() |
|
|
const [recortd, setRecortd] = useState() |
|
|
const [sitename, setSitename] = useState()//桥梁名称
|
|
|
const [whichofits, setWhichofits] = useState('sheshi') |
|
|
const [delet, setDelet] = useState() |
|
|
const [delet, setDelet] = useState() |
|
|
const [activeKey, setActiveKey] = useState('tab1'); |
|
|
const [differentiate, setDifferentiate] = useState('road') |
|
|
const [whichofits, setWhichofits] = useState('qiaoliang') |
|
|
const [grade, setGrade] = useState('县') |
|
|
const [differentiate, setDifferentiate] = useState('bridge') |
|
|
|
|
|
|
|
|
|
|
|
const ref = useRef() |
|
|
const ref = useRef() |
|
|
useEffect(() => { ref.current.reload() }, [delet]) |
|
|
useEffect(() => { ref.current.reload() }, [whichofits, delet]) |
|
|
//打开弹窗
|
|
|
//打开弹窗
|
|
|
const hightModal = (type, record) => { |
|
|
//打开弹窗
|
|
|
|
|
|
const hightModal = (type, record) => { |
|
|
setModalVisibleyilan(true); |
|
|
setModalVisibleyilan(true); |
|
|
// setModalType(type);
|
|
|
// setModalType(type);
|
|
|
if (type == 'edit') { |
|
|
if (type == 'edit') { |
|
@ -36,23 +476,6 @@ const HigwaysTable = (props) => { |
|
|
setModalRecord(null); |
|
|
setModalRecord(null); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
const deldatas = (id) => { // 工程
|
|
|
|
|
|
const query = { |
|
|
|
|
|
projectId: id |
|
|
|
|
|
} |
|
|
|
|
|
// dispatch(delProject(query)).then((res) => {
|
|
|
|
|
|
// setDelet(res)
|
|
|
|
|
|
// })
|
|
|
|
|
|
} |
|
|
|
|
|
const openModal = (type, record) => { |
|
|
|
|
|
setModalVisible(true); |
|
|
|
|
|
// setModalType(type);
|
|
|
|
|
|
if (type == 'edit') { |
|
|
|
|
|
setModalRecord(record); |
|
|
|
|
|
} else { |
|
|
|
|
|
setModalRecord(null); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
const yilanModal = (type, record) => { |
|
|
const yilanModal = (type, record) => { |
|
|
setModalVisibleyilans(true); |
|
|
setModalVisibleyilans(true); |
|
|
// setModalType(type);
|
|
|
// setModalType(type);
|
|
@ -116,13 +539,15 @@ const HigwaysTable = (props) => { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
], tab2: [ |
|
|
], |
|
|
|
|
|
tab2: [ |
|
|
{ |
|
|
{ |
|
|
title: '管养责单位', |
|
|
title: '管养责单位', |
|
|
dataIndex: 'placeName', |
|
|
dataIndex: 'placeName', |
|
|
fixed: 'left', |
|
|
fixed: 'left', |
|
|
width: 120, |
|
|
width: 120, |
|
|
options: 1, |
|
|
options: 1, |
|
|
|
|
|
search: false, |
|
|
backgroundColor: "#ffffff", |
|
|
backgroundColor: "#ffffff", |
|
|
fieldProps: { |
|
|
fieldProps: { |
|
|
onChange: (value, cs) => { |
|
|
onChange: (value, cs) => { |
|
@ -132,7 +557,7 @@ const HigwaysTable = (props) => { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
render: (dom, record) => { |
|
|
render: (dom, record) => { |
|
|
return record.entryName |
|
|
return record.responsibleUnitForManagementAndMaintenance |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
@ -144,7 +569,7 @@ const HigwaysTable = (props) => { |
|
|
// fixed: 'left',
|
|
|
// fixed: 'left',
|
|
|
width: 120, |
|
|
width: 120, |
|
|
render: (dom, record) => { |
|
|
render: (dom, record) => { |
|
|
return record.projectMileage |
|
|
return record.maintenanceUnit |
|
|
}, |
|
|
}, |
|
|
fieldProps: { |
|
|
fieldProps: { |
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
@ -158,7 +583,7 @@ const HigwaysTable = (props) => { |
|
|
// align: 'right',
|
|
|
// align: 'right',
|
|
|
width: 120, |
|
|
width: 120, |
|
|
render: (dom, record) => { |
|
|
render: (dom, record) => { |
|
|
return record.investment |
|
|
return record.management |
|
|
}, |
|
|
}, |
|
|
fieldProps: { |
|
|
fieldProps: { |
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
@ -174,7 +599,7 @@ const HigwaysTable = (props) => { |
|
|
|
|
|
|
|
|
width: 120, |
|
|
width: 120, |
|
|
render: (dom, record) => { |
|
|
render: (dom, record) => { |
|
|
return record.buildUnit |
|
|
return record.worker |
|
|
}, |
|
|
}, |
|
|
fieldProps: { |
|
|
fieldProps: { |
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
@ -188,7 +613,7 @@ const HigwaysTable = (props) => { |
|
|
|
|
|
|
|
|
width: 120, |
|
|
width: 120, |
|
|
render: (dom, record) => { |
|
|
render: (dom, record) => { |
|
|
return record.constructionControlUnit |
|
|
return record.publicWelfarePost |
|
|
}, |
|
|
}, |
|
|
fieldProps: { |
|
|
fieldProps: { |
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
@ -202,7 +627,7 @@ const HigwaysTable = (props) => { |
|
|
|
|
|
|
|
|
width: 120, |
|
|
width: 120, |
|
|
render: (dom, record) => { |
|
|
render: (dom, record) => { |
|
|
return record.designUnit |
|
|
return record.countyHighway |
|
|
}, |
|
|
}, |
|
|
fieldProps: { |
|
|
fieldProps: { |
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
@ -216,7 +641,7 @@ const HigwaysTable = (props) => { |
|
|
|
|
|
|
|
|
width: 120, |
|
|
width: 120, |
|
|
render: (dom, record) => { |
|
|
render: (dom, record) => { |
|
|
return record.constructionUnit |
|
|
return record.townshipRoad |
|
|
}, |
|
|
}, |
|
|
fieldProps: { |
|
|
fieldProps: { |
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
@ -230,7 +655,7 @@ const HigwaysTable = (props) => { |
|
|
|
|
|
|
|
|
width: 120, |
|
|
width: 120, |
|
|
render: (dom, record) => { |
|
|
render: (dom, record) => { |
|
|
return record.supervisorAndSupervisor |
|
|
return record.villageRoad |
|
|
}, |
|
|
}, |
|
|
fieldProps: { |
|
|
fieldProps: { |
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
@ -244,7 +669,7 @@ const HigwaysTable = (props) => { |
|
|
|
|
|
|
|
|
width: 120, |
|
|
width: 120, |
|
|
render: (dom, record) => { |
|
|
render: (dom, record) => { |
|
|
return record.projectProgress |
|
|
return record.bridge |
|
|
}, |
|
|
}, |
|
|
fieldProps: { |
|
|
fieldProps: { |
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
@ -264,85 +689,15 @@ const HigwaysTable = (props) => { |
|
|
setTypecard('compile') |
|
|
setTypecard('compile') |
|
|
setRecortd(record) |
|
|
setRecortd(record) |
|
|
}} |
|
|
}} |
|
|
>编辑</Button><Popconfirm title='是否确认删除' onConfirm={() => { deldatas(record.id) }}> |
|
|
>编辑</Button></div> |
|
|
<Button type="link">删除</Button> |
|
|
|
|
|
</Popconfirm></div> |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
|
|
|
key: "direction", |
|
|
|
|
|
hideInTable: true, |
|
|
|
|
|
dataIndex: "direction", |
|
|
|
|
|
order: 6, |
|
|
|
|
|
renderFormItem: (item, { type, defaultRender, ...rest }, form, record) => { |
|
|
|
|
|
return ( |
|
|
|
|
|
<div> <Button |
|
|
|
|
|
type="primary" |
|
|
|
|
|
style={{ width: "100px" }} |
|
|
|
|
|
onClick={() => { |
|
|
|
|
|
yilanModal('edit', record) |
|
|
|
|
|
setTypecard('') |
|
|
|
|
|
}} |
|
|
|
|
|
> |
|
|
|
|
|
新增 |
|
|
|
|
|
</Button> |
|
|
|
|
|
{/* <Button |
|
|
|
|
|
type="primary" |
|
|
|
|
|
style={{ width: "100px", marginLeft: 20 }} |
|
|
|
|
|
|
|
|
|
|
|
> |
|
|
|
|
|
导入 |
|
|
|
|
|
</Button> */} |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
); |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
|
|
|
|
|
|
<Spin spinning={false}> |
|
|
<Spin spinning={false}> |
|
|
{/* <div className='protable-transpor'> |
|
|
|
|
|
<ProTable |
|
|
|
|
|
actionRef={ref} |
|
|
|
|
|
scroll={{ x: 800 }} |
|
|
|
|
|
options={false} |
|
|
|
|
|
form={{ |
|
|
|
|
|
submitter: false |
|
|
|
|
|
}} |
|
|
|
|
|
// ref={c => { finishedProductTable = c; }}
|
|
|
|
|
|
style={{ width: "100% ", overflow: "auto", height: '760px' }} |
|
|
|
|
|
rowKey='id' |
|
|
|
|
|
onReset={(v) => { |
|
|
|
|
|
setSitename('') |
|
|
|
|
|
}} |
|
|
|
|
|
// rowSelection={{
|
|
|
|
|
|
// selectedRowKeys: rowSelected,
|
|
|
|
|
|
// onChange: (selectedRowKeys) => {
|
|
|
|
|
|
// setRowSelected(selectedRowKeys);
|
|
|
|
|
|
// },
|
|
|
|
|
|
// }}
|
|
|
|
|
|
columns={columns} |
|
|
|
|
|
|
|
|
|
|
|
dataSource={counts || []} |
|
|
|
|
|
request={async (params) => { |
|
|
|
|
|
const query = { |
|
|
|
|
|
name: sitename |
|
|
|
|
|
} |
|
|
|
|
|
setRowSelected([]); |
|
|
|
|
|
const res = await dispatch(getHighways(query)); |
|
|
|
|
|
setCounts(res.payload.data) |
|
|
|
|
|
return { |
|
|
|
|
|
...res, |
|
|
|
|
|
total: res.payload.data ? res.payload.data.count : 0 |
|
|
|
|
|
} |
|
|
|
|
|
}} |
|
|
|
|
|
> |
|
|
|
|
|
</ProTable></div> */} |
|
|
|
|
|
<div className='protable-transpor'> |
|
|
<div className='protable-transpor'> |
|
|
<ProTable |
|
|
<ProTable |
|
|
actionRef={ref} |
|
|
actionRef={ref} |
|
@ -356,14 +711,14 @@ const HigwaysTable = (props) => { |
|
|
{ |
|
|
{ |
|
|
key: 'tab1', |
|
|
key: 'tab1', |
|
|
label: <span onClick={() => { |
|
|
label: <span onClick={() => { |
|
|
setWhichofits('qiaoliang') |
|
|
setWhichofits('sheshi') |
|
|
setDifferentiate('bridge') |
|
|
setDifferentiate('bridge') |
|
|
}}>设施统计{activeKey === 'tab1'}</span>, |
|
|
}}>设施统计{activeKey === 'tab1'}</span>, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
key: 'tab2', |
|
|
key: 'tab2', |
|
|
label: <span onClick={() => { |
|
|
label: <span onClick={() => { |
|
|
setWhichofits('gongcheng') |
|
|
setWhichofits('guanli') |
|
|
setDifferentiate('project') |
|
|
setDifferentiate('project') |
|
|
}}>管理养护{activeKey === 'tab2'}</span>, |
|
|
}}>管理养护{activeKey === 'tab2'}</span>, |
|
|
}, |
|
|
}, |
|
@ -372,7 +727,7 @@ const HigwaysTable = (props) => { |
|
|
}, |
|
|
}, |
|
|
}} |
|
|
}} |
|
|
form={{ |
|
|
form={{ |
|
|
submitter: whichofits == "qiaoliang" ? false : true |
|
|
submitter:false |
|
|
}} |
|
|
}} |
|
|
scroll={{ x: 800 }} |
|
|
scroll={{ x: 800 }} |
|
|
options={false} |
|
|
options={false} |
|
@ -389,40 +744,38 @@ const HigwaysTable = (props) => { |
|
|
// },
|
|
|
// },
|
|
|
// }}
|
|
|
// }}
|
|
|
columns={columns[activeKey]} |
|
|
columns={columns[activeKey]} |
|
|
|
|
|
|
|
|
dataSource={counts || []} |
|
|
dataSource={counts || []} |
|
|
request={async (params) => { |
|
|
request={async (params) => { |
|
|
if (whichofits == 'qiaoliang') { |
|
|
console.log(whichofits) |
|
|
|
|
|
if (whichofits == 'sheshi') { |
|
|
const query = { |
|
|
const query = { |
|
|
name: sitename |
|
|
|
|
|
} |
|
|
} |
|
|
setRowSelected([]); |
|
|
setRowSelected([]); |
|
|
const res = await dispatch(getHighways(query)); |
|
|
const res = await dispatch(getHighways(query)); |
|
|
|
|
|
// console.log(res)
|
|
|
|
|
|
|
|
|
setCounts(res.payload.data) |
|
|
setCounts(res.payload.data) |
|
|
return { |
|
|
return { |
|
|
...res, |
|
|
...res, |
|
|
total: res.payload.data ? res.payload.data.count : 0 |
|
|
total: res.payload.data ? res.payload.data.count : 0 |
|
|
} |
|
|
} |
|
|
} if (whichofits == 'gongcheng') { |
|
|
} if (whichofits == 'guanli') { |
|
|
const query = { |
|
|
const query = { |
|
|
type: 'bridge', |
|
|
|
|
|
entryName: sitename |
|
|
|
|
|
} |
|
|
} |
|
|
setRowSelected([]); |
|
|
setRowSelected([]); |
|
|
const res = await dispatch(getProject(query)); |
|
|
const res = await dispatch(getCustodyunit(query)); |
|
|
setCounts("") |
|
|
setCounts(res.payload.data) |
|
|
return { |
|
|
return { |
|
|
...res, |
|
|
...res, |
|
|
// total: res.payload.data ? res.payload.data.count : 0
|
|
|
total: res.payload.data ? res.payload.data.count : 0 |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}} |
|
|
}} |
|
|
search={{ |
|
|
search={{ |
|
|
defaultCollapsed: false, |
|
|
defaultCollapsed: false, |
|
|
optionRender: (searchConfig, formProps, dom) => [ |
|
|
optionRender: (searchConfig, formProps, dom) => [ |
|
|
...dom.reverse(), |
|
|
...dom.reverse(), |
|
|
// whichofits == "qiaoliang" ? "" : <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, differentiate) }}>
|
|
|
// <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected,grade,differentiate) }}>
|
|
|
// <Button
|
|
|
// <Button
|
|
|
// >
|
|
|
// >
|
|
|
// 导出
|
|
|
// 导出
|
|
@ -430,7 +783,6 @@ const HigwaysTable = (props) => { |
|
|
// </Popconfirm>
|
|
|
// </Popconfirm>
|
|
|
], |
|
|
], |
|
|
}} |
|
|
}} |
|
|
|
|
|
|
|
|
> |
|
|
> |
|
|
</ProTable> |
|
|
</ProTable> |
|
|
</div> |
|
|
</div> |
|
@ -444,7 +796,7 @@ const HigwaysTable = (props) => { |
|
|
setRecortd={setRecortd} |
|
|
setRecortd={setRecortd} |
|
|
setDelet={setDelet} |
|
|
setDelet={setDelet} |
|
|
/> : ''} |
|
|
/> : ''} |
|
|
{modalVisibleyilans ? <Guanli |
|
|
{modalVisibleyilans ? <Guanli |
|
|
visible={modalVisibleyilans} |
|
|
visible={modalVisibleyilans} |
|
|
onVisibleChange={setModalVisibleyilans} |
|
|
onVisibleChange={setModalVisibleyilans} |
|
|
modalRecord={modalRecord} |
|
|
modalRecord={modalRecord} |
|
@ -457,20 +809,17 @@ const HigwaysTable = (props) => { |
|
|
</Spin > |
|
|
</Spin > |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|
const date = { |
|
|
const data = [ |
|
|
"bridgeCode": "桥梁代码", |
|
|
{ name: "管养责任单位", type: 'responsibleUnitForManagementAndMaintenance' }, |
|
|
"bridgeName": "桥梁名称", |
|
|
{ name: "养护单位", type: 'maintenanceUnit' }, |
|
|
"centralStation": "中心桩号", |
|
|
{ name: "管理人员", type: 'management' }, |
|
|
"crossingFigureType": "跨越地物类型", |
|
|
{ name: "工人", type: 'worker' }, |
|
|
"crossingFigureName": "跨越地物名称", |
|
|
{ name: "公益岗位", type: 'publicWelfarePost' }, |
|
|
"natureOfCharges": "收费性质", |
|
|
{ name: "县道", type: 'countyHighway' }, |
|
|
"rampCode": "匝道编码", |
|
|
{ name: "乡道", type: 'townshipRoad' }, |
|
|
"sectionType": "路段类型", |
|
|
{ name: "村道", type: 'villageRoad' }, |
|
|
"crossingFigureType1": "跨越地物类型1", |
|
|
{ name: "桥梁", type: 'bridge' }, |
|
|
"crossingFigureName1": "跨越地物名称1", |
|
|
] |
|
|
"originalBridgeCode": "原桥梁代码", |
|
|
|
|
|
"whetherWideRoadAndNarrowBridge": "是否宽路窄桥", |
|
|
|
|
|
} |
|
|
|
|
|
function mapStateToProps(state) { |
|
|
function mapStateToProps(state) { |
|
|
const { auth, depMessage } = state; |
|
|
const { auth, depMessage } = state; |
|
|
const pakData = (dep) => { |
|
|
const pakData = (dep) => { |
|
@ -491,4 +840,4 @@ function mapStateToProps(state) { |
|
|
depData, |
|
|
depData, |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
export default connect(mapStateToProps)(HigwaysTable); |
|
|
export default connect(mapStateToProps)(TransporTationTable); |