forked from gzzfw/frontEnd/gzDyh

dminyi
2024-09-09 862311c4686345362fcbc60e92c969fb5cb3369d
gz-customerSystem/src/views/register/index.jsx
@@ -2,36 +2,46 @@
 * @Author: dminyi 1301963064@qq.com
 * @Date: 2024-09-08 15:14:12
 * @LastEditors: dminyi 1301963064@qq.com
 * @LastEditTime: 2024-09-09 10:05:35
 * @LastEditTime: 2024-09-09 17:06:20
 * @FilePath: \gzDyh\gz-customerSystem\src\views\register\index.jsx
 * @Description: 工作台
 */
import React, { useState } from 'react';
import { tab1, tab2, tab3, tab4, tab5, tab6,visitInto,checkInto } from '@/assets/images'
import React, { useEffect, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { tab1, tab2, tab3, tab4, tab5, tab6, visitInto, checkInto } from '@/assets/images'
import TableView from '../../components/TableView';
import { Space } from 'antd';
import { Tabs, Typography } from '@arco-design/web-react';
import { Tabs, Typography, Radio } from '@arco-design/web-react';
import * as $$ from '@/utils/utility';
const TabPane = Tabs.TabPane;
function pageMyTaskBlApi(data) {
  return $$.ax.request({ url: `caseTask/pageMyTaskBl`, type: 'get', service: 'mediate', data });
}
function getCountListApi(data) {
  return $$.ax.request({ url: `caseTask/getCountList`, type: 'get', service: 'mediate', data });
}
const VisitWorkBench = () => {
  const navigate = useNavigate();
  const [tabActivekey, setTabActivekey] = useState('1')
  const [column, setColumn] = useState('1')
  const [CountList, setCountList] = useState({})
  const [direction, setDirection] = useState('回退审核')
  const tabsList = [
    {
      key: '1',
      label: '待分派',
      bgColor: '#E8F8FF',
      num: 10,
      num: `${CountList?.waitDisp}`,
      img: tab1
    },
    {
      key: '2',
      label: '待签收',
      bgColor: '#E8FFEA',
      num: 30,
      num: `${CountList?.waitSign}`,
      img: tab2
    },
@@ -39,7 +49,7 @@
      key: '3',
      label: '待受理',
      bgColor: '#F5E8FF',
      num: 50,
      num: `${CountList?.waitAccept}`,
      img: tab3
    },
@@ -47,7 +57,7 @@
      key: '4',
      label: '办理中',
      bgColor: '#E6FFFB',
      num: 60,
      num: `${CountList?.waitReview}`,
      img: tab4
    },
@@ -55,7 +65,7 @@
      key: '5',
      label: '待审核',
      bgColor: '#E8F7FF',
      num: 70,
      num: `${CountList?.supervise}`,
      img: tab5
    },
