Browse Source

1、功能优化调整

liangluogis 4 months ago
parent
commit
9267198d90

+ 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>

+ 43 - 13
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,14 @@ class DataPanel extends BaseWidget {
 
         // 保存
         this.domObj.on('click', '.save2csv', (e) => {
-            this.saveFile();
+            this.showLoading();
+            try {
+                this.saveFile();
+            }
+            catch(err) { }
+            finally {
+                this.hideLoading();
+            }
         });
     }
 
@@ -296,10 +308,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);
         }
 
@@ -740,10 +752,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 +860,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 +888,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 +1055,23 @@ 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);
+    }
+    /**
+     * 
+     */
+    hideLoading() {
+        this.loadingObj.remove();
+    }
 }

+ 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"
 }

+ 106 - 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,18 @@
         text-overflow: ellipsis;
         overflow: hidden;
     }
+
+    .loadingbg {
+        position: absolute;
+        left: 0;
+        top: 0;
+        padding: 0;
+        margin: 0;
+        width: 100%;
+        height: 100%;
+        overflow: hidden;
+        background: rgba(240, 237, 229, 0.43);
+        font-size: 15px;
+        font-weight: 600;
+    }
 }

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


+ 8 - 1
src/widgets/Header/Widget.ts

@@ -107,11 +107,18 @@ class Header extends BaseWidget {
                     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);

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

@@ -73,15 +73,22 @@ $$
 $$
 <!--派工信息(2)-->
 <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>

+ 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

+ 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
+        }
+    ]
 }