From 221546808c11df777199def992e4abbf1fc31b5a Mon Sep 17 00:00:00 2001 From: liuwh <964324856@qq.com> Date: Sat, 14 Sep 2024 10:03:47 +0800 Subject: [PATCH] Merge branch 'master' of http://120.79.193.119:9090/r/gzzfw/frontEnd/gzDyh into master --- gz-customerSystem/src/views/register/index.jsx | 197 +++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 156 insertions(+), 41 deletions(-) diff --git a/gz-customerSystem/src/views/register/index.jsx b/gz-customerSystem/src/views/register/index.jsx index 8dbea18..0fca04b 100644 --- a/gz-customerSystem/src/views/register/index.jsx +++ b/gz-customerSystem/src/views/register/index.jsx @@ -1,22 +1,25 @@ /* * @Author: dminyi 1301963064@qq.com * @Date: 2024-09-08 15:14:12 - * @LastEditors: dminyi 1301963064@qq.com - * @LastEditTime: 2024-09-10 23:36:06 + * @LastEditors: lwh + * @LastEditTime: 2024-09-13 10:35:03 * @FilePath: \gzDyh\gz-customerSystem\src\views\register\index.jsx * @Description: 工作台 */ 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, Modal } 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) { @@ -58,14 +61,14 @@ return $$.ax.request({ url: `caseTask/pageMyTaskDb`, type: 'get', service: 'mediate', data }); } - -//签收 +//签收接口 function signApi(data) { return $$.ax.request({ url: `caseTask/sign`, type: 'post', service: 'mediate', data }); } const VisitWorkBench = () => { const navigate = useNavigate(); + const formRef = useRef(); // 静态数据 //分派表头 @@ -74,7 +77,7 @@ title: '流转时间', dataIndex: 'turnaroundTime', key: 'turnaroundTime', - width: 100, + width: 150, }, { title: '分派时限', @@ -122,7 +125,7 @@ title: '流转时间', dataIndex: 'turnaroundTime', key: 'turnaroundTime', - width: 100, + width: 150, }, { title: '签收时限', @@ -137,7 +140,7 @@ title: '事项等级', dataIndex: 'caseGrade', key: 'caseGrade', - width: 80, + width: 100, }, { title: '事项来源', @@ -170,7 +173,7 @@ title: '流转时间', dataIndex: 'turnaroundTime', key: 'turnaroundTime', - width: 100, + width: 150, }, { title: '受理时限', @@ -185,7 +188,7 @@ title: '事项等级', dataIndex: 'caseGrade', key: 'caseGrade', - width: 80, + width: 100, }, { title: '事项来源', @@ -332,7 +335,7 @@ title: '化解结果', dataIndex: 'mediResult', key: 'mediResult', - width: 80, + width: 100, }, { title: '无法化解理由', @@ -568,14 +571,14 @@ }, tabList: [ { - value: '0', + value: '2', label: '办理中', columns: [ { title: '流转时间', dataIndex: 'turnaroundTime', key: 'turnaroundTime', - width: 100, + width: 150, }, { title: '已办天数', @@ -647,14 +650,14 @@ ] }, { - value: '1', + value: '0', label: '结案申请', columns: [ { title: '结案申请时间', dataIndex: 'turnaroundTime', key: 'turnaroundTime', - width: 180, + width: 150, }, { title: '事项等级', @@ -690,7 +693,7 @@ title: '化解结果', dataIndex: 'mediResult', key: 'mediResult', - width: 180, + width: 100, }, { title: '申请方', @@ -719,7 +722,7 @@ ] }, { - value: '2', + value: '1', label: '已结案', columns: [ { @@ -845,7 +848,7 @@ render: (text, record) => ( <Space style={{ color: '#1A6FB8' }}> <div onClick={() => navigate(`/mediate/visit/fileMessage?caseTaskId=${record.ownerId}&caseId=${record.caseId}`)} style={{ cursor: 'pointer' }}>详情</div> - <div onClick={() => navigate(`/mediate/visit/handleFeedback?caseTaskId=${record.ownerId}&caseId=${record.caseId}`)} style={{ cursor: 'pointer' }}>审核</div> + <div onClick={() => navigate(`/mediate/visit/closingReview?caseTaskId=${record.ownerId}&caseId=${record.caseId}`)} style={{ cursor: 'pointer' }}>审核</div> </Space> ), }]), @@ -936,7 +939,7 @@ title: '督办时间', dataIndex: 'turnaroundTime', key: 'turnaroundTime', - width: 100, + width: 150, }, { title: '回复时限', @@ -951,7 +954,7 @@ title: '督办部门', dataIndex: 'caseGrade', key: 'caseGrade', - width: 80, + width: 110, }, { title: '督办意见', @@ -1017,7 +1020,7 @@ title: '督办部门', dataIndex: 'caseGrade', key: 'caseGrade', - width: 80, + width: 110, }, { title: '督办意见', @@ -1094,6 +1097,9 @@ sortColmn: 1, }) const [total, setTotal] = useState(0);//表格数据总数量 + const [loading, setLoading] = useState(false);//表格loading + const [selectedRowKeys, setSelectedRowKeys] = useState([]);//批量签收的id + const [selectedRows, setSelectedRows] = useState([]);//批量签收的数据 useEffect(() => { getCountData(); @@ -1103,20 +1109,26 @@ getTableData(tabActivekey) }, [searchData, pageData]) - const sign = async (caseId, ownerId) => { - const res = await signApi({ caseId: caseId, caseTaskId: ownerId }) + //批量选择 + const onSelectChange = (newSelectedRowKeys, selectedRows) => { + setSelectedRowKeys(newSelectedRowKeys); + setSelectedRows(selectedRows) + } + + //签收 + const handleSign = async (caseId, ownerId) => { + const res = await signApi([{ caseId: caseId, caseTaskId: ownerId }]) if (res.type) { $$.infoSuccess({ content: '签收成功' }); getCountData(); + getTableData(tabActivekey) + navigate(`/mediate/visit/eventFlow?caseTaskId=${ownerId}&caseId=${caseId}`) } - } - - const handleSign = (caseId, ownerId) => { - sign(caseId, ownerId) } //获取表格数据汇总 const getTableData = async (type) => { + setLoading(true) let res switch (type) { case '1'://待分派 @@ -1139,7 +1151,7 @@ break; case '4'://办理中 const { status, ...most } = searchData - if (status && status === '0') { + if (status && status === '2') { res = await pageMyTaskBlzApi({ ...pageData, ...most @@ -1167,6 +1179,7 @@ break; } if (res.type) { + setLoading(false) const { data } = res setTableData(data?.content) setTotal(data.totalElements) @@ -1191,7 +1204,13 @@ status: '0', type: 1 }) - } else if (key == '4' || key == '6') { + } else if (key == '4') { + setSearchData({ + sortType: 1, + sortColmn: 1, + status: '2', + }) + } else if (key == '6') { setSearchData({ sortType: 1, sortColmn: 1, @@ -1206,13 +1225,14 @@ } setTabActivekey(key); setTableTab(data.tabList) + getCountData(); } //获取工作总览数据 const getCountData = async () => { const res = await getCountListApi() if (res.type) { - const data = res.data + const data = res.data || {}; setCountData(data) } } @@ -1245,8 +1265,48 @@ } } + //查询 + 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(selectedRows); + const paramsList = selectedRows.map(item => { + return { + caseId: item.caseId, + caseTaskId: item.ownerId + } + }) + Modal.confirm({ + title: '签收确认', + content: '确认批量签收?', + onOk: async () => { + const res = await signApi(paramsList) + if (res.type) { + $$.infoSuccess({ content: '批量签收成功成功!' }); + getCountData(); + getTableData(tabActivekey) + } + }, + }); + } + + 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 +1332,14 @@ } </div> </div> - <div className='VisitWorkBench-middle'> + <div + className='VisitWorkBench-middle' + onKeyUp={(e) => { + if (e.key === 'Enter') { + handleSubmit() + } + }} + > <Tabs activeTab={searchData.status} onChange={handleColumnType} @@ -1287,8 +1354,8 @@ </span> } > - <Typography.Paragraph key={item.value}> - {tabActivekey == 5 && + <Typography.Paragraph key={tabActivekey + item.value}> + {tabActivekey == '5' && <Radio.Group type='button' value={searchData.type} @@ -1315,15 +1382,18 @@ /> } <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" bordered={true} + isScroll={true}//兼容以前的,当需要表格竖向滚动,请设置这个 scroll={{ x: 1300 }} - offsetHeight={153} + offsetHeight={161} + loading={loading} pagination={{ current: pageData.page, pageSize: pageData.size, @@ -1338,18 +1408,63 @@ }} /> </Typography.Paragraph> + { + (tabActivekey == '2' && item.value === '1') && <div className='VisitWorkBench-middle-select'> + <span>已选{selectedRowKeys.length}项</span> + <span className='linkBtnColor' onClick={() => { + setSelectedRowKeys([]) + setSelectedRows([]) + }}>取消</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 className='bottomTab1' style={{ cursor: 'pointer' }}> - <div className='VisitWorkBench-bottom-title' onClick={() => { navigate(`/mediate/visit`) }} style={{ color: '#206BCD' }}>大厅来访</div> + <div className='bottomTab1' onClick={() => navigate(`/mediate/visit`)}> + <div className='VisitWorkBench-bottom-title' style={{ color: '#206BCD' }}>大厅来访</div> {/* <img src={visitInto} alt='' className='VisitWorkBench-bottom-img' /> */} </div> - <div className='bottomTab2' style={{ cursor: 'pointer' }}> + <div className='bottomTab2'> <div className='VisitWorkBench-bottom-title' style={{ color: '#D46B08' }}>自行排查</div> {/* <img src={checkInto} alt='' className='VisitWorkBench-bottom-img' /> */} </div> -- Gitblit v1.8.0