19 changed files with 1644 additions and 2 deletions
Unified View
Diff Options
-
12config/routes.js
-
343src/pages/JDCX/TableList/index.jsx
-
1src/pages/JDCX/TopSearch/README.md
-
412src/pages/JDCX/TopSearch/index.jsx
-
12src/pages/JDCX/TopSearch/index.less
-
153src/pages/JDCX/index.jsx
-
300src/pages/YBSX/TableList/index.jsx
-
1src/pages/YBSX/TopSearch/README.md
-
293src/pages/YBSX/TopSearch/index.jsx
-
12src/pages/YBSX/TopSearch/index.less
-
107src/pages/YBSX/index.jsx
-
0src/pages/ZBSX/HCBGBtn/index.jsx
-
0src/pages/ZBSX/README.md
-
0src/pages/ZBSX/TableList/README.md
-
0src/pages/ZBSX/TableList/index.jsx
-
0src/pages/ZBSX/TopSearch/README.md
-
0src/pages/ZBSX/TopSearch/index.jsx
-
0src/pages/ZBSX/TopSearch/index.less
-
0src/pages/ZBSX/index.jsx
@ -0,0 +1,343 @@ |
|||||
|
import React, { useState, useEffect } from 'react'; |
||||
|
import { Table, Modal, Button, Pagination, Tooltip } from 'antd'; |
||||
|
import { connect } from 'umi'; |
||||
|
import moment from 'moment'; |
||||
|
|
||||
|
import TopSearch from '../TopSearch'; |
||||
|
import CK from '@/components/Tabs-CK'; |
||||
|
import { getDicsName } from '@/utils/utils'; |
||||
|
import { AJZT, UserLevel } from '@/utils/constants'; |
||||
|
import { getHGIcons, ExampleBar, getTimeLine } from '@/components/MyIcons'; |
||||
|
|
||||
|
const initDateType = 'sevenDays'; |
||||
|
const initSearchParams = { |
||||
|
page: 1, |
||||
|
size: 10, |
||||
|
startTime: moment().add(-7, 'days'), |
||||
|
endTime: moment(), |
||||
|
}; |
||||
|
|
||||
|
const TableList = (props) => { |
||||
|
const { msg, sysToken, refesh, isLocationInBu, locationType, type, global } = props; |
||||
|
const [searchParams, setSearchParams] = useState(initSearchParams); |
||||
|
const [tableData, setTableData] = useState(null); |
||||
|
// const [selectedRowKeys, setSelectedRowKeys] = useState([]); |
||||
|
const [nowModalComponent, setNowModalComponent] = useState(null); |
||||
|
const [categoryList, setCategoryList] = useState([]); |
||||
|
|
||||
|
const getList = (params) => { |
||||
|
const newParams = isLocationInBu && type === 'sheng' ? { ...params, sign: 1 } : params; // 部里发布 并且查询省里的列表加额外参数 |
||||
|
const newSysToken = (locationType === UserLevel.Province.value && type === 'sheng')|| (locationType === UserLevel.City.value && type === 'shi') ? '' : sysToken; |
||||
|
props.fetchDoneList({ params: newParams, sysToken: newSysToken }).then((data) => setTableData(data)); |
||||
|
// console.log(sysToken); |
||||
|
}; |
||||
|
// debugger; |
||||
|
const getCategoryList = () => { |
||||
|
let newSysToken = sysToken; |
||||
|
let isNotGateway = false; |
||||
|
if (isLocationInBu) { // 在部級環境下 |
||||
|
if (type === 'sheng') isNotGateway = true; // systoken需要加到url最後面 |
||||
|
} |
||||
|
// else if (locationType === UserLevel.Province.value) { // 在省級環境下 |
||||
|
// newSysToken = type === 'sheng' ? 'sheng' : type === 'shi' ? 'shi' : sysToken; |
||||
|
// } else if (locationType === UserLevel.City.value) { // 在市級環境下 |
||||
|
// newSysToken = type; |
||||
|
// } |
||||
|
props |
||||
|
.fetchCategoryList({ |
||||
|
params: {}, |
||||
|
sysToken: newSysToken, |
||||
|
isNotGateway |
||||
|
}) |
||||
|
.then((res) => { |
||||
|
setCategoryList(res); |
||||
|
}); |
||||
|
}; |
||||
|
// debugger; |
||||
|
// const getDict = (params) => { |
||||
|
// props.fetchDict({ params, sysToken }); |
||||
|
// } |
||||
|
|
||||
|
useEffect(() => { |
||||
|
if (!msg) { |
||||
|
getList(searchParams); |
||||
|
} |
||||
|
}, [refesh]); |
||||
|
|
||||
|
useEffect(() => { |
||||
|
// 点击模型详情跳转过来的,参数由跳转带过来, |
||||
|
if (msg) { |
||||
|
setSearchParams(msg); |
||||
|
getList({ ...msg, searchType: 1 }); // 给接口添加参数,此时接口模型名称不是绝对匹配查询,不是模糊查询 |
||||
|
} |
||||
|
}, [msg]); |
||||
|
|
||||
|
useEffect(() => { |
||||
|
getCategoryList(); // 专项类别 |
||||
|
}, [type]); |
||||
|
|
||||
|
// 点击查询 |
||||
|
const onSearch = (params) => { |
||||
|
setSearchParams({ ...searchParams, ...params, page: 1 }); |
||||
|
getList({ ...searchParams, ...params, page: 1 }); |
||||
|
}; |
||||
|
|
||||
|
const handleReset = () => { |
||||
|
setSearchParams(initSearchParams); |
||||
|
getList(initSearchParams); |
||||
|
}; |
||||
|
|
||||
|
const changePage = (page) => { |
||||
|
setSearchParams({ ...searchParams, page }); |
||||
|
getList({ ...searchParams, page }); |
||||
|
}; |
||||
|
|
||||
|
// const rowSelection = { |
||||
|
// selectedRowKeys, |
||||
|
// onChange: selectedRowKeys, |
||||
|
// getCheckboxProps: record => ({ |
||||
|
// disabled: selectAbleType === 'folder' ? record.isDir !== 1 : record.isDir === 1, |
||||
|
// }), |
||||
|
// }; |
||||
|
|
||||
|
const columns = [ |
||||
|
{ |
||||
|
title: '序号', |
||||
|
dataIndex: 'id', |
||||
|
key: 'id', |
||||
|
render: (text, record, index) => index + 1, |
||||
|
width: '5%', |
||||
|
}, |
||||
|
{ |
||||
|
title: '预警编号', |
||||
|
dataIndex: 'yjBh', |
||||
|
width: '22%', |
||||
|
render: (text, record) => { |
||||
|
return ( |
||||
|
<span> |
||||
|
{getHGIcons(record?.ccjg)} |
||||
|
{text} |
||||
|
</span> |
||||
|
); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
title: '模型名称', |
||||
|
dataIndex: 'mxMc', |
||||
|
width: '7%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={text}> |
||||
|
{text} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '问题类型', |
||||
|
dataIndex: 'cjwtLx', |
||||
|
width: '7%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={text}> |
||||
|
{text} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '承办督察部门', |
||||
|
dataIndex: 'sadwMc', |
||||
|
width: '9%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={text}> |
||||
|
{text} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '问题简述', |
||||
|
dataIndex: 'wtjs', |
||||
|
width: '7%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={text}> |
||||
|
{text} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '当前办理单位', |
||||
|
dataIndex: 'dqbldwMc', |
||||
|
width: '9%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={text}> |
||||
|
{text} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '当前办理人', |
||||
|
dataIndex: 'dqblrMc', |
||||
|
width: '8%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={text}> |
||||
|
{text} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '预警流向', |
||||
|
dataIndex: 'blfsMc', |
||||
|
width: '7%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={text}> |
||||
|
{text} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '最新状态', |
||||
|
dataIndex: 'dqZt', |
||||
|
width: '7%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={getDicsName(AJZT, text)}> |
||||
|
{getDicsName(AJZT, text)} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '最新更新时间', |
||||
|
dataIndex: 'updateTime', |
||||
|
width: '9%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={text}> |
||||
|
{text} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '最迟反馈时间', |
||||
|
dataIndex: 'zcfkSj', |
||||
|
width: '9%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={text}> |
||||
|
{text} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '时限', |
||||
|
key: 'id', |
||||
|
dataIndex: 'fkyj', |
||||
|
width: '5%', |
||||
|
render: (text) => getTimeLine(text), |
||||
|
// fixed: 'right', |
||||
|
}, |
||||
|
{ |
||||
|
title: '操作', |
||||
|
key: 'id', |
||||
|
dataIndex: 'id', |
||||
|
width: '6%', |
||||
|
render: (text, record) => { |
||||
|
return ( |
||||
|
<Button |
||||
|
type="link" |
||||
|
onClick={() => |
||||
|
setNowModalComponent(<CK id={record.id} info={record} sysToken={sysToken} />) |
||||
|
} |
||||
|
> |
||||
|
查看 |
||||
|
</Button> |
||||
|
); |
||||
|
}, |
||||
|
fixed: 'right', |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
return ( |
||||
|
<div> |
||||
|
<TopSearch |
||||
|
onSearch={onSearch} |
||||
|
initDateType={initDateType} |
||||
|
handleReset={handleReset} |
||||
|
SSQK={global.dicts.SSQK} |
||||
|
changeParams={msg} |
||||
|
categoryList={categoryList} |
||||
|
/> |
||||
|
<Table |
||||
|
columns={columns} |
||||
|
dataSource={tableData?.records} |
||||
|
rowKey="id" |
||||
|
// rowSelection={rowSelection} |
||||
|
scroll={{ x: 1620 }} |
||||
|
pagination={false} |
||||
|
// current: tableData?.current, |
||||
|
// pageSize: tableData?.size, |
||||
|
// total: tableData?.total, |
||||
|
// onChange: page => changePage(page), |
||||
|
// showSizeChanger: true, |
||||
|
// onShowSizeChange: () => this.onShowSizeChange, |
||||
|
// pageSizeOptions: ['10', '20', '50', '100', '500', '1000'], |
||||
|
/> |
||||
|
<div style={{ display: 'flex', justifyContent: 'flex-end' }}> |
||||
|
<ExampleBar /> |
||||
|
<Pagination |
||||
|
current={tableData?.current || 0} |
||||
|
pageSize={tableData?.size || 0} |
||||
|
total={tableData?.total || 0} |
||||
|
onChange={(page) => changePage(page)} |
||||
|
showTotal={(total) => `共 ${total} 条`} |
||||
|
/> |
||||
|
</div> |
||||
|
{nowModalComponent && ( |
||||
|
<Modal |
||||
|
visible={nowModalComponent} |
||||
|
footer={null} |
||||
|
onCancel={() => setNowModalComponent(null)} |
||||
|
// style={{ background: '#fff', paddingBottom: 0, minHeight: 560 }} |
||||
|
maskClosable={false} |
||||
|
width={1000} |
||||
|
> |
||||
|
{nowModalComponent} |
||||
|
</Modal> |
||||
|
)} |
||||
|
</div> |
||||
|
); |
||||
|
}; |
||||
|
|
||||
|
const mapStateToProps = ({ user, global, doing, loading }) => ({ |
||||
|
user: user.currentUser, |
||||
|
global, |
||||
|
doing, |
||||
|
loading: loading.effects['doing/fetchProgressList'] || false, |
||||
|
}); |
||||
|
const mapDispatchToProps = (dispatch) => ({ |
||||
|
// 列表 |
||||
|
fetchDoneList({ params, sysToken }) { |
||||
|
const chooseTime = {}; |
||||
|
if (params.startTime) |
||||
|
chooseTime.startTime = `${params.startTime.format('YYYY-MM-DD')} 00:00:00`; |
||||
|
if (params.endTime) chooseTime.endTime = `${params.endTime.format('YYYY-MM-DD')} 23:59:59`; |
||||
|
return dispatch({ |
||||
|
type: 'doing/fetchProgressList', |
||||
|
payload: { params: { ...params, ...chooseTime }, sysToken }, |
||||
|
}); |
||||
|
}, |
||||
|
fetchDict(params) { |
||||
|
return dispatch({ type: 'global/fetchDict', payload: params }); |
||||
|
}, |
||||
|
// 专项类别 |
||||
|
fetchCategoryList({ params, sysToken, isNotGateway }) { |
||||
|
return dispatch({ |
||||
|
type: 'doing/fetchCategoryList', |
||||
|
payload: { params: { ...params }, sysToken, isNotGateway }, |
||||
|
}); |
||||
|
}, |
||||
|
}); |
||||
|
export default connect(mapStateToProps, mapDispatchToProps)(TableList); |
||||
@ -0,0 +1 @@ |
|||||
|
在办 /已办 /进度查询 /列表上部查询 |
||||
@ -0,0 +1,412 @@ |
|||||
|
import React, { useState, useEffect } from 'react'; |
||||
|
import { Row, Col, Form, Input, Radio, Button, DatePicker, Select, Checkbox, message } from 'antd'; |
||||
|
import moment from 'moment'; |
||||
|
|
||||
|
import NextOrg from '@/components/NextOrg'; |
||||
|
import { AJZT, YJLX, BLFS, SLFS, CCQK, YQQK, CSQK } from '@/utils/constants'; |
||||
|
|
||||
|
import styles from './index.less'; |
||||
|
|
||||
|
const { Item } = Form; |
||||
|
const { Option } = Select; |
||||
|
|
||||
|
const upGrid = { xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 8 }; |
||||
|
const bottomGrid = { xs: 12, sm: 12, md: 12, lg: 6, xl: 6, xxl: 4 }; |
||||
|
|
||||
|
const layout = { |
||||
|
labelCol: { span: 5 }, |
||||
|
wrapperCol: { span: 19 }, |
||||
|
}; |
||||
|
|
||||
|
const latterLayout = { |
||||
|
labelCol: { span: 10 }, |
||||
|
wrapperCol: { span: 14 }, |
||||
|
}; |
||||
|
|
||||
|
const dateTypeCounts = [ |
||||
|
{ |
||||
|
key: 'threeDays', |
||||
|
label: '近3天', |
||||
|
start: moment().add(-3, 'days'), |
||||
|
end: moment(), |
||||
|
}, |
||||
|
{ |
||||
|
key: 'sevenDays', |
||||
|
label: '近7天', |
||||
|
start: moment().add(-7, 'days'), |
||||
|
end: moment(), |
||||
|
}, |
||||
|
{ |
||||
|
key: 'months', |
||||
|
label: '近一个月', |
||||
|
start: moment().add(-1, 'months'), |
||||
|
end: moment(), |
||||
|
}, |
||||
|
{ |
||||
|
key: 'quarters', |
||||
|
label: '近三个月', |
||||
|
start: moment().add(-1, 'quarters'), |
||||
|
end: moment(), |
||||
|
}, |
||||
|
{ |
||||
|
key: 'years', |
||||
|
label: '近一年', |
||||
|
start: moment().add(-1, 'years'), |
||||
|
end: moment(), |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
const TopSearch = (props) => { |
||||
|
const { categoryList } = props; |
||||
|
const [form] = Form.useForm(); |
||||
|
const { initDateType } = props; |
||||
|
const [dateType, setDateType] = useState(initDateType); |
||||
|
const [boxHidden, setBoxHidden] = useState(); |
||||
|
|
||||
|
useEffect(() => { |
||||
|
if (props.changeParams) { |
||||
|
setDateType('custom'); // 点击消息跳转,时间改成自定义 |
||||
|
form.setFieldsValue({ ...props.changeParams, xfsj: 'custom', zxZbId: '' }); |
||||
|
} |
||||
|
}, [props.changeParams]); |
||||
|
|
||||
|
const handleReset = () => { |
||||
|
form.resetFields(); |
||||
|
setDateType(initDateType); |
||||
|
props.handleReset(); |
||||
|
}; |
||||
|
|
||||
|
const handleDateTypeChange = (e) => { |
||||
|
setDateType(e.target.value); |
||||
|
}; |
||||
|
|
||||
|
const renderRange = () => ( |
||||
|
<Form.Item {...upGrid} wrapperCol={{ offset: 5 }}> |
||||
|
<Form.Item name="startTime" noStyle> |
||||
|
<DatePicker placeholder="开始时间" /> |
||||
|
</Form.Item> |
||||
|
<span style={{ padding: 5 }}>~</span> |
||||
|
<Form.Item name="endTime" noStyle> |
||||
|
<DatePicker placeholder="结束时间" /> |
||||
|
</Form.Item> |
||||
|
</Form.Item> |
||||
|
); |
||||
|
|
||||
|
const onFinish = (value) => { |
||||
|
const copyValue = { ...value }; |
||||
|
if (value.xfsj !== 'custom') { |
||||
|
const c = dateTypeCounts?.find((e) => e.key === value.xfsj); |
||||
|
copyValue.startTime = c?.start; |
||||
|
copyValue.endTime = c?.end; |
||||
|
} |
||||
|
if (value.startTime && value.endTime && value.startTime.valueOf() > value.endTime.valueOf()) { |
||||
|
message.warning('查询条件投诉开始时间不能大于投诉结束时间'); |
||||
|
return; |
||||
|
} |
||||
|
delete copyValue.xfsj; |
||||
|
delete copyValue.sadwMc; |
||||
|
delete copyValue.dqbldwMc; |
||||
|
// Object.keys(copyValue).forEach(key => { |
||||
|
// if (key !== 'startTime' && key !== 'endTime' && copyValue[key]) { |
||||
|
// copyValue[key] = JSON.stringify(copyValue[key]); |
||||
|
// } |
||||
|
// }) |
||||
|
props.onSearch(copyValue); |
||||
|
}; |
||||
|
|
||||
|
const onFinishFailed = () => {}; |
||||
|
|
||||
|
const onChangeOrg = (params) => { |
||||
|
const { bm } = params; |
||||
|
form.setFieldsValue({ xjdwBm: bm }); |
||||
|
}; |
||||
|
|
||||
|
// 专项类别更改 |
||||
|
const handleChange = (keyField, evt, options) => { |
||||
|
// const value = evt.target ? evt.target.value : evt; |
||||
|
if (keyField === 'zxZbId') { |
||||
|
form.setFieldsValue({ zxLb: options.children }); |
||||
|
} |
||||
|
}; |
||||
|
// 跨级派发checkbox变化 |
||||
|
const kjpfBoxChange = (e) => { |
||||
|
console.log('checked = ', e.target.checked); |
||||
|
if (e.target.checked) { |
||||
|
setBoxHidden(e.target.checked); |
||||
|
} else { |
||||
|
setBoxHidden(e.target.checked); |
||||
|
} |
||||
|
}; |
||||
|
// select可搜索 |
||||
|
const filterOption = (inputValue, option) => { |
||||
|
return option.children.indexOf(inputValue) > -1; |
||||
|
}; |
||||
|
|
||||
|
const renderDw = () => { |
||||
|
return ( |
||||
|
<Col {...upGrid} key="zbcbr"> |
||||
|
<Item label="接收单位" {...layout}> |
||||
|
<NextOrg onChange={onChangeOrg} /> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
); |
||||
|
// if (blfs === BLFS.DB.value) { |
||||
|
// return (<Col {...upGrid} key='dbcbr'> |
||||
|
// <Form.Item label="接收单位" {...layout}> |
||||
|
// {/* 办理方式是督办 */} |
||||
|
// <NextOrg noLoad onChange={onChangeOrg} /> |
||||
|
// </Form.Item> |
||||
|
// </Col>) |
||||
|
// } |
||||
|
// if (blfs === BLFS.ZB.value) { |
||||
|
// return ( |
||||
|
// <Col {...upGrid} key='zbcbr'> |
||||
|
// <Item label="接收单位" {...layout}> |
||||
|
// {/* 办理方式是转办 */} |
||||
|
// <NextOrg onChange={onChangeOrg} /> |
||||
|
// </Item> |
||||
|
// </Col> |
||||
|
// ) |
||||
|
// } |
||||
|
}; |
||||
|
|
||||
|
return ( |
||||
|
<div className={styles.TopSearch}> |
||||
|
<Form |
||||
|
{...layout} |
||||
|
name="topSearch" |
||||
|
form={form} |
||||
|
initialValues={{ blfs: '', nbfs: '', xfsj: initDateType, ssqk: '', zxZbId: '', zxLb: '' }} |
||||
|
onFinish={onFinish} |
||||
|
onFinishFailed={onFinishFailed} |
||||
|
className={styles.form} |
||||
|
> |
||||
|
<Item label="型名称" name="zxLb" hidden> |
||||
|
<Input type="hidden" /> |
||||
|
</Item> |
||||
|
<Row> |
||||
|
<Col {...upGrid} key="mxMc"> |
||||
|
<Item label="模型名称" name="mxMc"> |
||||
|
<Input /> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
<Col {...upGrid} key="cjwtLx"> |
||||
|
<Item label="问题类型" name="cjwtLx"> |
||||
|
<Input /> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
{boxHidden ? null : ( |
||||
|
<Col {...upGrid} key="xfsj"> |
||||
|
<Item label="下发时间" name="xfsj"> |
||||
|
<Radio.Group |
||||
|
onChange={handleDateTypeChange} |
||||
|
buttonStyle="solid" |
||||
|
className={styles.radioBox} |
||||
|
> |
||||
|
{dateTypeCounts.map((range) => ( |
||||
|
<Radio.Button key={range.key} value={range.key}> |
||||
|
{range.label} |
||||
|
</Radio.Button> |
||||
|
))} |
||||
|
<Radio.Button value="custom">自定义</Radio.Button> |
||||
|
</Radio.Group> |
||||
|
</Item> |
||||
|
{dateType === 'custom' ? renderRange() : null} |
||||
|
</Col> |
||||
|
)} |
||||
|
<Col {...upGrid} key="sadw"> |
||||
|
<Item label="承办督察部门" name="sadwMc"> |
||||
|
<NextOrg |
||||
|
multiple |
||||
|
selfRoot |
||||
|
onChange={({ bm }) => form.setFieldsValue({ sadwBm: bm })} |
||||
|
/> |
||||
|
</Item> |
||||
|
<Item hidden label="涉案单位编码" name="sadwBm"> |
||||
|
<Input /> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
<Col {...upGrid} key="dqbldw"> |
||||
|
<Item label="当前办理单位" name="dqbldwMc"> |
||||
|
<NextOrg |
||||
|
multiple |
||||
|
selfRoot |
||||
|
onChange={({ bm }) => form.setFieldsValue({ dqbldwBm: bm })} |
||||
|
/> |
||||
|
</Item> |
||||
|
<Item hidden label="当前办理单位编码" name="dqbldwBm"> |
||||
|
<Input /> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
<Col {...upGrid} key="dqZt"> |
||||
|
<Item label="最新状态" name="dqZt"> |
||||
|
<Select mode="multiple"> |
||||
|
{Object.keys(AJZT).map((key) => { |
||||
|
return ( |
||||
|
<Option key={key} value={AJZT[key].value}> |
||||
|
{AJZT[key].name} |
||||
|
</Option> |
||||
|
); |
||||
|
})} |
||||
|
</Select> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
<Col {...upGrid} key="slfs"> |
||||
|
<Item label="受理方式" name="slfs"> |
||||
|
<Checkbox.Group> |
||||
|
{Object.keys(SLFS).map((key) => { |
||||
|
return ( |
||||
|
<Checkbox key={key} value={SLFS[key].value}> |
||||
|
{SLFS[key].name} |
||||
|
</Checkbox> |
||||
|
); |
||||
|
})} |
||||
|
</Checkbox.Group> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
{boxHidden ? null : ( |
||||
|
<Col {...upGrid} key="fkyj"> |
||||
|
<Item label="逾期情况" name="fkyj"> |
||||
|
<Checkbox.Group> |
||||
|
{Object.keys(YQQK).map((key) => { |
||||
|
return ( |
||||
|
<Checkbox key={key} value={YQQK[key].value}> |
||||
|
<span style={{ color: YQQK[key].color }}>{YQQK[key].name}</span> |
||||
|
</Checkbox> |
||||
|
); |
||||
|
})} |
||||
|
</Checkbox.Group> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
)} |
||||
|
<Col {...upGrid} key="ccjg"> |
||||
|
<Item label="抽查情况" name="ccjg"> |
||||
|
<Checkbox.Group> |
||||
|
{Object.keys(CCQK).map((key) => { |
||||
|
return ( |
||||
|
<Checkbox key={key} value={CCQK[key].value}> |
||||
|
{CCQK[key].name} |
||||
|
</Checkbox> |
||||
|
); |
||||
|
})} |
||||
|
</Checkbox.Group> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
<Col {...bottomGrid} key="ssqk"> |
||||
|
<Item label="查实情况" {...latterLayout} name="ssqk"> |
||||
|
<Select> |
||||
|
<Option value="">全部</Option> |
||||
|
{/* {SSQK?.map(item => <Option key={item.value} value={Item.value}>{item.text}</Option>)} */} |
||||
|
{Object.keys(CSQK).map((key) => { |
||||
|
return ( |
||||
|
<Option key={key} value={CSQK[key].value}> |
||||
|
{CSQK[key].name} |
||||
|
</Option> |
||||
|
); |
||||
|
})} |
||||
|
</Select> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
{!boxHidden ? ( |
||||
|
<Col {...bottomGrid} key="blfs"> |
||||
|
<Item label="预警流向" {...latterLayout} name="blfs"> |
||||
|
<Select> |
||||
|
<Option value="">全部</Option> |
||||
|
{Object.keys(YJLX).map((key) => { |
||||
|
return ( |
||||
|
<Option key={key} value={YJLX[key].value}> |
||||
|
{YJLX[key].name} |
||||
|
</Option> |
||||
|
); |
||||
|
})} |
||||
|
</Select> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
) : null} |
||||
|
<Col {...bottomGrid} key="zxZbId"> |
||||
|
<Item label="专项类别" {...latterLayout} name="zxZbId"> |
||||
|
<Select |
||||
|
onChange={handleChange.bind(this, 'zxZbId')} |
||||
|
showSearch |
||||
|
optionFilterProp="children" |
||||
|
allowClear |
||||
|
filterOption={filterOption} |
||||
|
> |
||||
|
<Option value="">全部</Option> |
||||
|
{(categoryList || []).map((_item, _index) => { |
||||
|
return ( |
||||
|
<Option key={_index} value={_item.zxZbId}> |
||||
|
{_item.zxLb} |
||||
|
</Option> |
||||
|
); |
||||
|
})} |
||||
|
</Select> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
|
||||
|
<Col {...bottomGrid} key="" style={{ marginLeft: '41px' }}> |
||||
|
<Item label="" name="" {...latterLayout}> |
||||
|
<Checkbox.Group> |
||||
|
<Checkbox key="" value={0} onChange={kjpfBoxChange}> |
||||
|
跨级派发 |
||||
|
</Checkbox> |
||||
|
</Checkbox.Group> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
|
||||
|
<Form.Item |
||||
|
noStyle |
||||
|
shouldUpdate={(prevValues, currentValues) => prevValues.blfs !== currentValues.blfs} |
||||
|
> |
||||
|
{({ getFieldValue }) => { |
||||
|
return getFieldValue('blfs') === YJLX.XJBL.value ? ( |
||||
|
<> |
||||
|
<Col {...upGrid} key="nbfs"> |
||||
|
<Item label="办理方式" {...layout} name="nbfs"> |
||||
|
<Select style={{ width: 154 }}> |
||||
|
<Option value="">全部</Option> |
||||
|
{Object.keys(BLFS).map((key) => { |
||||
|
return ( |
||||
|
<Option key={key} value={BLFS[key].value}> |
||||
|
{BLFS[key].name} |
||||
|
</Option> |
||||
|
); |
||||
|
// return <Radio key={key} value={BLFS[key].value}>{BLFS[key].name}</Radio> |
||||
|
})} |
||||
|
</Select> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
<Item |
||||
|
noStyle |
||||
|
shouldUpdate={(prevValues, currentValues) => |
||||
|
prevValues.blfs !== currentValues.blfs || |
||||
|
prevValues.nbfs !== currentValues.nbfs |
||||
|
} |
||||
|
> |
||||
|
{() => { |
||||
|
return renderDw(); |
||||
|
}} |
||||
|
</Item> |
||||
|
<Item hidden label="下级单位编码" name="xjdwBm"> |
||||
|
<Input /> |
||||
|
</Item> |
||||
|
</> |
||||
|
) : null; |
||||
|
}} |
||||
|
</Form.Item> |
||||
|
|
||||
|
<Col span={24}> |
||||
|
<div style={{ textAlign: 'right' }}> |
||||
|
<Button onClick={handleReset}>重置</Button> |
||||
|
<Button type="primary" htmlType="submit" style={{ marginLeft: 5 }}> |
||||
|
查询 |
||||
|
</Button> |
||||
|
</div> |
||||
|
</Col> |
||||
|
</Row> |
||||
|
</Form> |
||||
|
</div> |
||||
|
); |
||||
|
}; |
||||
|
|
||||
|
export default TopSearch; |
||||
@ -0,0 +1,12 @@ |
|||||
|
.TopSearch { |
||||
|
padding: 15px; |
||||
|
background-color: #fff; |
||||
|
} |
||||
|
|
||||
|
.radioBox { |
||||
|
:global { |
||||
|
.ant-radio-button-wrapper { |
||||
|
padding: 0 9px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,153 @@ |
|||||
|
import React, { useState } from 'react'; |
||||
|
import { Tabs } from 'antd'; |
||||
|
import { connect, history } from 'umi'; |
||||
|
|
||||
|
import ProvinceSelect from '@/components/ProvinceSelect'; |
||||
|
|
||||
|
import { secondTabName } from '@/utils/utils'; |
||||
|
import { UserLevel, processTab } from '@/utils/constants'; |
||||
|
|
||||
|
import TableList from './TableList'; |
||||
|
|
||||
|
const { TabPane } = Tabs; |
||||
|
|
||||
|
const Progress = (props) => { |
||||
|
const { user, isLocationInBu, locationType } = props; |
||||
|
const tabList = processTab(locationType); |
||||
|
const [activeKey, setActiveKey] = useState('department'); |
||||
|
const [selectdProvince, setSelectdProvince] = useState(''); |
||||
|
const [selectdCity, setSelectdCity] = useState(''); |
||||
|
const [showProvinceSelect, setShowProvinceSelect] = useState(isLocationInBu); |
||||
|
const [departmentMsg, setDepartmentMsg] = useState(null); |
||||
|
const [provinceMsg, setProvinceMsg] = useState(null); |
||||
|
const [cityMsg, setCityMsg] = useState(null); |
||||
|
const [ifReload, setIfReload] = useState(null); // 页面是否要重新加载 为从待办跳转过来准备 |
||||
|
|
||||
|
const changeTab = (key) => { |
||||
|
setActiveKey(key); |
||||
|
setShowProvinceSelect(isLocationInBu); |
||||
|
setDepartmentMsg(null); |
||||
|
setProvinceMsg(null); |
||||
|
setCityMsg(null); |
||||
|
}; |
||||
|
|
||||
|
if (props.location.params) { |
||||
|
// 监控路由参数 点击消息跳转过来的会带params参数 |
||||
|
const { type, msg, reload } = props.location.params; // type: 展示tab类型 msg: 消息带过来的查询条件 |
||||
|
if (reload === ifReload) { |
||||
|
// 防止不断循环 |
||||
|
return false; |
||||
|
} |
||||
|
setIfReload(reload); |
||||
|
if (type === 'department') { |
||||
|
// 跳转到部级下发 |
||||
|
setActiveKey(type); |
||||
|
setDepartmentMsg(msg); |
||||
|
} else if (type === 'province') { |
||||
|
// 跳转到省级下发 |
||||
|
setShowProvinceSelect(false); |
||||
|
setActiveKey(type); |
||||
|
setProvinceMsg(msg); |
||||
|
} else if (type === 'city') { // 跳转到市级下发 |
||||
|
setShowProvinceSelect(false); |
||||
|
setActiveKey(type); |
||||
|
setCityMsg(msg); |
||||
|
} |
||||
|
history.push('/progresssearch'); // 清空参数 防止误判 |
||||
|
} |
||||
|
|
||||
|
const onSelectProvince = (key) => { |
||||
|
setSelectdProvince(key); |
||||
|
setActiveKey('province'); |
||||
|
setShowProvinceSelect(false); |
||||
|
}; |
||||
|
|
||||
|
const onSelectCity = (key) => { |
||||
|
setSelectdCity(key); |
||||
|
setActiveKey('city'); |
||||
|
setShowProvinceSelect(false); |
||||
|
} |
||||
|
|
||||
|
const renderContent = () => { |
||||
|
console.log(props.dispatch); |
||||
|
if (activeKey === 'department') { |
||||
|
return ( |
||||
|
<TableList |
||||
|
refesh={Math.random()} |
||||
|
msg={departmentMsg} |
||||
|
isLocationInBu={isLocationInBu} |
||||
|
locationType={locationType} |
||||
|
type="bu" |
||||
|
sysToken={isLocationInBu ? '' : 'bu'} |
||||
|
/> |
||||
|
); |
||||
|
} |
||||
|
if (activeKey === 'province') { |
||||
|
if (showProvinceSelect) { |
||||
|
return ( |
||||
|
<ProvinceSelect |
||||
|
onSelectProvince={onSelectProvince} |
||||
|
sysToken={isLocationInBu ? selectdProvince : ''} |
||||
|
/> |
||||
|
); |
||||
|
} else { |
||||
|
return ( |
||||
|
<TableList |
||||
|
msg={provinceMsg} |
||||
|
refesh={Math.random()} |
||||
|
isLocationInBu={isLocationInBu} |
||||
|
locationType={locationType} |
||||
|
type='sheng' |
||||
|
sysToken={isLocationInBu ? selectdProvince : 'sheng'} |
||||
|
/> |
||||
|
); |
||||
|
} |
||||
|
} |
||||
|
if (activeKey === 'city'){ |
||||
|
return <TableList |
||||
|
msg={cityMsg} |
||||
|
refesh={Math.random()} |
||||
|
isLocationInBu={isLocationInBu} |
||||
|
locationType={locationType} |
||||
|
type='shi' |
||||
|
sysToken={'shi'} |
||||
|
/> |
||||
|
} |
||||
|
|
||||
|
// return ( |
||||
|
// <TableList |
||||
|
// msg={provinceMsg} |
||||
|
// refesh={Math.random()} |
||||
|
// isLocationInBu={isLocationInBu} |
||||
|
// type="sheng" |
||||
|
// sysToken={isLocationInBu ? selectdProvince : ''} |
||||
|
// // sysToken={isLocationInBu ? '' : 'sheng'} |
||||
|
// /> |
||||
|
// ); |
||||
|
}; |
||||
|
|
||||
|
return ( |
||||
|
<div> |
||||
|
<Tabs activeKey={activeKey} onChange={changeTab}> |
||||
|
{/* <TabPane tab="部级平台" key="department"></TabPane> |
||||
|
<TabPane tab={secondTabName(user.departmentOrgLevel)} key="province"></TabPane> |
||||
|
<TabPane tab='省级平台' key='province'></TabPane> |
||||
|
<TabPane tab='市级平台' key='city' forceRender={true} hidden={locationType}></TabPane> */} |
||||
|
{ |
||||
|
tabList.map((item) => { |
||||
|
return ( |
||||
|
<TabPane tab={item.name} key={item.key}></TabPane> |
||||
|
); |
||||
|
}) |
||||
|
} |
||||
|
</Tabs> |
||||
|
{renderContent()} |
||||
|
</div> |
||||
|
); |
||||
|
}; |
||||
|
|
||||
|
export default connect(({ user }) => ({ |
||||
|
user: user.currentUser, |
||||
|
isLocationInBu: user.isLocationInBu, |
||||
|
locationType: user.locationType |
||||
|
}))(Progress); |
||||
@ -0,0 +1,300 @@ |
|||||
|
import React, { useState, useEffect } from 'react'; |
||||
|
import { Table, Modal, Button, Tooltip, Pagination } from 'antd'; |
||||
|
import { connect } from 'umi'; |
||||
|
import moment from 'moment'; |
||||
|
|
||||
|
import TopSearch from '../TopSearch'; |
||||
|
import CK from '@/components/Tabs-CK'; |
||||
|
import { getDicsName } from '@/utils/utils'; |
||||
|
import { AJZT, UserLevel } from '@/utils/constants'; |
||||
|
import { getHGIcons, ExampleBar } from '@/components/MyIcons'; |
||||
|
|
||||
|
const initDateType = 'sevenDays'; |
||||
|
const initSearchParams = { |
||||
|
page: 1, |
||||
|
size: 10, |
||||
|
startTime: moment().add(-7, 'days'), |
||||
|
endTime: moment(), |
||||
|
}; |
||||
|
|
||||
|
const TableList = (props) => { |
||||
|
const { sysToken, refesh, isLocationInBu, type, locationType } = props; |
||||
|
const [searchParams, setSearchParams] = useState(initSearchParams); |
||||
|
const [tableData, setTableData] = useState(null); |
||||
|
// const [selectedRowKeys, setSelectedRowKeys] = useState([]); |
||||
|
const [nowModalComponent, setNowModalComponent] = useState(null); |
||||
|
|
||||
|
const getList = (params) => { |
||||
|
const newParams = isLocationInBu && type === 'sheng' ? { ...params, sign: 1 } : params; // 部里发布 并且查询省里的列表加额外参数 |
||||
|
const newSysToken = (locationType === UserLevel.Province.value && type === 'sheng')|| (locationType === UserLevel.City.value && type === 'shi') ? '' : sysToken; |
||||
|
props.fetchDoneList({ params: newParams, sysToken:newSysToken }).then((data) => setTableData(data)); |
||||
|
}; |
||||
|
|
||||
|
const hideModal = (flag) => { |
||||
|
if (flag) { |
||||
|
getList(searchParams); |
||||
|
} |
||||
|
setNowModalComponent(null); |
||||
|
}; |
||||
|
|
||||
|
useEffect(() => { |
||||
|
getList(searchParams); |
||||
|
}, [refesh]); |
||||
|
|
||||
|
// 点击查询 |
||||
|
const onSearch = (params) => { |
||||
|
setSearchParams({ ...searchParams, ...params, page: 1 }); |
||||
|
getList({ ...searchParams, ...params, page: 1 }); |
||||
|
}; |
||||
|
|
||||
|
const handleReset = () => { |
||||
|
setSearchParams(initSearchParams); |
||||
|
getList(initSearchParams); |
||||
|
}; |
||||
|
|
||||
|
const changePage = (page) => { |
||||
|
setSearchParams({ ...searchParams, page }); |
||||
|
getList({ ...searchParams, page }); |
||||
|
}; |
||||
|
|
||||
|
// const rowSelection = { |
||||
|
// selectedRowKeys, |
||||
|
// onChange: selectedRowKeys, |
||||
|
// getCheckboxProps: record => ({ |
||||
|
// disabled: selectAbleType === 'folder' ? record.isDir !== 1 : record.isDir === 1, |
||||
|
// }), |
||||
|
// }; |
||||
|
|
||||
|
const columns = [ |
||||
|
{ |
||||
|
title: '序号', |
||||
|
dataIndex: 'id', |
||||
|
key: 'id', |
||||
|
render: (text, record, index) => index + 1, |
||||
|
width: '5%', |
||||
|
}, |
||||
|
{ |
||||
|
title: '预警编号', |
||||
|
dataIndex: 'yjBh', |
||||
|
width: '22%', |
||||
|
render: (text, record) => { |
||||
|
return ( |
||||
|
<span> |
||||
|
{getHGIcons(record?.ccjg)} |
||||
|
{text} |
||||
|
</span> |
||||
|
); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
title: '模型名称', |
||||
|
dataIndex: 'mxMc', |
||||
|
width: '8%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={text}> |
||||
|
{text} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '问题类型', |
||||
|
dataIndex: 'cjwtLx', |
||||
|
width: '9%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={text}> |
||||
|
{text} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '承办督察部门', |
||||
|
dataIndex: 'sadwMc', |
||||
|
width: '9%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={text}> |
||||
|
{text} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '问题简述', |
||||
|
dataIndex: 'wtjs', |
||||
|
width: '7%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={text}> |
||||
|
{text} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '当前办理单位', |
||||
|
dataIndex: 'dqbldwMc', |
||||
|
width: '9%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={text}> |
||||
|
{text} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '当前办理人', |
||||
|
dataIndex: 'dqblrMc', |
||||
|
width: '8%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={text}> |
||||
|
{text} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '预警流向', |
||||
|
dataIndex: 'blfsMc', |
||||
|
width: '7%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={text}> |
||||
|
{text} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '最新状态', |
||||
|
dataIndex: 'dqZt', |
||||
|
width: '7%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={getDicsName(AJZT, text)}> |
||||
|
{getDicsName(AJZT, text)} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '最新更新时间', |
||||
|
dataIndex: 'updateTime', |
||||
|
width: '9%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={text}> |
||||
|
{text} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '最迟反馈时间', |
||||
|
dataIndex: 'zcfkSj', |
||||
|
width: '9%', |
||||
|
render: (text) => ( |
||||
|
<Tooltip placement="topLeft" title={text}> |
||||
|
{text} |
||||
|
</Tooltip> |
||||
|
), |
||||
|
ellipsis: { showTitle: false }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '操作', |
||||
|
key: 'id', |
||||
|
dataIndex: 'id', |
||||
|
width: '5%', |
||||
|
render: (text, record) => { |
||||
|
return ( |
||||
|
// 部级用户 没有抽查省级源数据的权限 |
||||
|
<Button |
||||
|
type="link" |
||||
|
onClick={() => |
||||
|
setNowModalComponent( |
||||
|
<CK |
||||
|
hideCCBtn={type === 'sheng' && isLocationInBu} |
||||
|
id={record.id} |
||||
|
info={record} |
||||
|
sysToken={sysToken} |
||||
|
hideModal={hideModal} |
||||
|
/>, |
||||
|
) |
||||
|
} |
||||
|
> |
||||
|
查看 |
||||
|
</Button> |
||||
|
); |
||||
|
}, |
||||
|
fixed: 'right', |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
return ( |
||||
|
<div> |
||||
|
<TopSearch |
||||
|
onSearch={onSearch} |
||||
|
initDateType={initDateType} |
||||
|
// initParams={{ mxmc: 111 }} |
||||
|
handleReset={handleReset} |
||||
|
/> |
||||
|
<Table |
||||
|
columns={columns} |
||||
|
dataSource={tableData?.records} |
||||
|
rowKey="id" |
||||
|
// rowSelection={rowSelection} |
||||
|
scroll={{ x: 1600 }} |
||||
|
pagination={false} |
||||
|
// current: tableData?.current, |
||||
|
// pageSize: tableData?.size, |
||||
|
// total: tableData?.total, |
||||
|
// onChange: page => changePage(page), |
||||
|
// showSizeChanger: true, |
||||
|
// onShowSizeChange: () => this.onShowSizeChange, |
||||
|
// pageSizeOptions: ['10', '20', '50', '100', '500', '1000'], |
||||
|
/> |
||||
|
<div style={{ display: 'flex', justifyContent: 'flex-end' }}> |
||||
|
<ExampleBar /> |
||||
|
<Pagination |
||||
|
current={tableData?.current || 0} |
||||
|
pageSize={tableData?.size || 0} |
||||
|
total={tableData?.total || 0} |
||||
|
onChange={(page) => changePage(page)} |
||||
|
showTotal={(total) => `共 ${total} 条`} |
||||
|
/> |
||||
|
</div> |
||||
|
|
||||
|
{nowModalComponent && ( |
||||
|
<Modal |
||||
|
visible={nowModalComponent} |
||||
|
footer={null} |
||||
|
onCancel={() => setNowModalComponent(null)} |
||||
|
// style={{ background: '#fff', paddingBottom: 0, minHeight: 560 }} |
||||
|
maskClosable={false} |
||||
|
width={1000} |
||||
|
> |
||||
|
{nowModalComponent} |
||||
|
</Modal> |
||||
|
)} |
||||
|
</div> |
||||
|
); |
||||
|
}; |
||||
|
|
||||
|
const mapStateToProps = ({ user, doing, loading }) => ({ |
||||
|
user: user.currentUser, |
||||
|
doing, |
||||
|
loading: loading.effects['doing/fetchDoneList'] || false, |
||||
|
}); |
||||
|
const mapDispatchToProps = (dispatch) => ({ |
||||
|
// 列表 |
||||
|
fetchDoneList({ params, sysToken }) { |
||||
|
const chooseTime = {}; |
||||
|
if (params.startTime) |
||||
|
chooseTime.startTime = `${params.startTime.format('YYYY-MM-DD')} 00:00:00`; |
||||
|
if (params.endTime) chooseTime.endTime = `${params.endTime.format('YYYY-MM-DD')} 23:59:59`; |
||||
|
return dispatch({ |
||||
|
type: 'doing/fetchDoneList', |
||||
|
payload: { params: { ...params, ...chooseTime }, sysToken }, |
||||
|
}); |
||||
|
}, |
||||
|
fetchReBJCheck(params) { |
||||
|
return dispatch({ type: 'doing/fetchReBJCheck', payload: params }); |
||||
|
}, |
||||
|
}); |
||||
|
export default connect(mapStateToProps, mapDispatchToProps)(TableList); |
||||
@ -0,0 +1 @@ |
|||||
|
已办列表上部查询 |
||||
@ -0,0 +1,293 @@ |
|||||
|
import React, { useState } from 'react'; |
||||
|
import { Row, Col, Form, Input, Radio, Button, DatePicker, Select, Checkbox, message } from 'antd'; |
||||
|
import moment from 'moment'; |
||||
|
|
||||
|
import NextOrg from '@/components/NextOrg'; |
||||
|
import { YJLX, BLFS, SLFS, CCQK } from '@/utils/constants'; |
||||
|
|
||||
|
import styles from './index.less'; |
||||
|
|
||||
|
const { Item } = Form; |
||||
|
const { Option } = Select; |
||||
|
|
||||
|
const upGrid = { xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 8 }; |
||||
|
const bottomGrid = { xs: 12, sm: 12, md: 12, lg: 6, xl: 6, xxl: 4 }; |
||||
|
|
||||
|
const layout = { |
||||
|
labelCol: { span: 5 }, |
||||
|
wrapperCol: { span: 19 }, |
||||
|
}; |
||||
|
|
||||
|
const latterLayout = { |
||||
|
labelCol: { span: 10 }, |
||||
|
wrapperCol: { span: 14 }, |
||||
|
}; |
||||
|
|
||||
|
const dateTypeCounts = [ |
||||
|
{ |
||||
|
key: 'threeDays', |
||||
|
label: '近3天', |
||||
|
start: moment().add(-3, 'days'), |
||||
|
end: moment(), |
||||
|
}, |
||||
|
{ |
||||
|
key: 'sevenDays', |
||||
|
label: '近7天', |
||||
|
start: moment().add(-7, 'days'), |
||||
|
end: moment(), |
||||
|
}, |
||||
|
{ |
||||
|
key: 'months', |
||||
|
label: '近一个月', |
||||
|
start: moment().add(-1, 'months'), |
||||
|
end: moment(), |
||||
|
}, |
||||
|
{ |
||||
|
key: 'quarters', |
||||
|
label: '近三个月', |
||||
|
start: moment().add(-1, 'quarters'), |
||||
|
end: moment(), |
||||
|
}, |
||||
|
{ |
||||
|
key: 'years', |
||||
|
label: '近一年', |
||||
|
start: moment().add(-1, 'years'), |
||||
|
end: moment(), |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
const TopSearch = props => { |
||||
|
const [form] = Form.useForm(); |
||||
|
const { initParams, initDateType } = props; |
||||
|
const [dateType, setDateType] = useState(initDateType); |
||||
|
|
||||
|
const handleReset = () => { |
||||
|
form.resetFields(); |
||||
|
setDateType(initDateType); |
||||
|
props.handleReset(); |
||||
|
}; |
||||
|
|
||||
|
const handleDateTypeChange = e => { |
||||
|
setDateType(e.target.value); |
||||
|
}; |
||||
|
|
||||
|
const renderRange = () => ( |
||||
|
<Form.Item {...upGrid} wrapperCol={{ offset: 5 }} > |
||||
|
<Form.Item name='startTime' noStyle> |
||||
|
<DatePicker placeholder="开始时间" /> |
||||
|
</Form.Item> |
||||
|
<span style={{ padding: 5 }}>~</span> |
||||
|
<Form.Item name='endTime' noStyle> |
||||
|
<DatePicker placeholder="结束时间" /> |
||||
|
</Form.Item> |
||||
|
</Form.Item> |
||||
|
); |
||||
|
|
||||
|
const onFinish = (value) => { |
||||
|
const copyValue = { ...value }; |
||||
|
if (value.xfsj !== 'custom') { |
||||
|
const c = dateTypeCounts?.find(e => e.key === value.xfsj); |
||||
|
copyValue.startTime = c?.start; |
||||
|
copyValue.endTime = c?.end; |
||||
|
} |
||||
|
if (value.startTime && value.endTime && (value.startTime.valueOf() > value.endTime.valueOf())) { |
||||
|
message.warning('查询条件投诉开始时间不能大于投诉结束时间'); |
||||
|
return; |
||||
|
} |
||||
|
delete copyValue.xfsj; |
||||
|
delete copyValue.sadwMc; |
||||
|
delete copyValue.dqbldwMc; |
||||
|
// Object.keys(copyValue).forEach(key => { |
||||
|
// if (key !== 'startTime' && key !== 'endTime' && copyValue[key]) { |
||||
|
// copyValue[key] = JSON.stringify(copyValue[key]); |
||||
|
// } |
||||
|
// }) |
||||
|
props.onSearch(copyValue); |
||||
|
}; |
||||
|
|
||||
|
const onFinishFailed = () => { |
||||
|
|
||||
|
}; |
||||
|
|
||||
|
const onChangeOrg = params => { |
||||
|
const { bm } = params; |
||||
|
form.setFieldsValue({ xjdwBm: bm }); |
||||
|
} |
||||
|
|
||||
|
const renderDw = () => { |
||||
|
return ( |
||||
|
<Col {...upGrid} key='zbcbr'> |
||||
|
<Item label="接收单位" {...layout}> |
||||
|
<NextOrg onChange={onChangeOrg} /> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
) |
||||
|
// if (blfs === BLFS.DB.value) { |
||||
|
// return (<Col {...upGrid} key='dbcbr'> |
||||
|
// <Form.Item label="接收单位" {...layout}> |
||||
|
// {/* 办理方式是督办 */} |
||||
|
// <NextOrg noLoad onChange={onChangeOrg} /> |
||||
|
// </Form.Item> |
||||
|
// </Col>) |
||||
|
// } |
||||
|
// if (blfs === BLFS.ZB.value) { |
||||
|
// return ( |
||||
|
// <Col {...upGrid} key='zbcbr'> |
||||
|
// <Item label="接收单位" {...layout}> |
||||
|
// {/* 办理方式是转办 */} |
||||
|
// <NextOrg onChange={onChangeOrg} /> |
||||
|
// </Item> |
||||
|
// </Col> |
||||
|
// ) |
||||
|
// } |
||||
|
} |
||||
|
|
||||
|
return ( |
||||
|
<div className={styles.TopSearch}> |
||||
|
<Form |
||||
|
{...layout} |
||||
|
name="topSearch" |
||||
|
form={form} |
||||
|
initialValues={{ blfs: '', nbfs: '', xfsj: initDateType, zxzt: '' }} |
||||
|
onFinish={onFinish} |
||||
|
onFinishFailed={onFinishFailed} |
||||
|
className={styles.form} |
||||
|
> |
||||
|
<Row> |
||||
|
<Col {...upGrid} key='mxMc'> |
||||
|
<Item label='模型名称' name='mxMc'> |
||||
|
<Input /> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
<Col {...upGrid} key='cjwtLx'> |
||||
|
<Item label='问题类型' name='cjwtLx'> |
||||
|
<Input /> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
<Col {...upGrid} key='xfsj'> |
||||
|
<Item label="下发时间" name='xfsj'> |
||||
|
<Radio.Group |
||||
|
onChange={handleDateTypeChange} |
||||
|
buttonStyle="solid" |
||||
|
className={styles.radioBox} |
||||
|
> |
||||
|
{dateTypeCounts.map(range => ( |
||||
|
<Radio.Button key={range.key} value={range.key}> |
||||
|
{range.label} |
||||
|
</Radio.Button> |
||||
|
))} |
||||
|
<Radio.Button value="custom">自定义</Radio.Button> |
||||
|
</Radio.Group> |
||||
|
</Item> |
||||
|
{dateType === 'custom' |
||||
|
? renderRange() |
||||
|
: null} |
||||
|
|
||||
|
</Col> |
||||
|
<Col {...upGrid} key='sadw'> |
||||
|
<Item label='承办督察部门' name='sadwMc'> |
||||
|
<NextOrg multiple selfRoot onChange={({ bm }) => form.setFieldsValue({ sadwBm: bm })} /> |
||||
|
</Item> |
||||
|
<Item |
||||
|
hidden |
||||
|
label="涉案单位编码" |
||||
|
name='sadwBm' |
||||
|
> |
||||
|
<Input /> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
<Col {...upGrid} key='dqbldwMc'> |
||||
|
<Item label='当前办理单位' name='dqbldwMc'> |
||||
|
<NextOrg multiple selfRoot onChange={({ bm }) => form.setFieldsValue({ dqbldwBm: bm })} /> |
||||
|
</Item> |
||||
|
<Item |
||||
|
hidden |
||||
|
label="当前办理单位编码" |
||||
|
name='dqbldwBm' |
||||
|
> |
||||
|
<Input /> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
<Col {...upGrid} key='slfs'> |
||||
|
<Item label='受理方式' name='slfs'> |
||||
|
<Checkbox.Group> |
||||
|
{Object.keys(SLFS).map(key => { |
||||
|
return <Checkbox key={key} value={SLFS[key].value}>{SLFS[key].name}</Checkbox> |
||||
|
})} |
||||
|
</Checkbox.Group> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
<Col {...upGrid} key='ccjg'> |
||||
|
<Item label='抽查情况' name='ccjg'> |
||||
|
<Checkbox.Group> |
||||
|
{Object.keys(CCQK).map(key => { |
||||
|
return <Checkbox key={key} value={CCQK[key].value}>{CCQK[key].name}</Checkbox> |
||||
|
})} |
||||
|
</Checkbox.Group> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
<Col {...bottomGrid} key='blfs'> |
||||
|
<Item label='预警流向' {...latterLayout} name='blfs'> |
||||
|
<Select> |
||||
|
<Option value="">全部</Option> |
||||
|
{Object.keys(YJLX).map(key => { |
||||
|
return <Option key={key} value={YJLX[key].value}>{YJLX[key].name}</Option> |
||||
|
})} |
||||
|
</Select> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
<Form.Item |
||||
|
noStyle |
||||
|
shouldUpdate={(prevValues, currentValues) => prevValues.blfs !== currentValues.blfs} |
||||
|
> |
||||
|
{({ getFieldValue }) => { |
||||
|
return getFieldValue('blfs') === YJLX.XJBL.value ? ( |
||||
|
<> |
||||
|
<Col {...bottomGrid} key='nbfs'> |
||||
|
<Item label="办理方式" {...latterLayout} name="nbfs"> |
||||
|
<Select> |
||||
|
<Option value="">全部</Option> |
||||
|
{Object.keys(BLFS).map(key => { |
||||
|
return <Option key={key} value={BLFS[key].value}>{BLFS[key].name}</Option> |
||||
|
// return <Radio key={key} value={BLFS[key].value}>{BLFS[key].name}</Radio> |
||||
|
})} |
||||
|
</Select> |
||||
|
</Item> |
||||
|
</Col> |
||||
|
<Form.Item |
||||
|
noStyle |
||||
|
shouldUpdate={(prevValues, currentValues) => (prevValues.blfs !== currentValues.blfs) || (prevValues.nbfs !== currentValues.nbfs)} |
||||
|
> |
||||
|
{() => { |
||||
|
return renderDw(); |
||||
|
}} |
||||
|
</Form.Item> |
||||
|
<Form.Item |
||||
|
hidden |
||||
|
label="下级单位编码" |
||||
|
name="xjdwBm" |
||||
|
> |
||||
|
<Input /> |
||||
|
</Form.Item> |
||||
|
</> |
||||
|
) : |
||||
|
null |
||||
|
; |
||||
|
}} |
||||
|
</Form.Item> |
||||
|
|
||||
|
<Col span={24}> |
||||
|
<div style={{ textAlign: 'right' }}> |
||||
|
<Button onClick={handleReset}>重置</Button> |
||||
|
<Button type="primary" htmlType="submit" style={{ marginLeft: 5 }}> |
||||
|
查询 |
||||
|
</Button> |
||||
|
</div> |
||||
|
</Col> |
||||
|
</Row> |
||||
|
</Form> |
||||
|
</div> |
||||
|
); |
||||
|
}; |
||||
|
|
||||
|
export default TopSearch; |
||||
@ -0,0 +1,12 @@ |
|||||
|
.TopSearch { |
||||
|
padding: 15px; |
||||
|
background-color: #fff; |
||||
|
} |
||||
|
|
||||
|
.radioBox { |
||||
|
:global { |
||||
|
.ant-radio-button-wrapper { |
||||
|
padding: 0 9px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,107 @@ |
|||||
|
import React, { useState } from 'react'; |
||||
|
import { Tabs } from 'antd'; |
||||
|
import { connect } from 'umi'; |
||||
|
|
||||
|
import ProvinceSelect from '@/components/ProvinceSelect'; |
||||
|
import { UserLevel, processTab } from '@/utils/constants'; |
||||
|
import TableList from './TableList'; |
||||
|
|
||||
|
import { secondTabName } from '@/utils/utils'; |
||||
|
|
||||
|
const { TabPane } = Tabs |
||||
|
|
||||
|
const Done = (props) => { |
||||
|
const { user, isLocationInBu, locationType } = props; |
||||
|
const tabList = processTab(locationType); |
||||
|
const [activeKey, setActiveKey] = useState('department'); |
||||
|
const [selectdProvince, setSelectdProvince] = useState(''); |
||||
|
const [showProvinceSelect, setShowProvinceSelect] = useState(isLocationInBu); |
||||
|
|
||||
|
const changeTab = (key) => { |
||||
|
setActiveKey(key); |
||||
|
setShowProvinceSelect(isLocationInBu); |
||||
|
} |
||||
|
|
||||
|
const onSelectProvince = (key) => { |
||||
|
setSelectdProvince(key); |
||||
|
setActiveKey('province'); |
||||
|
setShowProvinceSelect(false); |
||||
|
} |
||||
|
|
||||
|
const renderContent = () => { |
||||
|
if (activeKey === 'department') { |
||||
|
return ( |
||||
|
<TableList |
||||
|
refesh={Math.random()} |
||||
|
isLocationInBu={isLocationInBu} |
||||
|
locationType={locationType} |
||||
|
type='bu' |
||||
|
sysToken={isLocationInBu ? '' : 'bu'} |
||||
|
/> |
||||
|
) |
||||
|
} |
||||
|
if (activeKey === 'province' ) { |
||||
|
if(showProvinceSelect){ |
||||
|
return <ProvinceSelect |
||||
|
onSelectProvince={onSelectProvince} |
||||
|
sysToken={isLocationInBu ? selectdProvince : ''} /> |
||||
|
}else{ |
||||
|
return( |
||||
|
<TableList |
||||
|
refesh={Math.random()} |
||||
|
isLocationInBu={isLocationInBu} |
||||
|
locationType={locationType} |
||||
|
type='sheng' |
||||
|
sysToken={isLocationInBu ? selectdProvince : 'sheng'} |
||||
|
/> |
||||
|
) |
||||
|
} |
||||
|
} |
||||
|
if (activeKey === 'city'){ |
||||
|
return <TableList |
||||
|
refesh={Math.random()} |
||||
|
isLocationInBu={isLocationInBu} |
||||
|
locationType={locationType} |
||||
|
type='shi' |
||||
|
sysToken={'shi'} |
||||
|
/> |
||||
|
} |
||||
|
// return ( |
||||
|
// <TableList |
||||
|
// refesh={Math.random()} |
||||
|
// isLocationInBu={isLocationInBu} |
||||
|
// type='sheng' |
||||
|
// sysToken={isLocationInBu ? selectdProvince : ''} |
||||
|
// />) |
||||
|
} |
||||
|
|
||||
|
return ( |
||||
|
<div> |
||||
|
<Tabs activeKey={activeKey} onChange={changeTab}> |
||||
|
{/* <TabPane tab={secondTabName(user.departmentOrgLevel)} key='province'> |
||||
|
</TabPane> */} |
||||
|
{/* <TabPane tab='部级平台' key='department'></TabPane> |
||||
|
<TabPane tab='省级平台' key='province'></TabPane> |
||||
|
<TabPane tab='市级平台' key='city' forceRender={true} hidden={isLocationInBu !== 2}></TabPane> */} |
||||
|
{ |
||||
|
tabList.map((item) => { |
||||
|
return ( |
||||
|
<TabPane tab={item.name} key={item.key}></TabPane> |
||||
|
); |
||||
|
}) |
||||
|
} |
||||
|
</Tabs> |
||||
|
{ |
||||
|
renderContent() |
||||
|
} |
||||
|
</div> |
||||
|
|
||||
|
) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
export default connect(({ user }) => ({ |
||||
|
user: user.currentUser, |
||||
|
isLocationInBu: user.isLocationInBu, |
||||
|
locationType: user.locationType |
||||
|
}))(Done); |
||||