Browse Source

井史简介

xiaoqiao 1 year ago
parent
commit
d7a734998d
29 changed files with 8051 additions and 112 deletions
  1. 1 0
      src/main/java/com/bowintek/practice/config/WebConfiguration.java
  2. 0 78
      src/main/java/com/bowintek/practice/services/impl/PositionServiceImpl.java
  3. 1 0
      src/main/resources/static/a4gis/esri.css
  4. 77 0
      src/main/resources/static/a4gis/gcontrols/v1.0.5/lib/draw-query-simple.js
  5. 95 0
      src/main/resources/static/a4gis/gcontrols/v1.0.5/lib/map-mini-btn.js
  6. 24 0
      src/main/resources/static/a4gis/gcontrols/v1.0.5/lib/map2image.js
  7. 2 0
      src/main/resources/static/a4gis/gcontrols/v1.0.5/third/Tdrag.min.js
  8. 407 0
      src/main/resources/static/a4gis/gcontrols/v1.0.5/third/terraformer/terraformer-arcgis-parser.js
  9. 761 0
      src/main/resources/static/a4gis/gcontrols/v1.0.5/third/terraformer/terraformer-wkt-parser.js
  10. 1418 0
      src/main/resources/static/a4gis/gcontrols/v1.0.5/third/terraformer/terraformer.js
  11. 310 0
      src/main/resources/static/a4gis/gmap/v1.15.9/Common.js
  12. 143 0
      src/main/resources/static/a4gis/gmap/v1.15.9/FlashGeo.js
  13. 158 0
      src/main/resources/static/a4gis/gmap/v1.15.9/LayerMgr.js
  14. 169 0
      src/main/resources/static/a4gis/gmap/v1.15.9/LineFlow.js
  15. 225 0
      src/main/resources/static/a4gis/gmap/v1.15.9/MapControl.js
  16. 200 0
      src/main/resources/static/a4gis/gmap/v1.15.9/MapInit.js
  17. 2114 0
      src/main/resources/static/a4gis/gmap/v1.15.9/MapLoad.js
  18. 160 0
      src/main/resources/static/a4gis/gmap/v1.15.9/SymbolMgr.js
  19. 720 0
      src/main/resources/static/a4gis/gmap/v1.15.9/Tools.js
  20. 3 0
      src/main/resources/static/a4gis/gmap/v1.15.9/gmap.css
  21. 884 0
      src/main/resources/static/a4gis/index.html
  22. 63 0
      src/main/resources/static/a4gis/init-gcontrols.js
  23. 62 0
      src/main/resources/static/a4gis/init-gmap.js
  24. 5 0
      src/main/resources/static/a4gis/jquery.min.js
  25. BIN
      target/classes/com/bowintek/practice/config/WebConfiguration.class
  26. 3 3
      vue/src/components/basic/chart/chart-map.vue
  27. 1 1
      vue/src/router/constant.ts
  28. 40 29
      vue/src/views/wellinfo/detail.vue
  29. 5 1
      vue/src/views/wellinfo/index.vue

+ 1 - 0
src/main/java/com/bowintek/practice/config/WebConfiguration.java

