forked from gzzfw/frontEnd/gzDyh

zhangyongtian
2024-09-13 6a4f69b2fb9efa845fdd43c76713067716c3dd8e
gz-customerSystem/src/views/register/matterDetail/fileMessage.jsx
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react';
import NewPage from '@/components/NewPage';
import { Steps, Tabs, Button } from '@arco-design/web-react';
import { Steps, Tabs, Button, Badge } from '@arco-design/web-react';
import { apply, floating } from '@/assets/images';
import { result } from '@/assets/images/icon';
import * as $$ from '@/utils/utility';
@@ -12,6 +12,8 @@
import { Scrollbars } from "react-custom-scrollbars";
import RateModule from './RateModule';
import RegisInfoModule from './RegisInfoModule';
import SupervisingView from "./Supervising";
import { useNavigate } from 'react-router-dom';
const Step = Steps.Step;
const TabPane = Tabs.TabPane;
@@ -32,19 +34,19 @@
  return $$.ax.request({ url: `caseFeedback/listFeedback?id=` + id, type: 'get', service: 'mediate' });
}
function getListCaseFlow(data) {
  return $$.ax.request({ url: `caseTask/listCaseFlow`, type: 'get', service: 'mediate', data });
function getListCaseFlow(caseId) {
  return $$.ax.request({ url: `caseTask/listCaseFlow?caseId=` + caseId, type: 'get', service: 'mediate' });
}
const FileMessage = (props) => {
  const navigate = useNavigate();
  const caseTaskId = $$.getQueryString('caseTaskId')
  const caseId = $$.getQueryString('caseId')
  const [tabsActive, setTabsActive] = useState('1');
  const [current, setCurrent] = useState(7);
  const [grade, setGrade] = useState(null);
  const [caseInfo, setCaseInfo] = useState({})
  const [TransactResult, setTransactResult] = useState({})
  const [TransactResult, setTransactResult] = useState(null)
  const [tabsList, setTabList] = useState([
    {
      img: result,
@@ -57,16 +59,17 @@
      label: '流转督办',
      key: '2',
    },
    {
      img: apply,
      label: '申请记录',
      key: '3',
    },
    // {
    //   img: apply,
    //   label: '申请记录',
    //   key: '3',
    // },
  ])
  const [list, setList] = useState([])
  const [progressData, setProgressData] = useState({});
  useEffect(() => {
    console.log(caseId, 'caseId')
    getByCaseId(caseId);
    getTransactResult(caseId);
    getCaseInfo(caseId);
@@ -76,8 +79,14 @@
  const getTransactResult = async (id) => {
    const res = await getTransactResultApi(id)
    console.log(res);
    if (res.type) {
      setTransactResult({ ...res.data, fileName: res.data.fileInfoBaseDTOList.map(item => item.trueName) })
      if (res.data) {
        setTransactResult({ ...res.data, fileName: res.data.fileInfoBaseDTOList?.map(item => item.trueName) })
      } else {
        setTransactResult(null)
      }
    }
  }
@@ -110,9 +119,7 @@
  }
  const getData = async (id) => {
    const res = await getListCaseFlow({
      caseId: id
    })
    const res = await getListCaseFlow(id)
    if (res.type) {
      setProgressData(res.data)
    }
@@ -171,21 +178,52 @@
                      <RateModule grade={grade} />
                    </div>
                  }
                  <div style={{ backgroundColor: '#ffff', margin: '8px 16px 65px 16px', padding: '12px' }}>
                    <RegisInfoModule caseInfo={caseInfo} />
                  </div>
                  {caseInfo?.canal === '22_00001-1' &&
                    <div style={{ backgroundColor: '#ffff', margin: '8px 16px 0px 16px', padding: '12px' }}>
                      <RegisInfoModule caseInfo={caseInfo} />
                    </div>
                  }
                  <div style={{ backgroundColor: '#ffff', margin: '0 16px 64px 16px', padding: '12px' }}></div>
                </Scrollbars>
                <div className="dataSync-excel">
                  <Space size="large" style={{ margin: '4px 14px' }}>
                    <Button type='primary' >导出</Button>
                    <Button type='secondary' >返回上级页面</Button>
                    <Button type='secondary' onClick={() => navigate(-1)}>返回上级页面</Button>
                  </Space>
                </div>
              </>
            }
            {
              tabsActive === '2' &&
              <ProgressStep progressData={progressData} />
              <div className='dataSync-hasTabPage' style={{ marginTop: '-8px' }}>
                <Tabs defaultActiveTab='1' >
                  <TabPane
                    key='1'
                    title={
                      <span style={{ fontSize: '15px' }}>
                        流转进度
                      </span>
                    }
                  >
                    <Scrollbars style={{ height: 'calc(100vh - 300px)' }} autoHide>
                      <ProgressStep progressData={progressData} hasTab={true} />
                    </Scrollbars>
                  </TabPane>
                  <TabPane
                    key='2'
                    title={
                      <span style={{ fontSize: '15px' }}>
                        督办信息
                        <Badge maxCount={99} count={1000} />
                      </span>
                    }
                  >
                    <Scrollbars style={{ height: 'calc(100vh - 300px)' }} autoHide>
                      <SupervisingView id={''} />
                    </Scrollbars>
                  </TabPane>
                </Tabs>
              </div>
            }
            {
              tabsActive === '3' &&