保安服务企业管理项目备份
guoshilong
2023-12-23 e2c9365138e3b9a2bcf046dbda9438458ea6073b
图片大小修改
2 files modified
91 ■■■■ changed files
public/securityInfo.html 3 ●●●● patch | view | raw | blame | history
src/views/check/components/OlMapBox.vue 88 ●●●● patch | view | raw | blame | history
public/securityInfo.html
@@ -155,8 +155,7 @@
  axios.get('http://60.220.177.113:2081/api/qrCode/getUserInfo?securityNumber=' + securityNumber).then(function (res) {
    // axios.get('http://192.168.0.104:81/qrCode/getUserInfo?securityNumber=' + securityNumber).then(function(res) {
    // axios.get('http://192.168.0.114:81/qrCode/getUserInfo?securityNumber=赣洪202115423').then(function(res) {
    var data = res.data;
    var data = res.data.data;
    // console.log(data, 456);
    //计算生日
    var birthday = data.cardid.substring(6, 10) + "." + data.cardid.substring(10, 12) + "." + data.cardid.substring(12, 14);
src/views/check/components/OlMapBox.vue
@@ -134,7 +134,7 @@
                layers: [],
                view: new OlView({
                    // 初始化中心点坐标,经纬度一会自己换一下
                    center: [113, 24],
                    center: [114.89844546788195, 25.861142035590277],
                    zoom: 18,
                    projection: "EPSG:4326"
                }),
@@ -255,11 +255,11 @@
            }
            if (params.url) {
                styleOptions.image = new Icon({
                    scale: params.scale || 1,
                    imgSize: params.imgSize || [160, 221],
                    src: params.url,
                })
              styleOptions.image = new Icon({
                scale: params.scale || 1,
                imgSize: params.imgSize || [32, 32],
                src: params.url,
              })
            }
            if (params.text) {
@@ -284,8 +284,8 @@
                    }),
                    padding: [2, 5, 2, 5],
                    stroke: new Stroke({ color: '#00000000', width: 1 }),
                    offsetX: -60,
                    offsetY: -60
                    // offsetX: -60,
                    offsetY: 30
                })
            }
@@ -325,7 +325,7 @@
        // 添加聚合图层的新模式,水库点分布
        mapAddClusterLayer (layerName, imgUrl, positionData, incident = (e) => { }, type = '') {
            const that = this
            console.log(layersObjcect,layerName,positionData,"+++++++++++++")
            if (!layersObjcect[layerName]) {
                if (type == 'cluster') {
                    let source = new VectorSource()
@@ -348,40 +348,40 @@
                    layersObjcect[layerName] = new VectorLayer({
                        source: layer,
                        zIndex: 24,
                        style: (feature, resolution) => {
                            let size = feature.get('features').length
                            let radius = 10
                            if (size > 900) {
                                radius = 19
                            } else if (size > 600) {
                                radius = 16
                            } else if (size > 400) {
                                radius = 13
                            }
                            let style = new Style({
                                image: new Circle({
                                    radius: radius,
                                    stroke: new Stroke({
                                        color: 'blue',
                                        width: 1
                                    }),
                                    fill: new Fill({
                                        color: 'blue'
                                    })
                                }),
                                text: new Text({
                                    text: size.toString(),
                                    fill: new Fill({
                                        color: 'white'
                                    })
                                })
                            })
                            return style
                        }
                        // style: (feature, resolution) => {
                        //     let size = feature.get('features').length
                        //
                        //     let radius = 10
                        //
                        //     if (size > 900) {
                        //         radius = 19
                        //     } else if (size > 600) {
                        //         radius = 16
                        //     } else if (size > 400) {
                        //         radius = 13
                        //     }
                        //
                        //     let style = new Style({
                        //         image: new Circle({
                        //             radius: radius,
                        //             stroke: new Stroke({
                        //                 color: 'blue',
                        //                 width: 1
                        //             }),
                        //             fill: new Fill({
                        //                 color: 'blue'
                        //             })
                        //         }),
                        //         text: new Text({
                        //             text: size.toString(),
                        //             fill: new Fill({
                        //                 color: 'white'
                        //             })
                        //         })
                        //     })
                        //
                        //     return style
                        // }
                    })
                    mapView.addLayer(layersObjcect[layerName])
@@ -404,7 +404,7 @@
                    item,
                    lng: item.lng,
                    lat: item.lat,
                    text: item.text,
                    text: item.realName,
                    url: imgUrl,
                    event: incident
                }))