7 Commits 0239f42f9b ... 8ab2746c6a

Author SHA1 Message Date
  liangluogis 8ab2746c6a 调整 3 weeks ago
  liangluogis 1d2edbc8e5 1、图层管理功能调整优化 2 months ago
  liangluogis a16efbb709 1、调整图层列表功能,增加离线影像服务图层相关处理 2 months ago
  liangluogis 808a06fc72 1、公用数据窗口优化; 2 months ago
  liangluogis 9267198d90 1、功能优化调整 4 months ago
  liangluogis bd45af7301 1、gistoken的强制校正 1 year ago
  liangluogis b5ac7ed871 1、功能优化 1 year ago
36 changed files with 2601 additions and 425 deletions
  1. BIN
      node_modules.rar
  2. 35 35
      src/widgets/BaseMap/Widget.ts
  3. 4 1
      src/widgets/BaseMap/config.json
  4. 4 0
      src/widgets/DataPanel/Widget.html
  5. 65 12
      src/widgets/DataPanel/Widget.ts
  6. 2 1
      src/widgets/DataPanel/config.json
  7. 110 22
      src/widgets/DataPanel/css/style.scss
  8. BIN
      src/widgets/DataPanel/images/loading.gif
  9. 3 2
      src/widgets/GasStopAnalysis/Widget.html
  10. 15 0
      src/widgets/Header/Widget.ts
  11. 10 3
      src/widgets/HiddenPageInfo/Widget.html
  12. 9 2
      src/widgets/HiddenTroubleSearchAll/Widget.html
  13. 82 2
      src/widgets/HiddenTroubleSearchAll/Widget.ts
  14. 90 76
      src/widgets/HiddenTroubleSearchAll/config.json
  15. 1 0
      src/widgets/HiddenTroubleSearchAllAdmin/Widget.ts
  16. 202 68
      src/widgets/LayerList/Widget.ts
  17. 3 2
      src/widgets/LayerList/config.json
  18. 69 60
      src/widgets/MaintenancePageInfo/Widget.html
  19. 9 0
      src/widgets/MaintenanceSearch/Widget.html
  20. 2 0
      src/widgets/MaintenanceSearch/Widget.ts
  21. 5 0
      src/widgets/MaintenanceSearchAdmin/Widget.html
  22. 2 0
      src/widgets/MaintenanceSearchAdmin/Widget.ts
  23. 1 1
      src/widgets/MissionSchedule/Widget.ts
  24. 127 1
      src/widgets/PlanSearch/Widget.ts
  25. 6 0
      src/widgets/SiteSupervisionAllSearch/Widget.html
  26. 36 33
      src/widgets/SiteSupervisionAllSearch/Widget.ts
  27. 4 4
      src/widgets/SiteSupervisionAllSearch/config.json
  28. 6 0
      src/widgets/SiteSupervisionAllSearchAdmin/Widget.html
  29. 36 33
      src/widgets/SiteSupervisionAllSearchAdmin/Widget.ts
  30. 79 60
      src/widgets/SiteSupervisionPageInfo/Widget.ts
  31. 27 1
      src/widgets/SiteSupervisionPageInfo/config.json
  32. 5 6
      src/widgets/UserInfoManagement/Widget.ts
  33. 254 0
      src/widgets/UserManagementQuery/Widget.html
  34. 1121 0
      src/widgets/UserManagementQuery/Widget.ts
  35. 25 0
      src/widgets/UserManagementQuery/config.json
  36. 152 0
      src/widgets/UserManagementQuery/css/style.scss

BIN
node_modules.rar


+ 35 - 35
src/widgets/BaseMap/Widget.ts

@@ -9,7 +9,7 @@ import TDTLayer = require('Esri_Extjs/TDTLayer');
 import TDTAnnoLayer = require('Esri_Extjs/TDTAnnoLayer');
 import TDTImgAnnoLayer = require('Esri_Extjs/TDTImgAnnoLayer');
 import TDTImgLayer = require('Esri_Extjs/TDTImgLayer');
-import SpatialReference =require("esri/SpatialReference");
+import SpatialReference = require("esri/SpatialReference");
 
 export = BaseMap;
 
