forked from gzzfw/frontEnd/gzDyh

liyj
2024-08-30 a7cba2f05df12ab546ef1c20b63aad10ec0e7a5c
Merge branch 'master' of http://120.79.193.119:9090/r/gzzfw/frontEnd/gzDyh
1 files deleted
5 files added
1 files renamed
18 files modified
2316 ■■■■■ changed files
gz-customerSystem/public/locationSelect.js 11 ●●●● patch | view | raw | blame | history
gz-customerSystem/src/api/apiHandler.js 6 ●●●● patch | view | raw | blame | history
gz-customerSystem/src/api/appUrl.js 5 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/assets/images/feedback.png patch | view | raw | blame | history
gz-customerSystem/src/assets/images/index.js 28 ●●●● patch | view | raw | blame | history
gz-customerSystem/src/components/ProgressStep/VisitStep.jsx 208 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/components/ProgressStep/index.less 8 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/components/SelectObjModal/selectPerson.jsx 244 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/components/WantUserTag/Handling.jsx 33 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/components/WantUserTag/index.less 8 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/components/personCard/DetailDialog.jsx 380 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/components/personCard/KeyVisits.jsx patch | view | raw | blame | history
gz-customerSystem/src/components/personCard/index.jsx 228 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/utils/selectOption.js 46 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/index.less 18 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/visit/check.jsx 2 ●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/visit/component/MattersInfo.jsx 14 ●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/visit/component/agentDialog.jsx 135 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/visit/component/applyDialog.jsx 100 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/visit/component/detailDialog.jsx 328 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/visit/component/handle.jsx 147 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/visit/component/map.jsx 2 ●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx 254 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/visit/index.jsx 105 ●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/visit/preview.jsx 6 ●●●● patch | view | raw | blame | history
gz-customerSystem/public/locationSelect.js
@@ -660,6 +660,11 @@
                                    'value': '62893',
                                    'parentId': '36953',
                                },
                                {
                                    'label': '广州大学城',
                                    'value': '51091',
                                    'parentId': '36953',
                                },
                            ],
                        },
                        {
@@ -1051,12 +1056,6 @@
                                    'parentId': '50285',
                                },
                            ],
                        },
                        {
                            'label': '广州大学城',
                            'value': '51091',
                            'parentId': '1601',
                            'children': null,
                        },
                    ],
                },
gz-customerSystem/src/api/apiHandler.js
@@ -2,7 +2,7 @@
 * @Company: hugeInfo
 * @Author: ldh
 * @Date: 2022-02-16 11:28:12
 * @LastEditTime: 2024-08-27 11:18:41
 * @LastEditTime: 2024-08-29 14:25:03
 * @LastEditors: dminyi 1301963064@qq.com
 * @Version: 1.0.0
 * @Description: axios处理方法
