From 60e5202efdc7a91315d2620f505de1b7111cc7b7 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sun, 21 Mar 2021 13:10:11 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/jfpt-Vue

---
 /dev/null                                                     |  199 --
 src/views/realTimePolice/real.vue                             |   36 
 public/map/widgets/analysisAndJudgment/AnalysisAndJudgment.js |   28 
 public/map/widgets/aPoliceTeam/APoliceTeam.js                 | 4050 ++++++++++++++++++++++++++-------------------------
 public/map/widgets/analysisAndJudgment/template.html          |   11 
 src/views/policeTracking/policeTracking.vue                   |  160 +
 src/views/home/home.vue                                       |   99 
 src/page/index/logo.vue                                       |    2 
 8 files changed, 2,307 insertions(+), 2,278 deletions(-)

diff --git a/public/map/widgets/aPoliceTeam/APoliceTeam.js b/public/map/widgets/aPoliceTeam/APoliceTeam.js
index 0372681..261b1e9 100644
--- a/public/map/widgets/aPoliceTeam/APoliceTeam.js
+++ b/public/map/widgets/aPoliceTeam/APoliceTeam.js
@@ -7,2033 +7,2111 @@
  * @LastEditTime: 2019-12-14 14:44:57
  */
 define([
-    "dojo",
-    "dojo/_base/declare",
-    "dojo/_base/lang",
-    "base/BaseWidget",
-    "dojo/text!widgets/aPoliceTeam/template.html",
-    "base/AppEvent",
-    "base/ConfigData",
-    "widgets/aPoliceTeam/config",
-    "dojo/dom",
-    "dojo/dom-construct",
-    "dojo/dom-attr",
-    "dojo/dom-style",
-    "dojo/on",
-    "esri/layers/ArcGISDynamicMapServiceLayer",
-    "esri/layers/ArcGISTiledMapServiceLayer",
-    "esri/layers/FeatureLayer",
-    "controls/tab/TabControl",
-    "esri/dijit/SymbolStyler",
-    "esri/styles/basic",
-    "dojo/_base/array",
-    "esri/InfoTemplate",
-    "esri/tasks/query",
-    "esri/tasks/QueryTask",
-    "esri/Color",
-    "esri/toolbars/edit",
-    "esri/graphic",
-    "esri/geometry/Point",
-    "esri/geometry/Polyline",
-    "esri/geometry/Polygon",
-    "esri/geometry/Extent",
-    "esri/tasks/FeatureSet",
-    "esri/renderers/HeatmapRenderer",
-    "esri/symbols/SimpleLineSymbol",
-    "esri/symbols/SimpleFillSymbol",
-    "esri/symbols/PictureMarkerSymbol",
-    "esri/symbols/SimpleMarkerSymbol",
-    "esri/SpatialReference",
-    "esri/tasks/GeometryService",
-    "esri/tasks/ProjectParameters",
-    "esri/layers/GraphicsLayer",
-    "esri/layers/LabelLayer",
-    "esri/symbols/TextSymbol",
-    "esri/renderers/SimpleRenderer",
-    "esri/renderers/ClassBreaksRenderer",
-    "esri/tasks/Geoprocessor",
-    "esri/tasks/DataFile",
-    "esri/geometry/webMercatorUtils",
-    "esri/symbols/Font",
-    "esri/geometry/ScreenPoint",
-    "esri/layers/ImageParameters",
-    "esri/geometry/geometryEngine",
-    "esri/dijit/PopupTemplate",
-    "widgets/clientManagement/FlareClusterLayer_v3",
-    "dojo/domReady!"
+  "dojo",
+  "dojo/_base/declare",
+  "dojo/_base/lang",
+  "base/BaseWidget",
+  "dojo/text!widgets/aPoliceTeam/template.html",
+  "base/AppEvent",
+  "base/ConfigData",
+  "widgets/aPoliceTeam/config",
+  "dojo/dom",
+  "dojo/dom-construct",
+  "dojo/dom-attr",
+  "dojo/dom-style",
+  "dojo/on",
+  "esri/layers/ArcGISDynamicMapServiceLayer",
+  "esri/layers/ArcGISTiledMapServiceLayer",
+  "esri/layers/FeatureLayer",
+  "controls/tab/TabControl",
+  "esri/dijit/SymbolStyler",
+  "esri/styles/basic",
+  "dojo/_base/array",
+  "esri/InfoTemplate",
+  "esri/tasks/query",
+  "esri/tasks/QueryTask",
+  "esri/Color",
+  "esri/toolbars/edit",
+  "esri/graphic",
+  "esri/geometry/Point",
+  "esri/geometry/Polyline",
+  "esri/geometry/Polygon",
+  "esri/geometry/Extent",
+  "esri/tasks/FeatureSet",
+  "esri/renderers/HeatmapRenderer",
+  "esri/symbols/SimpleLineSymbol",
+  "esri/symbols/SimpleFillSymbol",
+  "esri/symbols/PictureMarkerSymbol",
+  "esri/symbols/SimpleMarkerSymbol",
+  "esri/SpatialReference",
+  "esri/tasks/GeometryService",
+  "esri/tasks/ProjectParameters",
+  "esri/layers/GraphicsLayer",
+  "esri/layers/LabelLayer",
+  "esri/symbols/TextSymbol",
+  "esri/renderers/SimpleRenderer",
+  "esri/renderers/ClassBreaksRenderer",
+  "esri/tasks/Geoprocessor",
+  "esri/tasks/DataFile",
+  "esri/geometry/webMercatorUtils",
+  "esri/symbols/Font",
+  "esri/geometry/ScreenPoint",
+  "esri/layers/ImageParameters",
+  "esri/geometry/geometryEngine",
+  "esri/dijit/PopupTemplate",
+  "widgets/clientManagement/FlareClusterLayer_v3",
+  "dojo/domReady!"
 ], function (
-    dojo,
-    declare,
-    lang,
-    BaseWidget,
-    template,
-    AppEvent,
-    ConfigData,
-    config,
-    dom,
-    domConstruct,
-    domAttr,
-    domStyle,
-    on,
-    ArcGISDynamicMapServiceLayer,
-    ArcGISTiledMapServiceLayer,
-    FeatureLayer,
-    TabControl,
-    SymbolStyler,
-    basic,
-    arrayUtils,
-    InfoTemplate,
-    Query,
-    QueryTask,
-    Color,
-    Edit,
-    Graphic,
-    Point,
-    Polyline,
-    Polygon,
-    Extent,
-    FeatureSet,
-    HeatmapRenderer,
-    SimpleLineSymbol,
-    SimpleFillSymbol,
-    PictureMarkerSymbol,
-    SimpleMarkerSymbol,
-    SpatialReference,
-    GeometryService,
-    ProjectParameters,
-    GraphicsLayer,
-    LabelLayer,
-    TextSymbol,
-    SimpleRenderer,
-    ClassBreaksRenderer,
-    Geoprocessor,
-    DataFile,
-    webMercatorUtils,
-    Font,
-    ScreenPoint,
-    ImageParameters,
-    geometryEngine,
-    PopupTemplate,
-    FlareClusterLayer
+  dojo,
+  declare,
+  lang,
+  BaseWidget,
+  template,
+  AppEvent,
+  ConfigData,
+  config,
+  dom,
+  domConstruct,
+  domAttr,
+  domStyle,
+  on,
+  ArcGISDynamicMapServiceLayer,
+  ArcGISTiledMapServiceLayer,
+  FeatureLayer,
+  TabControl,
+  SymbolStyler,
+  basic,
+  arrayUtils,
+  InfoTemplate,
+  Query,
+  QueryTask,
+  Color,
+  Edit,
+  Graphic,
+  Point,
+  Polyline,
+  Polygon,
+  Extent,
+  FeatureSet,
+  HeatmapRenderer,
+  SimpleLineSymbol,
+  SimpleFillSymbol,
+  PictureMarkerSymbol,
+  SimpleMarkerSymbol,
+  SpatialReference,
+  GeometryService,
+  ProjectParameters,
+  GraphicsLayer,
+  LabelLayer,
+  TextSymbol,
+  SimpleRenderer,
+  ClassBreaksRenderer,
+  Geoprocessor,
+  DataFile,
+  webMercatorUtils,
+  Font,
+  ScreenPoint,
+  ImageParameters,
+  geometryEngine,
+  PopupTemplate,
+  FlareClusterLayer
 ) {
-    var Widget = declare([BaseWidget], {
-        widgetName: "APoliceTeam",
-        label: "出警队伍",
-        templateString: template,
-        _map: null,
-        objThis: null,
-        _siteLayer: new GraphicsLayer(),
-        layuiLayer: null,
-        layuiLadate: null,
-        tabIndex: 0,
+  var Widget = declare([BaseWidget], {
+    widgetName: "APoliceTeam",
+    label: "出警队伍",
+    templateString: template,
+    _map: null,
+    objThis: null,
+    _siteLayer: new GraphicsLayer(),
+    layuiLayer: null,
+    layuiLadate: null,
+    tabIndex: 0,
 
-        // 保留添加实体图层的变量
-        addEntitys: null,
-        entitysData: [],
+    // 保留添加实体图层的变量
+    addEntitys: null,
+    entitysData: [],
 
-        // 是否派发保安的 文字
-        treatmentIndex: null,
-        securityFlag: false,
-        editParentInd: null,
+    // 是否派发保安的 文字
+    treatmentIndex: null,
+    securityFlag: false,
+    editParentInd: null,
 
-        // 存储新增点,线,面,数据的地方
-        polygonData: [],
-        polygonFlag: false,
-        editToolbar: null,
-        addPolygonEntitys: null,
+    // 存储新增点,线,面,数据的地方
+    polygonData: [],
+    polygonFlag: false,
+    editToolbar: null,
+    addPolygonEntitys: null,
 
-        // 所有的面图层
-        entityPolygonAll: null,
+    // 所有的面图层
+    entityPolygonAll: null,
 
-        // 用来存储区域名称
-        globalRegionName: null,
+    // 用来存储区域名称
+    globalRegionName: null,
 
-        // 用来区域得最大最小经纬度
-        currentDrawing: [],
+    // 用来区域得最大最小经纬度
+    currentDrawing: [],
 
-        // 巡逻区域或者巡逻路线的描述
-        routeOrRegionDescribe: null,
+    // 巡逻区域或者巡逻路线的描述
+    routeOrRegionDescribe: null,
 
-        // 用来记录巡逻区域或者巡逻路线的下标的
-        patrolIndex: 0,
+    // 用来记录巡逻区域或者巡逻路线的下标的
+    patrolIndex: 0,
 
-        // 拖拽
-        isDown: false,
-        x: 0,
-        y: 0,
-        offset: null,
-        moveThis: null,
-        // 电子围栏需要新增的Id
-        newElectronicFenceId: null,
+    // 拖拽
+    isDown: false,
+    x: 0,
+    y: 0,
+    offset: null,
+    moveThis: null,
+    // 电子围栏需要新增的Id
+    newElectronicFenceId: null,
 
-        // 新增路线时,派发人员,人员名称,以及人员id
-        peopleRealName: null,
-        pepleRealId: null,
-        constructor: function (options, srcRefNode) {
-            this._map = options.map;
-            objThis = this;
+    // 新增路线时,派发人员,人员名称,以及人员id
+    peopleRealName: null,
+    pepleRealId: null,
+    constructor: function (options, srcRefNode) {
+      this._map = options.map;
+      objThis = this;
 
 
-            this.addEntitys = new GraphicsLayer({id: 'addEntitys'});
+      this.addEntitys = new GraphicsLayer({
+        id: 'addEntitys'
+      });
 
-            // 添加点面线的图层
-            this.addPolygonEntitys = new GraphicsLayer({id: 'addPolygonEntitys'});
-            // 添加所有图层的地方
-            this.entityPolygonAll = new GraphicsLayer({id: 'entityPolygonAll'});
+      // 添加点面线的图层
+      this.addPolygonEntitys = new GraphicsLayer({
+        id: 'addPolygonEntitys'
+      });
+      // 添加所有图层的地方
+      this.entityPolygonAll = new GraphicsLayer({
+        id: 'entityPolygonAll'
+      });
 
 
-            this._map.addLayer(this.addEntitys);
+      this._map.addLayer(this.addEntitys);
 
 
-            this._map.addLayer(this.addPolygonEntitys);
-            this._map.addLayer(this.entityPolygonAll);
+      this._map.addLayer(this.addPolygonEntitys);
+      this._map.addLayer(this.entityPolygonAll);
 
 
-        },
+    },
 
-        startup: function () {
-            objThis._map.addLayer(objThis._siteLayer);
-            var that = this;
-            // 顶部tab得切换事件
-            $('.police-dispatching-tab li').click(function () {
-                if (that.tabIndex == $(this).index()) return;
-                if (that.entitysData.length > 0) {
-                    that.addEntitys.clear();
-                    that.entitysData = [];
-                }
+    startup: function () {
+      objThis._map.addLayer(objThis._siteLayer);
+      var that = this;
+      // 顶部tab得切换事件
+      $('.police-dispatching-tab li').click(function () {
+        if (that.tabIndex == $(this).index()) return;
+        if (that.entitysData.length > 0) {
+          that.addEntitys.clear();
+          that.entitysData = [];
+        }
 
-                that.patrolIndex = 0;
-                that.polygonFlag = false;
-                that.entityPolygonAll.clear();
-                that.modifyPolygon();
+        that.patrolIndex = 0;
+        that.polygonFlag = false;
+        that.entityPolygonAll.clear();
+        that.modifyPolygon();
 
-                // 切换时清除新增点线面数组中保存得数据,与清除地图上得实体
-                that.polygonData = [];
-                that.addPolygonEntitys.clear();
+        // 切换时清除新增点线面数组中保存得数据,与清除地图上得实体
+        that.polygonData = [];
+        that.addPolygonEntitys.clear();
 
 
-                $(this).addClass('on').siblings().removeClass('on');
-                var ind = $(this).index();
-                $($('.police-container > div')[ind]).stop().show().siblings().stop().hide();
-                if (ind == 0) {
-                    $('#distributeCategory div:eq(0)').html('全部' + '<i></i>');
-                    $('#distributeState div:eq(0)').html('全部' + '<i></i>');
-                    that.getPoliceTable($('.police-container-distribute').find('.tbody tbody'), $('#dispatchingStartTime').val(), $('#dispatchingEndTime').val(), '', '', '');
-                } else if (ind == 1) {
-                    // that.getOwnerTable($($('.analysis-container > div')[ind]).find('.tbody tbody'), '', '');
-                    $('.police-dispatching .police-container .police-container-patrol .tab-header li:eq(0)').addClass('on').siblings().removeClass('on');
-                    $('.police-dispatching .police-container .police-container-patrol .main-content>li:eq(0)').stop().show().siblings().hide();
-                    that.patrolArea($('.police-dispatching .police-container .police-container-patrol .main-content>li:eq(0) .table .tbody tbody'), '');
-                } else if (ind == 2) {
-                    that.getSecurityPeople($('.police-dispatching .police-container .police-container-policeforce .table .tbody tbody'), '');
-                }
-                that.tabIndex = $(this).index();
-            })
-            // 警情分发中的行点击事件
-            $('.police-container .police-container-distribute .table .tbody').off('click', 'tr').on('click', 'tr', function () {
-                var lgtd = Number($(this).attr('lgtd'));
-                var lttd = Number($(this).attr('lttd'));
-                var position = new esri.geometry.Point(lgtd, lttd, new esri.SpatialReference({wkid: 4326}));//根据输入坐标信息找地图上的点
-                that._map.centerAndZoom(position, 18);//缩放,10是缩放级别,可以自定义,数值越大缩放越大
-            })
-            // 编辑,跟进按钮元素的父元素的点击事件
-            $('.police-container .police-container-distribute .table .tbody').off('click', '.operation').on('click', '.operation', function (event) {
-                event.stopPropagation();
-            })
-            // 警情分发中的编辑按钮的点击事件
-            $('.police-container .police-container-distribute .table .tbody').off('click', '.edit').on('click', '.edit', function (event) {
-                event.stopPropagation();
-                that.editParentInd = null;
-                that.editParentInd = $(this).parent().parent().index();
-                var id = $(this).attr('term-list');
-                that.treatmentIndex = null;
-                if (!$('.police-container-distribute-details .security-guard-nearby').is(':hidden')) {
-                    $('.police-container-distribute-details .security-guard-nearby').stop().hide();
-                }
-                if (!$('.police-container-distribute-details').is(':hidden')) {
-                    $('.police-container-distribute-details').stop().hide();
-                }
-                $('.police-container-distribute-details .content table tbody').empty();
-                var str = '';
-                $.ajax({
-                    url: 'https://web.byisf.com:18001/api/blade-jfpts/jingdan/jingdan/selectdInfo?deviceNumber=&id=' + id,
+        $(this).addClass('on').siblings().removeClass('on');
+        var ind = $(this).index();
+        $($('.police-container > div')[ind]).stop().show().siblings().stop().hide();
+        if (ind == 0) {
+          $('#distributeCategory div:eq(0)').html('全部' + '<i></i>');
+          $('#distributeState div:eq(0)').html('全部' + '<i></i>');
+          that.getPoliceTable($('.police-container-distribute').find('.tbody tbody'), $('#dispatchingStartTime').val(), $('#dispatchingEndTime').val(), '', '', '');
+        } else if (ind == 1) {
+          // that.getOwnerTable($($('.analysis-container > div')[ind]).find('.tbody tbody'), '', '');
+          $('.police-dispatching .police-container .police-container-patrol .tab-header li:eq(0)').addClass('on').siblings().removeClass('on');
+          $('.police-dispatching .police-container .police-container-patrol .main-content>li:eq(0)').stop().show().siblings().hide();
+          that.patrolArea($('.police-dispatching .police-container .police-container-patrol .main-content>li:eq(0) .table .tbody tbody'), '');
+        } else if (ind == 2) {
+          that.getSecurityPeople($('.police-dispatching .police-container .police-container-policeforce .table .tbody tbody'), '');
+        }
+        that.tabIndex = $(this).index();
+      })
+      // 警情分发中的行点击事件
+      $('.police-container .police-container-distribute .table .tbody').off('click', 'tr').on('click', 'tr', function () {
+        var lgtd = Number($(this).attr('lgtd'));
+        var lttd = Number($(this).attr('lttd'));
+        var position = new esri.geometry.Point(lgtd, lttd, new esri.SpatialReference({
+          wkid: 4326
+        })); //根据输入坐标信息找地图上的点
+        that._map.centerAndZoom(position, 18); //缩放,10是缩放级别,可以自定义,数值越大缩放越大
+      })
+      // 编辑,跟进按钮元素的父元素的点击事件
+      $('.police-container .police-container-distribute .table .tbody').off('click', '.operation').on('click', '.operation', function (event) {
+        event.stopPropagation();
+      })
+      // 警情分发中的编辑按钮的点击事件
+      $('.police-container .police-container-distribute .table .tbody').off('click', '.edit').on('click', '.edit', function (event) {
+        event.stopPropagation();
+        that.editParentInd = null;
+        that.editParentInd = $(this).parent().parent().index();
+        var id = $(this).attr('term-list');
+        that.treatmentIndex = null;
+        if (!$('.police-container-distribute-details .security-guard-nearby').is(':hidden')) {
+          $('.police-container-distribute-details .security-guard-nearby').stop().hide();
+        }
+        if (!$('.police-container-distribute-details').is(':hidden')) {
+          $('.police-container-distribute-details').stop().hide();
+        }
+        $('.police-container-distribute-details .content table tbody').empty();
+        var str = '';
+        $.ajax({
+          url: 'https://web.byisf.com:18001/api/blade-jfpts/jingdan/jingdan/selectdInfo?deviceNumber=&id=' + id,
+          type: 'POST',
+          dataType: 'JSON',
+          success: function (data) {
+            var result = data.data[0];
+            var t = result.galarmTime.substr(0, 10);
+            var e = result.galarmTime.substr(11);
+            var time = t + '&nbsp;' + e;
+
+            str += "<tr> <td>报警人姓名:</td> <td>" + result.galarmPeople + "</td> <td>联系方式:</td> <td>" + result.phoneNumber + "</td> </tr>";
+
+            str += "<tr> <td>事发地址:</td> <td>" + result.place + "</td> <td>行政区:</td> <td>" + result.addvnm + "</td> </>";
+
+            str += "<tr> <td>报警时间:</td> <td>" + time + "</td> <td>报警内容:</td> <td>" + result.content + "</td> </tr>";
+
+            str += "<tr> <td>警情级别:</td> <td>" + result.level + "</td> <td>警情类别:</td> <td>" + result.waringType + "</td> </tr>";
+
+            str += "<tr> <td>处理方式:</td> <td class='treatment-method'> <input type='radio' name='treatmentMethod' value='派发保安' lgtd=" + result.jd + " lttd=" + result.wd + "> <span>派发保安</span> <input type='radio' name='treatmentMethod' value='提示业主'> <span>提示业主</span> </td> <td>处理人:</td> <td class='securityname'></td> </tr>";
+
+            str += "<tr> <td>是否上报110:</td> <td class='report-oneonezero'> <input type='radio' name='callPhone' value='是'> <span>是</span> <input type='radio' name='callPhone' value='否'> <span>否</span> </td> <td>设备编号:</td> <td>" + result.deviceNumber + "</td> </tr>";
+            $('.police-container-distribute-details .content table tbody').append(str);
+            $('.police-container-distribute-details .handle-button .confirm').attr('police-id', result.id);
+            $('.police-container-distribute-details .handle-button').stop().show();
+            $('.police-container-distribute-details .header h4').text('警情分发');
+            $('.police-container-distribute-details').stop().show();
+            $('.police-container-distribute-details .content table tbody').off('click', '.treatment-method input').on('click', '.treatment-method input', function () {
+              if (that.treatmentIndex != $(this).val()) {
+                if ($(this).val() == '派发保安') {
+                  var str = '';
+                  $('.police-container-distribute-details .security-guard-nearby .security-staff-content tbody').empty();
+                  $.ajax({
+                    url: 'https://web.byisf.com:18001/api/blade-jfpts/position/position/selectry',
                     type: 'POST',
-                    dataType: 'JSON',
-                    success: function (data) {
-                        var result = data.data[0];
-                        var t = result.galarmTime.substr(0, 10);
-                        var e = result.galarmTime.substr(11);
-                        var time = t + '&nbsp;' + e;
-
-                        str += "<tr> <td>报警人姓名:</td> <td>" + result.galarmPeople + "</td> <td>联系方式:</td> <td>" + result.phoneNumber + "</td> </tr>";
-
-                        str += "<tr> <td>事发地址:</td> <td>" + result.place + "</td> <td>行政区:</td> <td>" + result.addvnm + "</td> </>";
-
-                        str += "<tr> <td>报警时间:</td> <td>" + time + "</td> <td>报警内容:</td> <td>" + result.content + "</td> </tr>";
-
-                        str += "<tr> <td>警情级别:</td> <td>" + result.level + "</td> <td>警情类别:</td> <td>" + result.waringType + "</td> </tr>";
-
-                        str += "<tr> <td>处理方式:</td> <td class='treatment-method'> <input type='radio' name='treatmentMethod' value='派发保安' lgtd=" + result.jd + " lttd=" + result.wd + "> <span>派发保安</span> <input type='radio' name='treatmentMethod' value='提示业主'> <span>提示业主</span> </td> <td>处理人:</td> <td class='securityname'></td> </tr>";
-
-                        str += "<tr> <td>是否上报110:</td> <td class='report-oneonezero'> <input type='radio' name='callPhone' value='是'> <span>是</span> <input type='radio' name='callPhone' value='否'> <span>否</span> </td> <td>设备编号:</td> <td>" + result.deviceNumber + "</td> </tr>";
-                        $('.police-container-distribute-details .content table tbody').append(str);
-                        $('.police-container-distribute-details .handle-button .confirm').attr('police-id', result.id);
-                        $('.police-container-distribute-details .handle-button').stop().show();
-                        $('.police-container-distribute-details .header h4').text('警情分发');
-                        $('.police-container-distribute-details').stop().show();
-                        $('.police-container-distribute-details .content table tbody').off('click', '.treatment-method input').on('click', '.treatment-method input', function () {
-                            if (that.treatmentIndex != $(this).val()) {
-                                if ($(this).val() == '派发保安') {
-                                    var str = '';
-                                    $('.police-container-distribute-details .security-guard-nearby .security-staff-content tbody').empty();
-                                    $.ajax({
-                                        url: 'https://web.byisf.com:18001/api/blade-jfpts/position/position/selectry',
-                                        type: 'POST',
-                                        data: {
-                                            coordinate: "point(" + $(this).attr('lgtd') + "," + $(this).attr('lttd') + ")"
-                                        },
-                                        dataType: 'JSON',
-                                        success: function (data) {
-
-                                            var result = data.data;
-
-                                            for (var i = 0; i < result.length; i++) {
-                                                str += "<tr> <td>" + (Number(i) + 1) + "</td> <td>" + result[i].sname + "</td> <td>" + result[i].distance.toFixed(2) + "</td> <td><input type='radio' name='securityStaff' securityid=" + result[i].snumber + " securityname=" + result[i].sname + "> </td> </tr>"
-                                            }
-
-                                            $('.police-container-distribute-details .security-guard-nearby .security-staff-content tbody').append(str);
-                                        }
-                                    })
-                                    $('.police-container-distribute-details .security-guard-nearby').stop().show();
-                                } else {
-                                    $('.police-container-distribute-details .content table tbody .securityname').text('');
-                                    $('.police-container-distribute-details .security-guard-nearby').stop().hide();
-                                }
-                                that.treatmentIndex = $(this).val();
-                            }
-                        })
-                    }
-                })
-            })
-            // 警情分发中的详情的确认按钮
-            $('.police-container-distribute-details .handle-button .confirm').off('click').click(function () {
-                var self = this;
-                layui.use('layer', function () {
-                    var layer = layui.layer;
-                    if (that.treatmentIndex == null) {
-                        layer.msg('请选择处理方式', {
-
-
-                            shade: [0.8, '#393D49'],
-
-                            time: 1000
-                        })
-                        return
-                    } else {
-                        if (that.treatmentIndex == '派发保安') {
-                            if (that.securityFlag == false) {
-                                layer.msg('请选取保安', {
-
-
-                                    shade: [0.8, '#393D49'],
-
-                                    time: 1000
-                                })
-                                return
-                            }
-                        }
-
-                    }
-                    var id = $(self).attr('police-id');
-                    var handletype = null;
-                    if (that.treatmentIndex != null) {
-                        if (that.treatmentIndex == '派发保安') {
-                            handletype = '0';
-                        } else {
-                            handletype = '1';
-                        }
-                    }
-                    // 发送请求修改警单数据
-                    $.ajax({
-                        url: 'https://web.byisf.com:18001/api/blade-jfpts/jingdan/jingdan/updateInfo',
-                        type: 'POST',
-                        data: {
-                            id: id,
-                            // handleP: $('.police-container-distribute-details .content table tbody tr:eq(4) td:eq(3)').attr('people-id'),
-                            // handName: $('.police-container-distribute-details .content table tbody tr:eq(4) td:eq(3)').text(),
-                            handleP: $('.police-container-distribute-details .content table tbody .securityname').attr('id'),
-                            handName: $('.police-container-distribute-details .content table tbody .securityname').text(),
-                            handletype: handletype,
-                            type: '2'
-                        },
-                        dataType: 'JSON',
-                        success: function (data) {
-                            if (data.code == 200) {
-                                if (!$('.police-container-distribute-details .security-guard-nearby').is(':hidden')) {
-                                    $('.police-container-distribute-details .security-guard-nearby').stop().hide();
-                                }
-                                $('.police-container-distribute-details').stop().hide();
-
-                                $('.police-container .police-container-distribute .table .tbody tr:eq(' + that.editParentInd + ') td:eq(2)').text('处理中');
-
-                                $('.police-container .police-container-distribute .table .tbody tr:eq(' + that.editParentInd + ') td:eq(4)').html("<input class='follow-up' type='button' value='跟进' >");
-                            }
-                        }
-                    })
-                });
-            })
-            // 警情分发中的跟进按钮的点击事件
-            $('.police-container .police-container-distribute .table .tbody').off('click', '.follow-up').on('click', '.follow-up', function () {
-                var id = $(this).attr('term-list');
-
-                if (!$('.police-container-distribute-details').is(':hidden')) {
-                    $('.police-container-distribute-details').stop().hide();
-                }
-
-                $('.police-container-distribute-details .content table tbody').empty();
-
-                var str = '';
-                $.ajax({
-                    url: 'https://web.byisf.com:18001/api/blade-jfpts/jingdan/jingdan/selectdInfo?deviceNumber=&id=' + id,
-                    type: 'POST',
-                    dataType: 'JSON',
-                    success: function (data) {
-                        var result = data.data[0];
-
-                        var t = result.galarmTime.substr(0, 10);
-                        var e = result.galarmTime.substr(11);
-                        var time = t + '&nbsp;' + e;
-
-
-                        str += "<tr> <td>报警人姓名:</td> <td>" + result.galarmPeople + "</td> <td>联系方式:</td> <td>" + result.phoneNumber + "</td> </tr>";
-
-                        str += "<tr> <td>事发地址:</td> <td>" + result.place + "</td> <td>行政区:</td> <td>" + result.addvnm + "</td> </>";
-
-                        str += "<tr> <td>报警时间:</td> <td>" + time + "</td> <td>报警内容:</td> <td>" + result.content + "</td> </tr>";
-
-                        str += "<tr> <td>警情级别:</td> <td>" + result.level + "</td> <td>警情类别:</td> <td>" + result.waringType + "</td> </tr>";
-
-                        str += "<tr> <td>处理方式:</td> <td class='treatment-method'> " + (result.type == 2 ? '处理中' : '待处理') + " </td> <td>处理人:</td> <td class='securityname'> " + result.handName + " </td> </tr>";
-
-                        str += "<tr> <td>是否上报110:</td> <td class='report-oneonezero'> <input type='radio' name='callPhone' value='是'> <span>是</span> <input type='radio' name='callPhone' value='否'> <span>否</span> </td> <td>设备编号:</td> <td>" + 1111 + "</td> </tr>";
-                        $('.police-container-distribute-details .content table tbody').append(str);
-                        $('.police-container-distribute-details .header h4').text('警情跟进');
-                        $('.police-container-distribute-details .handle-button').stop().hide();
-                        $('.police-container-distribute-details').stop().show();
-
-
-                    }
-                })
-
-
-            })
-            // 警情分发中的详情的取消按钮
-            $('.police-container-distribute-details .handle-button .cancel').off('click').click(function () {
-                if (!$('.police-container-distribute-details .security-guard-nearby').is(':hidden')) {
-                    $('.police-container-distribute-details .security-guard-nearby').stop().hide();
-                }
-                $('.police-container-distribute-details').stop().hide();
-            })
-            // 警情分发中详情的关闭按钮
-            $('.police-container-distribute-details .header .close').off('click').click(function () {
-                if (!$('.police-container-distribute-details .security-guard-nearby').is(':hidden')) {
-                    $('.police-container-distribute-details .security-guard-nearby').stop().hide();
-                }
-                $('.police-container-distribute-details').stop().hide();
-            })
-            // 派发保安的确认按钮
-            $('.police-container-distribute-details .security-guard-nearby .security-staff-confirm input').off('click').click(function () {
-                var list = $('.police-container-distribute-details .security-guard-nearby .security-staff-content input');
-                that.securityFlag = false;
-                var id = null;
-                var securityname = null;
-                for (var i = 0; i < list.length; i++) {
-                    if ($(list[i]).prop('checked') == true) {
-                        that.securityFlag = true;
-                        id = $(list[i]).attr('securityid');
-                        securityname = $(list[i]).attr('securityname');
-                        break;
-                    }
-                }
-
-                if (that.securityFlag == false) {
-                    layui.use('layer', function () {
-                        var layer = layui.layer;
-                        layer.msg('请选取保安', {
-
-
-                            shade: [0.8, '#393D49'],
-
-                            time: 1000
-                        })
-                    });
-                } else {
-
-                    $('.police-container-distribute-details .content table tbody .securityname').attr('id', id).text(securityname);
-
-                    $('.police-container-distribute-details .security-guard-nearby').stop().hide();
-                }
-
-            })
-            // 警情信息中类别移入事件
-            $('#distributeCategory').mouseenter(function () {
-                if ($('#distributeCategory .select-list').is(':hidden')) {
-                    $('#distributeCategory .select-list').stop().slideDown(0);
-                }
-            })
-            // 警情信息中得类别移出事件
-            $('#distributeCategory').mouseleave(function () {
-                if (!$('#distributeCategory .select-list').is(':hidden')) {
-                    $('#distributeCategory .select-list').stop().slideUp(0);
-                }
-            })
-            // 警情信息中类别移入事件
-            $('#distributeState').mouseenter(function () {
-                if ($('#distributeState .select-list').is(':hidden')) {
-                    $('#distributeState .select-list').stop().slideDown(0);
-                }
-            })
-            // 警情信息中得类别移出事件
-            $('#distributeState').mouseleave(function () {
-                if (!$('#distributeState .select-list').is(':hidden')) {
-                    $('#distributeState .select-list').stop().slideUp(0);
-                }
-            })
-            //  警情信息类,业主信息类,设备信息类别,具体项的点击事件
-            $('.police-container > div .select-list').off('click', 'li').on('click', 'li', function (event) {
-
-                var text = $(this).text();
-                $(this).parent().parent().prev().html(text + '<i></i>');
-                $(this).parent().parent().stop().slideUp(0);
-
-                if (text == '全部') text = '';
-
-                var textOrr = '';
-                var textList = '';
-                var stateType = '';
-                if (that.tabIndex == 0) {
-                    // that.getPoliceTable($('.analysis-container-police').find('.tbody tbody'), $('#dispatchingStartTime').val(), $('#dispatchingEndTime').val(), text);
-                    if ($(this).attr('key')) {
-                        textOrr = $('#distributeState div:eq(0)').text().trim();
-                        textList = $('.police-dispatching .police-container .distribute-state .select-list ul li');
-
-                        for (var i = 0; i < textList.length; i++) {
-                            if (textOrr == $(textList[i]).text()) {
-                                stateType = $(textList[i]).attr('statetype');
-                            }
-                        }
-
-                        that.getPoliceTable($('.police-container-distribute').find('.tbody tbody'), $('#dispatchingStartTime').val(), $('#dispatchingEndTime').val(), '', $(this).attr('addvcd'), stateType);
-
-                    } else {
-                        textOrr = $('#distributeCategory div:eq(0)').text().trim();
-                        textList = $('.police-dispatching .police-container .distribute-district .select-list ul li');
-
-                        for (var i = 0; i < textList.length; i++) {
-                            if (textOrr == $(textList[i]).text()) {
-                                stateType = $(textList[i]).attr('addvcd');
-                            }
-                        }
-
-                        that.getPoliceTable($('.police-container-distribute').find('.tbody tbody'), $('#dispatchingStartTime').val(), $('#dispatchingEndTime').val(), '', stateType, $(this).attr('stateType'));
-
-                    }
-                }
-
-            })
-            // 时间查询
-            $('#dispatchingSelectTime').off('click').click(function () {
-                var times = $(this).prevAll();
-                // 开始时间
-                var startTime = $(times[1]).val();
-                // 结束时间
-                var endTime = $(times[0]).val();
-
-
-                var textOne = $('#distributeCategory div:eq(0)').text().trim();
-                var addvcd = '';
-                var list = $('.police-dispatching .police-container .distribute-district .select-list ul li');
-                if (textOne == '全部') {
-                    addvcd = '';
-                } else {
-                    if (list.length > 0) {
-                        for (var i = 0; i < list.length; i++) {
-                            if (textOne == $(list[i]).text()) {
-                                addvcd = $(list[i]).attr('addvcd')
-                            }
-                        }
-                    }
-                }
-
-                var textTwo = $('#distributeState div:eq(0)').text().trim();
-                var stateType = '';
-                var stateList = $('.police-dispatching .police-container .distribute-state .select-list ul li');
-                if (textTwo == '全部') {
-                    stateType = '';
-                } else {
-                    if (stateList.length > 0) {
-                        for (var i = 0; i < stateList.length; i++) {
-                            if (textTwo == $(stateList[i]).text()) {
-                                stateType = $(stateList[i]).attr('statetype')
-                            }
-                        }
-                    }
-                }
-
-                that.getPoliceTable($('.police-container-distribute').find('.tbody tbody'), startTime, endTime, '', addvcd, stateType);
-            })
-            //  巡逻区域中的行点击事件
-            $('.police-container .police-container-patrol .main-content>li:eq(0) .table .tbody').off('click', 'tr').on('click', 'tr', function () {
-
-
-                var flyid = $(this).attr('flyid');
-                var flyname = $(this).attr('flyname');
-                var extent = null;
-
-                for (var i = 0; i < that.currentDrawing.length; i++) {
-                    if (flyid == that.currentDrawing[i].id && flyname == that.currentDrawing[i].regionName) {
-                        extent = that.currentDrawing[i].extent;
-                    }
-                }
-                // debugger
-                that._map.setExtent(extent.expand(1.5));
-
-                // var myFeatureExtent = new Extent(extent.)
-                // thisObj._map.setExtent(myFeatureExtent.expand(2));
-
-                // var lgtd = Number($(this).attr('lgtd'));
-                // var lttd = Number($(this).attr('lttd'));
-
-                // var position = new esri.geometry.Point(lgtd, lttd, new esri.SpatialReference({ wkid: 4326 }));//根据输入坐标信息找地图上的点
-                // that._map.centerAndZoom(position, 14);//缩放,10是缩放级别,可以自定义,数值越大缩放越大
-
-            })
-            // 巡逻区域的新增按钮
-            $('.police-container .police-container-patrol .main-content>li:eq(0) .distribute-table-content .operation .add').off('click').click(function () {
-                var url = './popup/html/region-name.html';
-                layui.use('layer', function () {
-                    that.layuiLayer = layui.layer;
-                    that.layuiLayer.config({
-                        extend: 'myskin/region-name.css'
-                    });
-                    that.layuiLayer.close(that.layuiLayer.index);
-                    that.layuiLayer.open({
-                        title: '区域名称',
-                        type: 2,
-                        shadeClose: false,
-                        shade: 0.3,
-                        maxmin: false, //开启最大化最小化按钮
-                        area: ['320px', '206px'],
-                        offset: 'auto',
-                        skin: 'region-name',
-                        content: url,
-                        closeBtn: 1,
-                        success: function (layero, index) {
-                            layero.find('iframe').contents().find(".start-editing").off('click').click(function () {
-                                // 区域名称
-                                var regionName = layero.find('iframe').contents().find('.region-name-input').val();
-                                var regionDescribe = layero.find('iframe').contents().find('.region-name-textarea').val();
-                                if (regionName == '') {
-                                    that.layuiLayer.msg('请填写区域名称', {
-                                        time: 1000
-                                    })
-                                    return
-                                }
-
-                                if (regionDescribe == '') {
-                                    that.layuiLayer.msg('请填写区域描述', {
-                                        time: 1000
-                                    })
-                                    return
-                                }
-
-                                that.globalRegionName = regionName;
-                                that.routeOrRegionDescribe = regionDescribe;
-
-                                // 开启,可以勾选线段
-                                that.polygonFlag = true;
-                                that.layuiLayer.close(index);
-
-                            })
-                        }
-                    });
-                })
-
-            })
-            // 查找按钮
-            $('.police-container .police-container-patrol .main-content>li:eq(0) .distribute-table-content .operation .query').off('click').click(function () {
-                var routerName = $('.police-container .police-container-patrol .main-content>li:eq(0) .distribute-table-content .route-name').val();
-                // if (routerName == '') {
-                //   layui.use('layer', function () {
-                //     layui.layer.msg('请填写区域名称', {
-                //       time: 1000
-                //     })
-                //   })
-                //   return
-                // }
-                that.patrolArea($('.police-dispatching .police-container .police-container-patrol .table .tbody tbody'), routerName);
-                $('.police-container .police-container-patrol .main-content>li:eq(0) .distribute-table-content .route-name').val('');
-
-            })
-
-            // 保安出警管理表格中点击事件
-            $('.police-dispatching .police-container .police-container-policeforce .table .tbody tbody').off('click', 'input').on('click', 'input', function (event) {
-                event.stopPropagation();
-                var lgtd = Number($(this).parent().parent().attr('lgtd'));
-                var lttd = Number($(this).parent().parent().attr('lttd'));
-                var position = new esri.geometry.Point(lgtd, lttd, new esri.SpatialReference({wkid: 4326}));//根据输入坐标信息找地图上的点
-                that.newElectronicFenceId = null;
-                that._map.centerAndZoom(position, 18);//缩放,10是缩放级别,可以自定义,数值越大缩放越大
-                var graphic = that.entityPolygonAll.graphics;
-                for (var i = 0; i < graphic.length; i++) {
-                    if (graphic[i].objId.id == $(this).attr('resultid')) {
-                        if (graphic[i].geometry.rings[0].length > 0) {
-                            that.polygonFlag = false;
-                            that.electronicFence();
-                            that.activateToolbar(graphic[i]);
-                        } else {
-                            layui.use('layer', function () {
-                                layui.layer.msg('请开始划分电子围栏');
-                            })
-                            that.polygonFlag = true;
-                            that.newElectronicFenceId = graphic[i].objId;
-                        }
-                    }
-                }
-            })
-            $('.police-dispatching .police-container .police-container-policeforce .table .tbody tbody').off('click', 'tr').on('click', 'tr', function (event) {
-                event.stopPropagation();
-                var lgtd = Number($(this).attr('lgtd'));
-                var lttd = Number($(this).attr('lttd'));
-                var position = new esri.geometry.Point(lgtd, lttd, new esri.SpatialReference({wkid: 4326}));//根据输入坐标信息找地图上的点
-
-                that._map.centerAndZoom(position, 18);//缩放,10是缩放级别,可以自定义,数值越大缩放越大
-
-                var snumber = $(this).attr('term-snumber');
-
-                var url = './popup/html/personnel-information-management.html?id=' + snumber;
-                layui.use('layer', function () {
-                    that.layuiLayer = layui.layer;
-                    that.layuiLayer.config({
-                        extend: 'myskin/personnel-information-management.css'
-                    });
-                    that.layuiLayer.close(that.layuiLayer.index);
-                    that.layuiLayer.open({
-                        title: '保安人员信息',
-                        type: 2,
-                        shadeClose: true,
-                        shade: false,
-                        maxmin: false, //开启最大化最小化按钮
-                        area: ['400px', '220px'],
-                        offset: 'auto',
-                        skin: 'personnel-information-management',
-                        content: url,
-                        closeBtn: 1,
-                    });
-                })
-            })
-            $('.police-dispatching .police-container .police-container-policeforce .table .tbody tbody').off('click', 'tr td').on('click', 'tr td', function (event) {
-                if ($(this).index() == 4) {
-                    event.stopPropagation();
-                    return;
-
-                }
-            })
-
-            // 巡逻管理中,巡逻路线和巡逻区域的切换换
-            $('.police-dispatching .police-container .police-container-patrol .tab-header li').off('click').click(function () {
-                if (that.patrolIndex == $(this).index()) return;
-                $(this).addClass('on').siblings().removeClass('on');
-                $(".police-dispatching .police-container .police-container-patrol .main-content li:eq(" + $(this).index() + ")").stop().show().siblings().stop().hide();
-
-                that.polygonFlag = false;
-                that.entityPolygonAll.clear();
-                that.modifyPolygon();
-
-                // 切换时清除新增点线面数组中保存得数据,与清除地图上得实体
-                that.polygonData = [];
-                that.addPolygonEntitys.clear();
-
-                if ($(this).index() == 1) {
-                    $('.police-dispatching .police-container .police-container-patrol .main-content .select-list ul').empty();
-                    $.ajax({
-                        url: 'https://web.byisf.com:18001/api/blade-jfpts/regions/regions/selectqy',
-                        type: 'GET',
-                        dataType: 'JSON',
-                        success: function (res) {
-                            var result = res.data;
-                            $('.police-dispatching .police-container .police-container-patrol .main-content .select>ul>li>div:eq(0)').html(result[0].regionName + '<i></i>').attr('regionId', result[0].regionId);
-                            for (var i = 0; i < result.length; i++) {
-                                $('.police-dispatching .police-container .police-container-patrol .main-content .select-list ul').append($("<li regionId='" + result[i].regionId + "'>" + result[i].regionName + "</li>"))
-                            }
-                        }
-                    })
-                    that.getRouteInformation($('.police-dispatching .police-container .police-container-patrol .main-content>li:eq(1) .table .tbody tbody'), '');
-                } else {
-
-                    that.patrolArea($('.police-dispatching .police-container .police-container-patrol .main-content>li:eq(0) .table .tbody tbody'), '');
-                }
-
-                that.patrolIndex = $(this).index();
-            })
-            // 巡逻管理下面的巡逻路线中的select选择框的移入事件
-            $('#patrolRoute').mouseenter(function () {
-                if ($('#patrolRoute .select-list').is(':hidden')) {
-                    $('#patrolRoute .select-list').stop().slideDown(0);
-                }
-            })
-            // 巡逻管理下面的巡逻路线中的select选择框的移出事件
-            $('#patrolRoute').mouseleave(function () {
-                if (!$('#patrolRoute .select-list').is(':hidden')) {
-                    $('#patrolRoute .select-list').stop().slideUp(0);
-                }
-            })
-            // 巡逻路线中区域选择的具体项的点击事件
-            $('.police-dispatching .police-container .police-container-patrol .select-list').off('click', 'li').on('click', 'li', function (event) {
-                var text = $(this).text();
-                $(this).parent().parent().prev().html(text + '<i></i>').attr('regionId', $(this).attr('regionId'));
-                $(this).parent().parent().stop().slideUp(0);
-            })
-            // 巡逻路线中的新增按钮的点击事件
-            $('.police-dispatching .police-container .police-container-patrol .main-content>li:eq(1) .add').off('click').click(function () {
-                var url = './popup/html/route-name-layer.html';
-                layui.use('layer', function () {
-                    that.layuiLayer = layui.layer;
-                    that.layuiLayer.config({
-                        extend: 'myskin/route-name-layer.css'
-                    });
-                    that.layuiLayer.closeAll();
-                    that.layuiLayer.open({
-                        title: '路线名称及描述',
-                        type: 2,
-                        shadeClose: false,
-                        shade: 0.3,
-                        maxmin: false, //开启最大化最小化按钮
-                        area: ['320px', '266px'],
-                        offset: 'auto',
-                        skin: 'route-name-layer',
-                        content: url,
-                        closeBtn: 1,
-                        resize: false,
-                        success: function (layero, index) {
-                            layero.find('iframe').contents().find(".start-editing").off('click').click(function () {
-                                // 区域名称 or 路线名称
-                                var routeName = layero.find('iframe').contents().find('.route-name-layer-input').val();
-                                var routeDescribe = layero.find('iframe').contents().find('.route-name-layer-textarea').val();
-                                var peopleRealName = layero.find('iframe').contents().find('.route-personnel').val();
-                                var pepleRealId = layero.find('iframe').contents().find('.route-personnel').attr('peopleid');
-                                if (routeName == '') {
-                                    that.layuiLayer.msg('请填写路线名称', {
-                                        time: 1000
-                                    })
-                                    return
-                                }
-
-                                if (routeDescribe == '') {
-                                    that.layuiLayer.msg('请填写路线描述', {
-                                        time: 1000
-                                    })
-                                    return
-                                }
-
-                                if (pepleRealId == '') {
-                                    that.layuiLayer.msg('请选择人员', {
-                                        time: 1000
-                                    })
-                                    return
-                                }
-                                that.peopleRealName = peopleRealName;
-                                that.pepleRealId = pepleRealId;
-
-                                that.globalRegionName = routeName;
-                                that.routeOrRegionDescribe = routeDescribe;
-                                // // 开启,可以勾选线段
-                                that.polygonFlag = true;
-                                that.layuiLayer.close(index);
-
-                            })
-                        }
-                    });
-                })
-
-            })
-            // 巡逻路线行点击事件
-            $('.police-container .police-container-patrol .main-content>li:eq(1) .table .tbody').off('click', 'tr').on('click', 'tr', function () {
-                var flyid = $(this).attr('flyid');
-                var flyname = $(this).attr('flyname');
-                var extent = null;
-                for (var i = 0; i < that.currentDrawing.length; i++) {
-                    if (flyid == that.currentDrawing[i].id && flyname == that.currentDrawing[i].routeName) {
-                        extent = that.currentDrawing[i].extent;
-                    }
-                }
-                that._map.setExtent(extent.expand(1.5));
-            })
-            $('.police-container .police-container-patrol .main-content>li:eq(1) .table .tbody').off('click', 'tr td').on('click', 'tr td', function (event) {
-                if ($(this).index() == 4) {
-                    event.stopPropagation();
-                    return;
-
-                }
-            })
-            $('.police-container .police-container-patrol .main-content>li:eq(1) .table .tbody').off('click', 'input').on('click', 'input', function (event) {
-                event.stopPropagation();
-                var routeName = $(this).parent().parent().children('td:eq(2)').text();
-                var routeId = $(this).parent().parent().attr('flyid');
-                var peopleName = $(this).parent().parent().children('td:eq(1)').text();
-                var self = this;
-
-
-                var url = './popup/html/routename-and-peoplename.html?routeName=' + routeName + '&routeId=' + routeId + '&peopleName=' + peopleName;
-                layui.use('layer', function () {
-                    that.layuiLayer = layui.layer;
-                    that.layuiLayer.config({
-                        extend: 'myskin/routename-and-peoplename.css'
-                    });
-                    that.layuiLayer.closeAll();
-                    that.layuiLayer.open({
-                        title: '路线巡逻人员',
-                        type: 2,
-                        shadeClose: false,
-                        shade: 0.3,
-                        maxmin: false, //开启最大化最小化按钮
-                        area: ['320px', '172px'],
-                        offset: 'auto',
-                        skin: 'routename-and-peoplename',
-                        content: url,
-                        closeBtn: 1,
-                        resize: false,
-                        success: function (layero, index) {
-                            layero.find('iframe').contents().find(".confirm-update").off('click').click(function () {
-
-                                // 区域名称 or 路线名称
-                                var peoplelayerName = layero.find('iframe').contents().find('.peoplename-update').val();
-                                var peoplelayerId = layero.find('iframe').contents().find('.peoplename-update').attr('peopleid');
-
-                                console.log(peoplelayerName, peoplelayerId);
-
-                                if (peoplelayerName == peopleName) {
-                                    that.layuiLayer.close(index);
-                                    that.layuiLayer.msg('人员未更改!');
-                                } else {
-                                    $.ajax({
-                                        url: 'https://web.byisf.com:18001/api/blade-jfpts/duty/duty/updatedtInfo',
-                                        type: 'POST',
-                                        data: {
-                                            rid: routeId,
-                                            snumber: peoplelayerId,
-                                            sname: peoplelayerName
-                                        },
-                                        dataType: 'JSON',
-                                        success: function (res) {
-                                            if (res.code == 200) {
-                                                that.layuiLayer.close(index);
-                                                $(self).parent().parent().children('td:eq(1)').text(peoplelayerName);
-                                                that.layuiLayer.msg('人员已更改!');
-                                            }
-                                        }
-                                    })
-                                }
-
-                            })
-                        }
-                    });
-                })
-
-
-            })
-
-
-            // 查找按钮
-            $('.police-container .police-container-patrol .main-content>li:eq(1) .distribute-table-content .operation .query').off('click').click(function () {
-                var routerName = $('.police-container .police-container-patrol .main-content>li:eq(1) .distribute-table-content .route-name').val();
-                // if (routerName == '') {
-                //   layui.use('layer', function () {
-                //     layui.layer.msg('请填写区域名称', {
-                //       time: 1000
-                //     })
-                //   })
-                //   return
-                // }
-                that.getRouteInformation($('.police-dispatching .police-container .police-container-patrol .main-content>li:eq(1) .table .tbody tbody'), routerName);
-                $('.police-container .police-container-patrol .main-content>li:eq(1) .distribute-table-content .route-name').val('');
-            })
-
-        },
-        open: function () {
-            var that = this;
-
-            $("#tabcontainer").css("width", "360px");
-            $('#mapcontentClass').addClass('client-max-map'); //追加样式
-            AppEvent.dispatchAppEvent(AppEvent.APPLICATION_RESIZE, {});
-
-
-            document.oncontextmenu = function (event) {
-                event.preventDefault();
-            };
-
-            document.getElementById('mainMapWidget').onmousedown = function (event) {
-                if (event.button == 2) {
-                    if (that.polygonData.length < 2) {
-                        layui.use('layer', function () {
-                            layui.layer.msg('不能形成区域,请继续划分!!!')
-                        })
-                        return;
-                    }
-                    if (that.polygonFlag == true) {
-                        // 勾画最后一个点
-                        var normalizedVal = webMercatorUtils.xyToLngLat(event.mapPoint.x, event.mapPoint.y);
-                        that.polygonData.push([normalizedVal[0], normalizedVal[1]]);
-                        // 声明空字符串,存储数据
-                        var dataStr = '';
-                        var data = null;
-                        if (that.patrolIndex == 1) {
-                            that.addPolyline(that.addPolygonEntitys, that.polygonData);
-                            // 获取数据
-                            data = that.addPolygonEntitys.graphics[0].geometry.paths[0];
-                        } else {
-                            that.addPolygon(that.addPolygonEntitys, that.polygonData);
-                            // 获取数据
-                            data = that.addPolygonEntitys.graphics[0].geometry.rings[0];
-                        }
-
-
-                        for (var i = 0; i < data.length; i++) {
-                            dataStr += (data[i][0] + ' ' + data[i][1] + ',');
-                        }
-                        // 组装数据
-                        dataStr = dataStr.substring(0, dataStr.length - 1);
-
-                        if (that.tabIndex == 1) {
-                            if (that.patrolIndex == 1) {
-                                $.ajax({
-                                    url: 'https://web.byisf.com:18001/api/blade-jfpts/routeIn/routein/insertlx',
-                                    type: 'POST',
-                                    dataType: 'JSON',
-                                    data: {
-                                        routeName: that.globalRegionName,
-                                        regionId: $('#patrolRoute div:eq(0)').attr('regionid'),
-                                        routeInfo: dataStr,
-                                        remarks: that.routeOrRegionDescribe,
-                                        creatName: ''
-                                    },
-                                    success: function (result) {
-                                        if (result.code == 200) {
-                                            that.addPolygonEntitys.clear();
-                                            that.polygonData = [];
-                                            that.getRouteInformation($('.police-dispatching .police-container .police-container-patrol .table .tbody tbody'), '');
-                                            $.ajax({
-                                                url: 'https://web.byisf.com:18001/api/blade-jfpts/duty/duty/insertduty',
-                                                type: 'POST',
-                                                dataType: 'JSON',
-                                                data: {
-                                                    sname: that.peopleRealName,
-                                                    snumber: that.pepleRealId,
-                                                    rid: result.data,
-                                                    regionId: $('#patrolRoute div:eq(0)').attr('regionid'),
-                                                    type: 0
-                                                },
-                                                success: function (data) {
-                                                    if (data.code == 200) {
-                                                        alert(1);
-                                                    }
-                                                }
-                                            })
-                                        }
-                                    }
-                                })
-
-
-                                // that.peopleRealName = peopleRealName;
-                                // that.pepleRealId = pepleRealId;
-                            } else {
-                                $.ajax({
-                                    url: 'https://web.byisf.com:18001/api/blade-jfpts/regions/regions/insterqy',
-                                    type: 'POST',
-                                    dataType: 'JSON',
-                                    data: {
-                                        regionName: that.globalRegionName,
-                                        coordinate: dataStr,
-                                        remarks: that.routeOrRegionDescribe
-                                    },
-                                    success: function (result) {
-                                        if (result.code == 200) {
-                                            that.addPolygonEntitys.clear();
-                                            that.polygonData = [];
-                                            that.patrolArea($('.police-dispatching .police-container .police-container-patrol .table .tbody tbody'), '');
-                                        }
-                                    }
-                                })
-                            }
-                        } else if (that.tabIndex == 2) {
-                            $.ajax({
-                                url: 'https://web.byisf.com:18001/api/blade-jfpts/enclosure/enclosure/insertes',
-                                type: 'POST',
-                                dataType: 'JSON',
-                                data: {
-                                    anumber: that.newElectronicFenceId.anumber,
-                                    aname: that.newElectronicFenceId.aname,
-                                    routeInfo: dataStr
-                                },
-                                success: function (result) {
-                                    if (result.code == 200) {
-                                        that.addPolygonEntitys.clear();
-                                        that.polygonData = [];
-                                        that.getSecurityPeople($('.police-dispatching .police-container .police-container-policeforce .table .tbody tbody'), '');
-                                    }
-                                }
-                            })
-                        }
-
-
-                    }
-                    that.polygonFlag = false;
-
-                    // that.polygonData = [];
-
-
-                }
-            }
-
-
-            that.treatmentIndex = null;
-            that.tabIndex = 0;
-            $('.police-dispatching-tab li:eq(0)').addClass('on').siblings().removeClass('on');
-            $($('.police-container > div')[0]).stop().show().siblings().stop().hide();
-
-
-            $('.police-dispatching .police-container .distribute-district .select-list ul').empty();
-            $('.police-dispatching .police-container .distribute-district .select-list ul').append("<li key='addvcd' addvcd=''>全部</li>");
-            $.ajax({
-                url: 'https://web.byisf.com:18001/api/blade-jfpts/district/district/selectList',
-                type: 'POST',
-                dataType: 'JSON',
-                success: function (data) {
-                    for (var i = 0; i < data.data.length; i++) {
-                        $('.police-dispatching .police-container .distribute-district .select-list ul').append("<li key='addvcd' addvcd=" + data.data[i].addvcd + ">" + data.data[i].addvnm + "</li>");
-                    }
-                }
-            })
-
-
-            layui.use('laydate', function () {
-                that.layuiLadate = layui.laydate;
-                //执行一个laydate实例 开始
-                that.layuiLadate.render({
-                    elem: '#dispatchingStartTime', //指定元素
-                    type: "datetime",
-                    format: 'yyyy-MM-dd HH:mm',
-                    btns: ['confirm'],
-                    trigger: 'click',
-                });
-                // 结束
-                that.layuiLadate.render({
-                    elem: '#dispatchingEndTime', //指定元素
-                    type: "datetime",
-                    format: 'yyyy-MM-dd HH:mm',
-                    btns: ['confirm'],
-                    trigger: 'click',
-                });
-            });
-
-            // that.getPoliceTable($('.police-container-distribute').find('.tbody tbody'), $('#dispatchingStartTime').val(), $('#dispatchingEndTime').val(), '', '', '');
-            that.clickHand();
-
-
-            $('.police-dispatching-tab li:eq(2)').trigger('click');
-
-        },
-        close: function () {
-
-            $("#tabcontainer").css("width", "66%");
-            $('#mapcontentClass').removeClass('client-max-map'); //删除样式
-
-            this.entitysData = [];
-
-            this.addEntitys.clear();
-
-            this.entityPolygonAll.clear();
-
-            this.modifyPolygon();
-
-            // 切换时清除新增点线面数组中保存得数据,与清除地图上得实体
-            this.polygonData = [];
-            this.addPolygonEntitys.clear();
-        },
-        // 鼠标点击事件
-        clickHand: function () {
-            var self = this;
-
-
-            self._map.onClick = mapClick;
-
-            // $('#mainMapWidget')[0].ondblclick = function (event) {
-            //   event.preventDefault();
-            //   // if ()
-            //   self.activateToolbar(event.graphic);
-            //   return false;
-            // };
-
-
-            function mapClick(evt) {
-                var normalizedVal = webMercatorUtils.xyToLngLat(evt.mapPoint.x, evt.mapPoint.y);
-
-
-                var y = self._map.toMap({
-                    spatialReference: '4326',
-                    type: "point",
-                    x: evt.screenPoint.x,
-                    y: evt.screenPoint.y,
-
-                });
-
-                if (self.tabIndex == 0) {
-                    if (evt.graphic) {
-                        var result = evt.graphic.geometry.entityData;
-                        // var liText = evt.graphic.symbol.name;
-                        self.policeDetails(result.id);
-                    }
-                } else if (self.tabIndex == 1) {
-                    if (self.patrolIndex == 1) {
-                        // 编辑中的
-                        if (self.polygonFlag == true) {
-                            var normalizedVal = webMercatorUtils.xyToLngLat(evt.mapPoint.x, evt.mapPoint.y);
-                            if (self.polygonData.length == 0) {
-                                self.polygonData.push([normalizedVal[0], normalizedVal[1]]);
-                                self.addPoint(self.addPolygonEntitys, normalizedVal[0], normalizedVal[1]);
-                            } else {
-                                self.polygonData.push([normalizedVal[0], normalizedVal[1]]);
-                                self.addPolyline(self.addPolygonEntitys, self.polygonData);
-                                return;
-                            }
-                        } else { // 不在编辑中
-                            if (evt.graphic) { // 点击在图形上
-                                // 保存当前点击得图形
-                                // self.currentDrawing = evt.graphic;
-
-                                self.modifyPolygon();
-
-                                self.activateToolbar(evt.graphic);
-                            } else { // 点击不在图形上
-
-                                self.modifyPolygon()
-                            }
-                        }
-                    } else {
-                        // 编辑中的
-                        if (self.polygonFlag == true) {
-                            var normalizedVal = webMercatorUtils.xyToLngLat(evt.mapPoint.x, evt.mapPoint.y);
-                            if (self.polygonData.length == 0) {
-                                self.polygonData.push([normalizedVal[0], normalizedVal[1]]);
-                                self.addPoint(self.addPolygonEntitys, normalizedVal[0], normalizedVal[1]);
-                            } else if (self.polygonData.length == 1) {
-                                self.polygonData.push([normalizedVal[0], normalizedVal[1]]);
-                                self.addPolyline(self.addPolygonEntitys, self.polygonData);
-                                return;
-                            } else if (self.polygonData.length > 1) {
-                                self.polygonData.push([normalizedVal[0], normalizedVal[1]]);
-                                self.addPolygon(self.addPolygonEntitys, self.polygonData);
-                            }
-                        } else { // 不在编辑中
-                            if (evt.graphic) { // 点击在图形上
-                                // 保存当前点击得图形
-                                // self.currentDrawing = evt.graphic;
-
-                                self.modifyPolygon();
-
-                                self.activateToolbar(evt.graphic);
-                            } else { // 点击不在图形上
-
-                                self.modifyPolygon()
-                            }
-                        }
-                    }
-                } else if (self.tabIndex == 2) {
-                    if (self.polygonFlag == true) {
-                        var normalizedVal = webMercatorUtils.xyToLngLat(evt.mapPoint.x, evt.mapPoint.y);
-                        if (self.polygonData.length == 0) {
-                            self.polygonData.push([normalizedVal[0], normalizedVal[1]]);
-                            self.addPoint(self.addPolygonEntitys, normalizedVal[0], normalizedVal[1]);
-                        } else if (self.polygonData.length == 1) {
-                            self.polygonData.push([normalizedVal[0], normalizedVal[1]]);
-                            self.addPolyline(self.addPolygonEntitys, self.polygonData);
-                            return;
-                        } else if (self.polygonData.length > 1) {
-                            self.polygonData.push([normalizedVal[0], normalizedVal[1]]);
-                            self.addPolygon(self.addPolygonEntitys, self.polygonData);
-                        }
-                    } else {
-                        if (evt.graphic) { // 点击在图形上
-                            // 保存当前点击得图形
-                            // self.currentDrawing = evt.graphic;
-
-                            self.electronicFence();
-
-                            self.activateToolbar(evt.graphic);
-                        } else { // 点击不在图形上
-
-                            self.electronicFence()
-                        }
-                    }
-
-
-                    // self.equipmentDetails(result.id);
-                }
-
-            }
-
-
-            // 提示信息
-            $(document).off('mousemove').mousemove(function (e) {
-                var y = e.clientY + 10;
-                var x = e.clientX + 20;
-
-                if (e.clientX < 40) {
-                    var x = 40;
-                }
-
-                if (e.clientY < 42) {
-                    y = 42;
-                }
-
-                if (e.clientY > ($(window).height() - 82)) {
-                    y = ($(window).height() - 66);
-                }
-
-                if (e.clientX > ($(window).width() - 184)) {
-                    x = ($(window).width() - 184);
-                }
-
-                if (self.tabIndex == 1 || self.tabIndex == 2) {
-
-                    if (self.polygonFlag == true) {
-                        $('.police-dispatching .tips').stop().show();
-
-                        if (self.polygonData.length == 0) {
-                            $('.police-dispatching .tips').text('单击左键开始绘制。');
-                        } else {
-                            if (e.clientY > ($(window).height() - 98)) {
-                                y = ($(window).height() - 88);
-                            }
-                            $('.police-dispatching .tips').text('单击左键新增加点。单击右键完成绘制。');
-                        }
-
-                        $('.police-dispatching .tips').css({
-                            'top': y,
-                            'left': x,
-                        })
-                    } else {
-                        $('.police-dispatching .tips').stop().hide();
-                    }
-
-                } else {
-                    $('.police-dispatching .tips').stop().hide();
-                }
-            })
-        },
-        // 警情详情弹框
-        /**
-         *
-         * @param {number} id 警情ID
-         */
-        policeDetails: function (id) {
-            var that = this;
-            var url = './popup/html/police-details.html?obj=' + id;
-            layui.use('layer', function () {
-                that.layuiLayer = layui.layer;
-                that.layuiLayer.config({
-                    extend: 'myskin/police-details.css'
-                });
-                that.layuiLayer.close(that.layuiLayer.index);
-                that.layuiLayer.open({
-                    title: '警情详情',
-                    type: 2,
-                    shadeClose: true,
-                    shade: false,
-                    maxmin: false, //开启最大化最小化按钮
-                    area: ['500px', '400px'],
-                    offset: 'auto',
-                    skin: 'police-details',
-                    content: url,
-                    closeBtn: 1,
-                });
-            })
-        },
-        // 业主详情弹框
-        /**
-         *
-         * @param {number} id 警情ID
-         */
-        ownerDetails: function (id) {
-            var that = this;
-            var url = './popup/html/owner-details.html?id=' + id;
-            layui.use('layer', function () {
-                that.layuiLayer = layui.layer;
-                that.layuiLayer.config({
-                    extend: 'myskin/owner-details.css'
-                });
-                that.layuiLayer.close(that.layuiLayer.index);
-                that.layuiLayer.open({
-                    title: '业主详情',
-                    type: 2,
-                    shadeClose: true,
-                    shade: false,
-                    maxmin: false, //开启最大化最小化按钮
-                    area: ['500px', '340px'],
-                    offset: 'auto',
-                    skin: 'owner-details',
-                    content: url,
-                    closeBtn: 1,
-                });
-            })
-        },
-        // 设备详情弹框
-        /**
-         *
-         * @param {number} id 设备ID
-         */
-        equipmentDetails: function (id) {
-            var that = this;
-            var url = './popup/html/equipment-details.html?obj=' + id;
-            layui.use('layer', function () {
-                that.layuiLayer = layui.layer;
-                that.layuiLayer.config({
-                    extend: 'myskin/equipment-details.css'
-                });
-                that.layuiLayer.close(that.layuiLayer.index);
-                that.layuiLayer.open({
-                    title: '警情详情',
-                    type: 2,
-                    shadeClose: true,
-                    shade: false,
-                    maxmin: false, //开启最大化最小化按钮
-                    area: ['520px', '320px'],
-                    offset: 'auto',
-                    skin: 'equipment-details',
-                    content: url,
-                    closeBtn: 1,
-                });
-            })
-        },
-        // 获取当前时间,以及昨天现在的时间
-        getTime: function getTime() {
-            var timestamp = Date.parse(new Date());
-
-            // 当前时间
-            var currentTime = new Date(timestamp);
-            // 年
-            var currentY = currentTime.getFullYear();
-            // 月
-            var currentM = currentTime.getMonth() + 1 < 10 ? '0' + (currentTime.getMonth() + 1) : currentTime.getMonth() + 1;
-            // 日
-            var currentD = currentTime.getDate() < 10 ? '0' + currentTime.getDate() : currentTime.getDate();
-            // 时
-            var currentH = currentTime.getHours() < 10 ? '0' + currentTime.getHours() : currentTime.getHours();
-            // 分
-            var currentDd = currentTime.getMinutes() < 10 ? '0' + currentTime.getMinutes() : currentTime.getMinutes();
-            // 明天
-            var tomorrowTime = new Date(timestamp - 60 * 60 * 24 * 1000);
-            // 年
-            var tomorrowY = tomorrowTime.getFullYear();
-            // 月
-            var tomorrowM = tomorrowTime.getMonth() + 1 < 10 ? '0' + (tomorrowTime.getMonth() + 1) : tomorrowTime.getMonth() + 1;
-            // 日
-            var tomorrowD = tomorrowTime.getDate() < 10 ? '0' + tomorrowTime.getDate() : tomorrowTime.getDate();
-            // 时
-            var tomorrowH = tomorrowTime.getHours() < 10 ? '0' + tomorrowTime.getHours() : tomorrowTime.getHours();
-            // 分
-            var tomorrowDd = tomorrowTime.getMinutes() < 10 ? '0' + tomorrowTime.getMinutes() : tomorrowTime.getMinutes();
-            return {
-                current: currentY + '-' + currentM + '-' + currentD + ' ' + currentH + ':' + currentDd,
-                tomorrow: tomorrowY + '-' + tomorrowM + '-' + tomorrowD + ' ' + tomorrowH + ':' + tomorrowDd,
-                month: currentM + currentD
-            };
-        },
-        // 获取警情信息列表
-        /**
-         *
-         * @param {object} dom jq对象
-         * @param {string} beginTime 开始时间
-         * @param {string} endTime 结束时间
-         * @param {*} waringType 警情的类别
-         */
-        getPoliceTable: function (dom, beginTime, endTime, waringType, addvcd, type) {
-            dom.empty();
-            var that = this;
-            $.ajax({
-                url: 'https://web.byisf.com:18001/api/blade-jfpts/jingdan/jingdan/selectList',
-                type: 'POST',
-                dataType: 'JSON',
-                data: {
-                    beginTime: beginTime,
-                    endTime: endTime,
-                    waringType: waringType,
-                    addvcd: addvcd,
-                    type: type
-                },
-                success: function (data) {
-                    var result = data.data;
-                    var str = '';
-                    that.entitysData = [];
-                    that.addEntitys.clear();
-                    for (var a, time, t, e, y, h, i = 0; i < result.length; i++) {
-
-                        if (result[i].type != 1) {
-                            that.createEntitys(that.addEntitys, that.entitysData, '警情信息', {
-                                lgtd: result[i].jd,
-                                lttd: result[i].wd,
-                                id: result[i].id
-                            }, result[i].jd, result[i].wd, './images/jingbaored.png');
-
-
-                            t = result[i].galarmTime.substr(0, 10);
-                            e = result[i].galarmTime.substr(11);
-                            time = t + '&nbsp;' + e;
-                            y = result[i].galarmTime.substr(5, 5);
-                            h = result[i].galarmTime.substr(11, 5);
-                            a = Number(i) + 1;
-                            str += '<tr term-list=' + result[i].id + ' lgtd=' + result[i].jd + ' lttd=' + result[i].wd + '>';
-                            str += '<td>' + a + '</td>';
-                            str += '<td title=' + result[i].addvnm + '>' + result[i].addvnm + '</td>';
-                            str += '<td title=' + (result[i].type == 2 ? '处理中' : '待处理') + '>' + (result[i].type == 2 ? '处理中' : '待处理') + '</td>';
-                            str += "<td><a href='javascript:;' title=" + time + ">" + y + ' ' + h + "</a></td>";
-                            if (result[i].type == 2) {
-                                str += "<td class='operation'> <input class='follow-up' type='button' value='跟进' term-list=" + result[i].id + "> </td>";
-                            } else {
-                                str += "<td class='operation'> <input class='edit' type='button' value='编辑' term-list=" + result[i].id + "> </td>";
-                            }
-                            str += '</tr>';
-                            dom.append(str);
-                            str = '';
-
-                        }
-
-                    }
-
-                    for (var i = 0; i < 1000; i++) {
-                        var dd = Math.random();
-                        var cc = Math.random();
-                    }
-                }
-            })
-        },
-        // 获取区域信息列表
-        patrolArea: function (dom, regionName) {
-            dom.empty();
-            var that = this;
-            that.currentDrawing = [];
-            that.entityPolygonAll.clear();
-            $.ajax({
-                url: 'https://web.byisf.com:18001/api/blade-jfpts/regions/regions/selectList',
-                type: 'POST',
-                dataType: 'JSON',
-                data: {
-                    regionName: regionName
-                },
-                success: function (data) {
-                    var result = data.data;
-                    var str = '';
-                    var entityArr = [];
-                    var objId = {};
-                    var entityData = '';
-                    for (var i = 0; i < result.length; i++) {
-                        entityArr = [];
-                        objId = {};
-                        entityData = result[i].coordinate.match(/\(([^)]*)\)/);
-                        // 此时result=["(dsfasjfj3124123)", "dsfasjfj3124123"];
-                        if (entityData && entityData != '') {
-                            entityData = entityData[1].split(',');
-                            for (var j = 0; j < entityData.length; j++) {
-                                entityArr.push([Number(entityData[j].split(' ')[0]), Number(entityData[j].split(' ')[1])]);
-                            }
-                        }
-                        objId.id = result[i].id;
-                        objId.regionId = result[i].regionId;
-                        objId.regionName = result[i].regionName;
-                        objId.remarks = result[i].remarks;
-
-                        that.addPolygonAll(that.entityPolygonAll, entityArr, objId);
-
-                        str += "<tr flyid=" + result[i].id + " flyname=" + result[i].regionName + "> <td>" + (Number(i) + 1) + "</td> <td>" + result[i].regionName + "</td> <td>" + result[i].ttime + "</td> </tr>";
-                        dom.append(str);
-                        str = '';
-                    }
-                }
-            })
-        },
-        // 获取路线信息列表
-        getRouteInformation: function (dom, routeName) {
-            dom.empty();
-            var that = this;
-            that.currentDrawing = [];
-            that.entityPolygonAll.clear();
-            $.ajax({
-                url: 'https://web.byisf.com:18001/api/blade-jfpts/routeIn/routein/selectList',
-                type: 'POST',
-                dataType: 'JSON',
-                data: {
-                    routeName: routeName
-                },
-                success: function (data) {
-                    var result = data.data;
-                    var str = '';
-                    var entityArr = [];
-                    var objId = {};
-                    var entityData = '';
-                    for (var i = 0; i < result.length; i++) {
-                        entityArr = [];
-                        objId = {};
-                        entityData = result[i].routeInfo.match(/\(([^)]*)\)/);
-                        // 此时result=["(dsfasjfj3124123)", "dsfasjfj3124123"];
-                        if (entityData && entityData != '') {
-                            entityData = entityData[1].split(',');
-                            for (var j = 0; j < entityData.length; j++) {
-                                entityArr.push([Number(entityData[j].split(' ')[0]), Number(entityData[j].split(' ')[1])]);
-                            }
-                        }
-                        objId.id = result[i].id;
-                        objId.regionId = result[i].regionId;
-                        objId.routeName = result[i].routeName;
-                        objId.remarks = result[i].remarks;
-                        that.addPolygonAll(that.entityPolygonAll, entityArr, objId);
-                        str += "<tr flyid=" + result[i].id + " flyname=" + result[i].routeName + "> <td>" + (Number(i) + 1) + "</td> <td>" + result[i].sname + "</td> <td>" + result[i].routeName + "</td> <td> <a href='javascript:;' title=" + result[i].rtime + ">" + result[i].rtime.substr(5, 11) + "</a></td> <td><input type='button' value='编辑'></td> </tr>";
-                        dom.append(str);
-                        str = '';
-                    }
-                }
-            })
-        },
-        // 获取保安人员信息列表
-        getSecurityPeople: function (dom, deviceType) {
-            dom.empty();
-            var that = this;
-            that.currentDrawing = [];
-            that.entityPolygonAll.clear();
-            $.ajax({
-                url: 'https://web.byisf.com:18001/api/blade-jfpts/security/security/selectList',
-                type: 'POST',
-                dataType: 'JSON',
-                success: function (data) {
-                    var result = data.data;
-                    var str = '';
-                    that.entitysData = [];
-                    that.addEntitys.clear();
-                    var entityArr = [];
-                    var objId = {};
-                    var entityData = '';
-                    for (var a, i = 0; i < result.length; i++) {
-
-
-                        that.createEntitys(that.addEntitys, that.entitysData, '出警信息', {
-                            lgtd: result[i].jd,
-                            lttd: result[i].wd,
-                            id: result[i].id
-                        }, result[i].jd, result[i].wd, './images/security.png');
-                        entityArr = [];
-                        objId = {};
-                        entityData = result[i].coordinate.match(/\(([^)]*)\)/);
-
-                        a = Number(i) + 1;
-                        str += "<tr term-snumber=" + result[i].snumber + " lgtd=" + result[i].jd + " lttd=" + result[i].wd + ">";
-                        str += '<td>' + a + '</td>';
-                        str += '<td title=' + result[i].snumber + '>' + result[i].snumber + '</td>';
-                        str += '<td title=' + result[i].sname + '>' + result[i].sname + '</td>';
-                        str += '<td title=' + result[i].phone + '>' + result[i].phone + '</td>';
-                        str += "<td> <input type='button' value='编辑' resultid=" + result[i].id + "> </td>";
-                        str += '</tr>';
-                        dom.append(str);
-                        str = '';
-
-
-                        // 此时result=["(dsfasjfj3124123)", "dsfasjfj3124123"];
-                        if (entityData && entityData != '') {
-                            entityData = entityData[1].split(',');
-                            for (var j = 0; j < entityData.length; j++) {
-                                entityArr.push([Number(entityData[j].split(' ')[0]), Number(entityData[j].split(' ')[1])]);
-                            }
-                        }
-                        objId.id = result[i].id;
-                        objId.anumber = result[i].snumber;
-                        objId.aname = result[i].sname;
-
-                        that.addPolygonAll(that.entityPolygonAll, entityArr, objId);
-                    }
-
-
-                }
-            })
-        },
-        // 创建实体图层
-        createEntitys: function (entitys, entityContent, name, item, lgtd, lttd, outlineColors) {
-
-            var symbol = new esri.symbol.PictureMarkerSymbol(outlineColors, 26, 26);
-            symbol.name = name;
-            var pt = new Point(lgtd, lttd, new esri.SpatialReference({wkid: 4326}));
-            pt.entityData = item;
-            var graphic = new esri.Graphic(pt, symbol);
-            entitys.add(graphic);
-
-
-            entityContent.push(item);
-        },
-        addPoint: function (entitys, lgtd, lttd) {
-            var symbol = new esri.symbol.PictureMarkerSymbol('./images/real-time-callPolice.png', 10, 10);
-            var pt = new Point(lgtd, lttd, new SpatialReference({wkid: 4326}));
-            var graphic = new esri.Graphic(pt, symbol);
-            entitys.add(graphic);
-        },
-        addPolyline: function (entitys, path) {
-            entitys.clear();
-            var polylineSymbol = new SimpleLineSymbol();
-            polylineSymbol.color = [255, 0, 0, 1];
-            polylineSymbol.width = 4;
-            var polyline = new Polyline({
-                "paths": [path],
-                "spatialReference": {
-                    "wkid": 4326
-                }
-            });
-
-            entitys.add(new Graphic(polyline, polylineSymbol));
-        },
-        addPolygon: function (entitys, rings) {
-            entitys.clear();
-            var polygonSymbol = new SimpleFillSymbol();
-            polygonSymbol.color = [24, 255, 243, 0.411];
-            var polygon = new Polygon({
-                "rings": [rings],
-                "spatialReference": {
-                    "wkid": 4326
-                }
-            });
-
-            entitys.add(new Graphic(polygon, polygonSymbol));
-        },
-
-        activateToolbar: function (graphic) {
-            var tool = 0;
-
-            this.editToolbar = new Edit(this._map);
-
-            // if (registry.byId("tool_move").checked) {
-            tool = tool | Edit.MOVE;
-            // }
-            // if (registry.byId("tool_vertices").checked) {
-            tool = tool | Edit.EDIT_VERTICES;
-            // }
-            // if (registry.byId("tool_scale").checked) {
-            tool = tool | Edit.SCALE;
-            // }
-            // if (registry.byId("tool_rotate").checked) {
-            tool = tool | Edit.ROTATE;
-            // }
-            // enable text editing if a graphic uses a text symbol
-            // if ( graphic.symbol.declaredClass === "esri.symbol.TextSymbol" ) {
-            tool = tool | Edit.EDIT_TEXT;
-            // }
-
-            var options = {
-                allowAddVertices: true,
-                allowDeleteVertices: true,
-                uniformScaling: true
-            };
-            this.editToolbar.activate(tool, graphic, options);
-
-        },
-
-        addPolygonAll: function (entitys, rings, objId) {
-            // entitys.clear();
-            var graphic = null;
-            if (this.patrolIndex == 1) {
-                var polylineSymbol = new SimpleLineSymbol();
-                polylineSymbol.color = [255, 0, 0, 1];
-                polylineSymbol.width = 4;
-                var polyline = new Polyline({
-                    "paths": [rings],
-                    "spatialReference": {
-                        "wkid": 4326
-                    }
-                });
-
-                graphic = new Graphic(polyline, polylineSymbol)
-
-            } else {
-                var polygonSymbol = new SimpleFillSymbol();
-                polygonSymbol.color = [24, 255, 243, 0.411];
-
-                var polygon = new Polygon({
-                    "rings": [rings],
-                    "spatialReference": {
-                        "wkid": 4326
-                    }
-                });
-
-                graphic = new Graphic(polygon, polygonSymbol);
-
-            }
-
-            graphic.objId = objId;
-
-            if (this.tabIndex == 1) {
-                if (this.patrolIndex == 1) {
-                    this.currentDrawing.push({
-                        id: objId.id,
-                        regionId: objId.regionId,
-                        routeName: objId.routeName,
-                        remarks: objId.remarks,
-                        extent: graphic.geometry.getExtent()
-                    });
-                } else {
-                    this.currentDrawing.push({
-                        id: objId.id,
-                        regionId: objId.regionId,
-                        regionName: objId.regionName,
-                        remarks: objId.remarks,
-                        extent: graphic.geometry.getExtent()
-                    });
-                }
-            } else {
-                this.currentDrawing.push({
-                    id: objId.id,
-                    aname: objId.aname,
-                    anumber: objId.anumber,
-                    extent: graphic.geometry.getExtent()
-                });
-            }
-
-
-            entitys.add(graphic);
-        },
-
-        modifyPolygon: function () {
-            var self = this;
-            if (self.editToolbar != null) {
-
-                if (self.patrolIndex == 1) {
-                    var polygon = self.editToolbar.getCurrentState();
-
-
-                    for (var i = 0; i < self.currentDrawing.length; i++) {
-
-                        if (self.currentDrawing[i].id == polygon.graphic.objId.id) {
-                            self.currentDrawing[i].extent = polygon.graphic.geometry.getExtent();
-                        }
-
-                    }
-
-
-                    self.editToolbar.deactivate();
-
-                    self.editToolbar = null;
-
-
-                    // 声明空字符串,存储数据
-                    var dataStr = '';
-
-                    // 获取数据
-                    var data = polygon.graphic.geometry.paths[0];
-
-
-                    for (var i = 0; i < data.length; i++) {
-                        dataStr += (data[i][0] + ' ' + data[i][1] + ',');
-                    }
-                    // 组装数据
-                    dataStr = dataStr.substring(0, dataStr.length - 1);
-
-                    $.ajax({
-                        url: 'https://web.byisf.com:18001/api/blade-jfpts/routeIn/routein/updatelx',
-                        type: 'POST',
-                        dataType: 'JSON',
-                        data: {
-                            id: polygon.graphic.objId.id,
-                            regionId: polygon.graphic.objId.regionId,
-                            routeName: polygon.graphic.objId.routeName,
-                            routeInfo: dataStr,
-                            remarks: polygon.graphic.objId.remarks,
-                        },
-                        success: function (result) {
-                            if (result.code == 200) {
-
-                            }
-                        }
-                    })
-                } else {
-                    var polygon = self.editToolbar.getCurrentState();
-
-
-                    for (var i = 0; i < self.currentDrawing.length; i++) {
-
-                        if (self.currentDrawing[i].id == polygon.graphic.objId.id) {
-                            self.currentDrawing[i].extent = polygon.graphic.geometry.getExtent();
-                        }
-
-                    }
-
-
-                    self.editToolbar.deactivate();
-
-                    self.editToolbar = null;
-
-
-                    // 声明空字符串,存储数据
-                    var dataStr = '';
-
-                    // 获取数据
-                    var data = polygon.graphic.geometry.rings[0];
-
-
-                    for (var i = 0; i < data.length; i++) {
-                        dataStr += (data[i][0] + ' ' + data[i][1] + ',');
-                    }
-                    // 组装数据
-                    dataStr = dataStr.substring(0, dataStr.length - 1);
-
-                    $.ajax({
-                        url: 'https://web.byisf.com:18001/api/blade-jfpts/regions/regions/updateqy',
-                        type: 'POST',
-                        dataType: 'JSON',
-                        data: {
-                            id: polygon.graphic.objId.id,
-                            regionId: polygon.graphic.objId.regionId,
-                            regionName: polygon.graphic.objId.regionName,
-                            coordinate: dataStr,
-                            remarks: polygon.graphic.objId.remarks
-                        },
-                        success: function (result) {
-                            if (result.code == 200) {
-
-                            }
-                        }
-                    })
-                }
-
-
-            }
-        },
-
-        electronicFence: function () {
-            var self = this;
-            if (self.editToolbar != null) {
-                var polygon = self.editToolbar.getCurrentState();
-
-
-                for (var i = 0; i < self.currentDrawing.length; i++) {
-
-                    if (self.currentDrawing[i].id == polygon.graphic.objId.id) {
-                        self.currentDrawing[i].extent = polygon.graphic.geometry.getExtent();
-                    }
-
-                }
-
-
-                self.editToolbar.deactivate();
-
-                self.editToolbar = null;
-
-
-                // 声明空字符串,存储数据
-                var dataStr = '';
-
-                // 获取数据
-                var data = polygon.graphic.geometry.rings[0];
-
-
-                for (var i = 0; i < data.length; i++) {
-                    dataStr += (data[i][0] + ' ' + data[i][1] + ',');
-                }
-                // 组装数据
-                dataStr = dataStr.substring(0, dataStr.length - 1);
-
-                $.ajax({
-                    url: 'https://web.byisf.com:18001/api/blade-jfpts/enclosure/enclosure/updatee',
-                    type: 'POST',
-                    dataType: 'JSON',
                     data: {
-                        id: polygon.graphic.objId.id,
-                        aname: polygon.graphic.objId.aname,
-                        anumber: polygon.graphic.objId.anumber,
-                        routeInfo: dataStr
+                      coordinate: "point(" + $(this).attr('lgtd') + "," + $(this).attr('lttd') + ")"
                     },
-                    success: function (result) {
-                        if (result.code == 200) {
+                    dataType: 'JSON',
+                    success: function (data) {
 
-                        }
+                      var result = data.data;
+
+                      for (var i = 0; i < result.length; i++) {
+                        str += "<tr> <td>" + (Number(i) + 1) + "</td> <td>" + result[i].real_name + "</td> <td>" + result[i].distance.toFixed(2) + "</td> <td><input type='radio' name='securityStaff' securityid=" + result[i].CODE + " securityname=" + result[i].real_name + "> </td> </tr>"
+                      }
+
+                      $('.police-container-distribute-details .security-guard-nearby .security-staff-content tbody').append(str);
                     }
-                })
-            }
-        },
-
-        //聚合图层事件
-        flareClusterLayer: function (datas) {
-
-            var that = this;
-
-            var preClustered = false;
-            var displaySingleFlaresAtCount = 10;
-            var areaDisplayMode = "";
-            // var allData = JSON.parse(DATA);
-            // DataManager.setData(allData);
-
-            //init the layer, more options are available and explained in the cluster layer constructor
-            that.clusterLayer = new FlareClusterLayer({
-                id: "flare-cluster-layer",
-                spatialReference: new esri.SpatialReference({"wkid": 4326}),
-                subTypeFlareProperty: "facilityType",
-                singleFlareTooltipProperty: "name",
-                displaySubTypeFlares: true,
-                displaySingleFlaresAtCount: displaySingleFlaresAtCount,
-                flareShowMode: "mouse",
-                preClustered: preClustered,
-                clusterRatio: 75,
-                clusterAreaDisplay: areaDisplayMode,
-                clusteringBegin: function () {
-                    console.log("clustering begin");
-                },
-                clusteringComplete: function () {
-                    console.log("clustering complete");
+                  })
+                  $('.police-container-distribute-details .security-guard-nearby').stop().show();
+                } else {
+                  $('.police-container-distribute-details .content table tbody .securityname').text('');
+                  $('.police-container-distribute-details .security-guard-nearby').stop().hide();
                 }
-            });
+                that.treatmentIndex = $(this).val();
+              }
+            })
+          }
+        })
+      })
+      // 警情分发中的详情的确认按钮
+      $('.police-container-distribute-details .handle-button .confirm').off('click').click(function () {
+        var self = this;
+        layui.use('layer', function () {
+          var layer = layui.layer;
+          if (that.treatmentIndex == null) {
+            layer.msg('请选择处理方式', {
 
-            //set up a class breaks renderer to render different symbols based on the cluster count. Use the required clusterCount property to break on.
-            var defaultSym = new PictureMarkerSymbol("./images/ceshi.png", 32, 32).setOffset(0, 15);
-            var renderer = new ClassBreaksRenderer(defaultSym, "clusterCount");
-            var xlSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 32, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([200, 52, 59, 0.8]), 1), new dojo.Color([250, 65, 74, 0.8]));
-            var lgSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 28, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([41, 163, 41, 0.8]), 1), new dojo.Color([51, 204, 51, 0.8]));
-            var mdSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 24, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([82, 163, 204, 0.8]), 1), new dojo.Color([102, 204, 255, 0.8]));
-            var smSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 22, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([230, 184, 92, 0.8]), 1), new dojo.Color([255, 204, 102, 0.8]));
-            renderer.addBreak(0, 19, smSymbol);
-            renderer.addBreak(20, 150, mdSymbol);
-            renderer.addBreak(151, 1000, lgSymbol);
-            renderer.addBreak(1001, Infinity, xlSymbol);
 
-            that.clusterLayer.setRenderer(renderer); //use standard setRenderer.
+              shade: [0.8, '#393D49'],
 
-            //set up a popup template
-            var template = new PopupTemplate({
-                title: "{name}",
-                fieldInfos: [
-                    {fieldName: "facilityType", label: "Facility Type", visible: true},
-                    {fieldName: "postcode", label: "Post Code", visible: true},
-                    {fieldName: "isOpen", label: "Opening Hours", visible: true}
-                ]
-            });
+              time: 1000
+            })
+            return
+          } else {
+            if (that.treatmentIndex == '派发保安') {
+              if (that.securityFlag == false) {
+                layer.msg('请选取保安', {
 
-            //clusterLayer.infoTemplate = template;
-            that._map.infoWindow.titleInBody = false;
 
-            that._map.addLayer(that.clusterLayer);
+                  shade: [0.8, '#393D49'],
 
-            //var data = DataManager.getData();
-            that.clusterLayer.addData(datas);
+                  time: 1000
+                })
+                return
+              }
+            }
+
+          }
+          var id = $(self).attr('police-id');
+          var handletype = null;
+          if (that.treatmentIndex != null) {
+            if (that.treatmentIndex == '派发保安') {
+              handletype = '0';
+            } else {
+              handletype = '1';
+            }
+          }
+          // 发送请求修改警单数据
+          $.ajax({
+            url: 'https://web.byisf.com:18001/api/blade-jfpts/jingdan/jingdan/updateInfo',
+            type: 'POST',
+            data: {
+              id: id,
+              // handleP: $('.police-container-distribute-details .content table tbody tr:eq(4) td:eq(3)').attr('people-id'),
+              // handName: $('.police-container-distribute-details .content table tbody tr:eq(4) td:eq(3)').text(),
+              handleP: $('.police-container-distribute-details .content table tbody .securityname').attr('id'),
+              handName: $('.police-container-distribute-details .content table tbody .securityname').text(),
+              handletype: handletype,
+              type: '2'
+            },
+            dataType: 'JSON',
+            success: function (data) {
+              if (data.code == 200) {
+                if (!$('.police-container-distribute-details .security-guard-nearby').is(':hidden')) {
+                  $('.police-container-distribute-details .security-guard-nearby').stop().hide();
+                }
+                $('.police-container-distribute-details').stop().hide();
+
+                $('.police-container .police-container-distribute .table .tbody tr:eq(' + that.editParentInd + ') td:eq(2)').text('处理中');
+
+                $('.police-container .police-container-distribute .table .tbody tr:eq(' + that.editParentInd + ') td:eq(4)').html("<input class='follow-up' type='button' value='跟进' >");
+              }
+            }
+          })
+        });
+      })
+      // 警情分发中的跟进按钮的点击事件
+      $('.police-container .police-container-distribute .table .tbody').off('click', '.follow-up').on('click', '.follow-up', function () {
+        var id = $(this).attr('term-list');
+
+        if (!$('.police-container-distribute-details').is(':hidden')) {
+          $('.police-container-distribute-details').stop().hide();
+        }
+
+        $('.police-container-distribute-details .content table tbody').empty();
+
+        var str = '';
+        $.ajax({
+          url: 'https://web.byisf.com:18001/api/blade-jfpts/jingdan/jingdan/selectdInfo?deviceNumber=&id=' + id,
+          type: 'POST',
+          dataType: 'JSON',
+          success: function (data) {
+            var result = data.data[0];
+
+            var t = result.galarmTime.substr(0, 10);
+            var e = result.galarmTime.substr(11);
+            var time = t + '&nbsp;' + e;
+
+
+            str += "<tr> <td>报警人姓名:</td> <td>" + result.galarmPeople + "</td> <td>联系方式:</td> <td>" + result.phoneNumber + "</td> </tr>";
+
+            str += "<tr> <td>事发地址:</td> <td>" + result.place + "</td> <td>行政区:</td> <td>" + result.addvnm + "</td> </>";
+
+            str += "<tr> <td>报警时间:</td> <td>" + time + "</td> <td>报警内容:</td> <td>" + result.content + "</td> </tr>";
+
+            str += "<tr> <td>警情级别:</td> <td>" + result.level + "</td> <td>警情类别:</td> <td>" + result.waringType + "</td> </tr>";
+
+            str += "<tr> <td>处理方式:</td> <td class='treatment-method'> " + (result.type == 2 ? '处理中' : '待处理') + " </td> <td>处理人:</td> <td class='securityname'> " + result.handName + " </td> </tr>";
+
+            str += "<tr> <td>是否上报110:</td> <td class='report-oneonezero'> <input type='radio' name='callPhone' value='是'> <span>是</span> <input type='radio' name='callPhone' value='否'> <span>否</span> </td> <td>设备编号:</td> <td>" + 1111 + "</td> </tr>";
+            $('.police-container-distribute-details .content table tbody').append(str);
+            $('.police-container-distribute-details .header h4').text('警情跟进');
+            $('.police-container-distribute-details .handle-button').stop().hide();
+            $('.police-container-distribute-details').stop().show();
+
+
+          }
+        })
+
+
+      })
+      // 警情分发中的详情的取消按钮
+      $('.police-container-distribute-details .handle-button .cancel').off('click').click(function () {
+        if (!$('.police-container-distribute-details .security-guard-nearby').is(':hidden')) {
+          $('.police-container-distribute-details .security-guard-nearby').stop().hide();
+        }
+        $('.police-container-distribute-details').stop().hide();
+      })
+      // 警情分发中详情的关闭按钮
+      $('.police-container-distribute-details .header .close').off('click').click(function () {
+        if (!$('.police-container-distribute-details .security-guard-nearby').is(':hidden')) {
+          $('.police-container-distribute-details .security-guard-nearby').stop().hide();
+        }
+        $('.police-container-distribute-details').stop().hide();
+      })
+      // 派发保安的确认按钮
+      $('.police-container-distribute-details .security-guard-nearby .security-staff-confirm input').off('click').click(function () {
+        var list = $('.police-container-distribute-details .security-guard-nearby .security-staff-content input');
+        that.securityFlag = false;
+        var id = null;
+        var securityname = null;
+        for (var i = 0; i < list.length; i++) {
+          if ($(list[i]).prop('checked') == true) {
+            that.securityFlag = true;
+            id = $(list[i]).attr('securityid');
+            securityname = $(list[i]).attr('securityname');
+            break;
+          }
+        }
+
+        if (that.securityFlag == false) {
+          layui.use('layer', function () {
+            var layer = layui.layer;
+            layer.msg('请选取保安', {
+
+
+              shade: [0.8, '#393D49'],
+
+              time: 1000
+            })
+          });
+        } else {
+
+          $('.police-container-distribute-details .content table tbody .securityname').attr('id', id).text(securityname);
+
+          $('.police-container-distribute-details .security-guard-nearby').stop().hide();
+        }
+
+      })
+      // 警情信息中类别移入事件
+      $('#distributeCategory').mouseenter(function () {
+        if ($('#distributeCategory .select-list').is(':hidden')) {
+          $('#distributeCategory .select-list').stop().slideDown(0);
+        }
+      })
+      // 警情信息中得类别移出事件
+      $('#distributeCategory').mouseleave(function () {
+        if (!$('#distributeCategory .select-list').is(':hidden')) {
+          $('#distributeCategory .select-list').stop().slideUp(0);
+        }
+      })
+      // 警情信息中类别移入事件
+      $('#distributeState').mouseenter(function () {
+        if ($('#distributeState .select-list').is(':hidden')) {
+          $('#distributeState .select-list').stop().slideDown(0);
+        }
+      })
+      // 警情信息中得类别移出事件
+      $('#distributeState').mouseleave(function () {
+        if (!$('#distributeState .select-list').is(':hidden')) {
+          $('#distributeState .select-list').stop().slideUp(0);
+        }
+      })
+      //  警情信息类,业主信息类,设备信息类别,具体项的点击事件
+      $('.police-container > div .select-list').off('click', 'li').on('click', 'li', function (event) {
+
+        var text = $(this).text();
+        $(this).parent().parent().prev().html(text + '<i></i>');
+        $(this).parent().parent().stop().slideUp(0);
+
+        if (text == '全部') text = '';
+
+        var textOrr = '';
+        var textList = '';
+        var stateType = '';
+        if (that.tabIndex == 0) {
+          // that.getPoliceTable($('.analysis-container-police').find('.tbody tbody'), $('#dispatchingStartTime').val(), $('#dispatchingEndTime').val(), text);
+          if ($(this).attr('key')) {
+            textOrr = $('#distributeState div:eq(0)').text().trim();
+            textList = $('.police-dispatching .police-container .distribute-state .select-list ul li');
+
+            for (var i = 0; i < textList.length; i++) {
+              if (textOrr == $(textList[i]).text()) {
+                stateType = $(textList[i]).attr('statetype');
+              }
+            }
+
+            that.getPoliceTable($('.police-container-distribute').find('.tbody tbody'), $('#dispatchingStartTime').val(), $('#dispatchingEndTime').val(), '', $(this).attr('addvcd'), stateType);
+
+          } else {
+            textOrr = $('#distributeCategory div:eq(0)').text().trim();
+            textList = $('.police-dispatching .police-container .distribute-district .select-list ul li');
+
+            for (var i = 0; i < textList.length; i++) {
+              if (textOrr == $(textList[i]).text()) {
+                stateType = $(textList[i]).attr('addvcd');
+              }
+            }
+
+            that.getPoliceTable($('.police-container-distribute').find('.tbody tbody'), $('#dispatchingStartTime').val(), $('#dispatchingEndTime').val(), '', stateType, $(this).attr('stateType'));
+
+          }
+        }
+
+      })
+      // 时间查询
+      $('#dispatchingSelectTime').off('click').click(function () {
+        var times = $(this).prevAll();
+        // 开始时间
+        var startTime = $(times[1]).val();
+        // 结束时间
+        var endTime = $(times[0]).val();
+
+
+        var textOne = $('#distributeCategory div:eq(0)').text().trim();
+        var addvcd = '';
+        var list = $('.police-dispatching .police-container .distribute-district .select-list ul li');
+        if (textOne == '全部') {
+          addvcd = '';
+        } else {
+          if (list.length > 0) {
+            for (var i = 0; i < list.length; i++) {
+              if (textOne == $(list[i]).text()) {
+                addvcd = $(list[i]).attr('addvcd')
+              }
+            }
+          }
+        }
+
+        var textTwo = $('#distributeState div:eq(0)').text().trim();
+        var stateType = '';
+        var stateList = $('.police-dispatching .police-container .distribute-state .select-list ul li');
+        if (textTwo == '全部') {
+          stateType = '';
+        } else {
+          if (stateList.length > 0) {
+            for (var i = 0; i < stateList.length; i++) {
+              if (textTwo == $(stateList[i]).text()) {
+                stateType = $(stateList[i]).attr('statetype')
+              }
+            }
+          }
+        }
+
+        that.getPoliceTable($('.police-container-distribute').find('.tbody tbody'), startTime, endTime, '', addvcd, stateType);
+      })
+      //  巡逻区域中的行点击事件
+      $('.police-container .police-container-patrol .main-content>li:eq(0) .table .tbody').off('click', 'tr').on('click', 'tr', function () {
+
+
+        var flyid = $(this).attr('flyid');
+        var flyname = $(this).attr('flyname');
+        var extent = null;
+
+        for (var i = 0; i < that.currentDrawing.length; i++) {
+          if (flyid == that.currentDrawing[i].id && flyname == that.currentDrawing[i].regionName) {
+            extent = that.currentDrawing[i].extent;
+          }
+        }
+        // debugger
+        that._map.setExtent(extent.expand(1.5));
+
+        // var myFeatureExtent = new Extent(extent.)
+        // thisObj._map.setExtent(myFeatureExtent.expand(2));
+
+        // var lgtd = Number($(this).attr('lgtd'));
+        // var lttd = Number($(this).attr('lttd'));
+
+        // var position = new esri.geometry.Point(lgtd, lttd, new esri.SpatialReference({ wkid: 4326 }));//根据输入坐标信息找地图上的点
+        // that._map.centerAndZoom(position, 14);//缩放,10是缩放级别,可以自定义,数值越大缩放越大
+
+      })
+      // 巡逻区域的新增按钮
+      $('.police-container .police-container-patrol .main-content>li:eq(0) .distribute-table-content .operation .add').off('click').click(function () {
+        var url = './popup/html/region-name.html';
+        layui.use('layer', function () {
+          that.layuiLayer = layui.layer;
+          that.layuiLayer.config({
+            extend: 'myskin/region-name.css'
+          });
+          that.layuiLayer.close(that.layuiLayer.index);
+          that.layuiLayer.open({
+            title: '区域名称',
+            type: 2,
+            shadeClose: false,
+            shade: 0.3,
+            maxmin: false, //开启最大化最小化按钮
+            area: ['320px', '206px'],
+            offset: 'auto',
+            skin: 'region-name',
+            content: url,
+            closeBtn: 1,
+            success: function (layero, index) {
+              layero.find('iframe').contents().find(".start-editing").off('click').click(function () {
+                // 区域名称
+                var regionName = layero.find('iframe').contents().find('.region-name-input').val();
+                var regionDescribe = layero.find('iframe').contents().find('.region-name-textarea').val();
+                if (regionName == '') {
+                  that.layuiLayer.msg('请填写区域名称', {
+                    time: 1000
+                  })
+                  return
+                }
+
+                if (regionDescribe == '') {
+                  that.layuiLayer.msg('请填写区域描述', {
+                    time: 1000
+                  })
+                  return
+                }
+
+                that.globalRegionName = regionName;
+                that.routeOrRegionDescribe = regionDescribe;
+
+                // 开启,可以勾选线段
+                that.polygonFlag = true;
+                that.layuiLayer.close(index);
+
+              })
+            }
+          });
+        })
+
+      })
+      // 查找按钮
+      $('.police-container .police-container-patrol .main-content>li:eq(0) .distribute-table-content .operation .query').off('click').click(function () {
+        var routerName = $('.police-container .police-container-patrol .main-content>li:eq(0) .distribute-table-content .route-name').val();
+        // if (routerName == '') {
+        //   layui.use('layer', function () {
+        //     layui.layer.msg('请填写区域名称', {
+        //       time: 1000
+        //     })
+        //   })
+        //   return
+        // }
+        that.patrolArea($('.police-dispatching .police-container .police-container-patrol .table .tbody tbody'), routerName);
+        $('.police-container .police-container-patrol .main-content>li:eq(0) .distribute-table-content .route-name').val('');
+
+      })
+
+      // 保安出警管理表格中点击事件
+      $('.police-dispatching .police-container .police-container-policeforce .table .tbody tbody').off('click', 'input').on('click', 'input', function (event) {
+        event.stopPropagation();
+        var lgtd = Number($(this).parent().parent().attr('lgtd'));
+        var lttd = Number($(this).parent().parent().attr('lttd'));
+        var position = new esri.geometry.Point(lgtd, lttd, new esri.SpatialReference({
+          wkid: 4326
+        })); //根据输入坐标信息找地图上的点
+        that.newElectronicFenceId = null;
+        that._map.centerAndZoom(position, 18); //缩放,10是缩放级别,可以自定义,数值越大缩放越大
+        var graphic = that.entityPolygonAll.graphics;
+        for (var i = 0; i < graphic.length; i++) {
+          if (graphic[i].objId.id == $(this).attr('resultid')) {
+            if (graphic[i].geometry.rings[0].length > 0) {
+              that.polygonFlag = false;
+              that.electronicFence();
+              that.activateToolbar(graphic[i]);
+            } else {
+              layui.use('layer', function () {
+                layui.layer.msg('请开始划分电子围栏');
+              })
+              that.polygonFlag = true;
+              that.newElectronicFenceId = graphic[i].objId;
+            }
+          }
+        }
+      })
+      $('.police-dispatching .police-container .police-container-policeforce .table .tbody tbody').off('click', 'tr').on('click', 'tr', function (event) {
+        event.stopPropagation();
+        var lgtd = Number($(this).attr('lgtd'));
+        var lttd = Number($(this).attr('lttd'));
+        var position = new esri.geometry.Point(lgtd, lttd, new esri.SpatialReference({
+          wkid: 4326
+        })); //根据输入坐标信息找地图上的点
+
+        that._map.centerAndZoom(position, 18); //缩放,10是缩放级别,可以自定义,数值越大缩放越大
+
+        var snumber = $(this).attr('term-snumber');
+
+        var url = './popup/html/personnel-information-management.html?id=' + snumber;
+        layui.use('layer', function () {
+          that.layuiLayer = layui.layer;
+          that.layuiLayer.config({
+            extend: 'myskin/personnel-information-management.css'
+          });
+          that.layuiLayer.close(that.layuiLayer.index);
+          that.layuiLayer.open({
+            title: '保安人员信息',
+            type: 2,
+            shadeClose: true,
+            shade: false,
+            maxmin: false, //开启最大化最小化按钮
+            area: ['400px', '220px'],
+            offset: 'auto',
+            skin: 'personnel-information-management',
+            content: url,
+            closeBtn: 1,
+          });
+        })
+      })
+      $('.police-dispatching .police-container .police-container-policeforce .table .tbody tbody').off('click', 'tr td').on('click', 'tr td', function (event) {
+        if ($(this).index() == 4) {
+          event.stopPropagation();
+          return;
+
+        }
+      })
+
+      // 巡逻管理中,巡逻路线和巡逻区域的切换换
+      $('.police-dispatching .police-container .police-container-patrol .tab-header li').off('click').click(function () {
+        if (that.patrolIndex == $(this).index()) return;
+        $(this).addClass('on').siblings().removeClass('on');
+        $(".police-dispatching .police-container .police-container-patrol .main-content li:eq(" + $(this).index() + ")").stop().show().siblings().stop().hide();
+
+        that.polygonFlag = false;
+        that.entityPolygonAll.clear();
+        that.modifyPolygon();
+
+        // 切换时清除新增点线面数组中保存得数据,与清除地图上得实体
+        that.polygonData = [];
+        that.addPolygonEntitys.clear();
+
+        if ($(this).index() == 1) {
+          $('.police-dispatching .police-container .police-container-patrol .main-content .select-list ul').empty();
+          $.ajax({
+            url: 'https://web.byisf.com:18001/api/blade-jfpts/regions/regions/selectqy',
+            type: 'GET',
+            dataType: 'JSON',
+            success: function (res) {
+              var result = res.data;
+              $('.police-dispatching .police-container .police-container-patrol .main-content .select>ul>li>div:eq(0)').html(result[0].regionName + '<i></i>').attr('regionId', result[0].regionId);
+              for (var i = 0; i < result.length; i++) {
+                $('.police-dispatching .police-container .police-container-patrol .main-content .select-list ul').append($("<li regionId='" + result[i].regionId + "'>" + result[i].regionName + "</li>"))
+              }
+            }
+          })
+          that.getRouteInformation($('.police-dispatching .police-container .police-container-patrol .main-content>li:eq(1) .table .tbody tbody'), '');
+        } else {
+
+          that.patrolArea($('.police-dispatching .police-container .police-container-patrol .main-content>li:eq(0) .table .tbody tbody'), '');
+        }
+
+        that.patrolIndex = $(this).index();
+      })
+      // 巡逻管理下面的巡逻路线中的select选择框的移入事件
+      $('#patrolRoute').mouseenter(function () {
+        if ($('#patrolRoute .select-list').is(':hidden')) {
+          $('#patrolRoute .select-list').stop().slideDown(0);
+        }
+      })
+      // 巡逻管理下面的巡逻路线中的select选择框的移出事件
+      $('#patrolRoute').mouseleave(function () {
+        if (!$('#patrolRoute .select-list').is(':hidden')) {
+          $('#patrolRoute .select-list').stop().slideUp(0);
+        }
+      })
+      // 巡逻路线中区域选择的具体项的点击事件
+      $('.police-dispatching .police-container .police-container-patrol .select-list').off('click', 'li').on('click', 'li', function (event) {
+        var text = $(this).text();
+        $(this).parent().parent().prev().html(text + '<i></i>').attr('regionId', $(this).attr('regionId'));
+        $(this).parent().parent().stop().slideUp(0);
+      })
+      // 巡逻路线中的新增按钮的点击事件
+      $('.police-dispatching .police-container .police-container-patrol .main-content>li:eq(1) .add').off('click').click(function () {
+        var url = './popup/html/route-name-layer.html';
+        layui.use('layer', function () {
+          that.layuiLayer = layui.layer;
+          that.layuiLayer.config({
+            extend: 'myskin/route-name-layer.css'
+          });
+          that.layuiLayer.closeAll();
+          that.layuiLayer.open({
+            title: '路线名称及描述',
+            type: 2,
+            shadeClose: false,
+            shade: 0.3,
+            maxmin: false, //开启最大化最小化按钮
+            area: ['320px', '266px'],
+            offset: 'auto',
+            skin: 'route-name-layer',
+            content: url,
+            closeBtn: 1,
+            resize: false,
+            success: function (layero, index) {
+              layero.find('iframe').contents().find(".start-editing").off('click').click(function () {
+                // 区域名称 or 路线名称
+                var routeName = layero.find('iframe').contents().find('.route-name-layer-input').val();
+                var routeDescribe = layero.find('iframe').contents().find('.route-name-layer-textarea').val();
+                var peopleRealName = layero.find('iframe').contents().find('.route-personnel').val();
+                var pepleRealId = layero.find('iframe').contents().find('.route-personnel').attr('peopleid');
+                if (routeName == '') {
+                  that.layuiLayer.msg('请填写路线名称', {
+                    time: 1000
+                  })
+                  return
+                }
+
+                if (routeDescribe == '') {
+                  that.layuiLayer.msg('请填写路线描述', {
+                    time: 1000
+                  })
+                  return
+                }
+
+                if (pepleRealId == '') {
+                  that.layuiLayer.msg('请选择人员', {
+                    time: 1000
+                  })
+                  return
+                }
+                that.peopleRealName = peopleRealName;
+                that.pepleRealId = pepleRealId;
+
+                that.globalRegionName = routeName;
+                that.routeOrRegionDescribe = routeDescribe;
+                // // 开启,可以勾选线段
+                that.polygonFlag = true;
+                that.layuiLayer.close(index);
+
+              })
+            }
+          });
+        })
+
+      })
+      // 巡逻路线行点击事件
+      $('.police-container .police-container-patrol .main-content>li:eq(1) .table .tbody').off('click', 'tr').on('click', 'tr', function () {
+        var flyid = $(this).attr('flyid');
+        var flyname = $(this).attr('flyname');
+        var extent = null;
+        for (var i = 0; i < that.currentDrawing.length; i++) {
+          if (flyid == that.currentDrawing[i].id && flyname == that.currentDrawing[i].routeName) {
+            extent = that.currentDrawing[i].extent;
+          }
+        }
+        that._map.setExtent(extent.expand(1.5));
+      })
+      $('.police-container .police-container-patrol .main-content>li:eq(1) .table .tbody').off('click', 'tr td').on('click', 'tr td', function (event) {
+        if ($(this).index() == 4) {
+          event.stopPropagation();
+          return;
+
+        }
+      })
+      $('.police-container .police-container-patrol .main-content>li:eq(1) .table .tbody').off('click', 'input').on('click', 'input', function (event) {
+        event.stopPropagation();
+        var routeName = $(this).parent().parent().children('td:eq(2)').text();
+        var routeId = $(this).parent().parent().attr('flyid');
+        var peopleName = $(this).parent().parent().children('td:eq(1)').text();
+        var self = this;
+
+
+        var url = './popup/html/routename-and-peoplename.html?routeName=' + routeName + '&routeId=' + routeId + '&peopleName=' + peopleName;
+        layui.use('layer', function () {
+          that.layuiLayer = layui.layer;
+          that.layuiLayer.config({
+            extend: 'myskin/routename-and-peoplename.css'
+          });
+          that.layuiLayer.closeAll();
+          that.layuiLayer.open({
+            title: '路线巡逻人员',
+            type: 2,
+            shadeClose: false,
+            shade: 0.3,
+            maxmin: false, //开启最大化最小化按钮
+            area: ['320px', '172px'],
+            offset: 'auto',
+            skin: 'routename-and-peoplename',
+            content: url,
+            closeBtn: 1,
+            resize: false,
+            success: function (layero, index) {
+              layero.find('iframe').contents().find(".confirm-update").off('click').click(function () {
+
+                // 区域名称 or 路线名称
+                var peoplelayerName = layero.find('iframe').contents().find('.peoplename-update').val();
+                var peoplelayerId = layero.find('iframe').contents().find('.peoplename-update').attr('peopleid');
+
+                console.log(peoplelayerName, peoplelayerId);
+
+                if (peoplelayerName == peopleName) {
+                  that.layuiLayer.close(index);
+                  that.layuiLayer.msg('人员未更改!');
+                } else {
+                  $.ajax({
+                    url: 'https://web.byisf.com:18001/api/blade-jfpts/duty/duty/updatedtInfo',
+                    type: 'POST',
+                    data: {
+                      rid: routeId,
+                      snumber: peoplelayerId,
+                      sname: peoplelayerName
+                    },
+                    dataType: 'JSON',
+                    success: function (res) {
+                      if (res.code == 200) {
+                        that.layuiLayer.close(index);
+                        $(self).parent().parent().children('td:eq(1)').text(peoplelayerName);
+                        that.layuiLayer.msg('人员已更改!');
+                      }
+                    }
+                  })
+                }
+
+              })
+            }
+          });
+        })
+
+
+      })
+
+
+      // 查找按钮
+      $('.police-container .police-container-patrol .main-content>li:eq(1) .distribute-table-content .operation .query').off('click').click(function () {
+        var routerName = $('.police-container .police-container-patrol .main-content>li:eq(1) .distribute-table-content .route-name').val();
+        // if (routerName == '') {
+        //   layui.use('layer', function () {
+        //     layui.layer.msg('请填写区域名称', {
+        //       time: 1000
+        //     })
+        //   })
+        //   return
+        // }
+        that.getRouteInformation($('.police-dispatching .police-container .police-container-patrol .main-content>li:eq(1) .table .tbody tbody'), routerName);
+        $('.police-container .police-container-patrol .main-content>li:eq(1) .distribute-table-content .route-name').val('');
+      })
+
+    },
+    open: function () {
+      var that = this;
+
+      $("#tabcontainer").css("width", "360px");
+      $('#mapcontentClass').addClass('client-max-map'); //追加样式
+      AppEvent.dispatchAppEvent(AppEvent.APPLICATION_RESIZE, {});
+
+
+      document.oncontextmenu = function (event) {
+        event.preventDefault();
+      };
+
+      document.getElementById('mainMapWidget').onmousedown = function (event) {
+        if (event.button == 2) {
+          if (that.polygonData.length < 2) {
+            layui.use('layer', function () {
+              layui.layer.msg('不能形成区域,请继续划分!!!')
+            })
+            return;
+          }
+          if (that.polygonFlag == true) {
+            // 勾画最后一个点
+            var normalizedVal = webMercatorUtils.xyToLngLat(event.mapPoint.x, event.mapPoint.y);
+            that.polygonData.push([normalizedVal[0], normalizedVal[1]]);
+            // 声明空字符串,存储数据
+            var dataStr = '';
+            var data = null;
+            if (that.patrolIndex == 1) {
+              that.addPolyline(that.addPolygonEntitys, that.polygonData);
+              // 获取数据
+              data = that.addPolygonEntitys.graphics[0].geometry.paths[0];
+            } else {
+              that.addPolygon(that.addPolygonEntitys, that.polygonData);
+              // 获取数据
+              data = that.addPolygonEntitys.graphics[0].geometry.rings[0];
+            }
+
+
+            for (var i = 0; i < data.length; i++) {
+              dataStr += (data[i][0] + ' ' + data[i][1] + ',');
+            }
+            // 组装数据
+            dataStr = dataStr.substring(0, dataStr.length - 1);
+
+            if (that.tabIndex == 1) {
+              if (that.patrolIndex == 1) {
+                $.ajax({
+                  url: 'https://web.byisf.com:18001/api/blade-jfpts/routeIn/routein/insertlx',
+                  type: 'POST',
+                  dataType: 'JSON',
+                  data: {
+                    routeName: that.globalRegionName,
+                    regionId: $('#patrolRoute div:eq(0)').attr('regionid'),
+                    routeInfo: dataStr,
+                    remarks: that.routeOrRegionDescribe,
+                    creatName: ''
+                  },
+                  success: function (result) {
+                    if (result.code == 200) {
+                      that.addPolygonEntitys.clear();
+                      that.polygonData = [];
+                      that.getRouteInformation($('.police-dispatching .police-container .police-container-patrol .table .tbody tbody'), '');
+                      $.ajax({
+                        url: 'https://web.byisf.com:18001/api/blade-jfpts/duty/duty/insertduty',
+                        type: 'POST',
+                        dataType: 'JSON',
+                        data: {
+                          sname: that.peopleRealName,
+                          snumber: that.pepleRealId,
+                          rid: result.data,
+                          regionId: $('#patrolRoute div:eq(0)').attr('regionid'),
+                          type: 0
+                        },
+                        success: function (data) {
+                          if (data.code == 200) {
+                            alert(1);
+                          }
+                        }
+                      })
+                    }
+                  }
+                })
+
+
+                // that.peopleRealName = peopleRealName;
+                // that.pepleRealId = pepleRealId;
+              } else {
+                $.ajax({
+                  url: 'https://web.byisf.com:18001/api/blade-jfpts/regions/regions/insterqy',
+                  type: 'POST',
+                  dataType: 'JSON',
+                  data: {
+                    regionName: that.globalRegionName,
+                    coordinate: dataStr,
+                    remarks: that.routeOrRegionDescribe
+                  },
+                  success: function (result) {
+                    if (result.code == 200) {
+                      that.addPolygonEntitys.clear();
+                      that.polygonData = [];
+                      that.patrolArea($('.police-dispatching .police-container .police-container-patrol .table .tbody tbody'), '');
+                    }
+                  }
+                })
+              }
+            } else if (that.tabIndex == 2) {
+              $.ajax({
+                url: 'https://web.byisf.com:18001/api/blade-jfpts/enclosure/enclosure/insertes',
+                type: 'POST',
+                dataType: 'JSON',
+                data: {
+                  anumber: that.newElectronicFenceId.anumber,
+                  aname: that.newElectronicFenceId.aname,
+                  routeInfo: dataStr
+                },
+                success: function (result) {
+                  if (result.code == 200) {
+                    that.addPolygonEntitys.clear();
+                    that.polygonData = [];
+                    that.getSecurityPeople($('.police-dispatching .police-container .police-container-policeforce .table .tbody tbody'), '');
+                  }
+                }
+              })
+            }
+
+
+          }
+          that.polygonFlag = false;
+
+          // that.polygonData = [];
 
 
         }
-        , clearLayer: function () {
-            var that = this;
-            that._map.removeLayer(that.clusterLayer);
-            that.clusterLayer = null;
+      }
+
+
+      that.treatmentIndex = null;
+      that.tabIndex = 0;
+      $('.police-dispatching-tab li:eq(0)').addClass('on').siblings().removeClass('on');
+      $($('.police-container > div')[0]).stop().show().siblings().stop().hide();
+
+
+      $('.police-dispatching .police-container .distribute-district .select-list ul').empty();
+      $('.police-dispatching .police-container .distribute-district .select-list ul').append("<li key='addvcd' addvcd=''>全部</li>");
+      $.ajax({
+        url: 'https://web.byisf.com:18001/api/blade-jfpts/district/district/selectList',
+        type: 'POST',
+        dataType: 'JSON',
+        success: function (data) {
+          for (var i = 0; i < data.data.length; i++) {
+            $('.police-dispatching .police-container .distribute-district .select-list ul').append("<li key='addvcd' addvcd=" + data.data[i].addvcd + ">" + data.data[i].addvnm + "</li>");
+          }
+        }
+      })
+
+
+      layui.use('laydate', function () {
+        that.layuiLadate = layui.laydate;
+        //执行一个laydate实例 开始
+        that.layuiLadate.render({
+          elem: '#dispatchingStartTime', //指定元素
+          type: "datetime",
+          format: 'yyyy-MM-dd HH:mm',
+          btns: ['confirm'],
+          trigger: 'click',
+        });
+        // 结束
+        that.layuiLadate.render({
+          elem: '#dispatchingEndTime', //指定元素
+          type: "datetime",
+          format: 'yyyy-MM-dd HH:mm',
+          btns: ['confirm'],
+          trigger: 'click',
+        });
+      });
+
+      // that.getPoliceTable($('.police-container-distribute').find('.tbody tbody'), $('#dispatchingStartTime').val(), $('#dispatchingEndTime').val(), '', '', '');
+      that.clickHand();
+
+
+      $('.police-dispatching-tab li:eq(2)').trigger('click');
+
+    },
+    close: function () {
+
+      $("#tabcontainer").css("width", "66%");
+      $('#mapcontentClass').removeClass('client-max-map'); //删除样式
+
+      this.entitysData = [];
+
+      this.addEntitys.clear();
+
+      this.entityPolygonAll.clear();
+
+      this.modifyPolygon();
+
+      // 切换时清除新增点线面数组中保存得数据,与清除地图上得实体
+      this.polygonData = [];
+      this.addPolygonEntitys.clear();
+    },
+    // 鼠标点击事件
+    clickHand: function () {
+      var self = this;
+
+
+      self._map.onClick = mapClick;
+
+      // $('#mainMapWidget')[0].ondblclick = function (event) {
+      //   event.preventDefault();
+      //   // if ()
+      //   self.activateToolbar(event.graphic);
+      //   return false;
+      // };
+
+
+      function mapClick(evt) {
+        var normalizedVal = webMercatorUtils.xyToLngLat(evt.mapPoint.x, evt.mapPoint.y);
+
+
+        var y = self._map.toMap({
+          spatialReference: '4326',
+          type: "point",
+          x: evt.screenPoint.x,
+          y: evt.screenPoint.y,
+
+        });
+
+        if (self.tabIndex == 0) {
+          if (evt.graphic) {
+            var result = evt.graphic.geometry.entityData;
+            // var liText = evt.graphic.symbol.name;
+            self.policeDetails(result.id);
+          }
+        } else if (self.tabIndex == 1) {
+          if (self.patrolIndex == 1) {
+            // 编辑中的
+            if (self.polygonFlag == true) {
+              var normalizedVal = webMercatorUtils.xyToLngLat(evt.mapPoint.x, evt.mapPoint.y);
+              if (self.polygonData.length == 0) {
+                self.polygonData.push([normalizedVal[0], normalizedVal[1]]);
+                self.addPoint(self.addPolygonEntitys, normalizedVal[0], normalizedVal[1]);
+              } else {
+                self.polygonData.push([normalizedVal[0], normalizedVal[1]]);
+                self.addPolyline(self.addPolygonEntitys, self.polygonData);
+                return;
+              }
+            } else { // 不在编辑中
+              if (evt.graphic) { // 点击在图形上
+                // 保存当前点击得图形
+                // self.currentDrawing = evt.graphic;
+
+                self.modifyPolygon();
+
+                self.activateToolbar(evt.graphic);
+              } else { // 点击不在图形上
+
+                self.modifyPolygon()
+              }
+            }
+          } else {
+            // 编辑中的
+            if (self.polygonFlag == true) {
+              var normalizedVal = webMercatorUtils.xyToLngLat(evt.mapPoint.x, evt.mapPoint.y);
+              if (self.polygonData.length == 0) {
+                self.polygonData.push([normalizedVal[0], normalizedVal[1]]);
+                self.addPoint(self.addPolygonEntitys, normalizedVal[0], normalizedVal[1]);
+              } else if (self.polygonData.length == 1) {
+                self.polygonData.push([normalizedVal[0], normalizedVal[1]]);
+                self.addPolyline(self.addPolygonEntitys, self.polygonData);
+                return;
+              } else if (self.polygonData.length > 1) {
+                self.polygonData.push([normalizedVal[0], normalizedVal[1]]);
+                self.addPolygon(self.addPolygonEntitys, self.polygonData);
+              }
+            } else { // 不在编辑中
+              if (evt.graphic) { // 点击在图形上
+                // 保存当前点击得图形
+                // self.currentDrawing = evt.graphic;
+
+                self.modifyPolygon();
+
+                self.activateToolbar(evt.graphic);
+              } else { // 点击不在图形上
+
+                self.modifyPolygon()
+              }
+            }
+          }
+        } else if (self.tabIndex == 2) {
+          if (self.polygonFlag == true) {
+            var normalizedVal = webMercatorUtils.xyToLngLat(evt.mapPoint.x, evt.mapPoint.y);
+            if (self.polygonData.length == 0) {
+              self.polygonData.push([normalizedVal[0], normalizedVal[1]]);
+              self.addPoint(self.addPolygonEntitys, normalizedVal[0], normalizedVal[1]);
+            } else if (self.polygonData.length == 1) {
+              self.polygonData.push([normalizedVal[0], normalizedVal[1]]);
+              self.addPolyline(self.addPolygonEntitys, self.polygonData);
+              return;
+            } else if (self.polygonData.length > 1) {
+              self.polygonData.push([normalizedVal[0], normalizedVal[1]]);
+              self.addPolygon(self.addPolygonEntitys, self.polygonData);
+            }
+          } else {
+            if (evt.graphic) { // 点击在图形上
+              // 保存当前点击得图形
+              // self.currentDrawing = evt.graphic;
+
+              self.electronicFence();
+
+              self.activateToolbar(evt.graphic);
+            } else { // 点击不在图形上
+
+              self.electronicFence()
+            }
+          }
+
+
+          // self.equipmentDetails(result.id);
         }
 
-    });
-    return Widget;
+      }
+
+
+      // 提示信息
+      $(document).off('mousemove').mousemove(function (e) {
+        var y = e.clientY + 10;
+        var x = e.clientX + 20;
+
+        if (e.clientX < 40) {
+          var x = 40;
+        }
+
+        if (e.clientY < 42) {
+          y = 42;
+        }
+
+        if (e.clientY > ($(window).height() - 82)) {
+          y = ($(window).height() - 66);
+        }
+
+        if (e.clientX > ($(window).width() - 184)) {
+          x = ($(window).width() - 184);
+        }
+
+        if (self.tabIndex == 1 || self.tabIndex == 2) {
+
+          if (self.polygonFlag == true) {
+            $('.police-dispatching .tips').stop().show();
+
+            if (self.polygonData.length == 0) {
+              $('.police-dispatching .tips').text('单击左键开始绘制。');
+            } else {
+              if (e.clientY > ($(window).height() - 98)) {
+                y = ($(window).height() - 88);
+              }
+              $('.police-dispatching .tips').text('单击左键新增加点。单击右键完成绘制。');
+            }
+
+            $('.police-dispatching .tips').css({
+              'top': y,
+              'left': x,
+            })
+          } else {
+            $('.police-dispatching .tips').stop().hide();
+          }
+
+        } else {
+          $('.police-dispatching .tips').stop().hide();
+        }
+      })
+    },
+    // 警情详情弹框
+    /**
+     *
+     * @param {number} id 警情ID
+     */
+    policeDetails: function (id) {
+      var that = this;
+      var url = './popup/html/police-details.html?obj=' + id;
+      layui.use('layer', function () {
+        that.layuiLayer = layui.layer;
+        that.layuiLayer.config({
+          extend: 'myskin/police-details.css'
+        });
+        that.layuiLayer.close(that.layuiLayer.index);
+        that.layuiLayer.open({
+          title: '警情详情',
+          type: 2,
+          shadeClose: true,
+          shade: false,
+          maxmin: false, //开启最大化最小化按钮
+          area: ['500px', '400px'],
+          offset: 'auto',
+          skin: 'police-details',
+          content: url,
+          closeBtn: 1,
+        });
+      })
+    },
+    // 业主详情弹框
+    /**
+     *
+     * @param {number} id 警情ID
+     */
+    ownerDetails: function (id) {
+      var that = this;
+      var url = './popup/html/owner-details.html?id=' + id;
+      layui.use('layer', function () {
+        that.layuiLayer = layui.layer;
+        that.layuiLayer.config({
+          extend: 'myskin/owner-details.css'
+        });
+        that.layuiLayer.close(that.layuiLayer.index);
+        that.layuiLayer.open({
+          title: '业主详情',
+          type: 2,
+          shadeClose: true,
+          shade: false,
+          maxmin: false, //开启最大化最小化按钮
+          area: ['500px', '340px'],
+          offset: 'auto',
+          skin: 'owner-details',
+          content: url,
+          closeBtn: 1,
+        });
+      })
+    },
+    // 设备详情弹框
+    /**
+     *
+     * @param {number} id 设备ID
+     */
+    equipmentDetails: function (id) {
+      var that = this;
+      var url = './popup/html/equipment-details.html?obj=' + id;
+      layui.use('layer', function () {
+        that.layuiLayer = layui.layer;
+        that.layuiLayer.config({
+          extend: 'myskin/equipment-details.css'
+        });
+        that.layuiLayer.close(that.layuiLayer.index);
+        that.layuiLayer.open({
+          title: '警情详情',
+          type: 2,
+          shadeClose: true,
+          shade: false,
+          maxmin: false, //开启最大化最小化按钮
+          area: ['520px', '320px'],
+          offset: 'auto',
+          skin: 'equipment-details',
+          content: url,
+          closeBtn: 1,
+        });
+      })
+    },
+    // 获取当前时间,以及昨天现在的时间
+    getTime: function getTime() {
+      var timestamp = Date.parse(new Date());
+
+      // 当前时间
+      var currentTime = new Date(timestamp);
+      // 年
+      var currentY = currentTime.getFullYear();
+      // 月
+      var currentM = currentTime.getMonth() + 1 < 10 ? '0' + (currentTime.getMonth() + 1) : currentTime.getMonth() + 1;
+      // 日
+      var currentD = currentTime.getDate() < 10 ? '0' + currentTime.getDate() : currentTime.getDate();
+      // 时
+      var currentH = currentTime.getHours() < 10 ? '0' + currentTime.getHours() : currentTime.getHours();
+      // 分
+      var currentDd = currentTime.getMinutes() < 10 ? '0' + currentTime.getMinutes() : currentTime.getMinutes();
+      // 明天
+      var tomorrowTime = new Date(timestamp - 60 * 60 * 24 * 1000);
+      // 年
+      var tomorrowY = tomorrowTime.getFullYear();
+      // 月
+      var tomorrowM = tomorrowTime.getMonth() + 1 < 10 ? '0' + (tomorrowTime.getMonth() + 1) : tomorrowTime.getMonth() + 1;
+      // 日
+      var tomorrowD = tomorrowTime.getDate() < 10 ? '0' + tomorrowTime.getDate() : tomorrowTime.getDate();
+      // 时
+      var tomorrowH = tomorrowTime.getHours() < 10 ? '0' + tomorrowTime.getHours() : tomorrowTime.getHours();
+      // 分
+      var tomorrowDd = tomorrowTime.getMinutes() < 10 ? '0' + tomorrowTime.getMinutes() : tomorrowTime.getMinutes();
+      return {
+        current: currentY + '-' + currentM + '-' + currentD + ' ' + currentH + ':' + currentDd,
+        tomorrow: tomorrowY + '-' + tomorrowM + '-' + tomorrowD + ' ' + tomorrowH + ':' + tomorrowDd,
+        month: currentM + currentD
+      };
+    },
+    // 获取警情信息列表
+    /**
+     *
+     * @param {object} dom jq对象
+     * @param {string} beginTime 开始时间
+     * @param {string} endTime 结束时间
+     * @param {*} waringType 警情的类别
+     */
+    getPoliceTable: function (dom, beginTime, endTime, waringType, addvcd, type) {
+      dom.empty();
+      var that = this;
+      $.ajax({
+        url: 'https://web.byisf.com:18001/api/blade-jfpts/jingdan/jingdan/selectList',
+        type: 'POST',
+        dataType: 'JSON',
+        data: {
+          beginTime: beginTime,
+          endTime: endTime,
+          waringType: waringType,
+          addvcd: addvcd,
+          type: type
+        },
+        success: function (data) {
+          var result = data.data;
+          var str = '';
+          that.entitysData = [];
+          that.addEntitys.clear();
+          for (var a, time, t, e, y, h, i = 0; i < result.length; i++) {
+
+            if (result[i].type != 1) {
+              that.createEntitys(that.addEntitys, that.entitysData, '警情信息', {
+                lgtd: result[i].jd,
+                lttd: result[i].wd,
+                id: result[i].id
+              }, result[i].jd, result[i].wd, './images/jingbaored.png');
+
+
+              t = result[i].galarmTime.substr(0, 10);
+              e = result[i].galarmTime.substr(11);
+              time = t + '&nbsp;' + e;
+              y = result[i].galarmTime.substr(5, 5);
+              h = result[i].galarmTime.substr(11, 5);
+              a = Number(i) + 1;
+              str += '<tr term-list=' + result[i].id + ' lgtd=' + result[i].jd + ' lttd=' + result[i].wd + '>';
+              str += '<td>' + a + '</td>';
+              str += '<td title=' + result[i].addvnm + '>' + result[i].addvnm + '</td>';
+              str += '<td title=' + (result[i].type == 2 ? '处理中' : '待处理') + '>' + (result[i].type == 2 ? '处理中' : '待处理') + '</td>';
+              str += "<td><a href='javascript:;' title=" + time + ">" + y + ' ' + h + "</a></td>";
+              if (result[i].type == 2) {
+                str += "<td class='operation'> <input class='follow-up' type='button' value='跟进' term-list=" + result[i].id + "> </td>";
+              } else {
+                str += "<td class='operation'> <input class='edit' type='button' value='编辑' term-list=" + result[i].id + "> </td>";
+              }
+              str += '</tr>';
+              dom.append(str);
+              str = '';
+
+            }
+
+          }
+
+          for (var i = 0; i < 1000; i++) {
+            var dd = Math.random();
+            var cc = Math.random();
+          }
+        }
+      })
+    },
+    // 获取区域信息列表
+    patrolArea: function (dom, regionName) {
+      dom.empty();
+      var that = this;
+      that.currentDrawing = [];
+      that.entityPolygonAll.clear();
+      $.ajax({
+        url: 'https://web.byisf.com:18001/api/blade-jfpts/regions/regions/selectList',
+        type: 'POST',
+        dataType: 'JSON',
+        data: {
+          regionName: regionName
+        },
+        success: function (data) {
+          var result = data.data;
+          var str = '';
+          var entityArr = [];
+          var objId = {};
+          var entityData = '';
+          for (var i = 0; i < result.length; i++) {
+            entityArr = [];
+            objId = {};
+            entityData = result[i].coordinate.match(/\(([^)]*)\)/);
+            // 此时result=["(dsfasjfj3124123)", "dsfasjfj3124123"];
+            if (entityData && entityData != '') {
+              entityData = entityData[1].split(',');
+              for (var j = 0; j < entityData.length; j++) {
+                entityArr.push([Number(entityData[j].split(' ')[0]), Number(entityData[j].split(' ')[1])]);
+              }
+            }
+            objId.id = result[i].id;
+            objId.regionId = result[i].regionId;
+            objId.regionName = result[i].regionName;
+            objId.remarks = result[i].remarks;
+
+            that.addPolygonAll(that.entityPolygonAll, entityArr, objId);
+
+            str += "<tr flyid=" + result[i].id + " flyname=" + result[i].regionName + "> <td>" + (Number(i) + 1) + "</td> <td>" + result[i].regionName + "</td> <td>" + result[i].ttime + "</td> </tr>";
+            dom.append(str);
+            str = '';
+          }
+        }
+      })
+    },
+    // 获取路线信息列表
+    getRouteInformation: function (dom, routeName) {
+      dom.empty();
+      var that = this;
+      that.currentDrawing = [];
+      that.entityPolygonAll.clear();
+      $.ajax({
+        url: 'https://web.byisf.com:18001/api/blade-jfpts/routeIn/routein/selectList',
+        type: 'POST',
+        dataType: 'JSON',
+        data: {
+          routeName: routeName
+        },
+        success: function (data) {
+          var result = data.data;
+          var str = '';
+          var entityArr = [];
+          var objId = {};
+          var entityData = '';
+          for (var i = 0; i < result.length; i++) {
+            entityArr = [];
+            objId = {};
+            entityData = result[i].routeInfo.match(/\(([^)]*)\)/);
+            // 此时result=["(dsfasjfj3124123)", "dsfasjfj3124123"];
+            if (entityData && entityData != '') {
+              entityData = entityData[1].split(',');
+              for (var j = 0; j < entityData.length; j++) {
+                entityArr.push([Number(entityData[j].split(' ')[0]), Number(entityData[j].split(' ')[1])]);
+              }
+            }
+            objId.id = result[i].id;
+            objId.regionId = result[i].regionId;
+            objId.routeName = result[i].routeName;
+            objId.remarks = result[i].remarks;
+            that.addPolygonAll(that.entityPolygonAll, entityArr, objId);
+            str += "<tr flyid=" + result[i].id + " flyname=" + result[i].routeName + "> <td>" + (Number(i) + 1) + "</td> <td>" + result[i].real_name + "</td> <td>" + result[i].routeName + "</td> <td> <a href='javascript:;' title=" + result[i].rtime + ">" + result[i].rtime.substr(5, 11) + "</a></td> <td><input type='button' value='编辑'></td> </tr>";
+            dom.append(str);
+            str = '';
+          }
+        }
+      })
+    },
+    // 获取保安人员信息列表
+    getSecurityPeople: function (dom, deviceType) {
+      dom.empty();
+      var that = this;
+      that.currentDrawing = [];
+      that.entityPolygonAll.clear();
+
+      $.ajax({
+        url: 'https://web.byisf.com:18001/api/blade-jfpts/alarm/alarm/queryBa',
+        type: 'POST',
+        dataType: 'JSON',
+        success: function (data) {
+          var result = data.data;
+          var str = '';
+          that.entitysData = [];
+          that.addEntitys.clear();
+          var entityArr = [];
+          var objId = {};
+          for (var a, i = 0; i < result.length; i++) {
+
+
+            that.createEntitys(that.addEntitys, that.entitysData, '出警信息', {
+              lgtd: result[i].jd,
+              lttd: result[i].wd,
+              id: result[i].id
+            }, result[i].jd, result[i].wd, './images/security.png');
+            entityArr = [];
+            objId = {};
+
+            a = Number(i) + 1;
+            str += "<tr term-snumber=" + result[i].CODE + " lgtd=" + result[i].jd + " lttd=" + result[i].wd + ">";
+            str += '<td>' + a + '</td>';
+            str += '<td title=' + result[i].CODE + '>' + result[i].CODE + '</td>';
+            str += '<td title=' + result[i].real_name + '>' + result[i].real_name + '</td>';
+            str += '<td title=' + result[i].phone + '>' + result[i].phone + '</td>';
+            str += "<td> <input type='button' value='编辑' resultid=" + result[i].id + "> </td>";
+            str += '</tr>';
+            dom.append(str);
+            str = '';
+
+
+            // 此时result=["(dsfasjfj3124123)", "dsfasjfj3124123"];
+
+            entityArr.push([Number(result[i].jd), Number(result[i].wd)]);
+
+            objId.id = result[i].id;
+            objId.anumber = result[i].CODE;
+            objId.aname = result[i].real_name;
+
+            that.addPolygonAll(that.entityPolygonAll, entityArr, objId);
+          }
+
+
+        }
+      })
+      // $.ajax({
+      //     url: 'https://web.byisf.com:18001/api/blade-jfpts/security/security/selectList',
+      //     type: 'POST',
+      //     dataType: 'JSON',
+      //     success: function (data) {
+      //         var result = data.data;
+      //         var str = '';
+      //         that.entitysData = [];
+      //         that.addEntitys.clear();
+      //         var entityArr = [];
+      //         var objId = {};
+      //         var entityData = '';
+      //         for (var a, i = 0; i < result.length; i++) {
+
+
+      //             that.createEntitys(that.addEntitys, that.entitysData, '出警信息', {
+      //                 lgtd: result[i].jd,
+      //                 lttd: result[i].wd,
+      //                 id: result[i].id
+      //             }, result[i].jd, result[i].wd, './images/security.png');
+      //             entityArr = [];
+      //             objId = {};
+      //             entityData = result[i].coordinate.match(/\(([^)]*)\)/);
+
+      //             a = Number(i) + 1;
+      //             str += "<tr term-snumber=" + result[i].snumber + " lgtd=" + result[i].jd + " lttd=" + result[i].wd + ">";
+      //             str += '<td>' + a + '</td>';
+      //             str += '<td title=' + result[i].snumber + '>' + result[i].snumber + '</td>';
+      //             str += '<td title=' + result[i].sname + '>' + result[i].sname + '</td>';
+      //             str += '<td title=' + result[i].phone + '>' + result[i].phone + '</td>';
+      //             str += "<td> <input type='button' value='编辑' resultid=" + result[i].id + "> </td>";
+      //             str += '</tr>';
+      //             dom.append(str);
+      //             str = '';
+
+
+      //             // 此时result=["(dsfasjfj3124123)", "dsfasjfj3124123"];
+      //             if (entityData && entityData != '') {
+      //                 entityData = entityData[1].split(',');
+      //                 for (var j = 0; j < entityData.length; j++) {
+      //                     entityArr.push([Number(entityData[j].split(' ')[0]), Number(entityData[j].split(' ')[1])]);
+      //                 }
+      //             }
+      //             objId.id = result[i].id;
+      //             objId.anumber = result[i].snumber;
+      //             objId.aname = result[i].sname;
+
+      //             that.addPolygonAll(that.entityPolygonAll, entityArr, objId);
+      //         }
+
+
+      //     }
+      // })
+    },
+    // 创建实体图层
+    createEntitys: function (entitys, entityContent, name, item, lgtd, lttd, outlineColors) {
+
+      var symbol = new esri.symbol.PictureMarkerSymbol(outlineColors, 26, 26);
+      symbol.name = name;
+      var pt = new Point(lgtd, lttd, new esri.SpatialReference({
+        wkid: 4326
+      }));
+      pt.entityData = item;
+      var graphic = new esri.Graphic(pt, symbol);
+      entitys.add(graphic);
+
+
+      entityContent.push(item);
+    },
+    addPoint: function (entitys, lgtd, lttd) {
+      var symbol = new esri.symbol.PictureMarkerSymbol('./images/real-time-callPolice.png', 10, 10);
+      var pt = new Point(lgtd, lttd, new SpatialReference({
+        wkid: 4326
+      }));
+      var graphic = new esri.Graphic(pt, symbol);
+      entitys.add(graphic);
+    },
+    addPolyline: function (entitys, path) {
+      entitys.clear();
+      var polylineSymbol = new SimpleLineSymbol();
+      polylineSymbol.color = [255, 0, 0, 1];
+      polylineSymbol.width = 4;
+      var polyline = new Polyline({
+        "paths": [path],
+        "spatialReference": {
+          "wkid": 4326
+        }
+      });
+
+      entitys.add(new Graphic(polyline, polylineSymbol));
+    },
+    addPolygon: function (entitys, rings) {
+      entitys.clear();
+      var polygonSymbol = new SimpleFillSymbol();
+      polygonSymbol.color = [24, 255, 243, 0.411];
+      var polygon = new Polygon({
+        "rings": [rings],
+        "spatialReference": {
+          "wkid": 4326
+        }
+      });
+
+      entitys.add(new Graphic(polygon, polygonSymbol));
+    },
+
+    activateToolbar: function (graphic) {
+      var tool = 0;
+
+      this.editToolbar = new Edit(this._map);
+
+      // if (registry.byId("tool_move").checked) {
+      tool = tool | Edit.MOVE;
+      // }
+      // if (registry.byId("tool_vertices").checked) {
+      tool = tool | Edit.EDIT_VERTICES;
+      // }
+      // if (registry.byId("tool_scale").checked) {
+      tool = tool | Edit.SCALE;
+      // }
+      // if (registry.byId("tool_rotate").checked) {
+      tool = tool | Edit.ROTATE;
+      // }
+      // enable text editing if a graphic uses a text symbol
+      // if ( graphic.symbol.declaredClass === "esri.symbol.TextSymbol" ) {
+      tool = tool | Edit.EDIT_TEXT;
+      // }
+
+      var options = {
+        allowAddVertices: true,
+        allowDeleteVertices: true,
+        uniformScaling: true
+      };
+      this.editToolbar.activate(tool, graphic, options);
+
+    },
+
+    addPolygonAll: function (entitys, rings, objId) {
+      // entitys.clear();
+      var graphic = null;
+      if (this.patrolIndex == 1) {
+        var polylineSymbol = new SimpleLineSymbol();
+        polylineSymbol.color = [255, 0, 0, 1];
+        polylineSymbol.width = 4;
+        var polyline = new Polyline({
+          "paths": [rings],
+          "spatialReference": {
+            "wkid": 4326
+          }
+        });
+
+        graphic = new Graphic(polyline, polylineSymbol)
+
+      } else {
+        var polygonSymbol = new SimpleFillSymbol();
+        polygonSymbol.color = [24, 255, 243, 0.411];
+
+        var polygon = new Polygon({
+          "rings": [rings],
+          "spatialReference": {
+            "wkid": 4326
+          }
+        });
+
+        graphic = new Graphic(polygon, polygonSymbol);
+
+      }
+
+      graphic.objId = objId;
+
+      if (this.tabIndex == 1) {
+        if (this.patrolIndex == 1) {
+          this.currentDrawing.push({
+            id: objId.id,
+            regionId: objId.regionId,
+            routeName: objId.routeName,
+            remarks: objId.remarks,
+            extent: graphic.geometry.getExtent()
+          });
+        } else {
+          this.currentDrawing.push({
+            id: objId.id,
+            regionId: objId.regionId,
+            regionName: objId.regionName,
+            remarks: objId.remarks,
+            extent: graphic.geometry.getExtent()
+          });
+        }
+      } else {
+        this.currentDrawing.push({
+          id: objId.id,
+          aname: objId.aname,
+          anumber: objId.anumber,
+          extent: graphic.geometry.getExtent()
+        });
+      }
+
+
+      entitys.add(graphic);
+    },
+
+    modifyPolygon: function () {
+      var self = this;
+      if (self.editToolbar != null) {
+
+        if (self.patrolIndex == 1) {
+          var polygon = self.editToolbar.getCurrentState();
+
+
+          for (var i = 0; i < self.currentDrawing.length; i++) {
+
+            if (self.currentDrawing[i].id == polygon.graphic.objId.id) {
+              self.currentDrawing[i].extent = polygon.graphic.geometry.getExtent();
+            }
+
+          }
+
+
+          self.editToolbar.deactivate();
+
+          self.editToolbar = null;
+
+
+          // 声明空字符串,存储数据
+          var dataStr = '';
+
+          // 获取数据
+          var data = polygon.graphic.geometry.paths[0];
+
+
+          for (var i = 0; i < data.length; i++) {
+            dataStr += (data[i][0] + ' ' + data[i][1] + ',');
+          }
+          // 组装数据
+          dataStr = dataStr.substring(0, dataStr.length - 1);
+
+          $.ajax({
+            url: 'https://web.byisf.com:18001/api/blade-jfpts/routeIn/routein/updatelx',
+            type: 'POST',
+            dataType: 'JSON',
+            data: {
+              id: polygon.graphic.objId.id,
+              regionId: polygon.graphic.objId.regionId,
+              routeName: polygon.graphic.objId.routeName,
+              routeInfo: dataStr,
+              remarks: polygon.graphic.objId.remarks,
+            },
+            success: function (result) {
+              if (result.code == 200) {
+
+              }
+            }
+          })
+        } else {
+          var polygon = self.editToolbar.getCurrentState();
+
+
+          for (var i = 0; i < self.currentDrawing.length; i++) {
+
+            if (self.currentDrawing[i].id == polygon.graphic.objId.id) {
+              self.currentDrawing[i].extent = polygon.graphic.geometry.getExtent();
+            }
+
+          }
+
+
+          self.editToolbar.deactivate();
+
+          self.editToolbar = null;
+
+
+          // 声明空字符串,存储数据
+          var dataStr = '';
+
+          // 获取数据
+          var data = polygon.graphic.geometry.rings[0];
+
+
+          for (var i = 0; i < data.length; i++) {
+            dataStr += (data[i][0] + ' ' + data[i][1] + ',');
+          }
+          // 组装数据
+          dataStr = dataStr.substring(0, dataStr.length - 1);
+
+          $.ajax({
+            url: 'https://web.byisf.com:18001/api/blade-jfpts/regions/regions/updateqy',
+            type: 'POST',
+            dataType: 'JSON',
+            data: {
+              id: polygon.graphic.objId.id,
+              regionId: polygon.graphic.objId.regionId,
+              regionName: polygon.graphic.objId.regionName,
+              coordinate: dataStr,
+              remarks: polygon.graphic.objId.remarks
+            },
+            success: function (result) {
+              if (result.code == 200) {
+
+              }
+            }
+          })
+        }
+
+
+      }
+    },
+
+    electronicFence: function () {
+      var self = this;
+      if (self.editToolbar != null) {
+        var polygon = self.editToolbar.getCurrentState();
+
+
+        for (var i = 0; i < self.currentDrawing.length; i++) {
+
+          if (self.currentDrawing[i].id == polygon.graphic.objId.id) {
+            self.currentDrawing[i].extent = polygon.graphic.geometry.getExtent();
+          }
+
+        }
+
+
+        self.editToolbar.deactivate();
+
+        self.editToolbar = null;
+
+
+        // 声明空字符串,存储数据
+        var dataStr = '';
+
+        // 获取数据
+        var data = polygon.graphic.geometry.rings[0];
+
+
+        for (var i = 0; i < data.length; i++) {
+          dataStr += (data[i][0] + ' ' + data[i][1] + ',');
+        }
+        // 组装数据
+        dataStr = dataStr.substring(0, dataStr.length - 1);
+
+        $.ajax({
+          url: 'https://web.byisf.com:18001/api/blade-jfpts/enclosure/enclosure/updatee',
+          type: 'POST',
+          dataType: 'JSON',
+          data: {
+            id: polygon.graphic.objId.id,
+            aname: polygon.graphic.objId.aname,
+            anumber: polygon.graphic.objId.anumber,
+            routeInfo: dataStr
+          },
+          success: function (result) {
+            if (result.code == 200) {
+
+            }
+          }
+        })
+      }
+    },
+
+    //聚合图层事件
+    flareClusterLayer: function (datas) {
+
+      var that = this;
+
+      var preClustered = false;
+      var displaySingleFlaresAtCount = 10;
+      var areaDisplayMode = "";
+      // var allData = JSON.parse(DATA);
+      // DataManager.setData(allData);
+
+      //init the layer, more options are available and explained in the cluster layer constructor
+      that.clusterLayer = new FlareClusterLayer({
+        id: "flare-cluster-layer",
+        spatialReference: new esri.SpatialReference({
+          "wkid": 4326
+        }),
+        subTypeFlareProperty: "facilityType",
+        singleFlareTooltipProperty: "name",
+        displaySubTypeFlares: true,
+        displaySingleFlaresAtCount: displaySingleFlaresAtCount,
+        flareShowMode: "mouse",
+        preClustered: preClustered,
+        clusterRatio: 75,
+        clusterAreaDisplay: areaDisplayMode,
+        clusteringBegin: function () {
+          console.log("clustering begin");
+        },
+        clusteringComplete: function () {
+          console.log("clustering complete");
+        }
+      });
+
+      //set up a class breaks renderer to render different symbols based on the cluster count. Use the required clusterCount property to break on.
+      var defaultSym = new PictureMarkerSymbol("./images/ceshi.png", 32, 32).setOffset(0, 15);
+      var renderer = new ClassBreaksRenderer(defaultSym, "clusterCount");
+      var xlSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 32, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([200, 52, 59, 0.8]), 1), new dojo.Color([250, 65, 74, 0.8]));
+      var lgSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 28, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([41, 163, 41, 0.8]), 1), new dojo.Color([51, 204, 51, 0.8]));
+      var mdSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 24, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([82, 163, 204, 0.8]), 1), new dojo.Color([102, 204, 255, 0.8]));
+      var smSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 22, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([230, 184, 92, 0.8]), 1), new dojo.Color([255, 204, 102, 0.8]));
+      renderer.addBreak(0, 19, smSymbol);
+      renderer.addBreak(20, 150, mdSymbol);
+      renderer.addBreak(151, 1000, lgSymbol);
+      renderer.addBreak(1001, Infinity, xlSymbol);
+
+      that.clusterLayer.setRenderer(renderer); //use standard setRenderer.
+
+      //set up a popup template
+      var template = new PopupTemplate({
+        title: "{name}",
+        fieldInfos: [{
+            fieldName: "facilityType",
+            label: "Facility Type",
+            visible: true
+          },
+          {
+            fieldName: "postcode",
+            label: "Post Code",
+            visible: true
+          },
+          {
+            fieldName: "isOpen",
+            label: "Opening Hours",
+            visible: true
+          }
+        ]
+      });
+
+      //clusterLayer.infoTemplate = template;
+      that._map.infoWindow.titleInBody = false;
+
+      that._map.addLayer(that.clusterLayer);
+
+      //var data = DataManager.getData();
+      that.clusterLayer.addData(datas);
+
+
+    },
+    clearLayer: function () {
+      var that = this;
+      that._map.removeLayer(that.clusterLayer);
+      that.clusterLayer = null;
+    }
+
+  });
+  return Widget;
 });