@@ -64,6 +64,7 @@ public class WebConfiguration implements WebMvcConfigurer {
         excludePath.add("/mobile/**");  //静态资源
         excludePath.add("/web/**");  //静态资源
         excludePath.add("/doc/**");  //静态资源
+        excludePath.add("/a4gis/**");  //地图
         excludePath.add("/");  //首页跳转
         excludePath.add("/api/account/testpost");//单点登录
         registry.addInterceptor(tokenInterceptor)

+ 0 - 78
src/main/java/com/bowintek/practice/services/impl/PositionServiceImpl.java

@@ -82,84 +82,6 @@ public class PositionServiceImpl implements PositionService {
     public List<ImportPositionModel> importData(List<ImportPositionModel> dataList, String userID) {
         if (dataList.size() <= 0)
             throw new BaseException("", "请添加导入数据!");
-
-        List<CfPosition> addList = new ArrayList<>();
-       /* List<CfPosition> dbPositionList = positionMapper.selectByExample(null);
-        List<CfPracticeBase> dbPracticeBaseList = practiceBaseMapper.selectByExample(null);
-        List<CfSchoolyear> dbSchoolyearList = schoolyearMapper.selectByExample(null);
-        List<CfMajorGrade> dbMajorGradeList = majorGradeMapper.selectByExample(null);
-
-
-        dataList.forEach(item -> {
-            CfPosition data = new CfPosition();
-            String errorInfo = "";
-            CfPracticeBase practiceBase = dbPracticeBaseList.stream().filter(e -> e.getName().equals(item.practiceBaseName)).findFirst().orElse(null);
-            CfSchoolyear schoolyear = dbSchoolyearList.stream().filter(e -> !stringUtils.IsNullOrEmpty(item.startYear) && e.getStartYear().equals(Integer.parseInt(item.startYear.trim()))).findFirst().orElse(null);
-            CfMajorGrade majorGrade = dbMajorGradeList.stream().filter(e -> e.getName().equals(item.majorGradeName)).findFirst().orElse(null);
-            Integer qty = 0;
-
-            if (stringUtils.IsNullOrEmpty(item.startYear))
-                errorInfo += "请填写实习开始年份!";
-
-            if (stringUtils.IsNullOrEmpty(item.majorGradeName))
-                errorInfo += "请填写年级专业名称!";
-
-            if (stringUtils.IsNullOrEmpty(item.practiceBaseName))
-                errorInfo += "请填写所属单位!";
-
-            if (stringUtils.IsNullOrEmpty(item.name))
-                errorInfo += "请填写岗位名称!";
-
-            if (stringUtils.IsNullOrEmpty(item.qty))
-                errorInfo += "请填写岗位数量!";
-            else {
-                try {
-                    qty = Integer.parseInt(item.qty.trim());
-                } catch (Exception ex) {
-                    errorInfo += "岗位数量填写错误!";
-                }
-            }
-
-            if (schoolyear == null)
-                errorInfo += "实习开始年份匹配失败!";
-
-            if (majorGrade == null)
-                errorInfo += "年级专业名称匹配失败!";
-
-            if (practiceBase == null)
-                errorInfo += "所属单位匹配失败!";
-
-            if (!stringUtils.IsNullOrEmpty(item.name) && schoolyear != null && majorGrade != null && practiceBase != null
-                    && dbPositionList.stream().filter(e -> item.name.equals(e.getName()) && schoolyear.getSchoolYearID().equals(e.getSchoolYearID()) && majorGrade.getMajorGradeID().equals(e.getMajorGradeID()) && practiceBase.getPracticeBaseID().equals(e.getPracticeBaseID())).count() > 0
-            ) {
-                errorInfo += "该学年、专业、单位已录入岗位名称为" + item.name.trim() + "的数据!";
-            }
-
-
-            if (stringUtils.IsNullOrEmpty(errorInfo)) {
-                data.setPositionID(UUID.randomUUID().toString());
-                data.setSchoolYearID(schoolyear.getSchoolYearID());
-                data.setPracticeBaseID(practiceBase.getPracticeBaseID());
-                data.setMajorGradeID(majorGrade.getMajorGradeID());
-                data.setName(item.getName().trim());
-                data.setQty(qty);
-                data.setRecordStatus(1);
-                data.setCreateBy(userID);
-                data.setCreateTime(new Date());
-                data.setArrangementID(1);
-                data.setRemark(item.getRemark());
-
-                addList.add(data);
-            } else {
-                item.setErrorMessage(errorInfo);
-            }
-        });
-
-        if (dataList.stream().filter(it -> !stringUtils.IsNullOrEmpty(it.errorMessage)).collect(Collectors.toList()).size() > 0)
-            return dataList;
-
-        positionCQuery.batchInsertPosition(addList);
-*/
         return null;
     }
 

File diff suppressed because it is too large
+ 1 - 0
src/main/resources/static/a4gis/esri.css


+ 77 - 0
src/main/resources/static/a4gis/gcontrols/v1.0.5/lib/draw-query-simple.js

@@ -0,0 +1,77 @@
+/**
+*绘图查询加弹框展示结果实现
+**/
+define([
+    "dojo/_base/declare",
+    "gcontrols/control-base",
+    "gcontrols/draw-query", "gcontrols/result-list-show", "gcontrols/pop-window"
+], function (declare, ControlBase, DrawQuery, ResultListShow, PopWindow
+) {
+    return declare([ControlBase],
+        {
+            defaults: {//默认参数对象
+                class: "g-draw-query-simple",
+                drawQueryOptions: {},
+                popWindowOptions: {},
+                resultListShowOptions: {}
+            },
+            drawQuery: null,//画图查询对象
+            resultListShow: null,//结果展示对象
+            popWindow: null,
+            $result: null,
+            controlName: "g-draw-query-simple",
+            constructor: function (options) {
+                if (!this.mainMap) {
+                    console.error("map参数不能为空");
+                }
+            },
+            createEl: function (options) {
+                var _this = this;
+                var drawQueryOptions = $.extend({}, options, options.drawQueryOptions, { map: this.mainMap });//设置参数
+                this.drawQuery = new DrawQuery(drawQueryOptions).startup();
+                this.$result = $("<div></div>");
+                var popWindowOptions = $.extend({}, options, options.popWindowOptions, { el: this.$result });//设置参数
+                var resultListShowOptions = $.extend({}, options, options.resultListShowOptions, { map: this.mainMap, el: this.$result })
+                this.resultListShow = new ResultListShow(resultListShowOptions).startup();
+
+                //added@20191226 by caolijun-start
+                this.resultListShow.on("clickLocation", function (e) {
+                    _this.emit("clickLocation", e);
+                });
+                this.resultListShow.on("beforeLocation", function (e) {
+                    _this.emit("beforeLocation", e);
+                });
+                this.resultListShow.on("clickDetails", function (e) {
+                    _this.emit("clickDetails", e);
+                });
+                //added@20191226 by caolijun-end
+                this.popWindow = new PopWindow(popWindowOptions).startup();
+            },
+
+            bindEvent: function (options) {
+                var _this = this;
+                _this.drawQuery.on("queryEnd", function (e) {//查询完将结果进行展示
+                    _this.resultListShow.setShowInfo(e.searchInfos);
+                    _this.popWindow.open();
+                });
+            },
+            getPopWindow: function () {
+                return this.popWindow;
+            },
+            getDrawQuery: function () {
+                return this.drawQuery;
+            },
+            getResultListShow: function () {
+                return this.resultListShow;
+            },
+            //通用draw
+            draw: function (drawType) {
+                this.drawQuery.draw(drawType);
+            },
+            //无绘制查询
+            queryWithGeometry: function (geometry) {
+                this.drawQuery.executeQueryWithGeometry(geometry);
+            }
+        });
+});
+

+ 95 - 0
src/main/resources/static/a4gis/gcontrols/v1.0.5/lib/map-mini-btn.js

@@ -0,0 +1,95 @@
+define(['dojo/_base/declare', 'gcontrols/map2Image'], function (declare, Map2Image) {
+    return declare(null, {
+        constructor: function (options) {
+            if (!options.map) {
+                console.log('no map!');
+                return;
+            }
+            if (!options.operation) {
+                console.log('no operation!');
+                return;
+            }
+            this.activeOperation = ['zoomIn', 'zoomOut', 'pan', 'zoomToPrevExtent',
+                'zoomToNextExtent', 'measureDis', 'measureArea', 'clear', 'gridLayer', 'map2image', 'fullMap'];
+            this.activeOperation_title = ['拉框放大', '拉框缩小', '地图平移', '上一视图',
+                '下一视图', '测距', '测面', '清除', '经纬度网格', '导出图片', '回到主视图'];
+            if (this.activeOperation.indexOf(options.operation) == -1) {
+                console.log('invalid operation!');
+                return;
+            }
+            this.map2Imager = null;
+            this.mainMap = options.map;
+            this.$panel = options.el ? $(options.el) : $('body');
+            this.elLeft = options.left ? options.left : 10;
+            this.elTop = options.top ? options.top : 10;
+            this.elWidth = options.width ? options.width : 40;
+            this.elHeight = options.height ? options.height : 40;
+            this.zIndex = options.zIndex == undefined ? 999 : options.zIndex;
+            this.btnType = options.operation;
+            this.icon = options.iconClass ? options.iconClass : this.btnType + '-icon';
+            this.title = options.title ? options.title : this.activeOperation_title[this.activeOperation.indexOf(options.operation)];
+            this.gridLayerShow = false;
+            this.concernDrawer = options.concerndraw;
+            this._initElement();
+        },
+        _initElement: function () {
+            var _this = this;
+            this.$miniBtn = $(['<div style="left:', this.elLeft, 'px;top:', this.elTop,
+                'px;height:', this.elHeight, 'px;width:', this.elWidth, 'px" class="gcontrols-minibtn ', this.icon, '" title="', this.title, '"></div>'].join(''));
+            this.$panel.append(this.$miniBtn);
+            this.$miniBtn.click(function () {
+                _this._activeClick();
+            })
+        },
+        _activeClick: function () {
+            switch (this.btnType) {
+                case 'zoomIn':
+                    this.mainMap.ZoomIn();
+                    break;
+                case 'zoomOut':
+                    this.mainMap.ZoomOut();
+                    break;
+                case 'pan':
+                    this.mainMap.Pan();
+                    break;
+                case 'zoomToPrevExtent':
+                    this.mainMap.ZoomToPrevExtent();
+                    break;
+                case 'zoomToNextExtent':
+                    this.mainMap.ZoomToNextExtent();
+                    break;
+                case 'measureDis':
+                    this.mainMap.MeasureDis();
+                    break;
+                case 'measureArea':
+                    this.mainMap.MeasureArea();
+                    break;
+                case 'clear':
+                    var clearFlag = { cancel: false };
+                    this.emit('onClearBtnClick', clearFlag);
+                    if (clearFlag.cancel) return;
+                    this.mainMap.ClearMeasure();
+                    this.mainMap.ClearGraphic();
+                    if (this.concernDrawer) {
+                        this.concernDrawer.hideToolTip();
+                    }
+
+                    break;
+                case 'gridLayer':
+                    this.gridLayerShow = !this.gridLayerShow;
+                    this.mainMap.ShowGridLayer(this.gridLayerShow);
+                    break;
+                case 'map2image':
+                    if (!this.map2Imager) {
+                        this.map2Imager = new Map2Image(this.mainMap);
+                    }
+                    this.map2Imager.toImg();
+                    break;
+                case 'fullMap':
+                    this.mainMap.FullMap();
+                    break;
+            }
+
+        }
+    })
+})

+ 24 - 0
src/main/resources/static/a4gis/gcontrols/v1.0.5/lib/map2image.js

@@ -0,0 +1,24 @@
+/*需要支持promise*/
+define(['dojo/_base/declare', 'dojo/on', 'dojo/Evented', 'gcontrols/html2canvas', 'gcontrols/loading'], function (declare, on, Evented, html2canvas, Loader) {
+    return declare([Evented], {
+        constructor: function (map) {
+            this._map = map;
+            this.loading = new Loader({
+                text: "请稍候"
+            }).startup();
+        },
+        toImg: function () {
+            var _this = this;
+            //this.emit('onBeginOutPut');
+            this.loading.show();
+            html2canvas(document.querySelector('#' + this._map.MapID), { useCORS: true }).then(function (canvas) {
+                //_this.emit('onOutPutCompleted', canvas);
+                _this.loading.hide();
+                var imgURL = canvas.toDataURL('image/png');
+                var downa = $('<a style="display:none" download="map.png" href="' + imgURL + '"></a>');
+                $('body').append(downa);
+                downa[0].click();
+            })
+        }
+    })
+})

File diff suppressed because it is too large
+ 2 - 0
src/main/resources/static/a4gis/gcontrols/v1.0.5/third/Tdrag.min.js


+ 407 - 0
src/main/resources/static/a4gis/gcontrols/v1.0.5/third/terraformer/terraformer-arcgis-parser.js

@@ -0,0 +1,407 @@
+/* globals Terraformer */
+(function (root, factory) {
+
+  // Node.
+  if(typeof module === 'object' && typeof module.exports === 'object') {
+    exports = module.exports = factory(require('terraformer'));
+  }
+
+  // Browser Global.
+  if(typeof root.navigator === "object") {
+    if (!root.Terraformer){
+      throw new Error("Terraformer.ArcGIS requires the core Terraformer library. https://github.com/esri/Terraformer");
+    }
+    root.Terraformer.ArcGIS = factory(root.Terraformer);
+  }
+
+}(this, function(Terraformer) {
+  var exports = {};
+
+  // https://github.com/Esri/terraformer-arcgis-parser/issues/10
+  function decompressGeometry(str) {
+    var xDiffPrev = 0;
+    var yDiffPrev = 0;
+    var points = [];
+    var x, y;
+    var strings;
+    var coefficient;
+
+    // Split the string into an array on the + and - characters
+    strings = str.match(/((\+|\-)[^\+\-]+)/g);
+
+    // The first value is the coefficient in base 32
+    coefficient = parseInt(strings[0], 32);
+
+    for (var j = 1; j < strings.length; j += 2) {
+      // j is the offset for the x value
+      // Convert the value from base 32 and add the previous x value
+      x = (parseInt(strings[j], 32) + xDiffPrev);
+      xDiffPrev = x;
+
+      // j+1 is the offset for the y value
+      // Convert the value from base 32 and add the previous y value
+      y = (parseInt(strings[j + 1], 32) + yDiffPrev);
+      yDiffPrev = y;
+
+      points.push([x / coefficient, y / coefficient]);
+    }
+
+    return points;
+  }
+
+  // checks if the first and last points of a ring are equal and closes the ring
+  function closeRing(coordinates) {
+    if (!pointsEqual(coordinates[0], coordinates[coordinates.length - 1])) {
+      coordinates.push(coordinates[0]);
+    }
+    return coordinates;
+  }
+
+  // checks if 2 x,y points are equal
+  function pointsEqual(a, b) {
+    for (var i = 0; i < a.length; i++) {
+      if (a[i] !== b[i]) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  // shallow object clone for feature properties and attributes
+  // from http://jsperf.com/cloning-an-object/2
+  function clone(obj) {
+    var target = {};
+    for (var i in obj) {
+      if (obj.hasOwnProperty(i)) {
+        target[i] = obj[i];
+      }
+    }
+    return target;
+  }
+
+  // determine if polygon ring coordinates are clockwise. clockwise signifies outer ring, counter-clockwise an inner ring
+  // or hole. this logic was found at http://stackoverflow.com/questions/1165647/how-to-determine-if-a-list-of-polygon-
+  // points-are-in-clockwise-order
+  function ringIsClockwise(ringToTest) {
+    var total = 0,i = 0;
+    var rLength = ringToTest.length;
+    var pt1 = ringToTest[i];
+    var pt2;
+    for (i; i < rLength - 1; i++) {
+      pt2 = ringToTest[i + 1];
+      total += (pt2[0] - pt1[0]) * (pt2[1] + pt1[1]);
+      pt1 = pt2;
+    }
+    return (total >= 0);
+  }
+
+  // This function ensures that rings are oriented in the right directions
+  // outer rings are clockwise, holes are counterclockwise
+  function orientRings(poly){
+    var output = [];
+    var polygon = poly.slice(0);
+    var outerRing = closeRing(polygon.shift().slice(0));
+    if(outerRing.length >= 4){
+      if(!ringIsClockwise(outerRing)){
+        outerRing.reverse();
+      }
+
+      output.push(outerRing);
+
+      for (var i = 0; i < polygon.length; i++) {
+        var hole = closeRing(polygon[i].slice(0));
+        if(hole.length >= 4){
+          if(ringIsClockwise(hole)){
+            hole.reverse();
+          }
+          output.push(hole);
+        }
+      }
+    }
+
+    return output;
+  }
+
+  // This function flattens holes in multipolygons to one array of polygons
+  // [
+  //   [
+  //     [ array of outer coordinates ]
+  //     [ hole coordinates ]
+  //     [ hole coordinates ]
+  //   ],
+  //   [
+  //     [ array of outer coordinates ]
+  //     [ hole coordinates ]
+  //     [ hole coordinates ]
+  //   ],
+  // ]
+  // becomes
+  // [
+  //   [ array of outer coordinates ]
+  //   [ hole coordinates ]
+  //   [ hole coordinates ]
+  //   [ array of outer coordinates ]
+  //   [ hole coordinates ]
+  //   [ hole coordinates ]
+  // ]
+  function flattenMultiPolygonRings(rings){
+    var output = [];
+    for (var i = 0; i < rings.length; i++) {
+      var polygon = orientRings(rings[i]);
+      for (var x = polygon.length - 1; x >= 0; x--) {
+        var ring = polygon[x].slice(0);
+        output.push(ring);
+      }
+    }
+    return output;
+  }
+
+  function coordinatesContainCoordinates(outer, inner){
+    var intersects = Terraformer.Tools.arraysIntersectArrays(outer, inner);
+    var contains = Terraformer.Tools.coordinatesContainPoint(outer, inner[0]);
+    if(!intersects && contains){
+      return true;
+    }
+    return false;
+  }
+
+  // do any polygons in this array contain any other polygons in this array?
+  // used for checking for holes in arcgis rings
+  function convertRingsToGeoJSON(rings){
+    var outerRings = [];
+    var holes = [];
+    var x; // iterator
+    var outerRing; // current outer ring being evaluated
+    var hole; // current hole being evaluated
+
+    // for each ring
+    for (var r = 0; r < rings.length; r++) {
+      var ring = closeRing(rings[r].slice(0));
+      if(ring.length < 4){
+        continue;
+      }
+      // is this ring an outer ring? is it clockwise?
+      if(ringIsClockwise(ring)){
+        var polygon = [ ring ];
+        outerRings.push(polygon); // push to outer rings
+      } else {
+        holes.push(ring); // counterclockwise push to holes
+      }
+    }
+
+    var uncontainedHoles = [];
+
+    // while there are holes left...
+    while(holes.length){
+      // pop a hole off out stack
+      hole = holes.pop();
+
+      // loop over all outer rings and see if they contain our hole.
+      var contained = false;
+      for (x = outerRings.length - 1; x >= 0; x--) {
+        outerRing = outerRings[x][0];
+        if(coordinatesContainCoordinates(outerRing, hole)){
+          // the hole is contained push it into our polygon
+          outerRings[x].push(hole);
+          contained = true;
+          break;
+        }
+      }
+
+      // ring is not contained in any outer ring
+      // sometimes this happens https://github.com/Esri/esri-leaflet/issues/320
+      if(!contained){
+        uncontainedHoles.push(hole);
+      }
+    }
+
+    // if we couldn't match any holes using contains we can now try intersects...
+    while(uncontainedHoles.length){
+      // pop a hole off out stack
+      hole = uncontainedHoles.pop();
+
+      // loop over all outer rings and see if any intersect our hole.
+      var intersects = false;
+      for (x = outerRings.length - 1; x >= 0; x--) {
+        outerRing = outerRings[x][0];
+        if(Terraformer.Tools.arraysIntersectArrays(outerRing, hole)){
+          // the hole intersects the outer ring push it into our polygon
+          outerRings[x].push(hole);
+          intersects = true;
+          break;
+        }
+      }
+
+      // hole does not intersect ANY outer ring at this point
+      // make it an outer ring.
+      if(!intersects) {
+        outerRings.push([hole.reverse()]);
+      }
+    }
+
+    if(outerRings.length === 1){
+      return {
+        type: 'Polygon',
+        coordinates: outerRings[0]
+      };
+    } else {
+      return {
+        type: 'MultiPolygon',
+        coordinates: outerRings
+      };
+    }
+  }
+
+  // ArcGIS -> GeoJSON
+  function parse(arcgis, options){
+    var geojson = {};
+
+    options = options || {};
+    options.idAttribute = options.idAttribute || undefined;
+
+    if(typeof arcgis.x === 'number' && typeof arcgis.y === 'number'){
+      geojson.type = "Point";
+      geojson.coordinates = [arcgis.x, arcgis.y];
+      if (arcgis.z || arcgis.m){
+        geojson.coordinates.push(arcgis.z);
+      }
+      if (arcgis.m){
+        geojson.coordinates.push(arcgis.m);
+      }
+    }
+
+    if(arcgis.points){
+      geojson.type = "MultiPoint";
+      geojson.coordinates = arcgis.points.slice(0);
+    }
+
+    if(arcgis.paths) {
+      if(arcgis.paths.length === 1){
+        geojson.type = "LineString";
+        geojson.coordinates = arcgis.paths[0].slice(0);
+      } else {
+        geojson.type = "MultiLineString";
+        geojson.coordinates = arcgis.paths.slice(0);
+      }
+    }
+
+    if(arcgis.rings) {
+      geojson = convertRingsToGeoJSON(arcgis.rings.slice(0));
+    }
+
+    if(arcgis.compressedGeometry || arcgis.geometry || arcgis.attributes) {
+      geojson.type = "Feature";
+
+      if(arcgis.compressedGeometry){
+        arcgis.geometry = {
+          paths: [
+            decompressGeometry(arcgis.compressedGeometry)
+          ]
+        };
+      }
+
+      geojson.geometry = (arcgis.geometry) ? parse(arcgis.geometry) : null;
+      geojson.properties = (arcgis.attributes) ? clone(arcgis.attributes) : null;
+      if(arcgis.attributes) {
+        geojson.id =  arcgis.attributes[options.idAttribute] || arcgis.attributes.OBJECTID || arcgis.attributes.FID;
+      }
+    }
+
+    var inputSpatialReference = (arcgis.geometry) ? arcgis.geometry.spatialReference : arcgis.spatialReference;
+
+    //convert spatial ref if needed
+    if(inputSpatialReference && inputSpatialReference.wkid === 102100){
+      geojson = Terraformer.toGeographic(geojson);
+    }
+
+    return new Terraformer.Primitive(geojson);
+  }
+
+  // GeoJSON -> ArcGIS
+  function convert(geojson, options){
+    var spatialReference;
+
+    options = options || {};
+    var idAttribute = options.idAttribute || "OBJECTID";
+
+    if(options.sr){
+      spatialReference = { wkid: options.sr };
+    } else if (geojson && geojson.crs === Terraformer.MercatorCRS) {
+      spatialReference = { wkid: 102100 };
+    } else {
+      spatialReference = { wkid: 4326 };
+    }
+
+    var result = {};
+    var i;
+
+    switch(geojson.type){
+    case "Point":
+      result.x = geojson.coordinates[0];
+      result.y = geojson.coordinates[1];
+      if(geojson.coordinates[2]) {
+        result.z = geojson.coordinates[2];
+      }
+      if(geojson.coordinates[3]) {
+        result.m = geojson.coordinates[3];
+      }
+      result.spatialReference = spatialReference;
+      break;
+    case "MultiPoint":
+      result.points = geojson.coordinates.slice(0);
+      result.spatialReference = spatialReference;
+      break;
+    case "LineString":
+      result.paths = [geojson.coordinates.slice(0)];
+      result.spatialReference = spatialReference;
+      break;
+    case "MultiLineString":
+      result.paths = geojson.coordinates.slice(0);
+      result.spatialReference = spatialReference;
+      break;
+    case "Polygon":
+      result.rings = orientRings(geojson.coordinates.slice(0));
+      result.spatialReference = spatialReference;
+      break;
+    case "MultiPolygon":
+      result.rings = flattenMultiPolygonRings(geojson.coordinates.slice(0));
+      result.spatialReference = spatialReference;
+      break;
+    case "Feature":
+      if(geojson.geometry) {
+        result.geometry = convert(geojson.geometry, options);
+      }
+      result.attributes = (geojson.properties) ? clone(geojson.properties) : {};
+      if(geojson.id) {
+        result.attributes[idAttribute] = geojson.id;
+      }
+      break;
+    case "FeatureCollection":
+      result = [];
+      for (i = 0; i < geojson.features.length; i++){
+        result.push(convert(geojson.features[i], options));
+      }
+      break;
+    case "GeometryCollection":
+      result = [];
+      for (i = 0; i < geojson.geometries.length; i++){
+        result.push(convert(geojson.geometries[i], options));
+      }
+      break;
+    }
+
+    return result;
+  }
+
+  function parseCompressedGeometry(string){
+    return new Terraformer.LineString(decompressGeometry(string));
+  }
+
+  exports.parse   = parse;
+  exports.convert = convert;
+  exports.toGeoJSON = parse;
+  exports.fromGeoJSON = convert;
+  exports.parseCompressedGeometry = parseCompressedGeometry;
+
+  return exports;
+}));

File diff suppressed because it is too large
+ 761 - 0
src/main/resources/static/a4gis/gcontrols/v1.0.5/third/terraformer/terraformer-wkt-parser.js


File diff suppressed because it is too large
+ 1418 - 0
src/main/resources/static/a4gis/gcontrols/v1.0.5/third/terraformer/terraformer.js


+ 310 - 0
src/main/resources/static/a4gis/gmap/v1.15.9/Common.js

@@ -0,0 +1,310 @@
+define("gmap/Common",["gmap/SymbolMgr",
+    "esri/SpatialReference", "esri/geometry/Extent", "esri/geometry/Point", "esri/geometry/ScreenPoint",
+    "esri/graphic",
+    "esri/tasks/QueryTask", "esri/tasks/query",
+    "dojo/_base/declare", "dojo/io/script", "dojo/_base/lang"],
+    function (SymbolMgr,
+        SpatialReference, Extent, Point, ScreenPoint,
+        Graphic,
+        QueryTask, Query,
+        declare, script, lang) {
+        return declare(null, {
+            constructor: function (map, mapload) {
+                this._map = map;
+                this._mapload = mapload;
+                //缩放到矩形
+                this._map.ZoomToExtent = lang.hitch(this, function (xmin, ymin, xmax, ymax, zoomfactor) {
+                    this._ZoomToExtent(xmin, ymin, xmax, ymax, zoomfactor);
+                });
+
+                //缩放到级别
+                this._map.ZoomToLevel = lang.hitch(this, function (level, lon, lat) {
+                    this._ZoomToLevel(level, lon, lat);
+                });
+
+                //添加临时用户数据
+                this._map.AddGraphic = lang.hitch(this, function (gra) {
+                    this._AddGraphic(gra);
+                });
+                //移除临时用户数据
+                this._map.RemoveGraphic = lang.hitch(this, function (gra) {
+                    this._RemoveGraphic(gra);
+                });
+                //清空临时用户数据
+                this._map.ClearGraphic = lang.hitch(this, function () {
+                    this._ClearGraphic();
+                });
+
+                //缩放至Geometry
+                this._map.ZoomToGeometry = lang.hitch(this, function (geometry, layerinfo) {
+                    this._ZoomToGeometry(geometry, layerinfo);
+                });
+
+                this._map.MapToScreen = lang.hitch(this, function (x, y) {
+                    var point = new Point(x, y, new SpatialReference({ wkid: this._map.WGS84WKID }));
+                    var mapPoint = this._map.ToMapSR(point);
+                    return this._map.MainMap.toScreen(mapPoint);
+                });
+
+                this._map.SetFullExtent = lang.hitch(this, function (xmin, ymin, xmax, ymax) {
+                    this._FullExtent = new Extent(xmin, ymin, xmax, ymax, new SpatialReference({ wkid: this._map.WGS84WKID }));
+                });
+
+                this._map.ScreenToMap = lang.hitch(this, function (x, y) {
+                    var screenPoint = new ScreenPoint(x, y);
+                    var point = this._map.MainMap.toMap(screenPoint);
+                    return this._map.ToWGS84(point);
+                });
+
+                this._map.Hilight = lang.hitch(this, this._Hilight);
+                this._map.ClearHilight = lang.hitch(this, this._ClearHilight);
+
+
+                this._map._getScaleLevel = function (scale) {
+                    for (var i = 0, c = this.Lods.length; i < c; i++) {
+                        if (scale >= this.Lods[i].scale) {
+                            return this.Lods[i].level;
+                        }
+                    }
+                    return this.Lods[this.Lods.length - 1].level;
+                };
+
+                this._map._getLevelScale = function (level) {
+                    for (var i = 0, c = this.Lods.length; i < c; i++) {
+                        if (level >= this.Lods[i].level) {
+                            return this.Lods[i].scale;
+                        }
+                    }
+                    return this.Lods[this.Lods.length - 1].scale;
+                };
+
+                this._map.GetScale = lang.hitch(this, function () {
+                    return this._map.MainMap.getScale();
+                });
+
+                this._map.GetMinScale = lang.hitch(this, function () {
+                    return this._map.MainMap.getMinScale();
+                });
+
+                this._map.GetMaxScale = lang.hitch(this, function () {
+                    return this._map.MainMap.getMaxScale();
+                });
+
+                this._map.GetVisible = lang.hitch(this, function () {
+                    return this._map.MainMap.visible;
+                });
+
+
+                // 获取定位级别
+                this._map._getShowScale = function (layerinfo, checkLabel) {
+
+                    if (checkLabel == null) checkLabel = false;
+                    if (checkLabel != true && checkLabel != false) checkLabel = false;
+
+                    var minScale = 0;
+                    var maxScale = 0;
+
+                    if (layerinfo.minScale != 0) {
+                        if (minScale == 0 || layerinfo.minScale < minScale) minScale = layerinfo.minScale;
+                    }
+
+                    if (layerinfo.maxScale != 0) {
+                        if (maxScale == 0 || layerinfo.maxScale > maxScale) maxScale = layerinfo.maxScale;
+                    }
+                    if (layerinfo.drawingInfo.labelingInfo && layerinfo.drawingInfo.labelingInfo.length > 0 && layerinfo.hasLabels == true && checkLabel == true) {
+                        for (var i = 0; i < layerinfo.drawingInfo.labelingInfo.length; i++) {
+                            var lblInfo = layerinfo.drawingInfo.labelingInfo[i];
+                            if (lblInfo.minScale != 0) {
+                                if (minScale == 0 || lblInfo.minScale < minScale) minScale = lblInfo.minScale;
+                            }
+                            if (lblInfo.maxScale != 0) {
+                                if (maxScale == 0 || lblInfo.maxScale > maxScale) maxScale = lblInfo.maxScale;
+                            }
+                        }
+                    }
+
+                    if (layerinfo.effectiveMinScale != null && layerinfo.effectiveMinScale != 0) {
+                        if (minScale == 0 || layerinfo.effectiveMinScale < minScale) minScale = layerinfo.effectiveMinScale;
+                    }
+
+                    if (layerinfo.effectiveMaxScale != null && layerinfo.effectiveMaxScale != 0) {
+                        if (maxScale == 0 || layerinfo.effectiveMaxScale > maxScale) maxScale = layerinfo.effectiveMaxScale;
+                    }
+
+                    return { maxScale: maxScale, minScale: minScale };
+                }
+            },
+
+
+            _ZoomToGeometry: function (geometry, layerinfo) {
+                var mapGeo = this._map.ToMapSR(geometry);
+                var gcsGeo = this._map.ToWGS84(geometry);
+
+                var geoWidthLevel = null;
+                var geoHeightLevel = null;
+                if (mapGeo.type == "polyline" || mapGeo.type == "polygon") {
+                    var extent = mapGeo.getExtent();
+                    var width = extent.xmax - extent.xmin;
+                    var resWidth = width / this._map.MainMap.width;
+                    geoWidthLevel = this._map.Lods[this._map.Lods.length - 1].level;
+                    for (var i = 0; i < this._map.Lods.length - 1; i++) {
+                        var lod1 = this._map.Lods[i];
+                        var lod2 = this._map.Lods[i + 1];
+                        if (resWidth < lod1.resolution && resWidth > lod2.resolution) {
+                            geoWidthLevel = lod1.level;
+                            break;
+                        }
+                    }
+
+                    var height = extent.ymax - extent.ymin;
+                    var resHeight = height / this._map.MainMap.height;
+                    geoHeightLevel = this._map.Lods[this._map.Lods.length - 1].level;
+                    for (var i = 0; i < this._map.Lods.length - 1; i++) {
+                        var lod1 = this._map.Lods[i];
+                        var lod2 = this._map.Lods[i + 1];
+                        if (resHeight < lod1.resolution && resHeight > lod2.resolution) {
+                            geoHeightLevel = lod1.level;
+                            break;
+                        }
+                    }
+                }
+
+                var geoLevel = (geoWidthLevel == null || geoHeightLevel == null) ?
+                    null : (geoHeightLevel < geoWidthLevel ? geoHeightLevel : geoWidthLevel);
+
+                var level = this._getLocateLevel(layerinfo, geoLevel);
+                var point = this._getPoint(gcsGeo);
+                this._map.ZoomToLevel(level, point.x, point.y);
+
+            },
+
+            // 获取中心点
+            _getPoint: function (geometry) {
+                switch (geometry.type) {
+                    case "point":
+                        return geometry;
+                    case "extent":
+                        return geometry.getCenter();
+                    default:
+                        return geometry.getExtent().getCenter();
+                }
+            },
+
+            // 获取定位级别
+            _getLocateLevel: function (layerinfo, geoLevel) {
+                var minLevel = this._map.MinLevel;
+                var maxLevel = this._map.MaxLevel;
+
+                var scaleInfo = this._map._getShowScale(layerinfo, true);
+
+                if (scaleInfo.minScale != 0) {
+                    var level = this._map._getScaleLevel(scaleInfo.minScale);
+                    if (level > minLevel) minLevel = level;
+                }
+                if (scaleInfo.maxScale != 0) {
+                    var level = this._map._getScaleLevel(scaleInfo.maxScale) - 1;
+                    if (level < maxLevel) maxLevel = level;
+                }
+
+                if (geoLevel == null) {
+                    return Math.ceil((minLevel + maxLevel) / 2);//这种情况只有点 
+                }
+                else {
+                    var level = geoLevel; //获取当前级别
+                    if (level > maxLevel) {
+                        return maxLevel;
+                    }
+                    else if (level < minLevel) {
+                        return minLevel;
+                    }
+                    else {
+                        return level;
+                    }
+                }
+            },
+
+
+            _Hilight: function (geo) {
+                geo = this._map.ToMapSR(geo);
+                var gra = new Graphic();
+                gra.geometry = geo;
+                if (geo.type == "point") {
+                    gra.setSymbol(SymbolMgr.GetHilightPointCircleSymbol());
+                }
+                else if (geo.type == "polyline") {
+                    gra.setSymbol(SymbolMgr.GetHilightLineSymbol());
+                }
+                else if (geo.type == "polygon" || geo.type == "extent") {
+                    gra.setSymbol(SymbolMgr.GetHilightFillSymbol());
+                }
+
+                this._mapload.DrawHilightLayer.add(gra);
+            },
+
+            _ClearHilight: function () {
+                this._mapload.DrawHilightLayer.clear();
+            },
+
+            //缩放到矩形
+            _ZoomToExtent: function (xmin, ymin, xmax, ymax, zoomfactor) {
+                var fromPt = this._map.ToMapSR(new Point(xmin, ymin, new SpatialReference({ wkid: this._map.WGS84WKID })));
+                var toPt = this._map.ToMapSR(new Point(xmax, ymax, new SpatialReference({ wkid: this._map.WGS84WKID })));
+                var extent = new Extent(fromPt.x, fromPt.y, toPt.x, toPt.y, fromPt.spatialReference);
+                if (zoomfactor != null) extent = extent.expand(zoomfactor);
+                this._map.MainMap.setExtent(extent);
+            },
+
+            //缩放到级别
+            _ZoomToLevel: function (level, lon, lat) {
+                var point = this._map.ToMapSR(new Point(lon, lat, new SpatialReference({ wkid: this._map.WGS84WKID })));
+                this._map.MainMap.centerAndZoom(point, level - this._map.MinLevel);
+            },
+
+            //添加临时用户数据
+            _AddGraphic: function (gra) {
+                if (gra && gra.geometry && gra.geometry.type) {
+                    gra.geometry = this._map.ToWGS84(gra.geometry);
+                    if (gra.geometry.type == "point") {
+                        this._mapload.Temp_PointLayer.add(gra);
+                        return true;
+                    }
+                    else if (gra.geometry.type == "polyline") {
+                        this._mapload.Temp_LineLayer.add(gra);
+                        return true;
+                    }
+                    else if (gra.geometry.type == "polygon") {
+                        this._mapload.Temp_AreaLayer.add(gra);
+                        return true;
+                    }
+                }
+                return false;
+            },
+
+            //移除临时用户数据
+            _RemoveGraphic: function (gra) {
+                if (gra && gra.geometry && gra.geometry.type) {
+                    if (gra.geometry.type == "point") {
+                        this._mapload.Temp_PointLayer.remove(gra);
+                        return true;
+                    }
+                    else if (gra.geometry.type == "polyline") {
+                        this._mapload.Temp_LineLayer.remove(gra);
+                        return true;
+                    }
+                    else if (gra.geometry.type == "polygon") {
+                        this._mapload.Temp_AreaLayer.remove(gra);
+                        return true;
+                    }
+                }
+                return false;
+            },
+
+            //清空临时用户数据
+            _ClearGraphic: function () {
+                this._mapload.Temp_PointLayer.clear();
+                this._mapload.Temp_LineLayer.clear();
+                this._mapload.Temp_AreaLayer.clear();
+            }
+
+        });
+    });

+ 143 - 0
src/main/resources/static/a4gis/gmap/v1.15.9/FlashGeo.js

@@ -0,0 +1,143 @@
+define("gmap/FlashGeo",["gmap/SymbolMgr", "esri/graphic", "dojo/Evented", "dojo/_base/declare", "dojo/_base/lang"],
+    function (SymbolMgr, Graphic, Evented, declare, lang) {
+        return declare([Evented], {
+            constructor: function (map, layer, geometry, options,
+                destroyedCallback,
+                graphicMouseClickCallback,
+                graphicMouseEnterCallback,
+                graphicMouseLeaveCallback,
+                graphicMouseDownCallback,
+                graphicMouseUpCallback
+            ) {
+                this._destroyedCallback = destroyedCallback;
+                this._graphicMouseClickCallback = graphicMouseClickCallback;
+                this._graphicMouseEnterCallback = graphicMouseEnterCallback;
+                this._graphicMouseLeaveCallback = graphicMouseLeaveCallback;
+                this._graphicMouseDownCallback = graphicMouseDownCallback;
+                this._graphicMouseUpCallback = graphicMouseUpCallback;
+
+                this._layer = layer;
+                this._layer.on("click", lang.hitch(this, function (evt) {
+                    if (evt.graphic === this._gra) {
+                        if (this._graphicMouseClickCallback != null &&
+                            typeof this._graphicMouseClickCallback == "function"
+                        ) {
+                            this._graphicMouseClickCallback({ geometry: this._geometry, options: this._options });
+                        }
+                    }
+                }));
+                this._layer.on("mouse-over", lang.hitch(this, function (evt) {
+                    if (evt.graphic === this._gra) {
+                        if (this._graphicMouseEnterCallback != null &&
+                            typeof this._graphicMouseEnterCallback == "function"
+                        ) {
+                            this._graphicMouseEnterCallback({ geometry: this._geometry, options: this._options });
+                        }
+                    }
+                }));
+                this._layer.on("mouse-out", lang.hitch(this, function (evt) {
+                    if (evt.graphic === this._gra) {
+                        if (this._graphicMouseLeaveCallback != null &&
+                            typeof this._graphicMouseLeaveCallback == "function"
+                        ) {
+                            this._graphicMouseLeaveCallback({ geometry: this._geometry, options: this._options });
+                        }
+                    }
+                }));
+                this._layer.on("mouse-down", lang.hitch(this, function (evt) {
+                    if (evt.graphic === this._gra) {
+                        if (this._graphicMouseDownCallback != null &&
+                            typeof this._graphicMouseDownCallback == "function"
+                        ) {
+                            this._graphicMouseDownCallback({ geometry: this._geometry, options: this._options });
+                        }
+                    }
+                }));
+                this._layer.on("mouse-up", lang.hitch(this, function (evt) {
+                    if (evt.graphic === this._gra) {
+                        if (this._graphicMouseUpCallback != null &&
+                            typeof this._graphicMouseUpCallback == "function"
+                        ) {
+                            this._graphicMouseUpCallback({ geometry: this._geometry, options: this._options });
+                        }
+                    }
+                }));
+
+                this._geometry = geometry;
+                this._options = options;
+
+                this._allCount = 3;
+                if (typeof options == "object") {
+                    this._allCount = options.count;
+                    this._hilightSymbol = options.symbol;
+                }
+                else {
+                    if (typeof options == "number") {
+                        this._allCount = options;
+                    }
+                }
+                if (this._allCount == null) this._allCount = 3;
+                if (this._allCount < 1) this._allCount = 1;
+
+                this._isDestroy = false;
+                this._gra = new Graphic();
+                this._gra.geometry = map.ToMapSR(geometry);;
+                this._count = 0;
+                this.show = true;
+                this._layer.add(this._gra);
+                this._Flash();
+                this.Timer = setInterval(lang.hitch(this, this._Flash), 400);
+
+            },
+            Destroy: function () {
+                if (!this._isDestroy) {
+                    clearInterval(this.Timer);
+                    this._layer.remove(this._gra);
+                    this._isDestroy = true;
+                    delete this.Destroy;
+                    if (this._destroyedCallback != null &&
+                        typeof this._destroyedCallback == "function"
+                    ) {
+                        this._destroyedCallback({ geometry: this._geometry, options: this._options });
+                    }
+                }
+            },
+            _Flash: function () {
+                var gra = this._gra;
+                if (gra && gra.geometry && gra.geometry.type) {
+                    if (gra.geometry.type == "point") {
+                        if (this.show) {
+                            gra.setSymbol(this._hilightSymbol != null ? this._hilightSymbol : SymbolMgr.GetHilightPointCircleSymbol());
+                            this._count++;
+                        }
+                        else {
+                            gra.setSymbol(SymbolMgr.GetTransparentPointSymbol());
+                        }
+                    }
+                    else if (gra.geometry.type == "polyline") {
+                        if (this.show) {
+                            gra.setSymbol(this._hilightSymbol != null ? this._hilightSymbol : SymbolMgr.GetHilightLineSymbol());
+                            this._count++;
+                        }
+                        else {
+                            gra.setSymbol(SymbolMgr.GetTransparentLineSymbol());
+                        }
+                    }
+                    else if (gra.geometry.type == "polygon" || gra.geometry.type == "extent") {
+                        if (this.show) {
+                            gra.setSymbol(this._hilightSymbol != null ? this._hilightSymbol : SymbolMgr.GetHilightFillSymbol());
+                            this._count++;
+                        }
+                        else {
+                            gra.setSymbol(SymbolMgr.GetTransparentFillSymbol());
+                        }
+                    }
+                    this.show = !this.show;
+                }
+
+                if (this._count > this._allCount) {
+                    this.Destroy();
+                }
+            }
+        });
+    });

+ 158 - 0
src/main/resources/static/a4gis/gmap/v1.15.9/LayerMgr.js

@@ -0,0 +1,158 @@
+define("gmap/LayerMgr",["dojo/_base/declare", "dojo/_base/lang"], function (declare, lang) {
+    return declare(null, {
+        _SupportBaseLayer: ["RasterLayer",
+            "esri.layers.WebTiledLayer", "esri.layers.ArcGISTiledMapServiceLayer", "esri.layers.ArcGISDynamicMapServiceLayer", "esri.layers.ArcGISImageServiceLayer",
+            "esri.layers.WMSLayer", "esri.layers.WMTSLayer", "esri.layers.WCSLayer", "esri.layers.RasterLayer"
+        ],
+        _SupportVectorLayer: ["VectorLayer", "esri.layers.ArcGISImageServiceVectorLayer", "esri.layers.FeatureLayer", "esri.layers.GraphicsLayer", "esri.layers.WFSLayer",
+            "esri.layers.StreamLayer", "esri.layers.GeoRSSLayer", "esri.layers.KMLLayer", "esri.layers.LabelLayer"],
+        constructor: function (map, mapload) {
+            this._T = "U_T_";
+            this._T_Index = 0;
+            this._V = "U_V_";
+            this._V_Index = 0;
+            this._map = map;
+
+            //this._T = this._map.MainMap.id + "_" + this._U_T;
+            this._V = this._map.MainMap.id + "_" + this._V;
+            this._mapLoad = mapload;
+
+            //添加用户图层
+            this._map.AddLayer = lang.hitch(this, function (layer, event) {
+                if (event == "TempGraphic") event = null;
+                this._AddLayer(layer, event);
+            });
+
+            //移除用户图层
+            this._map.RemoveLayer = lang.hitch(this, function (layer) {
+                this._RemoveLayer(layer);
+            });
+
+            this._map.GetAGSLayerByMapInfo = lang.hitch(this, function (mapinfo) {
+                return this._GetAGSLayerByMapInfo(mapinfo);
+            });
+
+            this._map.GetAllAGSLayers = lang.hitch(this, function () {
+                return this._GetAllAGSLayers();
+            });
+
+            this._map.GetAllUserLayers = lang.hitch(this, function () {
+                var layers = [];
+                for (var i = 0; i < this._mapLoad._AllUserLayers.length; i++) {
+                    layers.push(this._mapLoad._AllUserLayers[i]);
+                }
+                return layers;
+            });
+
+        },
+
+        _GetAllAGSLayers: function () {
+            var allLayers = [];
+            for (var i = 0; i < this._mapLoad._AllAGSLayers.length; i++) {
+                allLayers.push(this._mapLoad._AllAGSLayers[i]);
+            }
+            return allLayers;
+        },
+
+        _GetAGSLayerByMapInfo: function (mapinfo) {
+            for (var i = 0; i < this._mapLoad._AllAGSLayers.length; i++) {
+                var agsLayer = this._mapLoad._AllAGSLayers[i];
+                if (agsLayer.MapInfo === mapinfo) return agsLayer;
+            }
+        },
+
+        //添加用户图层
+        _AddLayer: function (layer, event) {
+            if (!this._mapLoad._innerLayerInited) {
+                console.log("瓦片图层未加载!");
+                return;
+            }
+            var declareClass = layer.declaredClass;
+            if (declareClass) {
+                if (this._SupportBaseLayer.contains(declareClass)) {
+                    this._T_Index++;
+                    var id = this._T + this._T_Index;
+
+                    if (layer.id != null) {
+                        id += ("_" + layer.id);
+                    }
+                    layer.id = id;
+                    this._map.MainMap._innerAddLayer(layer);
+                    this._mapLoad._AllUserLayers.push(layer);
+                    this._mapLoad._AllUserTileLayers.push(layer);
+                    return true;
+                }
+                else if (this._SupportVectorLayer.contains(declareClass)) {
+                    this._V_Index++;
+
+                    var id = this._V + this._V_Index;
+
+                    if (layer.id != null) {
+                        id += ("_" + layer.id);
+                    }
+                    layer.id = id;
+
+                    var insertIndex = this._mapLoad._AllSysLayers_Bottom.length;
+                    for (var i = 0; i < this._mapLoad._AllAGSLayers.length; i++) {
+                        insertIndex += this._mapLoad._AllAGSLayers[i].FeatureLayers.length;
+                    }
+                    insertIndex += this._mapLoad._AllUserVectorLayers.length;
+                    //添加到地图
+                    this._map.MainMap._innerAddLayer(layer, insertIndex);
+                    this._mapLoad._AllUserLayers.push(layer);
+                    this._mapLoad._AllUserVectorLayers.push(layer);
+
+                    if (declareClass == "esri.layers.GraphicsLayer" && event != null) {
+                        this._mapLoad._AddGraphicsLayerEvents(layer, event);
+                    }
+                    else if (declareClass == "esri.layers.FeatureLayer" && event != null) {
+                        this._mapLoad._AddFeatureLayerEvents(layer, event);
+                    }
+
+                    return true;
+                }
+            }
+            console.log("不支持的图层类别!");
+            return false;
+        },
+
+        //移除用户图层
+        _RemoveLayer: function (layer) {
+            var declareClass = layer.declaredClass;
+            if (declareClass) {
+                if (this._SupportBaseLayer.contains(declareClass)) {
+                    if (this._RemoveLayerBool(layer)) {
+                        this._mapLoad._AllUserLayers.remove(layer);
+                        this._mapLoad._AllUserTileLayers.remove(layer);
+                        return true;
+                    }
+                }
+                else if (this._SupportVectorLayer.contains(declareClass)) {
+                    if (this._RemoveLayerBool(layer)) {
+                        this._mapLoad._AllUserLayers.remove(layer);
+                        this._mapLoad._AllUserVectorLayers.remove(layer);
+                        return true;
+                    }
+                }
+            }
+            return false;
+        },
+
+        _RemoveLayerBool: function (layer) {
+            var c1 = this._map.MainMap.layerIds.length + this._map.MainMap.graphicsLayerIds.length;
+            this._map.MainMap.removeLayer(layer);
+            var c2 = this._map.MainMap.layerIds.length + this._map.MainMap.graphicsLayerIds.length;
+            return c1 == c2 + 1;
+        },
+
+        _FindAGSMap: function (mapinfo) {
+            for (var i = 0; i < this._mapLoad._AllAGSLayers.length; i++) {
+                var agsLayer = this._mapLoad._AllAGSLayers[i];
+                if (agsLayer.MapInfo === mapinfo) {
+                    return agsLayer;
+                }
+            }
+            return null;
+        }
+    });
+});

+ 169 - 0
src/main/resources/static/a4gis/gmap/v1.15.9/LineFlow.js

@@ -0,0 +1,169 @@
+define("gmap/LineFlow",["esri/graphic", "esri/geometry/Geometry", "esri/layers/GraphicsLayer", "esri/geometry/Point", "esri/geometry/Polyline", "esri/symbols/SimpleLineSymbol", "esri/Color", "esri/geometry/webMercatorUtils", "esri/SpatialReference", "esri/geometry/geometryEngine", "dojo/_base/lang", "dojo/_base/declare"],
+    function (Graphic, Geometry, GraphicsLayer, Point, Polyline, SimpleLineSymbol, Color, webMercatorUtils, SpatialReference, geometryEngine, lang, declare) {
+        // 声明
+        return declare(null, {
+            // 构造函数
+            constructor: function (map, mapload) {
+                this.map = map;
+                this.flowLayer = mapload.Flow_MainGra;
+                this.className = "flow_line";
+
+                this._flowlines = [];
+                this.speedSet = {
+                    veryfast: 30,
+                    fast: 60,
+                    normal: 150,
+                    slow: 240,
+                    veryslow: 480
+                };
+            },
+
+            FlowLine: function (line, option) {
+                var lineSymbol = new SimpleLineSymbol();
+                lineSymbol.width = option && option.width ? option.width : 3;
+                lineSymbol.style = SimpleLineSymbol.STYLE_SHORTDASH;
+                if (option && option.style) {
+                    var style = option.style.toLowerCase();
+                    switch (option.style) {
+                        case "dash":
+                            lineSymbol.style = SimpleLineSymbol.STYLE_DASH;
+                            break;
+                        case "dashdot":
+                            lineSymbol.style = SimpleLineSymbol.STYLE_DASHDOT;
+                            break;
+                        case "dashdotdot":
+                            lineSymbol.style = SimpleLineSymbol.STYLE_DASHDOTDOT;
+                            break;
+                        case "dot":
+                            lineSymbol.style = SimpleLineSymbol.STYLE_DOT;
+                            break;
+                        case "longdash":
+                            lineSymbol.style = SimpleLineSymbol.STYLE_LONGDASH;
+                            break;
+                        case "longdashdot":
+                            lineSymbol.style = SimpleLineSymbol.STYLE_LONGDASHDOT;
+                            break;
+                        case "shortdash":
+                            lineSymbol.style = SimpleLineSymbol.STYLE_SHORTDASH;
+                            break;
+                        case "shortdashdot":
+                            lineSymbol.style = SimpleLineSymbol.STYLE_SHORTDASHDOT;
+                            break;
+                        case "shortdashdotdot":
+                            lineSymbol.style = SimpleLineSymbol.STYLE_SHORTDASHDOTDOT;
+                            break;
+                        case "shortdot":
+                            lineSymbol.style = SimpleLineSymbol.STYLE_SHORTDOT;
+                            break;
+                    }
+                }
+                if (option && option.color) {
+                    if (option.color instanceof Object && option.color.a, option.color.r, option.color.g, option.color.b) {
+                        lineSymbol.color = new Color({ a: option.color.a, r: option.color.r, g: option.color.g, b: option.color.b, });
+                    } else {
+                        if (option.color.indexOf("#") != -1) {
+                            lineSymbol.color = Color.fromHex(option.color);
+                        }
+                        else if (option.color.indexOf("rgb") != -1) {
+                            lineSymbol.color = Color.fromRgb(option.color);
+                        }
+                        else {
+                            lineSymbol.color = Color.fromString(option.color);
+                        }
+                    }
+                }
+                else {
+                    lineSymbol.color = new Color([255, 0, 0, 1]);
+                }
+
+                this.lInterval = this.speedSet.normal;
+                if (option) {
+                    switch (option.speed) {
+                        case "veryfast":
+                            this.lInterval = this.speedSet.veryfast;
+                            break;
+                        case "fast":
+                            this.lInterval = this.speedSet.fast;
+                            break;
+                        case "slow":
+                            this.lInterval = this.speedSet.slow;
+                            break;
+                        case "veryslow":
+                            this.lInterval = this.speedSet.veryslow;
+                            break;
+                        default:
+                            break;
+                    }
+                }
+                this.lines = [];
+                if (line instanceof Array) {
+                    for (var i = 0; i < line.length; i++) {
+                        var gra = new Graphic(line[i], lineSymbol);
+                        this.flowLayer.add(gra);
+                        gra.attr("class", this.className);
+                        this.lines.push(gra);
+                    }
+                }
+                else {
+                    var gra = new Graphic(line, lineSymbol);
+                    this.flowLayer.add(gra);
+                    gra.attr("class", this.className);
+                    this.lines.push(gra);
+                }
+                this.lStep = -3;
+                this.lCount = 0;
+                this.lHandler = setInterval(lang.hitch(this, this._executeLines), this.lInterval);
+
+                var oper = Object();
+                oper.ChangeSpeed = lang.hitch({ me: this, oper: oper }, this.ChangeSpeed);
+                oper.Clear = lang.hitch({ me: this, oper: oper }, this.Clear);
+                this.map._flowOpers.push(oper);
+                return oper;
+            },
+            // 执行矢量线的流向
+            _executeLines: function () {
+                this.lCount += this.lStep;
+                for (var i = 0, c = this.lines.length; i < c; i++) {
+                    this.lines[i].attr("stroke-dashoffset", this.lCount.toString() + "px");
+                }
+                if (this.lCount > 10000 || this.lCount < -10000) this.lCount = 0;
+            },
+
+            ChangeSpeed: function (speed) {
+                if (this.me.lHandler) {
+                    switch (speed) {
+                        case "veryfast":
+                            this.me.lInterval = this.me.speedSet.veryfast;
+                            break;
+                        case "fast":
+                            this.me.lInterval = this.me.speedSet.fast;
+                            break;
+                        case "slow":
+                            this.me.lInterval = this.me.speedSet.slow;
+                            break;
+                        case "veryslow":
+                            this.me.lInterval = this.me.speedSet.veryslow;
+                            break;
+                        default:
+                            break;
+                    }
+                    clearInterval(this.me.lHandler);
+                    this.me.lHandler = setInterval(lang.hitch(this.me, this.me._executeLines), this.me.lInterval);
+                }
+            },
+
+            Clear: function () {
+                if (this.me.lHandler) {
+                    clearInterval(this.me.lHandler);
+                    this.me.map._flowOpers.remove(this.oper);
+                    this.me.lHandler = null;
+                    for (var i = 0; i < this.me.lines.length; i++) {
+                        this.me.flowLayer.remove(this.me.lines[i]);
+                    }
+                    this.me.lines = [];
+                    delete this.Clear;
+                    delete this.ChangeSpeed;
+                }
+            }
+        });
+    });

+ 225 - 0
src/main/resources/static/a4gis/gmap/v1.15.9/MapControl.js

@@ -0,0 +1,225 @@
+define("gmap/MapControl",["dojo/Evented", "dojo/_base/declare", "dojo/_base/lang", "esri/geometry/webMercatorUtils", "esri/SpatialReference", "esri/geometry/Point", "esri/geometry/Extent",
+    "gmap/MapInit",
+    "gmap/LayerMgr",
+    "gmap/Common",
+    "gmap/FlashGeo",
+    "gmap/Tools",
+    "gmap/LineFlow",
+    "gmap/MapLoad"],
+    function (Evented, declare, lang, webMercatorUtils, SpatialReference, Point, Extent,
+        MapInit, LayerMgr, CommonMethod, FlashGeo, Tools, LineFlow, MapLoad) {
+        var mapControl = declare([Evented], {
+            WGS84WKID: 4326,
+            MercatorWKID: 102100,
+            MaxLevel: 0,
+            MinLevel: 23,
+            constructor: function (mapId, options) {
+                this.extendJSMethod();
+                var minLevel = 1;
+                var maxLevel = 18;
+                var xmin = 76;
+                var ymin = 16;
+                var xmax = 136;
+                var ymax = 56;
+                var isMercator = true;
+                var showLabels = false;
+                var mustTile = false;
+                if (typeof options == "object") {
+                    minLevel = options.minLevel;
+                    maxLevel = options.maxLevel;
+                    xmin = options.xmin;
+                    ymin = options.ymin;
+                    xmax = options.xmax;
+                    ymax = options.ymax;
+                    if (options.isMercator != null) isMercator = options.isMercator;
+                    if (options.showLabels != null) showLabels = options.showLabels;
+                    if (options.mustTile != null) mustTile = options.mustTile;
+                }
+
+                this._mustTile = mustTile;
+                this._isMercator = function (wkid) {
+                    return wkid != 4214 && wkid != 4326 && wkid != 4610 && wkid != 4490;
+                }
+
+                this.spatialReference = isMercator ?
+                    new SpatialReference({ wkid: this.MercatorWKID }) :
+                    new SpatialReference({ wkid: this.WGS84WKID });
+
+                this.MapID = mapId;
+                this.Version = "v1.15.9"
+                this.ToWGS84 = lang.hitch(this, function (geometry) {
+                    if (geometry == null) return;
+                    if (geometry.spatialReference == null) geometry.spatialReference = new SpatialReference({ wkid: this.MercatorWKID });
+                    if (this._isMercator(geometry.spatialReference.wkid)) {
+                        return webMercatorUtils.webMercatorToGeographic(geometry);
+                    }
+                    else {
+                        geometry.spatialReference = new SpatialReference({ wkid: this.WGS84WKID });
+                        return geometry;
+                    }
+
+                });
+
+                this.ToMercator = lang.hitch(this, function (geometry) {
+                    if (geometry == null) return;
+                    if (geometry.spatialReference == null) geometry.spatialReference = new SpatialReference({ wkid: this.WGS84WKID });
+                    if (this._isMercator(geometry.spatialReference.wkid)) {
+                        return geometry;
+                    }
+                    else {
+                        geometry.spatialReference = new SpatialReference({ wkid: this.WGS84WKID });
+                        return webMercatorUtils.geographicToWebMercator(geometry);
+                    }
+                });
+
+                this.ToMapSR = lang.hitch(this, function (geometry) {
+                    if (geometry == null) return geometry;
+                    if (geometry.spatialReference == null) {
+                        geometry.spatialReference = this.spatialReference;
+                        return geometry;
+                    }
+                    if (this.spatialReference.wkid == this.MercatorWKID) {
+                        return this.ToMercator(geometry);
+                    }
+                    else {
+                        return this.ToWGS84(geometry);
+                    }
+                });
+
+                this.Debugger == false;
+
+                this.Log = function (o) {
+                    if (this.Debugger == true) console.log(o);
+                };
+
+                new MapInit(this, mapId, minLevel, maxLevel, showLabels);
+
+                //new InnerFunctions(this);
+                var mapload = new MapLoad(this);
+                new LayerMgr(this, mapload);
+                new CommonMethod(this, mapload);
+                this._tools = new Tools(this, mapload);
+
+                //闪烁
+                this.Flash = lang.hitch(this, function (geometry, options,
+                    destroyedCallback,
+                    graphicMouseClickCallback,
+                    graphicMouseEnterCallback,
+                    graphicMouseLeaveCallback,
+                    graphicMouseDownCallback,
+                    graphicMouseUpCallback) {
+                    return new FlashGeo(this, this._FlashLayer, geometry, options,
+                        destroyedCallback,
+                        graphicMouseClickCallback,
+                        graphicMouseEnterCallback,
+                        graphicMouseLeaveCallback,
+                        graphicMouseDownCallback,
+                        graphicMouseUpCallback);
+                });
+
+                this._flowOpers = [];
+
+                this.Flow = function (line, option) {
+                    return new LineFlow(this, mapload).FlowLine(line, option);
+                };
+
+                this.ClearFlow = function () {
+                    while (this._flowOpers.length > 0) { this._flowOpers[0].Clear(); }
+                }
+
+                this.AllowVector = lang.hitch(this, function (allow) {
+                    var allAGSLayers = this.GetAllAGSLayers();
+                    for (var i = 0; i < allAGSLayers.length; i++) {
+                        allAGSLayers[i].AllowVector(allow);
+                    }
+                });
+
+                if (xmin == null
+                    || ymin == null
+                    || xmax == null
+                    || ymax == null) {
+                    xmin = 76;
+                    ymin = 16;
+                    xmax = 136;
+                    ymax = 56;
+                }
+
+                var fromPt = new Point(xmin, ymin, new SpatialReference(this.WGS84WKID));
+                var toPt = new Point(xmax, ymax, new SpatialReference(this.WGS84WKID));
+                this._FullExtent = new Extent(fromPt.x, fromPt.y, toPt.x, toPt.y, fromPt.spatialReference);
+                console.log(xmax, ymin, xmax, ymax);
+                this.ZoomToExtent(xmin, ymin, xmax, ymax);
+            },
+
+            extendJSMethod: function () {
+                if (Array.prototype.clear == null) {
+                    Array.prototype.clear = function () {
+                        this.length = 0;
+                    };
+                }
+                if (Array.prototype.insertAt == null) {
+                    Array.prototype.insertAt = function (index, obj) {
+                        this.splice(index, 0, obj);
+                    };
+                }
+                if (Array.prototype.removeAt == null) {
+                    Array.prototype.removeAt = function (index) {
+                        this.splice(index, 1);
+                    };
+                }
+                if (Array.prototype.remove == null) {
+                    Array.prototype.remove = function (obj) {
+                        var index = this.indexOf(obj);
+                        if (index >= 0) {
+                            this.removeAt(index);
+                        }
+                    };
+                }
+                if (Array.prototype.contains == null) {
+                    Array.prototype.contains = function (obj) {
+                        var index = this.indexOf(obj);
+                        return index >= 0;
+                    };
+                }
+                if (Array.prototype.indexOf == null) {
+                    Array.prototype.indexOf = function (obj) {
+                        for (var i = 0; i < this.length; i++) {
+                            if (this[i] === obj) return i;
+                        }
+                        return -1;
+                    };
+                }
+                if (String.prototype.endsWith == null) {
+                    String.prototype.endsWith = function (s) {
+                        if (s == null || s == "" || this.length == 0 || s.length > this.length)
+                            return false;
+                        if (this.substring(this.length - s.length) == s)
+                            return true;
+                        else
+                            return false;
+                        return true;
+                    }
+                }
+                if (String.prototype.startsWith == null) {
+                    String.prototype.startsWith = function (s) {
+                        if (s == null || s == "" || this.length == 0 || s.length > this.length)
+                            return false;
+                        if (this.substr(0, s.length) == s)
+                            return true;
+                        else
+                            return false;
+                        return true;
+                    }
+                }
+                if (String.prototype.trim == null) {
+                    String.prototype.trim = function () {
+                        return this.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
+                    }
+                }
+            }
+        });
+
+        mapControl.WGS84WKID = 4326;
+        mapControl.MercatorWKID = 102100;
+        return mapControl;
+    });

+ 200 - 0
src/main/resources/static/a4gis/gmap/v1.15.9/MapInit.js

@@ -0,0 +1,200 @@
+define("gmap/MapInit",["esri/map", "esri/SpatialReference", "esri/geometry/Extent", "esri/geometry/Point", "esri/layers/LOD",
+    "dojo/Evented", "dojo/_base/declare", "dojo/_base/lang", "dojo/on", "dojo/domReady!"],
+    function (Map, SpatialReference, Extent, Point, LOD, Evented, declare, lang, on) {
+        return declare([Evented], {
+            constructor: function (map, mapId, minLevel, maxLevel, showLabels) {
+
+                this._map = map;
+                document.getElementById(mapId).innerHTML = "";
+                this._InitLodInfo();
+                var minL = 0;
+                var maxL = 18;
+                // 优化条件判断
+                if (minLevel !== null && minLevel >= 0 && minLevel <= 18) {
+                    minL = minLevel;
+                }
+                if (maxLevel !== null && maxLevel >= 0 && maxLevel <= 18) {
+                    maxL = maxLevel;
+                }
+                if (minL > maxL) {
+                    var l = minL;
+                    minL = maxL;
+                    maxL = l;
+                }
+
+                // if (minL === maxL) {
+                //     minL = 0;
+                //     maxL = 18;
+                // }
+
+                this._map.MinLevel = minL;
+                this._map.MaxLevel = maxL;
+                var lods = [];
+
+                for (var i = minL; i <= maxL; i++) {
+                    var lod = new LOD();
+                    lod.scale = this.Scale[i];
+                    lod.resolution = this.Resolution[i];
+                    lod.level = i;
+                    lods.push(lod);
+                }
+
+                console.log(lods);
+
+                this._map.MainMap = new Map(mapId, {
+                    basemap: "topo-vector",
+                    lods: lods,
+                    logo: false,
+                    showAttribution: false,
+                    showLabels: showLabels
+                });
+
+                this._map.Lods = lods;
+                this._map.fullLods = [];
+                for (var i = 0; i < this.Resolution.length; i++) {
+                    var lod = new LOD();
+                    lod.scale = this.Scale[i];
+                    lod.resolution = this.Resolution[i];
+                    lod.level = i;
+                    this._map.fullLods.push(lod);
+                }
+
+                this._map.GetLevel = lang.hitch(this, function () {
+                    return this._map.MainMap.getLevel() + this._map.MinLevel;
+                });
+
+                this._map.GetExtent = lang.hitch(this, function () {
+                    return this._map.MainMap.geographicExtent;
+                });
+
+                this._map.MainMap.on("extent-change", lang.hitch(this, function (evt) {
+                    var args = {};
+                    args.Level = this._map.GetLevel();
+                    args.Extent = this._ProjectExtend(evt.extent);
+                    if (this._LastMapLevel == null) {
+                        this._LastMapLevel = args.Level;
+                        this._map.emit("MapLevelChanged", args.Level);
+                    }
+                    else {
+                        if (this._LastMapLevel != args.Level) {
+                            this._LastMapLevel = args.Level;
+                            this._map.emit("MapLevelChanged", args.Level);
+                        }
+                    }
+
+                    this._map.emit("ExtentChanged", args);
+
+                    //重绘格网图层
+                    if (this._map._redrawGridLayer) this._map._redrawGridLayer();
+
+                    return false;
+                }));
+
+                this._map.MainMap.on("pan", lang.hitch(this, function (evt) {
+                    evt.extent2 = this._ProjectExtend(evt.extent);
+                    this._map.emit("Pan", evt);
+                }));
+
+                this._map.MainMap.on("pan-start", lang.hitch(this, function (evt) {
+                    evt.extent2 = this._ProjectExtend(evt.extent);
+                    this._map.emit("PanStart", evt);
+                }));
+
+                this._map.MainMap.on("pan-end", lang.hitch(this, function (evt) {
+                    evt.extent2 = this._ProjectExtend(evt.extent);
+                    this._map.emit("PanEnd", evt);
+                }));
+
+                this._map.MainMap.on("zoom", lang.hitch(this, function (evt) {
+                    evt.extent2 = this._ProjectExtend(evt.extent);
+                    this._map.emit("Zoom", evt);
+                }));
+
+                this._map.MainMap.on("zoom-start", lang.hitch(this, function (evt) {
+                    evt.extent2 = this._ProjectExtend(evt.extent);
+                    evt.level2 = this._map.GetLevel();
+                    this._map.emit("ZoomStart", evt);
+                }));
+
+                this._map.MainMap.on("zoom-end", lang.hitch(this, function (evt) {
+                    evt.extent2 = this._ProjectExtend(evt.extent);
+                    evt.level2 = this._map.GetLevel();
+                    this._map.emit("ZoomEnd", evt);
+                }));
+
+                this._map.MainMap.on("click", lang.hitch(this, function (evt) {
+                    evt.mapPoint2 = this._map.ToWGS84(evt.mapPoint);
+                    this._map.emit("Click", evt);
+                }));
+
+                this._map.MainMap.on("key-down", lang.hitch(this, function (evt) {
+                    this._map.emit("KeyDown", evt);
+                }));
+
+                this._map.MainMap.on("key-up", lang.hitch(this, function (evt) {
+                    this._map.emit("KeyUp", evt);
+                }));
+
+                this._map.MainMap.on("mouse-drag", lang.hitch(this, function (evt) {
+                    evt.mapPoint2 = this._map.ToWGS84(evt.mapPoint);
+                    this._map.emit("MouseDrag", evt);
+                }));
+
+                this._map.MainMap.on("mouse-drag-end", lang.hitch(this, function (evt) {
+                    evt.mapPoint2 = this._map.ToWGS84(evt.mapPoint);
+                    this._map.emit("MouseDragEnd", evt);
+                }));
+
+                this._map.MainMap.on("mouse-drag-start", lang.hitch(this, function (evt) {
+                    evt.mapPoint2 = this._map.ToWGS84(evt.mapPoint);
+                    this._map.emit("MouseDragStart", evt);
+                }));
+
+                this._map.MainMap.on("mouse-out", lang.hitch(this, function (evt) {
+                    evt.mapPoint2 = this._map.ToWGS84(evt.mapPoint);
+                    this._map.emit("MouseOut", evt);
+                }));
+
+                this._map.MainMap.on("mouse-over", lang.hitch(this, function (evt) {
+                    evt.mapPoint2 = this._map.ToWGS84(evt.mapPoint);
+                    this._map.emit("MouseOver", evt);
+                }));
+
+                this._map.MainMap.on("mouse-up", lang.hitch(this, function (evt) {
+                    evt.mapPoint2 = this._map.ToWGS84(evt.mapPoint);
+                    this._map.emit("MouseUp", evt);
+                }));
+
+                this._map.MainMap.on("mouse-wheel", lang.hitch(this, function (evt) {
+                    evt.mapPoint2 = this._map.ToWGS84(evt.mapPoint);
+                    this._map.emit("MouseWheel", evt);
+                }));
+
+                this._map.MainMap.on("resize", lang.hitch(this, function (evt) {
+                    evt.extent2 = this._ProjectExtend(evt.extent);
+                    this._map.emit("Resize", evt);
+                }));
+
+            },
+
+            _ProjectExtend: function (extent) {
+                var sp = this._map.ToWGS84(new Point(extent.xmin, extent.ymin, extent.spatialReference));
+                var ep = this._map.ToWGS84(new Point(extent.xmax, extent.ymax, extent.spatialReference));
+                return new Extent(sp.x, sp.y, ep.x, ep.y, new SpatialReference({ wkid: this._map.WGS84WKID }));
+            },
+            _InitLodInfo: function () {
+                var maxLevel = 23;
+                this.Scale = [];
+                this.Resolution = [];
+                var width = this._map.spatialReference.wkid == this._map.WGS84WKID ? 360 : 20037508.3427892 * 2;
+                var earthPerimeter = 20037508.3427892 * 2;
+                for (var i = 0; i < maxLevel; i++) {
+                    var level = i;
+                    var allPixels = 256 * Math.pow(2, i);
+                    this.Resolution[level] = width / allPixels;
+                    this.Scale[level] = earthPerimeter / (allPixels / 96 * 0.0254);
+                }
+            }
+
+        });
+    });

File diff suppressed because it is too large
+ 2114 - 0
src/main/resources/static/a4gis/gmap/v1.15.9/MapLoad.js


+ 160 - 0
src/main/resources/static/a4gis/gmap/v1.15.9/SymbolMgr.js

@@ -0,0 +1,160 @@
+define("gmap/SymbolMgr",["esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleMarkerSymbol", "esri/symbols/PictureMarkerSymbol", "esri/symbols/SimpleFillSymbol", "esri/symbols/TextSymbol",
+    "esri/Color", "esri/symbols/Font", "dojo/domReady!"],
+    function (SimpleLineSymbol, SimpleMarkerSymbol, PictureMarkerSymbol, SimpleFillSymbol, TextSymbol, Color, Font) {
+
+        return {
+            GetTransparentPointSymbol: function () {
+                var linesymbol = new SimpleLineSymbol();
+                linesymbol.color = new Color([0, 255, 255, 0]);
+                linesymbol.width = 0.5;
+                var pointsymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_SQUARE, 16, linesymbol, new Color([0, 0, 0, 0]));
+                pointsymbol.size = 16;
+                pointsymbol.outline = linesymbol;
+                return pointsymbol;
+            },
+
+            GetTransparentLineSymbol: function () {
+                var linesymbol = new SimpleLineSymbol();
+                linesymbol.color = new Color([0, 0, 0, 0]);
+                linesymbol.width = 5;
+                return linesymbol;
+            },
+
+            GetTransparentFillSymbol: function () {
+                var fillsymbol = new SimpleFillSymbol();
+                fillsymbol.color = new Color([0, 0, 0, 0]);
+                var linesymbol = new SimpleLineSymbol();
+                linesymbol.color = new Color([0, 0, 0, 0]);
+                linesymbol.width = 0;
+                fillsymbol.outline = linesymbol;
+                return fillsymbol;
+            },
+            //高亮样式
+            GetHilightPointCircleSymbol: function () {
+                var linesymbol = new SimpleLineSymbol();
+                linesymbol.color = new Color([0, 0, 0, 0]);
+                linesymbol.width = 0;
+                var pointsymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 16, linesymbol, new Color([0, 255, 255, 0.7]));
+                pointsymbol.size = 16;
+                pointsymbol.outline = linesymbol;
+                return pointsymbol;
+            },
+            _GetNewColor: function (c) {
+                return Math.trunc((c + 0.618 * 255) % 255)
+            },
+
+            //点高亮样式
+            GetHilightPointSymbol: function (symbol) {
+                if (symbol) {
+                    var json = symbol.toJson();
+                    if (symbol.type == "picturemarkersymbol") {
+                        var pointsymbol = new PictureMarkerSymbol(json);
+                        pointsymbol.setHeight(pointsymbol.height * 1.5);
+                        pointsymbol.setWidth(pointsymbol.width * 1.5);
+                        return pointsymbol;
+                    }
+                    else if (symbol.type == "simplemarkersymbol") {
+                        var pointsymbol = new SimpleMarkerSymbol(json);
+                        pointsymbol.setSize(pointsymbol.size * 1.5);
+                        return pointsymbol;
+                    }
+                    else {
+                        var linesymbol = new SimpleLineSymbol();
+                        linesymbol.color = new Color([0, 0, 0, 0]);
+                        linesymbol.width = 0;
+                        var pointsymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_SQUARE, 16, linesymbol, new Color([0, 255, 255, 0.7]));
+                        pointsymbol.size = 16;
+                        pointsymbol.outline = linesymbol;
+                        return pointsymbol;
+                    }
+                }
+                else {
+                    var linesymbol = new SimpleLineSymbol();
+                    linesymbol.color = new Color([0, 0, 0, 0]);
+                    linesymbol.width = 0;
+                    var pointsymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_SQUARE, 16, linesymbol, new Color([0, 255, 255, 0.7]));
+                    pointsymbol.size = 16;
+                    pointsymbol.outline = linesymbol;
+                    return pointsymbol;
+                }
+            },
+
+            //线高亮样式
+            GetHilightLineSymbol: function (symbol) {
+                if (symbol) {
+                    var width = symbol.width;
+                    if (symbol.width <= 2) {
+                        width = 3;
+                    }
+                    else if (symbol.width <= 6) {
+                        width = symbol.width + 2;
+                    }
+                    else if (symbol.width <= 10) {
+                        width = symbol.width + 3;
+                    }
+                    else {
+                        width = symbol.width + 4;
+                    }
+                    if (symbol.type == "simplelinesymbol") {
+                        var linesymbol = new SimpleLineSymbol(symbol.toJson());
+                        if (symbol.width == 0 || symbol.color.a < 1) linesymbol.color = new Color([0, 255, 255, 0.8]);
+                        linesymbol.width = width;
+                        return linesymbol;
+                    }
+                    else if (symbol.type == "cartographiclinesymbol") {
+                        var linesymbol = new CartographicLineSymbol(symbol.toJson());
+                        if (symbol.width == 0 || symbol.color.a < 1) linesymbol.color = new Color([0, 255, 255, 0.8]);
+                        linesymbol.width = width;
+                        return linesymbol;
+                    }
+                    else {
+                        var linesymbol = new SimpleLineSymbol();
+                        if (symbol.width == 0 || symbol.color.a < 1) linesymbol.color = new Color([0, 255, 255, 0.8]);
+                        linesymbol.width = width;
+                        return linesymbol;
+                    }
+                }
+                else {
+                    var linesymbol = new SimpleLineSymbol();
+                    linesymbol.color = new Color([0, 255, 255, 0.8]);
+                    linesymbol.width = 3;
+                    return linesymbol;
+                }
+            },
+
+            //面高亮样式
+            GetHilightFillSymbol: function (symbol) {
+                if (symbol) {
+                    if (symbol.type == "simplefillsymbol" || symbol.type == "picturefillsymbol") {
+                        var fillsymbol = new SimpleFillSymbol(symbol.toJson());
+                        var outline = this.GetHilightLineSymbol(symbol.outline);
+                        fillsymbol.outline = outline;
+                        if (symbol.type == "simplefillsymbol") {
+                            var a = fillsymbol.color.a > 0.5 ? fillsymbol.color.a - 0.2 : fillsymbol.color.a + 0.3;
+                            fillsymbol.color = new Color([fillsymbol.color.r, fillsymbol.color.g, fillsymbol.color.b, a]);
+                        }
+                        return fillsymbol;
+                    }
+                    else {
+                        var fillsymbol = new SimpleFillSymbol();
+                        fillsymbol.color = new Color([238, 220, 130, 1]);
+                        var linesymbol = new SimpleLineSymbol();
+                        linesymbol.color = new Color([0, 0, 255, 1]);
+                        linesymbol.width = 2;
+                        fillsymbol.outline = linesymbol;
+                        return fillsymbol;
+                    }
+                }
+                else {
+                    var fillsymbol = new SimpleFillSymbol();
+                    fillsymbol.color = new Color([0, 255, 255, 0]);
+                    var linesymbol = new SimpleLineSymbol();
+                    linesymbol.color = new Color([0, 255, 255, 1]);
+                    linesymbol.width = 2;
+                    fillsymbol.outline = linesymbol;
+                    return fillsymbol;
+                }
+            }
+        }
+
+    });