@@ -57,8 +57,8 @@
    
    const url =
        value.service === 'sys'
            ? `${appUrl.fileUrl}/${appUrl[value.service] || ''}/api/v1/${value.url}`
            : `${appUrl.baseUrl}/${appUrl[value.service] || ''}/api/v1/${value.url}`;
            ? `${appUrl.fileUrl}/${appUrl[value.service] || ''}/api/web/${value.url}`
            : `${appUrl.baseUrl}/${appUrl[value.service] || ''}/api/web/${value.url}`;
    if (value.type === 'get') {
        return ax
gz-customerSystem/src/api/appUrl.js
@@ -10,11 +10,11 @@
export const debug = {
    // web服务
    // baseUrl: 'http://gz.hugeinfo.com.cn',
    baseUrl: 'http://192.168.3.108:9002',
    baseUrl: 'http://tj4jd4.natappfree.cc',
    // baseUrl: 'http://mdqgnh.natappfree.cc',
    // 附件服务
    fileUrl: 'http://192.168.3.108:9002',
    fileUrl: 'http://tj4jd4.natappfree.cc',
    // fileUrl: 'http://gz.hugeinfo.com.cn',
@@ -33,6 +33,7 @@
    oper: 'dyh-oper', // dyh-oper
    sys: 'dyh-sys', // dyh-sys
    disp: 'dyh-disp', //dyh-disp
    utils: 'dyh-utils'
};
// 正式版
gz-customerSystem/src/assets/images/feedback.png
gz-customerSystem/src/assets/images/index.js
@@ -36,18 +36,19 @@
import person from "./person.png";
import link from "./link.png";
import check from "./check.png";
import image from './image.png';
import applyMaterials from './applyMaterials.png';
import applyMaterials_active from './applyMaterials_active.png';
import evidenceMaterials from './evidenceMaterials.png';
import evidenceMaterials_active from './evidenceMaterials_active.png';
import closeIcon from './closeIcon.png';
import backgroundImage from './backgroundImage.jpg'
import logo1 from './logo1.png';
import register from './register.png';
import Matter from './matter.png';
import transfer from './transfer.png';
import empty from './empty.png';
import image from "./image.png";
import applyMaterials from "./applyMaterials.png";
import applyMaterials_active from "./applyMaterials_active.png";
import evidenceMaterials from "./evidenceMaterials.png";
import evidenceMaterials_active from "./evidenceMaterials_active.png";
import closeIcon from "./closeIcon.png";
import backgroundImage from "./backgroundImage.jpg";
import logo1 from "./logo1.png";
import register from "./register.png";
import Matter from "./matter.png";
import transfer from "./transfer.png";
import empty from "./empty.png";
import feedback from "./feedback.png";
export {
  ledger_1,
@@ -90,5 +91,6 @@
  register,
  Matter,
  transfer,
  empty
  empty,
  feedback,
};
gz-customerSystem/src/components/ProgressStep/VisitStep.jsx
New file
@@ -0,0 +1,208 @@
/*
 * @Author: dminyi 1301963064@qq.com
 * @Date: 2024-08-29 14:57:06
 * @LastEditors: dminyi 1301963064@qq.com
 * @LastEditTime: 2024-08-29 15:58:19
 * @FilePath: \gzDyh\gz-customerSystem\src\components\ProgressStep\VisitStep.jsx
 * @Description: 来访登记步骤条
 */
import React, { useEffect, useState } from 'react';
import { Tooltip, Space } from 'antd';
import Icon, { PaperClipOutlined, RollbackOutlined, EllipsisOutlined } from '@ant-design/icons';
import { feedback, ledger_8, ledger_7 } from '../../assets/images';
import NameCard from '../NameCard';
import * as $$ from '../../utils/utility';
import FilesDrawer from '../FilesDrawer';
import './index.less';
// 获取调度处理进度数据
function getDispProgressDataApi(caseId) {
  return $$.ax.request({ url: 'caseTask/transferRecord?caseId=' + caseId, type: 'get', service: 'mediate' });
}
// 获取调解处理进度数据
function getProgressDataApi(caseId) {
  return $$.ax.request({ url: 'caseTask/transferRecord?caseId=' + caseId, type: 'get', service: 'mediate' });
}
// 获取司法确认处理进度数据
function getJudicProgressDataApi(caseId) {
  return $$.ax.request({ url: 'judicTask/getTaskProcess?caseId=' + caseId, type: 'get', service: 'mediate' });
}
/**
 * caseId:'', // 案件id
 * pageFrom:'', // 判断那个页面展示
 */
const ProgressStep = ({ caseId, pageFrom }) => {
  const [data, setData] = useState([]);
  // 提交调解  案件调度  案件签收  纠纷调解 指派网格员
  // 已处理列表第一个元素
  const dom1 = (x) => (
    <div>
      <div className="myStep-item-p">
        <span>{x.handlerUserName || '-'}</span>
        {/* <span className={`public-nameCard-tag public-nameCard-tag-grey`}>
          {x.canalName || '-'}
        </span> */}
      </div>
      <div className="myStep-item-p" style={{ color: 'rgba(0,0,0,0.50)' }}>
        <span>操作人:</span>
        <span>{x.operationName}</span>
      </div>
      <div className="myStep-item-p" style={{ color: 'rgba(0,0,0,0.50)' }}>
        <span>经办时间:</span>
        <span>{$$.timeFormat(x.finishTime)}</span>
      </div>
    </div>
  );
  // 已处理列表后面 元素
  const dom2 = (x) => (
    <div>
      <div className="myStep-item-p">
        <span>{x.handlerUserName || '-'}</span>
      </div>
      <div className="myStep-item-p" style={{ color: 'rgba(0,0,0,0.50)' }}>
        <span>操作人:</span>
        <span>{x.operationName}</span>
      </div>
      <div className="myStep-item-p" style={{ color: 'rgba(0,0,0,0.50)' }}>
        <span>操作时间:</span>
        <span>{$$.timeFormat(x.finishTime)}</span>
      </div>
      {
        x.handleContent &&
        <div className='myStep-item-p-yy' style={{width:'200px'}}>
          <span className='myStep-item-p-yy-l'>
            {x.handleResult == '2' ?
              <span>退回<Tooltip placement="top" title={x.handleContent || ''}><span>{`(${x.handleContent})` || '-'}</span></Tooltip></span>
              : x.taskNode == 'F22_00019-3' && x.handleResult == '1' ?
                // 22_00025-1:调解成功,22_00025-2:调解不成功
                <span>调解结果:<Tooltip placement="top" title={x.mediResult == '22_00025-1' ? '调解成功' : x.mediResult == '22_00025-2' ? '调解不成功' : '-'}><span>{`${x.mediResult == '22_00025-1' ? '调解成功' : x.mediResult == '22_00025-2' ? '调解不成功' : '-'}` || '-'}</span></Tooltip></span>
                : <Tooltip placement="top" title={x.handleContent || ''}><span>{x.handleContent || '-'}</span></Tooltip>}
          </span>
          {
            x.fileInfoList?.length > 0 &&
            <div style={{ marginTop: '4px' }}>
              <FilesDrawer name={<>
                <PaperClipOutlined style={{ marginRight: '4px' }} />
                <span>{x.taskNode == 'F22_00019-3' && x.handleResult == '1' ? '调解协议书' : '处理附件'}</span>
              </>} filesData={x.fileInfoList} title="经办附件" />
            </div>
          }
        </div>
      }
    </div>
  );
  // 办理中
  const dom3 = (x) => (
    <div>
      <div className="myStep-item-p">
        <span style={{ color: 'rgba(0,0,0,0.50)' }}>办理中</span>
      </div>
      <div className="myStep-item-p">
        <span>{x.handlerUserName}</span>
      </div>
    </div>
  );
  const fakeData = [
    {
      handlerUserName: '天河区棠下街综治中心',
      canalName: '来访登记',
      finishTime: new Date().getTime() - 24 * 60 * 60 * 1000, // 一天前的时间
      handleResult: '1',
      status: '2',
      taskNodeName: '来访登记',
      mediResult: '22_00025-1',
      handleContent: '调解成功,双方达成一致意见。',
      operationName: '李晓明'
    },
    {
      handlerUserName: '天河区棠下街综治中心',
      canalName: '事件流转',
      finishTime: new Date().getTime() - 12 * 60 * 60 * 1000, // 半天前的时间
      handleResult: '1',
      status: '2',
      taskNodeName: '案件调度',
      mediResult: '22_00025-1',
      handleContent: '自行受理',
      operationName: '李晓明'
    },
    {
      handlerUserName: '天河区棠下街综治中心',
      canalName: '办理反馈',
      finishTime: new Date().getTime() - 6 * 60 * 60 * 1000, // 6小时前的时间
      handleResult: '2',
      status: '3',
      taskNodeName: '案件签收',
      mediResult: '22_00025-1',
      handleContent: '案件已被签收,准备开始调解。',
      operationName: '李晓明'
    },
  ];
  useEffect(() => {
    if (pageFrom === 'dispatchRecord') {
      setData(fakeData || [])
    }
  }, [pageFrom]);
  function splitByLine(str, len = 10) {
    let strLen = str.length,
      num = 0,
      multiple = Math.floor(strLen / len),
      arrStr = str.split(''),
      space = strLen % len > 0 ? multiple + 1 : multiple
    for (let i = 1; i <= space; i++) {
      arrStr.splice((len * i + num), 0, '\n')
      num++
    }
    return arrStr.join('')
  }
  return (
    <>
      {data.length !== 0
        ? data.map((x, t) => {
          return (
            <div key={t + 1}>
              <div className="myStep-item">
                {t === data.length - 1 ? null : <div className={`${!x.handleContent ? 'myStep-item-divider' : x.fileInfoList?.length > 0 ? 'myStep-item-divider2' : "myStep-item-divider1"} ${x.status === '2' && 'myStep-item-divider-success'}`} />}
                <div className={`myStep-item-icon1 myStep-item-${x.status === '2' ? 'success1' : 'noStarted1'}`}>
                  <div className="myStep-item-title">{splitByLine(x.taskNodeName || '', 2)}</div>
                  <img className='myStep-item-img' src={x.status === '1' ? ledger_8 : (x.handleResult === '2' ? feedback : ledger_7)} alt="" />
                  {/* <Icon className='myStep-item-img' component={x.handleResult === '2' ? RollbackOutlined : CheckOutlined} /> */}
                </div>
                <div className="myStep-item-right">
                  {/* {dom1(x || {})} */}
                  {
                    t === 0 && dom1(x || {})
                  }
                  {
                    t !== 0 && <>
                      {
                        x.status === '2' ? dom2(x || {}) : dom3(x || {})
                      }
                    </>
                  }
                  {/* <div className="myStep-item-title">{x.taskNodeName}</div> */}
                  {/* {
                    <StepContent x={x || {}} t={t || 0} />} */}
                </div>
              </div>
            </div>
          );
        })
        : <div style={{ padding: '100px 0' }}>{$$.MyEmpty()}</div>}
    </>
  );
};
export default ProgressStep;
gz-customerSystem/src/components/ProgressStep/index.less
@@ -28,6 +28,14 @@
            }
        }
        &-noStarted1 {
            background-color: rgba(185,99,211,1);
            &::after {
                border-color: rgba(185,99,211,1);
            }
        }
        &-icon {
            float: left;
            margin-right: 8px;
gz-customerSystem/src/components/SelectObjModal/selectPerson.jsx
New file
@@ -0,0 +1,244 @@
/*
 * @Author: dminyi 1301963064@qq.com
 * @Date: 2024-08-29 17:41:09
 * @LastEditors: dminyi 1301963064@qq.com
 * @LastEditTime: 2024-08-29 20:03:51
 * @FilePath: \gzDyh\gz-customerSystem\src\components\SelectObjModal\selectPerson.jsx
 * @Description: 选择经办人
 */
import React, { useState, useEffect, useMemo } from 'react';
import PropTypes from 'prop-types';
import { Button, Space, Input, Tree } from 'antd';
import { CloseOutlined } from '@ant-design/icons';
import './index.less';
import MyModal from '../MyModal';
import * as $$ from '../../utils/utility';
const { Search } = Input;
// 获取人员,组织,部门数据
function getDataApi(type, searchData) {
    const url = type === 'person' ? 'ctUser/userChoose' : type === 'unit' ? 'ctUser/unitList' : 'ctUser/deptList';
    return $$.ax.request({ url, type: 'get', data: searchData, service: 'cust' });
}
/**
 * visible, // 传入参数控制modal显示
 * checkKeys, // 选中,数据格式 [{value:'',label:''}]
 * type, // 'person': 选择人员 'unit': 选择组织 'dept': 选择部门
 * isCheckbox, // 是否多选
 * searchData, // 搜索条件
 * onClose, // 关闭
 * onOk, // 点击确定的回调
 */
const SelectObjModal = ({ visible = false, checkKeys = [], type = 'person', isCheckbox = false, searchData = {}, onClose, onOk }) => {
    const [data, setData] = useState([]);
    const [checkedKeys, setCheckedKeys] = useState({ keys: [], items: [] });
    const [expandedKeys, setExpandedKeys] = useState([]);
    const [searchValue, setSearchValue] = useState('');
    const [autoExpandParent, setAutoExpandParent] = useState(true);
    const [dataList, setDataList] = useState([]);
    // tree复选框选择
    function handleCheck(checkedKeys, e) {
        if (!isCheckbox && checkedKeys.checked.length > 1) {
            $$.info({ type: 'warning', content: '当前选择只可单选' });
            return;
        }
        let checkedNodes = e.checkedNodes;
        checkedNodes.forEach((x) => delete x.children);
        setCheckedKeys({ keys: checkedKeys.checked, items: checkedNodes });
    }
    // 删除选项
    function handleDelete(t) {
        checkedKeys.keys.splice(t, 1);
        checkedKeys.items.splice(t, 1);
        setCheckedKeys({ ...checkedKeys });
    }
    // 搜索
    useEffect(() => {
        if (!visible) return;
        const arr = [];
        const generateList = (data) => {
            for (let i = 0; i < data.length; i++) {
                const node = data[i];
                const { value, label } = node;
                arr.push({ value, label });
                if (node.children) {
                    generateList(node.children);
                }
            }
        };
        generateList(data);
        setDataList(arr);
        handleSearch('', arr);
    }, [data]);
    const getParentKey = (key, tree) => {
        let parentKey;
        for (let i = 0; i < tree.length; i++) {
            const node = tree[i];
            if (node.children) {
                if (node.children.some((item) => item.value === key)) {
                    parentKey = node.value;
                } else if (getParentKey(key, node.children)) {
                    parentKey = getParentKey(key, node.children);
                }
            }
        }
        return parentKey;
    };
    function handleSearch(value, dataList) {
    console.log('value, dataList', value, dataList);
        const newExpandedKeys = dataList
            .map((item) => {
                if (item.label.indexOf(value) > -1) {
                    return getParentKey(item.value, data);
                }
                return null;
            })
            .filter((item, i, self) => item && self.indexOf(item) === i);
      console.log('newExpandedKeys',newExpandedKeys);
        setExpandedKeys(newExpandedKeys);
        setSearchValue(value);
        setAutoExpandParent(true);
    }
    const treeData = useMemo(() => {
        const loop = (data) =>
            data.map((item) => {
                const strTitle = item.label;
                const index = strTitle.indexOf(searchValue);
                const beforeStr = strTitle.substring(0, index);
                const afterStr = strTitle.slice(index + searchValue.length);
                const label =
                    index > -1 ? (
                        <span>
                            {beforeStr}
                            <span className="selectObjModal-searchValue">{searchValue}</span>
                            {afterStr}
                        </span>
                    ) : (
                        <span>{strTitle}</span>
                    );
                if (item.children) {
                    return {
                        label,
                        name: strTitle,
                        value: item.value,
                        checkable: item.checkable,
                        children: loop(item.children),
                    };
                }
                return {
                    label,
                    name: strTitle,
                    checkable: item.checkable,
                    value: item.value,
                };
            });
        return loop(data);
    }, [searchValue, data]);
  // 默认调解员查询'22_00024-4'
    const searchRole = type === 'person' ? { roleCode: '22_00024-4' } : {};
    useEffect(() => {
        if (!visible) return;
        // 获取数据
        async function getData() {
            global.setSpinning(true);
            const res = await getDataApi(type, { ...searchRole, ...searchData });
            global.setSpinning(false);
            if (res.type) {
                setData(res.data || []);
            }
        }
    console.log(checkKeys,'checkKeys')
    console.log(checkedKeys,'checkedKeys')
        if (checkKeys.length !== 0) {
            let keys = [];
            checkKeys.forEach((x) => keys.push(x.value));
            setCheckedKeys({ keys, items: checkKeys });
        } else {
            setCheckedKeys({ keys: [], items: [] });
        }
        getData();
    }, [type, visible]);
    const nameStr = type === 'person' ? '人员' : type === 'unit' ? '组织' : '部门';
    return (
        <MyModal visible={!!visible} title={`选择${nameStr}`} width={560} footer={false} onCancel={onClose}>
            <div className="selectObjModal-main">
                <div className="selectObjModal-left">
                    <div className="selectObjModal-left-search">
                        <Search placeholder={`查询${nameStr}名称`} onChange={(e) => handleSearch(e.target.value, dataList)} />
                    </div>
                    <div className="selectObjModal-left-main">
                        {data.length > 0 ? (
                            <Tree
                                checkable
                                checkStrictly
                                defaultExpandAll
                                onExpand={(newExpandedKeys) => {
                                    setExpandedKeys(newExpandedKeys);
                                    setAutoExpandParent(false);
                                }}
                                expandedKeys={expandedKeys}
                                autoExpandParent={autoExpandParent}
                                selectable={false}
                                onCheck={(checkedKeys, e) => handleCheck(checkedKeys, e)}
                                checkedKeys={checkedKeys.keys}
                                treeData={treeData}
                                fieldNames={{ title: 'label', key: 'value' }}
                            />
                        ) : (
                            $$.MyEmpty()
                        )}
                    </div>
                </div>
                <div className="selectObjModal-right">
                    {checkedKeys.items.map((x, t) => (
                        <div className="selectObjModal-right-item" key={x.value}>
                            <span className="selectObjModal-right-item-name">{x.label}</span>
                            <CloseOutlined onClick={() => handleDelete(t)} className="selectObjModal-right-item-icon" />
                        </div>
                    ))}
                    {checkedKeys.items.length === 0 && <div className="selectObjModal-none">{$$.MyEmpty({ description: '尚未选择' + nameStr })}</div>}
                </div>
            </div>
            <div className="selectObjModal-footer">
                <div>已选中:{checkedKeys.keys.length}人</div>
                <Space size="middle">
                    <Button onClick={onClose}>取消</Button>
                    <Button type="primary" onClick={() => onOk && onOk(checkedKeys)}>
                        确定
                    </Button>
                </Space>
            </div>
        </MyModal>
    );
};
SelectObjModal.propTypes = {
    visible: PropTypes.any,
    checkKeys: PropTypes.array,
    type: PropTypes.string,
    isCheckbox: PropTypes.bool,
    searchData: PropTypes.object,
    onClose: PropTypes.func,
    onOk: PropTypes.func,
};
export default SelectObjModal;
gz-customerSystem/src/components/WantUserTag/Handling.jsx
New file
@@ -0,0 +1,33 @@
/*
 * @Author: dminyi 1301963064@qq.com
 * @Date: 2024-08-29 20:43:25
 * @LastEditors: dminyi 1301963064@qq.com
 * @LastEditTime: 2024-08-29 20:55:24
 * @FilePath: \gzDyh\gz-customerSystem\src\components\WantUserTag\Handling.jsx
 * @Description: 经办人
 */
import React from 'react';
import PropTypes from 'prop-types';
import { Typography } from 'antd';
import { CloseOutlined } from '@ant-design/icons';
import './index.less';
const WantUserTag = ({ name, value, onClose }) => {
  return (
    <div className="wantUserTag">
      <div className="wantUserTag-wantHandleUser">
        <div className="wantUserTag-wantUser-right">{name}</div>
        <Typography.Link className="wantUserTag-wantHandleUser-close" onClick={() => onClose(value)}>
          <CloseOutlined style={{width:'11px',height:'13px'}}/>
        </Typography.Link>
      </div>
    </div>
  );
};
WantUserTag.propTypes = {
  name: PropTypes.string,
  onClose: PropTypes.func,
};
export default WantUserTag;
gz-customerSystem/src/components/WantUserTag/index.less
@@ -30,6 +30,14 @@
        }
    }
    &-wantHandleUser{
        display:flex;
        padding: 5px 8px;
        border: 1px solid rgba(229,230,235,1);
    }
    &-green {
        background: linear-gradient(135deg, #05aeae, rgba(5, 174, 174, 0.85) 100%);
    }
gz-customerSystem/src/components/personCard/DetailDialog.jsx
New file
@@ -0,0 +1,380 @@
import React, { useEffect, useState } from 'react'
import KeyVisits from "./KeyVisits";
import { link } from '@/assets/images'
export default function DetailDialog(props) {
  const nuturalList = [
    [
      {
        label: '姓名',
        perClass: '',
        value: '',
        isName: true,//判断是否是姓名标签
        field: 'trueName',
      },
      {
        label: '联系方式',
        value: '',
        field: 'mobile',
      },
    ],
    [
      {
        label: '证件类型',
        value: '',
        field: 'certiTypeName',
      },
      {
        label: '证件号码',
        value: '',
        field: 'certiNo',
      },
    ],
    [
      {
        label: '联系地址',
        value: '',
        field: 'addr',
      },
      {
        label: '户籍地址',
        value: '',
        field: 'placeAddr',
      },
    ],
    [
      {
        label: '工作单位',
        value: '',
        field: 'workUnit',
      },
      {
        label: '民族',
        value: '',
        field: 'nationName',
      },
    ],
    [
      {
        label: '性别',
        value: '',
        field: 'sexName',
      },
      {
        label: '是否有个人极端倾向',
        value: '',
        field: 'extreme',
      },
    ],
    [
      {
        label: '身份证明材料',
        value: <a href="your-link-here.html" target="_blank">
          <img src={link} alt="" className="title-file" />李晓明身份证明材料.pdf
        </a>,
        isFile: true
      },
    ],
  ]
  const legalList = [
    [
      {
        label: '企业名称',
        perClass: '',
        value: '',
        isName: true,//判断是否是姓名标签
        field: 'trueName',
      },
      {
        label: '联系方式',
        value: '',
        field: 'mobile',
      },
    ],
    [
      {
        label: '企业所在地',
        value: '',
        field: 'addr',
      },
      {
        label: '统一社会信用代码',
        value: '',
        field: 'orgaCode',
      },
    ],
    [
      {
        label: '法定代表人',
        value: '',
        field: 'deputy',
      },
      {
        label: '企业类型',
        value: '',
        field: 'orgaTypeName',
      },
    ],
    [
      {
        label: '住所',
        value: '',
        field: 'placeAddr',
      },
    ],
    [
      {
        label: '登记企业材料',
        value: <a href="your-link-here.html" target="_blank">
          <img src={link} alt="" className="title-file" />广东好又多餐饮有限公司营业执照.pdf
        </a>,
        isFile: true
      },
      {
        label: '法定代表人身份证明材料',
        value: <a href="your-link-here.html" target="_blank">
          <img src={link} alt="" className="title-file" />江照月个人身份.pdf
        </a>,
        isFile: true
      },
    ],
  ]
  const organizationList = [
    [
      {
        label: '机构名称',
        perClass: '',
        value: '',
        isName: true,//判断是否是姓名标签
        field: 'trueName',
      },
      {
        label: '联系方式',
        value: '',
        field: 'mobile',
      },
    ],
    [
      {
        label: '机构所在地',
        value: '',
        field: 'addr',
      },
      {
        label: '机构组织代码',
        value: '',
        field: 'orgaCode',
      },
    ],
    [
      {
        label: '机构代表人',
        value: '',
        field: 'deputy',
      },
      {
        label: '机构类型',
        value: '',
        field: 'orgaTypeName',
      },
    ],
    [
      {
        label: '住所',
        value: '',
        field: 'placeAddr',
      },
    ],
    [
      {
        label: '机构登记材料',
        value: <a href="your-link-here.html" target="_blank">
          <img src={link} alt="" className="title-file" />广东好又多餐饮有限公司营业执照.pdf
        </a>,
        isFile: true
      },
      {
        label: '机构代表人身份证明材料',
        value: <a href="your-link-here.html" target="_blank">
          <img src={link} alt="" className="title-file" />江照月个人身份.pdf
        </a>,
        isFile: true
      },
    ],
  ]
  const agentList = [
    [
      {
        label: '姓名',
        perClass: '',
        value: '',
        isName: true,//判断是否是姓名标签
        field: 'trueName',
      },
      {
        label: '联系方式',
        value: '',
        field: 'mobile',
      },
    ],
    [
      {
        label: '证件类型',
        value: '',
        field: 'certiTypeName',
      },
      {
        label: '证件号码',
        value: '',
        field: 'certiNo',
      },
    ],
    [
      {
        label: '联系地址',
        value: '',
        field: 'addr',
      },
      {
        label: '户籍地址',
        value: '',
        field: 'placeAddr',
      },
    ],
    [
      {
        label: '工作单位',
        value: '',
        field: 'workUnit',
      },
      {
        label: '民族',
        value: '',
        field: 'nationName',
      },
    ],
    [
      {
        label: '性别',
        value: '',
        field: 'sexName',
      },
      {
        label: '是否有个人极端倾向',
        value: '',
        field: 'extreme',
      },
    ],
    [
      {
        label: '委托关系',
        value: '',
        field: 'agentRelateName',
      },
      {
        label: '委托类型',
        value: '',
        field: 'agentTypeName',
      },
    ],
    [
      {
        label: '代理对象',
        value: '',
        field: 'personList',
      },
    ],
    [
      {
        label: '身份证明材料',
        value: <a href="your-link-here.html" target="_blank">
          <img src={link} alt="" className="title-file" />广东好又多餐饮有限公司营业执照.pdf
        </a>,
        isFile: true,
      },
      {
        label: '代理人授权委托书',
        value: <a href="your-link-here.html" target="_blank">
          <img src={link} alt="" className="title-file" />江照月个人身份.pdf
        </a>,
        isFile: true,
      },
    ],
  ]
  const [tableList, setTableList] = useState([])
  useEffect(() => {
    console.log(props.editData);
    const data = props.editData
    let newList
    let mapList = []
    if (data.perClass === "09_01001-1") {
      //自然人
      mapList = nuturalList
    }
    if (data.perClass === "09_01001-2") {
      //法人组织
      mapList = legalList
    }
    if (data.perClass === "09_01001-3") {
      //非法人组织
      mapList = organizationList
    }
    if (data.perType === "24_00006-1" || data.perType === "24_00006-1") {
      //代理人
      mapList = agentList
    }
    newList = mapList.map(item => {
      return item.map(res => {
        if (res.isFile) {
          return res
        }
        if (res.isName) {
          return {
            ...res,
            value: data[res.field],
            perClass: data.perClassName || data.perTypeName
          }
        } else {
          return {
            ...res,
            value: res.field === 'personList' ? data[res.field].join(',') : data[res.field]
          }
        }
      })
    })
    setTableList(newList)
  }, [])
  return (
    <div style={{ maxHeight: '590px', overflowY: 'scroll' }}>
      <table border="1" align="center" cellpadding="8" className="table" style={{ marginBottom: '20px' }}>
        {
          tableList?.map((item, index) => {
            return <tr key={index}>
              {
                item?.map(res => {
                  return <>
                    <th bgcolor="#F7F8FA" className="table-title" width='120'>{res.label}</th>
                    <td width={380}>
                      <div style={{ display: 'flex', minHeight: '22px' }}>
                        <div>{res.value}</div>
                        {res.isName && <div className="title-personRemark">{res.perClass}</div>}
                      </div>
                    </td>
                  </>
                })
              }
            </tr>
          })
        }
      </table>
      {/* 重复来访重点人员 */}
      <div style={{ width: 'calc(100% - 9px)', background: '#f2f3f5', marginBottom: '20px', padding: '12px' }}>
        <KeyVisits />
      </div>
    </div>
  )
}
gz-customerSystem/src/components/personCard/KeyVisits.jsx
gz-customerSystem/src/components/personCard/index.jsx
@@ -6,115 +6,153 @@
 * @FilePath: \gzDyh\gz-customerSystem\src\components\personCard\index.jsx
 * @Description: 来访登记当事人卡片
 */
import React from 'react';
import React, { Fragment, useState } from 'react';
import PropTypes from 'prop-types';
import { Typography, Row, Col, Space, Tooltip } from 'antd';
import { Modal } from '@arco-design/web-react';
import { del, add } from '../../assets/images';
import DetailDialog from "./DetailDialog";
const { Link, Text } = Typography;
/**
 * isCheck, // 是否无操作
 * data, // 当事人数据
 * handleCheckParty, // 点击查看详情
 * handleDeleteParty, // 删除当事人
 */
const PersonCard = ({ isCheck, data, handleCheckParty, handleDeleteParty, handleAdd, handleEdit }) => {
    let isAgent = false
    let isAgentFor = false
    const typeList = data.map(item => {
        return item.partyType
    })//获取有多少申请人和被申请人
    if (typeList.indexOf(0) != -1) {
        isAgent = true
    }
    if (typeList.indexOf(1) != -1) {
        isAgentFor = true
    }
    return (
        <Row gutter={[24, 16]}>
            {data.map((x, t) => (
                <Col span={7} key={t}>
                    <div className="public-personCard" style={{ cursor: 'pointer' }}>
                        <div
                            className={`public-personCard-card public-personCard-card-${(x.partyType === 0 || x.partyType === 2) ? 'blue' : 'orange'}`}
                            onClick={() => handleCheckParty(x)}
                        >
                            {x.trueName.substr(0, 1)}
                            <div className="public-personCard-card-check">查看</div>
                            <img
                                src={del}
                                alt=''
                                style={{ width: '16px', height: '16px', position: 'absolute', top: '-8px', left: '56px' }}
                                onClick={(event) => { handleDeleteParty(event, x) }}
                            />
                        </div>
                        <div className="public-personCard-content">
                            <div className="public-personCard-title">
                                <Text style={{ maxWidth: '80%', paddingRight: '8px' }} ellipsis={{ tooltip: x.trueName }}>
                                    {x.trueName}
                                </Text>
                                <Text onClick={() => { handleEdit(x) }} ellipsis={{ tooltip: x.perClassName }} className={`public-personCard-tag public-personCard-tag-${(x.partyType === 0 || x.partyType === 2) ? 'blue' : 'orange'}`}>
                                    {x.perClassName}
                                </Text>
                            </div>
                            {
                                (x.perClass === '09_01001-1' || !x.perClass) &&
                                <>
                                    <div>证件号码:{x.mobile}</div>
                                    <div>联系方式:{x.personNumber}</div>
                                </>
                            }
                            {
                                x.perClass === '09_01001-2' &&
                                <>
                                    <div>统一社会信用代码:{x.mobile}</div>
                                    <div>法定代表人:{x.companyName}</div>
                                </>
                            }
                            {
                                x.perClass === '09_01001-3' &&
                                <>
                                    <div>组织机构代码:{x.mobile}</div>
                                    <div>机构代表人:{x.companyName}</div>
                                </>
                            }
                            <Space style={{ display: 'flex', flexWrap: 'wrap' }}>
                                {x.remark?.map((item, index) => (
                                    <div key={index} style={{ lineHeight: '22px', padding: '0px 8px', backgroundColor: `${item.color}`, width: 'fit-content', borderRadius: '4px', marginTop: '4px', color: '#fff' }}>{item.label}</div>
                                ))}
                            </Space>
                        </div>
                    </div>
                </Col>
            ))}
            <Col span={3}>
                <div className="dataSync-addBtn">
                    <Tooltip
                        title={(<Space direction='vertical '>
                            <div className="dataSync-btnApply" style={{ backgroundColor: '#1A6FB8' }} onClick={() => { handleAdd(0) }}>申请方当事人</div>
                            {isAgent && <div className="dataSync-btnApply" style={{ backgroundColor: '#3491FA' }} onClick={() => { handleAdd(2) }}>申请方代理人</div>}
                            <div className="dataSync-btnApply" style={{ backgroundColor: '#EF6C24' }} onClick={() => { handleAdd(1) }}>被申请方当事人</div>
                            {isAgentFor && <div className="dataSync-btnApply" style={{ backgroundColor: '#FA8C16' }} onClick={() => { handleAdd(3) }}>被申请方代理人</div>}
                        </Space>)}
                        placement={data.length !== 0 && data.length % 3 === 0 ? 'left' : "right"}
                        color='#ffff'
                        overlayStyle={{}}
                    >
                        <div style={{ backgroundColor: '#f2f3f5', borderRadius: '50%', width: '64px', height: '64px' }}>
                            <img src={add} alt="添加" style={{ width: '32px', margin: '16px' }} />
                        </div>
                    </Tooltip>
const PersonCard = ({ isCheck, data, handleDeleteParty, handleAdd, handleEdit }) => {
  const [editData, setEditData] = useState(null);
  const [detailVisabled, setDetailVisabled] = useState(false);//查看信息弹窗控制
  const [dialogType, setDialogType] = useState(0);//添加当事人的类型
  const peopleMap = {
    '15_020008-1': '申请方',
    '15_020008-2': '被申请方',
    '24_00006-1': '申请方代理人',
    '24_00006-2': '被申请方代理人'
  }
  let isAgent = false
  let isAgentFor = false
  const typeList = data.map(item => {
    return item.perType
  })//获取有多少申请人和被申请人
  if (typeList.indexOf('15_020008-1') != -1) {
    isAgent = true
  }
  if (typeList.indexOf('15_020008-2') != -1) {
    isAgentFor = true
  }
  const handleCheckParty = (value) => {
    setDialogType(value.perType)
    setEditData(value)
    setDetailVisabled(true)
  }
  return (
    <Fragment>
      <Row gutter={[24, 16]}>
        {data.map((x, t) => (
          <Col span={7} key={t}>
            <div className="public-personCard" style={{ cursor: 'pointer' }}>
              <div
                className={`public-personCard-card public-personCard-card-${(x.perType === '15_020008-1' || x.perType === '24_00006-1') ? 'blue' : 'orange'}`}
                onClick={() => handleCheckParty(x)}
              >
                {x.trueName.substr(0, 1)}
                <div className="public-personCard-card-check">查看</div>
                {isCheck && <img
                  src={del}
                  alt=''
                  style={{ width: '16px', height: '16px', position: 'absolute', top: '-8px', left: '56px' }}
                  onClick={(event) => { handleDeleteParty(event, x) }}
                />}
              </div>
              <div className="public-personCard-content">
                <div className="public-personCard-title">
                  <Text style={{ maxWidth: '80%', paddingRight: '8px' }} ellipsis={{ tooltip: x.trueName }}>
                    {x.trueName}
                  </Text>
                  <Text onClick={() => { handleEdit(x) }} ellipsis={{ tooltip: x.perTypeName }} className={`public-personCard-tag public-personCard-tag-${(x.perType === '15_020008-1' || x.perType === '24_00006-1') ? 'blue' : 'orange'}`}>
                    {x.perTypeName}
                  </Text>
                </div>
            </Col>
        </Row>
    );
                {
                  (x.perClass === '09_01001-1' || !x.perClass) &&
                  <>
                    <div>证件号码:{x.certiNo}</div>
                    <div>联系方式:{x.mobile}</div>
                  </>
                }
                {
                  x.perClass === '09_01001-2' &&
                  <>
                    <div>统一社会信用代码:{x.orgaCode}</div>
                    <div>法定代表人:{x.deputy}</div>
                  </>
                }
                {
                  x.perClass === '09_01001-3' &&
                  <>
                    <div>组织机构代码:{x.orgaCode}</div>
                    <div>机构代表人:{x.deputy}</div>
                  </>
                }
                <Space style={{ display: 'flex', flexWrap: 'wrap' }}>
                  {x.remark?.map((item, index) => (
                    <div key={index} style={{ lineHeight: '22px', padding: '0px 8px', backgroundColor: `${item.color}`, width: 'fit-content', borderRadius: '4px', marginTop: '4px', color: '#fff' }}>{item.label}</div>
                  ))}
                </Space>
              </div>
            </div>
          </Col>
        ))}
        {isCheck &&
          <Col span={3}>
            <div className="dataSync-addBtn">
              <Tooltip
                title={(<Space direction='vertical '>
                  <div className="dataSync-btnApply" style={{ backgroundColor: '#1A6FB8' }} onClick={() => { handleAdd('15_020008-1') }}>申请方当事人</div>
                  {isAgent && <div className="dataSync-btnApply" style={{ backgroundColor: '#3491FA' }} onClick={() => { handleAdd('24_00006-1') }}>申请方代理人</div>}
                  <div className="dataSync-btnApply" style={{ backgroundColor: '#EF6C24' }} onClick={() => { handleAdd('15_020008-2') }}>被申请方当事人</div>
                  {isAgentFor && <div className="dataSync-btnApply" style={{ backgroundColor: '#FA8C16' }} onClick={() => { handleAdd('24_00006-2') }}>被申请方代理人</div>}
                </Space>)}
                placement={data.length !== 0 && data.length % 3 === 0 ? 'left' : "right"}
                color='#ffff'
                overlayStyle={{}}
              >
                <div style={{ backgroundColor: '#f2f3f5', borderRadius: '50%', width: '64px', height: '64px' }}>
                  <img src={add} alt="添加" style={{ width: '32px', margin: '16px' }} />
                </div>
              </Tooltip>
            </div>
          </Col>
        }
      </Row>
      <Modal
        title={'查看' + peopleMap[dialogType]}
        visible={detailVisabled}
        onOk={() => setDetailVisabled(false)}
        onCancel={() => {
          setDetailVisabled(false)
          setEditData(null)
        }}
        autoFocus={false}
        focusLock={true}
        footer={null}
        unmountOnExit={true}
        maskClosable={false}
      >
        <DetailDialog editData={editData} />
      </Modal>
    </Fragment>
  );
};
PersonCard.propTypes = {
    isCheck: PropTypes.bool,
    data: PropTypes.array,
    handleCheckParty: PropTypes.func,
    handleDeleteParty: PropTypes.func,
  isCheck: PropTypes.bool,
  data: PropTypes.array,
  handleCheckParty: PropTypes.func,
  handleDeleteParty: PropTypes.func,
};
export default PersonCard;
gz-customerSystem/src/utils/selectOption.js
@@ -516,6 +516,35 @@
    label: '不同意' 
  },
];
// 企业类型
const enterpriseType = [
  {
    value: '24_00008-1',
    label: '餐饮服务',
  },
];
// 机构类型
const orgaType = [
  {
    value: '24_00009-1',
    label: '志愿者服务',
  },
];
//事项等级
const caseLevelList = [
  {
    value: 1,
    label: '一级'
  },
  {
    value: 2,
    label: '二级'
  },
  {
    value: 3,
    label: '三级'
  },
]
// VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV 暂时用不到,防止以后会用的,先保留 VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
@@ -778,20 +807,6 @@
  {
    value: '24_00007-2',
    label: '监护人',
  },
];
// 企业类型
const enterpriseType = [
  {
    value: '24_00008-1',
    label: '餐饮服务',
  },
];
// 机构类型
const orgaType = [
  {
    value: '24_00009-1',
    label: '志愿者服务',
  },
];
@@ -1082,6 +1097,8 @@
  },
];
const obj = {
  caseCanal,
  visitWay,
@@ -1102,6 +1119,7 @@
  agentRelate,
  enterpriseType,
  orgaType,
  caseLevelList,
  // VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV 暂时用不到,防止以后会用的,先保留 VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
gz-customerSystem/src/views/register/index.less
@@ -131,14 +131,14 @@
        margin-bottom: 8px;
        padding-left: 8px;
    }
}
    .dialogTag {
        line-height: 22px;
        padding: 0 8px;
        border-radius: 4px;
        margin-top: 4px;
        color: #fff;
    }
