pyt
2025-03-04 6fbfc398aceff7dcedebf9cc723718908be975f3
Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/H5/threeSide
4个文件已修改
84 ■■■■ 已修改文件
H5/pages/location/location.vue 78 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/src/pages/Login/index.tsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/src/pages/setting/career/components/addAndEdit.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/src/pages/work-order-setting/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/pages/location/location.vue
@@ -50,6 +50,56 @@
            };
        },
        methods: {
             outOfChina(lng, lat) {
                return (lng < 72.004 || lng > 137.8347) || (lat < 0.8293 || lat > 55.8271);
            },
            // 纬度转换函数
             transformLat(x, y) {
                let ret = -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y + 0.2 * Math.sqrt(Math.abs(x));
                ret += (20.0 * Math.sin(6.0 * x * Math.PI) + 20.0 * Math.sin(2.0 * x * Math.PI)) * 2.0 / 3.0;
                ret += (20.0 * Math.sin(y * Math.PI) + 40.0 * Math.sin(y / 3.0 * Math.PI)) * 2.0 / 3.0;
                ret += (160.0 * Math.sin(y / 12.0 * Math.PI) + 320 * Math.sin(y * Math.PI / 30.0)) * 2.0 / 3.0;
                return ret;
            },
            // 经度转换函数
             transformLon(x, y) {
                let ret = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 * Math.sqrt(Math.abs(x));
                ret += (20.0 * Math.sin(6.0 * x * Math.PI) + 20.0 * Math.sin(2.0 * x * Math.PI)) * 2.0 / 3.0;
                ret += (20.0 * Math.sin(x * Math.PI) + 40.0 * Math.sin(x / 3.0 * Math.PI)) * 2.0 / 3.0;
                ret += (150.0 * Math.sin(x / 12.0 * Math.PI) + 300.0 * Math.sin(x / 30.0 * Math.PI)) * 2.0 / 3.0;
                return ret;
            },
            // WGS - 84 转 GCJ - 02
             wgs84ToGcj02(lng, lat) {
                if (this.outOfChina(lng, lat)) {
                    return [lng, lat];
                }
                let dLat = this.transformLat(lng - 105.0, lat - 35.0);
                let dLng = this.transformLon(lng - 105.0, lat - 35.0);
                let radLat = lat / 180.0 * Math.PI;
                let magic = Math.sin(radLat);
                magic = 1 - 0.00669342162296594323 * magic * magic;
                let sqrtMagic = Math.sqrt(magic);
                dLat = (dLat * 180.0) / ((6378245.0 / (1 - magic)) * Math.cos(radLat) * Math.PI);
                dLng = (dLng * 180.0) / (6378245.0 / sqrtMagic * Math.cos(radLat) * Math.PI);
                let mgLat = lat + dLat;
                let mgLng = lng + dLng;
                return [mgLng, mgLat];
            },
            // GCJ - 02 转 BD - 09
             gcj02ToBd09(lng, lat) {
                let x = lng;
                let y = lat;
                let z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * 3000.0 * Math.PI / 180.0);
                let theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * 3000.0 * Math.PI / 180.0);
                let bdLng = z * Math.cos(theta) + 0.0065;
                let bdLat = z * Math.sin(theta) + 0.006;
                return [bdLng, bdLat];
            },
            clearMarkers() {
                // 清除所有标点
                this.markers.forEach((marker) => {
@@ -139,14 +189,22 @@
            // uni.getLocation({
            //     type: 'wgs84',
            //     success: (res) => {
            // 判断是否在中国境外
            navigator.geolocation.getCurrentPosition(success, error, options);
            function success(position) {
                const latitude = position.coords.latitude;
                const longitude = position.coords.longitude;
                let arr = that.wgs84ToGcj02(longitude, latitude);
                // 转换为 BD - 09
                let arrs = that.gcj02ToBd09(arr[0], arr[1]);
                const accuracy = position.coords.accuracy; // 精度,单位米
                //  在这里可以使用获取到的经纬度信息,例如在地图上显示位置等。
                var point = new BMapGL.Point(longitude, latitude); // 创建点坐标
                var point = new BMapGL.Point(arrs[0], arrs[1]); // 创建点坐标
                that.map.enableScrollWheelZoom(true);
                that.map.centerAndZoom(point, 12);
                var marker = new BMapGL.Marker(point);
@@ -154,8 +212,7 @@
                that.markers.push(marker);
                var myGeo = new BMapGL.Geocoder();
                // 根据坐标得到地址描述    
                myGeo.getLocation(new BMapGL.Point(longitude, latitude), (result) => {
                    that.city = result.addressComponents.city
                myGeo.getLocation(new BMapGL.Point(arrs[0], arrs[1]), (result) => {
                    that.locationList = result.surroundingPois.map((item, index) => {
                        item.id = index + 1
                        return item
@@ -201,14 +258,17 @@
                            item.id = index + 1
                            return item
                        })
                    }else{
                        this.locationList =[{
                            id:1,
                            title:result.address,
                            point:{lat:e.latlng.lat,lng:e.latlng.lng}
                    } else {
                        this.locationList = [{
                            id: 1,
                            title: result.address,
                            point: {
                                lat: e.latlng.lat,
                                lng: e.latlng.lng
                            }
                        }]
                    }
                })
                var marker = new BMapGL.Marker(point);
                this.map.addOverlay(marker);
management/src/pages/Login/index.tsx
@@ -89,7 +89,7 @@
      "/system_setting/position_management/edit",
      "/system_setting/people_management/del",
      "/work_order_transaction_management/problem_type_management/edit",
      "/position_management/del",
      "/system_setting/position_management/del",
      "/system_setting/unit_management/edit",
      "/system_setting/people_management/edit",
      "/work_order_transaction_management/problem_type_management/add",
management/src/pages/setting/career/components/addAndEdit.jsx
@@ -43,7 +43,7 @@
      getContainer={false}
      width="25%"
      destroyOnClose
      title={editData.deptId ? '编辑职位' : '添加职位'}
      title={editData.id ? '编辑职位' : '添加职位'}
      open={visible}
      onCancel={() => onCancel(false)}
      footer={[
management/src/pages/work-order-setting/index.jsx
@@ -44,7 +44,7 @@
        <div>
            <PageContainer
                header={{
                    title: '述求事项配置',
                    title: '诉求事项配置',
                    breadcrumb: {},
                }}
            >