File diff suppressed because it is too large
+ 720 - 0
src/main/resources/static/a4gis/gmap/v1.15.9/Tools.js


+ 3 - 0
src/main/resources/static/a4gis/gmap/v1.15.9/gmap.css

@@ -0,0 +1,3 @@
+.flow_line{
+
+}

+ 884 - 0
src/main/resources/static/a4gis/index.html

@@ -0,0 +1,884 @@
+<!DOCTYPE html>
+<html lang="zh-cn">
+<head>
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>华北油田生产指挥平台</title>
+  <link rel="stylesheet" href="./css/cascader.css" type="text/css">
+  <style>
+    html, body, #map {
+      margin: 0;
+      padding: 0;
+      width: 100%;
+      height: 100%;
+      overflow: hidden;
+      font-size: 12px;
+    }
+
+    #ctrl {
+      z-index: 999;
+      position: absolute;
+      right: 70px;
+      top: 30px;
+    }
+
+    #ctrl input {
+      cursor: pointer;
+      /*margin-left: 5px;*/
+    }
+
+    #info {
+      z-index: 999;
+      position: absolute !important;
+      height: 320px;
+      width: 240px;
+      right: 20px;
+      top: calc(50% - 160px);
+      border: 1px solid #999;
+      border-radius: 5px;
+      background-color: white;
+      overflow: auto;
+      padding: 3px 5px;
+      box-sizing: border-box;
+      line-height: 25px;
+      font-size: 13px;
+    }
+
+    #info span {
+      cursor: pointer;
+    }
+
+    #info span:hover {
+      background-color: #DCDCFF;
+    }
+
+    .poi-changesway {
+      cursor: pointer;
+    }
+
+    /*poi样式*/
+    #poiSearch {
+      position: absolute;
+      left: 75px;
+      top: 20px;
+      overflow: hidden;
+      pointer-events: none;
+      height: 621px;
+    }
+    div.search{
+      height: 40px;
+      width: 405px;
+      float: left;
+      display: inline-block;
+    }
+    div.search form{
+      width: 100%;
+      height: 100%;
+    }
+    div.search form input:nth-child(2){
+      width: 300px;
+      height: 100%;
+      font-size: 16px;
+      text-indent: 40px;
+      border: none;
+      float: left;
+    }
+    div.search form input:nth-child(3){
+      width: 100px;
+      height: 100%;
+      font-size: 16px;
+      letter-spacing: 5px;
+      border: none;
+      background-color: cornflowerblue;
+      color: #fff;
+    }
+    div.search form img{
+      position: absolute;
+      left: 10px;
+      /*transform: translateX(-250px);*/
+      margin-top: 10px;
+      /*margin-left: 10px;*/
+      height: 20px;
+    }
+    select {
+      width: 150px;
+      height: 100%;
+      font-size: 16px;
+    }
+    .option{
+      /*用div的样式代替select的样式*/
+      /*margin: 100px;*/
+      float: left;
+      margin-left: 2px;
+      width: 140px;
+      height: 40px;
+      /*border-radius: 5px;*/
+      /*盒子阴影修饰作用,自己随意*/
+      /* box-shadow: 0 0 5px #ccc;*/
+      border: 1px solid #cccccc;
+      position: relative;
+    }
+    .option select{
+      /*清除select的边框样式*/
+      border: none;
+      /*清除select聚焦时候的边框颜色*/
+      outline: none;
+      /*将select的宽高等于div的宽高*/
+      width: 100%;
+      height: 40px;
+      line-height: 40px;
+      /*隐藏select的下拉图标*/
+      appearance: none;
+      -webkit-appearance: none;
+      -moz-appearance: none;
+      /*通过padding-left的值让文字居中*/
+      padding-left: 20px;
+    }
+    /*使用伪类给select添加自己想用的图标*/
+    .option:after{
+      content: "";
+      width: 14px;
+      height: 8px;
+      background: url(arrow-down.png) no-repeat center;
+      /*通过定位将图标放在合适的位置*/
+      position: absolute;
+      right: 10px;
+      top: 41%;
+      /*给自定义的图标实现点击下来功能*/
+      pointer-events: none;
+    }
+    .checkBox {
+      float: left;
+      margin-top: 5px;
+    }
+    #well, #station, #pipe, #factory, #geology, #power{
+      width: 16px;
+      height: 16px;
+    }
+    .button1 {
+      margin-left: 2px;
+      width: 120px;
+      padding:3px;
+      background-color: cornflowerblue;
+      border-color: #357ebd;
+      color: #fff;
+      -moz-border-radius: 10px;
+      -webkit-border-radius: 10px;
+      border-radius: 10px; /* future proofing */
+      -khtml-border-radius: 10px; /* for old Konqueror browsers */
+      text-align: center;
+      vertical-align: middle;
+      border: 1px solid transparent;
+      font-weight: 900;
+      font-size:125%;
+    }
+    .input1 {
+      width: 100px;
+      height:32px;
+    }
+    .buttonGroup {
+      width: 600px;
+      height: 60px;
+      float: right;
+      text-align: right;
+    }
+    .esriSimpleSliderTL{
+      left: unset !important;
+      right: 20px;
+    }
+  </style>
+  <!--测试环境使用-->
+  <link href='https://js.arcgis.com/3.27/esri/css/esri.css' rel='stylesheet' />
+  <script src='jquery.min.js'></script>
+  <script src='https://js.arcgis.com/3.27/init.js' type='text/javascript'></script>
+  <script src='init-gmap.js?v=1.15.9' type='text/javascript'></script>
+  <script src='init-gcontrols.js?v=1.0.5' type='text/javascript'></script>
+
+  <!--正式环境使用
+  <link href='http://a4.petrochina/gisapi/esri/css/esri.css' rel='stylesheet' />
+  <script src='http://a4.petrochina/gisapi/third/jquery/jquery-1.9.1.min.js'></script>
+  <script src='http://a4.petrochina/gisapi/init.js' type='text/javascript'></script>
+  <script src='http://a4.petrochina/gisapi/lib/init-gmap.js?v=1.15.9' type='text/javascript'></script>
+  <script src='http://a4.petrochina/gisapi/lib/init-gcontrols.js?v=1.0.5' type='text/javascript'></script> -->
+
+  <script>
+    var map = null, app = { token: "d4b2b740-9814-4d75-9cda-dac96fc2bc10" };
+    var graLayer = null;
+    var testers = [{"x":116.22299368359181,"y":38.65785928124781},{"x":115.87417776562305,"y":38.68573597570963},{"x":115.95657522656056,"y":38.794993532692935},{"x":116.0087602851543,"y":38.61280477070679},{"x":115.65719778515431,"y":38.65785928124781},{"x":116.01974661327931,"y":38.91476998760284},{"x":116.59652883984181,"y":38.6278260872767},{"x":116.11313040234178,"y":38.32895709204688},{"x":115.32760794140432,"y":38.58275270026599}];
+    require(
+            [
+              "gmap/MapControl", "esri/Color", "esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol",
+              "esri/symbols/SimpleFillSymbol", "esri/SpatialReference", "esri/layers/GraphicsLayer", "dojo/on", "dojo/domReady!",
+              "esri/InfoTemplate","esri/geometry/Point", "esri/graphic"],
+            function (
+                    MapControl, Color, SimpleMarkerSymbol, SimpleLineSymbol,
+                    SimpleFillSymbol,SpatialReference, GraphicsLayer, on,
+                    InfoTemplate, Point, Graphic) {
+        // 初始化地图对象
+        map = new MapControl(
+          "map",
+          {
+            minLevel: 1, // 地图可缩放的最小级别
+            maxLevel: 18, // 地图可缩放的最大级别
+            //xmin: 115.9652862549,// 地图默认初始化范围最小经度
+            //ymin: 39.9267988067,// 地图默认初始化范围最小纬度
+            //xmax: 116.4370117187,// 地图默认初始化范围最大经度
+            //ymax: 40.1822305621,// 地图默认初始化范围最大纬度
+            showLabels: false, // FeatureLayer是否支持标注
+            isMercator: true, // 地图是否采用Mercator坐标系
+            mustTile: true // 支持全球连续模式
+          });
+        console.log("MapControl",map.MainMap, map);
+
+        // 地图参数配置
+        mapConfig = {
+          MapName: "华北油田生产指挥平台",
+          Token: app.token,
+          MapUrl: "http://a4.petrochina/arcgis/rest/services/HBYTSCZHPT/MapServer"
+          // MapUrl: "https://10.188.246.122:8185/arcgis/rest/services/HBYTSCZHPT/MapServer" // 给厂家打包
+        };
+
+        // 底图服务地址
+        var tileUrlPre = "http://a4.petrochina/A4Service/TileService.ashx?c=${col}&r=${row}&l=${level}&token=" + mapConfig.Token + "&type=";
+        // var tileUrlPre = "https://10.188.246.122:8185/A4Service/TileService.ashx?c=${col}&r=${row}&l=${level}&token=" + mapConfig.Token + "&type="; // 给厂家打包
+
+        // 数字线划图
+        var dlg = new Object();
+        dlg.TileID = "DLG";
+        dlg.TileName = "数字线划图";
+        dlg.MinLevel = 1;
+        dlg.MaxLevel = 18;
+        dlg.Token = null;
+        dlg.UrlFormats = [];
+        dlg.UrlFormats.push(tileUrlPre + "VECMIX");
+
+        // 数字正射影像
+        var dom = new Object();
+        dom.TileID = "DOM";
+        dom.TileName = "数字正射影像";
+        dom.MinLevel = 1;
+        dom.MaxLevel = 18;
+        dom.Token = null;
+        dom.UrlFormats = [];
+        dom.UrlFormats.push(tileUrlPre + "TDTIMG");
+        dom.UrlFormats.push(tileUrlPre + "TDTCIA");
+
+        // 加载瓦片数据
+        var tileSetting = [dlg, dom];
+        map.LoadTiles(tileSetting, "DLG");
+
+        var depName = "采油一厂"; // 初始厂名:采油一厂、采油二厂、采油三厂、采油四厂、采油五厂、二连分公司
+        var layerFilter = getLayerFilter(depName); // 图层过滤条件
+
+        // AGSLayer添加前事件
+        on.once(map, "BeforeAddMap", function (evt) {
+          var filter = [];
+          for (var i = 0, c = evt.Layers.length; i < c; i++) {
+            filter.push({ LayerID: evt.Layers[i].id, Filter: layerFilter });
+          }
+          //evt.MapInfo.LayersFilter = filter;
+        });
+
+        map.MainMap.on("load", function (){
+          console.log("map.MainMap.on.load",arguments);
+          //添加一个图层,用户坐标点显示
+          graLayer = new GraphicsLayer();
+          map.MainMap._innerAddLayer(graLayer);
+
+          //通知父页面,加载完成
+          window.parent.postMessage({action:'test', message:'hello,我即将传给父项目'}, "*");
+        });
+        map.MainMap.on("click", function (event){
+          //testers.push({x:event.mapPoint2.x, y:event.mapPoint2.y});
+          //console.log("map.MainMap.on.click", JSON.stringify(testers));
+        });
+
+        // 图层初始化完成事件
+        on(map, "AGSLayerInited", function (agsLayer) {
+          locateByDepName(depName);
+          hideLayers();
+          // 创建空间引用
+          app.sr = new SpatialReference(4326);
+
+          //创建GraphicsLayer
+          app.graLayer = new GraphicsLayer();
+
+          //将GraphicsLayer添加到地图
+          map.AddLayer(app.graLayer);
+
+          // 地图级别更改事件
+          on(map, "MapLevelChanged", function (level) {
+            console.log('map1', map.GetLevel());
+          });
+          // 鼠标移入事件
+          app.graLayer.on("mouse-over", function (evt) {
+            map.MainMap.setMapCursor("pointer");
+          });
+
+          // 鼠标点击事件
+          app.graLayer.on("click", function (evt) {
+            console.log('e',evt);
+          });
+
+          // 鼠标移出事件
+          app.graLayer.on("mouse-out", function (evt) {
+            map.MainMap.setMapCursor("default");
+          });
+
+          // 设置app参数
+          app.layer = findLayerByName("地面工程");
+          app.url = app.layer.MapServer + "?token=" + app.token;
+
+          // 创建符号
+          app.markerSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 10, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255, 0, 0, 1]), 1), new Color([255, 0, 0, 0.35]));
+          app.lineSymbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255, 0, 0, 1]), 1);
+          app.fillSymbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255, 0, 0, 0.65]), 1), new Color([255, 0, 0, 0.35]));
+        });
+        on(map, "GraphicMouseClick", function (evt) {
+          console.log('q', evt);
+          // 自定义window方法,vue组件注册,完成vue与iframe的通信,注册方法见baidu-page -> CenterCenter,搜索handleSpanClick
+          window.parent['handleSpanClick'](evt.name, evt.graphic.attributes);
+        });
+
+        // 加载地图服务数据
+        map.AddMap(mapConfig);
+    });
+
+    // 获取图层过滤条件
+    function getLayerFilter(depName) {
+      switch (depName) {
+        case "采油一厂":
+          return "SSDWDM BETWEEN 275964248064 AND 275964264447";
+        case "采油二厂":
+          return "SSDWDM BETWEEN 275964264448 AND 275964280831";
+        case "采油三厂":
+          return "SSDWDM BETWEEN 275964280832 AND 275964297215";
+        case "采油四厂":
+          return "SSDWDM BETWEEN 275964411904 AND 275964428287";
+        case "采油五厂":
+          return "SSDWDM BETWEEN 275964313600 AND 275964329983";
+        case "二连分公司":
+          return "SSDWDM BETWEEN 275964329984 AND 275964346367";
+        default:
+          return "1=1";
+      }
+    }
+
+    // 根据厂名称定位
+    function locateByDepNameSelect() {
+      var depName = $('#company').prop('value')
+      var where = "ORG_NAME='" + depName + "'";
+      queryRecords("厂边界", where, ["OBJECTID", "ORG_NAME"], function (features) {
+        if (!features || !features.length) {
+          return;
+        }
+
+        var f = features[0];
+        var layer = findLayerByName("厂边界");
+        map.ZoomToGeometry(f.geometry, layer); // 定位
+      });
+    }
+
+    // 根据井名称定位
+    function locateByDepNameButton() {
+      var depName = $('#condition').val()
+      console.log(depName)
+      var where = "WELL_COMMON_NAME='" + depName + "'";
+      queryRecords("井", where, ["OBJECTID", "WELL_COMMON_NAME"], function (features) {
+        if (!features || !features.length) {
+          return;
+        }
+        var f = features[0];
+        var layer = findLayerByName("井");
+        map.ZoomToGeometry(f.geometry, layer); // 定位
+        map.Flash(f.geometry, { count: 5 }); // 闪烁要素
+      });
+    }
+
+    function locateByDepName(depName) {
+      var where = "ORG_NAME='" + depName + "'";
+      queryRecords("厂边界", where, ["OBJECTID", "ORG_NAME"], function (features) {
+        if (!features || !features.length) {
+          return;
+        }
+
+        var f = features[0];
+        var layer = findLayerByName("厂边界");
+        map.ZoomToGeometry(f.geometry, layer); // 定位
+      });
+    }
+    // 查询并定位
+    function query() {
+      queryRecords("井", "WELL_COMMON_NAME='霸49'", ["OBJECTID", "WELL_COMMON_NAME"], function (features) {
+        if (!features || !features.length) {
+          alert("查询失败!");
+          return;
+        }
+
+        var f = features[0];
+        var layer = findLayerByName("井");
+        map.ZoomToGeometry(f.geometry, layer); // 定位
+        map.Flash(f.geometry, { count: 5 }); // 闪烁要素
+      });
+    }
+
+    // 查询记录
+    function queryRecords(layerName, where, fields, callback) {
+      require(["esri/tasks/query", "esri/tasks/QueryTask"], function (Query, QueryTask) {
+        var layer = findLayerByName(layerName);
+        var url = layer.MapServer + "?token=" + mapConfig.Token;
+
+        // 创建查询
+        var query = new Query();
+        query.returnGeometry = true; // 返回空间数据
+        query.where = where; // 查询条件
+        query.outFields = fields; // 返回字段
+        query.outSpatialReference = map.MainMap.spatialReference; // 返回数据的空间引用
+
+        // 创建查询任务
+        var task = new QueryTask(url);
+        task.execute(query, function (featureSet) {
+          if (callback) {
+            callback(featureSet && featureSet.features ? featureSet.features : null);
+          }
+        }, function (err) {
+          // 查询出错
+          console.log(err);
+        });
+      });
+    }
+
+    // 根据图层名称查找图层
+    function findLayerByName(layerName) {
+      var agsLayers = map.GetAllAGSLayers();
+
+      var layers = agsLayers[0];
+      for (var i = 0, c = layers.MapServerLayers.length; i < c; i++) {
+        if (layers.MapServerLayers[i].name == layerName) {
+          return layers.MapServerLayers[i];
+        }
+      }
+      return null;
+    }
+
+    // 显示井图层
+    function showLayers() {
+      // var all = ["井", "煤层气井",
+      //   "变电所", "联合站", "处理厂", "接转站", "脱水站", "增压站", "卸油站", "计量站(间)", "集油阀组间", "采油站",
+      //   "井网管道-油", "站间管道-油", "外输管线-油", "掺稀油管道",
+      //   "站库面", "配电线",
+      //   "厂边界", "矿边界"];
+      if ($('#well').prop('checked') === true) {
+        var layerNames = ["采油井"];
+        setLayerVisible(layerNames, true);
+      }
+      if ($('#well').prop('checked') === false) {
+        var layerNames = ["采油井"];
+        setLayerVisible(layerNames, false);
+      }
+      // var layerNames = ["井", "煤层气井"];
+      // setLayerVisible(layerNames, true);
+      // setLayerVisible(all, true);
+    }
+
+    // 显示站图层
+    function showStationLayers() {
+      if ($('#station').prop('checked') === true) {
+        var layerNames = ["联合站", "接转站", "脱水站", "增压站", "卸油站", "计量站(间)", "集油阀组间", "采油站"];
+        setLayerVisible(layerNames, true);
+        console.log('1')
+      }
+      if ($('#station').prop('checked') === false) {
+        var layerNames = ["联合站", "接转站", "脱水站", "增压站", "卸油站", "计量站(间)", "集油阀组间", "采油站"];
+        setLayerVisible(layerNames, false);
+        console.log('2')
+      }
+      // var layerNames = ["井", "煤层气井"];
+      // setLayerVisible(layerNames, true);
+    }
+
+    // 显示管道图层
+    function showPipeLayers() {
+      if ($('#pipe').prop('checked') === true) {
+        var layerNames = ["井网管道-油", "站间管道-油", "外输管线-油", "掺稀油管道"];
+        setLayerVisible(layerNames, true);
+      }
+      if ($('#pipe').prop('checked') === false) {
+        var layerNames = ["井网管道-油", "站间管道-油", "外输管线-油", "掺稀油管道"];
+        setLayerVisible(layerNames, false);
+      }
+      // var layerNames = ["井", "煤层气井"];
+      // setLayerVisible(layerNames, true);
+    }
+
+    // 显示地质单元图层
+    function showGeologyLayers() {
+      if ($('#geology').prop('checked') === true) {
+        var layerNames = ["矿边界"];
+        setLayerVisible(layerNames, true);
+      }
+      if ($('#geology').prop('checked') === false) {
+        var layerNames = ["矿边界"];
+        setLayerVisible(layerNames, false);
+      }
+    }
+
+    // 显示厂图层
+    function showFactoryLayers() {
+      if ($('#factory').prop('checked') === true) {
+        var layerNames = ["厂边界"];
+        setLayerVisible(layerNames, true);
+      }
+      if ($('#factory').prop('checked') === false) {
+        var layerNames = ["厂边界"];
+        setLayerVisible(layerNames, false);
+      }
+      // var layerNames = ["井", "煤层气井"];
+      // setLayerVisible(layerNames, true);
+    }
+
+    // 显示电力单元图层
+    function showPowerLayers() {
+      if ($('#power').prop('checked') === true) {
+        var layerNames = ["站库面", "配电线"];
+        setLayerVisible(layerNames, true);
+        console.log('1')
+      }
+      if ($('#power').prop('checked') === false) {
+        var layerNames = ["站库面", "配电线"];
+        setLayerVisible(layerNames, false);
+        console.log('2')
+      }
+      // var layerNames = ["井", "煤层气井"];
+      // setLayerVisible(layerNames, true);
+    }
+    // 显示矿权单元图层
+    function showKQLayers() {
+      console.log('zzz', map.GetLevel());
+      if ($('#kq').prop('checked') === true) {
+        var layerNames = ["矿权"];
+        setLayerVisible(layerNames, true);
+        console.log('1')
+      }
+      if ($('#kq').prop('checked') === false) {
+        var layerNames = ["矿权"];
+        setLayerVisible(layerNames, false);
+        console.log('2')
+      }
+      // var layerNames = ["井", "煤层气井"];
+      // setLayerVisible(layerNames, true);
+    }
+    // 显示矿权单元图层
+    function showCity() {
+      console.log('zzz', map.GetLevel());
+      if ($('#ct').prop('checked') === true) {
+        var layerNames = ["省级行政区"];
+        setLayerVisible(layerNames, true);
+        console.log('1')
+      }
+      if ($('#ct').prop('checked') === false) {
+        var layerNames = ["省级行政区"];
+        setLayerVisible(layerNames, false);
+        console.log('2')
+      }
+      // var layerNames = ["井", "煤层气井"];
+      // setLayerVisible(layerNames, true);
+    }
+
+    // 隐藏图层
+    function hideLayers() {
+      var layerNames = ["矿权"];
+      setLayerVisible(layerNames, false);
+    }
+    // 设置图层显示
+    function setLayerVisible(layerNames, flag) {
+      console.log('layerNames', layerNames);
+      var ids = [];
+      for (var i = 0, c = layerNames.length; i < c; i++) {
+        var layer = findLayerByName(layerNames[i]);
+        if (layer) {
+          ids.push(layer.id);
+        }
+      }
+      var agsLayer = map.GetAllAGSLayers()[0];
+      agsLayer.SetVisibilityEx(ids, flag);
+    }
+
+    // 切换底图按钮
+    function changeTile() {
+      var ts = map.GetCurrentTileSetting();
+      var tid = ts.TileID == "DLG" ? "DOM" : "DLG";
+      map.ChangeTile(tid);
+    }
+
+    // 切换底图下拉菜单
+    function typeChange() {
+      var ts = map.GetCurrentTileSetting();
+      var myItem = document.getElementById("sel");
+      var myOption = myItem.options[myItem.selectedIndex].getAttribute('on');
+      //根据获取到的不同属性值,来指定不同事件
+      if(myOption == '1'){
+        map.ChangeTile("DLG");
+      }
+      if(myOption == '2'){
+        map.ChangeTile("DOM");
+      }
+    }
+
+    // 点查
+    function drawPoint() {
+      cls();
+      map.DrawPoint(function (e) {
+        queryRecords1(e.geometry);
+      });
+    }
+
+    // 线查
+    function drawLine() {
+      cls();
+      map.DrawPolyline(function (e) {
+        console.log('线查DrawPolyline方法的参数', e);
+        queryRecords1(e.geometry);
+      });
+    }
+
+    // 圆查
+    function drawCircle() {
+      cls();
+      map.DrawCircle(function (e) {
+        console.log('2', e);
+        queryRecords1(e.geometry);
+      });
+    }
+
+    // 面查
+    function drawPolygon() {
+      cls();
+      map.DrawPolygon(function (e) {
+        queryRecords1(e.geometry);
+      });
+    }
+
+    // 框查
+    function drawRect() {
+      cls();
+      map.DrawRect(function (e) {
+        queryRecords1(e.geometry);
+      });
+    }
+    // 查询记录
+    function queryRecords1(geometry) {
+      map.Pan(); // 地图平移
+      addGraphic(geometry); // 添加图形
+
+      require(["esri/tasks/query", "esri/tasks/QueryTask"], function (Query, QueryTask) {
+        // 创建查询
+        var query = new Query();
+        query.geometry = geometry; // 空间条件
+        query.returnGeometry = true; // 返回空间数据 ,
+        // query.outFields = ["OBJECTID", "WELL_COMMON_NAME", "WELL_LEGAL_NAME", "WELL_PURPOSE",]; // 返回字段
+        query.outFields =  ["*"]; // 返回字段
+        query.spatialRelationship = Query.SPATIAL_REL_INTERSECTS; // 交集
+        query.outSpatialReference = map.MainMap.spatialReference; // 返回数据的空间引用
+
+        // 对点进行100米缓冲,避免查无数据
+        if (geometry.type == "point" || geometry.type == 'polyline') {
+          query.units = "meters"; // 单位
+          query.distance = 500; // 距离
+        }
+        // 创建查询任务
+        // app.layerStation =  findLayerByName("站库面",);
+        app.layerStation =  findLayerByName("集油_中型站库",);
+        app.urlStation = app.layerStation.MapServer + "?token=" + app.token;
+
+        app.layerStation3 =  findLayerByName("集油_大型站库",);
+        app.urlStation3 = app.layerStation3.MapServer + "?token=" + app.token;
+
+        app.layerStation4 =  findLayerByName("集油_小型站库",);
+        app.urlStation4 = app.layerStation4.MapServer + "?token=" + app.token;
+
+        app.layerWell =  findLayerByName("采油井",);
+        app.urlWell = app.layerWell.MapServer + "?token=" + app.token;
+
+        var task = new QueryTask(app.urlStation); // 站
+        var task3 = new QueryTask(app.urlStation3); // 站
+        var task4 = new QueryTask(app.urlStation4); // 站
+        var task2 = new QueryTask(app.urlWell);   // 井
+
+        task.execute(query, queryCallBack, function (err) {
+          console.log(err);
+        });
+        task2.execute(query, queryCallBack, function (err) {
+          console.log(err);
+        });
+        task3.execute(query, queryCallBack, function (err) {
+          console.log(err);
+        });
+        task4.execute(query, queryCallBack, function (err) {
+          console.log(err);
+        });
+      });
+    }
+
+    // 查询回调函数
+    function queryCallBack(featureSet) {
+      console.log('queryCallBack查询图层数据(采油井)', featureSet.features)
+      var count = featureSet && featureSet.features.length ? featureSet.features.length : 0;
+      $("#info").html("查询到 " + count + " 条记录<br/>");
+      // if (count == 0) {
+      //   return;
+      // }
+      window.parent['drawCircleClick'](featureSet.features);
+      // 输出记录
+      // for (var i = 0; i < count; i++) {
+      //   var f = featureSet.features[i];
+      //   var html = "<span id='f_" + f.attributes["OBJECTID"] + "'>" + (i + 1) + " > " + f.attributes["WELL_COMMON_NAME"] + "</span><br/>";
+      //   $("#info").append(html);
+      // }
+
+      // 绑定定位功能
+      $("#info span").on("click", function (e) {
+        var id = $(this).attr("id").replace("f_", "");
+        for (var i = 0; i < count; i++) {
+          var f = featureSet.features[i];
+          if (f.attributes["OBJECTID"] == id) {
+            map.ZoomToGeometry(f.geometry, app.layer); // 定位
+            map.Flash(f.geometry, { count: 5 }); // 闪烁要素
+            break;
+          }
+        }
+      });
+    }
+
+    // 清除
+    function cls(type) {
+      // document.getElementById("long").value = '';
+      // document.getElementById("lat").value = '';
+      // 清除
+      app.graLayer.clear();
+      map.ClearGraphic();
+      if (type) {
+        $("#info").html("提示:对“华北油田-井”图层进行查询。");
+      } else {
+        $("#info").html("");
+      }
+    }
+
+    //显示定位图标
+    var pgs = {};
+    var pointObjects = {};
+    function setSymbols(points) {
+      graLayer.clear();
+      pgs = {};
+      pointObjects = {};
+
+      require(["esri/geometry/Point", "esri/graphic", "esri/Color", "esri/symbols/SimpleMarkerSymbol", "esri/InfoTemplate"],
+        function (Point, Graphic, Color, SimpleMarkerSymbol, InfoTemplate) {
+          let minx=points[0].x, maxx=points[0].x;
+          let miny=points[0].y, maxy=points[0].y;
+
+          //显示所有标注
+          for(let i=0;i<points.length;i++) {
+            let obj = points[i];
+            if(obj.x==null || obj.x==undefined) continue;
+            if(obj.y==null || obj.y==undefined) continue;
+            obj.x = obj.x *1;
+            obj.y = obj.y *1;
+
+            let point = new Point(obj.x, obj.y, app.sr);
+            let pointSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE,
+                    12, null, new Color([255, 0, 0, 1]));
+
+            let template = new InfoTemplate();
+            template.setTitle("<b>${well_id}</b>");
+            template.setContent("井名:${well_common_name}<br>地址:${geo_description}");
+
+            obj.index = i;
+            var pg = new Graphic(point, pointSymbol, obj, template);
+            // 添加图形到GraphicsLayer
+            graLayer.add(pg);
+            pgs[obj.well_id] = pg;
+            pointObjects[obj.well_id] = point;
+
+            if(obj.x < minx) minx = obj.x;
+            if(obj.x > maxx) maxx = obj.x;
+            if(obj.y < miny) miny = obj.y;
+            if(obj.y > maxy) maxy = obj.y;
+          }
+          //地图放大缩小
+          let border = 0.3;
+          console.log("max min", minx, miny, maxx, maxy);
+          minx = minx*1 - border;
+          miny = miny*1 - border;
+          maxx = maxx*1 + border;
+          maxy = maxy*1 + border;
+          console.log("max min", minx, miny, maxx, maxy);
+          map.ZoomToExtent(minx, miny, maxx, maxy);
+        });
+    }
+
+    function clearSymbols(){
+      graLayer.clear();
+      let long = document.getElementById("long").value;
+      let lat = document.getElementById("lat").value;
+      map.ZoomToLevel(9, long, lat);
+    }
+
+    function zoomToCenter(obj){
+      if(obj.x==null || obj.x==undefined) return;
+      if(obj.y==null || obj.y==undefined) return;
+      obj.x = obj.x *1;
+      obj.y = obj.y *1;
+
+      //map.ZoomToLevel(9, obj.x, obj.y);
+
+      if(pointObjects[obj.well_id]) {
+        console.log("zoomToCenter",pointObjects[obj.well_id]);
+        // 设置弹窗自动显示
+        map.MainMap.infoWindow.show(pointObjects[obj.well_id]);
+        map.MainMap.infoWindow.setFeatures([pgs[obj.well_id]]);
+        map.MainMap.centerAt(pointObjects[obj.well_id]);
+      }
+    }
+
+    //获得vue iframe 传过来的数据
+    window.addEventListener("message", function (event) {
+      console.log('child handle Message', event);
+      if(event.data.action=="setSymbols"){
+        let points = JSON.parse(event.data.datas);
+        console.log('child handle points', points);
+        setSymbols(points);
+      }
+      if(event.data.action=="setCenter"){
+        let point = JSON.parse(event.data.item);
+        zoomToCenter(point);
+      }
+    }, false);
+  </script>
+</head>
+<body>
+<div id="map"></div>
+<div id="poiSearch"></div>
+<div id="ctrl" style="display: inline-block;">
+  <div class="option">
+    <select id="company" name="company" onchange="locateByDepNameSelect();">
+      <option value='' disabled selected style='display:none; color: gray'>请选择生产单位</option>
+      <option on="1" value="采油一厂">采油一厂</option>
+      <option on="2" value="采油二厂">采油二厂</option>
+      <option on="3" value="采油三厂">采油三厂</option>
+      <option on="4" value="采油四厂">采油四厂</option>
+      <option on="5" value="采油五厂">采油五厂</option>
+      <option on="6" value="二连分公司">二连分公司</option>
+      <option on="7" value="巴彦分公司">巴彦分公司</option>
+    </select>
+  </div>
+  <div class="option">
+    <select id="sel" name="selectType" onchange="typeChange()">
+      <option value='' disabled selected style='display:none;'>请选择底图影像</option>
+      <option on="1" value="DLG">数字线划图</option>
+      <option on="2" value=“DOM”>数字正射影像</option>
+    </select>
+  </div>
+</div>
+</body>
+</html>