diff --git a/public/map/widgets/analysisAndJudgment/AnalysisAndJudgment.js b/public/map/widgets/analysisAndJudgment/AnalysisAndJudgment.js
index 4d851f6..94233c8 100644
--- a/public/map/widgets/analysisAndJudgment/AnalysisAndJudgment.js
+++ b/public/map/widgets/analysisAndJudgment/AnalysisAndJudgment.js
@@ -684,22 +684,19 @@
             dom.empty();
             var that = this;
             $.ajax({
-                url: 'https://web.byisf.com:18001/api/blade-jfpts/jingdan/jingdan/selectList',
-                type: 'POST',
+                url: "https://web.byisf.com:18001/api/blade-jfpts/alarm/alarm/page?current=1&size=99999&waringType=&beginTime=" + beginTime + "&endTime=" +endTime +"&province=36&city=3601&district=" + addvcd,
+                type: 'get',
                 dataType: 'JSON',
-                data: {
-                    beginTime: beginTime,
-                    endTime: endTime,
-                    waringType: waringType,
-                    district: addvcd,
-                    type: ''
-                },
                 success: function (data) {
-                    var result = data.data;
+                    var result = data.data.records;
                     var str = '';
                     that.entitysData = [];
                     that.analysisAddEntitys.clear();
                     for (var a, time, t, e, y, h, i = 0; i < result.length; i++) {
+
+                        if (result[i].waringType == "紧急求救") {
+                            result[i].waringType = "一键求助"
+                        }
 
                         that.createEntitysAnalysis(that.analysisAddEntitys, that.entitysData, '警情信息', {
                             lgtd: result[i].jd,
@@ -707,17 +704,16 @@
                             id: result[i].id
                         }, result[i].jd, result[i].wd, './images/police-situation.png');
 
-
-                        t = result[i].galarmTime.substr(0, 10);
-                        e = result[i].galarmTime.substr(11);
+                        t = result[i].alarmTime.substr(0, 10);
+                        e = result[i].alarmTime.substr(11);
                         time = t + '&nbsp;' + e;
-                        y = result[i].galarmTime.substr(5, 5);
-                        h = result[i].galarmTime.substr(11, 5);
+                        y = result[i].alarmTime.substr(5, 5);
+                        h = result[i].alarmTime.substr(11, 5);
                         a = Number(i) + 1;
                         str += '<tr term-list=' + result[i].id + '>';
                         str += '<td>' + a + '</td>';
                         str += '<td title=' + result[i].waringType + '>' + result[i].waringType + '</td>';
-                        str += '<td title=' + result[i].addvnm + '>' + result[i].addvnm + '</td>';
+                        str += '<td title=' + result[i].alarmPeople + '>' + result[i].alarmPeople + '</td>';
                         str += "<td><a href='javascript:;' title=" + time + ">" + y + ' ' + h + "</a></td>";
                         str += "<td class='location'> <input type='button' value='定位'" + ' lgtd=' + result[i].jd + ' lttd=' + result[i].wd + "></td>";
                         str += '</tr>';
diff --git a/public/map/widgets/analysisAndJudgment/AnalysisAndJudgment1.css b/public/map/widgets/analysisAndJudgment/AnalysisAndJudgment1.css
deleted file mode 100644
index 68189ce..0000000
--- a/public/map/widgets/analysisAndJudgment/AnalysisAndJudgment1.css
+++ /dev/null
@@ -1,361 +0,0 @@
-/* .analysis-and-judgment {
-    display: none;
-} */
-
-div[open-li='analysis-and-judgment'] {
-    box-sizing: border-box;
-}
-
-div[open-li='analysis-and-judgment']>ul {
-    display: flex;
-    height: 36px;
-    line-height: 36px;
-    border: 1px solid #3680C1;
-}
-
-div[open-li='analysis-and-judgment']>ul>li {
-    flex: 1;
-    font-size: 18px;
-    text-align: center;
-    color: #fff;
-    cursor: pointer;
-}
-
-div[open-li='analysis-and-judgment']>ul>li.on {
-    color: #15a2fe;
-    background: rgb(2, 63, 82);
-}
-
-/* 分析研判内容容器 */
-.analysis-container {
-    position: relative;
-    height: calc(100% - 38px);
-    font-size: 14px;
-}
-
-.analysis-container>div {
-    width: 100%;
-    height: 100%;
-    position: absolute;
-    top: 0;
-    left: 0;
-}
-
-.analysis-container>div:nth-child(2) {
-    display: none;
-}
-
-.analysis-container>div:nth-child(3) {
-    display: none;
-}
-
-/* 类别选择,级别选择,以及热力图 */
-.analysis-container .analysis-category,
-.analysis-container .analysis-level {
-    width: 100%;
-    height: 40px;
-    line-height: 40px;
-    padding: 4px 6px 0 6px;
-    box-sizing: border-box;
-    color: #fff;
-}
-
-.analysis-container .analysis-category>ul,
-.analysis-container .analysis-level>ul {
-    display: flex;
-    height: 36px;
-    line-height: 36px;
-    align-items: center;
-}
-
-.analysis-container .analysis-category>ul>li,
-.analysis-container .analysis-level>ul>li {
-    height: 36px;
-    line-height: 36px;
-}
-
-.analysis-container .analysis-category>ul>li:first-child,
-.analysis-container .analysis-level>ul>li:first-child {
-    position: relative;
-    padding-left: 10px;
-    flex: 6;
-    color: #15a2fe;
-    background: rgb(12, 25, 49);
-    border: 1px solid #3680C1;
-    box-sizing: border-box;
-}
-
-.analysis-container .analysis-category>ul>li:last-child,
-.analysis-container .analysis-level>ul>li:last-child {
-    flex: 2;
-    text-align: center;
-}
-
-.analysis-container .analysis-category>ul>li:last-child input,
-.analysis-container .analysis-level>ul>li:last-child input {
-    vertical-align: middle;
-}
-
-/* 类别选择中得下拉框 */
-.analysis-container .analysis-category>ul>li:first-child div:first-child,
-.analysis-container .analysis-level>ul>li:first-child div:first-child {
-    position: absolute;
-    top: 0;
-    left: 40px;
-    width: calc(100% - 40px);
-    height: 34px;
-    color: #fff;
-    padding-left: 10px;
-    box-sizing: border-box;
-    cursor: pointer;
-
-}
-
-.analysis-container .analysis-category>ul>li:first-child div:first-child i,
-.analysis-container .analysis-level>ul>li:first-child div:first-child i {
-    display: block;
-    position: absolute;
-    top: 50%;
-    right: 10px;
-    transform: translate(0, -50%);
-    width: 16px;
-    height: 16px;
-    background: url('../../images/select-bg.png') repeat;
-    background-size: 100% 100%;
-}
-
-.analysis-container .analysis-category>ul>li:first-child div:last-child,
-.analysis-container .analysis-level>ul>li:first-child div:last-child {
-    display: none;
-    position: absolute;
-    top: 35px;
-    left: -1px;
-    z-index: 10;
-    width: calc(100% + 2px);
-}
-
-
-.analysis-container .analysis-category>ul>li:first-child ul,
-.analysis-container .analysis-level>ul>li:first-child ul {
-    display: flex;
-    flex-direction: column;
-    width: 100%;
-    max-height: 300px;
-    height: auto;
-    overflow-y: auto;
-    overflow-x: hidden;
-    border: 1px solid #3680C1;
-    border-top: none;
-    box-sizing: border-box;
-
-}
-
-.analysis-container .analysis-category>ul>li:first-child ul li,
-.analysis-container .analysis-level>ul>li:first-child ul li {
-    flex: 1;
-    padding-left: 10px;
-    height: 34px;
-    border-top: 1px solid #3680C1;
-    background: rgb(12, 25, 49);
-    color: #fff;
-    box-sizing: border-box;
-    cursor: pointer;
-}
-
-.analysis-container .analysis-category>ul>li:first-child ul li:hover,
-.analysis-container .analysis-level>ul>li:first-child ul li:hover {
-    color: #15a2fe;
-    background: rgb(2, 63, 82);
-}
-
-.analysis-container .analysis-category>ul>li:first-child ul li:first-child,
-.analysis-container .analysis-level>ul>li:first-child ul li:first-child {
-    border: none;
-}
-
-/* 时间选择 */
-.analysis-container .analysis-selection-criteria {
-    display: flex;
-    padding: 4px 6px;
-    width: 100%;
-    height: 40px;
-    line-height: 32px;
-    color: #fff;
-    box-sizing: border-box;
-}
-
-.analysis-container .analysis-selection-criteria input {
-    border: 1px solid #3680C1;
-}
-
-.analysis-container .analysis-selection-criteria input[type='text'] {
-    width: 0;
-    flex: 5;
-    padding: 0 4px;
-    background: rgb(12, 25, 49);
-    color: #fff;
-    cursor: pointer;
-    background: url('../../images/laydata-bg.png') no-repeat;
-    background-size: 18px 16px;
-    background-position: 98% center;
-}
-
-.analysis-container .analysis-selection-criteria input[type='button'] {
-    width: 0;
-    flex: 2;
-    color: #fff;
-    background: rgb(2, 63, 82);
-    cursor: pointer;
-}
-
-/* 显示信息得表格 */
-.analysis-container .analysis-container-police .analysis-table-content {
-    height: calc(100% - 80px);
-}
-
-.analysis-container .analysis-container-owner .analysis-table-content {
-    margin-top: 4px;
-    height: calc(100% - 84px);
-}
-
-.analysis-container .analysis-container-equipment .analysis-table-content {
-    margin-top: 4px;
-    height: calc(100% - 44px);
-}
-
-/*定义滚动条高宽及背景
- 高宽分别对应横竖滚动条的尺寸*/
-::-webkit-scrollbar {
-    width: 6px;
-    background-color: #F5F5F5;
-}
-
-/*定义滚动条轨道
-  内阴影+圆角*/
-::-webkit-scrollbar-track {
-    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
-
-    background-color: #F5F5F5;
-}
-
-/*定义滑块
-  内阴影+圆角*/
-::-webkit-scrollbar-thumb {
-
-    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
-    background-color: #555;
-}
-
-.analysis-container .table {
-    height: 100%;
-}
-
-.analysis-container .thead {
-    height: 31px;
-}
-
-.analysis-container .table .tbody {
-    height: calc(100% - 31px);
-    overflow-y: auto;
-    overflow-x: hidden;
-    scrollbar-width: thin;
-}
-
-
-.analysis-container .table table {
-    width: 360px;
-    border-collapse: collapse;
-    table-layout: fixed;
-    box-sizing: border-box;
-
-}
-
-.analysis-container .table table tr {
-    height: 30px;
-}
-
-.analysis-container .table table tr th,
-.analysis-container .table table tr td {
-    margin: 0;
-    padding: 0 4px;
-    border: 1px solid rgb(255, 255, 255);
-    height: 30px;
-    text-align: center;
-    font-size: 14px;
-    font-weight: 400;
-    color: #fff;
-    box-sizing: border-box;
-
-    overflow: hidden;
-    /*超出的文字隐藏*/
-    text-overflow: ellipsis;
-    /*文字超出后,显示省略号*/
-    white-space: nowrap;
-    /*文字不换行*/
-    word-break: keep-all;
-    /*文字不换行*/
-}
-
-.analysis-container .table table tr td a {
-    color: #fff;
-    cursor: default;
-}
-
-.analysis-container .table table tr:first-child td {
-    border-top: none;
-   
-}
-
-
-.analysis-container .table .tbody tr {
-    cursor: pointer;
-}
-
-.analysis-container .table .tbody tr td:first-child,
-.analysis-container .table .thead tr th:first-child {
-    width: 40px;
-}
-
-.analysis-container .analysis-container-police .table .tbody tr td:nth-child(2),
-.analysis-container .analysis-container-police .table .thead tr th:nth-child(2) {
-    width: 70px;
-}
-
-.analysis-container .analysis-container-police .table .tbody tr td:nth-child(4),
-.analysis-container .analysis-container-police .table .thead tr th:nth-child(4) {
-    width: 92px;
-}
-
-
-.analysis-container .analysis-container-police .table .tbody tr td:nth-child(5),
-.analysis-container .analysis-container-police .table .thead tr th:nth-child(5),
-.analysis-container .analysis-container-owner .table .tbody tr td:nth-child(5),
-.analysis-container .analysis-container-owner .table .thead tr th:nth-child(5),
-.analysis-container .analysis-container-equipment .table .tbody tr td:nth-child(5),
-.analysis-container .analysis-container-equipment .table .thead tr th:nth-child(5) {
-    width: 52px;
-}
-
-.analysis-container .analysis-container-police .table .tbody tr input,
-.analysis-container .analysis-container-owner .table .tbody tr input,
-.analysis-container .analysis-container-equipment .table .tbody tr input {
-    width: 42px;
-    height: 20px;
-    line-height: 20px;
-    color: #fff;
-    background: rgb(2, 63, 82);
-    border: 1px solid #3680C1;
-    border-radius: 4px;
-    cursor: pointer;
-    vertical-align: middle;
-}
-
-.analysis-container .analysis-container-equipment .table .tbody tr td:nth-child(2),
-.analysis-container .analysis-container-equipment .table .thead tr th:nth-child(2) {
-    width: 68px;
-}
-
-.analysis-container .analysis-container-equipment .table .tbody tr td:nth-child(4),
-.analysis-container .analysis-container-equipment .table .thead tr th:nth-child(4) {
-    width: 68px;
-}
\ No newline at end of file
diff --git a/public/map/widgets/analysisAndJudgment/AnalysisAndJudgment1.js b/public/map/widgets/analysisAndJudgment/AnalysisAndJudgment1.js
deleted file mode 100644
index 75352e6..0000000
--- a/public/map/widgets/analysisAndJudgment/AnalysisAndJudgment1.js
+++ /dev/null
@@ -1,833 +0,0 @@
-/*
- * @Description:
- * @Version: 1.0
- * @Author: yangsx
- * @Date: 2019-12-09 19:01:40
- * @LastEditors: yangsx
- * @LastEditTime: 2019-12-14 14:44:57
- */
-define([
-    "dojo",
-    "dojo/_base/declare",
-    "dojo/_base/lang",
-    "base/BaseWidget",
-    "dojo/text!widgets/analysisAndJudgment/template.html",
-    "base/AppEvent",
-    "base/ConfigData",
-    "widgets/analysisAndJudgment/config",
-    "dojo/dom",
-    "dojo/dom-construct",
-    "dojo/dom-attr",
-    "dojo/dom-style",
-    "dojo/on",
-    "esri/layers/ArcGISDynamicMapServiceLayer",
-    "esri/layers/ArcGISTiledMapServiceLayer",
-    "esri/layers/FeatureLayer",
-    "controls/tab/TabControl",
-    "esri/dijit/SymbolStyler",
-    "esri/styles/basic",
-    "dojo/_base/array",
-    "esri/InfoTemplate",
-    "esri/tasks/query",
-    "esri/tasks/QueryTask",
-    "esri/Color",
-    "esri/graphic",
-    "esri/geometry/Point",
-    "esri/geometry/Extent",
-    "esri/tasks/FeatureSet",
-    "esri/renderers/HeatmapRenderer",
-    "esri/symbols/SimpleLineSymbol",
-    "esri/symbols/SimpleFillSymbol",
-    "esri/symbols/PictureMarkerSymbol",
-    "esri/symbols/SimpleMarkerSymbol",
-    "esri/SpatialReference",
-    "esri/tasks/GeometryService",
-    "esri/tasks/ProjectParameters",
-    "esri/layers/GraphicsLayer",
-    "esri/layers/LabelLayer",
-    "esri/symbols/TextSymbol",
-    "esri/renderers/SimpleRenderer",
-    "esri/renderers/ClassBreaksRenderer",
-    "esri/tasks/Geoprocessor",
-    "esri/tasks/DataFile",
-    "esri/geometry/webMercatorUtils",
-    "esri/symbols/Font",
-    "esri/geometry/ScreenPoint",
-    "esri/layers/ImageParameters",
-    "esri/geometry/geometryEngine",
-    "dojo/domReady!"
-], function(
-    dojo,
-    declare,
-    lang,
-    BaseWidget,
-    template,
-    AppEvent,
-    ConfigData,
-    config,
-    dom,
-    domConstruct,
-    domAttr,
-    domStyle,
-    on,
-    ArcGISDynamicMapServiceLayer,
-    ArcGISTiledMapServiceLayer,
-    FeatureLayer,
-    TabControl,
-    SymbolStyler,
-    basic,
-    arrayUtils,
-    InfoTemplate,
-    Query,
-    QueryTask,
-    Color,
-    Graphic,
-    Point,
-    Extent,
-    FeatureSet,
-    HeatmapRenderer,
-    SimpleLineSymbol,
-    SimpleFillSymbol,
-    PictureMarkerSymbol,
-    SimpleMarkerSymbol,
-    SpatialReference,
-    GeometryService,
-    ProjectParameters,
-    GraphicsLayer,
-    LabelLayer,
-    TextSymbol,
-    SimpleRenderer,
-    ClassBreaksRenderer,
-    Geoprocessor,
-    DataFile,
-    webMercatorUtils,
-    Font,
-    ScreenPoint,
-    ImageParameters,
-    geometryEngine
-) {
-    var Widget = declare([BaseWidget], {
-        widgetName: "AnalysisAndJudgment",
-        label: "分析研判",
-        templateString: template,
-        _map: null,
-        objThis: null,
-        _siteLayer: new GraphicsLayer(),
-        layuiLayer: null,
-        layuiLadate: null,
-        heatmapfeatureLayer_1: null,
-        tabIndex: 0,
-
-        // 保留添加实体图层的变量
-        analysisAddEntitys: null,
-        entitysData: [],
-        constructor: function(options, srcRefNode) {
-            this._map = options.map;
-            objThis = this;
-
-
-
-
-            this.analysisAddEntitys = new GraphicsLayer({ id: 'analysisAddEntitys' });
-            this.addOneEntitys = new GraphicsLayer({ id: 'addOneEntitys' });
-            this.addTwoEntitys = new GraphicsLayer({ id: 'addTwoEntitys' });
-            this.addThreeEntitys = new GraphicsLayer({ id: 'addThreeEntitys' });
-
-            this._map.addLayer(this.analysisAddEntitys);
-            this._map.addLayer(this.addOneEntitys);
-        },
-        startup: function() {
-            objThis._map.addLayer(objThis._siteLayer);
-            var that = this;
-            // 顶部tab得切换事件
-            $('.analysis-and-judgment-tab li').click(function() {
-                if (that.tabIndex == $(this).index()) return;
-
-
-                if (that.entitysData.length > 0) {
-                    that.analysisAddEntitys.clear();
-                    that.entitysData = [];
-                }
-
-                if (that.heatmapfeatureLayer_1.graphics.length > 0) {
-                    that.heatmapfeatureLayer_1.clear();
-                    that.heatmapfeatureLayer_1.setRenderer();
-                    $('.analysis-category input').prop('checked', false);
-                }
-
-
-                $(this).addClass('on').siblings().removeClass('on');
-                var ind = $(this).index();
-                $($('.analysis-container > div')[ind]).stop().show().siblings().stop().hide();
-                if (ind == 0) {
-                    that.getPoliceTableAnalysis($($('.analysis-container > div')[ind]).find('.tbody tbody'),
-                        $('#analysis_select_time_start').val() + ':00',
-                        $('#analysis_select_time_end').val() + ':00', '')
-                } else if (ind == 1) {
-                    that.getOwnerTable($($('.analysis-container > div')[ind]).find('.tbody tbody'), '', '');
-                } else if (ind == 2) {
-                    that.getEquipmentTable($($('.analysis-container > div')[ind]).find('.tbody tbody'), '');
-                }
-
-                that.tabIndex = $(this).index();
-            })
-
-            // 时间查询
-            $('#policeSelectTime').off('click').click(function() {
-                var times = $(this).prevAll();
-                // 开始时间
-                var startTime = $(times[1]).val();
-                // 结束时间
-                var endTime = $(times[0]).val();
-                var text = $('#policeCategory div:eq(0)').text().trim();
-                that.getPoliceTableAnalysis($('.analysis-container-police').find('.tbody tbody'), startTime, endTime, text == '全部' ? '' : text);
-            })
-
-            // 警情列表中的点击事件
-            $('.analysis-container-police .analysis-table-content .tbody').off('click', 'tr').on('click', 'tr', function() {
-                var id = $(this).attr('term-list');
-                var url = '/popup/html/police-details.html?obj=' + id;
-                layui.use('layer', function() {
-                    that.layuiLayer = layui.layer;
-                    that.layuiLayer.config({
-                        extend: 'myskin/police-details.css'
-                    });
-                    that.layuiLayer.close(that.layuiLayer.index);
-                    that.layuiLayer.open({
-                        title: '警情详情',
-                        type: 2,
-                        shadeClose: true,
-                        shade: false,
-                        maxmin: false, //开启最大化最小化按钮
-                        area: ['500px', '400px'],
-                        offset: 'auto',
-                        skin: 'police-details',
-                        content: url,
-                        closeBtn: 1,
-                    });
-                })
-            })
-            $('.analysis-container-police .analysis-table-content .tbody').off('click', '.location').on('click', '.location', function(event) {
-                event.stopPropagation();
-            })
-            $('.analysis-container-police .analysis-table-content .tbody').off('click', '.location input').on('click', '.location input', function(event) {
-                event.stopPropagation();
-                var lgtd = Number($(this).attr('lgtd'));
-                var lttd = Number($(this).attr('lttd'));
-                var position = new esri.geometry.Point(lgtd, lttd, new esri.SpatialReference({ wkid: 4326 })); //根据输入坐标信息找地图上的点
-                that._map.centerAndZoom(position, 18); //缩放,10是缩放级别,可以自定义,数值越大缩放越大
-            })
-
-            // 业主列表中的点击事件
-            $('.analysis-container-owner .analysis-table-content .tbody').off('click', 'tr').on('click', 'tr', function() {
-                var id = $(this).attr('term-list');
-                var url = '/popup/html/owner-details.html?id=' + id;
-                layui.use('layer', function() {
-                    that.layuiLayer = layui.layer;
-                    that.layuiLayer.config({
-                        extend: 'myskin/owner-details.css'
-                    });
-                    that.layuiLayer.close(that.layuiLayer.index);
-                    that.layuiLayer.open({
-                        title: '业主详情',
-                        type: 2,
-                        shadeClose: true,
-                        shade: false,
-                        maxmin: false, //开启最大化最小化按钮
-                        area: ['500px', '340px'],
-                        offset: 'auto',
-                        skin: 'owner-details',
-                        content: url,
-                        closeBtn: 1,
-                    });
-                })
-            })
-            $('.analysis-container-owner .analysis-table-content .tbody').off('click', '.location').on('click', '.location', function(event) {
-                event.stopPropagation();
-            })
-            $('.analysis-container-owner .analysis-table-content .tbody').off('click', '.location input').on('click', '.location input', function(event) {
-                event.stopPropagation();
-                var lgtd = Number($(this).attr('lgtd'));
-                var lttd = Number($(this).attr('lttd'));
-                var position = new esri.geometry.Point(lgtd, lttd, new esri.SpatialReference({ wkid: 4326 })); //根据输入坐标信息找地图上的点
-                that._map.centerAndZoom(position, 18); //缩放,10是缩放级别,可以自定义,数值越大缩放越大
-            })
-
-            // 设备列表中的点击事件
-            $('.analysis-container-equipment .analysis-table-content .tbody').off('click', 'tr').on('click', 'tr', function() {
-                var id = $(this).attr('term-listid');
-                var url = '/popup/html/equipment-details.html?obj=' + id;
-                layui.use('layer', function() {
-                    that.layuiLayer = layui.layer;
-                    that.layuiLayer.config({
-                        extend: 'myskin/equipment-details.css'
-                    });
-                    that.layuiLayer.close(that.layuiLayer.index);
-                    that.layuiLayer.open({
-                        title: '警情详情',
-                        type: 2,
-                        shadeClose: true,
-                        shade: false,
-                        maxmin: false, //开启最大化最小化按钮
-                        area: ['520px', '320px'],
-                        offset: 'auto',
-                        skin: 'equipment-details',
-                        content: url,
-                        closeBtn: 1,
-                    });
-                })
-            })
-            $('.analysis-container-equipment .analysis-table-content .tbody').off('click', '.location').on('click', '.location', function(event) {
-                event.stopPropagation();
-            })
-            $('.analysis-container-equipment .analysis-table-content .tbody').off('click', '.location input').on('click', '.location input', function(event) {
-                event.stopPropagation();
-                var lgtd = Number($(this).attr('lgtd'));
-                var lttd = Number($(this).attr('lttd'));
-                var position = new esri.geometry.Point(lgtd, lttd, new esri.SpatialReference({ wkid: 4326 })); //根据输入坐标信息找地图上的点
-                that._map.centerAndZoom(position, 18); //缩放,10是缩放级别,可以自定义,数值越大缩放越大
-            })
-
-            // 警情列表中得热力图是否选中事件
-            $('#policeHeatMap').click(function() {
-                    that.checkBoxSelect(this);
-                })
-                // 业主信息列表中得热力图是否选中事件
-            $('#ownerHeatMap').click(function() {
-                    that.checkBoxSelect(this);
-                })
-                // 设备信息列表的热力图是否选中事件
-            $('#equipmentHeatMap').click(function() {
-                    that.checkBoxSelect(this);
-                })
-                // 警情信息中类别移入事件
-            $('#policeCategory').mouseenter(function() {
-                    if ($('#policeCategory .select-list').is(':hidden')) {
-                        $('#policeCategory .select-list').stop().slideDown(0);
-                    }
-                })
-                // 警情信息中得类别移出事件
-            $('#policeCategory').mouseleave(function() {
-                    if (!$('#policeCategory .select-list').is(':hidden')) {
-                        $('#policeCategory .select-list').stop().slideUp(0);
-                    }
-                })
-                // 业主信息中类别移入事件
-            $('#ownerCategory').mouseenter(function() {
-                    if ($('#ownerCategory .select-list').is(':hidden')) {
-                        $('#ownerCategory .select-list').stop().slideDown(0);
-                    }
-                })
-                // 业主信息中得类别移出事件
-            $('#ownerCategory').mouseleave(function() {
-                    if (!$('#ownerCategory .select-list').is(':hidden')) {
-                        $('#ownerCategory .select-list').stop().slideUp(0);
-                    }
-                })
-                // 业主信息中的等级移入事件
-            $('#ownerLevel').mouseenter(function() {
-                    if ($('#ownerLevel .select-list').is(':hidden')) {
-                        $('#ownerLevel .select-list').stop().slideDown(0);
-                    }
-                })
-                // 业主信息中的等级移出事件
-            $('#ownerLevel').mouseleave(function() {
-                    if (!$('#ownerLevel .select-list').is(':hidden')) {
-                        $('#ownerLevel .select-list').stop().slideUp(0);
-                    }
-                })
-                // 设备信息中类别移入事件
-            $('#equipmentCategory').mouseenter(function() {
-                    if ($('#equipmentCategory .select-list').is(':hidden')) {
-                        $('#equipmentCategory .select-list').stop().slideDown(0);
-                    }
-                })
-                // 设备信息中得类别移出事件
-            $('#equipmentCategory').mouseleave(function() {
-                    if (!$('#equipmentCategory .select-list').is(':hidden')) {
-                        $('#equipmentCategory .select-list').stop().slideUp(0);
-                    }
-                })
-                //  警情信息类,业主信息类,设备信息类别,具体项的点击事件
-            $('.analysis-container > div .select-list').off('click', 'li').on('click', 'li', function(event) {
-
-                var text = $(this).text();
-                $(this).parent().parent().prev().html(text + '<i></i>');
-                $(this).parent().parent().stop().slideUp(0);
-
-                if (text == '全部') text = '';
-
-
-                if (that.tabIndex == 0) {
-                    that.getPoliceTableAnalysis($('.analysis-container-police').find('.tbody tbody'), $('#analysis_select_time_start').val(), $('#analysis_select_time_end').val(), text);
-                } else if (that.tabIndex == 1) {
-                    var parentId = $(this).parent().parent().parent().attr('id');
-                    if (parentId == 'ownerCategory') {
-                        var levelText = $('#ownerLevel > div:eq(0)').text().trim() == '全部' ? '' : $('#ownerLevel > div:eq(0)').text().trim();
-                        that.getOwnerTable($('.analysis-container-owner').find('.tbody tbody'), text, levelText);
-                    } else {
-                        var categoryText = $('#ownerCategory > div:eq(0)').text().trim() == '全部' ? '' : $('#ownerCategory > div:eq(0)').text().trim();
-                        that.getOwnerTable($('.analysis-container-owner').find('.tbody tbody'), categoryText, text);
-                    }
-
-
-
-                } else if (that.tabIndex == 2) {
-                    that.getEquipmentTable($('.analysis-container-equipment').find('.tbody tbody'), text);
-                }
-
-            })
-        },
-        open: function() {
-            var time = this.getTime();
-            var that = this;
-
-            that.tabIndex = 0;
-            $('.analysis-and-judgment-tab li:eq(0)').addClass('on').siblings().removeClass('on');
-            $($('.analysis-container > div')[0]).stop().show().siblings().stop().hide();
-
-            that.heatmapfeatureLayer_1 = that.heatmFeaLayers();
-
-            that._map.addLayer(that.heatmapfeatureLayer_1);
-            $('#analysis_select_time_start').val(time.tomorrow);
-            $('#analysis_select_time_end').val(time.current);
-
-            layui.use('laydate', function() {
-                that.layuiLadate = layui.laydate;
-                //执行一个laydate实例 开始
-                that.layuiLadate.render({
-                    elem: '#analysis_select_time_start', //指定元素
-                    type: "datetime",
-                    format: 'yyyy-MM-dd HH:mm',
-                    trigger: 'click'
-                });
-                // 结束
-                that.layuiLadate.render({
-                    elem: '#analysis_select_time_end', //指定元素
-                    type: "datetime",
-                    format: 'yyyy-MM-dd HH:mm',
-                    trigger: 'click'
-                });
-            });
-
-            that.getPoliceTableAnalysis($('.analysis-container-police').find('.tbody tbody'), time.tomorrow, time.current, '');
-            that.clickHand();
-            // 日期时间选择,做的一些限制,最大最小范围
-            function gerCurrentTime() {
-                var timestamp = Date.parse(new Date());
-                // 当前时间
-                var currentTime = new Date(timestamp);
-                // 年
-                var currentY = currentTime.getFullYear();
-                // 月
-                var currentM = currentTime.getMonth();
-                // 日
-                var currentD = currentTime.getDate();
-                // 时
-                var currentH = currentTime.getHours();
-                // 分
-                var currentDd = currentTime.getMinutes();
-                var currentS = currentTime.getSeconds();
-                return {
-                    date: currentD,
-                    hours: currentH,
-                    minutes: currentDd,
-                    month: currentM,
-                    seconds: currentS,
-                    year: currentY
-                }
-            }
-
-            function getNowFormatDate() {
-                var date = new Date();
-                var seperator1 = "-";
-                var seperator2 = ":";
-                var month = date.getMonth() + 1;
-                var strDate = date.getDate();
-                if (month >= 1 && month <= 9) {
-                    month = "0" + month;
-                }
-                if (strDate >= 0 && strDate <= 9) {
-                    strDate = "0" + strDate;
-                }
-                var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate +
-                    " " + date.getHours() + seperator2 + date.getMinutes() +
-                    seperator2 + date.getSeconds();
-                return currentdate;
-            }
-
-            function gerStarrtClickTime() {
-                var time = $('#analysis_select_time_start').val();
-                // 年
-                var currentY = Number(time.substr(0, 4));
-                // 月
-                var currentM = Number(time.substr(5, 2)) - 1;
-                // 日
-                var currentD = Number(time.substr(8, 2));
-                // 时
-                var currentH = Number(time.substr(11, 2));
-                // 分
-                var currentDd = Number(time.substr(14, 2));
-                var currentS = Number(time.substr(17, 2));
-                return {
-                    date: currentD,
-                    hours: currentH,
-                    minutes: currentDd,
-                    month: currentM,
-                    seconds: currentS,
-                    year: currentY
-                }
-            }
-
-            function getStartTime() {
-                var time = $('#analysis_select_time_start').val();
-                return time
-            }
-
-
-
-        },
-        close: function() {
-            this.entitysData = [];
-            this.analysisAddEntitys.clear();
-
-        },
-        // 鼠标点击事件
-        clickHand: function() {
-            var self = this;
-
-            self._map.onClick = mapClick;
-
-
-            function mapClick(evt) {
-                if (evt.graphic) {
-                    var result = evt.graphic.geometry.entityData;
-                    var liText = evt.graphic.symbol.name;
-                    if (liText == '警情信息') {
-                        self.policeDetails(result.id);
-                    } else if (liText == '业主信息') {
-                        self.ownerDetails(result.id);
-                    } else if (liText == '设备信息') {
-                        self.equipmentDetails(result.id);
-                    }
-                }
-            }
-        },
-        // 警情详情弹框
-        /**
-         *
-         * @param {number} id 警情ID
-         */
-        policeDetails: function(id) {
-            var that = this;
-            var url = '/popup/html/police-details.html?obj=' + id;
-            layui.use('layer', function() {
-                that.layuiLayer = layui.layer;
-                that.layuiLayer.config({
-                    extend: 'myskin/police-details.css'
-                });
-                that.layuiLayer.close(that.layuiLayer.index);
-                that.layuiLayer.open({
-                    title: '警情详情',
-                    type: 2,
-                    shadeClose: true,
-                    shade: false,
-                    maxmin: false, //开启最大化最小化按钮
-                    area: ['500px', '400px'],
-                    offset: 'auto',
-                    skin: 'police-details',
-                    content: url,
-                    closeBtn: 1,
-                });
-            })
-        },
-        // 业主详情弹框
-        /**
-         *
-         * @param {number} id 警情ID
-         */
-        ownerDetails: function(id) {
-            var that = this;
-            var url = '/popup/html/owner-details.html?id=' + id;
-            layui.use('layer', function() {
-                that.layuiLayer = layui.layer;
-                that.layuiLayer.config({
-                    extend: 'myskin/owner-details.css'
-                });
-                that.layuiLayer.close(that.layuiLayer.index);
-                that.layuiLayer.open({
-                    title: '业主详情',
-                    type: 2,
-                    shadeClose: true,
-                    shade: false,
-                    maxmin: false, //开启最大化最小化按钮
-                    area: ['500px', '340px'],
-                    offset: 'auto',
-                    skin: 'owner-details',
-                    content: url,
-                    closeBtn: 1,
-                });
-            })
-        },
-        // 设备详情弹框
-        /**
-         *
-         * @param {number} id 设备ID
-         */
-        equipmentDetails: function(id) {
-            var that = this;
-            var url = '/popup/html/equipment-details.html?obj=' + id;
-            layui.use('layer', function() {
-                that.layuiLayer = layui.layer;
-                that.layuiLayer.config({
-                    extend: 'myskin/equipment-details.css'
-                });
-                that.layuiLayer.close(that.layuiLayer.index);
-                that.layuiLayer.open({
-                    title: '警情详情',
-                    type: 2,
-                    shadeClose: true,
-                    shade: false,
-                    maxmin: false, //开启最大化最小化按钮
-                    area: ['520px', '320px'],
-                    offset: 'auto',
-                    skin: 'equipment-details',
-                    content: url,
-                    closeBtn: 1,
-                });
-            })
-        },
-        //热力图渲染器,加载热力图
-        heatmFeaLayers: function() {
-
-            var layerDefinition = {
-                "geometryType": "esriGeometryPoint",
-                "fields": [{
-                    "num": "num",
-                    editable: true,
-                    nullable: true,
-                    "type": "esriFieldTypeInteger",
-                    "alias": "数量"
-                }]
-            };
-            var featureCollection = {
-                layerDefinition: layerDefinition,
-                featureSet: null
-            };
-            //创建 FeatureLayer 图层
-            var featureLayer = new esri.layers.FeatureLayer(featureCollection, {
-                mode: esri.layers.FeatureLayer.MODE_SNAPSHOT,
-                outFields: ["*"],
-                opacity: .8
-            });
-            //设置渲染方式
-
-            return featureLayer;
-        },
-        // 获取当前时间,以及昨天现在的时间
-        getTime: function getTime() {
-                var timestamp = Date.parse(new Date());
-
-                // 当前时间
-                var currentTime = new Date(timestamp);
-                // 年
-                var currentY = currentTime.getFullYear();
-                // 月
-                var currentM = currentTime.getMonth() + 1 < 10 ? '0' + (currentTime.getMonth() + 1) : currentTime.getMonth() + 1;
-                // 日
-                var currentD = currentTime.getDate() < 10 ? '0' + currentTime.getDate() : currentTime.getDate();
-                // 时
-                var currentH = currentTime.getHours() < 10 ? '0' + currentTime.getHours() : currentTime.getHours();
-                // 分
-                var currentDd = currentTime.getMinutes() < 10 ? '0' + currentTime.getMinutes() : currentTime.getMinutes();
-                // 明天
-                var tomorrowTime = new Date(timestamp - 60 * 60 * 24 * 1000);
-                // 年
-                var tomorrowY = tomorrowTime.getFullYear();
-                // 月
-                var tomorrowM = tomorrowTime.getMonth() + 1 < 10 ? '0' + (tomorrowTime.getMonth() + 1) : tomorrowTime.getMonth() + 1;
-                // 日
-                var tomorrowD = tomorrowTime.getDate() < 10 ? '0' + tomorrowTime.getDate() : tomorrowTime.getDate();
-                // 时
-                var tomorrowH = tomorrowTime.getHours() < 10 ? '0' + tomorrowTime.getHours() : tomorrowTime.getHours();
-                // 分
-                var tomorrowDd = tomorrowTime.getMinutes() < 10 ? '0' + tomorrowTime.getMinutes() : tomorrowTime.getMinutes();
-                return {
-                    current: currentY + '-' + currentM + '-' + currentD + ' ' + currentH + ':' + currentDd,
-                    tomorrow: tomorrowY + '-' + tomorrowM + '-' + tomorrowD + ' ' + tomorrowH + ':' + tomorrowDd,
-                    month: currentM + currentD
-                };
-            }
-            // 获取警情信息列表
-            /**
-             *
-             * @param {object} dom jq对象
-             * @param {string} beginTime 开始时间
-             * @param {string} endTime 结束时间
-             * @param {*} waringType 警情的类别
-             */
-        getPoliceTableAnalysis: function(dom, beginTime, endTime, waringType) {
-            dom.empty();
-            var that = this;
-            $.ajax({
-                url: 'https://web.byisf.com:18001/api/blade-jfpts/jingdan/jingdan/selectList',
-                type: 'POST',
-                dataType: 'JSON',
-                data: {
-                    beginTime: beginTime,
-                    endTime: endTime,
-                    waringType: waringType
-                },
-                success: function(data) {
-                    var result = data.data;
-                    var str = '';
-                    var lgtdOrLttd = null;
-                    that.entitysData = [];
-                    that.analysisAddEntitys.clear();
-                    for (var a, time, t, e, y, h, i = 0; i < result.length; i++) {
-
-                        that.createEntitysAnalysis(that.analysisAddEntitys, that.entitysData, '警情信息', { lgtd: result[i].jd, lttd: result[i].wd, id: result[i].id }, result[i].jd, result[i].wd, './images/police-situation.png');
-
-
-                        t = result[i].handleTime.substr(0, 10);
-                        e = result[i].handleTime.substr(11);
-                        time = t + '&nbsp;' + e;
-                        y = result[i].handleTime.substr(5, 5);
-                        h = result[i].handleTime.substr(11, 5);
-                        a = Number(i) + 1;
-                        str += '<tr term-list=' + result[i].id + '>';
-                        str += '<td>' + a + '</td>';
-                        str += '<td title=' + result[i].waringType + '>' + result[i].waringType + '</td>';
-                        str += '<td title=' + result[i].addvnm + '>' + result[i].addvnm + '</td>';
-                        str += "<td><a href='javascript:;' title=" + time + ">" + y + ' ' + h + "</a></td>";
-                        str += "<td class='location'> <input type='button' value='定位'" + ' lgtd=' + result[i].jd + ' lttd=' + result[i].wd + "></td>";
-                        str += '</tr>';
-                        dom.append(str);
-                        str = '';
-
-
-
-                    }
-
-                    for (var i = 0; i < 1000; i++) {
-                        var dd = Math.random();
-                        var cc = Math.random();
-                    }
-                }
-            })
-        },
-        // 获取业主信息列表
-        getOwnerTable: function(dom, type, dj) {
-            dom.empty();
-            var that = this;
-            $.ajax({
-                url: 'https://web.byisf.com:18001/api/blade-jfpts/suser/suser/selectList?type=' + type + '&dj=' + dj,
-                type: 'GET',
-                dataType: 'JSON',
-                success: function(data) {
-                    var result = data.data;
-                    var str = '';
-                    var lgtdOrLttd = null;
-                    that.entitysData = [];
-                    that.analysisAddEntitys.clear();
-                    for (var a, i = 0; i < result.length; i++) {
-
-                        lgtdOrLttd = result[i].coordinate.substring(6, result[i].coordinate.length - 1).split(' ');
-                        that.createEntitysAnalysis(that.analysisAddEntitys, that.entitysData, '业主信息', { lgtd: lgtdOrLttd[0], lttd: lgtdOrLttd[1], id: result[i].id }, lgtdOrLttd[0], lgtdOrLttd[1], './images/owner.png');
-
-                        a = Number(i) + 1;
-                        str += "<tr term-list=" + result[i].id + ">";
-                        str += '<td>' + a + '</td>';
-                        str += '<td>' + result[i].type + '</td>';
-                        str += '<td>' + result[i].dj + '</td>';
-                        str += '<td>' + result[i].yname + '</td>';
-                        str += "<td class='location'> <input type='button' value='定位'" + ' lgtd=' + lgtdOrLttd[0] + ' lttd=' + lgtdOrLttd[1] + "></td>";
-                        str += '</tr>';
-                        dom.append(str);
-                        str = '';
-                    }
-
-                }
-            })
-        },
-        // 获取设备信息列表
-        getEquipmentTable: function(dom, deviceType) {
-            dom.empty();
-            var that = this;
-            $.ajax({
-                url: 'https://web.byisf.com:18001/api/blade-jfpts/equipment/equipment/selectList?deviceType=' + deviceType,
-                type: 'GET',
-                dataType: 'JSON',
-                success: function(data) {
-                    var result = data.data;
-                    var str = '';
-                    var lgtdOrLttd = null;
-                    that.entitysData = [];
-                    that.analysisAddEntitys.clear();
-                    for (var a, i = 0; i < result.length; i++) {
-
-                        lgtdOrLttd = result[i].coordinate.substring(6, result[i].coordinate.length - 1).split(' ');
-                        that.createEntitysAnalysis(that.analysisAddEntitys, that.entitysData, '设备信息', { lgtd: lgtdOrLttd[0], lttd: lgtdOrLttd[1], id: result[i].id }, lgtdOrLttd[0], lgtdOrLttd[1], './images/ceshi.png');
-
-                        a = Number(i) + 1;
-                        str += "<tr term-listid=" + result[i].id + ">";
-                        str += '<td>' + a + '</td>';
-                        str += '<td title=' + result[i].deviceName + '>' + result[i].deviceName + '</td>';
-                        str += '<td title=' + result[i].deviceType + '>' + result[i].deviceType + '</td>';
-                        str += '<td>' + result[i].deviceNumber + '</td>';
-                        str += "<td class='location'> <input type='button' value='定位'" + ' lgtd=' + lgtdOrLttd[0] + ' lttd=' + lgtdOrLttd[1] + "></td>";
-                        str += '</tr>';
-                        dom.append(str);
-                        str = '';
-                    }
-
-
-                }
-            })
-        },
-        // 创建实体图层
-        createEntitysAnalysis: function(entitys, entityContent, name, item, lgtd, lttd, outlineColors) {
-
-            var symbol = new esri.symbol.PictureMarkerSymbol(outlineColors, 16, 16);
-            symbol.name = name;
-            var pt = new Point(lgtd, lttd, new SpatialReference({ wkid: 4326 }));
-            pt.entityData = item;
-            var graphic = new esri.Graphic(pt, symbol);
-            entitys.add(graphic);
-
-
-            entityContent.push(item);
-        },
-        // 热力图选中执行函数
-        checkBoxSelect: function(self) {
-            var heatmapRenderer = null;
-            // // return
-            // 选中
-            if ($(self).prop('checked') == true) {
-                heatmapRenderer = new HeatmapRenderer({
-                    colorStops: [
-                        { ratio: 0.45, color: "rgba(000,000,255,0)" },
-                        { ratio: 0.55, color: "rgb(000,255,255)" },
-                        { ratio: 0.65, color: "rgb(000,255,000)" },
-                        { ratio: 0.75, color: "rgb(234,126,15)" },
-                        { ratio: 1.00, color: "rgb(255,000,000)" },
-                    ],
-                    blurRadius: 48,
-                    maxPixelIntensity: 184,
-                    minPixelIntensity: 0
-                });
-                this.heatmapfeatureLayer_1.setRenderer(heatmapRenderer);
-                // 取消选中
-                var point = null;
-                for (var i = 0; i < this.entitysData.length; i++) {
-                    point = new esri.geometry.Point(this.entitysData[i].lgtd, this.entitysData[i].lttd, new esri.SpatialReference({ wkid: 4326 }));
-                    this.heatmapfeatureLayer_1.add(new esri.Graphic(point));
-                }
-            } else {
-                this.heatmapfeatureLayer_1.clear();
-                this.heatmapfeatureLayer_1.setRenderer();
-            }
-        }
-    });
-    return Widget;
-});
diff --git a/public/map/widgets/analysisAndJudgment/template.html b/public/map/widgets/analysisAndJudgment/template.html
index 0f1176e..4663587 100644
--- a/public/map/widgets/analysisAndJudgment/template.html
+++ b/public/map/widgets/analysisAndJudgment/template.html
@@ -21,14 +21,7 @@
                         <div class='select-list'>
                             <ul>
                                 <li>全部</li>
-                                <li>医疗求助</li>
-                                <li>火警</li>
-                                <li>紧急求救</li>
-                                <li>盗警</li>
-                                <li>普通报警</li>
-                                <li>交通</li>
-                                <li>中心调度</li>
-                                <li>电话报警</li>
+                                <li>一键求助</li>
                             </ul>
                         </div>
                     </li>
@@ -62,7 +55,7 @@
                                 <tr>
                                     <th>序号</th>
                                     <th>类别</th>
-                                    <th>行政区</th>
+                                    <th>接警员</th>
                                     <th>日期</th>
                                     <th>操作</th>
                                 </tr>
diff --git a/public/map/widgets/analysisAndJudgment/template1.html b/public/map/widgets/analysisAndJudgment/template1.html
deleted file mode 100644
index 852a389..0000000
--- a/public/map/widgets/analysisAndJudgment/template1.html
+++ /dev/null
@@ -1,199 +0,0 @@
-<div class='analysis-and-judgment' open-li='analysis-and-judgment'
-    style='width: 360px; height: calc(100%); background: rgba(12,25,49, .8);'>
-    <ul class='analysis-and-judgment-tab'>
-        <li class='on'>警情信息</li>
-        <li>业主信息</li>
-        <li>设备信息</li>
-    </ul>
-    <!-- 展示分析研判 -->
-    <div class="analysis-container">
-        <!-- 警情信息 -->
-        <div class="analysis-container-police">
-            <div class="analysis-category">
-                <ul>
-                    <li id='policeCategory'>
-                        类型:
-                        <div>
-                            全部
-
-                            <i>
-
-                            </i>
-                        </div>
-                        <div class='select-list'>
-                            <ul>
-                                <li>全部</li>
-                                <li>治安警情</li>
-                                <li>刑事警情</li>
-                                <li>火警</li>
-                            </ul>
-                        </div>
-                    </li>
-                    <li>
-                        <input type="checkbox" id='policeHeatMap'> 热力图
-                    </li>
-                </ul>
-            </div>
-            <div class='analysis-selection-criteria'>
-                <input type="text" id='analysis_select_time_start' readonly> - <input type="text" id='analysis_select_time_end' readonly>
-                <input type="button" value='查询' id='policeSelectTime'>
-            </div>
-            <div class='analysis-table-content'>
-                <div class="table">
-                    <div class="thead">
-                        <table>
-                            <thead>
-                                <tr>
-                                    <th>序号</th>
-                                    <th>类别</th>
-                                    <th>行政区</th>
-                                    <th>日期</th>
-                                    <th>操作</th>
-                                </tr>
-                            </thead>
-                        </table>
-                    </div>
-                    <div class="tbody">
-                        <table>
-                            <tbody></tbody>
-                        </table>
-                    </div>
-                </div>
-            </div>
-        </div>
-        <!-- 业主信息 -->
-        <div class="analysis-container-owner">
-            <div class="analysis-category">
-                <ul>
-                    <li id='ownerCategory'>
-                        类型:
-                        <div>
-                            全部
-
-                            <i>
-
-                            </i>
-                        </div>
-                        <div class='select-list'>
-                            <ul>
-                                <li>全部</li>
-                                <li>一般</li>
-                                <li>略重</li>
-                                <li>重要</li>
-                                <li>特殊</li>
-                                <li>特重</li>
-                            </ul>
-                        </div>
-                    </li>
-                    <li>
-                        <input type="checkbox" id='ownerHeatMap'> 热力图
-                    </li>
-                </ul>
-            </div>
-            <div class="analysis-level">
-                <ul>
-                    <li id='ownerLevel'>
-                        等级:
-                        <div>
-                            全部
-
-                            <i>
-
-                            </i>
-                        </div>
-                        <div class='select-list'>
-                            <ul>
-                                <li>全部</li>
-                                <li>一级</li>
-                                <li>二级</li>
-                                <li>三级</li>
-                                <li>四级</li>
-                                <li>五级</li>
-                            </ul>
-                        </div>
-                    </li>
-                    <li>
-                        <!-- 级别 -->
-                    </li>
-                </ul>
-            </div>
-
-            <div class='analysis-table-content'>
-                <div class="table">
-                    <div class="thead">
-                        <table>
-                            <thead>
-                                <tr>
-                                    <th>序号</th>
-                                    <th>类别</th>
-                                    <th>等级</th>
-                                    <th>名称</th>
-                                    <th>操作</th>
-                                </tr>
-                            </thead>
-                        </table>
-                    </div>
-                    <div class="tbody">
-                        <table>
-                            <tbody></tbody>
-                        </table>
-                    </div>
-                </div>
-            </div>
-        </div>
-        <!-- 设备信息 -->
-        <div class="analysis-container-equipment">
-            <div class="analysis-category">
-                <ul>
-                    <li id='equipmentCategory'>
-                        类型:
-                        <div>
-                            全部
-
-                            <i>
-
-                            </i>
-                        </div>
-                        <div class='select-list'>
-                            <ul>
-                                <li>全部</li>
-                                <li>一体化摄像头</li>
-                                <li>普通枪式摄像头</li>
-                                <li>红外夜视防水型摄像头</li>
-                                <li>球型摄像头</li>
-                                <li>高速球</li>
-                            </ul>
-                        </div>
-                    </li>
-                    <li>
-                        <input type="checkbox" id='equipmentHeatMap'> 热力图
-                    </li>
-                </ul>
-            </div>
-            <div class='analysis-table-content'>
-                <div class="table">
-                    <div class="thead">
-                        <table>
-                            <thead>
-                                <tr>
-                                    <th>序号</th>
-                                    <th>设备名称</th>
-                                    <th>设备类型</th>
-                                    <th>设备编码</th>
-                                    <th>操作</th>
-                                </tr>
-                            </thead>
-                        </table>
-                    </div>
-                    <div class="tbody">
-                        <table>
-                            <tbody>
-
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</div>
\ No newline at end of file
diff --git a/src/page/index/logo.vue b/src/page/index/logo.vue
index 25f6b93..56c23f6 100644
--- a/src/page/index/logo.vue
+++ b/src/page/index/logo.vue
@@ -376,7 +376,6 @@
 
           if (response.data.data.length > 0) {
             that.deviceId = response.data.data[0].id;
-            console.log(userId, response.data.data[0].alarmId);
             if (
               response.data.data[0].waringType == "紧急求救" &&
               response.data.data[0].alarmId == userId
@@ -682,7 +681,6 @@
       that.recorder.start().then(
         () => {
           // 开始录音
-          console.log(111);
         },
         (error) => {
           // 出错了
diff --git a/src/views/home/home.vue b/src/views/home/home.vue
index 5727eab..4959bde 100644
--- a/src/views/home/home.vue
+++ b/src/views/home/home.vue
@@ -7,22 +7,49 @@
  * @LastEditTime: 2021-03-18 10:37:42
 -->
 <template>
-  <iframe v-show="iframeState" id="show-iframe" frameborder=0 name="showHere" scrolling=auto
-          src="https://web.byisf.com:18001/bigScreen/view/1349193280059879426"></iframe>
+  <iframe
+    v-show="iframeState"
+    id="show-iframe"
+    frameborder="0"
+    name="showHere"
+    scrolling="auto"
+    src="https://web.byisf.com:18001/bigScreen/view/1349193280059879426"
+  ></iframe>
 </template>
 
 <script>
-  export default {
-    name: "tcgl.vue",
-    created() {
-      //this.getData();
+export default {
+  name: "tcgl.vue",
+  created() {
+    //this.getData();
+  },
+  data() {
+    return {
+      dialogTableVisible: false,
+      form: {},
+    };
+  },
+  mounted() {
+    window.handleStartAnimalHeat = this.handleStartAnimalHeat;
+    window.handleStartHealthcode = this.handleStartHealthcode;
+    window.handleStartAlarm = this.handleStartAlarm;
+  },
+  methods: {
+    //体温监测分页数据
+    handleStartAnimalHeat(data) {
+      this.$router.push({
+        path: `/animalHeat/animalHeatPage`,
+        query: data[0],
+      });
     },
-    data() {
-      return {
-        dialogTableVisible:false,
-        form: {},
-      }
+    //健康码分页数据
+    handleStartHealthcode(data) {
+      this.$router.push({
+        path: `/healthcode/healthcodePage`,
+        query: data[0],
+      });
     },
+<<<<<<< HEAD
     mounted() {
       window.handleStartAnimalHeat = this.handleStartAnimalHeat;
       window.handleStartHealthcode = this.handleStartHealthcode;
@@ -57,31 +84,37 @@
           path: `/clientManagement/index`
         });
       }
+=======
+    //主动报警(一键求助,电话报警)分页数据
+    handleStartAlarm(data) {
+      this.$router.push({
+        path: `/realTimePolice/index`,
+        query: data[0],
+      });
+    },
+>>>>>>> 1961bed1f17c953cab383102b28498152f1e6f70
 
-      // getData() {
-      //   var that = this;
-      //
-      //   window.clearTimeout(window.realTimeQuery);
-      //
-      //   window.realTimeQuery = setInterval(function () {
-      //     //that.dialogTableVisible = true;
-      //   }, 3000);
-      // }
-    }
-  }
+    // getData() {
+    //   var that = this;
+    //
+    //   window.clearTimeout(window.realTimeQuery);
+    //
+    //   window.realTimeQuery = setInterval(function () {
+    //     //that.dialogTableVisible = true;
+    //   }, 3000);
+    // }
+  },
+};
 </script>
 
 <style>
+#show-iframe {
+  display: block !important;
+  height: 95%;
+}
 
-  #show-iframe {
-    display: block !important;
-    height: 95%;
-
-  }
-
-  .avue-main .avue-view {
-    height: 100%;
-    padding: 0px 5px !important;
-  }
-
+.avue-main .avue-view {
+  height: 100%;
+  padding: 0px 5px !important;
+}
 </style>
diff --git a/src/views/policeTracking/policeTracking.vue b/src/views/policeTracking/policeTracking.vue
index 65d2faf..854477e 100644
--- a/src/views/policeTracking/policeTracking.vue
+++ b/src/views/policeTracking/policeTracking.vue
@@ -331,14 +331,17 @@
               <div>
                 <el-image
                   :src="src"
+                  :preview-src-list="srcList"
                   style="width: 150px; margin-left: 5px"
                 ></el-image>
                 <el-image
                   :src="src"
+                  :preview-src-list="srcList"
                   style="width: 150px; margin-left: 5px"
                 ></el-image>
                 <el-image
                   :src="src"
+                  :preview-src-list="srcList"
                   style="width: 150px; margin-left: 5px"
                 ></el-image>
               </div>
@@ -374,7 +377,12 @@
 
           <el-row :align="center" style="margin-top: 40px">
             <el-col :offset="10">
-              <el-button @click="onSubmit" type="danger">处理完成</el-button>
+              <el-button
+                @click="onSubmit"
+                :disabled="form.jtype == 2 ? true : false"
+                :type="form.jtype == 2 ? 'info' : 'danger'"
+                >处理完成</el-button
+              >
             </el-col>
           </el-row>
         </el-card>
@@ -412,6 +420,12 @@
       },
       src:
         "https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg",
+      srcList: [
+        "https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg",
+        "https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg",
+        "https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg",
+        "https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg",
+      ],
       form: {},
       itemOption: {
         menuBtn: false,
@@ -471,37 +485,143 @@
     this.getReceivingAlarm();
   },
   methods: {
-    onSubmit() {
-      var newAxios = axios.create({
-        baseURL: "https://web.byisf.com:18001",
-        withCredentials: false,
-        headers: {},
-      });
+    getDate() {
+      // 当前时间
+      var timestamp = Date.parse(new Date());
+      var serverDate = new Date(timestamp);
 
-      newAxios
+      // 本周周一的时间
+      var mondayTime =
+        timestamp - (serverDate.getDay() - 1) * 24 * 60 * 60 * 1000;
+      var mondayData = new Date(mondayTime);
+      //年
+      var mondayY = mondayData.getFullYear();
+      //月
+      var mondayM =
+        mondayData.getMonth() + 1 < 10
+          ? "0" + (mondayData.getMonth() + 1)
+          : mondayData.getMonth() + 1;
+      //日
+      var mondayD =
+        mondayData.getDate() < 10
+          ? "0" + mondayData.getDate()
+          : mondayData.getDate();
+      // 当前时间
+      var currentData = new Date(timestamp);
+      //年
+      var currentY = currentData.getFullYear();
+      //月
+      var currentM =
+        currentData.getMonth() + 1 < 10
+          ? "0" + (currentData.getMonth() + 1)
+          : currentData.getMonth() + 1;
+      //日
+      var currentD =
+        currentData.getDate() < 10
+          ? "0" + currentData.getDate()
+          : currentData.getDate();
+      //时
+      var currenH =
+        currentData.getHours() < 10
+          ? "0" + currentData.getHours()
+          : currentData.getHours();
+      //分
+      var currenM =
+        currentData.getMinutes() < 10
+          ? "0" + currentData.getMinutes()
+          : currentData.getMinutes();
+      //秒
+      var currenS =
+        currentData.getSeconds() < 10
+          ? "0" + currentData.getSeconds()
+          : currentData.getSeconds();
+
+      return {
+        day: {
+          beginTime: currentY + "-" + currentM + "-" + currentD + " 00:00:00",
+          endTime:
+            currentY +
+            "-" +
+            currentM +
+            "-" +
+            currentD +
+            " " +
+            currenH +
+            ":" +
+            currenM +
+            ":00",
+        },
+        week: {
+          beginTime: mondayY + "-" + mondayM + "-" + mondayD + " 00:00:00",
+          endTime:
+            currentY +
+            "-" +
+            currentM +
+            "-" +
+            currentD +
+            " " +
+            currenH +
+            ":" +
+            currenM +
+            ":00",
+        },
+        month: {
+          beginTime: mondayY + "-" + mondayM + "-01 00:00:00",
+          endTime:
+            currentY +
+            "-" +
+            currentM +
+            "-" +
+            currentD +
+            " " +
+            currenH +
+            ":" +
+            currenM +
+            ":00",
+        },
+        current:
+          currentY +
+          "-" +
+          currentM +
+          "-" +
+          currentD +
+          " " +
+          currenH +
+          ":" +
+          currenM +
+          ":" +
+          currenS,
+      };
+    },
+    onSubmit() {
+      var that = this;
+      axios
         .post(
-          "/api/blade-jfpts/jingdan/jingdan/updateInfo",
+          "/api/blade-jfpts/alarm/alarm/updateJtype",
           {},
           {
             params: {
-              id: this.form.id,
-              handleP: this.form.handleP,
-              handName: this.form.handName,
-              handletype: this.form.handletype,
-              type: "2",
+              jid: this.form.id,
+              jtype: 2,
+              rid: this.form.alarmId,
+              bz: this.form.bz,
+              snumber: this.form.alarmId,
+              sname: this.form.alarmPeople,
+              zc: "处理完成",
+              zctime: this.getDate().current,
             },
           }
         )
-        .then((res) => {
-          if (res.data.msg == "修改成功") {
+        .then(function (res) {
+          if ((res.msg = "修改成功")) {
             var arr = [];
-            this.$store.state.tags.tagList.forEach((item) => {
-              if (item.value != this.$store.state.tags.tag.value) {
+            that.$store.state.tags.tagList.forEach((item) => {
+              if (item.value != that.$store.state.tags.tag.value) {
                 arr.push(item);
               }
             });
-            this.$store.state.tags.tagList = arr;
-            this.$router.go(-1);
+            that.$store.state.tags.tagList = arr;
+            that.$router.go(-1);
           }
         });
     },
diff --git a/src/views/realTimePolice/real.vue b/src/views/realTimePolice/real.vue
index dccb28a..5ef7533 100644
--- a/src/views/realTimePolice/real.vue
+++ b/src/views/realTimePolice/real.vue
@@ -2,7 +2,7 @@
  * @Author: Morpheus
  * @Date: 2021-03-17 15:21:33
  * @Last Modified by: Morpheus
- * @Last Modified time: 2021-03-20 16:47:06
+ * @Last Modified time: 2021-03-20 18:12:42
  */
 <template>
   <basic-container>
@@ -812,35 +812,44 @@
       };
 
       if (
-        this.$router.query &&
-        this.$router.query != null &&
-        this.$router.query != ""
+        this.$route.query.waringType && 
+        this.$route.query != undefined &&
+        this.$route.query != null &&
+        this.$route.query != ""
       ) {
-        if (this.$router.query.status) {
-          this.activeClass = this.$router.query.status;
+        if (
+          this.$route.query.status != undefined &&
+          this.$route.query.status != null &&
+          this.$route.query.status == ""
+        ) {
+          this.activeClass = this.$route.query.status;
           this.page.currentPage = 1;
-          if (this.$router.query.status == 0) {
+          if (this.$route.query.status == 0) {
             params = {
-              waringType: this.$router.query.waringType,
+              waringType: this.$route.query.waringType,
               beginTime: this.dateTime.day.beginTime,
               endTime: this.dateTime.day.endTime,
             };
-          } else if (this.$router.query.status == 1) {
+          } else if (this.$route.query.status == 1) {
             params = {
-              waringType: this.$router.query.waringType,
+              waringType: this.$route.query.waringType,
               beginTime: this.dateTime.week.beginTime,
               endTime: this.dateTime.week.endTime,
             };
-          } else if (this.$router.query.status == 2) {
+          } else if (this.$route.query.status == 2) {
             params = {
-              waringType: this.$router.query.waringType,
+              waringType: this.$route.query.waringType,
               beginTime: this.dateTime.month.beginTime,
               endTime: this.dateTime.month.endTime,
             };
           }
         } else {
+          this.activeClass = 0;
+          this.page.currentPage = 1;
           params = {
-            waringType: this.$router.query.waringType,
+            waringType: this.$route.query.waringType,
+            beginTime: this.dateTime.day.beginTime,
+            endTime: this.dateTime.day.endTime,
           };
         }
       }
@@ -859,6 +868,7 @@
           ...this.query,
         };
       }
+
       this.loading = true;
       getList(page.currentPage, page.pageSize, values).then((res) => {
         const data = res.data.data;

--
Gitblit v1.9.3