.dialogTag {
    line-height: 22px;
    padding: 0 8px;
    border-radius: 4px;
    margin-top: 4px;
    color: #fff;
}
.visitTableClass {
@@ -315,4 +315,8 @@
.tabs-container .arco-tabs-header-ink {
    left: 83.988px;
    width: 82px;
}
.progress{
    margin: 16px 0px 0px 16px;
}
gz-customerSystem/src/views/register/visit/check.jsx
@@ -14,7 +14,7 @@
import '../index.less';
import { Space } from 'antd';
import { Button, Steps } from '@arco-design/web-react';
import VisitorRegister from './component/VisitorRegister';
import VisitorRegister from './component/visitorRegister';
import Preview from './preview';
const Step = Steps.Step;
gz-customerSystem/src/views/register/visit/component/MattersInfo.jsx
@@ -16,7 +16,7 @@
import { Tabs, Typography, Steps } from '@arco-design/web-react';
import "@arco-themes/react-gzzz/css/arco.css";
import { IconCalendar, IconClockCircle, IconUser } from '@arco-design/web-react/icon';
import Handle from './Handle'
import Handle from './handle'
const TabPane = Tabs.TabPane;
const style = {
@@ -182,12 +182,8 @@
            </Col>
            <div style={{ margin: '16px 0' }}>
              <PersonCard
                isCheck={true}
                partyType={'applicant'} // 这里设定为申请人
                isCheck={false}
                data={fakeData}
                handleCheckParty={handleCheckParty}
                handleAdd={handleAdd}
                handleDeleteParty={handleDeleteParty}
              />
            </div>
            <Col span={24} style={{ display: 'flex', alignItems: 'center', marginBottom: '4px' }}>
@@ -305,12 +301,8 @@
        </Typography.Paragraph>
      }
      {
        props.active === '3' && props.current === 3 && <Typography.Paragraph style={style}>
        (props.active === '3' && props.current === 3) && <Typography.Paragraph style={style}>
          <Handle />
        </Typography.Paragraph>
      }
      {
        props.active === '3' && props.current === 2 && <Typography.Paragraph style={style}>
        </Typography.Paragraph>
      }
    </div>
gz-customerSystem/src/views/register/visit/component/agentDialog.jsx
@@ -1,10 +1,11 @@
import React, { useState, useEffect, useRef, Fragment } from "react";
import { Row, Col, Space } from 'antd';
import { Form, Input, Button, Radio, Select, Checkbox, Upload } from '@arco-design/web-react';
import KeyVisits from "./KeyVisits";
import KeyVisits from "@/components/personCard/KeyVisits";
import {
  IconLink,
} from '@arco-design/web-react/icon';
import * as $$ from '@/utils/utility';
const FormItem = Form.Item;
const Option = Select.Option;
@@ -22,21 +23,22 @@
      formRef.current.setFieldsValue({
        ...props.editData
      })
      console.log(props);
      //过滤代理人
      setVisitList(props.fakeData.filter(item => {
        if (props.editData.dialogType === 2) {
          return item.partyType === 0
        if (props.editData.perType === '24_00006-1') {
          return item.perType === '15_020008-1'
        } else {
          return item.partyType === 1
          return item.perType === '15_020008-2'
        }
      }))
    } else {
      //过滤代理人
      setVisitList(props.fakeData.filter(item => {
        if (props.dialogType === 2) {
          return item.partyType === 0
        if (props.dialogType === '24_00006-1') {
          return item.perType === '15_020008-1'
        } else {
          return item.partyType === 1
          return item.perType === '15_020008-2'
        }
      }))
    }
@@ -47,16 +49,16 @@
    if (formRef.current) {
      formRef.current.validate(undefined, (errors, values) => {
        if (!errors) {
          const fieldValue = formRef.current.getFields()
          if (props.editData) {
            props.handleAddParty({
              ...props.editData,
              ...values,
              ...fieldValue
            })
          } else {
            props.handleAddParty({
              ...values,
              partyType: props.dialogType,
              perClassName: props.dialogType === 2 ? '申请方代理人' : '被申请方代理人',
              ...fieldValue,
              perType: props.dialogType,
              perTypeName: $$.options.personType.find(item => item.value === props.dialogType).label,
            })
          }
          props.onClose()
@@ -126,7 +128,7 @@
                <Col span={12}>
                  <FormItem
                    label={(<div style={{ display: 'flex' }}>联系方式<div className="must">必填</div></div>)}
                    field='personNumber'
                    field='mobile'
                    rules={[
                      { required: true, message: '请输入联系方式' },
                      { match: /^\+?(\d{1,3})?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{4})$/, message: '请输入正确的电话号码' },
@@ -138,16 +140,17 @@
                <Col span={12}>
                  <FormItem
                    label={(<div style={{ display: 'flex' }}>证件类型<div className="must">必填</div></div>)}
                    field='docType'
                    field='certiType'
                    rules={[{ required: true, message: '请选择证件类型' }]}
                  >
                    <Select placeholder='请选择' allowClear>
                      {['居民身份证',].map((option, index) => (
                        <Option key={option} value={option}>
                          {option}
                        </Option>
                      ))}
                    </Select>
                    <Select
                      placeholder='请选择'
                      allowClear
                      options={$$.options.cardType}
                      onChange={(value, options) => {
                        formRef.current.setFieldValue('certiTypeName', options && options.children)
                      }}
                    />
                  </FormItem>
                </Col>
                <Col span={12}>
@@ -157,7 +160,7 @@
                      { required: true, message: '请输入证件号码' },
                      { match: /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12][0-9]|3[01])\d{3}(\d|X)$/, message: '请输入正确的证件号码' }
                    ]}
                    field='mobile'
                    field='certiNo'
                  >
                    <InputSearch
                      searchButton='读取卡证'
@@ -166,32 +169,38 @@
                  </FormItem>
                </Col>
                <Col span={12}>
                  <FormItem label='联系地址' field='money'>
                  <FormItem label='联系地址' field='addr'>
                    <Input placeholder='请填写' />
                  </FormItem>
                </Col>
                <Col span={12}>
                  <FormItem label='户籍地址' field='money'>
                  <FormItem label='户籍地址' field='placeAddr'>
                    <Input placeholder='请填写' />
                  </FormItem>
                </Col>
                <Col span={12}>
                  <FormItem label='工作单位' field='money'>
                  <FormItem label='工作单位' field='workUnit'>
                    <Input placeholder='请填写' />
                  </FormItem>
                </Col>
                <Col span={12}>
                  <FormItem
                    label='民族'
                    field='minzu'
                    field='nation'
                  >
                    <Select placeholder='请选择' allowClear>
                      {['汉族',].map((option, index) => (
                        <Option key={option} value={option}>
                          {option}
                        </Option>
                      ))}
                    </Select>
                    <Select
                      placeholder='请选择'
                      allowClear
                      showSearch
                      options={$$.options.nation}
                      filterOption={(inputValue, option) =>
                        option.props.value.toLowerCase().indexOf(inputValue.toLowerCase()) >= 0 ||
                        option.props.children.toLowerCase().indexOf(inputValue.toLowerCase()) >= 0
                      }
                      onChange={(value, options) => {
                        formRef.current.setFieldValue('nationName', options && options.children)
                      }}
                    />
                  </FormItem>
                </Col>
                <Col span={12}>
@@ -201,63 +210,77 @@
                  >
                    <RadioGroup
                      type='button'
                      options={$$.options.sex}
                      onChange={(value, options) => {
                        if (value) {
                          formRef.current.setFieldValue('sexName', value === '09_00003-1' ? '男' : '女')
                        } else {
                          formRef.current.setFieldValue('sexName', '')
                        }
                      }}
                    >
                      <Radio value='0'>男</Radio>
                      <Radio value='1'>女</Radio>
                    </RadioGroup>
                  </FormItem>
                </Col>
                <Col span={12}>
                  <FormItem
                    label='是否极具个人极端倾向'
                    field='isBad'
                    field='extreme'
                  >
                    <RadioGroup>
                      <Radio value='0'>否</Radio>
                      <Radio value='1'>是</Radio>
                      <Radio value={0}>否</Radio>
                      <Radio value={1}>是</Radio>
                    </RadioGroup>
                  </FormItem>
                </Col>
                <Col span={12}>
                  <FormItem
                    label='委托关系'
                    field='weituo'
                    field='agentRelate'
                  >
                    <Select placeholder='请选择' allowClear>
                      {['亲属',].map((option, index) => (
                        <Option key={option} value={option}>
                          {option}
                        </Option>
                      ))}
                    </Select>
                    <Select
                      placeholder='请选择'
                      allowClear
                      options={$$.options.agentType}
                      onChange={(value, options) => {
                        formRef.current.setFieldValue('agentRelateName', options && options.children)
                      }}
                    />
                  </FormItem>
                </Col>
                <Col span={12}>
                  <FormItem
                    label='委托类型'
                    field='type'
                    field='agentType'
                  >
                    <Select placeholder='请选择' allowClear>
                      {['一般授权代理',].map((option, index) => (
                        <Option key={option} value={option}>
                          {option}
                        </Option>
                      ))}
                    </Select>
                    <Select
                      placeholder='请选择'
                      allowClear
                      options={$$.options.agentType}
                      onChange={(value, options) => {
                        formRef.current.setFieldValue('agentTypeName', options && options.children)
                      }}
                    />
                  </FormItem>
                </Col>
                <Col span={12}>
                  <FormItem
                    label={(<div style={{ display: 'flex' }}>代理对象<div className="must">必填</div></div>)}
                    rules={[{ required: true, message: '请选择代理对象' }]}
                    field='dailimap'
                    field='personId'
                  >
                    <CheckboxGroup
                      direction='vertical'
                      options={visitList.map(x => ({
                        label: <span>{x.trueName}&nbsp;&nbsp;<span style={{ color: '#86909c' }}>({x.perClassName})</span></span>,
                        label: <span>{x.trueName}&nbsp;&nbsp;<span style={{ color: '#86909c' }}>({x.perTypeName})</span></span>,
                        value: x.id,
                      }))}
                      onChange={(value) => {
                        if (value) {
                          const personList = visitList.filter(item => value.indexOf(item.id) != -1).map(item => item.trueName)
                          formRef.current.setFieldValue('personNameList', personList)
                        }
                      }}
                    >
                    </CheckboxGroup>
                  </FormItem>
gz-customerSystem/src/views/register/visit/component/applyDialog.jsx
@@ -1,6 +1,6 @@
import React, { useState, useEffect, useRef, Fragment } from "react";
import * as $$ from '@/utils/utility';
import { Row, Col, Space } from 'antd';
import { Row, Col } from 'antd';
import {
  CheckOutlined,
} from '@ant-design/icons';
@@ -13,8 +13,8 @@
  caseperfection_organize_active,
} from '@/assets/images/icon';
import { Form, Input, Button, Radio, Select, Modal, Cascader, Upload, Message } from '@arco-design/web-react';
import KeyVisits from "./KeyVisits";
import SelectUnitDialog from "./SelectUnitDialog";
import KeyVisits from "@/components/personCard/KeyVisits";
import SelectUnitDialog from "./selectUnitDialog";
import {
  IconLink,
} from '@arco-design/web-react/icon';
@@ -35,6 +35,7 @@
      formRef.current.setFieldsValue({
        ...props.editData
      })
      setPerClass(props.editData.perClass)
    }
  }, [])
