|
|
@ -1,31 +1,471 @@ |
|
|
|
// 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 { 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.less' |
|
|
|
import { getHighways } from "../actions/infor" |
|
|
|
import { getRoadway, getHighways, getCustodyunit, delProject } from "../actions/infor" |
|
|
|
import HightModal from './highways/highwaysdata'; |
|
|
|
import Guanli from './highways/guanli'; |
|
|
|
|
|
|
|
|
|
|
|
const HigwaysTable = (props) => { |
|
|
|
const { dispatch, user, } = props |
|
|
|
const TransporTationTable = (props) => { |
|
|
|
const { dispatch, user, depData, depMessage, depLoading } = props |
|
|
|
const [rowSelected, setRowSelected] = useState([]) |
|
|
|
const [modalVisible, setModalVisible] = useState(false); |
|
|
|
const [sitename, setSitename] = useState()//名称
|
|
|
|
const [counts, setCounts] = useState()//shuju
|
|
|
|
const [modalVisible, setModalVisible] = useState(false); |
|
|
|
const [modalVisibleyilan, setModalVisibleyilan] = useState(false); |
|
|
|
const [modalVisibleyilans, setModalVisibleyilans] = useState(false); |
|
|
|
|
|
|
|
const [modalRecord, setModalRecord] = useState(); |
|
|
|
const [typecard, setTypecard] = useState(); |
|
|
|
const [activeKey, setActiveKey] = useState('tab1'); |
|
|
|
const [recortd, setRecortd] = useState() |
|
|
|
const [sitename, setSitename] = useState()//桥梁名称
|
|
|
|
const [whichofits, setWhichofits] = useState('sheshi') |
|
|
|
const [delet, setDelet] = useState() |
|
|
|
const [activeKey, setActiveKey] = useState('tab1'); |
|
|
|
const [whichofits, setWhichofits] = useState('qiaoliang') |
|
|
|
const [differentiate, setDifferentiate] = useState('bridge') |
|
|
|
|
|
|
|
const [differentiate, setDifferentiate] = useState('road') |
|
|
|
const [grade, setGrade] = useState('县') |
|
|
|
const ref = useRef() |
|
|
|
useEffect(() => { ref.current.reload() }, [delet]) |
|
|
|
useEffect(() => { ref.current.reload() }, [whichofits, delet]) |
|
|
|
//打开弹窗
|
|
|
|
//打开弹窗
|
|
|
|
const hightModal = (type, record) => { |
|
|
|
setModalVisibleyilan(true); |
|
|
@ -36,23 +476,6 @@ const HigwaysTable = (props) => { |
|
|
|
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) => { |
|
|
|
setModalVisibleyilans(true); |
|
|
|
// setModalType(type);
|
|
|
@ -116,13 +539,15 @@ const HigwaysTable = (props) => { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
], tab2: [ |
|
|
|
], |
|
|
|
tab2: [ |
|
|
|
{ |
|
|
|
title: '管养责单位', |
|
|
|
dataIndex: 'placeName', |
|
|
|
fixed: 'left', |
|
|
|
width: 120, |
|
|
|
options: 1, |
|
|
|
search: false, |
|
|
|
backgroundColor: "#ffffff", |
|
|
|
fieldProps: { |
|
|
|
onChange: (value, cs) => { |
|
|
@ -132,7 +557,7 @@ const HigwaysTable = (props) => { |
|
|
|
|
|
|
|
}, |
|
|
|
render: (dom, record) => { |
|
|
|
return record.entryName |
|
|
|
return record.responsibleUnitForManagementAndMaintenance |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -144,7 +569,7 @@ const HigwaysTable = (props) => { |
|
|
|
// fixed: 'left',
|
|
|
|
width: 120, |
|
|
|
render: (dom, record) => { |
|
|
|
return record.projectMileage |
|
|
|
return record.maintenanceUnit |
|
|
|
}, |
|
|
|
fieldProps: { |
|
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
|
@ -158,7 +583,7 @@ const HigwaysTable = (props) => { |
|
|
|
// align: 'right',
|
|
|
|
width: 120, |
|
|
|
render: (dom, record) => { |
|
|
|
return record.investment |
|
|
|
return record.management |
|
|
|
}, |
|
|
|
fieldProps: { |
|
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
|
@ -174,7 +599,7 @@ const HigwaysTable = (props) => { |
|
|
|
|
|
|
|
width: 120, |
|
|
|
render: (dom, record) => { |
|
|
|
return record.buildUnit |
|
|
|
return record.worker |
|
|
|
}, |
|
|
|
fieldProps: { |
|
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
|
@ -188,7 +613,7 @@ const HigwaysTable = (props) => { |
|
|
|
|
|
|
|
width: 120, |
|
|
|
render: (dom, record) => { |
|
|
|
return record.constructionControlUnit |
|
|
|
return record.publicWelfarePost |
|
|
|
}, |
|
|
|
fieldProps: { |
|
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
|
@ -202,7 +627,7 @@ const HigwaysTable = (props) => { |
|
|
|
|
|
|
|
width: 120, |
|
|
|
render: (dom, record) => { |
|
|
|
return record.designUnit |
|
|
|
return record.countyHighway |
|
|
|
}, |
|
|
|
fieldProps: { |
|
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
|
@ -216,7 +641,7 @@ const HigwaysTable = (props) => { |
|
|
|
|
|
|
|
width: 120, |
|
|
|
render: (dom, record) => { |
|
|
|
return record.constructionUnit |
|
|
|
return record.townshipRoad |
|
|
|
}, |
|
|
|
fieldProps: { |
|
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
|
@ -230,7 +655,7 @@ const HigwaysTable = (props) => { |
|
|
|
|
|
|
|
width: 120, |
|
|
|
render: (dom, record) => { |
|
|
|
return record.supervisorAndSupervisor |
|
|
|
return record.villageRoad |
|
|
|
}, |
|
|
|
fieldProps: { |
|
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
|
@ -244,7 +669,7 @@ const HigwaysTable = (props) => { |
|
|
|
|
|
|
|
width: 120, |
|
|
|
render: (dom, record) => { |
|
|
|
return record.projectProgress |
|
|
|
return record.bridge |
|
|
|
}, |
|
|
|
fieldProps: { |
|
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
|
@ -264,85 +689,15 @@ const HigwaysTable = (props) => { |
|
|
|
setTypecard('compile') |
|
|
|
setRecortd(record) |
|
|
|
}} |
|
|
|
>编辑</Button><Popconfirm title='是否确认删除' onConfirm={() => { deldatas(record.id) }}> |
|
|
|
<Button type="link">删除</Button> |
|
|
|
</Popconfirm></div> |
|
|
|
>编辑</Button></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} |
|
|
|
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'> |
|
|
|
<ProTable |
|
|
|
actionRef={ref} |
|
|
@ -356,14 +711,14 @@ const HigwaysTable = (props) => { |
|
|
|
{ |
|
|
|
key: 'tab1', |
|
|
|
label: <span onClick={() => { |
|
|
|
setWhichofits('qiaoliang') |
|
|
|
setWhichofits('sheshi') |
|
|
|
setDifferentiate('bridge') |
|
|
|
}}>设施统计{activeKey === 'tab1'}</span>, |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: 'tab2', |
|
|
|
label: <span onClick={() => { |
|
|
|
setWhichofits('gongcheng') |
|
|
|
setWhichofits('guanli') |
|
|
|
setDifferentiate('project') |
|
|
|
}}>管理养护{activeKey === 'tab2'}</span>, |
|
|
|
}, |
|
|
@ -372,7 +727,7 @@ const HigwaysTable = (props) => { |
|
|
|
}, |
|
|
|
}} |
|
|
|
form={{ |
|
|
|
submitter: whichofits == "qiaoliang" ? false : true |
|
|
|
submitter:false |
|
|
|
}} |
|
|
|
scroll={{ x: 800 }} |
|
|
|
options={false} |
|
|
@ -389,40 +744,38 @@ const HigwaysTable = (props) => { |
|
|
|
// },
|
|
|
|
// }}
|
|
|
|
columns={columns[activeKey]} |
|
|
|
|
|
|
|
dataSource={counts || []} |
|
|
|
request={async (params) => { |
|
|
|
if (whichofits == 'qiaoliang') { |
|
|
|
console.log(whichofits) |
|
|
|
if (whichofits == 'sheshi') { |
|
|
|
const query = { |
|
|
|
name: sitename |
|
|
|
} |
|
|
|
setRowSelected([]); |
|
|
|
const res = await dispatch(getHighways(query)); |
|
|
|
// console.log(res)
|
|
|
|
|
|
|
|
setCounts(res.payload.data) |
|
|
|
return { |
|
|
|
...res, |
|
|
|
total: res.payload.data ? res.payload.data.count : 0 |
|
|
|
} |
|
|
|
} if (whichofits == 'gongcheng') { |
|
|
|
} if (whichofits == 'guanli') { |
|
|
|
const query = { |
|
|
|
type: 'bridge', |
|
|
|
entryName: sitename |
|
|
|
} |
|
|
|
setRowSelected([]); |
|
|
|
const res = await dispatch(getProject(query)); |
|
|
|
setCounts("") |
|
|
|
const res = await dispatch(getCustodyunit(query)); |
|
|
|
setCounts(res.payload.data) |
|
|
|
return { |
|
|
|
...res, |
|
|
|
// total: res.payload.data ? res.payload.data.count : 0
|
|
|
|
total: res.payload.data ? res.payload.data.count : 0 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}} |
|
|
|
search={{ |
|
|
|
defaultCollapsed: false, |
|
|
|
optionRender: (searchConfig, formProps, dom) => [ |
|
|
|
...dom.reverse(), |
|
|
|
// whichofits == "qiaoliang" ? "" : <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, differentiate) }}>
|
|
|
|
// <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected,grade,differentiate) }}>
|
|
|
|
// <Button
|
|
|
|
// >
|
|
|
|
// 导出
|
|
|
@ -430,7 +783,6 @@ const HigwaysTable = (props) => { |
|
|
|
// </Popconfirm>
|
|
|
|
], |
|
|
|
}} |
|
|
|
|
|
|
|
> |
|
|
|
</ProTable> |
|
|
|
</div> |
|
|
@ -457,20 +809,17 @@ const HigwaysTable = (props) => { |
|
|
|
</Spin > |
|
|
|
) |
|
|
|
} |
|
|
|
const date = { |
|
|
|
"bridgeCode": "桥梁代码", |
|
|
|
"bridgeName": "桥梁名称", |
|
|
|
"centralStation": "中心桩号", |
|
|
|
"crossingFigureType": "跨越地物类型", |
|
|
|
"crossingFigureName": "跨越地物名称", |
|
|
|
"natureOfCharges": "收费性质", |
|
|
|
"rampCode": "匝道编码", |
|
|
|
"sectionType": "路段类型", |
|
|
|
"crossingFigureType1": "跨越地物类型1", |
|
|
|
"crossingFigureName1": "跨越地物名称1", |
|
|
|
"originalBridgeCode": "原桥梁代码", |
|
|
|
"whetherWideRoadAndNarrowBridge": "是否宽路窄桥", |
|
|
|
} |
|
|
|
const data = [ |
|
|
|
{ name: "管养责任单位", type: 'responsibleUnitForManagementAndMaintenance' }, |
|
|
|
{ name: "养护单位", type: 'maintenanceUnit' }, |
|
|
|
{ name: "管理人员", type: 'management' }, |
|
|
|
{ name: "工人", type: 'worker' }, |
|
|
|
{ name: "公益岗位", type: 'publicWelfarePost' }, |
|
|
|
{ name: "县道", type: 'countyHighway' }, |
|
|
|
{ name: "乡道", type: 'townshipRoad' }, |
|
|
|
{ name: "村道", type: 'villageRoad' }, |
|
|
|
{ name: "桥梁", type: 'bridge' }, |
|
|
|
] |
|
|
|
function mapStateToProps(state) { |
|
|
|
const { auth, depMessage } = state; |
|
|
|
const pakData = (dep) => { |
|
|
@ -491,4 +840,4 @@ function mapStateToProps(state) { |
|
|
|
depData, |
|
|
|
}; |
|
|
|
} |
|
|
|
export default connect(mapStateToProps)(HigwaysTable); |
|
|
|
export default connect(mapStateToProps)(TransporTationTable); |