@@ -72,7 +72,7 @@ class BaseMap extends BaseWidget {
     * @return {(Map)} (返回一个Map对象)
     */
     addToMap() {
-        var map = new Map(this.config.mapDiv, { logo: false, showLabels: true, showAttribution: false, slider: false});
+        var map = new Map(this.config.mapDiv, { logo: false, showLabels: true, showAttribution: false, slider: false });
         //添加对应图层到map对象
         for (var i = 0; i < this.config.mapService.length; i++) {
             var layername = this.config.mapService[i];
@@ -80,7 +80,7 @@ class BaseMap extends BaseWidget {
                 for (var index = 0; index < this.AppX.appConfig.gisResource[layername].config.length; index++) {
                     var url = this.AppX.appConfig.gisResource[layername].config[index].url;
                     var layerAlias = this.AppX.appConfig.gisResource[layername].config[index].name;
-                    if (this.AppX.appConfig.gisResource[layername].type == "tiled"&&url.trim()&&layerAlias.trim()) {
+                    if (this.AppX.appConfig.gisResource[layername].type == "tiled" && url.trim() && layerAlias.trim()) {
                         var tileLayer = new ArcGISTiledMapServiceLayer(url, { className: "tileLayer" });
                         tileLayer.id = layername + "_" + index;
                         if (this.config.baselayers.indexOf(layername) != -1) {//基础底图放置在最下层
@@ -99,34 +99,34 @@ class BaseMap extends BaseWidget {
                         if (layername == "pipe")
                             tileLayer.on("load", this.onPipeLayerLoad.bind(this));
                     } else if (this.AppX.appConfig.gisResource[layername].type == "dynamic") {
-                        if(layername=="tian_online_raster"){//天地图影像
+                        if (layername == "tian_online_raster") {//天地图影像
                             var tdbaselayer1 = new TDTImgLayer();
-                            tdbaselayer1.id="tian_online_raster";   
-                            tdbaselayer1.visible =true;                       
+                            tdbaselayer1.id = "tian_online_raster";
+                            tdbaselayer1.visible = true;
                             map.addLayer(tdbaselayer1);
-                        }else if(layername=="tian_online_vector"){//天地图矢量
+                        } else if (layername == "tian_online_vector") {//天地图矢量
                             var tdbaselayer = new TDTLayer();
-                            tdbaselayer.id="tian_online_vector";
-                            tdbaselayer.visible =true;
+                            tdbaselayer.id = "tian_online_vector";
+                            tdbaselayer.visible = true;
                             map.addLayer(tdbaselayer);
-                        }else if(layername=="tian_online_vector_l"){//天地图矢量标注
+                        } else if (layername == "tian_online_vector_l") {//天地图矢量标注
                             var tdanolayer = new TDTAnnoLayer();
-                            tdanolayer.id="tian_online_vector_l";
-                            tdanolayer.visible =true;
+                            tdanolayer.id = "tian_online_vector_l";
+                            tdanolayer.visible = true;
                             map.addLayer(tdanolayer);
-                        }else if(layername=="tian_online_raster_l"){//天地图影像标注
+                        } else if (layername == "tian_online_raster_l") {//天地图影像标注
                             var tdanolayer = new TDTImgAnnoLayer();
-                            tdanolayer.id="tian_online_raster_l";
-                            tdanolayer.visible =true;
+                            tdanolayer.id = "tian_online_raster_l";
+                            tdanolayer.visible = true;
                             map.addLayer(tdanolayer);
-                        }else{
-                            if(url){
+                        } else {
+                            if (url) {
                                 var dynamicLayer = new ArcGISDynamicMapServiceLayer(url, { className: "dynamicLayer" });
                                 dynamicLayer.id = layername + "_" + index;
                                 if (this.AppX.appConfig.gisResource[layername].filter) {
                                     this.setLayerFilter(dynamicLayer, layerAlias);
                                 }
-                                if(this.AppX.appConfig.gisResource[layername].visiableLayers){
+                                if (this.AppX.appConfig.gisResource[layername].visiableLayers) {
                                     dynamicLayer.setVisibleLayers(this.AppX.appConfig.gisResource[layername].visiableLayers);
                                 }
                                 map.addLayer(dynamicLayer);
@@ -386,37 +386,37 @@ class BaseMap extends BaseWidget {
     }
 
     initLegend(map) {
-        let layerName=this.map.layerIds.filter(e=>{
-            return e.indexOf("pipe")!=-1;
+        let layerName = this.map.layerIds.filter(e => {
+            return e.indexOf("pipe") != -1;
         })
-        let dom=$(".theMapLegendSet");
-        if(layerName.length>0){
-            let pipeLayer=[];
-            layerName.forEach(e=>{
-                let info={
-                    layer:this.map.getLayer(e),
-                    defaultSymbol:true,
-                    title:"图例:"
+        let dom = $(".theMapLegendSet");
+        if (layerName.length > 0) {
+            let pipeLayer = [];
+            layerName.forEach(e => {
+                let info = {
+                    layer: this.map.getLayer(e),
+                    defaultSymbol: true,
+                    title: "图例:"
                 }
                 pipeLayer.push(info);
             });
             var legend = new Legend({
                 map: map,
-                layerInfos:pipeLayer
+                layerInfos: pipeLayer
             }, "theMapLegend");
             legend.startup();
-            dom.find(".hideAndShow").click(e=>{
-                if($(e.currentTarget).hasClass("glyphicon-resize-small")){
+            dom.find(".hideAndShow").click(e => {
+                if ($(e.currentTarget).hasClass("glyphicon-resize-small")) {
                     dom.addClass('hide');
                     $(e.currentTarget).removeClass("glyphicon-resize-small").addClass("glyphicon-resize-full");
-                    $(e.currentTarget).attr("title",'点击显示图例');
-                }else{
+                    $(e.currentTarget).attr("title", '点击显示图例');
+                } else {
                     dom.removeClass('hide');
                     $(e.currentTarget).removeClass("glyphicon-resize-full").addClass("glyphicon-resize-small");
-                    $(e.currentTarget).attr("title",'点击隐藏图例');
+                    $(e.currentTarget).attr("title", '点击隐藏图例');
                 }
             })
-        }else{
+        } else {
             dom.remove();
         }
     }

+ 4 - 1
src/widgets/BaseMap/config.json

@@ -4,7 +4,10 @@
     "styleUrl":"widgets/BaseMap/css/style.css",
     "mapDiv": "myMap",
     "mapService": [
-        "tian_online_vector","tian_online_vector_l","pipe","poi"
+         "tian_online_vector", "tian_online_vector_l", "pipe", "poi"
     ],
+    "mapService2": [
+        "raster",  "pipe", "poi"
+   ],
     "baselayers":["base"]
 }

+ 4 - 0
src/widgets/DataPanel/Widget.html

@@ -27,4 +27,8 @@
         <div class="tab-content">
         </div>
     </div>
+</div>
+$$
+<div class="loadingbg" style="display: none;">
+   <div class="loading" ><img src="./widgets/DataPanel/images/loading.gif" style="width: 35px; height: 35px">  正在导出数据,请等待...</div>
 </div>

+ 65 - 12
src/widgets/DataPanel/Widget.ts

@@ -77,11 +77,16 @@ class DataPanel extends BaseWidget {
     isFold = true;
     /** 暂存变量 */
     data: Data = null;
-    Total:true;
+    Total: true;
+    /** 状态变量 */
+    isInnerWidgetLoaded = false;
+    /** dom 元素 */
+    loadingObj: JQuery;
+
     // 启动函数
     startup() {
         let currentSelector = this.AppX.appConfig.mainContainerMinor;
-        $(currentSelector).append(this.template);
+        $(currentSelector).append(this.template.split('$$')[0]);
         this.domObj = $('.' + this.baseClass)
         // this.setHtml(this.template);
         this.configure();
@@ -182,7 +187,25 @@ class DataPanel extends BaseWidget {
 
         // 保存
         this.domObj.on('click', '.save2csv', (e) => {
-            this.saveFile();
+            this.showLoading();
+            try {
+                // this.saveFile();
+                // this.hideLoading();
+
+                //待优化,使用后台独立线程,避免UI线程被锁定,无法进行其他操作
+                setTimeout(() => {
+                    if (!this.isInnerWidgetLoaded) {
+                        this.isInnerWidgetLoaded = true;//更新状态标识
+
+                        this.saveFile();
+                        this.hideLoading();
+                    }
+                }, this.config.loadingDelay);
+            }
+            catch (err) { }
+            finally {
+                // this.hideLoading();
+            }
         });
     }
 
@@ -296,10 +319,10 @@ class DataPanel extends BaseWidget {
 
     // 废弃的命名方法,此处做兼容
     show(data) {
-        if(data.data){
+        if (data.data) {
             this.Total = data.Total;
             this.Show(data.data);
-        }else{
+        } else {
             this.Show(data);
         }
 
@@ -320,6 +343,7 @@ class DataPanel extends BaseWidget {
         this.refitTableHeight();
         this.cssChange();
         this.closeHalfPanel();
+        this.hideLoading();//隐藏可能存在的进度栏
     }
 
     // 初始化tab
@@ -740,10 +764,10 @@ class DataPanel extends BaseWidget {
                 //根据结果进行渲染
                 var currentobjectids = param.objectIds.split(',');
                 //var objectid = parseInt(currentobjectids[i]);
-                 //   var index = _.findIndex(response.features, function (item: any) { return item.attributes["OBJECTID"] == objectid });
+                //   var index = _.findIndex(response.features, function (item: any) { return item.attributes["OBJECTID"] == objectid });
                 for (var i = 0; i < currentobjectids.length; i++) {
                     var objectid = parseInt(currentobjectids[i]);
-                    var index = _.findIndex(result.features, function (item: any) { return item.attributes["OBJECTID"] == objectid});
+                    var index = _.findIndex(result.features, function (item: any) { return item.attributes["OBJECTID"] == objectid });
                     if (index != -1) {
                         var feature = result.features[index];
                         var row = [];
@@ -848,9 +872,9 @@ class DataPanel extends BaseWidget {
                 callback(returndata);
                 this.refitTableHeight();
                 dataTab.table.tbody = tbodyData;
-                this.domObj.off('click','.picturesLook').on('click','.picturesLook',e=>{
-                    let data=$(e.currentTarget).attr("href").split(",");
-                    let imgList=this.getImgHtml(data)
+                this.domObj.off('click', '.picturesLook').on('click', '.picturesLook', e => {
+                    let data = $(e.currentTarget).attr("href").split(",");
+                    let imgList = this.getImgHtml(data)
                     $(".onlyPictureDiv").empty().append(imgList);
                     $(".onlyPictureDiv .pictureUl").viewer();
                     $(".onlyPictureDiv .pictureUl img").click();
@@ -876,9 +900,9 @@ class DataPanel extends BaseWidget {
                 ulhtml += "<ul class='pictureUl' style='display:none'>"
             }
             if (index < 2) {
-                ulhtml += "<li class='pictureLi'><img class='pictureImg' src='" +  this.apiRoot + "/base2/file/loadImg?remotePath=" + item3 + "&access_token=" + this.userToken + "'></li>"
+                ulhtml += "<li class='pictureLi'><img class='pictureImg' src='" + this.apiRoot + "/base2/file/loadImg?remotePath=" + item3 + "&access_token=" + this.userToken + "'></li>"
             } else {
-                ulhtml += "<li class='pictureLi' style='display:none'><img class='pictureImg' src='" +  this.apiRoot + "/base2/file/loadImg?remotePath=" + item3 + "&access_token=" + this.userToken + "'></li>"
+                ulhtml += "<li class='pictureLi' style='display:none'><img class='pictureImg' src='" + this.apiRoot + "/base2/file/loadImg?remotePath=" + item3 + "&access_token=" + this.userToken + "'></li>"
             }
             if (index == imgList.length - 1) {
                 ulhtml += "</ul>"
@@ -1043,5 +1067,34 @@ class DataPanel extends BaseWidget {
             return "";
         }
     }
+    /**
+     * 显示进度提示栏
+     */
+    showLoading() {
+        // setTimeout(() => {
+        //     if (!this.isInnerWidgetLoaded) {
+        //         // this.domObj.find('.widget-datapanel').append(this.template.split('$$')[1]);//在数据窗格插入进度消息元素
+        //         this.domObj.append(this.template.split('$$')[1]);//在数据窗格插入进度消息元素
+        //         this.loadingObj = this.domObj.find('.loadingbg');
+        //         this.loadingObj.show();
+        //     }
+        // }, this.config.loadingDelay);
 
+        // if (!this.isInnerWidgetLoaded) {
+            // this.domObj.find('.widget-datapanel').append(this.template.split('$$')[1]);//在数据窗格插入进度消息元素
+            this.domObj.append(this.template.split('$$')[1]);//在数据窗格插入进度消息元素
+            this.loadingObj = this.domObj.find('.loadingbg');
+            this.loadingObj.show();
+        // }
+    }
+    /**
+     * 隐藏进度提示栏
+     */
+    hideLoading() {
+        if (this.loadingObj) {
+            this.loadingObj.remove();
+        }
+        this.loadingObj = null;
+        this.isInnerWidgetLoaded = false;
+    }
 }

+ 2 - 1
src/widgets/DataPanel/config.json

@@ -4,5 +4,6 @@
     "styleUrl": "widgets/DataPanel/css/style.css",
     "exportInfo":"/zmrq/Gis/export",
     "uploadFile":"/zmrq/commonFile/download",
-    "scrollbarWidth":5
+    "scrollbarWidth":5,
+    "loadingDelay": "500"
 }

+ 110 - 22
src/widgets/DataPanel/css/style.scss

@@ -3,7 +3,7 @@
     -moz-user-select: text;
     -webkit-user-select: text;
     -ms-user-select: text;
-    background-color:white;
+    background-color: white;
     opacity: 0.9;
     position: absolute;
     height: 100%;
@@ -14,6 +14,7 @@
     padding: 0;
     z-index: 1001;
     bottom: 0px;
+
     /* 头部 */
     .header {
         position: relative;
@@ -21,58 +22,67 @@
         left: 0;
         width: 100%;
     }
+
     .headbar {
         height: 40px;
         border-bottom: 1px solid #00d3fe;
         background: #4e81ca;
         position: relative;
     }
+
     .resize-bar {
         height: 2px;
         width: 100%;
-        background:white;
+        background: white;
         margin-bottom: 4px;
         cursor: s-resize;
         transition: background-color 200ms;
+
         &:hover {
             background-color: white;
         }
     }
+
     /* 内容部分 */
     .content {
         position: absolute;
         top: 5px;
         height: 100%;
         width: 100%;
+
         .pull-right {
             float: right !important;
             height: 100%;
             position: relative;
-            .btn{
+
+            .btn {
                 background: rgba(1, 159, 254, 0);
-                height:100%;
+                height: 100%;
                 padding: 0px;
                 margin: 0px;
                 border: none;
                 outline: none !important;
             }
+
             .btn:hover,
             .btn:active,
             .btn:visited,
-            .btn:focus{
+            .btn:focus {
                 border: none !important;
                 outline: none !important;
                 // background: rgba(1, 159, 254, 0)!important;
             }
+
             .btn span:hover,
             .btn span:active,
             .btn span:visited,
-            .btn span:focus{
+            .btn span:focus {
                 border: none !important;
                 outline: none !important;
                 // background: rgba(1, 159, 254, 0)!important;
             }
-            .pull-right-graphic{
+
+            .pull-right-graphic {
                 width: 14px;
                 height: 40px;
                 margin-right: 10px;
@@ -80,6 +90,7 @@
                 line-height: 40px;
                 vertical-align: middle;
             }
+
             // .save2csv span{
             //     background:url('../images/daochu.png');
             //     background-position-y: center;
@@ -87,43 +98,51 @@
             //     background-position-x: center;
             //     display: block;
             // }
-            .unfold-panel span{
-                background:url('../images/shang.png');
+            .unfold-panel span {
+                background: url('../images/shang.png');
                 background-position-y: center;
                 background-repeat: no-repeat;
                 background-position-x: center;
                 display: block;
             }
-            .fold-panel span{
-                background:url('../images/xia.png');
+
+            .fold-panel span {
+                background: url('../images/xia.png');
                 background-position-y: center;
                 background-repeat: no-repeat;
                 background-position-x: center;
                 display: block;
             }
-            .close-panel span{
-                background:url('../images/cha-b.png');
+
+            .close-panel span {
+                background: url('../images/cha-b.png');
                 background-position-y: center;
                 background-repeat: no-repeat;
                 background-position-x: center;
                 display: block;
             }
         }
+
         .tab-content {
             height: calc(100% - 36px);
-            .tab-pane{
+
+            .tab-pane {
                 height: 100%;
+
                 .dataTables_wrapper {
                     height: 100%;
-                    .dataTables_scroll{
+
+                    .dataTables_scroll {
                         height: calc(100% - 59px);
-                        .dataTables_scrollBody{
+
+                        .dataTables_scrollBody {
                             height: calc(100% - 45px) !important;
                         }
                     }
                 }
             }
         }
+
         .widget-datapanel-tit-ul {
             margin: 0px;
             padding: 0px;
@@ -135,28 +154,34 @@
             border-bottom: 0px solid rgba(0, 211, 254, 1);
             height: 100%;
         }
+
         .widget-datapanel-tit-li a {
             text-decoration: none;
             padding-left: 10px;
             padding-right: 10px;
         }
+
         .widget-datapanel-tit-li a:visited {
             text-decoration: none;
             color: #fff
         }
+
         .widget-datapanel-tit-li a:hover {
             color: #fff;
             text-decoration: none;
         }
     }
+
     .widget-fullpanel-con-div {
         height: 100%;
+
         label {
             color: #01d4f9;
         }
     }
+
     .btn {
-        background-color: rgba(1,159,254,0.4);
+        background-color: rgba(1, 159, 254, 0.4);
         color: white;
         font-weight: bold;
         font-size: 14px;
@@ -170,11 +195,13 @@
         height: 100%;
         cursor: pointer;
     }
+
     .btn:active,
     .btn:hover,
     .btn:focus {
         border: 1px solid #019ffe !important;
     }
+
     .dataTables_scrollHead {
         table {
             // border-left: 1px solid #428bca !important;
@@ -182,14 +209,17 @@
             // border-right: 1px solid #428bca !important;
             // margin-top: 10px !important;
             border: 1px solid rgba(128, 128, 128, 0.2);
+
             thead {
-                color:black;
+                color: black;
                 font-size: 18px;
                 background: #f5f7f9;
+
                 th {
                     border-bottom: 2px solid transparent !important;
                     height: 40px;
                 }
+
                 // .sorting:after,
                 // .sorting_asc:after,
                 // .sorting_desc:after,
@@ -205,12 +235,14 @@
                     width: 20px;
                     opacity: 1;
                 }
+
                 .sorting_desc:after {
                     content: " ";
                     content: url(/widgets/DataPanel/images/sp.png);
                     width: 20px;
                     opacity: 1;
                 }
+
                 .sorting_asc:after {
                     content: " ";
                     content: url(/widgets/DataPanel/images/sx.png);
@@ -220,29 +252,36 @@
             }
         }
     }
+
     .dataTables_scrollBody {
         table {
             // border: 1px solid #428bca;
             border-top: 0px;
             border: 1px solid rgba(128, 128, 128, 0.2);
+
             tbody {
                 color: black;
                 font-size: 14px;
                 line-height: 30px;
+
                 tr:nth-of-type(even) {
                     background: #f5f7f9;
                 }
+
                 tr:nth-of-type(odd) {
-                    background: rgba(245,247,249,0.1);
+                    background: rgba(245, 247, 249, 0.1);
                 }
-                tr{
+
+                tr {
                     height: 40px;
                 }
             }
         }
     }
+
     .dataTables_scrollHead,
     .dataTables_scrollBody {
+
         th,
         td {
             max-width: 120px;
@@ -252,17 +291,21 @@
             overflow: hidden;
         }
     }
+
     .information {
         padding-top: 2px;
         padding-left: 30px;
         display: inline;
         color: black;
     }
+
     .length-changing {
         margin: 10px 0px;
+
         label {
             color: #ffffff;
         }
+
         select {
             // background: url(../images/selectback.png) no-repeat right 0 center !important;
             // background-size: 100% 100%;
@@ -272,17 +315,21 @@
             font-size: 14px;
             border: 1px solid #95aede !important;
         }
+
         select:focus {
             // background-image: url(../images/selectback.png) !important;
         }
+
         .custom-select {
             // background-image: url(../images/selectback.png) !important;
             border: 1px solid transparent !important;
             border: 1px solid #95aede !important;
         }
     }
+
     .pagination {
         margin: 10px 0px;
+
         .page-item.disabled .page-link {
             color: black;
             pointer-events: none;
@@ -290,29 +337,34 @@
             background-color: transparent;
             border-color: transparent;
         }
+
         .page-link {
             color: black;
             background-color: transparent;
             border-color: transparent;
         }
+
         .page-item.active .page-link {
             // background-image: url(../images/btnselect.png) !important;
             // background-size: 100% 100%;
             // background-repeat: no-repeat;
-            background: rgba(135,190,222,0.4);
+            background: rgba(135, 190, 222, 0.4);
         }
+
         li:hover,
         li:focus {
             // background-color: transparent !important;
             // background-image: url(../images/btnselect.png) !important;
             // background-size: 100% 100%;
             // background-repeat: no-repeat;
-            background: rgba(135,190,222,0.4);
+            background: rgba(135, 190, 222, 0.4);
             border: 0 !important;
         }
+
         a:focus {
             border: 0 !important;
         }
+
         .dataTables_paginate {
             margin-left: 30px;
             margin-top: -8px;
@@ -320,25 +372,32 @@
             right: 10px;
         }
     }
+
     table {
         margin-bottom: 10px;
+
         a {
             cursor: pointer;
         }
+
         tr.active {
             color: black;
+
             td {
                 // background-color: #337ab7 !important;
                 background: #edf4ff !important;
                 color: black;
             }
+
             a {
                 color: black;
             }
+
             a:hover {
                 color: black;
             }
         }
+
         th,
         td {
             vertical-align: middle;
@@ -351,31 +410,39 @@
             border: 0;
         }
     }
+
     .table-header {
         padding: 0 10px;
+
         label {
             margin-top: 5px;
             margin-bottom: 0;
         }
     }
+
     * {
         user-select: auto;
     }
+
     tr.active {
         color: #FFF;
+
         td {
             background-color: #337ab7 !important;
         }
     }
+
     .nav-tabs li>a {
         padding: 5px 10px;
         text-align: center;
         width: 120px;
     }
+
     li:focus,
     a:focus {
         border-color: transparent;
     }
+
     .nav-tabs .lidiv.nav-item.show .nav-link,
     .nav-tabs .lidiv.nav-link.active {
         color: #ffffff;
@@ -387,6 +454,7 @@
         text-overflow: ellipsis;
         overflow: hidden;
     }
+
     .nav-tabs .lidiv.nav-link {
         color: #ffffff;
         border-color: transparent;
@@ -395,6 +463,7 @@
         text-overflow: ellipsis;
         overflow: hidden;
     }
+
     .nav-tabs .lidiv2.nav-item.show .nav-link,
     .nav-tabs .lidiv2.nav-link.active {
         color: #ffffff;
@@ -405,6 +474,7 @@
         text-overflow: ellipsis;
         overflow: hidden;
     }
+
     .nav-tabs .lidiv2.nav-link {
         color: #ffffff;
         border-color: transparent;
@@ -413,4 +483,22 @@
         text-overflow: ellipsis;
         overflow: hidden;
     }
+
+    .loadingbg {
+        position: absolute;
+        left: 0;
+        top: 50px;
+        padding: 0;
+        margin: 0;
+        width: 100%;
+        height: 100%;
+        overflow: hidden;
+        background: rgba(240, 237, 229, 0.43);
+        font-size: 15px;
+        font-weight: 600;
+
+        display: flex;
+        align-items: center;
+        justify-content: center;
+    }
 }

BIN
src/widgets/DataPanel/images/loading.gif


+ 3 - 2
src/widgets/GasStopAnalysis/Widget.html

@@ -43,7 +43,7 @@
                     分析结果
                     <span class="glyphicon glyphicon-question-sign" title="分析的结果展示。将会自动在地图上高亮显示结果,点击查看详细结果可显示表格。"></span>
                 </legend>
-                <div class="foldable">
+                <div class="foldable" style="height: 470px;overflow: auto;">
                     <p>
                         分析结果概览
                         <span class="glyphicon pull-right view-map glyphicon-unchecked">
@@ -54,10 +54,11 @@
                         <tbody class="analyse-info-tbody">
                         </tbody>
                     </table>
-                    <button type="button" class="btn btn-sm btn-primary btn-block view-details disabled">查看详细结果</button>
+                    <!-- <button type="button" class="btn btn-sm btn-primary btn-block view-details disabled">查看详细结果</button> -->
                 </div>
             </fieldset>
         </div>
+        <button type="button" class="btn btn-sm btn-primary btn-block view-details disabled">查看详细结果</button>
         <button type="button" class="btn btn-sm btn-danger btn-block clean-all">清除所有</button>
     </form>
 </div>

+ 15 - 0
src/widgets/Header/Widget.ts

@@ -105,6 +105,21 @@ class Header extends BaseWidget {
                     this.AppX.appConfig.userlevel = data.userLevel;
                     this.AppX.appConfig.userId = data.id;
                     this.AppX.appConfig.companyId = data.companyId;
+                    
+                    //按公司强制校正gisToken(接口生成有bug)
+                    // if (data.companyId == 1) {//绵竹公司
+                    //     this.AppX.appConfig.gisToken = 'eyJyZWFsTmFtZSI6Iue7teerueW6kyIsImNvbm5lY3RzdHIiOiJEQVRBQkFTRT16bWdlbztORVROQU1FPTExMi41MS4yNDkuMjAyL3ptZ2VvO1NFUlZFUj0xMTIuNTEuMjQ5LjIwMjtVU0VSSUQ9em1ycV9tel9zZGU7UEFTU1dPUkQ9Wm1ScW1aR2lzNTY7UE9SVD0xNTIxQDUxNTEvdGNwO1ZFUlNJT049c2RlLkRFRkFVTFQiLCJ1c2VyTmFtZSI6ImFkbWluX216IiwidXNlcklkIjoyNzZ9';
+                    // } else if (data.companyId == 4) {//富平公司
+                    //     this.AppX.appConfig.gisToken = 'eyJyZWFsTmFtZSI6IuWvjOW5s+W6kyIsImNvbm5lY3RzdHIiOiJEQVRBQkFTRT16bWdlbztORVROQU1FPTExMi41MS4yNDkuMjAyL3ptZ2VvO1NFUlZFUj0xMTIuNTEuMjQ5LjIwMjtVU0VSSUQ9em1ycV9mcF9zZGU7UEFTU1dPUkQ9Wm1ScW1aR2lzNTY7UE9SVD0xNTIxQDUxNTEvdGNwO1ZFUlNJT049c2RlLkRFRkFVTFQiLCJ1c2VyTmFtZSI6ImFkbWluX2ZwIiwidXNlcklkIjoyNzZ9';
+                    // } 
+                    if (data.companyId == 1) {//绵竹公司
+                        this.AppX.appConfig.gisToken = 'eyJyZWFsTmFtZSI6Iue7teerueW6kyIsImNvbm5lY3RzdHIiOiJEQVRBQkFTRT16bWdlbztORVROQU1FPTExMi41MS4yNDkuMjAyL3ptZ2VvO1NFUlZFUj0xMTIuNTEuMjQ5LjIwMjtVU0VSSUQ9em1ycV9tel9zZGU7UEFTU1dPUkQ9Wm1ScW1aR2lzNTY7UE9SVD0xNTIxQDUxNTEvdGNwO1ZFUlNJT049c2RlLkRFRkFVTFQiLCJ1c2VyTmFtZSI6ImFkbWluX216IiwidXNlcklkIjoyNzZ9';
+                    } else if (data.companyId == 3) {//盐亭公司
+                        this.AppX.appConfig.gisToken = 'eyJyZWFsTmFtZSI6IuebkOS6reeuoeeQhuWRmCIsImNvbm5lY3RzdHIiOiJEQVRBQkFTRT1aTUdFTztORVROQU1FPTExMi41MS4yNDkuMjAyL3ptZ2VvO1NFUlZFUj0xMTIuNTEuMjQ5LjIwMjtVU0VSSUQ9em1ycV95dF9zZGU7UEFTU1dPUkQ9Wm1ScW1aR2lzNTY7UE9SVD0xNTIxQDUxNTEvdGNwO1ZFUlNJT049c2RlLkRFRkFVTFQiLCJ1c2VyTmFtZSI6ImFkbWluX3l0IiwidXNlcklkIjoyNzV9';
+                    } else if (data.companyId == 4) {//富平公司
+                        this.AppX.appConfig.gisToken = 'eyJyZWFsTmFtZSI6IuWvjOW5s+W6kyIsImNvbm5lY3RzdHIiOiJEQVRBQkFTRT16bWdlbztORVROQU1FPTExMi41MS4yNDkuMjAyL3ptZ2VvO1NFUlZFUj0xMTIuNTEuMjQ5LjIwMjtVU0VSSUQ9em1ycV9mcF9zZGU7UEFTU1dPUkQ9Wm1ScW1aR2lzNTY7UE9SVD0xNTIxQDUxNTEvdGNwO1ZFUlNJT049c2RlLkRFRkFVTFQiLCJ1c2VyTmFtZSI6ImFkbWluX2ZwIiwidXNlcklkIjoyNzZ9';
+                    }
+
                     this.userinfor = data;
                     this.domObj.find(".detail-name").text(data.realName);
                     this.domObj.find(".detail-phone").text(data.phone);

+ 10 - 3
src/widgets/HiddenPageInfo/Widget.html

@@ -72,16 +72,23 @@ $$
 </div>
 $$
 <!--派工信息(2)-->
-<div class='stateInfo'><span class='titleInfo'>派工审核</span> <span class='spanValue' name='dispatchTime'></span></div>
+<div class='stateInfo'><span class='titleInfo'>派工审核</span> <span class='spanValue' name='createTime'></span></div>
+<div class="form-group form-inline hideWrite">
+    <div class='oneItem'>
+        <label class=" control-label">派工日期</label>
+        <select class="input-sm form-control dispatchTime" showname="dispatchTime" name='dispatchTime' data-live-search="true" data-style="btn-primary">
+        </select>
+    </div>
+</div>
 <div class="form-group form-inline userSelect hideWrite">
     <div class='item'>
         <label class=" control-label">部门</label>
-        <select class="input-sm form-control    governPersonDepartment" name='governPersonDepartment' data-live-search="true" data-style="btn-primary">
+        <select class="input-sm form-control governPersonDepartment" name='governPersonDepartment' data-live-search="true" data-style="btn-primary">
         </select>
     </div>
     <div class='item'>
         <label class=" control-label">处理责任人</label>
-        <select class="input-sm form-control  handleUserId" showname="handleUserName" name='handleUserId' data-live-search="true" data-style="btn-primary">
+        <select class="input-sm form-control handleUserId" showname="handleUserName" name='handleUserId' data-live-search="true" data-style="btn-primary">
         </select>
     </div>
 </div>

+ 9 - 2
src/widgets/HiddenTroubleSearchAll/Widget.html

@@ -1,5 +1,13 @@
 <div class="widget-HiddenTroubleSearchAll box">
     <div class='tool form-inline'>
+        <div class="form-group department_btn">
+            <label for="department">部门</label>
+            <select class="input-sm form-control department minwidth" id="department"></select>
+        </div>
+        <div class="form-group">
+            <label for="users">人员</label>
+            <select class="input-sm form-control users minwidth" id="users"></select>
+        </div>
         <div class="form-group">
             <label class=" control-label">隐患名称</label>
             <input type="text" autocomplete="off" class="form-control hiddenName" name="hiddenName" placeholder="隐患名称">
@@ -12,8 +20,7 @@
                 <option value='2'>待隐患处理</option>
                 <option value='3'>协调处理</option>
                 <option value='5'>处理待审核</option>
-                <option value='4'>结束归档</option>
-
+                <option value='4'>完成处理</option>
             </select>
         </div>
         <div class="form-group">

+ 82 - 2
src/widgets/HiddenTroubleSearchAll/Widget.ts

@@ -11,6 +11,9 @@ import Polyline = require('esri/geometry/Polyline');
 enum operation {
     create, destroy, clear
 }
+enum selectType {
+    all, single
+}
 
 export = HiddenTroubleSearchAll;
 class HiddenTroubleSearchAll extends BaseWidget {
@@ -136,6 +139,13 @@ class HiddenTroubleSearchAll extends BaseWidget {
         this.domObj.find(".btn_delete").off().click(e => {
             this.deleteTroubleInfo();
         });
+
+        //部门列表
+        this.domObj.find('.department').on("change", function () {
+            this.getUser(selectType.all, this.domObj.find(".department").val());
+        }.bind(this));
+        //加载部门列表
+        this.getGroup(selectType.all);
     }
     getFileAddress(searchInfo,url,sendType){
         return new Promise<void>((resolve, reject) => {
@@ -208,7 +218,7 @@ class HiddenTroubleSearchAll extends BaseWidget {
             current: 1,
             size: 10000,
         }
-        this.ajaxSend.sendAjax(this, data, this.config.troubleInfo, this.ajaxSend.type.get, function (results) {
+        this.ajaxSend.sendAjax(this, data, this.config.troubleInfoNew, this.ajaxSend.type.get, function (results) {
             if (this.ajaxSend.checkResults(this, results)) {
                 this.allList = results.result.records;
                 this.renderPoint(this.allList);
@@ -233,6 +243,7 @@ class HiddenTroubleSearchAll extends BaseWidget {
       */
     getSearchInfo() {
         this.searchInfo = {
+            userId: this.domObj.find(".users option:selected").val(),
             troubleName: this.domObj.find(".hiddenName").val(),
             processId:this.domObj.find(".processId").val(),
             startTime:this.domObj.find(".report_begindate").val(),
@@ -264,6 +275,74 @@ class HiddenTroubleSearchAll extends BaseWidget {
         }
     }
 
+    /**
+     * @function 获取部门列表
+     */
+    getGroup(selectType: selectType) {
+        let data = {
+            // id: this.AppX.appConfig.deptId
+            current: 1,
+            size: 10000
+        }
+        this.ajaxSend.sendAjax(this, data, this.config.getGroupList, this.ajaxSend.type.get, this.getGroupListCallback.bind(this, selectType));
+    }
+    getGroupListCallback(optionType, results) {
+        if (results.code != 1) {
+            this.toast.Show(results.message);
+            return;
+        }
+        let strdepartment = "";
+        if (optionType == selectType.all) {
+            strdepartment = ("<option selected  value=''>全部</option>");
+        }
+
+        $.each(results.result.records, function (index, item) {
+            if (optionType == selectType.single && this.addData.companyid) {
+                if (this.addData.companyid == item.id) {
+                    strdepartment += "<option selected='selected' value='" + item.id + "'>" + item.name + "</option>";
+                } else {
+                    strdepartment += "<option value='" + item.id + "'>" + item.name + "</option>";
+                }
+            } else {
+                strdepartment += "<option value='" + item.id + "'>" + item.name + "</option>";
+            }
+        }.bind(this));
+        this.domObj.find(".department").empty().append(strdepartment);
+        this.getUser(optionType, this.domObj.find(".department").val());
+    }
+
+    /**
+     * @function 根据部门id获取用户列表,空代表查询全部
+     * @param isall 是否全部
+     */
+    getUser(optionType: selectType, companyid) {
+        let data = {
+            "current": 1,
+            "size": this.config.pagemaxsize,
+            // "sfbd": 1,
+            "departmentId": companyid
+        }
+        this.ajaxSend.sendAjax(this, data, this.config.getUserList, this.ajaxSend.type.get, function (results) {
+            var that = this;
+            if (results.code != 1) {
+                that.toast.Show(results.message);
+                return;
+            }
+            let strusers = "";
+            if (optionType == selectType.all) {
+                strusers = "<option selected value=''>全部</option>";
+            }
+            if (results.result.records.length == 0) {
+                strusers = "<option selected value=''>暂无巡检人员</option>"
+            } else {
+                $.each(results.result.records, function (index, item) {
+                    strusers += "<option  value='" + item.id + "'>" + item.realName + "</option>";
+                }.bind(this));
+            }
+            this.domObj.find(".users").empty().append(strusers);
+        }.bind(this));
+    }
+
     /**
     * 渲染出列表点选的点和线
     * */
@@ -280,11 +359,12 @@ class HiddenTroubleSearchAll extends BaseWidget {
             that: this,
             dataTable: that.dataTable,
             elementId: "HiddenTroubleSearchAllinfodata",
-            url: that.config.troubleInfo,
+            url: that.config.troubleInfoNew,
             // isCheck: false,
             // testData:this.config.dataInfo,
             searchInfo: that.searchInfo,//条件在不断变化,故需要有全局的条件监听
             displayTitle: ["隐患名称", "所属单位", "隐患地址", "上报人","上报时间", "状态", "隐患详情"],
+            // displayField: ["troubleName", "unitName", "address", "reportUserName", "findTime","processName", "troubleInfo"],
             displayField: ["troubleName", "unitName", "address", "findUserName", "findTime","processName", "troubleInfo"],
             extentDisplayTitle: ['详情'],
             extentDisplayContent: [{

+ 90 - 76
src/widgets/HiddenTroubleSearchAll/config.json

@@ -2,27 +2,29 @@
     "widgetUrl": "widgets/HiddenTroubleSearchAll",
     "tmplateUrl": "widgets/HiddenTroubleSearchAll/Widget.html",
     "styleUrl": "widgets/HiddenTroubleSearchAll/css/style.css",
-    "getDepartment":"/base/department/page",
+    "getGroupList": "/base/department/page",
     "getUserList": "/base/user/getUserByDepts/list",
-    "troubleInfo":"/zmrq/trouble/page",
-    "deleteTroublrInfo":"/zmrq/trouble/deleteByIds",
-    "trouble":"/zmrq/trouble/secretaryCheck",
-    "exportTrouble":"/zmrq/trouble/export",
-    "downloadFile":"/base/file/downloadFile",
+    "troubleInfo": "/zmrq/trouble/page",
+    "troubleInfoNew": "/zmrq/trouble/pageNew",
+    "deleteTroublrInfo": "/zmrq/trouble/deleteByIds",
+    "trouble": "/zmrq/trouble/secretaryCheck",
+    "exportTrouble": "/zmrq/trouble/export",
+    "downloadFile": "/base/file/downloadFile",
     "tolerance": 3,
     "zoomscale": 2000,
-    "dataInfo":{
-        "code":1,
-        "result":{
-            "records":[
+    "pagemaxsize": 500,
+    "dataInfo": {
+        "code": 1,
+        "result": {
+            "records": [
                 {
                     "troubleName": "隐患测试1",
-                    "reportUserName":"吴一",
-                    "processState":"1",
-                    "processId":"4",
-					"processName":"完成处理",
-                    "locationX":"103.95",
-                    "locationY":"31.24",
+                    "reportUserName": "吴一",
+                    "processState": "1",
+                    "processId": "4",
+                    "processName": "完成处理",
+                    "locationX": "103.95",
+                    "locationY": "31.24",
                     "address": "东一路",
                     "unitName": "建筑局",
                     "damageTypeName": "中压管线",
@@ -50,15 +52,15 @@
                             "path": "/语音.mp4"
                         }
                     ],
-                    "governPersonDepartment":"1",
-                    "governPersonDepartmentName":"安全部",
-                    "handleUserid":"2",
-                    "handleUserName":"张三",
-                    "governPersonDepartment2":"1,2",
-                    "governPersonDepartment2Name":"安全部,巡检部",
-                    "coprocessorId":"3,4",
-                    "coprocessorName":"王五、赵六",
-                    "rectifyFile":[
+                    "governPersonDepartment": "1",
+                    "governPersonDepartmentName": "安全部",
+                    "handleUserid": "2",
+                    "handleUserName": "张三",
+                    "governPersonDepartment2": "1,2",
+                    "governPersonDepartment2Name": "安全部,巡检部",
+                    "coprocessorId": "3,4",
+                    "coprocessorName": "王五、赵六",
+                    "rectifyFile": [
                         {
                             "fileName": "文件2",
                             "path": "/文件2.doc"
@@ -68,12 +70,12 @@
                             "path": "/照片2.png"
                         }
                     ],
-                    "dutyPlanNote":"请根据方案执行",
-                    "auditList":[
+                    "dutyPlanNote": "请根据方案执行",
+                    "auditList": [
                         {
-                            "handleTime":"2021-7-5",
-                            "handleNote":"已将压占处理完成",
-                            "handleFiles":[
+                            "handleTime": "2021-7-5",
+                            "handleNote": "已将压占处理完成",
+                            "handleFiles": [
                                 {
                                     "fileName": "文件3",
                                     "path": "/文件3.doc"
@@ -83,24 +85,29 @@
                                     "path": "/照片3.png"
                                 }
                             ],
-                            "handleVoice":[{
-                                "fileName": "语音1",
-                                "path": "/语音.mp4"
-                            }],
-                            "handleCheck":"审核未通过",
-                            "handleCheckNote":"请重新处理",
-                            "handleCheckFiles":[ {
-                                "fileName": "文件4",
-                                "path": "/文件4.doc"
-                            },
-                            {
-                                "fileName": "照片4",
-                                "path": "/照片4.png"
-                            }]
-                        },{
-                            "handleTime":"2021-7-5",
-                            "handleNote":"已将压占处理完成",
-                            "handleFiles":[
+                            "handleVoice": [
+                                {
+                                    "fileName": "语音1",
+                                    "path": "/语音.mp4"
+                                }
+                            ],
+                            "handleCheck": "审核未通过",
+                            "handleCheckNote": "请重新处理",
+                            "handleCheckFiles": [
+                                {
+                                    "fileName": "文件4",
+                                    "path": "/文件4.doc"
+                                },
+                                {
+                                    "fileName": "照片4",
+                                    "path": "/照片4.png"
+                                }
+                            ]
+                        },
+                        {
+                            "handleTime": "2021-7-5",
+                            "handleNote": "已将压占处理完成",
+                            "handleFiles": [
                                 {
                                     "fileName": "文件3",
                                     "path": "/文件3.doc"
@@ -110,38 +117,45 @@
                                     "path": "/照片3.png"
                                 }
                             ],
-                            "handleVoice":[{
-                                "fileName": "语音1",
-                                "path": "/语音.mp4"
-                            }],
-                            "handleCheck":"审核未通过",
-                            "handleCheckNote":"请重新处理",
-                            "handleCheckFiles":[ {
-                                "fileName": "文件4",
-                                "path": "/文件4.doc"
-                            },
-                            {
-                                "fileName": "照片4",
-                                "path": "/照片4.png"
-                            }]
-
+                            "handleVoice": [
+                                {
+                                    "fileName": "语音1",
+                                    "path": "/语音.mp4"
+                                }
+                            ],
+                            "handleCheck": "审核未通过",
+                            "handleCheckNote": "请重新处理",
+                            "handleCheckFiles": [
+                                {
+                                    "fileName": "文件4",
+                                    "path": "/文件4.doc"
+                                },
+                                {
+                                    "fileName": "照片4",
+                                    "path": "/照片4.png"
+                                }
+                            ]
                         }
                     ],
-                    "coordinateList":[{
-                        "coordinateTime":"2021-07-06",
-                        "coordinateNote":"已完成协调",
-                        "coordinateFiles":[{
-                            "fileName": "文件5",
-                            "path": "/文件5.doc"
-                        },
+                    "coordinateList": [
                         {
-                            "fileName": "照片6",
-                            "path": "/照片6.png"
-                        }]
-                    }]
+                            "coordinateTime": "2021-07-06",
+                            "coordinateNote": "已完成协调",
+                            "coordinateFiles": [
+                                {
+                                    "fileName": "文件5",
+                                    "path": "/文件5.doc"
+                                },
+                                {
+                                    "fileName": "照片6",
+                                    "path": "/照片6.png"
+                                }
+                            ]
+                        }
+                    ]
                 }
             ],
-            "total":1
+            "total": 1
         }
     }
-}
+}

+ 1 - 0
src/widgets/HiddenTroubleSearchAllAdmin/Widget.ts

@@ -226,6 +226,7 @@ class HiddenTroubleSearchAllAdmin extends BaseWidget {
             // testData:this.config.dataInfo,
             searchInfo: that.searchInfo,//条件在不断变化,故需要有全局的条件监听
             displayTitle: ["隐患名称", "所属单位", "隐患地址", "上报人","上报时间", "状态", "隐患详情"],
+            // displayField: ["troubleName", "unitName", "address", "reportUserName", "findTime","processName", "troubleInfo"],
             displayField: ["troubleName", "unitName", "address", "findUserName", "findTime","processName", "troubleInfo"],
             extentDisplayTitle: ['详情'],
             extentDisplayContent: [{

+ 202 - 68
src/widgets/LayerList/Widget.ts

@@ -31,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;
@@ -46,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() {
@@ -189,70 +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 (!BaseUrl) {
+                        BaseUrl = url;
                     }
                 }
                 if (url.substring(url.lastIndexOf("/") + 1, url.length) != "MapServer") {
                     var id = parseInt(url.substring(url.lastIndexOf("/") + 1, url.length));
-                    if(id===id){
+                    if (id === id) {
                         sublayerid.push(id);
                     }
                 }
             }
-
         }
+
         if (layer) {
-            this.updateLayerVisibility(BaseUrl, sublayerid, layer.type, checked);
-            if(BaseUrl=="tian_online_vector"||BaseUrl=="tian_online_raster"){
-                this.updateLayerVisibility(BaseUrl+"_l", 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);
-                }
-            }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 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);
+                // }
 
-            }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", "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);
@@ -262,8 +384,16 @@ class LayerList extends BaseWidget {
         }
 
     };
-    private updateLayerVisibility(url, sublayerid, type, visible) {
-        if (this.map&&url) {
+    /**
+     * 
+     * @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)
@@ -277,29 +407,32 @@ class LayerList extends BaseWidget {
                 }
             }
             else {
-                if(url=="tian_online_raster"){//处理在线天地图影像图
+                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);//最底层
+                    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"){//处理在线天地图矢量图
+                    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);//最底层
+                    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") {
+                    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 = [];
-                    if(parseInt(id)===parseInt(id)){
+                    if (parseInt(id) === parseInt(id)) {
                         sublayerid.push(parseInt(id));
                     }
                     this.updateLayerVisibility(baseUrl, sublayerid, type, visible);
@@ -308,6 +441,7 @@ class LayerList extends BaseWidget {
                 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
@@ -325,7 +459,6 @@ class LayerList extends BaseWidget {
                                 layer.setVisibleLayers([sublayerid]);
                     }
                 }
-
             }
         }
     };
@@ -492,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];
@@ -516,24 +650,24 @@ class LayerList extends BaseWidget {
         return layers;
     };
     private findLayerInMap(url) {
-        let layer=null;
+        let layer = null;
         for (var i = 0; i < this.map.layerIds.length; i++) {
             const templayer = this.map.getLayer(this.map.layerIds[i]);
-            if (templayer.url && templayer.url == url){
-                layer=templayer;
+            if (templayer.url && templayer.url == url) {
+                layer = templayer;
                 return layer;
             }
         }
-        if(!layer){
-            layer=this.map.getLayer(url);
+        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];

+ 3 - 2
src/widgets/LayerList/config.json

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

+ 69 - 60
src/widgets/MaintenancePageInfo/Widget.html

@@ -11,19 +11,19 @@ $$
     <div class='item'>
         <label class="mustWrite control-label">报警人姓名</label>
         <input type="text" autocomplete="off" class="form-control alarmPeopleName" name="alarmPeopleName"
-        placeholder="报警人姓名" >
+            placeholder="报警人姓名">
     </div>
     <div class='item'>
         <label class=" mustWrite control-label">地址</label>
-        <input type="text" autocomplete="off" class="form-control address" name="address"
-        data-bv-message="地址不能为空" data-bv-trigger="blur" required  placeholder="地址">
+        <input type="text" autocomplete="off" class="form-control address" name="address" data-bv-message="地址不能为空"
+            data-bv-trigger="blur" required placeholder="地址">
     </div>
 </div>
 <div class="form-group form-inline">
     <div class='item'>
         <label class=" control-label">一级抢修分类</label>
-        <select class="input-sm form-control   typeMain" data-live-search="true"
-            name='typeMain' data-max-options="1" showname='typeMainName'  data-style="btn-primary">
+        <select class="input-sm form-control   typeMain" data-live-search="true" name='typeMain' data-max-options="1"
+            showname='typeMainName' data-style="btn-primary">
             <!-- <option value='0' selected="selected">无气/气小</option>
             <option value='1'>户内漏气</option>
             <option value='2'>户外漏气</option>
@@ -32,8 +32,8 @@ $$
     </div>
     <div class='item'>
         <label class=" control-label">二级抢修分类</label>
-        <select class="input-sm form-control   type" data-live-search="true"
-            name='type' data-max-options="1" showname='typeName'  data-style="btn-primary">
+        <select class="input-sm form-control   type" data-live-search="true" name='type' data-max-options="1"
+            showname='typeName' data-style="btn-primary">
             <!-- <option value='0' selected="selected">无气/气小</option>
             <option value='1'>户内漏气</option>
             <option value='2'>户外漏气</option>
@@ -45,28 +45,28 @@ $$
 <div class="form-group form-inline userSelect">
     <div class='item'>
         <label class=" control-label">部门</label>
-        <select class="input-sm form-control  departmentId" data-live-search="true"
-        name='departmentId' showname='departmentName' data-max-options="1" data-style="btn-primary">
+        <select class="input-sm form-control  departmentId" data-live-search="true" name='departmentId'
+            showname='departmentName' data-max-options="1" data-style="btn-primary">
         </select>
     </div>
     <div class='item'>
         <label class=" control-label">责任人员</label>
-        <select class="input-sm form-control  dispatchUserId" data-live-search="true"
-            name='dispatchUserId' showname='dispatchUserName' data-max-options="1" data-style="btn-primary">
+        <select class="input-sm form-control  dispatchUserId" data-live-search="true" name='dispatchUserId'
+            showname='dispatchUserName' data-max-options="1" data-style="btn-primary">
         </select>
     </div>
 </div>
 <div class="form-group form-inline userSelect">
     <div class='item'>
         <label class=" control-label">协助人员部门</label>
-        <select class="input-sm form-control  assistantDepartment" data-live-search="true"
-        name='assistantDepartment' showname='assistantDepartmentName' data-max-options="1" data-style="btn-primary">
+        <select class="input-sm form-control  assistantDepartment" data-live-search="true" name='assistantDepartment'
+            showname='assistantDepartmentName' data-max-options="1" data-style="btn-primary">
         </select>
     </div>
     <div class='item'>
         <label class=" control-label">协助人员</label>
         <select class="input-sm form-control  assistantUserId multipleSelect" multiple data-live-search="true"
-            name='assistantUserId' showname='assistantUserName'  data-style="btn-primary">
+            name='assistantUserId' showname='assistantUserName' data-style="btn-primary">
         </select>
     </div>
 </div>
@@ -86,7 +86,8 @@ $$
 <div class="form-group form-inline hideWrite">
     <div class='oneItem fileListHasnotPre'>
         <label class=" control-label">接单附件</label>
-        <input type="file" class="form-control file takeOrderFile" fileType='file' showname='takeOrderFile' name="file" placeholder="上报附件">
+        <input type="file" class="form-control file takeOrderFile" fileType='file' showname='takeOrderFile' name="file"
+            placeholder="上报附件">
     </div>
 </div>
 $$
@@ -95,19 +96,18 @@ $$
 <div class="form-group form-inline userSelect inputForm contentInfo">
     <div class='item'>
         <label class="mustWrite control-label">到位时间</label>
-        <input type="text" autocomplete="off" class="form-control signTime" name="signTime"
-        placeholder="到位时间" >
+        <input type="text" autocomplete="off" class="form-control signTime" name="signTime" placeholder="到位时间">
     </div>
     <div class='item'>
         <label class=" mustWrite control-label">处理时间</label>
-        <input type="text" autocomplete="off" class="form-control completeTime" name="completeTime"
-        placeholder="处理时间">
+        <input type="text" autocomplete="off" class="form-control completeTime" name="completeTime" placeholder="处理时间">
     </div>
 </div>
 <div class="form-group inputForm form-inline" >
     <div class='oneItem'>
         <label class=" control-label">处置情况</label>
-        <textarea class="form-control  emergencyHandling" rows="3" name="emergencyHandling" placeholder="处置情况"></textarea>
+        <textarea class="form-control  emergencyHandling" rows="3" name="emergencyHandling"
+            placeholder="处置情况"></textarea>
     </div>
 </div>
 <div class="form-group inputForm form-inline reportVoice">
@@ -119,13 +119,15 @@ $$
 <div class="form-group inputForm form-inline hideWrite">
     <div class='oneItem fileListHasnotPre'>
         <label class=" control-label">处理附件</label>
-        <input type="file" class="form-control file emergencyFile" fileType='file' showname='emergencyFile' name="emergencyFile" placeholder="处理附件">
+        <input type="file" class="form-control file emergencyFile" fileType='file' showname='emergencyFile'
+            name="emergencyFile" placeholder="处理附件">
     </div>
 </div>
 <div class="form-group inputForm form-inline hideWrite">
     <div class='oneItem fileListHasnotPre'>
         <label class=" control-label">确认签字</label>
-        <input type="file" class="form-control file confirmingTheLink" fileType='file' showname='confirmingTheLink' name="confirmingTheLink" placeholder="确认签字">
+        <input type="file" class="form-control file confirmingTheLink" fileType='file' showname='confirmingTheLink'
+            name="confirmingTheLink" placeholder="确认签字">
     </div>
 </div>
 <div class="form-group lookForm form-inline">
@@ -143,13 +145,13 @@ $$
     <div class='item'>
         <label class=" control-label">部门</label>
         <select class="input-sm form-control  responsibleDepartment" data-live-search="true"
-        name='responsibleDepartment' showname='responsibleDepartmentName' data-style="btn-primary">
+            name='responsibleDepartment' showname='responsibleDepartmentName' data-style="btn-primary">
         </select>
     </div>
     <div class='item'>
         <label class=" control-label">抢修负责人</label>
-        <select class="input-sm form-control  responsibleUserId" data-live-search="true"
-            name='responsibleUserId' showname='responsibleUserName' data-style="btn-primary">
+        <select class="input-sm form-control  responsibleUserId" data-live-search="true" name='responsibleUserId'
+            showname='responsibleUserName' data-style="btn-primary">
         </select>
     </div>
 </div>
@@ -157,46 +159,48 @@ $$
     <div class='item'>
         <label class=" control-label">部门</label>
         <select class="input-sm form-control  mdispatchingDepartment" data-live-search="true"
-        name='mdispatchingDepartment' showname='mdispatchingDepartmentName' multiple data-style="btn-primary">
+            name='mdispatchingDepartment' showname='mdispatchingDepartmentName' multiple data-style="btn-primary">
         </select>
     </div>
     <div class='item'>
         <label class=" control-label">抢修人员</label>
-        <select class="input-sm form-control  mdispatchingUserId" data-live-search="true"
-            name='mdispatchingUserId' showname='mdispatchingUserName' multiple data-style="btn-primary">
+        <select class="input-sm form-control  mdispatchingUserId" data-live-search="true" name='mdispatchingUserId'
+            showname='mdispatchingUserName' multiple data-style="btn-primary">
         </select>
     </div>
 </div>
 <div class="form-group form-inline">
     <div class='oneItem'>
         <label class=" control-label">备注</label>
-        <textarea class="form-control  mdispatchingNotes" rows="3" name="mdispatchingNotes" showname='mdispatchingNotes' placeholder=""></textarea>
+        <textarea class="form-control  mdispatchingNotes" rows="3" name="mdispatchingNotes" showname='mdispatchingNotes'
+            placeholder=""></textarea>
     </div>
 </div>
 <div class="form-group form-inline hideWrite">
     <div class='oneItem fileListHasnotPre'>
         <label class=" control-label">附件</label>
-        <input type="file" class="form-control file mdispatchingFile" fileType='file' showname='mdispatchingFile' name="file" placeholder="附件">
+        <input type="file" class="form-control file mdispatchingFile" fileType='file' showname='mdispatchingFile'
+            name="file" placeholder="附件">
     </div>
 </div>
 $$
 <!--抢维修处理(4)-->
 <div class='stateInfo'><span class='titleInfo'>抢修处理</span></div>
-<div class="form-group inputForm form-inline">
+<div class="form-group form-inline userSelect contentInfo">
     <div class='item'>
-        <label class=" control-label">抢修到位时间</label>
-        <input class="form-control  handleSignTime" name="handleSignTime" showname='handleSignTime' placeholder=""></input>
+        <label class="mustWrite control-label">到位时间</label>
+        <input type="text" autocomplete="off" class="form-control overTime" name="overTime" placeholder="抢修到位时间">
     </div>
-
     <div class='item'>
-        <label class=" control-label">抢修完成时间</label>
-        <input class="form-control  maintenanceTime"  name="maintenanceTime" showname='maintenanceTime' placeholder=""></input>
+        <label class=" mustWrite control-label">抢修时间</label>
+        <input type="text" autocomplete="off" class="form-control maintenanceTime" name="maintenanceTime" placeholder="抢修处理时间">
     </div>
 </div>
-<div class="form-group inputForm form-inline" >
+<div class="form-group form-inline">
     <div class='oneItem'>
         <label class=" control-label">抢修备注</label>
-        <textarea class="form-control  maintenanceNotes" rows="3" name="maintenanceNotes" showname='maintenanceNotes' placeholder=""></textarea>
+        <textarea class="form-control maintenanceNotes" rows="3" name="maintenanceNotes" showname='maintenanceNotes'
+            placeholder=""></textarea>
     </div>
 </div>
 <div class="form-group form-inline inputForm reportVoice">
@@ -208,7 +212,8 @@ $$
 <div class="form-group inputForm form-inline hideWrite">
     <div class='oneItem fileListHasnotPre'>
         <label class=" control-label">附件</label>
-        <input type="file" class="form-control file maintenanceFile" fileType='file' showname='maintenanceFile' name="maintenanceFile" placeholder="抢维修附件">
+        <input type="file" class="form-control file maintenanceFile" fileType='file' showname='maintenanceFile'
+            name="maintenanceFile" placeholder="抢维修附件">
     </div>
 </div>
 <div class="form-group lookForm form-inline">
@@ -234,7 +239,8 @@ $$
 <div class="form-group form-inline reportVoice inputForm">
     <div class='oneItem'>
         <label class=" control-label">审核意见</label>
-        <textarea class="form-control  auditNote" rows="3" name="auditNote" showname='auditNote' placeholder=""></textarea>
+        <textarea class="form-control auditNote" rows="3" name="auditNote" showname='auditNote'
+            placeholder=""></textarea>
     </div>
 </div>
 <div class="form-group form-inline lookForm">
@@ -251,7 +257,7 @@ $$
 <div class="form-group form-inline inputForm" >
     <div class='oneItem'>
         <label class=" control-label">审核</label>
-        <select class="input-sm form-control  auditResult" name='auditResult' showname='auditResultName'>
+        <select class="input-sm form-control auditResult" name='auditResult' showname='auditResultName'>
             <option value="1">通过</option>
             <option value="0">驳回</option>
         </select>
@@ -260,7 +266,8 @@ $$
 <div class="form-group form-inline inputForm reportVoice">
     <div class='oneItem '>
         <label class=" control-label">审核备注</label>
-        <textarea class="form-control  auditNote" rows="3" name="auditNote" showname='auditNote' placeholder=""></textarea>
+        <textarea class="form-control  auditNote" rows="3" name="auditNote" showname='auditNote'
+            placeholder=""></textarea>
     </div>
 </div>
 <div class="form-group form-inline lookForm">
@@ -275,11 +282,11 @@ $$
 <!-- 地图上点击查看信息(7) -->
 <div class="MaintenancePageInfoPopInfo">
     <div class=${className}>
-    <span>报警人姓名:${alarmPeopleName}</span><br />
-    <span>地址:${address}</span><br />
-    <span>联系电话:${contactPhone}</span><br />
-    <span>详情描述:${description}</span><br />
-    <span class='maintenancePageInfoPopInfoLook operationLook' index=${index}>${state}</span><br />
+        <span>报警人姓名:${alarmPeopleName}</span><br />
+        <span>地址:${address}</span><br />
+        <span>联系电话:${contactPhone}</span><br />
+        <span>详情描述:${description}</span><br />
+        <span class='maintenancePageInfoPopInfoLook operationLook' index=${index}>${state}</span><br />
     </div>
 </div>
 $$
@@ -288,51 +295,52 @@ $$
 <div class="form-group form-inline userSelect">
     <div class='item'>
         <label class=" control-label">填报时间</label>
-        <input type="text" autocomplete="off" class="form-control createTime" name="createTime"
-        placeholder="地址" >
+        <input type="text" autocomplete="off" class="form-control createTime" name="createTime" placeholder="地址">
     </div>
     <div class='item'>
         <label class=" control-label">接警人姓名</label>
         <input type="text" autocomplete="off" class="form-control acceptUserName" name="acceptUserName"
-        placeholder="接警人姓名" >
+            placeholder="接警人姓名">
     </div>
 
 </div>
 <div class="form-group form-inline">
     <div class='item'>
         <label class=" control-label">电话</label>
-        <input type="text" autocomplete="off" class="form-control  phone" name="phone"
-        placeholder="电话" />
+        <input type="text" autocomplete="off" class="form-control  phone" name="phone" placeholder="电话" />
     </div>
     <div class='item'>
         <label class=" control-label">地址</label>
-        <input type="text" autocomplete="off" class="form-control address" name="address"
-        placeholder="地址" >
+        <input type="text" autocomplete="off" class="form-control address" name="address" placeholder="地址">
     </div>
 </div>
 <div class="form-group form-inline">
     <div class='oneItem'>
         <label class=" control-label">反映情况</label>
-        <textarea class="form-control  reportDescription" rows="3" name="reportDescription" showname='reportDescription' placeholder="反映情况"></textarea>
+        <textarea class="form-control  reportDescription" rows="3" name="reportDescription" showname='reportDescription'
+            placeholder="反映情况"></textarea>
     </div>
 </div>
 <div class="form-group form-inline hideWrite">
     <div class='oneItem fileListHasnotPre'>
         <label class=" control-label">反映情况附件</label>
-        <input type="file" class="form-control file reportDescriptionFile" fileType='file' showname='reportDescriptionFile' name="report" placeholder="反映情况附件">
+        <input type="file" class="form-control file reportDescriptionFile" fileType='file'
+            showname='reportDescriptionFile' name="report" placeholder="反映情况附件">
     </div>
 </div>
 <div class="form-group form-inline">
     <div class='oneItem'>
         <label class=" control-label">处置情况</label>
-        <textarea class="form-control  handleDescription" rows="3" name="handleDescription" showname='handleDescription' placeholder="处置情况"></textarea>
+        <textarea class="form-control  handleDescription" rows="3" name="handleDescription" showname='handleDescription'
+            placeholder="处置情况"></textarea>
     </div>
 </div>
 
 <div class="form-group form-inline hideWrite">
     <div class='oneItem fileListHasnotPre'>
         <label class=" control-label">处置情况附件</label>
-        <input type="file" class="form-control file handleDescriptionFile" fileType='file' showname='handleDescriptionFile' name="handle" placeholder="处置情况附件">
+        <input type="file" class="form-control file handleDescriptionFile" fileType='file'
+            showname='handleDescriptionFile' name="handle" placeholder="处置情况附件">
     </div>
 </div>
 $$
@@ -342,7 +350,7 @@ $$
     <div class='item'>
         <label class=" control-label">部门</label>
         <select class="input-sm form-control  dispatchDisposeDeptId" data-live-search="true"
-        name='dispatchDisposeDeptId' showname='dispatchDisposeDeptIdName' data-style="btn-primary">
+            name='dispatchDisposeDeptId' showname='dispatchDisposeDeptIdName' data-style="btn-primary">
         </select>
     </div>
     <div class='item'>
@@ -355,7 +363,8 @@ $$
 <div class="form-group form-inline">
     <div class='oneItem'>
         <label class=" control-label">调度处理意见</label>
-        <textarea class="form-control  dispatchDisposeNote" rows="3" name="dispatchDisposeNote" showname='dispatchDisposeNote' placeholder=""></textarea>
+        <textarea class="form-control  dispatchDisposeNote" rows="3" name="dispatchDisposeNote"
+            showname='dispatchDisposeNote' placeholder=""></textarea>
     </div>
 </div>
 $$

+ 9 - 0
src/widgets/MaintenanceSearch/Widget.html

@@ -13,6 +13,15 @@
                 <option value='4'>审核归档</option>
             </select>
         </div>
+        <!-- <div class="form-group">
+            <label class=" control-label">上报部门</label>
+            <select class="input-sm form-control dept minwidth"></select>
+        </div> -->
+        <div class="form-group">
+            <label class=" control-label">创建人</label>
+            <input type="text" autocomplete="off" class="form-control createusername" name="createusername" placeholder="创建人">
+            <!-- <select class="input-sm form-control createuser minwidth"></select> -->
+        </div>
         <div class="form-group">
             <label class=" control-label">地址</label>
             <input type="text" autocomplete="off" class="form-control  siteName" name="siteName" placeholder="地址">

+ 2 - 0
src/widgets/MaintenanceSearch/Widget.ts

@@ -137,6 +137,7 @@ class MaintenanceSearch extends BaseWidget {
     */
     getSearchInfo() {
         let workOrderState = this.domObj.find(".workOrderType option:selected").val();
+        let createUserName = this.domObj.find(".createusername").val();
         let siteName = this.domObj.find(".siteName").val();
         let type = this.domObj.find(".type").val();
         let MainType = this.domObj.find(".typeMain").val();
@@ -147,6 +148,7 @@ class MaintenanceSearch extends BaseWidget {
         let isReturn=this.domObj.find(".isReturn option:selected").val();//是否驳回
         this.searchInfo = {
             workOrderState: workOrderState ? workOrderState : "",
+            createUserName: createUserName ? createUserName : "",
             address: siteName ? siteName : "",
             type:type ? type : "",
             typeMain:MainType ? MainType : "",

+ 5 - 0
src/widgets/MaintenanceSearchAdmin/Widget.html

@@ -13,6 +13,11 @@
                 <option value='4'>审核归档</option>
             </select>
         </div>
+        <div class="form-group">
+            <label class=" control-label">创建人</label>
+            <input type="text" autocomplete="off" class="form-control createusername" name="createusername" placeholder="创建人">
+            <!-- <select class="input-sm form-control createuser minwidth"></select> -->
+        </div>
         <div class="form-group">
             <label class=" control-label">地址</label>
             <input type="text" autocomplete="off" class="form-control  siteName" name="siteName" placeholder="地址">

+ 2 - 0
src/widgets/MaintenanceSearchAdmin/Widget.ts

@@ -137,6 +137,7 @@ class MaintenanceSearchAdmin extends BaseWidget {
     */
     getSearchInfo() {
         let workOrderState = this.domObj.find(".workOrderType option:selected").val();
+        let createUserName = this.domObj.find(".createusername").val();
         let siteName = this.domObj.find(".siteName").val();
         let type = this.domObj.find(".type").val();
         let MainType = this.domObj.find(".typeMain").val();
@@ -147,6 +148,7 @@ class MaintenanceSearchAdmin extends BaseWidget {
         let isReturn=this.domObj.find(".isReturn option:selected").val();//是否驳回
         this.searchInfo = {
             workOrderState: workOrderState ? workOrderState : "",
+            createUserName: createUserName ? createUserName : "",
             address: siteName ? siteName : "",
             type:type ? type : "",
             typeMain:MainType ? MainType : "",

+ 1 - 1
src/widgets/MissionSchedule/Widget.ts

@@ -574,7 +574,7 @@ class MissionSchedule extends BaseWidget {
             this.addData.intervalDays = this.domObj.find(".periodid option:selected").attr("data-days");
             this.addData.intervalDays = parseInt((this.addData.intervalDays == "null" ? "0" : this.addData.intervalDays));
             this.addData.planBegindate = this.ajaxSend.conductAddTime(this.domObj.find('.plan_begindate').val());
-            this.addData.planEnddate = this.ajaxSend.conductAddTime(this.domObj.find('.plan_enddate').val());
+            this.addData.planEnddate = this.ajaxSend.conductAddEndTime(this.domObj.find('.plan_enddate').val());
             this.addData.planMode = this.domObj.find(".radio[name='radio']:checked").val();
             this.addData.plan_tolerance = this.domObj.find(".plan_tolerance").val();
             //获取多选用户id

+ 127 - 1
src/widgets/PlanSearch/Widget.ts

@@ -672,7 +672,133 @@ class PlanSearch extends BaseWidget {
                 this.renderGeo(mapData);
                 // tableDom.find("thead").append(thHtml);
                 // tableDom.find("tbody").append(listHmtl);
-                this.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 (this.dataTable_all.aExtentData.currentTableData.deviceTypeId == 18) {//调压设备
+                            //url = this.config.loudongtiaoyaxiang;//调压箱
+                            type = 1;
+                        } else if (this.dataTable_all.aExtentData.currentTableData.deviceTypeId == 20) {//调压
+                            //url = this.config.loudongtiaoyagui;//调压柜
+                            type = 2;
+                        }else if(this.dataTable_all.aExtentData.currentTableData.deviceTypeId == 16){
+                            //url = this.config.fajin;//阀井
+                            type = 3;
+                        }else if(this.dataTable_all.aExtentData.currentTableData.deviceTypeId == 21){
+                            type = 4;
+                        }
+                        let sendPointData = {
+                            typeId:type,
+                            childPlanId: this.dataTable_all.aExtentData.currentTableData.id,
+                            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];
+                            type=info.typeId;
+                            if (!info) {
+                                this.toast.show("未查询到巡检登记记录!")
+                                return;
+                            }
+                            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))
+                    })
+                }
             }
         }.bind(this));
     }

+ 6 - 0
src/widgets/SiteSupervisionAllSearch/Widget.html

@@ -17,6 +17,12 @@
             <label class=" control-label">施工地点</label>
             <input type="text" autocomplete="off" class="form-control siteLocation" name="siteLocation" placeholder="施工地点">
         </div>
+        <div class="form-group">
+            <label class=" control-label">状态</label>
+            <select class="input-sm form-control siteState" data-live-search="true" name='siteState'
+                data-max-options="1" data-style="btn-primary">
+            </select>
+        </div>
         <div class="form-group">
             <button id="btn_add" type="button" class="btn btn-sm btn-default btn-success btn_search">
                 <span class="glyphicon glyphicon-search" aria-hidden="true"></span>查询

+ 36 - 33
src/widgets/SiteSupervisionAllSearch/Widget.ts

@@ -66,7 +66,8 @@ class SiteSupervisionAllSearch extends BaseWidget {
         var html = _.template(this.template.split('$$')[0] + "</div>")();
         this.setHtml(html);
         this.ready();
-        this.siteSupervisionPageInfo.getSiteType(this.domObj.find(".siteType"),true);
+        this.siteSupervisionPageInfo.getSiteType(this.domObj.find(".siteType"), true);
+        this.siteSupervisionPageInfo.getSiteState(this.domObj.find(".siteState"), true);
         this.getSearchInfo();
         this.getAllsiteSupervisionData();
         // this.drawWebGL();
@@ -109,14 +110,16 @@ class SiteSupervisionAllSearch extends BaseWidget {
     */
     getSearchInfo() {
         let siteType = this.domObj.find(".siteType option:selected").val();
+        let siteState = this.domObj.find(".siteState option:selected").val();
         let siteName = this.domObj.find(".siteName").val();
         let siteLocation = this.domObj.find(".siteLocation").val();
         this.searchInfo = {
             siteType: siteType ? siteType : "",
+            constructionState: siteState ? siteState : "",
             siteName: siteName ? siteName : "",
             siteLocation: siteLocation ? siteLocation : "",
-            "orders[0].asc":false,
-            "orders[0].column":"creat_time"
+            "orders[0].asc": false,
+            "orders[0].column": "creat_time"
         }
     }
 
@@ -143,17 +146,17 @@ class SiteSupervisionAllSearch extends BaseWidget {
         this.popup.setSize(1000, 730);
         var Obj = this.popup.Show("工地监护详情", this.template.split('$$')[1]);
         let getHtml = this.siteSupervisionPageInfo;
-        let dataState=[];
-        if(data.constructionState=="0"){
-            dataState=[getHtml.state.siteSupervisionReport]
-        }else if(data.constructionState=="2"||data.constructionState=="4"){
-            dataState=[getHtml.state.siteSupervisionReport, getHtml.state.siteSupervisionWorker,getHtml.state.siteSupervisionConduct]
-        }else if(data.constructionState=="3"){
-            dataState=[getHtml.state.siteSupervisionReport, getHtml.state.siteSupervisionWorker,getHtml.state.siteSupervisionConduct]
-        }else if(data.constructionState=="5"){
-            dataState=[getHtml.state.siteSupervisionReport, getHtml.state.siteSupervisionWorker,getHtml.state.siteSupervisionConduct]
+        let dataState = [];
+        if (data.constructionState == "0") {
+            dataState = [getHtml.state.siteSupervisionReport]
+        } else if (data.constructionState == "2" || data.constructionState == "4") {
+            dataState = [getHtml.state.siteSupervisionReport, getHtml.state.siteSupervisionWorker, getHtml.state.siteSupervisionConduct]
+        } else if (data.constructionState == "3") {
+            dataState = [getHtml.state.siteSupervisionReport, getHtml.state.siteSupervisionWorker, getHtml.state.siteSupervisionConduct]
+        } else if (data.constructionState == "5") {
+            dataState = [getHtml.state.siteSupervisionReport, getHtml.state.siteSupervisionWorker, getHtml.state.siteSupervisionConduct]
         }
-        getHtml.getLinkHtml(this, Obj.conObj.find('.widget-SiteSupervisionAllSearch-pop'),dataState, undefined, data);
+        getHtml.getLinkHtml(this, Obj.conObj.find('.widget-SiteSupervisionAllSearch-pop'), dataState, undefined, data);
         // getHtml.setDepartmentAndUser(this, Obj.conObj.find('.inspectionPersonnelDepartment'), Obj.conObj.find('.constructionPerson'));
         Obj.submitObj.off("click").on("click", function () {
             this.popup.close();
@@ -178,34 +181,34 @@ class SiteSupervisionAllSearch extends BaseWidget {
         }.bind(this));
     }
 
-  /**
-     *根据数据渲染站点
-     *@param results 查询数据
-     * **/
+    /**
+       *根据数据渲染站点
+       *@param results 查询数据
+       * **/
     renderPoint(data) {
-        let clustersReport =[]//待派工阶段
+        let clustersReport = []//待派工阶段
         let clustersAudit = []//审核阶段
-        let clustersConduct =[];//处理阶段(处理和审核未通过)
-        let clustersEnd =[];//归档阶段
-        data.forEach((item,index)=>{
-            item.searchIndex=index;
-            if(item.constructionState=="0"){
+        let clustersConduct = [];//处理阶段(处理和审核未通过)
+        let clustersEnd = [];//归档阶段
+        data.forEach((item, index) => {
+            item.searchIndex = index;
+            if (item.constructionState == "0") {
                 clustersReport.push(item);
-            }else if(item.constructionState=="2"||item.constructionState=="4"){
+            } else if (item.constructionState == "2" || item.constructionState == "4") {
                 clustersConduct.push(item);
-            }else if(item.constructionState=="3"){
+            } else if (item.constructionState == "3") {
                 clustersAudit.push(item);
-            }else if(item.constructionState=="5"){
+            } else if (item.constructionState == "5") {
                 clustersEnd.push(item)
             }
         })
-        this.siteSupervisionPageInfo.addClusters(clustersReport, this.clustersReport, this.popClass,this.siteSupervisionPageInfo.state.siteSupervisionReport ,'详情');//待派工
-        this.siteSupervisionPageInfo.addClusters(clustersConduct, this.clustersConduct, this.popClass,this.siteSupervisionPageInfo.state.siteSupervisionWorker, '详情');//处理
-        this.siteSupervisionPageInfo.addClusters(clustersAudit, this.clustersAudit, this.popClass, this.siteSupervisionPageInfo.state.siteSupervisionConduct,'详情');//审核
-        this.siteSupervisionPageInfo.addClusters(clustersEnd, this.clustersEnd, this.popClass,this.siteSupervisionPageInfo.state.siteSupervisionAudit, '详情');//归档
+        this.siteSupervisionPageInfo.addClusters(clustersReport, this.clustersReport, this.popClass, this.siteSupervisionPageInfo.state.siteSupervisionReport, '详情');//待派工
+        this.siteSupervisionPageInfo.addClusters(clustersConduct, this.clustersConduct, this.popClass, this.siteSupervisionPageInfo.state.siteSupervisionWorker, '详情');//处理
+        this.siteSupervisionPageInfo.addClusters(clustersAudit, this.clustersAudit, this.popClass, this.siteSupervisionPageInfo.state.siteSupervisionConduct, '详情');//审核
+        this.siteSupervisionPageInfo.addClusters(clustersEnd, this.clustersEnd, this.popClass, this.siteSupervisionPageInfo.state.siteSupervisionAudit, '详情');//归档
         $('.body').off('click', '.' + this.popClass + " .siteSupervisionPageInfoPopInfoLook").on('click', '.' + this.popClass + " .siteSupervisionPageInfoPopInfoLook", function (e) {
             let index = parseInt($(e.currentTarget).attr('index'));
-            this.siteSupervisionPageInfo.getInfoByid(data[index].id,this.initPage.bind(this))
+            this.siteSupervisionPageInfo.getInfoByid(data[index].id, this.initPage.bind(this))
         }.bind(this));
     }
 
@@ -311,7 +314,7 @@ class SiteSupervisionAllSearch extends BaseWidget {
             }.bind(this),
             drawEvent: function () {
                 this.domObj.off('click', '.infoWrite').on('click', ".infoWrite", e => {
-                    this.siteSupervisionPageInfo.getInfoByid(this.dataTable.aExtentData.currentTableData.id,this.initPage.bind(this))
+                    this.siteSupervisionPageInfo.getInfoByid(this.dataTable.aExtentData.currentTableData.id, this.initPage.bind(this))
                 })
             }.bind(this),
             serachCallBack: function (results) {
@@ -329,7 +332,7 @@ class SiteSupervisionAllSearch extends BaseWidget {
         }
         that.dataTable = this.ajaxSend.DataTables_check(option);
     }
-    deleteSiteSupervisionList(){
+    deleteSiteSupervisionList() {
         var senddata = [];
         this.dataTable.aExtentData.checkCurrentData.forEach(element => {
             senddata.push(element.id);

+ 4 - 4
src/widgets/SiteSupervisionAllSearch/config.json

@@ -2,10 +2,10 @@
     "widgetUrl": "widgets/SiteSupervisionAllSearch",
     "tmplateUrl": "widgets/SiteSupervisionAllSearch/Widget.html",
     "styleUrl": "widgets/SiteSupervisionAllSearch/css/style.css",
-    "getDepartment":"/base/department/page",
+    "getDepartment": "/base/department/page",
     "getUserList": "/base/user/getUserByDepts/list",
-    "getRushList":"/zmrq/constructionsite/pagenew",
-    "deleteSiteSupervisionList":"/zmrq/constructionsite/deleteByIds",
+    "getRushList": "/zmrq/constructionsite/pagenew",
+    "deleteSiteSupervisionList": "/zmrq/constructionsite/deleteByIds",
     "tolerance": 3,
     "zoomscale": 1000
-}
+}

+ 6 - 0
src/widgets/SiteSupervisionAllSearchAdmin/Widget.html

@@ -17,6 +17,12 @@
             <label class=" control-label">施工地点</label>
             <input type="text" autocomplete="off" class="form-control siteLocation" name="siteLocation" placeholder="施工地点">
         </div>
+        <div class="form-group">
+            <label class=" control-label">状态</label>
+            <select class="input-sm form-control siteState" data-live-search="true" name='siteState'
+                data-max-options="1" data-style="btn-primary">
+            </select>
+        </div>
         <div class="form-group">
             <button id="btn_add" type="button" class="btn btn-sm btn-default btn-success btn_search">
                 <span class="glyphicon glyphicon-search" aria-hidden="true"></span>查询

+ 36 - 33
src/widgets/SiteSupervisionAllSearchAdmin/Widget.ts

@@ -66,7 +66,8 @@ class SiteSupervisionAllSearchAdmin extends BaseWidget {
         var html = _.template(this.template.split('$$')[0] + "</div>")();
         this.setHtml(html);
         this.ready();
-        this.siteSupervisionPageInfo.getSiteType(this.domObj.find(".siteType"),true);
+        this.siteSupervisionPageInfo.getSiteType(this.domObj.find(".siteType"), true);
+        this.siteSupervisionPageInfo.getSiteState(this.domObj.find(".siteState"), true);
         this.getSearchInfo();
         this.getAllsiteSupervisionData();
         // this.drawWebGL();
@@ -109,14 +110,16 @@ class SiteSupervisionAllSearchAdmin extends BaseWidget {
     */
     getSearchInfo() {
         let siteType = this.domObj.find(".siteType option:selected").val();
+        let siteState = this.domObj.find(".siteState option:selected").val();
         let siteName = this.domObj.find(".siteName").val();
         let siteLocation = this.domObj.find(".siteLocation").val();
         this.searchInfo = {
             siteType: siteType ? siteType : "",
+            constructionState: siteState ? siteState : "",
             siteName: siteName ? siteName : "",
             siteLocation: siteLocation ? siteLocation : "",
-            "orders[0].asc":false,
-            "orders[0].column":"creat_time"
+            "orders[0].asc": false,
+            "orders[0].column": "creat_time"
         }
     }
 
@@ -143,17 +146,17 @@ class SiteSupervisionAllSearchAdmin extends BaseWidget {
         this.popup.setSize(1000, 730);
         var Obj = this.popup.Show("工地监护详情", this.template.split('$$')[1]);
         let getHtml = this.siteSupervisionPageInfo;
-        let dataState=[];
-        if(data.constructionState=="0"){
-            dataState=[getHtml.state.siteSupervisionReport]
-        }else if(data.constructionState=="2"||data.constructionState=="4"){
-            dataState=[getHtml.state.siteSupervisionReport, getHtml.state.siteSupervisionWorker,getHtml.state.siteSupervisionConduct]
-        }else if(data.constructionState=="3"){
-            dataState=[getHtml.state.siteSupervisionReport, getHtml.state.siteSupervisionWorker,getHtml.state.siteSupervisionConduct]
-        }else if(data.constructionState=="5"){
-            dataState=[getHtml.state.siteSupervisionReport, getHtml.state.siteSupervisionWorker,getHtml.state.siteSupervisionConduct]
+        let dataState = [];
+        if (data.constructionState == "0") {
+            dataState = [getHtml.state.siteSupervisionReport]
+        } else if (data.constructionState == "2" || data.constructionState == "4") {
+            dataState = [getHtml.state.siteSupervisionReport, getHtml.state.siteSupervisionWorker, getHtml.state.siteSupervisionConduct]
+        } else if (data.constructionState == "3") {
+            dataState = [getHtml.state.siteSupervisionReport, getHtml.state.siteSupervisionWorker, getHtml.state.siteSupervisionConduct]
+        } else if (data.constructionState == "5") {
+            dataState = [getHtml.state.siteSupervisionReport, getHtml.state.siteSupervisionWorker, getHtml.state.siteSupervisionConduct]
         }
-        getHtml.getLinkHtml(this, Obj.conObj.find('.widget-SiteSupervisionAllSearchAdmin-pop'),dataState, undefined, data);
+        getHtml.getLinkHtml(this, Obj.conObj.find('.widget-SiteSupervisionAllSearchAdmin-pop'), dataState, undefined, data);
         // getHtml.setDepartmentAndUser(this, Obj.conObj.find('.inspectionPersonnelDepartment'), Obj.conObj.find('.constructionPerson'));
         Obj.submitObj.off("click").on("click", function () {
             this.popup.close();
@@ -178,34 +181,34 @@ class SiteSupervisionAllSearchAdmin extends BaseWidget {
         }.bind(this));
     }
 
-  /**
-     *根据数据渲染站点
-     *@param results 查询数据
-     * **/
+    /**
+       *根据数据渲染站点
+       *@param results 查询数据
+       * **/
     renderPoint(data) {
-        let clustersReport =[]//待派工阶段
+        let clustersReport = []//待派工阶段
         let clustersAudit = []//审核阶段
-        let clustersConduct =[];//处理阶段(处理和审核未通过)
-        let clustersEnd =[];//归档阶段
-        data.forEach((item,index)=>{
-            item.searchIndex=index;
-            if(item.constructionState=="0"){
+        let clustersConduct = [];//处理阶段(处理和审核未通过)
+        let clustersEnd = [];//归档阶段
+        data.forEach((item, index) => {
+            item.searchIndex = index;
+            if (item.constructionState == "0") {
                 clustersReport.push(item);
-            }else if(item.constructionState=="2"||item.constructionState=="4"){
+            } else if (item.constructionState == "2" || item.constructionState == "4") {
                 clustersConduct.push(item);
-            }else if(item.constructionState=="3"){
+            } else if (item.constructionState == "3") {
                 clustersAudit.push(item);
-            }else if(item.constructionState=="5"){
+            } else if (item.constructionState == "5") {
                 clustersEnd.push(item)
             }
         })
-        this.siteSupervisionPageInfo.addClusters(clustersReport, this.clustersReport, this.popClass,this.siteSupervisionPageInfo.state.siteSupervisionReport ,'详情');//待派工
-        this.siteSupervisionPageInfo.addClusters(clustersConduct, this.clustersConduct, this.popClass,this.siteSupervisionPageInfo.state.siteSupervisionWorker, '详情');//处理
-        this.siteSupervisionPageInfo.addClusters(clustersAudit, this.clustersAudit, this.popClass, this.siteSupervisionPageInfo.state.siteSupervisionConduct,'详情');//审核
-        this.siteSupervisionPageInfo.addClusters(clustersEnd, this.clustersEnd, this.popClass,this.siteSupervisionPageInfo.state.siteSupervisionAudit, '详情');//归档
+        this.siteSupervisionPageInfo.addClusters(clustersReport, this.clustersReport, this.popClass, this.siteSupervisionPageInfo.state.siteSupervisionReport, '详情');//待派工
+        this.siteSupervisionPageInfo.addClusters(clustersConduct, this.clustersConduct, this.popClass, this.siteSupervisionPageInfo.state.siteSupervisionWorker, '详情');//处理
+        this.siteSupervisionPageInfo.addClusters(clustersAudit, this.clustersAudit, this.popClass, this.siteSupervisionPageInfo.state.siteSupervisionConduct, '详情');//审核
+        this.siteSupervisionPageInfo.addClusters(clustersEnd, this.clustersEnd, this.popClass, this.siteSupervisionPageInfo.state.siteSupervisionAudit, '详情');//归档
         $('.body').off('click', '.' + this.popClass + " .siteSupervisionPageInfoPopInfoLook").on('click', '.' + this.popClass + " .siteSupervisionPageInfoPopInfoLook", function (e) {
             let index = parseInt($(e.currentTarget).attr('index'));
-            this.siteSupervisionPageInfo.getInfoByid(data[index].id,this.initPage.bind(this))
+            this.siteSupervisionPageInfo.getInfoByid(data[index].id, this.initPage.bind(this))
         }.bind(this));
     }
 
@@ -311,7 +314,7 @@ class SiteSupervisionAllSearchAdmin extends BaseWidget {
             }.bind(this),
             drawEvent: function () {
                 this.domObj.off('click', '.infoWrite').on('click', ".infoWrite", e => {
-                    this.siteSupervisionPageInfo.getInfoByid(this.dataTable.aExtentData.currentTableData.id,this.initPage.bind(this))
+                    this.siteSupervisionPageInfo.getInfoByid(this.dataTable.aExtentData.currentTableData.id, this.initPage.bind(this))
                 })
             }.bind(this),
             serachCallBack: function (results) {
@@ -329,7 +332,7 @@ class SiteSupervisionAllSearchAdmin extends BaseWidget {
         }
         that.dataTable = this.ajaxSend.DataTables_check(option);
     }
-    deleteSiteSupervisionList(){
+    deleteSiteSupervisionList() {
         var senddata = [];
         this.dataTable.aExtentData.checkCurrentData.forEach(element => {
             senddata.push(element.id);

+ 79 - 60
src/widgets/SiteSupervisionPageInfo/Widget.ts

@@ -16,7 +16,7 @@ class SiteSupervisionPageInfo extends BaseWidget {
     useLayerModel = 0;
     map = null;
     mapSet = null;
-    precessInfo="";
+    precessInfo = "";
     /**控制填写的页面*/
     state = {
         /**基本信息填写*/
@@ -99,14 +99,14 @@ class SiteSupervisionPageInfo extends BaseWidget {
                         for (var dataItem in data) {
                             if (dataItem == item.name) {
                                 item.value = this.verificationHelper.setNullAndUndefinedEnpty(data[dataItem]);
-                                if((item.value+"").indexOf("00:00:00")!=-1){
-                                    item.value=(item.value+"").replace("00:00:00","");
+                                if ((item.value + "").indexOf("00:00:00") != -1) {
+                                    item.value = (item.value + "").replace("00:00:00", "");
                                 }
                             }
                         }
                         if (type == this.actionType.look) {
                             $(item).attr("readonly", "readonly");
-                            $(item).attr("title",item.value );
+                            $(item).attr("title", item.value);
                         }
                     }
                 }
@@ -258,7 +258,7 @@ class SiteSupervisionPageInfo extends BaseWidget {
                 for (var dataItem in data) {
                     if (dataItem == item.name) {
                         item.value = this.verificationHelper.setNullAndUndefinedEnpty(data[dataItem]);
-                        $(item).attr("title",item.value );
+                        $(item).attr("title", item.value);
                     }
                 }
                 if (type == this.actionType.look) {
@@ -318,19 +318,19 @@ class SiteSupervisionPageInfo extends BaseWidget {
                 }
             }
         }
-                //通过类名spanValue对span标签进行初始化
-                for (var item of dom.find(".spanValue")) {
-                    if (this.initTag.indexOf(item) == -1) {
-                        if (this.initTag.indexOf(item) == -1) {
-                            this.initTag.push(item);
-                            for (var dataItem in data) {
-                                if (dataItem == item.attributes.name.value) {
-                                    item.textContent=this.verificationHelper.setNullAndUndefinedEnpty(data[dataItem]).split(' ')[0] ;
-                                }
-                            }
+        //通过类名spanValue对span标签进行初始化
+        for (var item of dom.find(".spanValue")) {
+            if (this.initTag.indexOf(item) == -1) {
+                if (this.initTag.indexOf(item) == -1) {
+                    this.initTag.push(item);
+                    for (var dataItem in data) {
+                        if (dataItem == item.attributes.name.value) {
+                            item.textContent = this.verificationHelper.setNullAndUndefinedEnpty(data[dataItem]).split(' ')[0];
                         }
                     }
                 }
+            }
+        }
         //通过类名actionInfo对执行过程进行初始化
         for (var item of dom.find(".actionInfo")) {
             if (this.initTag.indexOf(item) == -1) {
@@ -422,12 +422,12 @@ class SiteSupervisionPageInfo extends BaseWidget {
     * 根据id字段获取新型
     * @param  id 工地监护id
     * @param call 获取信息后的回调
-    */    
-   getInfoByid(id,call){
-    this.ajaxSend.sendAjax(this, {id:id}, this.config.getInfoById+id, this.ajaxSend.type.get, function (results) {
-        if (this.ajaxSend.checkResults(this, results)) {
-            call(results.result)
-        }
+    */
+    getInfoByid(id, call) {
+        this.ajaxSend.sendAjax(this, { id: id }, this.config.getInfoById + id, this.ajaxSend.type.get, function (results) {
+            if (this.ajaxSend.checkResults(this, results)) {
+                call(results.result)
+            }
         }.bind(this));
     }
 
@@ -553,24 +553,24 @@ class SiteSupervisionPageInfo extends BaseWidget {
                 }
             })
         }
-        this.precessInfo="";
-        let one="<span state>待派工</span>";
-        let two="<span state>待处理</span>";
-        let three="<span state>待审核</span>";
-        let four="<span state>归档</span>";
-        if(!data.constructionState){
-            this.precessInfo=one;
+        this.precessInfo = "";
+        let one = "<span state>待派工</span>";
+        let two = "<span state>待处理</span>";
+        let three = "<span state>待审核</span>";
+        let four = "<span state>归档</span>";
+        if (!data.constructionState) {
+            this.precessInfo = one;
             formDom.find(".precessInfo").hide();
-        }else if(data.constructionState=="0"){
-            this.precessInfo=one.replace('state',"class='complete'")+two+three+four;
-        }else if(data.constructionState=="2"||data.constructionState=="4"){
-            this.precessInfo=(one+two).replace(/state/g,"class='complete'")+three+four;
-        }else if(data.constructionState=="3"){
-            this.precessInfo=(one+two+three).replace(/state/g,"class='complete'")+four;
-        }else if(data.constructionState=="5"){
-            this.precessInfo=(one+two+three+four).replace(/state/g,"class='complete'")
+        } else if (data.constructionState == "0") {
+            this.precessInfo = one.replace('state', "class='complete'") + two + three + four;
+        } else if (data.constructionState == "2" || data.constructionState == "4") {
+            this.precessInfo = (one + two).replace(/state/g, "class='complete'") + three + four;
+        } else if (data.constructionState == "3") {
+            this.precessInfo = (one + two + three).replace(/state/g, "class='complete'") + four;
+        } else if (data.constructionState == "5") {
+            this.precessInfo = (one + two + three + four).replace(/state/g, "class='complete'")
         }
-        this.precessInfo= this.precessInfo.replace('state',"");
+        this.precessInfo = this.precessInfo.replace('state', "");
         formDom.find(".precessInfo").empty().append(this.precessInfo);
         formDom.find(".precessInfo span").append('<span class="glyphicon glyphicon-ok-circle" aria-hidden="true"></span>');
         formDom.find(".precessInfo .complete .glyphicon").remove();
@@ -686,7 +686,7 @@ class SiteSupervisionPageInfo extends BaseWidget {
      * @param state 不同模块状态
      * @param title 不同模块展示名称
      * */
-    addClusters(seacherData, id, popClass,state,title) {
+    addClusters(seacherData, id, popClass, state, title) {
         this.clearClusters(id);
         if (!seacherData || seacherData.length == 0 || !seacherData[0]) {
             return;
@@ -711,7 +711,7 @@ class SiteSupervisionPageInfo extends BaseWidget {
                     constructionAddress: item.constructionAddress,
                     className: popClass,
                     state: title,
-                    index: item.searchIndex?item.searchIndex:index
+                    index: item.searchIndex ? item.searchIndex : index
                 }
             };
         })
@@ -730,19 +730,19 @@ class SiteSupervisionPageInfo extends BaseWidget {
             "spatialReference": this.map.spatialReference,
             "basemap": this.map
         });
-        let url="";
-        if(state==this.state.siteSupervisionReport){
-            url=this.config.siteSupervisionReport;
-        }else if(state==this.state.siteSupervisionWorker){
-            url=this.config.siteSupervisionWorker;
-        }else if(state==this.state.siteSupervisionConduct){
-            url=this.config.siteSupervisionConduct;
-        }else if(state==this.state.siteSupervisionAudit){
-            url=this.config.siteSupervisionAudit;
-        }else{
-            url=this.config.siteSupervisionEnd;
+        let url = "";
+        if (state == this.state.siteSupervisionReport) {
+            url = this.config.siteSupervisionReport;
+        } else if (state == this.state.siteSupervisionWorker) {
+            url = this.config.siteSupervisionWorker;
+        } else if (state == this.state.siteSupervisionConduct) {
+            url = this.config.siteSupervisionConduct;
+        } else if (state == this.state.siteSupervisionAudit) {
+            url = this.config.siteSupervisionAudit;
+        } else {
+            url = this.config.siteSupervisionEnd;
         }
-        let defaultSym = this.mapSet.setGraphSymbol('picture', this.AppX.root +url);
+        let defaultSym = this.mapSet.setGraphSymbol('picture', this.AppX.root + url);
         let renderer = new SimpleRenderer(defaultSym);
         clusterLayer.setRenderer(renderer);
         this.map.addLayer(clusterLayer);
@@ -828,26 +828,45 @@ class SiteSupervisionPageInfo extends BaseWidget {
     }
 
     /**
+   * 获取所有的工地状态并渲染成下拉框
+   * @para dom 熏染的dom
+   * @para getAll 是否可以获取全部
+   */
+    getSiteState(dom, getAll) {
+        let domHtml = "";
+        if (getAll) {
+            domHtml = "<option seletect='seletect' value=''>全部</option>";
+        }
+        this.config.construction_states.forEach(item => {
+            if (domHtml == "") {
+                domHtml += "<option seletect='seletect' value='" + item.value + "'>" + item.name + "</option>";
+            } else {
+                domHtml += "<option value='" + item.value + "'>" + item.name + "</option>";
+            }
+        })
+        dom.empty().append(domHtml);
+    }
+    /**
     * 获取所有的工地类型并渲染成下拉框
     * @para dom 熏染的dom
     * @para getAll 是否可以获取全部
     */
-    getSiteType(dom,getAll){
+    getSiteType(dom, getAll) {
         let data = {
             current: 1,
             size: 10000,
         }
         this.ajaxSend.sendAjax(this, data, this.config.getSiteType, this.ajaxSend.type.get, function (results) {
-            let domHtml="";
-            if(getAll){
-                domHtml="<option seletect='seletect' value=''>全部</option>";
+            let domHtml = "";
+            if (getAll) {
+                domHtml = "<option seletect='seletect' value=''>全部</option>";
             }
             if (this.ajaxSend.checkResults(this, results)) {
-                results.result.records.forEach(item=>{
-                    if(domHtml==""){
-                        domHtml+="<option seletect='seletect' value='"+item.id+"'>"+item.name+"</option>";
-                    }else{
-                        domHtml+="<option value='"+item.id+"'>"+item.name+"</option>";
+                results.result.records.forEach(item => {
+                    if (domHtml == "") {
+                        domHtml += "<option seletect='seletect' value='" + item.id + "'>" + item.name + "</option>";
+                    } else {
+                        domHtml += "<option value='" + item.id + "'>" + item.name + "</option>";
                     }
                 })
             }

+ 27 - 1
src/widgets/SiteSupervisionPageInfo/config.json

@@ -17,5 +17,31 @@
     "pagenumber": 1,
     "pagesize": 25,
     "maxsize": 100000,
-    "zoomscale": 200
+    "zoomscale": 200,
+    "construction_states": [
+        {
+            "name": "待派工",
+            "value": 0
+        },
+        {
+            "name": "派工未通过",
+            "value": 1
+        },
+        {
+            "name": "待处理",
+            "value": 2
+        },
+        {
+            "name": "待审核",
+            "value": 3
+        },
+        {
+            "name": "审核未通过",
+            "value": 4
+        },
+        {
+            "name": "归档",
+            "value": 5
+        }
+    ]
 }

+ 5 - 6
src/widgets/UserInfoManagement/Widget.ts

@@ -268,12 +268,11 @@ class UserInfoManagement extends BaseWidget {
             elementId: "UserInfoManagementinfodata",
             url: that.config.getEquipmentListAll,
             searchInfo: that.searchInfo,//条件在不断变化,故需要有全局的条件监听
-            displayTitle: ["用户编码", "用户名称", "巡检周期", "气表编码", "供应商", "地址", "安装员", "用气性质", "区域","出厂日期", "电话", "调压器编号",
-            "投用时间", "户数", "设备状态", "安装时间", "规格", "表类型", "挂表方式", "上次巡检", "暖气", "立管位置", "表箱", "入户防腐", "立管方式",
-            "采集人"],
-            displayField: ["userCode", "userName", "period", "gasCode", "supplier", "address", "setter", "gasProperties", "area", "dateOfProduction",
-            "tel","voltageRegulatorCode", "useDate", "users", "deviceState", "installDate","specification", "gasMeterType", "gasMeterLoad",
-            "lastDate", "heating", "standPipe", "tableBox","aczoiling", "standPipeType", "gatherer"],
+            displayTitle: ["用户编码", "工程名称", "用户名称", "巡检周期", "气表编码", "供应商", "地址", "安装员", "用气性质", "项目负责人", "区域", "建档日期", "出厂日期", "电话", "调压器编号",
+                "验收合格日期", "投用时间", "户数", "设备状态", "安装时间", "规格", "表具方向", "表类型", "挂表方式", "上次巡检", "暖气", "立管位置", "表箱", "入户防腐", "立管方式", "采集人"],
+            displayField: ["userCode", "projectName", "userName", "period", "gasCode", "supplier", "address", "setter", "gasProperties", "projectLeader", "area", "filingDate", "dateOfProduction",
+                "tel", "voltageRegulatorCode", "acceptanceDate", "useDate", "users", "deviceState", "installDate", "specification", "surfaceDirection", "gasMeterType", "gasMeterLoad",
+                "lastDate", "heating", "standPipe", "tableBox", "aczoiling", "standPipeType", "gatherer"],
             extentDisplayTitle: [],
             extentDisplayField: [],
             beforeTrClickEvent: undefined,

+ 254 - 0
src/widgets/UserManagementQuery/Widget.html

@@ -0,0 +1,254 @@
+<div class="widget-UserManagementQuery">
+    <div id="myTabContent" class="tab-content">
+        <div class="form-inline djinfo-tool">
+            <div class="form-group searchInfo">
+                <label for="">用户名:</label>
+                <input type="text" class="form-control RealName control-width" placeholder="请输入用户名"
+                    v-model="searchInfo.RealName" />
+                <label for="">单位:</label>
+                <select type="text" class="form-control DeptId control-width " name="DeptId" data-bv-trigger="blur"
+                    placeholder="请选择编码" v-model="searchInfo.DeptId">
+                    <template v-for="(item, index) in option.deptids">
+                        <option :value="item.key">{{item.label}}</option>
+                    </template>
+                </select>
+            </div>
+            <div id="toolbar" class="btn-group btn-group toolbar">
+                <button type="button" class="btn btn-default btn-primary btn_search">
+                    <span class="" aria-hidden="true"></span>查询
+                </button>
+                <!-- <button type="button" class="btn btn-default btn-primary btn_add">
+                    <span class="" aria-hidden="true"></span>新增用户
+                </button>
+                <button type="button" class="btn btn-default btn-primary update_add">
+                    <span class="" aria-hidden="true"></span>修改用户
+                </button>
+                <button type="button" class="btn btn-default btn-danger btn_delete">
+                    <span class="" aria-hidden="true"></span>删除用户
+                </button>
+                <button type="button" class="btn btn-default btn-primary update_state">
+                    <span class="" aria-hidden="true"></span>启用设置
+                </button>
+                <button type="button" class="btn btn-default btn-primary update_role">
+                    <span class="" aria-hidden="true"></span>角色绑定
+                </button>
+                <button type="button" class="btn btn-default btn-primary update_lock">
+                    <span class="" aria-hidden="true"></span>用户解锁
+                </button>
+                <button type="button" class="btn btn-default btn-primary"
+                    onclick="window.location.href = '/widgets/UserManagementQuery/用户新增模板.xlsx'">模板下载</button>
+                <input type="file" class="importFile" accept=".xls,.xlsx" style="display: none;" />
+                <button type="button" class="btn btn-default btn-primary import">
+                    <span class="" aria-hidden="true"></span>批量导入
+                </button> -->
+            </div>
+        </div>
+        <div class="form-inline linesplit"></div>
+        <div class="djinfo">
+            <table id="layerconfig" class="table table-striped table-condensed table-hover table-bordered nowrap"
+                cellspacing="0" style="width:100% !important;">
+                <thead>
+                    <tr>
+                        <th width="60" class="center">
+                            <input type="checkbox" name="all_check" id="all_check" />
+                        </th>
+                        <th>登录名</th>
+                        <th>用户名</th>
+                        <th>联系电话</th>
+                        <th>邮箱</th>
+                        <th>角色</th>
+                        <th>单位</th>
+                        <th>是否启用</th>
+                        <th>是否锁定</th>
+                    </tr>
+                </thead>
+            </table>
+        </div>
+        <div class="djfieldinfo">
+
+        </div>
+    </div>
+</div>
+$$
+<div id="widget-UserManagementAddInfo" class="form-horizontal">
+    <div class="form-inline">
+        <label class=" control-label font_style"><span>登录名:</span></label>
+        <div class="form-group">
+            <input type="text" class="form-control name control-width" name="name" @blur="isExists()"
+                data-bv-trigger="blur" data-bv-message="The title is not valid" required data-bv-notempty-message="不能为空"
+                data-bv-stringlength="true" data-bv-stringlength-max="20" data-bv-stringlength-message="字段长度不得超过20 "
+                placeholder="请输入用户名" v-model="data.name" />
+        </div>
+    </div>
+    <div class="form-inline">
+        <label class=" control-label font_style"><span>密码:</span></label>
+        <div class="form-group">
+            <input type="password" class="form-control password control-width" name="password" data-bv-trigger="blur"
+                data-bv-message="The title is not valid" required data-bv-notempty-message="不能为空" placeholder="请输入密码"
+                v-model="data.password" />
+        </div>
+    </div>
+    <div class="form-inline">
+        <label class=" control-label font_style"><span>用户名:</span></label>
+        <div class="form-group">
+            <input type="text" class="form-control realname control-width" name="realname" data-bv-trigger="blur"
+                data-bv-message="The title is not valid" required data-bv-notempty-message="不能为空"
+                data-bv-stringlength="true" data-bv-stringlength-max="20" data-bv-stringlength-message="字段长度不得超过20 "
+                placeholder="请输入真实姓名" v-model="data.realname" />
+        </div>
+    </div>
+    <div class="form-inline">
+        <label class=" control-label font_style"><span>联系电话:</span></label>
+        <div class="form-group">
+            <input type="text" class="form-control phone control-width" name="phone" data-bv-trigger="blur"
+                v-model="data.phone" />
+        </div>
+    </div>
+    <div class="form-inline">
+        <label class=" control-label font_style"><span>头像:</span></label>
+        <div class=" input-group">
+            <input type="file" class="form-control file  control-width" name="file" data-bv-trigger="blur"
+                v-model="data.file" />
+        </div>
+    </div>
+    <div class="form-inline">
+        <label class=" control-label font_style"><span>email:</span></label>
+        <div class="form-group">
+            <input type="text" class="form-control email control-width" name="email" data-bv-trigger="blur"
+                v-model="data.email" />
+        </div>
+    </div>
+    <div class="form-inline addInput">
+        <label class="  control-label font_style "><span>单位:</span></label>
+        <div class="form-group">
+            <select type="text" class="form-control deptid control-width " name="deptid" data-bv-trigger="blur"
+                placeholder="请选择单位" v-model="data.deptid">
+                <template v-for="(item, index) in option.deptids">
+                    <option :value="item.key">{{item.label}}</option>
+                </template>
+            </select>
+        </div>
+    </div>
+    <div class="form-inline ">
+        <label class="  control-label font_style "><span>用户管理权限:</span></label>
+        <div class="form-group">
+            <select type="text" class="form-control userLevel control-width " name="userLevel" data-bv-trigger="blur"
+                placeholder="请选择单位" v-model="data.userLevel">
+                <template v-for="(item, index) in option.userLevel">
+                    <option :value="item.key">{{item.label}}</option>
+                </template>
+            </select>
+        </div>
+    </div>
+    <!--<div class="form-inline addInput">
+        <label class="  control-label font_style "><span>角色:</span></label>
+        <div class="form-group">
+            <select type="text" class="form-control roleid control-width " name="roleid" data-bv-trigger="blur" placeholder="请选择角色" v-model="data.roleid">
+                <template v-for="(item, index) in option.roleids">
+                    <option :value="item.key">{{item.label}}</option>
+                </template>
+                </select>
+        </div>
+    </div>-->
+</div>
+$$
+<div class="delete_popup">
+    <div class="form-group tip">
+        确认是否删除用户?
+    </div>
+</div>
+$$
+<div id="widget-UserManagementAddInfo" class="form-horizontal">
+    <div class="form-inline">
+        <label class=" control-label font_style"><span>姓名:</span></label>
+        <div class="form-group">
+            <input type="text" class="form-control realname control-width" name="realname" data-bv-trigger="blur"
+                data-bv-message="The title is not valid" required data-bv-notempty-message="不能为空"
+                data-bv-stringlength="true" data-bv-stringlength-max="20" data-bv-stringlength-message="字段长度不得超过20 "
+                placeholder="请输入用户名" v-model="stateDate.realname" />
+        </div>
+    </div>
+    <div class="form-inline">
+        <label class="  control-label font_style "><span>是否启用:</span></label>
+        <div class="form-group">
+            <select type="text" class="form-control IsEnable control-width " name="IsEnable" data-bv-trigger="blur"
+                placeholder="请选择编码" v-model="stateDate.IsEnable">
+                <template v-for="(item, index) in option.statusFlag">
+                    <option :value="item.key">{{item.label}}</option>
+                </template>
+            </select>
+        </div>
+    </div>
+</div>
+$$
+<div id="widget-UserManagementAddInfo" class="form-horizontal">
+    <div class="form-inline">
+        <label class=" control-label font_style"><span>姓名:</span></label>
+        <div class="form-group">
+            <input type="text" class="form-control realname control-width" name="realname" data-bv-trigger="blur"
+                data-bv-message="The title is not valid" required data-bv-notempty-message="不能为空"
+                data-bv-stringlength="true" data-bv-stringlength-max="20" data-bv-stringlength-message="字段长度不得超过20 "
+                placeholder="请输入用户名" v-model="roleDate.realname" />
+        </div>
+    </div>
+    <div class="form-inline addInput">
+        <label class="  control-label font_style "><span>角色:</span></label>
+        <div class="form-group">
+            <select type="text" class="form-control selectpicker roleid control-width " data-live-search="true"
+                name="roleid" data-bv-trigger="blur" placeholder="请选择编码" v-model="roleDate.RoleId">
+                <template v-for="(item, index) in roleids">
+                    <option :value="item.key">{{item.label}}</option>
+                </template>
+            </select>
+        </div>
+    </div>
+</div>
+$$
+<div id="widget-UserManagementUserInfo_" class="form-horizontal">
+    <div class="form-inline">
+        <label class=" control-label font_style"><span>用户名:</span></label>
+        <div class="form-group">
+            <span type="text" class=" name control-width" name="name" v-model="data.name">{{data.name}}</span>
+        </div>
+    </div>
+    <div class="form-inline">
+        <label class=" control-label font_style"><span>真实姓名:</span></label>
+        <div class="form-group">
+            <span type="text" class=" realname control-width" name="realname"
+                v-model="data.realname">{{data.realname}}</span>
+        </div>
+    </div>
+    <div class="form-inline">
+        <label class=" control-label font_style"><span>联系电话:</span></label>
+        <div class="form-group">
+            <span type="text" class=" phone control-width" name="phone" v-model="data.phone">{{data.phone}}</span>
+        </div>
+    </div>
+    <div class="form-inline">
+        <label class=" control-label font_style"><span>头像:</span></label>
+        <div class=" input-group" v-if="data.showphoto">
+            <img :src="data.file" style="width: 200px;height: 200px;" />
+        </div>
+        <div class=" input-group" v-if="!data.showphoto">
+            <span type="text">暂未上传头像</span>
+        </div>
+    </div>
+    <div class="form-inline">
+        <label class=" control-label font_style"><span>email:</span></label>
+        <div class="form-group">
+            <span type="text" class=" email control-width" name="email" v-model="data.email">{{data.email}}</span>
+        </div>
+    </div>
+    <div class="form-inline addInput">
+        <label class="  control-label font_style "><span>单位:</span></label>
+        <div class="form-group">
+            <span type="text" class=" deptid control-width " name="deptid" v-model="data.deptid">{{data.deptid}}</span>
+        </div>
+    </div>
+    <div class="form-inline addInput">
+        <label class="  control-label font_style "><span>角色:</span></label>
+        <div class="form-group">
+            <span type="text" class=" roleid control-width " name="roleid" v-model="data.roleid">{{data.roleid}}</span>
+        </div>
+    </div>
+</div>

File diff suppressed because it is too large
+ 1121 - 0
src/widgets/UserManagementQuery/Widget.ts


+ 25 - 0
src/widgets/UserManagementQuery/config.json

@@ -0,0 +1,25 @@
+{
+    "widgetUrl": "widgets/UserManagementQuery",
+    "tmplateUrl": "widgets/UserManagementQuery/Widget.html",
+    "styleUrl": "widgets/UserManagementQuery/css/style.scss",
+    "userList": "/base/user/pageNew",
+    "setUser": "/base/user",
+    "deleteUser": "/base/user/removeByIds",
+    "updateUser": "/User/Update",
+    "getImg": "/base/file/loadImg",
+    "getDepartmentList": "/base/department/page",
+    "roleList": "/base/role/page",
+    "getKey": "/base/code/page",
+    "setUserEnable": "/User/SetUserEnable",
+    "bindingRole": "/base/userrole",
+    "updateCurrentUser": "/User/UpdateCurrentUser",
+    "updatelock":"/base/user/unlock",
+    "getIsExists":"/base/common/isExists",
+    "importFile":"/base/user/batchUser",
+    "pagesize": [
+        10,
+        25,
+        50,
+        100
+    ]
+}

+ 152 - 0
src/widgets/UserManagementQuery/css/style.scss

@@ -0,0 +1,152 @@
+
+.widget-UserManagementQuery {
+    height: 100%;
+    .tip{
+        text-align: center;
+    }
+    .control-width{
+        width: 220px;
+    }
+    .margin_left{
+        margin-left: 5px;
+    }
+    #myTabContent{
+        height: 100%;
+        .djinfo-tool {
+            margin: 4px;
+            input,select{
+                margin-right: 5px;
+            }
+        }
+        .linesplit {
+            height: 1px;
+            margin-top: 20px;
+            margin-bottom: 5px;
+            background-color: #01d4f9;
+            width: 100%;
+        }
+        .djfieldinfo{
+            position: absolute;
+            top: 42px;
+            margin-left: calc(100% - 400px);
+            margin-right: 10px;
+        }
+        .djfieldinfo,.djinfo {
+            width: 100%;
+            #all_check{
+                margin-right: -10px;
+            }
+            .table_pagecontrol {
+                position: absolute;
+                bottom: 10px;
+                width: 98%;
+                margin-left: 4px;
+            }
+        }
+    }
+
+    .checkwidth{
+        width: 40px;
+    }
+    .pagination {
+        margin: 1.5px 0px;
+        position: relative;
+        .dataTables_paginate.paging_simple_numbers{
+            position:absolute;
+            right: 12px;
+        }
+    }
+
+    .dataTables_scrollHead {
+        table {
+            thead {
+                text-align: center;
+                .sorting:after {
+                    content: " ";
+                    content: url(/widgets/DataPanel/images/normal.png);
+                    width: 20px;
+                    opacity: 1;
+                    padding: 5.5px;
+                }
+                .sorting_desc:after {
+                    content: " ";
+                    content: url(/widgets/DataPanel/images/sp.png);
+                    width: 20px;
+                    opacity: 1;
+                    padding: 5.5px;
+                }
+                .sorting_asc:after {
+                    content: " ";
+                    content: url(/widgets/DataPanel/images/sx.png);
+                    width: 20px;
+                    opacity: 1;
+                    padding: 5.5px;
+                }
+            }
+        }
+    }
+    tbody{
+        //checkbox 位置居中
+        .list_check{
+            margin-left: calc(50% - 6px);
+        }
+    }
+}
+.widget-popup{
+    #widget-UserManagementAddInfo{
+        overflow: auto;
+        height: 100%;
+        overflow-x: hidden;
+        textarea,select,input{
+            width: 280px !important;
+        }
+        .inner.show{
+            height: 200px !important;
+        }
+        .btn.dropdown-toggle.btn-light{
+            width: 280px !important;
+        }
+        label{
+            width: 120px;
+            position: relative;
+            span{
+                position: absolute;
+                right:0px;
+            }
+        }
+        .kv-upload-progress.hide{
+            display: none !important
+        }
+        .kv-fileinput-caption{
+            width: 180px;
+        }
+        .input-group-btn.input-group-text{
+            border-top-right-radius: .25rem;
+            border-bottom-right-radius: .25rem;
+            border-bottom-left-radius:0;
+            border-top-left-radius: 0;
+        }
+        .kv-file-content{
+            width: 200px;
+            .file-preview-image.kv-preview-data{
+                width: 200px !important;
+                height: 170px !important;
+            }
+        }
+        .file-preview{
+            width: 280px;
+        }
+    }
+    .form-group.tip {
+        text-align: center;
+    }
+}
+
+div#widget-UserManagementUserInfo_  {
+    span{
+        width: 100px;
+    }
+    span.control-width {
+        width: 200px !important;
+    }
+}