@@ -87,7 +88,7 @@
          <Col span={12}>
            <FormItem
              label={(<div style={{ display: 'flex' }}>联系方式<div className="must">必填</div></div>)}
              field='personNumber'
              field='mobile'
              rules={[
                { required: true, message: '请输入联系方式' },
                { match: /^\+?(\d{1,3})?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{4})$/, message: '请输入正确的电话号码' },
@@ -99,16 +100,17 @@
          <Col span={12}>
            <FormItem
              label={(<div style={{ display: 'flex' }}>证件类型<div className="must">必填</div></div>)}
              field='docType'
              field='certiType'
              rules={[{ required: true, message: '请选择证件类型' }]}
            >
              <Select placeholder='请选择' allowClear>
                {['居民身份证',].map((option, index) => (
                  <Option key={option} value={option}>
                    {option}
                  </Option>
                ))}
              </Select>
              <Select
                placeholder='请选择'
                allowClear
                options={$$.options.cardType}
                onChange={(value, options) => {
                  formRef.current.setFieldValue('certiTypeName', options && options.children)
                }}
              />
            </FormItem>
          </Col>
          <Col span={12}>
@@ -118,7 +120,7 @@
                { required: true, message: '请输入证件号码' },
                { match: /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12][0-9]|3[01])\d{3}(\d|X)$/, message: '请输入正确的证件号码' }
              ]}
              field='mobile'
              field='certiNo'
            >
              <InputSearch
                searchButton='读取卡证'
