From 7d7a99d1561eec77ef7c6598c41fcc1e17b8e364 Mon Sep 17 00:00:00 2001 From: zhangyongtian <1181606322@qq.com> Date: Thu, 12 Sep 2024 18:35:58 +0800 Subject: [PATCH] feat: 工作台查询 --- gz-customerSystem/src/views/register/eventFlow/component/BackModel.jsx | 1 gz-customerSystem/src/views/register/index.less | 28 +++++++++ gz-customerSystem/src/views/register/matterDetail/FileTable.jsx | 2 gz-customerSystem/src/views/register/eventFlow/component/EventFlow.jsx | 4 gz-customerSystem/src/views/register/index.jsx | 116 +++++++++++++++++++++++++++++++++----- gz-customerSystem/src/views/register/eventFlow/component/EscalationModel.jsx | 25 +++++++- 6 files changed, 152 insertions(+), 24 deletions(-) diff --git a/gz-customerSystem/src/views/register/eventFlow/component/BackModel.jsx b/gz-customerSystem/src/views/register/eventFlow/component/BackModel.jsx index acb04d2..0812aae 100644 --- a/gz-customerSystem/src/views/register/eventFlow/component/BackModel.jsx +++ b/gz-customerSystem/src/views/register/eventFlow/component/BackModel.jsx @@ -67,6 +67,7 @@ handleReturn({ id, caseId: props.caseId, + caseTaskId: props.caseTaskId, returnContent: values.returnContent }) } diff --git a/gz-customerSystem/src/views/register/eventFlow/component/EscalationModel.jsx b/gz-customerSystem/src/views/register/eventFlow/component/EscalationModel.jsx index 9db6691..6e3fc4b 100644 --- a/gz-customerSystem/src/views/register/eventFlow/component/EscalationModel.jsx +++ b/gz-customerSystem/src/views/register/eventFlow/component/EscalationModel.jsx @@ -22,13 +22,30 @@ return $$.ax.request({ url: `caseTask/appearApply`, type: 'post', service: 'mediate', data }); } +function getAppearToUnit() { + return $$.ax.request({ url: `ctUnit/getAppearToUnit`, type: 'get', service: 'cust' }); +} + export default function BackModel(props) { const formRef = useRef(); - const [id, setId] = useState() + const [id, setId] = useState(); + const [unitData, setUnitData] = useState({}); useEffect(() => { getAppId() + getAppearToUnitData() }, []) + + //获取上报部门 + const getAppearToUnitData = async () => { + const res = await getAppearToUnit() + if (res.type) { + setUnitData({ + auditUnitId: res.data.auditUnitId, + auditUnitName: res.data.auditUnitName + }) + } + } //获取id const getAppId = async () => { @@ -46,7 +63,9 @@ handleEscala({ id, caseId: props.caseId, - returnContent: values.returnContent + caseTaskId: props.caseTaskId, + returnContent: values.returnContent, + ...unitData }) } }) @@ -55,7 +74,7 @@ } const handleTemplate = (type) => { - if(type === 1) { + if (type === 1) { formRef.current.setFieldValue('returnContent', '经初步核查,该事项较为复杂,且涉及多个相关部门的协调配合,为确保能够高效、妥善地解决当事人的问题,特此请求上级给予指导和支持。') } else { formRef.current.setFieldValue('returnContent', '') diff --git a/gz-customerSystem/src/views/register/eventFlow/component/EventFlow.jsx b/gz-customerSystem/src/views/register/eventFlow/component/EventFlow.jsx index a6756d8..210f3c3 100644 --- a/gz-customerSystem/src/views/register/eventFlow/component/EventFlow.jsx +++ b/gz-customerSystem/src/views/register/eventFlow/component/EventFlow.jsx @@ -191,7 +191,7 @@ unmountOnExit={true} maskClosable={false} > - <BackModel caseId={props.caseId} onCancel={() => { setBackVisible(false) }} /> + <BackModel caseId={props.caseId} caseTaskId={props.caseTaskId} onCancel={() => { setBackVisible(false) }} /> </Modal> <Modal title='上报' @@ -202,7 +202,7 @@ unmountOnExit={true} maskClosable={false} > - <EscalationModel caseId={props.caseId} onCancel={() => { setEscalationVisible(false) }} /> + <EscalationModel caseId={props.caseId} caseTaskId={props.caseTaskId} onCancel={() => { setEscalationVisible(false) }} /> </Modal> <Modal title='交办' diff --git a/gz-customerSystem/src/views/register/index.jsx b/gz-customerSystem/src/views/register/index.jsx index 5bc081a..8270203 100644 --- a/gz-customerSystem/src/views/register/index.jsx +++ b/gz-customerSystem/src/views/register/index.jsx @@ -8,15 +8,18 @@ */ import React, { useEffect, useState, useRef } from 'react'; import { useNavigate } from 'react-router-dom'; -import { tab1, tab2, tab3, tab4, tab5, tab6, visitInto, checkInto } from '@/assets/images' +import { tab1, tab2, tab3, tab4, tab5, tab6 } from '@/assets/images' import TableView from '../../components/TableView'; import { Space } from 'antd'; -import { Tabs, Typography, Radio } from '@arco-design/web-react'; +import { Tabs, Typography, Radio, Form, Input, DatePicker, Button, Grid } from '@arco-design/web-react'; import * as $$ from '@/utils/utility'; import './index.less'; - +const FormItem = Form.Item; const TabPane = Tabs.TabPane; +const { RangePicker } = DatePicker; +const Row = Grid.Row; +const Col = Grid.Col; //工作总览数据 function getCountListApi(data) { @@ -65,6 +68,7 @@ const VisitWorkBench = () => { const navigate = useNavigate(); + const formRef = useRef(); // 静态数据 //分派表头 @@ -73,7 +77,7 @@ title: '流转时间', dataIndex: 'turnaroundTime', key: 'turnaroundTime', - width: 100, + width: 150, }, { title: '分派时限', @@ -121,7 +125,7 @@ title: '流转时间', dataIndex: 'turnaroundTime', key: 'turnaroundTime', - width: 100, + width: 150, }, { title: '签收时限', @@ -136,7 +140,7 @@ title: '事项等级', dataIndex: 'caseGrade', key: 'caseGrade', - width: 80, + width: 100, }, { title: '事项来源', @@ -169,7 +173,7 @@ title: '流转时间', dataIndex: 'turnaroundTime', key: 'turnaroundTime', - width: 100, + width: 150, }, { title: '受理时限', @@ -184,7 +188,7 @@ title: '事项等级', dataIndex: 'caseGrade', key: 'caseGrade', - width: 80, + width: 100, }, { title: '事项来源', @@ -574,7 +578,7 @@ title: '流转时间', dataIndex: 'turnaroundTime', key: 'turnaroundTime', - width: 100, + width: 150, }, { title: '已办天数', @@ -653,7 +657,7 @@ title: '结案申请时间', dataIndex: 'turnaroundTime', key: 'turnaroundTime', - width: 180, + width: 150, }, { title: '事项等级', @@ -935,7 +939,7 @@ title: '督办时间', dataIndex: 'turnaroundTime', key: 'turnaroundTime', - width: 100, + width: 150, }, { title: '回复时限', @@ -1094,6 +1098,7 @@ }) const [total, setTotal] = useState(0);//表格数据总数量 const [loading, setLoading] = useState(false);//表格loading + const [selectedRowKeys, setSelectedRowKeys] = useState([]); useEffect(() => { getCountData(); @@ -1102,6 +1107,11 @@ useEffect(() => { getTableData(tabActivekey) }, [searchData, pageData]) + + //批量选择 + const onSelectChange = (newSelectedRowKeys, selectedRows) => { + setSelectedRowKeys(newSelectedRowKeys); + } //签收 const handleSign = async (caseId, ownerId) => { @@ -1245,8 +1255,30 @@ } } + //查询 + const handleSubmit = () => { + const data = formRef.current.getFieldsValue(); + const { time, ...rest } = data + setSearchData({ + ...searchData, + timeStart: time ? time[0] : '', + timeEnd: time ? time[1] : '', + ...rest + }) + } + + //批量签收 + const handleBatchQs = () => { + console.log(selectedRowKeys); + } + + const rowSelection = { + selectedRowKeys: selectedRowKeys, + onChange: onSelectChange, + } + return ( - <div className='VisitWorkBench'> + <div className='VisitWorkBench' > <div className='VisitWorkBench-top'> <span style={{ fontWeight: 600 }}>工作总览</span> <div className='VisitWorkBench-top-list'> @@ -1272,7 +1304,14 @@ } </div> </div> - <div className='VisitWorkBench-middle'> + <div + className='VisitWorkBench-middle' + onKeyUp={(e) => { + if (e.key === 'Enter') { + handleSubmit() + } + }} + > <Tabs activeTab={searchData.status} onChange={handleColumnType} @@ -1288,7 +1327,7 @@ } > <Typography.Paragraph key={item.value}> - {tabActivekey == 5 && + {tabActivekey == '5' && <Radio.Group type='button' value={searchData.type} @@ -1315,7 +1354,8 @@ /> } <TableView - columns={tabActivekey == 5 ? item.columnsMap[searchData.type] : item.columns} + rowSelection={tabActivekey == '2' && item.value === '1' ? rowSelection : null} + columns={tabActivekey == '5' ? item.columnsMap[searchData.type] : item.columns} dataSource={tableData} size="small" rowKey="caseId" @@ -1340,15 +1380,57 @@ }} /> </Typography.Paragraph> + { + (tabActivekey == '2' && item.value === '1') && <div className='VisitWorkBench-middle-select'> + <span>已选{selectedRowKeys.length}项</span> + <span className='linkBtnColor' onClick={() => { setSelectedRowKeys([]) }}>取消</span> + <span className='linkBtnColor' onClick={handleBatchQs}>批量签收</span> + </div> + } </TabPane> })} </Tabs> + <div className='VisitWorkBench-middle-search'> + <Form + ref={formRef} + layout="vertical" + > + <div style={{ display: 'flex' }}> + <FormItem + label=' ' + field='time' + > + <RangePicker + style={{ width: '100%' }} + format='YYYY-MM-DD HH:mm' + showTime={true} + /> + </FormItem> + <FormItem + label=' ' + field='partyName' + > + <Input + allowClear + placeholder='查询申请方/被申请方关键词' + /> + </FormItem> + <Button + type="primary" + className="dialogPrimary" + onClick={handleSubmit} + > + 查询 + </Button> + </div> + </Form> + </div> </div> <div className='VisitWorkBench-bottom'> 群众来访接待 - <div style={{ display: 'flex', justifyContent: 'space-evenly',gap:'24px',marginTop:'16px' }}> + <div style={{ display: 'flex', justifyContent: 'space-evenly', gap: '24px', marginTop: '16px' }}> <div className='bottomTab1' onClick={() => navigate(`/mediate/visit`)}> - <div className='VisitWorkBench-bottom-title' style={{ color: '#206BCD' }}>大厅来访</div> + <div className='VisitWorkBench-bottom-title' style={{ color: '#206BCD' }}>大厅来访</div> {/* <img src={visitInto} alt='' className='VisitWorkBench-bottom-img' /> */} </div> <div className='bottomTab2'> diff --git a/gz-customerSystem/src/views/register/index.less b/gz-customerSystem/src/views/register/index.less index f3a27e2..396c3f6 100644 --- a/gz-customerSystem/src/views/register/index.less +++ b/gz-customerSystem/src/views/register/index.less @@ -855,7 +855,33 @@ background: #ffffff; padding: 12px 16px 16px 16px; margin-top: 12px; - // height: 54vh; + position: relative; + + &-search { + position: absolute; + right: 16px; + top: 12px; + + .arco-form-item { + margin-right: 16px; + } + + .arco-form-layout-vertical>.arco-form-label-item { + margin-bottom: 0; + } + } + + &-select { + position: absolute; + left: 0; + bottom: 12px; + + .linkBtnColor { + color: #1A6FB8; + cursor: pointer; + margin-left: 16px; + } + } } &-bottom { diff --git a/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx b/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx index 609b04c..ff8ea35 100644 --- a/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx +++ b/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx @@ -100,7 +100,7 @@ title: '操作', dataIndex: 'perClassName', key: 'perClassName', - width: props.isReview ? 60 : 125, + width: props.isReview ? 80 : 140, fixed: 'right', render: (text, record) => ( <Space size="middle"> -- Gitblit v1.8.0