Browse Source

1、模块合并

liangluogis 1 month ago
parent
commit
49a211652f

src/widgets/LayerList copy/Widget.1.ts → src/widgets/LayerList - copy/Widget.1.ts


src/widgets/LayerList copy/Widget.html → src/widgets/LayerList - copy/Widget.html


+ 225 - 31
src/widgets/LayerList copy/Widget.ts

@@ -3,7 +3,10 @@ import Map = require("esri/map");
 import Layer = require("esri/layers/layer");
 import ArcGISTiledMapServiceLayer = require('esri/layers/ArcGISTiledMapServiceLayer');
 import ArcGISDynamicMapServiceLayer = require('esri/layers/ArcGISDynamicMapServiceLayer');
-
+import TDTLayer = require('Esri_Extjs/TDTLayer');
+import TDTAnnoLayer = require('Esri_Extjs/TDTAnnoLayer');
+import TDTImgAnnoLayer = require('Esri_Extjs/TDTImgAnnoLayer');
+import TDTImgLayer = require('Esri_Extjs/TDTImgLayer');
 
 export = LayerList;
 //是否需要监听map比例尺,同步各图层可见性
@@ -28,6 +31,8 @@ class LayerList extends BaseWidget {
 
     };
     private pipe_layer_template: string = "<li class=\"<%=list_group_item_class%>\"><label for=\"<%=layerindex%>-checkbox\"><%=layername%></label><input type=\"checkbox\" id=\"<%=layerindex%>-checkbox\" data-source-layer-index=\"<%=layerindex%>\"  data-source-check-group=\"<%=checkgroup%>\" class=\"pull-right  <%=list_group_check_item_class%>\"></li>";
+    /** 当前使用的基础图层集合 */
+    private current_baselayers = [];
 
     startup() {
         this.map = this.AppX.runtimeConfig.map;
@@ -43,6 +48,7 @@ class LayerList extends BaseWidget {
 
     private onPanelInit() {
         this.initEvent();
+        this.current_baselayers = this.AppX.appConfig.companyId == '1' ? this.config.baselayers2 : this.config.baselayers;
         this.beginGetLayerInfors();
     };
     private initEvent() {
@@ -186,43 +192,189 @@ class LayerList extends BaseWidget {
                     if (url.substring(url.lastIndexOf("/") + 1, url.length) != "MapServer") {
                         BaseUrl = url.substring(0, url.lastIndexOf("/"));
                     }
-                    else
+                    else {
+                        BaseUrl = url;
+                    }
+                    if (!BaseUrl) {
                         BaseUrl = url;
+                    }
                 }
                 if (url.substring(url.lastIndexOf("/") + 1, url.length) != "MapServer") {
                     var id = parseInt(url.substring(url.lastIndexOf("/") + 1, url.length));
-                    sublayerid.push(id);
+                    if (id === id) {
+                        sublayerid.push(id);
+                    }
                 }
             }
-
         }
+
         if (layer) {
-            this.updateLayerVisibility(BaseUrl, sublayerid, layer.type, checked);
+            this.updateLayerVisibility(BaseUrl, sublayerid, layer.type, checked, dataIdx);
+            if (BaseUrl == "tian_online_vector" || BaseUrl == "tian_online_raster") {
+                this.updateLayerVisibility(BaseUrl + "_l", sublayerid, layer.type, checked);
+            }
         }
+
         //影像图层和地形图层互斥
         if (checked == true) {
             var nodes = this.treeObj.getNodes()
-
             if (layer.id == "raster") {
-                var node = nodes.filter(function (item) { return item.layerid == "terrain" })[0]
-                if (node != null) {
-                    node.checked = false;
-                    this.treeObj.updateNode(node, false)
-                    var layerinfo = JSON.parse(node.layerinfo)
-                    this.updateLayerVisibility(layerinfo.url, [], layerinfo.type, false)
-                }
+                // var node = nodes.filter(function (item) { return item.layerid == "terrain" })[0]
+                // if (node != null) {
+                //     node.checked = false;
+                //     this.treeObj.updateNode(node, false)
+                //     var layerinfo = JSON.parse(node.layerinfo)
+                //     this.updateLayerVisibility(layerinfo.url, [], layerinfo.type, false)
+                // }
+
+                // var hideLayerIds = ["terrain", "tian_online_vector", "tian_online_raster"];
+                // $.each(hideLayerIds, function (index, layerIdItem) {
+                //     var node = nodes.filter(function (item) { return item.layerid == layerIdItem })[0]
+                //     if (node != null) {
+                //         node.checked = false;
+                //         this.treeObj.updateNode(node, false)
+                //         var layerinfo = JSON.parse(node.layerinfo)
+                //         // this.updateLayerVisibility(layerinfo.url, [], layerinfo.type, false);
+                //         // this.updateLayerVisibility(layerinfo.url + "_l", sublayerid, layerinfo.type, false);
+
+                //         if (layerIdItem.indexOf('tian_online_') > -1) {
+                //             var layer = this.findLayerInMap(layerinfo.url);
+                //             if (layer) {
+                //                 this.map.removeLayer(layer);//删除隐藏的图层
+                //             }
+
+                //             layer = this.findLayerInMap(layerinfo.url + "_l");
+                //             if (layer) {
+                //                 this.map.removeLayer(layer);//删除隐藏的图层
+                //             }
+                //         } else{
+                //             this.updateLayerVisibility(layerinfo.url, [], layerinfo.type, false);
+                //         }
+                //     }
+                // }.bind(this));
+                this.hideLayers(['terrain', 'tian_online_vector', 'tian_online_raster'], sublayerid);
             }
             else if (layer.id == "terrain") {
-                var node = nodes.filter(function (item) { return item.layerid == "raster" })[0]
-                if (node != null) {
-                    node.checked = false;
-                    this.treeObj.updateNode(node, false)
-                    var layerinfo = JSON.parse(node.layerinfo)
-                    this.updateLayerVisibility(layerinfo.url, [], layerinfo.type, false)
-                }
+                // var node = nodes.filter(function (item) { return item.layerid == "raster" })[0]
+                // if (node != null) {
+                //     node.checked = false;
+                //     this.treeObj.updateNode(node, false)
+                //     var layerinfo = JSON.parse(node.layerinfo)
+                //     this.updateLayerVisibility(layerinfo.url, [], layerinfo.type, false);
+                // }
+
+                // var hideLayerIds = ["raster", "tian_online_vector", "tian_online_raster"];
+                // $.each(hideLayerIds, function (index, layerIdItem) {
+                //     var node = nodes.filter(function (item) { return item.layerid == layerIdItem })[0]
+                //     if (node != null) {
+                //         node.checked = false;
+                //         this.treeObj.updateNode(node, false)
+                //         var layerinfo = JSON.parse(node.layerinfo)
+                //         // this.updateLayerVisibility(layerinfo.url, [], layerinfo.type, false);
+                //         // this.updateLayerVisibility(layerinfo.url + "_l", sublayerid, layerinfo.type, false);
+
+                //         if (layerIdItem.indexOf('tian_online_') > -1) {
+                //             var layer = this.findLayerInMap(layerinfo.url);
+                //             if (layer) {
+                //                 this.map.removeLayer(layer);//删除隐藏的图层
+                //             }
+
+                //             layer = this.findLayerInMap(layerinfo.url + "_l");
+                //             if (layer) {
+                //                 this.map.removeLayer(layer);//删除隐藏的图层
+                //             }
+                //         } else{
+                //             this.updateLayerVisibility(layerinfo.url, [], layerinfo.type, false);
+                //         }
+                //     }
+                // }.bind(this));
+                this.hideLayers(['raster', 'tian_online_vector', 'tian_online_raster'], sublayerid);
+            } else if (layer.id == "tian_online_raster") {
+                // var node = nodes.filter(function (item) { return item.layerid == "tian_online_vector" })[0]
+                // if (node != null) {
+                //     node.checked = false;
+                //     this.treeObj.updateNode(node, false)
+                //     var layerinfo = JSON.parse(node.layerinfo)
+                //     this.updateLayerVisibility(layerinfo.url, [], layerinfo.type, false);
+                //     this.updateLayerVisibility(layerinfo.url + "_l", sublayerid, layer.type, false);
+                // }
+
+                // var hideLayerIds = ["raster", "terrain", "tian_online_vector"];
+                // $.each(hideLayerIds, function (index, layerIdItem) {
+                //     var node = nodes.filter(function (item) { return item.layerid == layerIdItem })[0]
+                //     if (node != null) {
+                //         node.checked = false;
+                //         this.treeObj.updateNode(node, false)
+                //         var layerinfo = JSON.parse(node.layerinfo)
+                //         // this.updateLayerVisibility(layerinfo.url, [], layerinfo.type, false);
+                //         // this.updateLayerVisibility(layerinfo.url + "_l", sublayerid, layerinfo.type, false);
+
+                //         if (layerIdItem.indexOf('tian_online_') > -1) {
+                //             this.updateLayerVisibility(layerinfo.url, [], layerinfo.type, false);
+                //             this.updateLayerVisibility(layerinfo.url + "_l", sublayerid, layerinfo.type, false);
+                //         } else {
+                //             var layer = this.findLayerInMap(layerinfo.url);
+                //             if (layer) {
+                //                 this.map.removeLayer(layer);//删除隐藏的图层
+                //             }
+                //         }
+                //     }
+                // }.bind(this));
+                this.hideLayers(['raster', 'terrain', 'tian_online_vector'], sublayerid);
+            } else if (layer.id == "tian_online_vector") {
+                // var node = nodes.filter(function (item) { return item.layerid == "tian_online_raster" })[0]
+                // if (node != null) {
+                //     node.checked = false;
+                //     this.treeObj.updateNode(node, false)
+                //     var layerinfo = JSON.parse(node.layerinfo)
+                //     this.updateLayerVisibility(layerinfo.url, [], layerinfo.type, false);
+                //     this.updateLayerVisibility(layerinfo.url + "_l", sublayerid, layer.type, false);
+                // }
+
+                // var hideLayerIds = ["raster", "terrain", "tian_online_raster"];
+                // $.each(hideLayerIds, function (index, layerIdItem) {
+                //     var node = nodes.filter(function (item) { return item.layerid == layerIdItem })[0]
+                //     if (node != null) {
+                //         node.checked = false;
+                //         this.treeObj.updateNode(node, false)
+                //         var layerinfo = JSON.parse(node.layerinfo)
+                //         // this.updateLayerVisibility(layerinfo.url, [], layerinfo.type, false);
+                //         // this.updateLayerVisibility(layerinfo.url + "_l", sublayerid, layerinfo.type, false);
+
+                //         if (layerIdItem.indexOf('tian_online_') > -1) {
+                //             this.updateLayerVisibility(layerinfo.url, [], layerinfo.type, false);
+                //             this.updateLayerVisibility(layerinfo.url + "_l", sublayerid, layerinfo.type, false);
+                //         } else {
+                //             var layer = this.findLayerInMap(layerinfo.url);
+                //             if (layer) {
+                //                 this.map.removeLayer(layer);//删除隐藏的图层
+                //             }
+                //         }
+                //     }
+                // }.bind(this));
+                this.hideLayers(['raster', 'terrain', 'tian_online_raster'], sublayerid);
             }
         }
     };