@@ -127,12 +129,12 @@
            </FormItem>
          </Col>
          <Col span={12}>
            <FormItem label='联系地址' field='phoneAddress'>
            <FormItem label='联系地址' field='addr'>
              <Input placeholder='请填写' />
            </FormItem>
          </Col>
          <Col span={12}>
            <FormItem label='户籍地址' field='domicileAddress'>
            <FormItem label='户籍地址' field='placeAddr'>
              <Input placeholder='请填写' />
            </FormItem>
          </Col>
@@ -155,6 +157,9 @@
                  option.props.value.toLowerCase().indexOf(inputValue.toLowerCase()) >= 0 ||
                  option.props.children.toLowerCase().indexOf(inputValue.toLowerCase()) >= 0
                }
                onChange={(value, options) => {
                  formRef.current.setFieldValue('nationName', options && options.children)
                }}
              >
              </Select>
            </FormItem>
@@ -166,20 +171,26 @@
            >
              <RadioGroup
                type='button'
                options={$$.options.sex}
                onChange={(value, options) => {
                  if (value) {
                    formRef.current.setFieldValue('sexName', value === '09_00003-1' ? '男' : '女')
                  } else {
                    formRef.current.setFieldValue('sexName', '')
                  }
                }}
              >
                <Radio value='0'>男</Radio>
                <Radio value='1'>女</Radio>
              </RadioGroup>
            </FormItem>
          </Col>
          <Col span={12}>
            <FormItem
              label='是否极具个人极端倾向'
              field='isBad'
              field='extreme'
            >
              <RadioGroup>
                <Radio value='0'>否</Radio>
                <Radio value='1'>是</Radio>
                <Radio value={0}>否</Radio>
                <Radio value={1}>是</Radio>
              </RadioGroup>
            </FormItem>
          </Col>
