Browse Source

feat: 新曾在办 - 已办 - 新增查询

master
常旭 3 months ago
parent
commit
cf7212a13a
19 changed files with 1644 additions and 2 deletions
  1. 12
      config/routes.js
  2. 343
      src/pages/JDCX/TableList/index.jsx
  3. 1
      src/pages/JDCX/TopSearch/README.md
  4. 412
      src/pages/JDCX/TopSearch/index.jsx
  5. 12
      src/pages/JDCX/TopSearch/index.less
  6. 153
      src/pages/JDCX/index.jsx
  7. 300
      src/pages/YBSX/TableList/index.jsx
  8. 1
      src/pages/YBSX/TopSearch/README.md
  9. 293
      src/pages/YBSX/TopSearch/index.jsx
  10. 12
      src/pages/YBSX/TopSearch/index.less
  11. 107
      src/pages/YBSX/index.jsx
  12. 0
      src/pages/ZBSX/HCBGBtn/index.jsx
  13. 0
      src/pages/ZBSX/README.md
  14. 0
      src/pages/ZBSX/TableList/README.md
  15. 0
      src/pages/ZBSX/TableList/index.jsx
  16. 0
      src/pages/ZBSX/TopSearch/README.md
  17. 0
      src/pages/ZBSX/TopSearch/index.jsx
  18. 0
      src/pages/ZBSX/TopSearch/index.less
  19. 0
      src/pages/ZBSX/index.jsx

12
config/routes.js

@ -24,8 +24,16 @@ export default [
component: './ResultData',
},
{
path:"/GZT",
component:"./GZT"
path:"/ZBSX",
component:"./ZBSX"
},
{
path:"/YBSX",
component:"./YBSX"
},
{
path:"/JDCX",
component:"./JDCX"
},
{
path: '/',

343
src/pages/JDCX/TableList/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; // systokenurl
}
// 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);

1
src/pages/JDCX/TopSearch/README.md

@ -0,0 +1 @@
在办 /已办 /进度查询 /列表上部查询

412
src/pages/JDCX/TopSearch/index.jsx

@ -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;

12
src/pages/JDCX/TopSearch/index.less

@ -0,0 +1,12 @@
.TopSearch {
padding: 15px;
background-color: #fff;
}
.radioBox {
:global {
.ant-radio-button-wrapper {
padding: 0 9px;
}
}
}

153
src/pages/JDCX/index.jsx

@ -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);

300
src/pages/YBSX/TableList/index.jsx

@ -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);

1
src/pages/YBSX/TopSearch/README.md

@ -0,0 +1 @@
已办列表上部查询

293
src/pages/YBSX/TopSearch/index.jsx

@ -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;

12
src/pages/YBSX/TopSearch/index.less

@ -0,0 +1,12 @@
.TopSearch {
padding: 15px;
background-color: #fff;
}
.radioBox {
:global {
.ant-radio-button-wrapper {
padding: 0 9px;
}
}
}

107
src/pages/YBSX/index.jsx

@ -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);

src/pages/GZT/HCBGBtn/index.jsx → src/pages/ZBSX/HCBGBtn/index.jsx

src/pages/GZT/README.md → src/pages/ZBSX/README.md

src/pages/GZT/TableList/README.md → src/pages/ZBSX/TableList/README.md

src/pages/GZT/TableList/index.jsx → src/pages/ZBSX/TableList/index.jsx

src/pages/GZT/TopSearch/README.md → src/pages/ZBSX/TopSearch/README.md

src/pages/GZT/TopSearch/index.jsx → src/pages/ZBSX/TopSearch/index.jsx

src/pages/GZT/TopSearch/index.less → src/pages/ZBSX/TopSearch/index.less

src/pages/GZT/index.jsx → src/pages/ZBSX/index.jsx

Loading…
Cancel
Save