+ 63 - 0
src/main/resources/static/a4gis/init-gcontrols.js

@@ -0,0 +1,63 @@
+define("petrochina_jscontrols_api", function () {
+    function getParam(paramName) {
+        var scripts = document.getElementsByTagName("script");
+        var script = scripts[scripts.length - 1];
+        var localUrl = document.querySelector ? script.src : script.getAttribute("src", 4); //IE8直接.src
+        var searchParme = localUrl.substring(localUrl.indexOf("?"));
+        var reg = new RegExp('(^|&)' + paramName + '=([^&]*)(&|$)', 'i');
+        var r = searchParme.substr(1).match(reg);
+        if (r != null) {
+            return unescape(r[2]);
+        }
+        return "";
+    }
+
+    function GetQueryString(name) {
+        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
+        var r = window.location.search.substr(1).match(reg); //search,查询?后面的参数,并匹配正则
+        if (r != null) return unescape(r[2]);
+        return null;
+    }
+
+    // 设置API路径
+    var _currentPath;
+    var version = "1.0.4";
+
+    version = getParam("v") || version;
+    version = window.gcontrols_version || version;
+    version = GetQueryString("gcontrols") || version;
+
+    var srcPath = "/v" + version + "/lib";
+    var cssPath = "/v" + version + "/css";
+    var thirdPath = "/v" + version + "/third";
+    var thirdList = ["/terraformer/terraformer.js",
+        "/terraformer/terraformer-wkt-parser.js",
+        "/terraformer/terraformer-arcgis-parser.js"
+    ];
+    var init_js = "init-gcontrols";
+    var next_folder = "gcontrols";
+    var filesJs = document.getElementsByTagName("script");
+    for (var i = filesJs.length - 1; i >= 0; i--) {
+        var url = filesJs[i].src || "";
+        var newUrl = url.toLocaleLowerCase();
+        if (newUrl != undefined && newUrl.length > init_js.length && newUrl.indexOf(init_js) != -1) {
+            _currentPath = url.substring(0, newUrl.indexOf(init_js));
+            _currentPath += next_folder;
+            break;
+        }
+    }
+    document.write('<link rel="stylesheet" href="' + _currentPath + cssPath + '/gcontrols.css"  rel="stylesheet"/>');
+    thirdList.forEach(function (thirdJS) {
+        document.write('<script type="text/javascript" src="' + _currentPath + thirdPath + thirdJS + '"></script>');
+    });
+    //打印使用
+    if (version != '1.0' && version != '1.0.1' && version != '1.0.2') {
+        document.write('<script type="text/javascript" src="' + _currentPath + thirdPath + '/Tdrag.min.js" data-print=1></script>');
+    }
+    // 非DOJO项目包下的路径注册到DOJO路径 
+    dojo.registerModulePath(next_folder, _currentPath + srcPath);
+});
+// 初始化请求对象
+require([
+    "petrochina_jscontrols_api"
+], function () { });