@@ -224,8 +235,8 @@
          </Col>
          <Col span={12}>
            <FormItem
              label={isLegal ? '企业名称' : '机构名称'}
              rules={[{ required: true }]}
              label={(<div style={{ display: 'flex' }}>{isLegal ? '企业名称' : '机构名称'}<div className="must">必填</div></div>)}
              rules={[{ required: true, message: '请输入' + isLegal ? '企业名称' : '机构名称' }]}
              field='trueName'
            >
              <InputSearch
@@ -236,41 +247,49 @@
            </FormItem>
          </Col>
          <Col span={12}>
            <FormItem label='联系方式' field='phoneNumber'>
            <FormItem
              label={(<div style={{ display: 'flex' }}>联系方式<div className="must">必填</div></div>)}
              field='mobile'
              rules={[
                { required: true, message: '请输入联系方式' },
                { match: /^\+?(\d{1,3})?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{4})$/, message: '请输入正确的电话号码' },
              ]}
            >
              <Input placeholder='请填写' />
            </FormItem>
          </Col>
          <Col span={12}>
            <FormItem label={isLegal ? '企业所在地' : '机构所在地'} field='money'>
            <FormItem label={isLegal ? '企业所在地' : '机构所在地'} field='addr'>
              <Input placeholder='请填写' />
            </FormItem>
          </Col>
          <Col span={12}>
            <FormItem label={isLegal ? '统一社会信用代码' : '组织机构代码'} field='mobile'>
            <FormItem label={isLegal ? '统一社会信用代码' : '组织机构代码'} field='orgaCode'>
              <Input placeholder='请填写' />
            </FormItem>
          </Col>
          <Col span={12}>
            <FormItem label={isLegal ? '法定代表人' : '机构代表人'} field='companyName'>
            <FormItem label={isLegal ? '法定代表人' : '机构代表人'} field='deputy'>
              <Input placeholder='请填写' />
            </FormItem>
          </Col>
          <Col span={12}>
            <FormItem
              label={isLegal ? '企业类型' : '机构类型'}
              field='minzu'
              field='orgaType'
            >
              <Select placeholder='请选择' allowClear>
                {['餐饮服务',].map((option, index) => (
                  <Option key={option} value={option}>
                    {option}
                  </Option>
                ))}
              </Select>
              <Select
                placeholder='请选择'
                allowClear
                options={$$.options.agentType}
                onChange={(value, options) => {
                  formRef.current.setFieldValue('orgaTypeName', options && options.children)
                }}
              />
            </FormItem>
          </Col>
          <Col span={12}>
            <FormItem label='住所' field='money'>
            <FormItem label='住所' field='placeAddr'>
              <Input placeholder='请填写' />
            </FormItem>
          </Col>
