管道基础大数据平台系统开发-【前端】-新系統界面
surprise
2024-05-09 e897fc3d35f8e5dfa56d5f0c80a655ccf99202cf
src/components/ProjectOl.vue
@@ -73,11 +73,20 @@
  },
  methods: {
    initOlMap() {
      var val = 'http://{host}/LFData/2d/tiles/img/{z}/{x}/{y}.png';
      if (val.indexOf('{host}') > -1) {
        val = val.replace("{host}", iisHost)
      }
      var vectorLayer = new TileLayer({
        source: new XYZ({
          url: 'http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}',
          url: val,
        }),
      });
      this.mapol = new Map({
        target: 'mapView',
        layers: [vectorLayer],
@@ -164,8 +173,9 @@
      });
    },
    async showLoacation(res) {
      this.formInline.lon = res[0].toFixed(6);
      this.formInline.lat = res[1].toFixed(6);
      this.formInline.lon = parseFloat(res[0]).toFixed(6);
      this.formInline.lat = parseFloat(res[1]).toFixed(6);
      const data = await project_selectLocation({
        x: res[0],
        y: res[1],