From a30ae9c2331e5352a4f9d3f7e0ecfd36ff9d4e33 Mon Sep 17 00:00:00 2001 From: zhangyongtian <1181606322@qq.com> Date: Tue, 27 Aug 2024 10:57:24 +0800 Subject: [PATCH] Merge branch 'master' of http://120.79.193.119:9090/r/gzzfw/frontEnd/gzDyh --- gz-customerSystem/src/components/MyTree/index.jsx | 6 +- gz-customerSystem/src/components/basicInformation/organization/PersonModal.jsx | 6 +- gz-customerSystem/src/views/register/visit/component/map.jsx | 72 +++++++++++++----------- gz-customerSystem/src/components/Layout/index.jsx | 7 +- gz-customerSystem/src/views/basicInformation/organization/index.jsx | 5 + gz-customerSystem/src/views/basicInformation/personnel/index.jsx | 5 + gz-customerSystem/src/components/basicInformation/organization/AddOrEditOrganization.jsx | 2 gz-customerSystem/src/api/appUrl.js | 10 +- gz-customerSystem/src/api/apiHandler.js | 8 +- gz-customerSystem/src/views/basicInformation/organization/index.less | 19 ------ gz-customerSystem/src/views/basicInformation/role/index.jsx | 6 + gz-customerSystem/src/components/basicInformation/personnel/PersonnelPage.jsx | 8 +- 12 files changed, 73 insertions(+), 81 deletions(-) diff --git a/gz-customerSystem/src/api/apiHandler.js b/gz-customerSystem/src/api/apiHandler.js index 0687d2e..bd3e973 100644 --- a/gz-customerSystem/src/api/apiHandler.js +++ b/gz-customerSystem/src/api/apiHandler.js @@ -2,8 +2,8 @@ * @Company: hugeInfo * @Author: ldh * @Date: 2022-02-16 11:28:12 - * @LastEditTime: 2023-04-25 19:06:37 - * @LastEditors: lwh + * @LastEditTime: 2024-08-26 09:54:37 + * @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 diff --git a/gz-customerSystem/src/api/appUrl.js b/gz-customerSystem/src/api/appUrl.js index 12839b7..59a0128 100644 --- a/gz-customerSystem/src/api/appUrl.js +++ b/gz-customerSystem/src/api/appUrl.js @@ -2,20 +2,20 @@ * @Company: hugeInfo * @Author: ldh * @Date: 2022-02-16 11:25:57 - * @LastEditTime: 2024-08-23 09:35:11 + * @LastEditTime: 2024-08-27 10:02:01 * @LastEditors: dminyi 1301963064@qq.com * @Version: 1.0.0 * @Description: api地址 */ export const debug = { // web服务 - baseUrl: 'http://gz.hugeinfo.com.cn', - // baseUrl: 'http://192.168.3.108:9002', + // baseUrl: 'http://gz.hugeinfo.com.cn', + baseUrl: 'http://192.168.3.108:9002', // baseUrl: 'http://mdqgnh.natappfree.cc', // 附件服务 - // fileUrl: 'http://192.168.3.108:9002', - fileUrl: 'http://gz.hugeinfo.com.cn', + fileUrl: 'http://192.168.3.108:9002', + // fileUrl: 'http://gz.hugeinfo.com.cn', // 文件查看url 后面接附件编号 diff --git a/gz-customerSystem/src/components/Layout/index.jsx b/gz-customerSystem/src/components/Layout/index.jsx index 6585e1c..9120463 100644 --- a/gz-customerSystem/src/components/Layout/index.jsx +++ b/gz-customerSystem/src/components/Layout/index.jsx @@ -2,7 +2,7 @@ * @Company: hugeInfo * @Author: ldh * @Date: 2022-03-11 14:22:43 - * @LastEditTime: 2023-12-25 16:10:51 + * @LastEditTime: 2024-08-26 10:19:52 * @LastEditors: dminyi 1301963064@qq.com * @Version: 1.0.0 * @Description: 外层layout @@ -117,16 +117,17 @@ async function getRolePower(roleId, roleName) { global.setSpinning(true); const res = await getRolePowerApi(roleId); + console.log(res,'res1111') global.setSpinning(false); if (res.type) { let resData = res.data?.roleTreeBOS || []; let menu_data = []; let power_data = []; resData.forEach((x) => { - if (x.appClient === '1' && x.powerTag !== 'pay') { + if (x.appClient === 1 && x.powerTag !== 'pay') { menu_data.push(x); } - if (x.appClient === '1' || x.powerTag === 'pay') { + if (x.appClient === 1 || x.powerTag === 'pay') { power_data.push(x); } }); diff --git a/gz-customerSystem/src/components/MyTree/index.jsx b/gz-customerSystem/src/components/MyTree/index.jsx index ca03c39..494de01 100644 --- a/gz-customerSystem/src/components/MyTree/index.jsx +++ b/gz-customerSystem/src/components/MyTree/index.jsx @@ -2,8 +2,8 @@ * @Company: hugeInfo * @Author: ldh * @Date: 2022-02-25 18:16:28 - * @LastEditTime: 2022-11-25 09:37:34 - * @LastEditors: ldh + * @LastEditTime: 2024-08-26 10:27:36 + * @LastEditors: dminyi 1301963064@qq.com * @Version: 1.0.0 * @Description: 自定义带操作的树结构 */ @@ -53,7 +53,7 @@ arr2 = []; treeDataMap.forEach((item) => { const strTitle = item[nameStr]; - const index = strTitle.indexOf(searchValue); + const index = strTitle?.indexOf(searchValue); if (index > -1) { expandedKeys = Array.from(new Set([...expandedKeys, ...item.parentKeys])); } diff --git a/gz-customerSystem/src/components/basicInformation/organization/AddOrEditOrganization.jsx b/gz-customerSystem/src/components/basicInformation/organization/AddOrEditOrganization.jsx index c998d98..62d8c8e 100644 --- a/gz-customerSystem/src/components/basicInformation/organization/AddOrEditOrganization.jsx +++ b/gz-customerSystem/src/components/basicInformation/organization/AddOrEditOrganization.jsx @@ -100,7 +100,7 @@ > <Row gutter={[24, 16]}> <Col span={8}> - <Form.Item label="组织名称" name="name" required rules={[{ required: true }]}> + <Form.Item label="组织名称" name="unitName" required rules={[{ required: true }]}> <Input placeholder="请输入" allowClear /> </Form.Item> </Col> diff --git a/gz-customerSystem/src/components/basicInformation/organization/PersonModal.jsx b/gz-customerSystem/src/components/basicInformation/organization/PersonModal.jsx index 7ac5fed..a91e96c 100644 --- a/gz-customerSystem/src/components/basicInformation/organization/PersonModal.jsx +++ b/gz-customerSystem/src/components/basicInformation/organization/PersonModal.jsx @@ -2,8 +2,8 @@ * @Company: hugeInfo * @Author: ldh * @Date: 2022-02-24 09:48:22 - * @LastEditTime: 2022-10-31 12:01:23 - * @LastEditors: ldh + * @LastEditTime: 2024-08-26 14:58:09 + * @LastEditors: dminyi 1301963064@qq.com * @Version: 1.0.0 * @Description: 查看部门人员的modal */ @@ -93,7 +93,7 @@ title: '状态', dataIndex: 'status', width: 50, - render: (text) => <span style={{ color: text === '1' ? '#52C41A' : '#BFBFBF' }}>{text === '1' ? '正常' : '停用'}</span>, + render: (text) => <span style={{ color: text === 1 ? '#52C41A' : '#BFBFBF' }}>{text === 1 ? '正常' : '停用'}</span>, }, ]; diff --git a/gz-customerSystem/src/components/basicInformation/personnel/PersonnelPage.jsx b/gz-customerSystem/src/components/basicInformation/personnel/PersonnelPage.jsx index b5e18d1..ffe6ba8 100644 --- a/gz-customerSystem/src/components/basicInformation/personnel/PersonnelPage.jsx +++ b/gz-customerSystem/src/components/basicInformation/personnel/PersonnelPage.jsx @@ -2,8 +2,8 @@ * @Company: hugeInfo * @Author: ldh * @Date: 2022-02-25 14:40:57 - * @LastEditTime: 2022-11-03 11:35:05 - * @LastEditors: ldh + * @LastEditTime: 2024-08-26 10:56:05 + * @LastEditors: dminyi 1301963064@qq.com * @Version: 1.0.0 * @Description: 人员信息列表页面 */ @@ -121,7 +121,7 @@ title: '状态', dataIndex: 'status', width: 50, - render: (text) => <span style={{ color: text === '1' ? '#52C41A' : '#BFBFBF' }}>{text === '1' ? '正常' : '停用'}</span>, + render: (text) => <span style={{ color: text === 1 ? '#52C41A' : '#BFBFBF' }}>{text === 1 ? '正常' : '停用'}</span>, }, { title: '操作', @@ -138,7 +138,7 @@ {/* 22_00024-2超级管理员不可操作 */} {!record.ctUseroleList?.filter((item) => item.roleCode === '22_00024-2').length && ( <> - {record.status === '1' ? ( + {record.status === 1 ? ( <Popconfirm title="是否确认停用该账号?" onConfirm={() => handleEditPerson('stop', record)}> <Link disabled={userId === record.id}>停用</Link> </Popconfirm> diff --git a/gz-customerSystem/src/views/basicInformation/organization/index.jsx b/gz-customerSystem/src/views/basicInformation/organization/index.jsx index 2eb9939..89ab9c8 100644 --- a/gz-customerSystem/src/views/basicInformation/organization/index.jsx +++ b/gz-customerSystem/src/views/basicInformation/organization/index.jsx @@ -2,7 +2,7 @@ * @Company: hugeInfo * @Author: ldh * @Date: 2022-02-18 15:04:13 - * @LastEditTime: 2024-08-13 16:04:30 + * @LastEditTime: 2024-08-26 10:36:48 * @LastEditors: dminyi 1301963064@qq.com * @Version: 1.0.0 * @Description: 组织架构 @@ -159,6 +159,7 @@ } } } + console.log(organizationData,'organizationData') // 新增 or 修改组织 async function setOrganization(submitType, values, form) { @@ -334,7 +335,7 @@ <MyTree active={organizationActive.id} keyStr="id" - nameStr="name" + nameStr="unitName" data={organizationData} searchValue={organizationSearch.searchValue} dropdownOption={dropdownOptions} diff --git a/gz-customerSystem/src/views/basicInformation/organization/index.less b/gz-customerSystem/src/views/basicInformation/organization/index.less index 79084e8..812f8bd 100644 --- a/gz-customerSystem/src/views/basicInformation/organization/index.less +++ b/gz-customerSystem/src/views/basicInformation/organization/index.less @@ -56,25 +56,6 @@ } } -.arco-form-label-item .arco-form-item-tooltip { - color: #1A6FB8; -} - - -//大厅来访 -.must { - font-size: 12px; - color: rgb(245, 63, 63); - background-color: rgb(255, 236, 232); - line-height: 20px; - padding: 0px 4px; - border-radius: 2px; - margin-left: 8px; -} - -.arco-btn-primary:not(.arco-btn-disabled) { - background-color: @main-color; -} diff --git a/gz-customerSystem/src/views/basicInformation/personnel/index.jsx b/gz-customerSystem/src/views/basicInformation/personnel/index.jsx index 3e92cf3..97a56ae 100644 --- a/gz-customerSystem/src/views/basicInformation/personnel/index.jsx +++ b/gz-customerSystem/src/views/basicInformation/personnel/index.jsx @@ -2,8 +2,8 @@ * @Company: hugeInfo * @Author: ldh * @Date: 2022-02-20 20:26:41 - * @LastEditTime: 2022-08-02 16:51:06 - * @LastEditors: ldh + * @LastEditTime: 2024-08-26 10:42:51 + * @LastEditors: dminyi 1301963064@qq.com * @Version: 1.0.0 * @Description: 人员信息 */ @@ -146,6 +146,7 @@ global.setSpinning(false); if (res.type) { let resData = res.data || {}; + console.log(resData,'resData') tableData.countZzStatus = resData.countZzStatus; tableData.total = resData.ctUserPage?.totalElements; tableData.data = resData.ctUserPage?.content; diff --git a/gz-customerSystem/src/views/basicInformation/role/index.jsx b/gz-customerSystem/src/views/basicInformation/role/index.jsx index 2200ac9..a84d475 100644 --- a/gz-customerSystem/src/views/basicInformation/role/index.jsx +++ b/gz-customerSystem/src/views/basicInformation/role/index.jsx @@ -2,8 +2,8 @@ * @Company: hugeInfo * @Author: ldh * @Date: 2022-02-18 15:12:34 - * @LastEditTime: 2022-08-02 15:53:17 - * @LastEditors: ldh + * @LastEditTime: 2024-08-26 10:24:36 + * @LastEditors: dminyi 1301963064@qq.com * @Version: 1.0.0 * @Description: 角色管理 */ @@ -157,6 +157,7 @@ async function getRolePower(roleId, isChange) { global.setSpinning(true); const res = await getRolePowerApi(roleId); + console.log(res,'res22222') global.setSpinning(false); if (res.type) { if (isChange) { @@ -211,6 +212,7 @@ getAllData(); }, []); + // 角色操作 const dropdownOption = ({ value }) => value.id === 'none' ? null : ( diff --git a/gz-customerSystem/src/views/register/visit/component/map.jsx b/gz-customerSystem/src/views/register/visit/component/map.jsx index 54fbabc..c319d6b 100644 --- a/gz-customerSystem/src/views/register/visit/component/map.jsx +++ b/gz-customerSystem/src/views/register/visit/component/map.jsx @@ -2,7 +2,7 @@ * @Author: dminyi 1301963064@qq.com * @Date: 2024-08-17 14:41:57 * @LastEditors: dminyi 1301963064@qq.com - * @LastEditTime: 2024-08-23 17:06:13 + * @LastEditTime: 2024-08-27 10:17:49 * @FilePath: \gzDyh\gz-customerSystem\src\views\register\visit\component\map.jsx * @Description: 地图 */ @@ -21,11 +21,16 @@ }, }; +// var map = new window.BMapGL.Map("container"); +// map.centerAndZoom(new window.BMapGL.Point(116.401952, 40.032704), 12); +// map.enableScrollWheelZoom(); + + + export default function MapView(props) { const mapRef = useRef() const formRef = useRef() const [addressList, setAddressList] = useState([]) - useEffect(() => { if (mapRef.current) { @@ -40,6 +45,19 @@ } }, [mapRef]); + // const addCustomLabel = (point, content) => { + // var label = new window.BMapGL.Label(content, { + // position: point, + // offset: new window.BMapGL.Size(10, 20) + // }); + // label.setStyle({ + // color: '#000', + // fontSize: '30px', + // border: '2px solid #1E90FF' + // }); + // mapRef.current.map.addOverlay(label); + // }; + const handleSubmit = () => { if (formRef.current) { formRef.current.validate(undefined, (errors, values) => { @@ -51,7 +69,7 @@ mapRef.current.map.centerAndZoom(point, 15); mapRef.current.map.addOverlay(new window.BMapGL.Marker(point, { title: values.name })); handleAnalysis(point, values.name); // 添加地点名称 - // searchNearbyPOIs(point); + // addCustomLabel(point, 'label'); // 添加自定义样式标签 } else { Message.warning('您输入的地址没有解析到结果!'); } @@ -60,6 +78,8 @@ }); } }; + + // 解析地址为中文 const handleAnalysis = (pt, name) => { @@ -72,41 +92,22 @@ if (name) { addName += ` ${name}`; // 添加地点名称 } - mapRef.current.map.centerAndZoom(pt, 15); - mapRef.current.map.addOverlay(new window.BMapGL.Marker(pt, { title: addName })); + mapRef.current?.map.centerAndZoom(pt, 15); + mapRef.current?.map.addOverlay(new window.BMapGL.Marker(pt, { title: addName })); setAddressList(surroundingPois); + console.log(pt, addName, 'pt', 'addName') }); }; - - // 搜索附近的POI - const searchNearbyPOIs = (centerPoint) => { - const radius = 10; // 半径10米 - const circle = new window.BMapGL.Circle(centerPoint, { - strokeColor: "#FF0000", - strokeOpacity: 0.9, - strokeWeight: 2, - fillColor: "#FF0000", - fillOpacity: 0.1, - radius: radius - }); - - mapRef.current.map.addOverlay(circle); - - const poiSearch = new window.BMapGL.PoiSearch(mapRef.current.map, { - searchComplete: function (results) { - if (results.status === window.BMapGL.RESULT_SUCCESS) { - const pois = results.pois.map(poi => poi.name); - setAddressList([...addressList, ...pois]); - } - } - }); - - poiSearch.searchInCircle('', circle); - }; - - console.log(addressList, 'addressList') + + + + + + + + return ( <div> @@ -141,8 +142,13 @@ onClick={(e) => { let pt = e.latlng; handleAnalysis(pt, null); + // addCustomLabel(pt, 'label'); // 添加自定义样式标签 }} > + <Marker position={{ lng: 116.402544, lat: 39.928216 }} /> + <NavigationControl /> + <InfoWindow position={{ lng: 116.402544, lat: 39.928216 }} text="内容" title="标题" /> + </Map> </Col> <Col span={8}> -- Gitblit v1.8.0