@@ -284,17 +303,18 @@
    if (formRef.current) {
      formRef.current.validate(undefined, (errors, values) => {
        if (!errors) {
          const fieldValue = formRef.current.getFields()
          if (props.editData) {
            props.handleAddParty({
              ...props.editData,
              ...values
              ...fieldValue
            })
          } else {
            props.handleAddParty({
              ...values,
              partyType: props.dialogType,
              ...fieldValue,
              perType: props.dialogType,
              perClass: perClass,
              perClassName: props.dialogType === 0 ? '申请方当事人' : '被申请方当事人'
              perTypeName: $$.options.personType.find(item => item.value === props.dialogType).label,
              perClassName: $$.options.personClass.find(item => item.value === perClass).label
            })
          }
          props.onClose()
gz-customerSystem/src/views/register/visit/component/detailDialog.jsx
File was deleted
gz-customerSystem/src/views/register/visit/component/handle.jsx
@@ -1,11 +1,14 @@
import React, { useState } from 'react';
import { Steps, Button } from '@arco-design/web-react';
import { Col, Space, Row, Tooltip } from 'antd';
import { Steps } from '@arco-design/web-react';
import { Col, Space, Row, Tooltip, Button } from 'antd';
import { register, empty } from '../../../../assets/images'
import { Form, Select, Empty, Tabs, Typography, } from '@arco-design/web-react';
import { Form, Input, Empty, Tabs, Typography, Modal } from '@arco-design/web-react';
import { question1, } from '@/assets/images';
import ProgressStep from '../../../../components/ProgressStep/VisitStep'
import SelectObjModal from '../../../../components/SelectObjModal/selectPerson'
import WantUserTag from '../../../../components/WantUserTag/Handling'
const Option = Select.Option;
const InputSearch = Input.Search;
const FormItem = Form.Item;
const TabPane = Tabs.TabPane;
@@ -17,6 +20,26 @@
const Handle = () => {
  const [selectedTab, setSelectedTab] = useState('1'); // 默认选中第一个 tab
  const [wantUser, setWantUser] = useState({});
  const tabs = [
    { index: '1', label: '承办部门' },
    { index: '2', label: '配合部门' },
  ];
  const [isModalVisible, setIsModalVisible] = useState(false);
  const showModal = () => {
    setIsModalVisible(true);
  };
  const hideModal = () => {
    setIsModalVisible(false);
  };
  const handleTabChange = (newTabIndex) => {
    setSelectedTab(newTabIndex);
  };
  return (
    <>
@@ -63,45 +86,45 @@
              requiredSymbol={false}
              scrollToFirstError={true}
            >
              <Row>
                <Col span={8}>
                  <FormItem label={<div style={{ display: 'flex' }}>
                    <span style={{ color: '#86909C' }}>经办人</span>
                    <Tooltip>
                      <img src={question1} alt="" style={{ width: '13px', height: '13px', margin: '4px 4px 0px 4px' }} />
                    </Tooltip>
                  </div>
              <Col span={8}>
                <FormItem label={<div style={{ display: 'flex' }}>
                  <span style={{ color: '#86909C' }}>经办人</span>
                  <Tooltip>
                    <img src={question1} alt="" style={{ width: '13px', height: '13px', margin: '4px 4px 0px 4px' }} />
                  </Tooltip>
                </div>
                }
                  field='level' >
                  {wantUser.wantUserId ?
                    <WantUserTag name={wantUser.wantUserName} onClose={() => setWantUser({ wantUserId: null, wantUserName: null })} />
                    :
                    <InputSearch
                      searchButton='选择'
                      placeholder='请选择'
                      style={{ width: 350 }}
                      onClick={() => setIsModalVisible(true)}
                      onSearch={() => setIsModalVisible(true)}
                    />
                  }
                    field='level' >
                    <Select placeholder='请选择' allowClear>
                      {['一级', '二级', '三级', '四级'].map((option, index) => (
                        <Option key={option} value={option}>
                          {option}
                        </Option>
                      ))}
                    </Select>
                    <Button type='primary' style={{ position: 'absolute', right: 0 }}>保存</Button>
                  </FormItem>
                </Col>
                <Col span={24}>
                  <div style={{ color: 'rgb(134, 144, 156)' }}>办理记录</div>
                  <Empty
                    icon={
                      <div
                        style={{
                          display: 'flex',
                          // width: 160,
                          justifyContent: 'center',
                        }}
                      >
                        <img src={empty} alt='' style={{ width: '160px', height: '160px' }} />
                      </div>
                    }
                    description='暂无数据'
                  />
                </Col>
              </Row>
                </FormItem>
              </Col>
              <Col span={24}>
                <div style={{ color: 'rgb(134, 144, 156)' }}>办理记录</div>
                <Empty
                  icon={
                    <div
                      style={{
                        display: 'flex',
                        // width: 160,
                        justifyContent: 'center',
                      }}
                    >
                      <img src={empty} alt='' style={{ width: '160px', height: '160px' }} />
                    </div>
                  }
                  description='暂无数据'
                />
              </Col>
            </Form>
            <Space>
              <Button type="primary" style={{ backgroundColor: '#1A6FB8' }}>添加办理记录</Button>
@@ -116,19 +139,40 @@
                key='1'
                title={
                  <span style={{ fontSize: '15px' }}>
                    Tab 1
                    流转进度
                  </span>
                }
              >
                <Typography.Paragraph style={style}>
                <Typography.Paragraph>
                  <div style={{ display: 'flex', marginLeft: '16px', gap: '16px' }}>
                    {tabs.map((tab) => (
                      <div
                        key={tab.index}
                        style={{
                          color: selectedTab === tab.index ? 'rgba(26,111,184,1)' : 'rgba(0,0,0,0.45)',
                          padding: '6px 12px',
                          border: `1px solid ${selectedTab === tab.index ? 'rgba(26,111,184,1)' : 'rgba(229,230,235,1)'}`,
                          borderRadius: '4px',
                          cursor: 'pointer',
                        }}
                        onClick={() => handleTabChange(tab.index)}
                      >
                        {tab.label}
                      </div>
                    ))}
                  </div>
                  {selectedTab === '1' &&
                    <div className='progress'>
                      <ProgressStep caseId='202408291012566613' pageFrom="dispatchRecord" />
                    </div>
                  }
                </Typography.Paragraph>
              </TabPane>
              <TabPane
                key='2'
                title={
                  <span style={{ fontSize: '15px' }}>
                    Tab 2
                    督办信息
                  </span>
                }
              >
@@ -138,6 +182,17 @@
          </div>
        </div>
        {/* 选择经办人*/}
        <SelectObjModal
          visible={isModalVisible}
          checkKeys={wantUser.wantUserId ? [{ label: wantUser.wantUserName, value: wantUser.wantUserId }] : undefined}
          onOk={(value) => {
            setIsModalVisible(false);
            setWantUser({ wantUserId: value.keys[0], wantUserName: value.items[0].name });
          }}
          onClose={() => setIsModalVisible(false)}
        />
      </div>
    </>
  )
gz-customerSystem/src/views/register/visit/component/map.jsx
@@ -115,7 +115,7 @@
  //使用地址
  const handleUseAddress = (e) => {
    e.stopPropagation()
    props.selectAdd(addressData.addName)
    props.selectAdd(addressData)
  }
  return (
gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx
@@ -9,56 +9,57 @@
  applyMaterials_active,
  evidenceMaterials,
  evidenceMaterials_active,
} from '@/assets/images';
import { CheckOutlined, } from '@ant-design/icons';
import TableView from '@/components/TableView';
import '../../index.less';
import ApplyDialog from "./ApplyDialog";
import AgentDialog from "./AgentDialog";
import DetailDialog from "./DetailDialog";
import FilesCheck from '../../../filesCheck';
import ApplyDialog from "./applyDialog";
import AgentDialog from "./agentDialog";
import NewFileCheck from '../../../filesCheck/newFileCheck';
import { IconLink } from '@arco-design/web-react/icon';
import MapView from './Map'
import MapView from './map'
import { scan } from '@/assets/images/icon'
import MyDrawer from '@/components/MyDrawer';
import { EventLevelDrawer, MattersDetail } from './LevelDetail'
import { EventLevelDrawer, MattersDetail } from './levelDetail'
const RadioGroup = Radio.Group;// 根据调解案号获取纠纷登记信息
const FormItem = Form.Item;
const Option = Select.Option;
const InputSearch = Input.Search;
function getId() {
  return $$.ax.request({ url: `caseUtils/getNewTimeId`, type: 'get', service: 'utils' });
}
const VisitorRegister = (props) => {
  const [dialogType, setDialogType] = useState(0);//添加当事人的类型
  const [dialogType, setDialogType] = useState();//添加当事人的类型
  const [addVisabled, setAddVisabled] = useState(false);//添加当事人弹窗控制
  const [fakeData, setFakeData] = useState([]);//当事人信息数据
  const [scanFile, setScanFile] = useState(false);
  const [filesList, setFilesList] = useState([]);
  const [scanImage, setScanImage] = useState(false);
  const [scaned, setScaned] = useState(false);
  const [upload, setUpLoad] = useState(false);
  const [sourceType, setSourceType] = useState('09_01010-1');
  const [filesCheck, setFilesCheck] = useState(false);
  const [fileView, setFileView] = useState();
  const [selectedAddress, setSelectedAddress] = useState('');
  const [fileTip, setFileTip] = useState('0');
  const [detailVisabled, setDetailVisabled] = useState(false);//查看信息弹窗控制
  const [mapView, setMapView] = useState(false);
  const [flagId, setFlagId] = useState(1);//赋予当事人唯一id,用于删除
  const [visible, setVisible] = useState(false);
  const [apply, setApply] = useState(false);
  const [editData, setEditData] = useState(null);
  const addressOptions = [
    { label: '地址1', value: 'address1' },
    { label: '地址2', value: 'address2' },
    // 更多地址...
  ];
  const [agentVisible, setAgentVisible] = useState(false);
  const peopleMap = {
    '15_020008-1': '申请方',
    '15_020008-2': '被申请方',
    '24_00006-1': '申请方代理人',
    '24_00006-2': '被申请方代理人'
  }
  useEffect(() => {
    if (props.formRef.current) {
      //引入当事人数据
      props.formRef.current.setFieldValue('fakeData', fakeData)
    }
  }, [fakeData])
  const personIconType = (v) => {
    switch (v) {
@@ -149,21 +150,6 @@
        </>
      )
    }
  }
  const formItemLayout = {
    labelCol: {
      span: 4,
    },
    wrapperCol: {
      span: 17,
    },
  };
  const peopleMap = {
    0: '申请方',
    1: '被申请方',
    2: '代理人'
  }
  const fakeData1 = [
@@ -273,41 +259,6 @@
    // 更多列配置...
  ];
  const options = [
    {
      value: 'beijing',
      label: 'Beijing',
      children: [
        {
          value: 'Beijing',
          label: 'Beijing',
          children: [
            {
              value: 'chaoyang',
              label: 'Chaoyang',
            },
          ],
        },
      ],
    },
    {
      value: 'shanghai',
      label: 'Shanghai',
      children: [
        {
          value: 'shanghaishi',
          label: 'Shanghai',
          children: [
            {
              value: 'huangpu',
              label: 'Huangpu',
            },
          ],
        },
      ],
    },
  ];
  const options1 = [
    {
      value: 'jingjijiufen',
@@ -335,11 +286,15 @@
    },
  ];
  //查看
  const handleCheckParty = (value) => {
    console.log(value);
    setDialogType(value.partyType)
    setDetailVisabled(true)
  //获取id
  const getAppId = async (value) => {
    const res = await getId()
    if (res.type) {
      setFakeData([...fakeData, {
        ...value,
        id: res.data
      }])
    }
  }
  //获取当前时间
@@ -354,9 +309,9 @@
    return `${year}-${month}-${day} ${hours}:${minutes}`;
  }
  //添加申请人: 0、被申请人: 1、申请代理人: 2、被申请代理人:3
  //添加当事人
  const handleAdd = (type) => {
    if (type === 2 || type === 3) {
    if (type === '24_00006-1' || type === '24_00006-2') {
      setAgentVisible(true)
    } else {
      setAddVisabled(true)
@@ -364,14 +319,8 @@
    setDialogType(type)
  }
  const handleAddressChange = (value) => {
    setSelectedAddress(value);
  };
  //添加当事人
  const handleAddParty = (value) => {
    console.log(value,'value1');
    if (value.id) {
      //编辑
      const newList = fakeData.map(item => {
@@ -384,11 +333,7 @@
      setFakeData(newList)
      setEditData(null)
    } else {
      setFakeData([...fakeData, {
        ...value,
        id: flagId
      }])
      setFlagId(flagId + 1)
      getAppId(value)
    }
  }
@@ -401,21 +346,20 @@
  //编辑
  const handleEdit = (value) => {
    console.log(value);
    if (value.partyType === 0 || value.partyType === 1) {
    if (value.perType === '15_020008-1' || value.perType === '15_020008-2') {
      //当事人
      setAddVisabled(true)
    } else {
      //代理人
      setAgentVisible(true)
    }
    setDialogType(value.perType)
    setEditData(value)
  }
  return (
    <div className='dataSync-page'>
    <div className='dataSync-page' style={{ ...props.style }}>
      <Col span={24} style={{ display: 'flex', alignItems: 'center' }}>
        <Space size='small'>
          <div className='MediationInfo-subTitle' style={{ marginTop: '-9px', }}></div><h4>当事人信息</h4>
@@ -424,9 +368,7 @@
      <div style={{ margin: '16px 0' }}>
        <PersonCard
          isCheck={true}
          partyType={'applicant'} // 这里设定为申请人
          data={fakeData}
          handleCheckParty={handleCheckParty}
          handleAdd={handleAdd}
          handleDeleteParty={handleDeleteParty}
          handleEdit={handleEdit}
@@ -443,32 +385,29 @@
        requiredSymbol={false}
        scrollToFirstError={true}
        initialValues={{
          level: '三级',
          visitingTime: getFormattedDateTime(),
          isSerious: '否',
          caseLevel: 3,
          visitTime: getFormattedDateTime(),
          majorStatus: 0,
        }}//默认值
      >
        <Row gutter={[32, 0]}>
          <Col span={8}>
            <FormItem label={<div style={{ display: 'flex' }}>
              事项等级
              <Tooltip onClick={() => setApply(true)}>
                <img src={question1} alt="" style={{ width: '13px', height: '13px', margin: '4px 4px 0px 4px' }} />
              </Tooltip>
            </div>
            }
              field='level' >
              <Select placeholder='Select city' allowClear>
                {['一级', '二级', '三级', '四级'].map((option, index) => (
                  <Option key={option} value={option}>
                    {option}
                  </Option>
                ))}
            <FormItem
              label={<div style={{ display: 'flex' }}>
                事项等级
                <Tooltip onClick={() => setApply(true)}>
                  <img src={question1} alt="" style={{ width: '13px', height: '13px', margin: '4px 4px 0px 4px' }} />
                </Tooltip>
              </div>
              }
              field='caseLevel'
            >
              <Select placeholder='请选择事项等级' allowClear options={$$.options.caseLevelList}>
              </Select>
            </FormItem>
          </Col>
          <Col span={8}>
            <FormItem label='来访时间' field='visitingTime'>
            <FormItem label='来访时间' field='visitTime'>
              <DatePicker
                style={{ width: '100%' }}
                format='YYYY-MM-DD HH:mm'
@@ -477,15 +416,15 @@
            </FormItem>
          </Col>
          <Col span={8}>
            <FormItem label='来访人数(人)' field='visitingNumber'>
              <InputNumber placeholder='请填写' />
            <FormItem label='来访人数(人)' field='visitPeopleNum'>
              <InputNumber placeholder='请填写' min={1} />
            </FormItem>
          </Col>
          <Col span={8}>
            <FormItem
              label={(<div style={{ display: 'flex' }}>纠纷类型<div className="must">必填</div></div>)}
              rules={[{ message: '请选择纠纷类型', required: true }]}
              field='disputeType'
              field='caseType'
            >
              <Cascader
                placeholder='请选择'
@@ -493,7 +432,6 @@
                onChange={(value, option) => {
                  console.log(value, option);
                }}
                // defaultValue={['shanghai', 'shanghaishi', 'huangpu']}
                allowClear
              />
            </FormItem>
@@ -502,8 +440,7 @@
            <FormItem
              label={(<div style={{ display: 'flex' }}>纠纷发生时间<div className="must">必填</div></div>)}
              rules={[{ message: '请选择纠纷发生时间', required: true }]}
              field='disputeTime'
              field='occurTime'
            >
              <DatePicker
                style={{ width: '100%' }}
@@ -517,7 +454,7 @@
            <FormItem
              label={(<div style={{ display: 'flex' }}>纠纷发生地点<div className="must">必填</div></div>)}
              rules={[{ message: '请选择纠纷发生地点', required: true }]}
              field='disputeAddress'
              field='addr'
            >
              <InputSearch
                placeholder='选择纠纷发生地的详细地址'
@@ -531,22 +468,46 @@
            <FormItem label='问题属地' field='quesAddress'>
              <Cascader
                placeholder='请选择'
                options={options}
                options={$$.locationOption()}
                showSearch
                onChange={(value, option) => {
                  console.log(value, option);
                  if (option) {
                    props.formRef.current.setFieldsValue({
                      queProv: option[0].value,
                      queProvName: option[0].label,
                      queCity: option[1].value,
                      queCityName: option[1].label,
                      queArea: option[2].value,
                      queAreaName: option[2].label,
                      queRoad: option[3] && option[3].value || '',
                      queRoadName: option[3] && option[3].label || '',
                    })
                  } else {
                    //清除数据
                    props.formRef.current.setFieldsValue({
                      queProv: undefined,
                      queProvName: undefined,
                      queCity: undefined,
                      queCityName: undefined,
                      queArea: undefined,
                      queAreaName: undefined,
                      queRoad: undefined,
                      queRoadName: undefined,
                    })
                  }
                }}
                allowClear
              />
            </FormItem>
          </Col>
          <Col span={8}>
            <FormItem label='涉及人数(人)' field='peopleNumber'>
            <FormItem label='涉及人数(人)' field='peopleNum'>
              <InputNumber placeholder='请填写' />
            </FormItem>
          </Col>
          <Col span={8}>
            <FormItem label='涉及金额(元)' field='money'>
            <FormItem label='涉及金额(元)' field='amount'>
              <InputNumber placeholder='请填写' />
            </FormItem>
          </Col>
@@ -562,7 +523,7 @@
                <div style={{ marginLeft: '8px', color: '#1A6FB8', fontSize: '14px', cursor: 'pointer' }} onClick={() => setScanFile(true)}>识别上传材料</div>
              </div>
              }
              field='summarize'
              field='caseDes'
              rules={[{ message: '请填写事项概况', required: true }]}
            >
              <Input.TextArea
@@ -586,7 +547,7 @@
                <div style={{ marginLeft: '8px', color: '#1A6FB8', fontSize: '14px', cursor: 'pointer' }} onClick={() => setScanFile(true)}>识别上传材料</div>
              </div>
              }
              field='apply'
              field='caseClaim'
              rules={[{ message: '请填写申请请求', required: true }]}
            >
@@ -603,12 +564,12 @@
            <FormItem
              label='是否重大矛盾纠纷'
              style={{ width: '300px', marginBottom: 0 }}
              field='isSerious'
              field='majorStatus'
              layout='horizontal'
              labelCol={{ span: 11 }}
              wrapperCol={{ span: 13 }}
            >
              <RadioGroup options={['否', '是']} />
              <RadioGroup options={[{ value: 0, label: '否' }, { value: 1, label: '是' }]} />
            </FormItem>
          </div>
        </Row>
@@ -703,7 +664,7 @@
      <Modal style={{ width: '512px' }} visible={upload} onCancel={() => setUpLoad(false)} footer={null} title='上传材料' centered>
        <div style={{ paddingTop: '8px' }}>
          <Row gutter={[30, 24]}>
            {$$.options.sourceType.map((x, t) => {
            {$$.options.fileOwnerType.map((x, t) => {
              return (
                <Col span={12} key={t}>
                  <div
@@ -748,10 +709,13 @@
        {/* </div> */}
      </Modal>
      <Modal
        title={'添加' + peopleMap[dialogType]}
        title={(editData ? '修改' : '添加') + peopleMap[dialogType]}
        visible={addVisabled}
        onOk={() => setAddVisabled(false)}
        onCancel={() => setAddVisabled(false)}
        onCancel={() => {
          setAddVisabled(false)
          setEditData(null)
        }}
        autoFocus={false}
        focusLock={true}
        footer={null}
@@ -766,10 +730,13 @@
        />
      </Modal>
      <Modal
        title={'添加代理人'}
        title={(editData ? '修改' : '添加') + peopleMap[dialogType]}
        visible={agentVisible}
        onOk={() => setAgentVisible(false)}
        onCancel={() => setAgentVisible(false)}
        onCancel={() => {
          setAgentVisible(false)
          setEditData(null)
        }}
        autoFocus={false}
        focusLock={true}
        footer={null}
@@ -785,19 +752,6 @@
        />
      </Modal>
      <Modal
        title={'查看' + peopleMap[dialogType]}
        visible={detailVisabled}
        onOk={() => setDetailVisabled(false)}
        onCancel={() => setDetailVisabled(false)}
        autoFocus={false}
        focusLock={true}
        footer={null}
        unmountOnExit={true}
        maskClosable={false}
      >
        <DetailDialog />
      </Modal>
      <Modal
        style={{ width: '1200px' }}
        visible={mapView}
        onCancel={() => setMapView(false)}
@@ -808,8 +762,12 @@
        maskClosable={false}
      >
        <MapView
          selectAdd={(value) => {
            props.formRef.current.setFieldValue('disputeAddress', value)
          selectAdd={(data) => {
            props.formRef.current.setFieldsValue({
              addr: data.addName,
              lng: data.pt.lng,
              lat: data.pt.lat,
            })
            setMapView(false)
          }}
        />
gz-customerSystem/src/views/register/visit/index.jsx
@@ -13,8 +13,8 @@
import "@arco-themes/react-gzzz/css/arco.css";
import '../index.less';
import { Space } from 'antd';
import { Button, Steps, Tabs } from '@arco-design/web-react';
import VisitorRegister from './component/VisitorRegister';
import { Button, Steps, Tabs, Message } from '@arco-design/web-react';
import VisitorRegister from './component/visitorRegister';
import Preview from './preview';
import MattersInfo from './component/MattersInfo';
import { question, register, Matter, transfer } from '@/assets/images'
@@ -22,15 +22,24 @@
const Step = Steps.Step;
const TabPane = Tabs.TabPane;
function getCaseDataApi(submitData) {
    return $$.ax.request({ url: `caseInfo/getCaseInfo?id=${submitData}`, type: 'get', service: 'mediate' });
function saveDispute(data) {
    return $$.ax.request({ url: `casedraftInfo/caseDraftRegister`, type: 'post', service: 'mediate', data });
}
function getId() {
    return $$.ax.request({ url: `caseUtils/getNewTimeCaseId`, type: 'get', service: 'utils' });
}
function submitDispute(data) {
    return $$.ax.request({ url: `caseInfo/caseRegister`, type: 'post', service: 'mediate', data });
}
const Organization = () => {
    const formRef = useRef();
    const [isReview, setIsReview] = useState(false);//预览页面控制
    const [current, setCurrent] = useState(1);
    const [current, setCurrent] = useState(2);
    const [tabsActive, setTabsActive] = useState('1');
    const [tabsList, setTabList] = useState([
        {
@@ -45,23 +54,74 @@
            isNeedStep: true,//加上这个就有进度条
        },
    ])
    const breadcrumbDataMap = {
        1: { breadcrumbData: [{ title: '工作台' }, { title: '来访登记' }], title: '来访登记' },
        2: { breadcrumbData: [{ title: '工作台' }, { title: '事件中心' }], title: '办理反馈' },
        3: { breadcrumbData: [{ title: '工作台' }, { title: '事件中心' }], title: '办理反馈' }
    }
    //提交信息,需要校验规则
    const handleSubmit = async () => {
        if (formRef.current) {
            formRef.current.validate(undefined, (errors, values) => {
                console.log(errors, values);
                if (!errors) {
                    const data = formRef.current.getFields()
                    handleData(data).then(res => {
                        reauestSubmit({
                            ...res,
                            isSelfAccept: 0,
                            isDraft: 0,
                            operateType: 0,
                        })
                    })
                }
            });
        }
    }
    //保存草稿信息,不需要校验规则
    const handleSave = async () => {
    const handleSave = () => {
        if (formRef.current) {
            const data = formRef.current.getFields()
            console.log(data);
            setCurrent(2)
            handleData(data).then(res => {
                requestSave(res)
            })
        }
    }
    //数据处理
    const handleData = async (data) => {
        const { fakeData, ...newObj } = data
        if (data.id) {
            return {
                ...newObj,
                personList: fakeData?.filter(item => item.perType === "15_020008-1" || item.perType === "15_020008-2"),
                agentList: fakeData?.filter(item => item.perType === "24_00006-1" || item.perType === "24_00006-2").map(item => {
                    //personNameList用于查看详情显示代理人名字,不需要上传,去除
                    const { personNameList, ...rest } = item
                    return {
                        ...rest,
                        personId: item.personId.join(',')
                    }
                }),
            }
        } else {
            const res = await getId()
            if (res.type) {
                return {
                    ...newObj,
                    personList: fakeData?.filter(item => item.perType === "15_020008-1" || item.perType === "15_020008-2"),
                    agentList: fakeData?.filter(item => item.perType === "24_00006-1" || item.perType === "24_00006-2").map(item => {
                        //personNameList用于查看详情显示代理人名字,不需要上传,去除
                        const { personNameList, ...rest } = item
                        return {
                            ...rest,
                            personId: item.personId.join(',')
                        }
                    }),
                    id: res.data
                }
            }
        }
    }
@@ -82,9 +142,21 @@
        });
    }
    const breadcrumbDataMap = {
        1: { breadcrumbData: [{ title: '工作台' }, { title: '来访登记' }], title: '来访登记' },
        3: { breadcrumbData: [{ title: '工作台' }, { title: '事件中心' }], title: '办理反馈' }
    //保存请求
    const requestSave = async (data) => {
        const response = await saveDispute(data)
        if (response.type) {
            Message.success('保存草稿成功!')
        }
    }
    //提交请求
    const reauestSubmit = async (data) => {
        const response = await submitDispute(data)
        if (response.type) {
            Message.success('提交成功!')
            setCurrent(2)
        }
    }
    return (
@@ -107,7 +179,8 @@
                                <Step title='结案归档' disabled />
                            </Steps>
                        </div>
                        {isReview ? <Preview /> : <VisitorRegister formRef={formRef} />}
                        <Preview style={{ display: isReview ? '' : 'none' }} />
                        <VisitorRegister formRef={formRef} style={{ display: isReview ? 'none' : '' }} />
                        <div className="dataSync-excel">
                            <Space size="large" style={{ margin: '4px 14px' }}>
                                <Button type="primary" style={{ backgroundColor: '#1A6FB8' }} onClick={handleSave} >保存</Button>
@@ -120,7 +193,7 @@
                    </Fragment>
                }
                {
                    (current === 3 || current === 2) &&
                    (current === 2 || current === 3) &&
                    <Tabs defaultActiveTab='1' onChange={(v) => setTabsActive(v)}>
                        {tabsList?.map(item => {
                            return <TabPane
@@ -144,7 +217,7 @@
                                        </Steps>
                                    </div>
                                }
                                <MattersInfo active={tabsActive} current={current} />
                                <MattersInfo active={tabsActive} current={current}/>
                            </TabPane>
                        })}
                    </Tabs>
gz-customerSystem/src/views/register/visit/preview.jsx
@@ -14,10 +14,10 @@
import { Modal } from '@arco-design/web-react';
import NewFileCheck from '../../filesCheck/newFileCheck';
import * as $$ from '../../../utils/utility';
import { EventLevelDrawer, MattersDetail } from './component/LevelDetail'
import { EventLevelDrawer, MattersDetail } from './component/levelDetail'
const Preview = () => {
const Preview = (props) => {
    const [filesCheck, setFilesCheck] = useState(false);
    const [apply, setApply] = useState(false);
    const [visible, setVisible] = useState(false);
@@ -128,7 +128,7 @@
    return (
        <div style={{ backgroundColor: '#ffff', margin: '8px 16px 0px 16px', padding: '12px 18px 16px 16px', height: 'calc(100vh - 211px)', overflowY: 'scroll' }}>
        <div style={{ backgroundColor: '#ffff', margin: '8px 8px 0px 16px', padding: '12px 18px 16px 16px', height: 'calc(100vh - 228px)', overflowY: 'scroll', ...props.style }}>
            <Col span={24} style={{ display: 'flex', alignItems: 'center', marginBottom: '8px' }}>
                <Space size='small'>
                    <div className='MediationInfo-subTitle' style={{ marginTop: '-9px' }}></div><h4>当事人信息</h4>