+ 62 - 0
src/main/resources/static/a4gis/init-gmap.js

@@ -0,0 +1,62 @@
+define("petrochina_jsmap_api", function () {
+    function getParam(paramName) {
+        var scripts = document.getElementsByTagName("script");
+        var script = scripts[scripts.length - 1];
+        var localUrl = document.querySelector ? script.src : script.getAttribute("src", 4);//IE8直接.src
+        var searchParme = localUrl.substring(localUrl.indexOf("?"));
+        var reg = new RegExp('(^|&)' + paramName + '=([^&]*)(&|$)', 'i');
+        var r = searchParme.substr(1).match(reg);
+        if (r != null) {
+            return unescape(r[2]);
+        }
+        return "";
+    }
+    function GetQueryString(name) {
+        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
+        var r = window.location.search.substr(1).match(reg);//search,查询?后面的参数,并匹配正则
+        if (r != null) return unescape(r[2]); return null;
+    }
+    // 设置API路径
+    var _currentPath;
+    var version = "1.15.9";
+    var init_js = "init-gmap.js";
+    var next_folder = "gmap";
+    /** 
+    * 获取指定的URL参数值 
+    * 参数:paramName URL参数 
+    * 调用方法:getParam("name") 
+    * 返回值:
+    */
+    version = getParam("v") || version;
+    version = window.gmap_version || version;
+    version = GetQueryString("gmap") || version;
+
+    var filesJs = document.getElementsByTagName("script");
+    for (var i = filesJs.length - 1; i >= 0; i--) {
+        var url = filesJs[i].src || "";
+        var newUrl = url.toLocaleLowerCase();
+        if (newUrl != undefined && newUrl.length > init_js.length && newUrl.indexOf(init_js) != -1) {
+            _currentPath = url.substring(0, newUrl.indexOf(init_js));
+            _currentPath += (next_folder + "/v" + version);
+            break;
+        }
+    }
+
+    var v_arr = version.split(".");
+    var v1 = parseInt(v_arr[0] || "0");
+    var v2 = parseInt(v_arr[1] || "0");
+    var v3 = parseInt(v_arr[2] || "0");
+    if (v1 >= 1 && v2 >= 14 && v3 >= 6) {
+        document.write('<link rel="stylesheet" href="' + _currentPath + '/gmap.css"  rel="stylesheet"/>');
+    }
+    // 非DOJO项目包下的路径注册到DOJO路径
+    dojo.registerModulePath(next_folder, _currentPath);
+
+});
+// 初始化请求对象
+require([
+    "petrochina_jsmap_api",
+    "gmap/MapControl"
+], function (
+) {
+});

