上饶市警务平台后台管理前端
guoshilong
2023-02-15 6cfa3b57cc57b564af6e60376ac88592a8c8b99b
src/views/security/security.vue
@@ -19,7 +19,8 @@
        </el-button>
      </template>
      <template slot="activityAreaForm">
        <map-box ref="OpenLayersMap" @toData="toData" :routeRange="form.activityArea"></map-box>
<!--        <map-box ref="OpenLayersMap" @toData="toData" :routeRange="form.activityArea"></map-box>-->
        <dc-map ref="dcMap" @toData="toData" :range="form.activityArea"></dc-map>
      </template>
    </avue-crud>
@@ -55,9 +56,11 @@
import securityManageCar from "@/views/securityManageCar/securityManageCar"
import MapBox from "@/components/map/mapBox";
import SearchMap from "@/components/map/searchMap";
import DcMap from "@/components/map/dcMap";
export default {
  components: {
    DcMap,
    SearchMap,
    MapBox,
    securityManage,
@@ -339,10 +342,7 @@
        loading()
        return
      }
      if (row.activityArea.startsWith("LINESTRING")){
      }else {
      if (!row.activityArea.startsWith("'LINESTRING")){
        row.activityArea = "'LINESTRING("+row.activityArea+")'"
      }
      row.position = row.longitude + " " + row.latitude
@@ -405,6 +405,7 @@
          this.form['longitude'] = data.position.split(" ")[0]
          this.form['latitude'] = data.position.split(" ")[1]
          this.point = "POINT("+this.form.longitude +" "+this.form.latitude+")"
          this.$refs.dcMap.showPolygon(this.form.activityArea)
        })
      }
      done()