+    /**
+    * @function 隐藏指定Id的图层
+    * @param layerIds 
+    */
+    private hideLayers(layerIds: any[], sublayerid: any[]) {
+        var nodes = this.treeObj.getNodes()
+        var nodes2 = nodes.filter(function (item) { return layerIds.indexOf(item.layerid) > -1 });
+        if (nodes2 != null) {
+            $.each(nodes2, function (index, node2) {
+                node2.checked = false;
+                this.treeObj.updateNode(node2, false);
+                var layerinfo = JSON.parse(node2.layerinfo);
+                this.updateLayerVisibility(layerinfo.url, [], layerinfo.type, false);
+                if (layerinfo.id.indexOf("tian_online") > -1) {//在线天地图服务图层的特殊处理
+                    this.updateLayerVisibility(layerinfo.url + "_l", sublayerid, layerinfo.type, false);
+                }
+            }.bind(this));
+        }
+    }
     private onLayerClick(event, treeId, treeNode) {
         if (treeNode.isParent) {
             this.treeObj.expandNode(treeNode, null, false, true, true);
@@ -232,8 +384,16 @@ class LayerList extends BaseWidget {
         }
 
     };
-    private updateLayerVisibility(url, sublayerid, type, visible) {
-        if (this.map) {
+    /**
+     * 
+     * @param url 
+     * @param sublayerid 
+     * @param type 
+     * @param visible 
+     * @param layerId 
+     */
+    private updateLayerVisibility(url, sublayerid, type, visible, layerId = '') {
+        if (this.map && url) {
             var layer = this.findLayerInMap(url);
             if (layer != null) {
                 if (sublayerid === undefined || sublayerid.length == 0)
@@ -247,17 +407,41 @@ class LayerList extends BaseWidget {
                 }
             }
             else {
-                if (url.substring(url.lastIndexOf("/") + 1, url.length) != "MapServer") {
+                if (visible == false) {
+                    return;
+                }
+                if (url == "tian_online_raster") {//处理在线天地图影像图
+                    var tdbaselayer1 = new TDTImgLayer();
+                    tdbaselayer1.id = "tian_online_raster";
+                    tdbaselayer1.visible = true;
+                    this.map.addLayer(tdbaselayer1, 0);//最底层
+                    var tdanolayer = new TDTImgAnnoLayer();
+                    tdanolayer.id = "tian_online_raster_l";
+                    tdanolayer.visible = true;
+                    this.map.addLayer(tdanolayer, 1);//第二层
+                } else if (url == "tian_online_vector") {//处理在线天地图矢量图
+                    var tdbaselayer = new TDTLayer();
+                    tdbaselayer.id = "tian_online_vector";
+                    tdbaselayer.visible = true;
+                    this.map.addLayer(tdbaselayer, 0);//最底层
+                    var tdanolayer = new TDTAnnoLayer();
+                    tdanolayer.id = "tian_online_vector_l";
+                    tdanolayer.visible = true;
+                    this.map.addLayer(tdanolayer, 1);//第二层
+                } else if (url.substring(url.lastIndexOf("/") + 1, url.length) != "MapServer") {
                     var baseUrl = url.substring(0, url.lastIndexOf("/"));
                     var id = url.substring(url.lastIndexOf("/") + 1, url.length);
                     sublayerid = [];
-                    sublayerid.push(parseInt(id));
+                    if (parseInt(id) === parseInt(id)) {
+                        sublayerid.push(parseInt(id));
+                    }
                     this.updateLayerVisibility(baseUrl, sublayerid, type, visible);
                 }
                 //zhuboyu 20171227
                 else {
                     if (type == "tiled") {
                         layer = new ArcGISTiledMapServiceLayer(url, { className: "tileLayer" });
+                        layer.id = layerId.indexOf('_') > -1 ? layerId : (layerId + "_0");
                         if (this.isBaseLayer(url))
                             this.map.addLayer(layer, 0);
                         else
@@ -275,7 +459,6 @@ class LayerList extends BaseWidget {
                                 layer.setVisibleLayers([sublayerid]);
                     }
                 }
-
             }
         }
     };
@@ -323,6 +506,9 @@ class LayerList extends BaseWidget {
                     var config = this.AppX.appConfig.gisResource[this.config.gridlayer].config[0];
                     var url = config.url;
                     var layer: Layer = this.findLayerInMap(url);
+                    // if(!layer){
+                    //     layer=this.map.getLayer(layername);
+                    // }
                     var visilble = false;
                     if (layer != null && layer.visible) {
                         if (layer.layerInfos.length == 1) {
@@ -439,8 +625,9 @@ class LayerList extends BaseWidget {
 
     private getBaseLayers() {
         var layers = [];
-        for (var i = 0; i < this.config.baselayers.length; i++) {
-            var layername = this.config.baselayers[i];
+
+        for (var i = 0; i < this.current_baselayers.length; i++) {
+            var layername = this.current_baselayers[i];
             if (this.AppX.appConfig.gisResource[layername] &&
                 this.AppX.appConfig.gisResource[layername].config.length > 0) {
                 var config = this.AppX.appConfig.gisResource[layername].config[0];
@@ -463,17 +650,24 @@ class LayerList extends BaseWidget {
         return layers;
     };
     private findLayerInMap(url) {
+        let layer = null;
         for (var i = 0; i < this.map.layerIds.length; i++) {
-            var layer = this.map.getLayer(this.map.layerIds[i]);
-            if (layer.url && layer.url == url)
+            const templayer = this.map.getLayer(this.map.layerIds[i]);
+            if (templayer.url && templayer.url == url) {
+                layer = templayer;
                 return layer;
+            }
+        }
+        if (!layer) {
+            layer = this.map.getLayer(url);
+            return layer;
         }
         return null;
     };
     private isBaseLayer(url) {
         var isBase = false;
-        for (var i = 0; i < this.config.baselayers.length; i++) {
-            var layername = this.config.baselayers[i];
+        for (var i = 0; i < this.current_baselayers.length; i++) {
+            var layername = this.current_baselayers[i];
             if (this.AppX.appConfig.gisResource[layername] &&
                 this.AppX.appConfig.gisResource[layername].config.length > 0) {
                 var config = this.AppX.appConfig.gisResource[layername].config[0];

+ 6 - 0
src/widgets/LayerList - copy/config.json

@@ -0,0 +1,6 @@
+{
+    "gridlayer":"",
+    "optionallayers":["optionmap", "pipe"],
+    "baselayers":["tian_online_raster", "tian_online_vector"],
+    "baselayers2":["tian_online_raster", "tian_online_vector", "raster"]
+}

src/widgets/LayerList copy/css/style.scss → src/widgets/LayerList - copy/css/style.scss


src/widgets/LayerList copy/images/icon.png → src/widgets/LayerList - copy/images/icon.png


+ 0 - 5
src/widgets/LayerList copy/config.json

@@ -1,5 +0,0 @@
-{
-    "gridlayer":"",
-    "optionallayers":["optionmap","pipe"],
-    "baselayers":["raster","terrain"]
-}

+ 0 - 27
src/widgets/LayerList_old/Widget.html

@@ -1,27 +0,0 @@
-<div class="wideget-layerlist">
-	<div class="container">
-		<ul class="nav nav-tabs">
-			<li class="nav-item active">
-				<a data-toggle="tab" class="nav-link active show" href=".wideget-layerlist .layer-pipe">图层列表</a>
-			</li>
-		</ul>
-		<div class="tab-content">
-			<div role="tabpanel" class="tab-pane fade in active layer-pipe show">
-				<ul class="nav nav-pills nav-stacked pipe-layers list-group">
-					
-				</ul>
-			</div>
-			<div role="tabpanel" class="tab-pane fade layer-base">
-				<ul class="nav nav-pills nav-stacked base-layers list-group">
-					
-				</ul>
-			</div>
-			<div role="tabpanel" class="tab-pane fade layer-grid">
-			<ul class="nav nav-pills nav-stacked grid-layers list-group">
-					
-				</ul>
-			</div>
-		</div>
-	</div>
-	<div id="tree"></div>
-</div>

+ 0 - 359
src/widgets/LayerList_old/Widget.ts

@@ -1,359 +0,0 @@
-import BaseWidget = require('core/BaseWidget.class');
-import Map = require("esri/map");
-import Layer = require("esri/layers/layer");
-import ArcGISTiledMapServiceLayer = require('esri/layers/ArcGISTiledMapServiceLayer');
-import ArcGISDynamicMapServiceLayer = require('esri/layers/ArcGISDynamicMapServiceLayer');
-
-
-export = LayerList;
-//是否需要监听map比例尺,同步各图层可见性
-class LayerList extends BaseWidget {
-    // panel: MapPanel;
-    private map: Map;
-    private layers: any[] = [];
-    private innerCheckLock = false;//标记是否是组件内部引起的图层可见性变化
-    // private data: any = {};
-    baseClass: string = "wideget-layerlist";
-    private css = {
-        list_group_item_class: 'list-group-item',
-        list_group_check_item_class: 'list-group-item-check',
-        pipeLayerGroup_class: 'pipe-layers',
-        baseLayerGroup_class: 'base-layers',
-        gridLayerGroup_class: 'grid-layers',
-    };
-
-    private attr = {
-
-    };
-    private pipe_layer_template: string = "<li class=\"<%=list_group_item_class%>\"><label for=\"<%=layerindex%>-checkbox\"><%=layername%></label><input type=\"checkbox\" id=\"<%=layerindex%>-checkbox\" data-source-layer-index=\"<%=layerindex%>\"  data-source-check-group=\"<%=checkgroup%>\" class=\"pull-right  <%=list_group_check_item_class%>\"></li>";
-    startup() {
-        this.map = this.AppX.runtimeConfig.map;
-        this.setHtml(this.template);
-        //广播插件已加载
-        this.onPanelInit();
-    }
-
-    destroy() {
-        this.domObj.off('click', '.' + this.css.list_group_item_class, this.onListClick)
-            .off('change', 'input', this.onLayerCheckChange);
-        // ("layer-suspend", this.onLayerVisibleChanged.bind(this));            
-        this.afterDestroy();
-    }
-
-
-
-    onPanelInit() {
-        this.initEvent();
-        this.beginGetLayerInfors();
-    }
-    private initEvent() {
-        //
-        this.domObj.on('click', '.' + this.css.list_group_item_class, this.onListClick.bind(this))
-            .on('change', 'input', this.onLayerCheckChange.bind(this));
-        //
-        this.map.on("layer-suspend", this.onLayerVisibleChanged.bind(this));
-        //地图重新绘制后调用
-        this.map.on("layer-resume", this.onLayerVisibleChanged.bind(this));
-    }
-
-    private onLayerVisibleChanged(arg) {
-        if (!this.innerCheckLock) this.checkLayerVisible();
-    }
-
-    private checkLayerVisible() {
-        for (var i = 0; i < this.layers.length; i++) {
-            var layer = this.layers[i];
-            var visible = this.findLayerVisible(layer);
-            var target = this.domObj.find("input[data-source-layer-index='" + layer.id + "']");//prop('checked', !checked);
-            if (target) {
-                target.prop('checked', visible);
-            }
-        }
-    }
-
-    private findLayerVisible(layer) {
-        if (this.map) {
-            var url = layer.url;
-            var sublayerid = layer.sublayerid;
-            var type = layer.type;
-            var layer: any = this.findLayerInMap(url);
-            var visilble = false;
-            if (layer != null) {
-                if (sublayerid === undefined)
-                    return layer.visible;
-                else {
-                    if (_.findIndex(layer.visibleLayers, function (o: any) { return o == sublayerid }) == -1) {
-                        return false;
-                    }
-                    else
-                        return true;
-                }
-            }
-            else return false;
-        }
-        return false;
-    }
-
-    private onListClick(event) {
-        this.innerCheckLock = true;
-        var target = $(event.target);
-        var checkbox = target.find('input');
-        var checked = checkbox.prop("checked");
-        checkbox.prop("checked", !checked);
-        checkbox.trigger('change');
-    }
-    /**
-    * (方法说明)在指定的tab页中加入图层信息
-    * @method (方法名)
-    * @for (所属类名)
-    * @param {(参数类型)} (参数名) (参数说明)
-    * @return {(返回值类型)} (返回值说明)
-    */
-    private buildLayerItemOnUI(layerInfors: any[], groudSelector) {
-        // $("." + this.baseClass + " ." + groudSelector).empty();
-        $.each(layerInfors, function (index, layer) {
-            var that: LayerList = this;
-            var mixedTemplate = _.template(that.pipe_layer_template)({
-                layername: layer.name,
-                list_group_item_class: that.css.list_group_item_class,
-                list_group_check_item_class: that.css.list_group_check_item_class,
-                layerindex: layer.id,
-                checkgroup: layer.checkgroup
-            });
-            var node: JQuery = $(mixedTemplate).appendTo($("." + that.baseClass + " ." + groudSelector));
-            if (layer.checked)
-                node.find('.' + that.css.list_group_check_item_class).prop("checked", true);
-            //node.on('change', this.onLayerCheckChange.bind(this));
-        }.bind(this));
-        // $("." + this.baseClass + " ." + this.css.list_group_check_item_class).off().on('change', this.onLayerCheckChange.bind(this));
-    };
-
-    private onLayerCheckChange(event) {
-        this.innerCheckLock = true;
-        var target = $(event.target);
-        var dataIdx = target.attr("data-source-layer-index");
-        var datacheckgroup = target.attr("data-source-check-group");
-        var checked = target.prop("checked");
-        var layer = _.findLast(this.layers, function (item) {
-            return item.id == dataIdx;
-        });
-
-        if (checked)
-            this.domObj.find("input[data-source-check-group='" + datacheckgroup + "']").not(target).prop('checked', !checked).trigger('change');
-        if (layer) {
-            this.updateLayerVisibility(layer.url, layer.sublayerid, layer.type, checked);
-            this.innerCheckLock = false;
-        }
-    };
-
-    private updateLayerVisibility(url, sublayerid, type, visible) {
-        if (this.map) {
-            var layer: any = this.findLayerInMap(url);
-            var visilble = false;
-            if (layer != null) {
-                if (sublayerid === undefined)
-                    layer.setVisibility(visible);
-                if (sublayerid !== undefined) {
-                    if (visible)
-                        layer.setVisibleLayers([sublayerid]);
-                    else {
-                        layer.setVisibleLayers([]);
-                    }
-                }
-            }
-            else {
-                if (type == "tiled") {
-                    layer = new ArcGISTiledMapServiceLayer(url, { className: "tileLayer" });
-                    if (this.isBaseLayer(url))
-                        this.map.addLayer(layer, 0);
-                    else
-                        this.map.addLayer(layer);
-                    layer.setVisibility(visible);
-                } else if (type == "dynamic") {
-
-                    layer = new ArcGISDynamicMapServiceLayer(url, { className: "dynamicLayer" });
-                    if (this.isBaseLayer(url))
-                        this.map.addLayer(layer, 0);
-                    else
-                        this.map.addLayer(layer);
-                    if (sublayerid !== undefined)
-                        if (visible)
-                            layer.setVisibleLayers([sublayerid]);
-                }
-            }
-        }
-    }
-
-    private contains(arr, obj) {
-        var i = arr.length;
-        while (i--) {
-            if (arr[i] === obj) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-
-
-    //region  网格服务处理
-
-    //获取网格数据
-    private beginGetLayerInfors() {
-        // if (this.AppX.appConfig.gisResource[this.config.gridlayer] &&
-        //     this.AppX.appConfig.gisResource[this.config.gridlayer].config.length > 0) {
-        //     var url = this.AppX.appConfig.gisResource[this.config.gridlayer].config[0].url + "?f=pjson";
-        //     if ($.ajax) {
-        //         $.ajax({
-        //             url: esri.config.defaults.io.alwaysUseProxy ? esri.config.defaults.io.proxyUrl + "?" + url : url,
-        //             type: "get",
-        //             dataType: "json",
-        //             success: this.onQueryGridSuccess.bind(this),
-        //             error: this.onQueryGridError.bind(this)
-        //         });
-        //     }
-        // }
-        // //没有配置网格数据
-        // else {
-            // this.AppX.runtimeConfig.toast.Show("未配置网格数据!");
-            var layers = [];
-            var optionLayers = this.getOptionalLayers();
-            var baseLayers = this.getBaseLayers();
-            layers = layers.concat(optionLayers);
-            this.layers = layers = layers.concat(baseLayers);
-            this.buildLayerItemOnUI(layers, this.css.pipeLayerGroup_class);
-        // }
-    }
-
-    //网格数据出错回调
-    private onQueryGridError(data) {
-        this.AppX.runtimeConfig.toast.show("获取网格数据失败!");
-    }
-
-    //网格数据成功回调
-    private onQueryGridSuccess(data) {
-        var layers = [];
-        if (data && this.AppX.appConfig.gisResource[this.config.gridlayer]) {
-            for (var i = 0; i < data.layers.length; i++) {
-                if (data.layers[i].subLayerIds == null) {
-                    var config = this.AppX.appConfig.gisResource[this.config.gridlayer].config[0];
-                    var url = config.url;
-                    var layer: any = this.findLayerInMap(url);
-
-                    var visilble = false;
-                    if (layer != null && layer.visible) {
-                        var visibleIds = layer.visibleLayers;
-                        if (this.contains(visibleIds, data.layers[i].id))
-                            visilble = true;
-                        else visilble = false;
-                    }
-                    else
-                        visilble = false;
-
-                    var layerObject = {
-                        name: data.layers[i].name,
-                        id: data.layers[i].id,
-                        defaultVisibility: data.layers[i].defaultVisibility,
-                        checked: visilble,
-                        minScale: data.layers[i].minScale,
-                        maxScale: data.layers[i].maxScale,
-                        url: url,
-                        sublayerid: data.layers[i].id,
-                        checkgroup: "grid",
-                        type: this.AppX.appConfig.gisResource[this.config.gridlayer].type
-                    };
-                    layers.push(layerObject);
-                }
-            }
-        }
-        var optionLayers = this.getOptionalLayers();
-        var baseLayers = this.getBaseLayers();
-        layers = layers.concat(optionLayers);
-        this.layers = layers = layers.concat(baseLayers);
-        this.buildLayerItemOnUI(layers, this.css.pipeLayerGroup_class);
-    }
-
-    //endregion
-
-
-    //根据config.optionallayers,根据原有地图可见性,对管线、注记处理为相应地图对象
-    private getOptionalLayers() {
-        var layers = [];
-        for (var i = 0; i < this.config.optionallayers.length; i++) {
-            var layername = this.config.optionallayers[i];
-            if (this.AppX.appConfig.gisResource[layername] &&
-                this.AppX.appConfig.gisResource[layername].config.length > 0) {
-                for (var j = 0; j < this.AppX.appConfig.gisResource[layername].config.length; j++) {
-                    var config = this.AppX.appConfig.gisResource[layername].config[j];
-                    var layer = this.findLayerInMap(config.url);
-                    var visilble = false;
-                    if (layer != null && layer.visible)
-                        visilble = true;
-                    var layerObject = {
-                        name: config.name,
-                        id: layername + "_" + j,
-                        defaultVisibility: true,
-                        checked: visilble,
-                        url: config.url,
-                        checkgroup: layername + "_" + j,
-                        type: this.AppX.appConfig.gisResource[layername].type
-                    };
-                    layers.push(layerObject);
-                }
-            }
-        }
-        return layers;
-    }
-
-    //根据config.baselayers,根据原有地图可见性,对地形、影像地图处理为相应地图对象
-    private getBaseLayers() {
-        var layers = [];
-        for (var i = 0; i < this.config.baselayers.length; i++) {
-            var layername = this.config.baselayers[i];
-            if (this.AppX.appConfig.gisResource[layername] &&
-                this.AppX.appConfig.gisResource[layername].config.length > 0) {
-                var config = this.AppX.appConfig.gisResource[layername].config[0];
-                var layer = this.findLayerInMap(config.url);
-                var visilble = false;
-                if (layer != null && layer.visible)
-                    visilble = true;
-                var layerObject = {
-                    name: config.name,
-                    id: layername,
-                    defaultVisibility: true,
-                    checked: visilble,
-                    url: config.url,
-                    checkgroup: "baselayers",
-                    type: this.AppX.appConfig.gisResource[layername].type
-                };
-                layers.push(layerObject);
-            }
-        }
-        return layers;
-    }
-
-    //获取图层地址为URL的图层对象
-    private findLayerInMap(url) {
-        for (var i = 0; i < this.map.layerIds.length; i++) {
-            var layer = this.map.getLayer(this.map.layerIds[i]);
-            if (layer.url && layer.url == url)
-                return layer;
-        }
-        return null;
-    }
-
-    //
-    private isBaseLayer(url) {
-        var isBase = false;
-        for (var i = 0; i < this.config.baselayers.length; i++) {
-            var layername = this.config.baselayers[i];
-            if (this.AppX.appConfig.gisResource[layername] &&
-                this.AppX.appConfig.gisResource[layername].config.length > 0) {
-                var config = this.AppX.appConfig.gisResource[layername].config[0];
-                if (url == config.url)
-                    isBase = true;
-            }
-        }
-        return isBase;
-    }
-}

+ 0 - 5
src/widgets/LayerList_old/config.json

@@ -1,5 +0,0 @@
-{
-    "gridlayer":"grid",
-    "optionallayers":["poi","optionmap","pipe"],
-    "baselayers":["privateterrain","raster","terrain"]
-}

+ 0 - 45
src/widgets/LayerList_old/css/style.scss

@@ -1,45 +0,0 @@
-.wideget-layerlist {
-    padding-top:5px;
-    padding:8px;
-    .container {
-        width: auto;
-        padding: 0px;
-    }
-    .nav-tabs {
-        li>a {
-            padding: 5px 10px;
-        }
-    }
-    .nav-pills {
-        li {
-            background-color: rgba(255, 255, 255, 0.404);
-            cursor: pointer;
-            padding: 5px;
-            margin-bottom: 0;
-            &:first-child {
-                margin-top: 2px;
-            }
-            &:hover {
-                background-color: rgba(82, 121, 173, 0.404);
-            }
-            label {
-                margin-bottom: 0;
-                font-weight: initial;
-                cursor: pointer;
-            }
-            input{
-                float: right;
-                margin-top: 6px;
-            }
-        }
-    }
-    .input-group .form-control {
-        z-index: auto;
-    }
-    a.active {
-        z-index: auto;
-        &:hover {
-            z-index: auto;
-        }
-    }
-}

BIN
src/widgets/LayerList_old/images/icon.png


+ 110 - 0
src/widgets/PlanSearchWithSid/Widget.html

@@ -0,0 +1,110 @@
+<div class='widget-PlanSearchWithSid box'>
+    <div class="PlanSearchWithSid_toolbar boxtool">
+        <div class="form-inline">
+
+            <div class="form-group">
+                <label for="region">任务创建人</label>
+                <input class="input-sm form-control createUser" id="createUser"></input>
+            </div>
+            <div class="form-group">
+                <label for="plan_begindate">巡检日期</label>
+                <input type="text" readonly="readonly" class="form-control plan_begindate minwidth" id="plan_begindate" placeholder="年-月-日">
+                <label for="plan_enddate">~</label>
+                <input type="text" readonly="readonly" class="form-control plan_enddate minwidth" id="plan_enddate" placeholder="年-月-日">
+            </div>
+            <div id="toolbar" class=" btn-group btn-group-sm toolbar">
+                <div class="form-group">
+                    <button type="button" class="btn-search">
+                        查询
+                    </button>
+                </div>
+            </div>
+        </div>
+    </div>
+    <div class="halfpaneltable PlanSearchWithSidInfo boxcontent">
+        <table class="table table-bordered  table-striped" id='PlanSearchWithSidInfo_table' cellspacing="0">
+            <thead></thead>
+            <tbody></tbody>
+        </table>
+    </div>
+    <!-- <div class="halfpaneltable PlanSearchWithSid_content boxcontent">
+        <table class="table table-bordered  table-striped" id='planslist_table' cellspacing="0">
+        </table>
+    </div> -->
+</div>
+$$
+<div class='widget-PlanSearchWithSid-Info box'>
+    <div class="returnSearchDiv">
+        <div class="form-group">
+            <label for="region">设备编码</label>
+            <input class="input-sm form-control searchCode" id="searchCode"></input>
+        </div>
+        <button type="button" class="btn btn-default btn-primary searchCodebutton">
+            <span  aria-hidden="true">计划所有设备查询
+        </button>
+        <button type="button" class="btn btn-default btn-primary searchCodebuttonByCode">
+            <span  aria-hidden="true">指定设备查看
+        </button>
+        <button type="button" class="btn btn-default btn-primary returnSearch">
+        </span>返回
+        </button>
+        <!-- <button id="btn_export" type="button" class="btn btn-sm btn-default btn-success btn_exportExcel" style="display:none !important;">
+                <span class="glyphicon glyphicon-export" aria-hidden="true"></span>导出
+        </button> -->
+    </div>
+    <!-- <div class="halfpaneltable PlanSearchWithSidInfo boxcontent">
+        <table class="table table-bordered  table-striped" id='PlanSearchWithSidInfo_table' cellspacing="0">
+            <thead></thead>
+            <tbody></tbody>
+        </table>
+    </div> -->
+</div>
+$$
+<div class='checkContent widget-PlanSearchWithSid-Pop'>
+<span class='checkContentInfo'></span>
+</div>
+$$
+<div class='checkContent widget-PlanSearchWithSid-Pop'>
+    <table class='table table-bordered  table-striped'  cellspacing="0">
+        <thead>
+            <tr>
+                <th>检查类型</th>
+                <th>检查结果</th>
+            </tr>
+        </thead>
+        <tbody class='checkContentInfo'></tbody>
+    </table>
+</div>
+$$
+<div class=".widget-PlanSearchWithSid-Pop">
+    <div class="title">设备设施运行、维修、保养登记表</div>
+    <div style="text-align: center;">
+        <table class="device_table" style="margin: auto;">
+            <tr>
+                <td>设备名称</td>
+                <td>型号</td>
+                <td>主要技术参数</td>
+                <td>已使用年限</td>
+            </tr>
+            <tr>
+                <td><%=totalWeight%></td>
+                <td><%=totalWeight%></td>
+                <td><%=totalWeight%></td>
+                <td><%=totalWeight%></td>
+            </tr>
+            <tr>
+                <td></td>
+                <td><%=originalValue%></td>
+            </tr>
+            <tr>
+                <td></td>
+                <td><%=originalValue%></td>
+            </tr>
+
+        </table>
+    </div>
+</div>
+$$
+<div class="check_content">
+
+</div>

+ 751 - 0
src/widgets/PlanSearchWithSid/Widget.ts

@@ -0,0 +1,751 @@
+import BaseWidget = require('core/BaseWidget.class');
+import Functions = require('core/Functions.module');
+import Extent = require('esri/geometry/Extent');
+import Point = require("esri/geometry/Point");
+import GraphicsLayer = require("esri/layers/GraphicsLayer");
+import Graphic = require("esri/graphic");
+import PictureMarkerSymbol = require("esri/symbols/PictureMarkerSymbol");
+import TextSymbol = require("esri/symbols/TextSymbol");
+import Font = require("esri/symbols/Font");
+import ScreenPoint = require('esri/geometry/ScreenPoint');
+import Draw = require('esri/toolbars/draw');
+import SimpleMarkerSymbol = require('esri/symbols/SimpleMarkerSymbol');
+import Color = require("esri/Color");
+import Polygon = require('esri/geometry/Polygon');
+import SimpleLineSymbol = require('esri/symbols/SimpleLineSymbol');
+import SimpleFillSymbol = require('esri/symbols/SimpleFillSymbol');
+import Geoprocessor = require("esri/tasks/Geoprocessor");
+import Polyline = require('esri/geometry/Polyline');
+import geometryEngine = require("esri/geometry/geometryEngine");
+import MapSet = require("common/MapSet.class");
+import AjaxSend = require("common/AjaxSend.class")
+import ArcGISDynamicMapServiceLayer = require('esri/layers/ArcGISDynamicMapServiceLayer');
+enum selectType {
+    all, single
+}
+enum hideOrShow {
+    hide, show
+}
+export = PlanSearchWithSid;
+declare var Date;
+class PlanSearchWithSid extends BaseWidget {
+    baseClass = "widget-PlanSearchWithSid";
+    /**根据这个图层id前缀来控制图层模块切换时展示和隐藏,展示本模块图层,隐藏其它模块的图层*/
+    preLayerId = 'HalfPanel' + this.baseClass;
+    map = null;
+    toast = null;
+    popup = null;
+    loadWait = null;
+    plan_pontype_layer: GraphicsLayer;//巡检任务计划片区图层
+    planLayer: GraphicsLayer;//巡检任务计划片区图层
+    plan_ptype_layer: GraphicsLayer;//显示具体巡检任务包含的巡检设备信息图层
+    selectLayer: GraphicsLayer;//选中的点或者线
+    dynamicMapServer: ArcGISDynamicMapServiceLayer
+    ajaxSend = null;
+    mapSet = null
+    distanceInfo = 50;
+    allSearchList = [];
+    companyid = "";//公司id
+    regionid = "";
+    regionname = "";
+    //修改计划参数
+    copyPopup = null;//复制弹出窗
+    currentRegionPolygon = null;//当前选中片区
+    dataTable_r = null;
+    dataTable_current = null;//已选择的管线的datatable对象
+    private deviceTypes = null;//记录巡检类型配置集合
+    gp = null;
+    analyzeUrl = "";
+    datalength = 0;
+    mapServerUrl = "";
+    objectids = [];
+    jobid = "";
+    dataTable_all = null;//巡检查询列表
+    dataTable_all_searchInfo = {};//巡检查询条件
+    dataTable_plan = null;
+    dataTable_planInfo = null;
+
+
+    /**
+     * @function 启动初始化
+     */
+    startup() {
+        this.configure();
+        this.initHtml();
+        // this.getPlanLayers();
+        this.initEvent();
+    }
+
+    /**
+     * @function 配置初始化
+     */
+    configure() {
+        this.toast = this.AppX.runtimeConfig.toast;
+        this.popup = this.AppX.runtimeConfig.popup;
+        this.map = this.AppX.runtimeConfig.map;
+        this.ajaxSend = new AjaxSend();
+        this.loadWait = this.AppX.runtimeConfig.loadWait;
+        this.mapSet = new MapSet();
+        if (this.AppX.appConfig.gisResource.filterMapRQ.config.length > 0) {
+            this.analyzeUrl = this.AppX.appConfig.gisResource.filterMapRQ.config[0].url;
+            this.mapServerUrl = this.AppX.appConfig.gisResource.filterMapRQ.config[1].url;
+        } else {
+            this.toast.show("图层过滤服务未配置");
+        }
+
+        if (!this.plan_pontype_layer) {
+
+            this.plan_pontype_layer = new GraphicsLayer();
+            this.plan_pontype_layer.id = this.preLayerId + "plan_pontype_layer";
+            this.map.addLayer(this.plan_pontype_layer);
+        }
+
+        if (!this.plan_ptype_layer) {
+            this.plan_ptype_layer = new GraphicsLayer();
+            this.plan_ptype_layer.id = this.preLayerId + "plan_ptype_layer";
+            this.map.addLayer(this.plan_ptype_layer);
+        }
+        if (!this.planLayer) {
+            this.planLayer = new GraphicsLayer();
+            this.planLayer.id = this.preLayerId + "planLayer";
+            this.map.addLayer(this.planLayer);
+        }
+        if (!this.selectLayer) {
+            this.selectLayer = new GraphicsLayer();
+            this.selectLayer.id = this.preLayerId + "selectLayer";
+            this.map.addLayer(this.selectLayer);
+        }
+    }
+
+    /**
+     * @function 初始化页面
+     */
+    initHtml() {
+        var html = _.template(this.template.split('$$')[0] + "</div>")();
+        this.setHtml(html);
+        this.ready();
+    }
+
+    /**
+     * @function 根据登录账号(集团公司账号、子公司账号、部门账号)初始化
+     */
+    initLoginUser() {
+        this.configTimes();
+        this.domObj.find(".planslist-title").empty().append(this.template.split('$$')[10]);
+        this.companyid = this.AppX.appConfig.deptId;
+    }
+
+    planEnddate = {
+        format: 'YYYY-MM-DD', //日期格式
+        isinitVal: false,
+        minDate: "2017-08-28"
+    }
+
+    planBegindate = {
+        format: 'YYYY-MM-DD', //日期格式
+        isinitVal: false,
+        okfun: function (obj) {
+            var dt = new Date(obj.val.replace(/-/g, "/"));
+            this.planEnddate.minDate = Functions.DateFormat(dt, "yyyy-MM-dd");
+            this.domObj.find(".plan_enddate").val(this.planEnddate.minDate);
+        }.bind(this)
+    }
+
+    /**
+     * @function 配置时间控件
+     */
+    configTimes() {
+        $.jeDate("." + this.baseClass + " .plan_begindate", this.planBegindate);
+        $.jeDate("." + this.baseClass + " .plan_enddate", this.planEnddate);
+    }
+
+    /**
+     * @function 初始化相关事件
+     * 时间控件、部门与人员列表、部门变化事件
+     */
+    initEvent() {
+        this.initLoginUser();
+        //查询计划
+        this.domObj.find(".btn-search").off("click").on("click", function () {
+            this.getPlanInfo()
+        }.bind(this));
+        this.getPlanInfo()
+    }
+
+    /**
+     * @function 初始化巡检计划列页面值
+     */
+    initEventVal() {
+        this.domObj.empty().append(this.template.split('$$')[0] + "</div>");
+        this.initEvent();
+    }
+
+    // /**
+    //  * 获取设备类型
+    //  * */
+    // getPlanLayers() {
+    //     let data = {
+    //         current: 1,
+    //         size: 1000
+    //     }
+    //     this.ajaxSend.sendAjax(this, data, this.config.getLayerId, this.ajaxSend.type.get, function (results) {
+    //         if (results.code != -1) {
+    //             this.deviceTypes = results.result.records
+    //         }
+    //     }.bind(this));
+    // }
+
+    //设置点、线或多边形的样式
+    setGraphSymbol(type, size?) {
+        var symbol = {
+            "SimpleMarkerSymbol": null,
+            "SimpleLineSymbol": null,
+            "SimpleFillSymbol": null,
+        };
+        switch (type) {
+            case "point":
+                symbol.SimpleMarkerSymbol = new SimpleMarkerSymbol(
+                    {
+                        color: new Color(this.config.color),
+                        style: "diamond",       //点样式solid\cross\square|diamond|circle|x
+                        outline: {
+                            color: new Color(this.config.color),
+                            width: 0.2
+                        }
+                    }
+                );
+                break;
+            case "polyline":
+                symbol.SimpleLineSymbol = new SimpleLineSymbol({
+                    color: new Color(this.config.color),
+                    style: "solid",   //线的样式 dash|dash-dot|solid等
+                    width: size ? size : 3
+                });
+                break;
+            case "polygon":
+                symbol.SimpleFillSymbol = new SimpleFillSymbol({
+                    color: new Color([0, 0, 255, 0.5]),
+                    style: "solid",
+                    outline: {
+                        color: new Color(this.config.color),
+                        width: 1
+                    }
+                });
+                break;
+        }
+        if (symbol.SimpleMarkerSymbol != null) {
+            return symbol.SimpleMarkerSymbol;
+        } else if (symbol.SimpleLineSymbol != null) {
+            return symbol.SimpleLineSymbol;
+        } else {
+            return symbol.SimpleFillSymbol;
+        }
+    }
+
+    /**
+     * @function 设置渲染符号
+     * @param type(point,polyline,polygon)
+     * @param color颜色([0,0,0,1])
+     * @param size
+     */
+    setGraphSymbolByType(type, color, size) {
+        var symbol = {
+            "SimpleMarkerSymbol": null,
+            "SimpleLineSymbol": null,
+            "SimpleFillSymbol": null,
+        };
+        switch (type) {
+            case "point":
+                symbol.SimpleMarkerSymbol = new SimpleMarkerSymbol(
+                    {
+                        color: new Color(color),
+                        style: "diamond",       //点样式solid\cross\square|diamond|circle|x
+                        outline: {
+                            color: new Color(color),
+                            width: size
+                        }
+                    }
+                );
+                break;
+            case "polyline":
+                symbol.SimpleLineSymbol = new SimpleLineSymbol({
+                    color: new Color(color),
+                    style: "solid",   //线的样式 dash|dash-dot|solid等
+                    width: size
+                });
+                break;
+            case "polygon":
+                symbol.SimpleFillSymbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID,
+                    new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,
+                        new Color(color), size), new Color([0, 0, 0, 0.1]));
+                break;
+        }
+        if (symbol.SimpleMarkerSymbol != null) {
+            return symbol.SimpleMarkerSymbol.setSize(size);
+        } else if (symbol.SimpleLineSymbol != null) {
+            return symbol.SimpleLineSymbol;
+        } else {
+            return symbol.SimpleFillSymbol;
+        }
+    }
+
+    //设置点的样式
+    setSymbol(txt?) {
+        var symbol = [];
+        var fillSymbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASHDOT, new Color([255, 0, 0]), 2), new Color([0, 0, 0, 0.1]));
+        var fillSymbol2 = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255, 255, 0]), 2), new Color([255, 255, 255, 0.3]));
+        var peopleSymbol = new PictureMarkerSymbol(this.config.MarkPictureSymbol, 24, 24);
+        //根据字长度设置背景图片宽度
+        var peopletextSymbol = new PictureMarkerSymbol(this.config.TextbgSymbol, txt == null ? 0 : txt.length * 90 / 6, 18);
+        var warnSymbol = new PictureMarkerSymbol(this.config.WarnMarkPictureSymbol, 24, 24);
+        var lineSymbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255, 0, 0]), 3);
+        symbol.push(peopleSymbol);
+        symbol.push(peopletextSymbol);
+        symbol.push(fillSymbol);
+        symbol.push(fillSymbol2);
+        symbol.push(warnSymbol);
+        symbol.push(lineSymbol);
+        return symbol;
+    }
+
+    /**
+     * @function 获取巡检计划详情
+     * @param data 查询的计划
+     */
+    getPlanInfo() {
+        let senddata = {
+            sid: window.tempSearchXjHalf.searchSid.sid,
+            startTime: this.domObj.find(".plan_begindate").val(),
+            endTime: this.domObj.find(".plan_enddate").val(),
+            size: 100000,
+            current: 1
+        }
+        this.allSearchList = [];
+        this.ajaxSend.sendAjax(this, senddata, this.config.planInfo, this.ajaxSend.type.get, function (results) {
+            var that = this;
+            if (results.code != 1) {
+                that.toast.Show(results.message);
+                return;
+            }
+            let info = results.result;
+            let deviceTypeId = info[0].deviceTypeId
+            //详情
+            let listHmtl = "";
+            let mapData = {
+                dwObjectId: [],//到位编号
+                dwObjectGeo: [],//到位图形
+                wdwObjectId: [],//未到位编号
+                wdwObjectGeo: [],//未到位图形
+                // layerName: this.dataTable_all.aExtentData.currentTableData.layerName,
+                layerId: window.tempSearchXjHalf.searchSid.layerId
+            }
+            let thHtml = "";
+            let isCheck = true;
+            //除开巡检点、巡检线、节点、管线外,其余设备可以查看检查项
+            // if (this.dataTable_all.aExtentData.currentTableData.checkContent == null || this.dataTable_all.aExtentData.currentTableData.checkContent == "null") {
+            //     isCheck = false;
+            // }
+            this.dataTable_plan = info;
+            let tableData = [];
+            let tempTitle = [];
+            let tempField = [];
+            if (deviceTypeId == 20) {
+                tempTitle = ["调压柜运行压力(单位:Kpa)", "调压柜放散压力(单位:Kpa)", "流量计工作压力(单位:Kpa)"];
+                tempField = ["runPressure", "diffusePressure", "workPressure"]
+            } else if (deviceTypeId == 18) {
+                tempTitle = ["调压箱运行压力(单位:Kpa)", "调压箱截断压力(单位:Kpa)"];
+                tempField = ["runPressure", "truncationPressure"]
+            } else if (deviceTypeId == 16) {
+                tempTitle = ["阀门材质", "阀门规格"];
+                tempField = ["material", "specification"]
+            } else if (deviceTypeId == 21) {
+                tempTitle = ["检测桩编号", "标准电位值", "检测电位值", "检测人员"];
+                tempField = ["deviceId", "standardPotential", "detectionPotential", "createUserName"]
+            }
+            info.forEach((item, index) => {
+                if (item.checkContent && item.checkContent != "null" && item.checkContent != "") {
+                    item.overDate = item.checkDate;
+                    item.isoverName = item.checkStateName;
+                }
+                if (isCheck) {//针对设备
+                    if (item.checkState == "1") {//已检查点
+                        mapData.dwObjectId.push(item.pointId)
+                        mapData.dwObjectGeo.push(item.geometry)
+                    } else {//未检查点
+                        mapData.wdwObjectId.push(item.pointId)
+                        mapData.wdwObjectGeo.push(item.geometry)
+                    }
+                } else {//针对普通管线
+                    if (item.isover == "1") {//已到位点
+                        mapData.dwObjectId.push(item.pointId)
+                        mapData.dwObjectGeo.push(item.geometry)
+                    } else {//未到位点
+                        mapData.wdwObjectId.push(item.pointId)
+                        mapData.wdwObjectGeo.push(item.geometry)
+                    }
+                }
+
+                let name = item.deviceTypeName;
+                let bh = item.code || item.id;//设备编号
+                let dw = item.isoverName;// == "1" ? "已检查" :"未检查";
+                let dwsj = this.ajaxSend.verificationHelper.setNullAndUndefined(item.overDate);
+                listHmtl += "<tr index='" + index + "'><td title='" + bh + "'>" + bh + "</td>"
+                    + "<td title='" + name + "'>" + name + "</td>"
+                    + "<td title='" + dw + "'>" + dw + "</td>"
+                    + "<td title='" + dwsj + "'>" + dwsj + "</td>"
+
+                //调整为表格显示
+                let tableDataItem = {
+                    number: null,
+                    index: null,
+                    bh: null,
+                    name: null,
+                    dw: null,
+                    dwsj: null,
+                    lookInfo: null,
+                    description: null,
+                    childBeginDate: null,
+                    childEndDate: null
+                }
+                tempField.forEach(itemT => {
+                    tableDataItem[itemT] = item[itemT] || ""
+                })
+                tableDataItem.index = index;
+                tableDataItem.number = bh + "";
+                tableDataItem.bh = "<a class='indexTd' index='" + index + "'>" + bh + "</a>";
+                tableDataItem.name = name;
+                tableDataItem.dw = dw;
+                tableDataItem.dwsj = dwsj;
+                tableDataItem.childBeginDate = item.childBeginDate;
+                tableDataItem.description = item.description;
+                tableDataItem.childEndDate = item.childEndDate
+                if (isCheck) {
+                    // listHmtl += "<td title='查看检查项目' class='planCheckInfo' index='" + index + "'>查看检查项目</td></tr>";
+                    tableDataItem.lookInfo = "<a class='lookInfo' index='" + index + "'>查看检查项目</a>";
+                } else {
+                    listHmtl += "</tr>";
+                }
+                this.allSearchList.push(tableDataItem);
+                // tableData.push(tableDataItem);
+            })
+            tableData = this.allSearchList
+            //调整为表格显示
+            let extendTitle = [];
+            let extendContent = [];
+            if (isCheck) {
+                extendTitle = ['查看检查项目'];
+                extendContent = [
+                    {
+                        field: "lookInfo",
+                        fieldContent: "<a class='lookInfo'>查看检查项目</a>"
+                    }];
+            }
+            let tableDom = this.domObj.find("#PlanSearchWithSidInfo_table");
+            let option = {
+                that: this,
+                dataTable: that.dataTable,
+                elementId: "PlanSearchWithSidInfo_table",
+                url: that.config.getEquipmentNormalManagementList,//这个接口没有用到url
+                searchInfo: that.getSearchInfo,//条件在不断变化,故需要有全局的条件监听
+                displayTitle: ["设备编码", "所属巡检计划", "计划开始时间", "计划结束时间", "设备类型 ", "检查情况", "检查时间", ...tempTitle],
+                displayField: ['bh', 'description', "childBeginDate", "childEndDate", 'name', 'dw', 'dwsj', ...tempField],
+                extentDisplayTitle: extendTitle,
+                extentDisplayContent: extendContent,
+                beforeTrClickEvent: undefined,
+                afterTrClickEvent: undefined,
+                drawEvent: e => {
+                    this.addSeachInfoEvent(tableDom, isCheck)
+                },
+                errmassage: "计划详情信息查询失败",
+                nullmessage: undefined,
+                exportTitle: "计划详情信息",
+                ordering: true,
+                data: tableData
+            }
+            that.dataTable = this.ajaxSend.DataTables_all(option);
+            this.domObj.find("#PlanSearchWithSidInfo_table thead").hide();
+            this.domObj.find(".buttons-excel").hide();
+            this.renderGeo(mapData);
+            // tableDom.find("thead").append(thHtml);
+            // tableDom.find("tbody").append(listHmtl);
+            this.addSeachInfoEvent(tableDom, isCheck)
+            // }
+        }.bind(this));
+    }
+    /**
+     * 
+     * @param tableDom添加表单事件
+     * @param isCheck 
+     */
+    addSeachInfoEvent(tableDom, isCheck) {
+        tableDom.find("tbody tr").off().click(e => {
+            let dom = $(e.currentTarget);
+            tableDom.find("tbody tr.currentTr").removeClass("currentTr");
+            dom.addClass("currentTr");
+            let data = this.dataTable_plan[parseInt(dom.find(".indexTd").attr('index'))];
+            this.goToGeo(data);
+        })
+        if (isCheck) {
+            tableDom.find('.lookInfo').off().click(e => {
+                let dom = $(e.currentTarget);
+                let data = this.dataTable_plan[parseInt(dom.attr('index'))];
+                let url = this.config.xjpage;
+                let type = null;
+                if (data.deviceTypeId == 18) {//调压设备
+                    //url = this.config.loudongtiaoyaxiang;//调压箱
+                    type = 1;
+                } else if (data.deviceTypeId == 20) {//调压
+                    //url = this.config.loudongtiaoyagui;//调压柜
+                    type = 2;
+                } else if (data.deviceTypeId == 16) {
+                    //url = this.config.fajin;//阀井
+                    type = 3;
+                } else if (data.deviceTypeId == 21) {
+                    type = 4;
+                }
+                let sendPointData = {
+                    typeId: type,
+                    childPlanId: data.childPlanId,
+                    planTempPointId: data.pointId
+                }
+                this.ajaxSend.sendAjax(this, sendPointData, url, this.ajaxSend.type.get, function (results) {
+                    var that = this;
+                    if (results.code != 1) {
+                        that.toast.Show(results.message);
+                        return;
+                    }
+                    let info = results.result.records[0];
+                    if (!info) {
+                        this.toast.show("未查询到巡检登记记录!")
+                        return;
+                    }
+                    type = info.typeId;
+                    let setSize = { width: undefined, height: undefined };
+                    let appendHtml = null;
+                    let html = "";
+                    let imgHtml = '';
+                    let infoBox = '';
+                    if (info.xjConList && info.content) {
+                        appendHtml = this.template.split('$$')[3];
+                        setSize.width = 800;
+                        setSize.height = 750;
+                        info.xjConList.forEach(item => {
+                            for (var j = 0; j < info.content.length; j++) {
+                                var element = info.content[j];
+                                if (item.menuId == element.id) {
+                                    html += "<tr>";
+                                    html += "<td title='" + element.name + "'>" + element.name + "</td>";
+                                    if (item.choose === "1") {
+                                        html += "<td title=''><label>是<input type='checkbox' checked onclick='return false;'/></label><label>否<input type='checkbox' onclick='return false;'/></label><label>无<input type='checkbox' onclick='return false;'/></td>";
+                                    } else if (item.choose === "0") {
+                                        html += "<td title=''><label>是<input type='checkbox' onclick='return false;'/></label><label>否<input type='checkbox' checked onclick='return false;'/></label><label>无<input type='checkbox' onclick='return false;'/></td>";
+                                    } else {
+                                        html += "<td title=''><label>是<input type='checkbox' onclick='return false;'/></label><label>否<input type='checkbox' onclick='return false;'/></label><label>无<input type='checkbox' checked onclick='return false;'/></td>";
+                                    }
+                                    html += "</tr>";
+                                    break;
+                                }
+                            }
+                        })
+                    } else {
+                        html = "<span class='sTitle'>检查项目:</span><span>" + info.contentName + "</span>";
+                        appendHtml = this.template.split('$$')[2];
+                        setSize.width = 500;
+                        setSize.height = 450;
+                    }
+                    //添加时间,创建人,检测内容
+                    let time = info.createDate;
+                    let user = info.createUserName;
+                    let repairContent = info.contentName;
+                    infoBox += "<div><span class='sTitle'>创建时间:</span><span class='sInfo'>" + (time || "") + "</span></div>";
+                    infoBox += "<div><span class='sTitle'>创建人:</span><span class='sInfo'>" + (user || "") + "</span></div>";
+                    infoBox += "<div><span class='sTitle'>检查时间:</span><span class='sInfo'>" + (info.checkDate || "") + "</span></div>";
+                    if (type == 1) {
+                        infoBox += "<div><span class='sTitle'>调压箱运行压力(单位:Kpa):</span><span class='sInfo'>" + info.runPressure + "</span></div>";
+                        infoBox += "<div><span class='sTitle'>调压箱截断压力(单位:Kpa):</span><span class='sInfo'>" + info.truncationPressure + "</span></div>";
+                    } else if (type == 2) {
+                        infoBox += "<div><span class='sTitle'>调压柜运行压力(单位:Kpa):</span><span class='sInfo'>" + info.runPressure + "</span></div>";
+                        infoBox += "<div><span class='sTitle'>调压柜放散压力(单位:Kpa):</span><span class='sInfo'>" + info.diffusePressure + "</span></div>";
+                        infoBox += "<div><span class='sTitle'>流量计工作压力(单位:Kpa):</span><span class='sInfo'>" + info.workPressure + "</span></div>";
+                    } else if (type == 3) {
+                        infoBox += "<div><span class='sTitle'>阀门材质:</span><span class='sInfo'>" + info.material + "</span></div>";
+                        infoBox += "<div><span class='sTitle'>阀门规格:</span><span class='sInfo'>" + info.specification + "</span></div>";
+                    } else if (type == 4) {
+                        infoBox += "<div><span class='sTitle'>检测桩编号:</span><span class='sInfo'>" + info.deviceId + "</span></div>";
+                        infoBox += "<div><span class='sTitle'>标准电位值:</span><span class='sInfo'>" + info.standardPotential + 'V' + "</span></div>";
+                        infoBox += "<div><span class='sTitle'>检测电位值:</span><span class='sInfo'>" + info.detectionPotential + 'V' + "</span></div>";
+                        infoBox += "<div><span class='sTitle'>检测人员:</span><span class='sInfo'>" + (info.createUserName ? info.createUserName : '/') + "</span></div>";
+                    }
+                    infoBox += "<div><span class='sTitle'>备注:</span><div class='noteOverflow' title='" + info.note + "'>" + (info.note ? info.note : '/') + "</div></div>";
+                    if (info.contentName) {
+                        infoBox += "<div><span class='sTitle'>维修内容:</span><div class='noteOverflow' title='" + repairContent + "'>" + repairContent + "</div></div>";
+                    }
+                    //添加照片
+                    if (info.photos) {
+                        info.photos.forEach(img => {
+                            imgHtml += "<li><img src='" + this.ajaxSend.getIamgeAddress(that, img.path) + "'></li>";
+                        })
+                        infoBox += "<div class='fileInfoList'><span class='photo sTitle'>照片:</span><div class='fileItemUl'><ul class='fileInfoListItem' id='planImgs'>" + imgHtml + "</ul></div></div>";
+                    }
+                    this.popup.setSize(setSize.width, setSize.height);
+                    var Obj = this.popup.Show("检查内容", appendHtml);
+                    Obj.conObj.find('.checkContent .checkContentInfo').empty().append(html);
+                    //if (info.contentName) {
+                    Obj.conObj.find('.checkContent').append("<div class='infoBox'></div>");
+                    //}
+                    // else{
+                    //     Obj.conObj.find('.table').before("<div class='infoBox form-inline'></div>");
+                    // }
+                    Obj.conObj.find('.infoBox').append(infoBox);
+                    Obj.conObj.find("#planImgs").viewer();
+                    Obj.submitObj.off("click").on("click", function () {
+                        this.popup.close();
+                    }.bind(this))
+                }.bind(this))
+            })
+        }
+    }
+
+    /**
+     * @function 暂时屏蔽查询页面
+     * @param infos
+     */
+    hideOrShowSearch(action) {
+        //屏蔽查询页面已显示的地图服务
+        if (this.dynamicMapServer) {
+            this.map.removeLayer(this.dynamicMapServer);
+            this.dynamicMapServer = null;
+        }
+        //屏蔽首页内容
+        if (action == hideOrShow.hide) {
+            this.domObj.find(".PlanSearchWithSid_toolbar").addClass('hide');
+            this.domObj.find(".PlanSearchWithSid_content").addClass('hide');
+        } else {
+            this.domObj.find(".PlanSearchWithSid_toolbar").removeClass('hide');
+            this.domObj.find(".PlanSearchWithSid_content").removeClass('hide');
+            this.domObj.find('.widget-PlanSearchWithSid-Info').remove();
+            this.selectLayer.clear();
+            this.planLayer.clear();
+        }
+    }
+
+    /**
+     * @function 定位并显示图形
+     * @param 定位数据
+     */
+    goToGeo(data) {
+        this.selectLayer.clear();
+        let geoJson = JSON.parse(data.geometry);
+        let geo = null;
+        let sym = null;
+        if (geoJson.hasOwnProperty("paths")) {
+            sym = this.mapSet.setGraphSymbol('polyline', '#FFD700');
+            geo = new Polyline(geoJson);
+        } else {
+            sym = this.mapSet.setGraphSymbol('point', '#FFD700');
+            geo = new Point(geoJson);
+        }
+        geo.setSpatialReference(this.map.spatialReference);
+        let graphic = new Graphic(geo, sym);
+        this.selectLayer.add(graphic);
+        if (graphic.geometry && graphic.geometry.type && graphic.geometry.type != "point" && graphic["_extent"]) {
+            this.map.setExtent(graphic["_extent"]);
+            this.map.setZoom(6);
+        } else {
+            // 定位
+            this.map.setZoom(9);
+            this.map.setExtent(graphic["_extent"]);
+        }
+    }
+
+    /**
+     * @function 熏染已完成和未完成管线或者设备
+     * @param data 渲染数据
+     */
+    renderGeo(data) {
+        this.planLayer.clear();
+        let dwPathGeo = {
+            "paths": [],
+            "spatialReference": { "wkid": this.map.spatialReference }
+        };
+        let dwPointGeo = [];
+        let wdwPathGeo = {
+            "paths": [],
+            "spatialReference": { "wkid": this.map.spatialReference }
+        };
+        let wdwPointGeo = [];
+        if (data.dwObjectGeo.length > 0) {
+            data.dwObjectGeo.forEach(item => {
+                let geo = JSON.parse(item);
+                if (geo.hasOwnProperty("paths")) {
+                    dwPathGeo.paths.push(geo.paths[0])
+                } else {
+                    let point = new Point(geo);
+                    point.setSpatialReference(this.map.spatialReference);
+                    dwPointGeo.push(point)
+                }
+
+            })
+        }
+        if (data.wdwObjectGeo.length > 0) {
+            data.wdwObjectGeo.forEach(item => {
+                let geo = JSON.parse(item);
+                if (geo.hasOwnProperty("paths")) {
+                    wdwPathGeo.paths.push(geo.paths[0]);
+                } else {
+                    let point = new Point(geo);
+                    point.setSpatialReference(this.map.spatialReference);
+                    wdwPointGeo.push(point);
+                }
+            })
+        }
+        let wdwColor = "#FF0000";//未检查颜色
+        let dwColor = "#008000";//已检查颜色
+        let dwSymLine = this.mapSet.setGraphSymbol('polyline', dwColor);//到位线样式
+        let wdwSymLine = this.mapSet.setGraphSymbol('polyline', wdwColor);//未到位线样式
+        let dwSymPoint = this.mapSet.setGraphSymbol('point', dwColor);//到位点样式
+        let wdwSymPoint = this.mapSet.setGraphSymbol('point', wdwColor);//未到位点样式
+        if (dwPathGeo.paths.length > 0) {
+            this.planLayer.add(new Graphic(new Polyline(dwPathGeo), dwSymLine));
+        }
+        if (wdwPathGeo.paths.length > 0) {
+            this.planLayer.add(new Graphic(new Polyline(wdwPathGeo), wdwSymLine))
+        }
+        if (dwPointGeo.length > 0) {
+            dwPointGeo.forEach(item => {
+                this.planLayer.add(new Graphic(item, dwSymPoint));
+            })
+        }
+        if (wdwPointGeo.length > 0) {
+            wdwPointGeo.forEach(item => {
+                this.planLayer.add(new Graphic(item, wdwSymPoint));
+            })
+        }
+    }
+
+    /**
+     * 销毁对象
+     */
+    destroy() {
+        if (this.jobid) {
+            this.gp.cancelJob(this.jobid);
+        }
+        if (this.selectLayer) {
+            this.map.removeLayer(this.selectLayer);
+        }
+        if (this.planLayer) {
+            this.map.removeLayer(this.planLayer);
+        }
+        if (this.plan_ptype_layer) {
+            this.map.removeLayer(this.plan_ptype_layer);
+        }
+        if (this.plan_pontype_layer) {
+            this.map.removeLayer(this.plan_pontype_layer);
+        }
+        if (this.dynamicMapServer) {
+            this.map.removeLayer(this.dynamicMapServer);
+        }
+        this.domObj.remove();
+        this.afterDestroy();
+    }
+}

+ 82 - 0
src/widgets/PlanSearchWithSid/config.json

@@ -0,0 +1,82 @@
+{
+    "widgetUrl": "widgets/PlanSearchWithSid",
+    "tmplateUrl": "widgets/PlanSearchWithSid/Widget.html",
+    "styleUrl": "widgets/PlanSearchWithSid/css/style.css",
+    "getGroupList": "/base/department/page",
+    "getUserList": "/base/user/getUserByDepts/list",
+    "getPlanSearchWithSidList": "/zmrq/planchild/page",
+    "getMissionScheduleById": "/zmrq/planchild/geoInfo/",
+    "getDistanceInfo":"/zmrq/tfsyssetting/getSysSetting",
+    "getPlanType": "/zmrq/planpointtype/page",
+    "getPeriod": "/zmrq/planperiodtype/page",
+    "getPlanRegionList": "/zmrq/gpsregion/page",
+    "deleteMainList":"/zmrq/plan/deleteByIds",
+    "addTrans":"/zmrq/plan/checkTransfer",
+    "getRegionInfo": "/zmrq/planpoint/page",
+    "getUserPlanPointList": "/Plan/Get_Curerent_Plan_Point",
+    "getDeviceList": "/plan/RemovalList",
+    "planInfo":"/zmrq/pointInfo",
+    "loudongtiaoyaxiang":"/zmrq/xjldtyx/page",
+    "loudongtiaoyagui":"/zmrq/xjtyg/page",
+    "fajin":"/zmrq/xjfj/page",
+    "xjpage":"/zmrq/xj/page",
+    "rangeall": "00",
+    "pagetotal": 1,
+    "pagenumber": 1,
+    "pagesize": 25,
+    "pagemaxsize": 100000,
+    "RegionColor": "red",
+    "color": "blue",
+    "select_color": "purple",
+    "showfieldnames":["OBJECTID","新编号","竣工日期","长度","管径","材质","地址"],
+    "lengthfield":"SHAPE.LEN",
+    "deviceForOther": {
+        "1": {
+            "showfields": ["create_time"],
+            "showfieldnames": ["创建时间"]
+        },
+        "5": {
+            "showfields": ["troubletype", "trouble_notes", "trouble_username", "trouble_findtime"],
+            "showfieldnames": ["隐患类型", "隐患说明", "上报人", "上报时间"]
+        },
+        "6": {
+            "showfields": ["create_time"],
+            "showfieldnames": ["创建时间"]
+        }
+    },
+    "layersymbol": {
+        "1": "./widgets/PlanSearchWithSid/images/planpoint.png",
+        "5": "./widgets/PlanSearchWithSid/images/warnpoint.png"
+    },
+    "mapindex": 0,
+    "unsubmit": 6,
+    "WarnMarkPictureSymbol": "./widgets/PlanSearchWithSid/images/warnpoint.png",
+    "MarkPictureSymbol": "./widgets/PlanSearchWithSid/images/planpoint.png",
+    "MarkPictureSymbol_tyx": "./widgets/PlanSearchWithSid/images/surgetank.png",
+    "MarkPictureSymbol_tyg": "./widgets/PlanSearchWithSid/images/pressurecabinet.png",
+    "MarkPictureSymbol_fj": "./widgets/PlanSearchWithSid/images/valvedonburi.png",
+    "TextbgSymbol": "./widgets/PlanSearchWithSid/images/textbg.png",
+    "DeviceSymbol": {
+        "1": [0, 255, 255, 1],
+        "2": [0, 255, 255, 1],
+        "5": [0, 255, 255, 1],
+        "3": [0, 255, 255, 1],
+        "4": [0, 255, 255, 1],
+        "12": [0, 255, 255, 1],
+        "7": [0, 255, 255, 1],
+        "8": [0, 255, 255, 1],
+        "9": [0, 255, 255, 1],
+        "10": [0, 255, 255, 1],
+        "11": [0, 255, 255, 1],
+        "6": [0, 255, 255, 1],
+        "13": [0, 255, 255, 1],
+        "14": [0, 255, 255, 1],
+        "15": [0, 255, 255, 1],
+        "16": [0, 255, 255, 1],
+        "17": [0, 255, 255, 1],
+        "18": [0, 255, 255, 1]
+    },
+    "getLayerId":"/zmrq/sysdevicetype/page",
+    "getLayerInfo":"/zmrq/Gis/exportList"
+}
+ 

+ 467 - 0
src/widgets/PlanSearchWithSid/css/style.scss

@@ -0,0 +1,467 @@
+.widget-PlanSearchWithSid {
+    height: 100%;
+
+    .go {
+        width: 200px;
+    }
+
+    .hide {
+        display: none;
+    }
+
+    .planInfoLook,
+    .planLocaltion,
+    .lookInfo {
+        color: rgba(0, 0, 255, 0.7) !important;
+        cursor: pointer;
+    }
+
+    .form-control {
+        padding: 4px 8px;
+    }
+
+    .PlanSearchWithSid_toolbar {
+
+        .toolbar,
+        .form-group {
+            float: left;
+            margin: 4px 0px 4px 4px
+        }
+        button{
+            min-width: 58px;
+            max-width: 100px;
+            height: 34px;
+            color: white;
+            background: #1A77E0;
+            border-radius: 3px;
+            border: none;
+            cursor: pointer;
+        }
+    }
+
+    .radio {
+        padding: 4px 8px;
+        vertical-align: middle;
+        margin: 0;
+    }
+
+    .dynamic_pagesize {
+        border-radius: 3px;
+    }
+
+    .PlanSearchWithSid_toolbar2 {
+        height: 30px;
+        margin: 4px;
+
+        .form-group {
+            float: left;
+            margin: 4px 0px 4px 4px
+        }
+    }
+
+    .widget-PlanSearchWithSid-Info {
+        .returnSearchDiv{
+            display: flex;
+            justify-content: left;
+            align-items: center;
+            .form-group{
+                display: flex;
+                justify-content: center;
+                align-items: center;
+                padding-left: 10px;
+                margin: 0px;
+                label{
+                    margin: 0px;
+                    width: 80px;
+                }
+            }
+        }
+        button.btn.btn-default.btn-primary.returnSearch {
+            margin: 10px 0px 10px 10px;
+        }
+        button.btn.btn-default.btn-primary.searchCodebuttonByCode {
+            margin: 0px 0px 0px 10px;
+        }
+
+        table {
+            margin-bottom: 20px !important;
+
+            td,
+            th {
+                padding: 5px !important;
+            }
+        }
+
+    }
+
+    .PlanSearchWithSid_content {
+        padding-left: 4px;
+
+        table {
+            margin-bottom: 5px;
+            table-layout: fixed;
+
+            tbody {
+                border-top: 1px solid #ddd;
+            }
+
+            tr {
+                text-align: center;
+                vertical-align: middle;
+            }
+
+            th {
+                text-align: center;
+                vertical-align: middle;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                white-space: nowrap;
+            }
+
+            td {
+                padding: 3px !important;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                white-space: nowrap;
+
+                a:hover {
+                    cursor: pointer
+                }
+            }
+
+            // tr.active {
+            //     color: #FFF;
+            //     td {
+            //         // background-color: #337ab7 !important;
+            //     }
+            //     a {
+            //         color: #FFF;
+            //     }
+            //     a:hover {
+            //         color: #eee;
+            //     }
+            // }
+            .goto {
+                min-height: 26px;
+            }
+        }
+    }
+
+    .halfpaneltable {
+        overflow-y: auto;
+
+        tr.currentTr {
+            background: #edf4ff !important;
+        }
+    }
+
+    .PlanSearchWithSid_pagecontrol {
+        bottom: 0px;
+        width: 100%;
+        background-color: white;
+        margin-left: 4px;
+    }
+
+    .hidden {
+        display: none
+    }
+
+    .PlanSearchWithSid {
+        height: calc(100% - 46px);
+        overflow-y: auto;
+
+        .PlanSearchWithSid_infoSet {
+            height: calc(100% - 10px);
+        }
+    }
+
+    .widget-PlanSearchWithSid_planadd {
+        height: calc(100% - 8px);
+
+        .toolbar {
+            height: 46px;
+        }
+
+        .form-group {
+            float: left;
+            margin: 4px 0px 4px 4px
+        }
+    }
+
+    .widget-planregion_pointselect,
+    .widget-planregion_deviceselect {
+        height: 100%;
+
+        .setTime {
+            float: left;
+        }
+    }
+
+    .deviceslist-table {
+        width: 100%;
+    }
+
+    .deviceslist-select-table {
+        width: calc(30% - 5px);
+        float: right;
+    }
+
+    .pointlist-table,
+    .deviceslist-table,
+    .deviceslist-select-table,
+    .planregionslist-table {
+        height: calc(100% - 60px) !important;
+        overflow-y: auto;
+
+        table {
+            margin-bottom: 5px;
+            table-layout: fixed;
+
+            tbody {
+                border-top: 1px solid #ddd;
+            }
+
+            tr {
+                text-align: center;
+                vertical-align: middle;
+            }
+
+            th {
+                text-align: center;
+                vertical-align: middle;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                white-space: nowrap;
+            }
+
+            td {
+                overflow: hidden;
+                text-overflow: ellipsis;
+                white-space: nowrap;
+            }
+
+            .goto {
+                min-height: 26px;
+            }
+
+            // tr.active {
+            //     color: #FFF;
+            //     td {
+            //         overflow: hidden;
+            //         text-overflow: ellipsis;
+            //         white-space: nowrap;
+            //         background-color: #337ab7 !important;
+            //     }
+            //     a {
+            //         color: #FFF;
+            //     }
+            //     a:hover {
+            //         color: #eee;
+            //     }
+            // }
+            input[type=checkbox] {
+                margin-top: 0px !important;
+            }
+        }
+    }
+
+    .deviceslist-pagecontrol {
+        position: absolute;
+        bottom: 0px;
+        background-color: white;
+        margin-left: 4px;
+        width: 100%;
+    }
+
+    .toolbar2 {
+        display: inline-block;
+        width: 100%;
+        margin: 4px;
+    }
+
+    .point_add {
+        float: left;
+        width: 70%;
+        height: 100%;
+        margin: 4px;
+        table {
+            margin-bottom: 10px;
+        }
+    }
+
+    .point_add_info {
+        float: left;
+        width: 25%;
+        margin: 4px;
+        height: 250px;
+        overflow-y: auto;
+    }
+
+    .tianshu {
+        display: none;
+        width: 100px;
+    }
+
+    .minwidth {
+        width: 142px;
+        height: 30px;
+    }
+
+    .unsubmit {
+        color: red;
+    }
+}
+
+.SY,
+.SM,
+.SD {
+    width: 100px;
+}
+
+.timecal {
+    margin: 9px;
+}
+
+.copyplanslist-table {
+    height: calc(100% - 44px);
+
+    .goto {
+        height: 26px;
+    }
+
+    .minwidth {
+        width: 100px;
+    }
+
+    .form-control {
+        padding: 4px 8px;
+    }
+
+    tr th {
+        text-align: center !important;
+        vertical-align: middle !important;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+    }
+
+    td {
+        text-align: center !important;
+        vertical-align: middle !important;
+        padding: 2px !important;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+    }
+}
+
+.esriPopup {
+    z-index: 1;
+}
+
+.checkwidth {
+    width: 40px;
+}
+
+.widget-PlanSearchWithSid_transpopup {
+    .pathmanagement {
+        padding: 10px;
+    }
+}
+
+.widget-PlanSearchWithSid-Pop {
+    margin: 0 5px 0 5px;
+    span.checkContentInfo {
+        font-size: 16px;
+        text-align: center;
+        display: flex;
+        line-height: 36px;
+        vertical-align: middle;
+        margin-left: 0px;
+    }
+
+    span {
+        // width: calc(100% - 80px);
+        font-size: 16px;
+        text-align: left;
+        display: block;
+        // line-height: 34px;
+        vertical-align: middle;
+        margin: 0px 12px;
+    }
+    .noteOverflow{
+        //overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+    }
+    .sTitle {
+        width: 200px;
+        // text-align: right;
+        float: left;
+    }
+
+    table {
+        // position: absolute;
+        margin-top: 20px;
+        width: calc(100% - 30px);
+        left: 15px;
+        top: 70px;
+        th,
+        td {
+            text-align: center;
+            vertical-align: middle !important;
+            padding: 5px !important;
+            background-color: white;
+            min-width: 400px;
+            /* max-width: 200px; */
+            min-height: 25px;
+            word-wrap: break-word;
+            border: 1px solid #ddd;
+        }
+    }
+
+    .fileInfoList {
+        // background-color: #e9ecef;
+        text-align: left;
+        border-radius: 10px;
+        width: 100%;
+
+        .photo {
+            margin-left: 12px;
+            float: none;
+            // text-align: right;
+        }
+
+        .fileItemUl {
+            border-radius: 10px;
+            background-color: #e9ecef;
+            position: relative;
+            float: left;
+            width: calc(100% - 20px);
+            margin-left: 10px;
+        }
+
+        .fileInfoListItem {
+            list-style: none;
+            margin: 0px;
+            padding: 0px;
+
+            li {
+                float: left;
+                padding: 10px;
+
+                img {
+                    width: 80px;
+                    // border-radius: 20px;
+                    cursor: pointer;
+                }
+
+                a {
+                    color: rgba(0, 0, 255, 0.7) !important;
+                    cursor: pointer;
+                }
+            }
+
+        }
+    }
+}

BIN
src/widgets/PlanSearchWithSid/images/datePicker.gif


BIN
src/widgets/PlanSearchWithSid/images/people.png


BIN
src/widgets/PlanSearchWithSid/images/planpoint.png


BIN
src/widgets/PlanSearchWithSid/images/popup.png


BIN
src/widgets/PlanSearchWithSid/images/pressurecabinet.png


BIN
src/widgets/PlanSearchWithSid/images/surgetank.png


BIN
src/widgets/PlanSearchWithSid/images/textbg.png


BIN
src/widgets/PlanSearchWithSid/images/valvedonburi.png


BIN
src/widgets/PlanSearchWithSid/images/warnpoint.png