File diff suppressed because it is too large
+ 5 - 0
src/main/resources/static/a4gis/jquery.min.js


BIN
target/classes/com/bowintek/practice/config/WebConfiguration.class


+ 3 - 3
vue/src/components/basic/chart/chart-map.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="chart-map">
-    <div class="chart-map-input">
+    <div class="chart-map-input" v-if="wellId==null">
       <a-auto-complete
         :dropdown-match-select-width="252"
         style="width: 300px"
@@ -48,7 +48,7 @@
     },
     setup(props, context){
       console.log("ChartMap setup" , props, context);
-      let iframeSrc = ref<string>("http://127.0.0.1:1936/a4gis/index.html");
+      let iframeSrc = ref<string>("http://192.168.0.68:8077/a4gis/index.html");
       let iframeRef = ref<any>();   // 和iframe标签的ref绑定
 
       const wellId = computed(() => {
@@ -74,7 +74,7 @@
         //数据查询逻辑,如果不查询,改此方法返回数据即可
         if(this.datas==null){
           this.datas = [];
-          const result = await get('/wellInfo/getMapList',{ page: 1, rows:1000 });
+          const result = await get('/wellInfo/getMapList',{ page: 1, rows:1000,well_id: this.wellId});
           this.datas = result.list.map((item, index) => {
             item.value = item.well_id;
             item.index = index;

+ 1 - 1
vue/src/router/constant.ts

@@ -7,7 +7,7 @@ export const PARENT_LAYOUT_NAME = 'ParentLayout';
 export const PAGE_NOT_FOUND_NAME = 'PageNotFound';
 
 // 路由白名单
-export const whiteNameList = [LOGIN_NAME, 'icons', 'error', 'error-404'] as const; // no redirect whitelist
+export const whiteNameList = [LOGIN_NAME,'icons', 'error', 'error-404'] as const; // no redirect whitelist
 
 export type WhiteNameList = typeof whiteNameList;
 

+ 40 - 29
vue/src/views/wellinfo/detail.vue

@@ -53,7 +53,9 @@
       <div v-if="cardSettings.cardBaseInfo.expand">
         <a-divider type="vertical" class="info-title" style="margin-top: 0px" dashed>井身结构</a-divider>
         <a-descriptions bordered>
-          <a-descriptions-item  :labelStyle="{'width':'12%'}" :contentStyle="{'width':'21%'}"  label="井id:">{{ dataModel.well_id }}</a-descriptions-item>
+          <a-descriptions-item :labelStyle="{'width':'12%'}" :contentStyle="{'width':'21%'}" label="井id:">
+            {{ dataModel.well_id }}
+          </a-descriptions-item>
           <a-descriptions-item label="井名:">{{ dataModel.well_common_name }}</a-descriptions-item>
           <a-descriptions-item label="井别:">{{ dataModel.well_purpose }}</a-descriptions-item>
           <a-descriptions-item label="井型:">{{ dataModel.well_type }}</a-descriptions-item>
@@ -72,7 +74,9 @@
         </a-descriptions>
         <a-divider type="vertical" class="info-title" dashed>井A1信息</a-divider>
         <a-descriptions bordered>
-          <a-descriptions-item :labelStyle="{'width':'12%'}" :contentStyle="{'width':'21%'}"  label="采油厂机构:">{{ dataModel.org_name_a1 }}</a-descriptions-item>
+          <a-descriptions-item :labelStyle="{'width':'12%'}" :contentStyle="{'width':'21%'}" label="采油厂机构:">
+            {{ dataModel.org_name_a1 }}
+          </a-descriptions-item>
           <a-descriptions-item label="单位名称:">{{ dataModel.org_name_a2 }}</a-descriptions-item>
           <a-descriptions-item label="标准井名:">{{ dataModel.well_legal_name }}</a-descriptions-item>
           <a-descriptions-item label="地理位置描述:" :span="3">{{ dataModel.geo_description }}</a-descriptions-item>
@@ -98,7 +102,9 @@
         </a-descriptions>
         <a-divider type="vertical" class="info-title" dashed>井盆地凹陷信息</a-divider>
         <a-descriptions bordered>
-          <a-descriptions-item :labelStyle="{'width':'12%'}" :contentStyle="{'width':'21%'}"  label="标准盆地:">{{ dataModel.bz_basin }}</a-descriptions-item>
+          <a-descriptions-item :labelStyle="{'width':'12%'}" :contentStyle="{'width':'21%'}" label="标准盆地:">
+            {{ dataModel.bz_basin }}
+          </a-descriptions-item>
           <a-descriptions-item label="标准地陷:">{{ dataModel.bz_depression }}</a-descriptions-item>
           <a-descriptions-item label="标准凹陷:">{{ dataModel.bz_depressed }}</a-descriptions-item>
           <a-descriptions-item label="标准构造带:">{{ dataModel.bz_structural_belt }}</a-descriptions-item>
@@ -149,11 +155,12 @@
                             :style="cardSettings.buttonStyle"/>
       </template>
       <div v-if="cardSettings.cardTest.expand">
-        <p  class="info-body">本井共实施
+        <p class="info-body">本井共实施
           <template v-for="it in testHistorySummary">
-            <span>{{it.testing_num}}</span>次{{ it.testing_name }}、
+            <span>{{ it.testing_num }}</span>次{{ it.testing_name }}、
           </template>
-          <span>{{lastTestHistory.testing_date}}</span>进行最近一次<span>{{lastTestHistory.testing_name}}</span>,   <span>{{lastTestHistory.construction_description}}</span>
+          <span>{{ lastTestHistory.testing_date }}</span>进行最近一次<span>{{ lastTestHistory.testing_name }}</span>,
+          <span>{{ lastTestHistory.construction_description }}</span>
         </p>
         <br/>
         <a-table :columns="testHistoryColumns" :data-source="testHistoryList" :scroll="{ x:'100%', y: 500 }"
@@ -172,7 +179,7 @@
       <div v-if="cardSettings.cardAnalysis.expand">
         <p class="info-body">
           <template v-for="it in analyticalAssaysSummary">
-            {{ it.item_code }}<span>{{it[it.item_code]}}</span>组、
+            {{ it.item_code }}<span>{{ it[it.item_code] }}</span>组、
           </template>
         </p>
         <br>
@@ -190,13 +197,15 @@
                             :style="cardSettings.buttonStyle"/>
       </template>
       <div v-if="cardSettings.cardWork.expand">
-        <p  class="info-body">
-          井实施井下作业施工<span>{{historyAssignmentCount}}</span>次,其中
+        <p class="info-body">
+          井实施井下作业施工<span>{{ historyAssignmentCount }}</span>次,其中
           <template v-for="it in historyAssignmentSummary">
-            {{ it.test_processes_name }}<span>{{it.testing_num}}</span>次、
+            {{ it.test_processes_name }}<span>{{ it.testing_num }}</span>次、
           </template>
           <span>{{ lastHistoryAssignment.start_time }}{{ lastHistoryAssignment.test_processes_name }}</span>,
-          <span>{{ lastHistoryAssignment.test_processes_name }}</span>井段<span>{{ lastHistoryAssignment.well_production_sections }}</span></p>
+          <span>{{
+              lastHistoryAssignment.test_processes_name
+            }}</span>井段<span>{{ lastHistoryAssignment.well_production_sections }}</span></p>
         <br/>
         <a-table :columns="historyAssignmentColumns" :data-source="historyAssignmentList" :scroll="{ x:'100%', y: 500 }"
                  :pagination="false"
@@ -212,10 +221,9 @@
                             :style="cardSettings.buttonStyle"/>
       </template>
       <div v-if="cardSettings.cardGIS.expand">
-        哈23-12井井实施井下作业施工1次,其中油管测试1次;2015年08月23日油管测试,油管测试井段7458m-7613.05m
-        <p>Card content</p>
-        <p>Card content</p>
-        <p>Card content</p>
+        <div style="width:100%;height: 500px;margin-top:15px;">
+          <ChartMap :wellId="wellId"></ChartMap>
+        </div>
       </div>
     </a-card>
   </div>
@@ -229,10 +237,11 @@ import {useRoute} from "vue-router";
 import router from "@/router";
 import * as columns from './columns';
 import ChartProdDynmics from '@/components/basic/chart/chart-prod-dynamics.vue'
+import ChartMap from '@/components/basic/chart/chart-map.vue'
 
 export default defineComponent({
   name: 'wellinfoDetail',
-  components: {ChartProdDynmics},
+  components: {ChartProdDynmics, ChartMap},
   setup() {
     const tabsViewStore = useTabsViewStore();
     const route = useRoute();
@@ -249,6 +258,8 @@ export default defineComponent({
       cardWork: {expand: true},
       cardGIS: {expand: true}
     })
+    const wellId = ref(history.state.params?.id);
+
     watch(
       () => cardSettings,
       () => {
@@ -260,14 +271,14 @@ export default defineComponent({
       dataModel: {well_id: null},
       boreholeInterList: [],
       testHistoryList: [],
-      testHistorySummary:[],
-      lastTestHistory:{},
+      testHistorySummary: [],
+      lastTestHistory: {},
       analyticalAssaysList: [],
-      analyticalAssaysSummary:[],
+      analyticalAssaysSummary: [],
       historyAssignmentList: [],
-      historyAssignmentSummary:[],
-      lastHistoryAssignment:{},
-      historyAssignmentCount:0,
+      historyAssignmentSummary: [],
+      lastHistoryAssignment: {},
+      historyAssignmentCount: 0,
       dataIndexList: []
     });
 
@@ -279,15 +290,15 @@ export default defineComponent({
         wellData.dataModel = data.dataModel;
         wellData.boreholeInterList = data.boreholeInterList;
         wellData.testHistoryList = data.testHistoryList;
-        wellData.testHistorySummary =data.testHistorySummary;
-        wellData.lastTestHistory=data.lastTestHistory;
+        wellData.testHistorySummary = data.testHistorySummary;
+        wellData.lastTestHistory = data.lastTestHistory;
         wellData.analyticalAssaysList = data.analyticalAssaysList;
-        wellData.analyticalAssaysSummary=data.analyticalAssaysSummary;
+        wellData.analyticalAssaysSummary = data.analyticalAssaysSummary;
         wellData.historyAssignmentList = data.historyAssignmentList;
-        wellData.historyAssignmentSummary=data.historyAssignmentSummary;
-        wellData.lastHistoryAssignment=data.lastHistoryAssignment;
+        wellData.historyAssignmentSummary = data.historyAssignmentSummary;
+        wellData.lastHistoryAssignment = data.lastHistoryAssignment;
         wellData.dataIndexList = data.dataIndexList;
-        wellData.historyAssignmentCount =wellData.historyAssignmentSummary.reduce((total, it:any) => total + it.testing_num, 0);
+        wellData.historyAssignmentCount = wellData.historyAssignmentSummary.reduce((total, it: any) => total + it.testing_num, 0);
       })
       get('wellInfo/getExpendSetting', {wellId: id}).then(data => {
         if (data != null) {
@@ -304,7 +315,7 @@ export default defineComponent({
       ...toRefs(wellData),
       loadData, cardSettings,
       onClose, ...columns,
-      dayjs
+      dayjs, wellId
     };
   },
   created() {

+ 5 - 1
vue/src/views/wellinfo/index.vue

@@ -208,6 +208,9 @@
                       @change="(current)=>handleTableChange({ current: current,pageSize: pagination.pageSize })"
                       @showSizeChange="(current,pageSize)=>handleTableChange({ current: current,pageSize: pageSize })"/>
       </a-spin>
+      <div style="width:100%;height: 500px">
+        <ChartMap></ChartMap>
+      </div>
     </div>
     <a-modal v-model:visible="isShowDoc" title="相关文档" :footer="null" @onCancel="isShowDoc=false">
       <a-list item-layout="horizontal" :data-source="docList">
@@ -243,10 +246,11 @@ import {getPaginationTotalTitle} from "@/utils/common";
 import type {TableProps} from "ant-design-vue";
 import {useTabsViewStore} from "@/store/modules/tabsView";
 import ChartCell from '@/components/basic/chart/chart-cell.vue'
+import ChartMap from '@/components/basic/chart/chart-map.vue'
 
 export default defineComponent({
   name: 'wellinfoindex',
-  components: {ChartCell},
+  components: {ChartCell,ChartMap},
   setup() {
     const route = useRoute();
     const expand = ref(false);