forked from gzzfw/frontEnd/gzDyh

dminyi
2024-09-06 b2434de9e541031c17fabe06b3d294ed4823d903
Merge branch 'master' of http://120.79.193.119:9090/r/gzzfw/frontEnd/gzDyh into master
1 files added
1 files renamed
4 files modified
222 ■■■■■ changed files
gz-customerSystem/src/views/register/handleFeedback/component/CaseResult.jsx 2 ●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/handleFeedback/component/handle.jsx 126 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/index.less 7 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/matterDetail/FileUpLoad.jsx patch | view | raw | blame | history
gz-customerSystem/src/views/register/matterDetail/HandleRecord.jsx 85 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx 2 ●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/handleFeedback/component/CaseResult.jsx
@@ -9,7 +9,7 @@
import React, { useState } from 'react';
import { Modal, Form, Select, Upload, Input } from '@arco-design/web-react';
import { Col, Space, Button, Tooltip, Radio } from 'antd';
import DocumentScanner from './FileUpLoad'
import DocumentScanner from '../../matterDetail/FileUpLoad'
import { scan } from '@/assets/images/icon'
import { tip, question1 } from '@/assets/images'
import { NoHandleReason } from '../../visit/component/levelDetail'
gz-customerSystem/src/views/register/handleFeedback/component/handle.jsx
@@ -8,10 +8,11 @@
import SelectObjModal from '@/components/SelectObjModal/selectPerson';
import WantUserTag from '@/components/WantUserTag/Handling';
import { scan } from '@/assets/images/icon'
import DocumentScanner from './FileUpLoad'
import DocumentScanner from '../../matterDetail/FileUpLoad';
import * as $$ from '@/utils/utility';
import CaseResult from './CaseResult'
import ArcoUpload from '@/components/ArcoUpload';
import HandleRecord from '../../matterDetail/HandleRecord';
import TableView from '@/components/TableView';
@@ -99,6 +100,9 @@
  return $$.ax.request({ url: `caseFeedback/listFeedback?id=` + id, type: 'get', service: 'mediate' });
}
function updateFeedbackApi(data) {
  return $$.ax.request({ url: `caseFeedback/updateFeedback`, type: 'post', service: 'mediate', data });
}
@@ -251,31 +255,6 @@
  ];
  const toggleView = (id) => {
    setList(list.map(record => {
      if (record.id === id) {
        return {
          ...record,
          showView: !record.showView,
        };
      }
      return record;
    }));
  };
  const handleEdit = (id) => {
    console.log(id, 'handleEdit')
    let handleContent = list.find(item => item.id = id).handleContent
    setList(list.filter(record => record.id !== id));
    setFormView(!formView);
    formRef.current.setFieldsValue({
      handleContent: handleContent
    })
  }
  const [scannerVisible, setScannerVisible] = useState(false);
  const handleConfirm = () => {
@@ -320,6 +299,7 @@
    }
  }
  //获取理由id
  const getNewTimeId = async () => {
    const res = await getNewTimeIdApi()
    if (res.type) {
@@ -327,33 +307,60 @@
    }
  }
  //新增、编辑办理理由
  const saveFeedback = async (submitData) => {
    console.log(submitData, 'submitData1111')
    const res = await saveFeedbackApi({ ...submitData, id: id, caseId: '24083010062110001', caseTaskId: '12345' })
    if(submitData.id) {
      //编辑
      const res = await updateFeedbackApi({
        ...submitData,
      })
      if (res.type) {
        $$.infoSuccess({ content: '修改成功' });
        listFeedback('24083010062110001')
      }
    } else {
      const res = await saveFeedbackApi({
        ...submitData,
        caseId: '24083010062110001',
        id: id,
        caseTaskId: '',
      })
    if (res.type) {
      $$.infoSuccess({ content: '保存成功' });
        listFeedback('24083010062110001')
      }
    }
  }
  //获取办理记录接口
  const listFeedback = async (id) => {
    const res = await listFeedbackApi(id)
    if (res.type) {
      let data = res.data.caseFeedbackList
      setList(data)
    }
    console.log(list, 'listFeedbackApilistFeedbackApi')
  }
  //添加办理记录
  const addMark = () => {
    setFormView(!formView);
    getNewTimeId()
  }
  //保存信息
  const handleFinish = () => {
    console.log(formRef.current.getFields(), formRef, 'formRef.current.getFields()', 'formRef')
    let submitData = formRef.current.getFields()
    saveFeedback(submitData)
    setFormView(!formView);
  }
  //点击编辑办理事由
  const handleEdit = (record) => {
    setFormView(true)
    formRef.current.setFieldsValue({
      ...record
    })
  }
  const Supervising = () => {
@@ -457,59 +464,9 @@
              </Col>
              <Col span={24}>
                <div style={{ color: 'rgb(134, 144, 156)' }}>办理记录</div>
                {list?.length > 0 ?
                  <div>
                    {list?.map(record => (
                      <div key={record.id} className='container-bottom-left-record'>
                        <div className='container-bottom-left-record-top'>
                          {
                            record.showView ? (
                              <img src={down} alt='' style={{ width: '18px', marginRight: '6px' }} onClick={() => toggleView(record.id)} />
                            ) : (
                              <img src={fold} alt='' className='container-bottom-left-record-top-icon' onClick={() => toggleView(record.id)} />
                            )
                          }
                          <div>{`${record.createTime} ${record.handleUnitName}`}</div>
                          <div className={`container-bottom-left-record-top-${record.handleType === '2' ? 'remark' : 'hostOrg'}`}>{record.handleType === '2' ? '配合部门' : '承办部门'}</div>
                          <div><img src={edit} alt='' className='container-bottom-left-record-top-edit' onClick={() => handleEdit(record.id)} /></div>
                        </div>
                        <div className='container-bottom-left-record-bottom' style={{ display: record.showView ? 'block' : 'none' }}>
                          <table border="1" cellpadding="8" className='container-bottom-left-record-bottom-table'>
                            <tr>
                              <th bgcolor="#F7F8FA" className="table-title" width="120">操作人</th>
                              <td>{record.handleUnitName}</td>
                            </tr>
                            <tr>
                              <th bgcolor="#F7F8FA" className="table-title" width="120">办理意见</th>
                              <td>{record.handleContent}</td>
                            </tr>
                            <tr>
                              <th bgcolor="#F7F8FA" className="table-title" width="120">办理附件</th>
                              <td>{record.handleUnitName}</td>
                            </tr>
                          </table>
                        </div>
                      </div>
                    ))}
                  </div>
                  :
                  <Empty
                    icon={
                      <div
                        style={{
                          display: 'flex',
                          justifyContent: 'center',
                          marginBottom: '100px'
                        }}
                      >
                        <img src={empty} alt='' style={{ width: '160px', height: '160px' }} />
                      </div>
                    }
                    description='暂无数据'
                  />
                }
                {formView &&
                  <div className='Form'>
                <HandleRecord isReview={false} handleEdit={handleEdit} data={list} />
                {/* {formView && */}
                  <div className='Form' style={{display: formView ? '' : 'none'}}>
                    <Col span={24} style={{ marginBottom: '8px' }}>
                      <Space size='small'>
                        <div className='MediationInfo-subTitle' style={{ marginTop: '-9px' }}></div><h5>添加办理记录</h5>
@@ -571,11 +528,10 @@
                    </Col>
                    <Space size='middle'>
                      <Button type='primary' onClick={() => handleFinish()}>保存</Button>
                      <Button type='secondary'>取消添加</Button>
                      <Button type='secondary' onClick={() => { setFormView(!formView); }}>取消添加</Button>
                    </Space>
                  </div>
                }
                {/* } */}
              </Col>
            </Form>
            <Space style={{ marginTop: '38px', bottom: '4px' }}>
gz-customerSystem/src/views/register/index.less
@@ -316,14 +316,13 @@
        display: flex;
        flex-direction: row;
        column-gap: 8px;
        margin: 0px 8px 22px 16px;
        margin: 0px 8px 0 16px;
        &-left {
            flex: 3 1 0%;
            background-color: rgb(255, 255, 255);
            padding: 12px 0px 12px 16px;
            margin-bottom: -25px;
            &-record {
                border: 1px solid #D9D9D9;
@@ -337,6 +336,7 @@
                    align-items: center;
                    background-color: #FAFAFA;
                    border-radius: 8px;
                    position: relative;
                    &-icon {
@@ -348,8 +348,9 @@
                    &-edit {
                        position: absolute;
                        right: 25px;
                        top: 45px;
                        top: 15px;
                        width: 18px;
                        cursor: pointer;
                    }
                    &-remark {
gz-customerSystem/src/views/register/matterDetail/FileUpLoad.jsx
gz-customerSystem/src/views/register/matterDetail/HandleRecord.jsx
New file
@@ -0,0 +1,85 @@
import React, { useState, useRef, useEffect } from 'react';
import * as $$ from '@/utils/utility';
import { Form, Input, Tabs, Typography, Empty, Radio, Button, Modal } from '@arco-design/web-react';
import { register, fold, down, empty, link, edit } from '@/assets/images';
export default function HandleRecord(props) {
  const [formView, setFormView] = useState(false);
  const [list, setList] = useState([]);
  useEffect(() => {
    setList(props.data)
  }, [props.data])
  const toggleView = (id) => {
    setList(list.map(record => {
      if (record.id === id) {
        return {
          ...record,
          showView: !record.showView,
        };
      }
      return record;
    }));
  };
  const handleEdit = (id) => {
    props.handleEdit(id)
  }
  return (
    <div>
      {list?.length > 0 ?
        <div>
          {list?.map(record => (
            <div key={record.id} className='container-bottom-left-record'>
              <div className='container-bottom-left-record-top'>
                {
                  record.showView ? (
                    <img src={down} alt='' style={{ width: '18px', marginRight: '6px' }} onClick={() => toggleView(record.id)} />
                  ) : (
                    <img src={fold} alt='' className='container-bottom-left-record-top-icon' onClick={() => toggleView(record.id)} />
                  )
                }
                <div>{`${record.createTime} ${record.handleUnitName}`}</div>
                <div className={`container-bottom-left-record-top-${record.handleType === '2' ? 'remark' : 'hostOrg'}`}>{record.handleType === '2' ? '配合部门' : '承办部门'}</div>
                <div><img src={edit} alt='' className='container-bottom-left-record-top-edit' onClick={() => handleEdit(record)} /></div>
              </div>
              <div className='container-bottom-left-record-bottom' style={{ display: record.showView ? 'block' : 'none' }}>
                <table border="1" cellpadding="8" className='container-bottom-left-record-bottom-table'>
                  <tr>
                    <th bgcolor="#F7F8FA" className="table-title" width="120">操作人</th>
                    <td>{record.handleUnitName}</td>
                  </tr>
                  <tr>
                    <th bgcolor="#F7F8FA" className="table-title" width="120">办理意见</th>
                    <td>{record.handleContent}</td>
                  </tr>
                  <tr>
                    <th bgcolor="#F7F8FA" className="table-title" width="120">办理附件</th>
                    <td>{record.handleUnitName}</td>
                  </tr>
                </table>
              </div>
            </div>
          ))}
        </div>
        :
        <Empty
          icon={
            <div
              style={{
                display: 'flex',
                justifyContent: 'center',
                marginBottom: '100px'
              }}
            >
              <img src={empty} alt='' style={{ width: '160px', height: '160px' }} />
            </div>
          }
          description='暂无数据'
        />
      }
    </div>
  )
}
gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx
@@ -20,7 +20,7 @@
import MapView from './map';
import { scan } from '@/assets/images/icon';
import { EventLevelDrawer, MattersDetail } from './levelDetail';
import DocumentScanner from '../../handleFeedback/component/FileUpLoad';
import DocumentScanner from '../../matterDetail/FileUpLoad';
import ArcoUpload from '@/components/ArcoUpload';