@@ -63,13 +73,13 @@
      key: '6',
      label: '督办',
      bgColor: '#FFF7E6',
      num: 80,
      num: `${CountList?.processing}`,
      img: tab6
    },
  ]
  const [fakeData1, setFakeData1] = useState(
  const fakeData1 =
    [
      {
        id: 1,
@@ -114,7 +124,7 @@
        // 更多字段...
      },
      {
        id: 2,
        id: 3,
        caseNo: 'A20230101',
        judicNo: '证据材料',
        perClassName: '李晓明的纠纷化解申请表、身份证...',
@@ -135,7 +145,7 @@
        // 更多字段...
      },
      {
        id: 2,
        id: 4,
        caseNo: 'A20230101',
        judicNo: '证据材料',
        perClassName: '李晓明的纠纷化解申请表、身份证...',
@@ -156,7 +166,7 @@
        // 更多字段...
      },
      {
        id: 2,
        id: 5,
        caseNo: 'A20230101',
        judicNo: '证据材料',
        perClassName: '李晓明的纠纷化解申请表、身份证...',
@@ -177,7 +187,7 @@
        // 更多字段...
      },
      {
        id: 2,
        id: 6,
        caseNo: 'A20230101',
        judicNo: '证据材料',
        perClassName: '李晓明的纠纷化解申请表、身份证...',
@@ -198,7 +208,7 @@
        // 更多字段...
      },
      {
        id: 2,
        id: 7,
        caseNo: 'A20230101',
        judicNo: '证据材料',
        perClassName: '李晓明的纠纷化解申请表、身份证...',
@@ -219,7 +229,7 @@
        // 更多字段...
      },
      {
        id: 2,
        id: 8,
        caseNo: 'A20230101',
        judicNo: '证据材料',
        perClassName: '李晓明的纠纷化解申请表、身份证...',
@@ -240,7 +250,7 @@
        // 更多字段...
      },
      {
        id: 2,
        id: 9,
        caseNo: 'A20230101',
        judicNo: '证据材料',
        perClassName: '李晓明的纠纷化解申请表、身份证...',
@@ -261,7 +271,7 @@
        // 更多字段...
      },
      {
        id: 2,
        id: 10,
        caseNo: 'A20230101',
        judicNo: '证据材料',
        perClassName: '李晓明的纠纷化解申请表、身份证...',
@@ -284,110 +294,295 @@
      // 更多数据...
    ]
  )
  const [columnType, setColumnType] = useState([
    {
      title: '流转时间',
      dataIndex: 'turnaroundTime',
      key: 'turnaroundTime',
      width: 100,
    },
    {
      title: '分派时限',
      dataIndex: 'timeLimit',
      key: 'timeLimit',
      width: 60,
    },
    {
      title: '事项等级',
      dataIndex: 'caseGrade',
      key: 'caseGrade',
      width: 180,
    },
    {
      title: '事项来源',
      dataIndex: 'caseSource',
      key: 'caseSource',
      width: 180,
    },
    {
      title: '事项类型',
      dataIndex: 'caseType',
      key: 'caseType',
      width: 180,
    },
    {
      title: '申请方',
      dataIndex: 'plaintiffs',
      key: 'plaintiffs',
      width: 180,
    },
    {
      title: '被申请方',
      dataIndex: 'defendants',
      key: 'defendants',
      width: 180,
    },
    {
      title: '操作',
      dataIndex: 'actions',
      key: 'actions',
      width: 180,
      render: (text, record) => (
        <Space style={{ color: '#1A6FB8' }}>
          <div onClick={() => navigate(`/mediate/visit/fileMessage?caseTaskId=${'1'}&caseId=${'1'}`)} style={{ cursor: 'pointer' }}>详情</div>
          <div onClick={() => navigate(`/mediate/visit/eventFlow?caseTaskId=${'1'}&caseId=${'1'}`)} style={{ cursor: 'pointer' }}>处理</div>
        </Space>
      ),
    },
  ])
  // 列配置
  const [fakeColumns, setFakeColumns] = useState([
  const fakeColumns3 = [
    {
      title: tabActivekey === '5' ? '回退时间' : tabActivekey === '6' ? '督办时间' : '流转时间',
      dataIndex: 'caseNo',
      key: 'caseNo',
      title: '流转时间',
      dataIndex: 'turnaroundTime',
      key: 'turnaroundTime',
      width: 100,
      render: (text, record, index) => <span>{index + 1}</span>,
    },
    {
      title: '分派时限',
      dataIndex: 'dispatchDeadline',
      key: 'dispatchDeadline',
      width: 60,
    },
    {
      title: '签收时限',
      dataIndex: 'receiptDeadline',
      key: 'receiptDeadline',
      width: 60,
    },
    {
      title: '受理时限',
      dataIndex: 'acceptanceDeadline',
      key: 'acceptanceDeadline',
      width: 60,
    },
    {
      title: '已办天数',
      dataIndex: 'processedDays',
      key: 'processedDays',
      width: 60,
    },
    {
      title: '回复时限',
      dataIndex: 'replyDeadline',
      key: 'replyDeadline',
      dataIndex: 'timeLimit',
      key: 'timeLimit',
      width: 60,
    },
    {
      title: '事项等级',
      dataIndex: 'matterLevel',
      key: 'matterLevel',
      dataIndex: 'caseGrade',
      key: 'caseGrade',
      width: 180,
      render: (text) => (
        <>
          {text}份
        </>
      ),
    },
    {
      title: '事项来源',
      dataIndex: 'matterSource',
      key: 'matterSource',
      dataIndex: 'caseSource',
      key: 'caseSource',
      width: 180,
    },
    {
      title: '事项类型',
      dataIndex: 'matterType',
      key: 'matterType',
      width: 180,
    },
    {
      title: '承办部门',
      dataIndex: 'handlingDepartment',
      key: 'handlingDepartment',
      width: 180,
    },
    {
      title: '配合部门',
      dataIndex: 'cooperatingDepartment',
      key: 'cooperatingDepartment',
      width: 180,
    },
    {
      title: '督办部门',
      dataIndex: 'supervisionDepartment',
      key: 'supervisionDepartment',
      width: 180,
    },
    {
      title: '督办意见',
      dataIndex: 'supervisionOpinion',
      key: 'supervisionOpinion',
      width: 180,
    },
    {
      title: '经办人',
      dataIndex: 'handler',
      key: 'handler',
      dataIndex: 'caseType',
      key: 'caseType',
      width: 180,
    },
    {
      title: '申请方',
      dataIndex: 'applicant',
      key: 'applicant',
      dataIndex: 'plaintiffs',
      key: 'plaintiffs',
      width: 180,
    },
    {
      title: '被申请方',
      dataIndex: 'respondent',
      key: 'respondent',
      dataIndex: 'defendants',
      key: 'defendants',
      width: 180,
    },
    {
      title: '操作',
      dataIndex: 'actions',
      key: 'actions',
      width: 180,
      render: (text, record) => (
        <Space style={{ color: '#1A6FB8' }}>
          <div onClick={() => navigate(`/mediate/visit/fileMessage?caseTaskId=${'1'}&caseId=${'1'}`)} style={{ cursor: 'pointer' }}>详情</div>
          <div onClick={() => navigate(`/mediate/visit/eventFlow?caseTaskId=${'1'}&caseId=${'1'}`)} style={{ cursor: 'pointer' }}>处理</div>
        </Space>
      ),
    },
  ];
  const fakeColumns1 = [
    {
      title: '流转时间',
      dataIndex: 'turnaroundTime',
      key: 'turnaroundTime',
      width: 100,
      render: (text, record, index) => <span>{index + 1}</span>,
    },
    {
      title: '签收时限',
      dataIndex: 'timeLimit',
      key: 'timeLimit',
      width: 60,
    },
    {
      title: '事项等级',
      dataIndex: 'caseGrade',
      key: 'caseGrade',
      width: 180,
    },
    {
      title: '事项来源',
      dataIndex: 'caseSource',
      key: 'caseSource',
      width: 180,
    },
    {
      title: '事项类型',
      dataIndex: 'caseType',
      key: 'caseType',
      width: 180,
    },
    {
      title: '申请方',
      dataIndex: 'plaintiffs',
      key: 'plaintiffs',
      width: 180,
    },
    {
      title: '被申请方',
      dataIndex: 'defendants',
      key: 'defendants',
      width: 180,
    },
    {
      title: '操作',
      dataIndex: 'actions',
      key: 'actions',
      width: 180,
      render: (text, record) => (
        <Space style={{ color: '#1A6FB8' }}>
          <div onClick={() => navigate(`/mediate/visit/fileMessage?caseTaskId=${'1'}&caseId=${'1'}`)} style={{ cursor: 'pointer' }}>详情</div>
          <div>签收</div>
        </Space>
      ),
    },
  ];
  const fakeColumns2 = [
    {
      title: '流转时间',
      dataIndex: 'turnaroundTime',
      key: 'turnaroundTime',
      width: 100,
    },
    {
      title: '受理时限',
      dataIndex: 'timeLimit',
      key: 'timeLimit',
      width: 60,
    },
    {
      title: '事项等级',
      dataIndex: 'caseGrade',
      key: 'caseGrade',
      width: 180,
    },
    {
      title: '事项来源',
      dataIndex: 'caseSource',
      key: 'caseSource',
      width: 180,
    },
    {
      title: '事项类型',
      dataIndex: 'caseType',
      key: 'caseType',
      width: 180,
    },
    {
      title: '申请方',
      dataIndex: 'plaintiffs',
      key: 'plaintiffs',
      width: 180,
    },
    {
      title: '被申请方',
      dataIndex: 'defendants',
      key: 'defendants',
      width: 180,
    },
    {
      title: '操作',
      dataIndex: 'actions',
      key: 'actions',
      width: 180,
      render: (text, record) => (
        <Space style={{ color: '#1A6FB8' }}>
          <div onClick={() => navigate(`/mediate/visit/fileMessage?caseTaskId=${'1'}&caseId=${'1'}`)} style={{ cursor: 'pointer' }}>详情</div>
          <div onClick={() => navigate(`/mediate/visit/eventFlow?caseTaskId=${'1'}&caseId=${'1'}`)} style={{ cursor: 'pointer' }}>处理</div>
        </Space>
      ),
    },
  ];
  const [column, setColumn] = useState([
    {
      title: '流转时间',
      dataIndex: 'turnaroundTime',
      key: 'turnaroundTime',
      width: 100,
    },
    {
      title: '已办天数',
      dataIndex: 'processingDays',
      key: 'processingDays',
      width: 60,
    },
    {
      title: '事项等级',
      dataIndex: 'caseGrade',
      key: 'caseGrade',
      width: 180,
    },
    {
      title: '事项来源',
      dataIndex: 'caseSource',
      key: 'caseSource',
      width: 180,
    },
    {
      title: '事项类型',
      dataIndex: 'caseType',
      key: 'caseType',
      width: 180,
    },
    {
      title: '承办部门',
      dataIndex: 'organizingUnit',
      key: 'organizingUnit',
      width: 180,
    },
    {
      title: '配合部门',
      dataIndex: 'cooperatingUnit',
      key: 'cooperatingUnit',
      width: 180,
    },
    {
      title: '经办人',
      dataIndex: 'manager',
      key: 'manager',
      width: 180,
    },
    {
      title: '申请方',
      dataIndex: 'plaintiffs',
      key: 'plaintiffs',
      width: 180,
    },
    {
      title: '被申请方',
      dataIndex: 'defendants',
      key: 'defendants',
      width: 180,
    },
    {
@@ -397,28 +592,201 @@
      width: 180,
      render: (text, record) => (
        <Space>
          <div>详情</div>
          <div>处理</div>
          <div onClick={() => navigate(`/mediate/visit/fileMessage?caseTaskId=${'1'}&caseId=${'1'}`)} style={{ cursor: 'pointer' }}>详情</div>
          <div onClick={() => navigate(`/mediate/visit/handleFeedback?caseTaskId=${'1'}&caseId=${'1'}`)} style={{ cursor: 'pointer' }}>处理</div>
        </Space>
      ),
    },
  ]);
  ])
  const [backColumn, setBackColumn] = useState([
    {
      title: '回退时间',
      dataIndex: 'turnaroundTime',
      key: 'turnaroundTime',
      width: 100,
    },
    {
      title: '回退部门',
      dataIndex: 'backUnit',
      key: 'backUnit',
      width: 60,
    },
    {
      title: '回退理由',
      dataIndex: 'reason',
      key: 'reason',
      width: 180,
    },
    {
      title: '事项等级',
      dataIndex: 'caseGrade',
      key: 'caseGrade',
      width: 180,
    },
    {
      title: '事项来源',
      dataIndex: 'caseSource',
      key: 'caseSource',
      width: 180,
    },
    {
      title: '事项类型',
      dataIndex: 'caseType',
      key: 'caseType',
      width: 180,
    },
    {
      title: '申请方',
      dataIndex: 'plaintiffs',
      key: 'plaintiffs',
      width: 180,
    },
    {
      title: '被申请方',
      dataIndex: 'defendants',
      key: 'defendants',
      width: 180,
    },
    {
      title: '操作',
      dataIndex: 'actions',
      key: 'actions',
      width: 180,
      render: (text, record) => (
        <Space>
          <div onClick={() => navigate(`/mediate/visit/fileMessage?caseTaskId=${'1'}&caseId=${'1'}`)} style={{ cursor: 'pointer' }}>详情</div>
          {/* <div onClick={() => navigate(`/mediate/visit/handleFeedback?caseTaskId=${'1'}&caseId=${'1'}`)} style={{ cursor: 'pointer' }}>处理</div> */}
          {(direction === '回退审核' || direction === '上报审核') &&
            <div onClick={() => navigate(`/mediate/visit/eventFlow?caseTaskId=${'1'}&caseId=${'1'}`)} style={{ cursor: 'pointer' }}>处理</div>
          }
          {(direction === '结案申请审核' || direction === '联合处置审核') &&
            <div onClick={() => navigate(`/mediate/visit/handleFeedback?caseTaskId=${'1'}&caseId=${'1'}`)} style={{ cursor: 'pointer' }}>处理</div>
          }
        </Space>
      ),
    },
  ])
  const [mangeColumn, setMangeColumn] = useState([
    {
      title: '督办时间',
      dataIndex: 'turnaroundTime',
      key: 'turnaroundTime',
      width: 100,
      render: (text, record, index) => <span>{index + 1}</span>,
    },
    {
      title: '回复时限',
      dataIndex: 'timeLimit',
      key: 'timeLimit',
      width: 60,
    },
    {
      title: '督办部门',
      dataIndex: 'caseGrade',
      key: 'caseGrade',
      width: 180,
    },
    {
      title: '督办意见',
      dataIndex: 'opinion',
      key: 'opinion',
      width: 180,
    },
    {
      title: '事项等级',
      dataIndex: 'caseGrade',
      key: 'caseGrade',
      width: 180,
    },
    {
      title: '事项来源',
      dataIndex: 'caseSource',
      key: 'caseSource',
      width: 180,
    },
    {
      title: '事项类型',
      dataIndex: 'caseType',
      key: 'caseType',
      width: 180,
    },
    {
      title: '申请方',
      dataIndex: 'plaintiffs',
      key: 'plaintiffs',
      width: 180,
    },
    {
      title: '被申请方',
      dataIndex: 'defendants',
      key: 'defendants',
      width: 180,
    },
    {
      title: '操作',
      dataIndex: 'actions',
      key: 'actions',
      width: 180,
      render: (text, record) => (
        <Space>
          <div>回复</div>
          <div>详情</div>
        </Space>
      ),
    },
  ])
  const tabActive = (key) => {
    setTabActivekey(key)
    console.log(key, 'key')
    setTabActivekey(key);
    if (key === '1') {
      setColumnType(fakeColumns3)
    }
    if (key === '2') {
      setColumnType(fakeColumns1)
    }
    if (key === '3') {
      setColumnType(fakeColumns2)
    }
    if (key === '4') {
      setColumnType(column)
    }
    if (key === '5') {
      setColumnType(backColumn)
    }
    if (key === '6') {
      setColumnType(mangeColumn)
    }
  }
  // const columnChange = async () => {
  //   const res = await columnChangeApi()
  //   if (res.type) {
  //     setColumn(res.data)
  //   }
  // }
  const handleColumnType = () => {
    const columnList = column.filter(item => fakeColumns.some(itemNew => itemNew.title === item.title))
    setFakeColumns(columnList)
  const pageMyTaskBl = async () => {
    const res = await pageMyTaskBlApi({ page: 1, size: 10, timeStart: '', timeEnd: '', partyName: '', sortType: '', sortColmn: '' })
    if (res.type) {
      console.log(res.data, 'res.data')
      // setColumn(res.data)
    }
  }
  const getCountList = async () => {
    const res = await getCountListApi()
    if (res.type) {
      const data = res.data
      setCountList(data)
    }
  }
  useEffect(() => {
    // pageMyTaskBl();
    getCountList();
  }, [columnType,direction])
@@ -445,7 +813,7 @@
      <div className='VisitWorkBench-middle'>
        <Tabs defaultActiveTab='1'>
          <TabPane
            onChange={handleColumnType}
            // onChange={handleColumnType}
            key='1'
            title={
              <span style={{ fontSize: '15px' }}>
@@ -459,8 +827,18 @@
            }
          >
            <Typography.Paragraph>
              {tabActivekey === '5' &&
                <Radio.Group
                  type='button'
                  name='direction'
                  value={direction}
                  onChange={(e) => setDirection(e)}
                  style={{ marginBottom: 16 }}
                  options={['回退审核', '上报审核', '结案申请审核', '联合处置审核']}
                ></Radio.Group>
              }
              <TableView
                columns={fakeColumns}
                columns={columnType}
                dataSource={fakeData1}
                size="small"
                rowKey="id"
@@ -488,19 +866,33 @@
            <Typography.Paragraph>
            </Typography.Paragraph>
          </TabPane>
          {tabActivekey === '4' &&
            <TabPane
              key='3'
              title={
                <span style={{ fontSize: '15px' }}>
                  已结案
                </span>
              }
            >
              <Typography.Paragraph>
              </Typography.Paragraph>
            </TabPane>
          }
        </Tabs>
      </div>
      <div className='VisitWorkBench-bottom'>
        自行排查
        <div style={{ display: 'flex',justifyContent:'space-evenly' }}>
          <div style={{display:'flex'}}>
            <div className='VisitWorkBench-bottom-title'>大厅来访</div>
            <img src={visitInto} alt='' className='VisitWorkBench-bottom-img'/>
        <div style={{ display: 'flex', justifyContent: 'space-evenly' }}>
          <div className='bottomTab1'>
            <div className='VisitWorkBench-bottom-title' onClick={() => navigate(`/mediate/visit`)} style={{ color: '#206BCD' }}>大厅来访</div>
            <img src={visitInto} alt='' className='VisitWorkBench-bottom-img' />
          </div>
          <div style={{display:'flex'}}>
            <div className='VisitWorkBench-bottom-title'>自行排查</div>
            <img src={checkInto} alt='' className='VisitWorkBench-bottom-img'/>
          <div className='bottomTab2'>
            <div className='VisitWorkBench-bottom-title' style={{ color: '#D46B08' }}>自行排查</div>
            <img src={checkInto} alt='' className='VisitWorkBench-bottom-img' />
          </div>
        </div>
      </div>