Jelajahi Sumber

巡检任务查询,隐患查询,应急调度查询,工地监护查询增加删除功能

CharlesLeocc 3 tahun lalu
induk
melakukan
4cd9135895

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

@@ -19,6 +19,12 @@
                 <span class="glyphicon glyphicon-search" aria-hidden="true"></span>查询
             </button>
         </div>
+        <div class="form-group">
+            <button id="btn_delete" type="button"
+                class="btn btn-sm btn-default btn-success btn_delete">
+                <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>删除
+            </button>
+        </div>
         <div class="form-group">
             <button id="btn_export" type="button"
                 class="btn btn-sm btn-default btn-success btn_exportExcel">

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

@@ -95,6 +95,9 @@ class HiddenTroubleSearchAll extends BaseWidget {
         this.domObj.find(".btn_exportExcel").off().click(e => {
             this.domObj.find(".buttons-excel").trigger("click");
         });
+        this.domObj.find(".btn_delete").off().click(e => {
+            this.deleteTroubleInfo();
+        });
     }
 
     /**
@@ -213,7 +216,7 @@ class HiddenTroubleSearchAll extends BaseWidget {
             dataTable: that.dataTable,
             elementId: "HiddenTroubleSearchAllinfodata",
             url: that.config.troubleInfo,
-            isCheck: false,
+            // isCheck: false,
             // testData:this.config.dataInfo,
             searchInfo: that.searchInfo,//条件在不断变化,故需要有全局的条件监听
             displayTitle: ["隐患名称", "所属单位", "隐患地址", "上报人","上报时间", "状态", "隐患详情"],
@@ -251,7 +254,20 @@ class HiddenTroubleSearchAll extends BaseWidget {
         }
         that.dataTable = this.ajaxSend.DataTables_check(option);
     }
-
+    deleteTroubleInfo(){
+        var senddata = [];
+        this.dataTable.aExtentData.checkCurrentData.forEach(element => {
+            senddata.push(element.id);
+        });
+        this.ajaxSend.sendAjax(this, senddata, this.config.deleteTroublrInfo, this.ajaxSend.type.delete, function (results) {
+            if (results.code != 1) {
+                this.toast.Show(results.message);
+                return;
+            }
+            this.toast.Show(results.message);
+            this.getInfoList();
+        }.bind(this))
+    }
     /**
      * 销毁对象
      */

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

@@ -5,6 +5,7 @@
     "getDepartment":"/base/department/page",
     "getUserList": "/base/user/getUserByDepts/list",
     "troubleInfo":"/zmrq/trouble/page",
+    "deleteTroublrInfo":"/zmrq/trouble/deleteByIds",
     "trouble":"/zmrq/trouble/secretaryCheck",
     "tolerance": 3,
     "zoomscale": 2000,
@@ -121,7 +122,7 @@
                                 "fileName": "照片4",
                                 "path": "/照片4.png"
                             }]
-                        
+
                         }
                     ],
                     "coordinateList":[{
@@ -140,5 +141,5 @@
             ],
             "total":1
         }
-    } 
+    }
 }

+ 6 - 1
src/widgets/MaintenanceSearch/Widget.html

@@ -20,6 +20,11 @@
                 <span class="glyphicon glyphicon-search" aria-hidden="true"></span>查询
             </button>
         </div>
+        <div class="form-group">
+            <button id="btn_delete" type="button" class="btn btn-sm btn-default btn-success btn_delete">
+                <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>删除
+            </button>
+        </div>
     </div>
     <div class="planpath_content halfpaneltable">
         <table class="table table-bordered  table-striped MaintenanceSearchinfodata" cellspacing="0"
@@ -29,4 +34,4 @@
 </div>
 $$
 <div class='widget-MaintenanceSearch-pop'>
-</div>
+</div>

+ 21 - 5
src/widgets/MaintenanceSearch/Widget.ts

@@ -124,6 +124,9 @@ class MaintenanceSearch extends BaseWidget {
         this.domObj.find(".btn_search").off().click(e => {
             this.getMaintenanceList();
         });
+        this.domObj.find(".btn_delete").off().click(e => {
+            this.deleteScheduler();
+        });
     }
 
     /**
@@ -252,7 +255,7 @@ class MaintenanceSearch extends BaseWidget {
         return data;
     }
 
-  
+
     /* 渲染出列表点选的点和线
     * */
    getMaintenanceList() {
@@ -268,7 +271,7 @@ class MaintenanceSearch extends BaseWidget {
         dataTable: that.dataTable,
         elementId: "MaintenanceSearchinfodata",
         url: that.config.getRushList,
-        isCheck: false,
+        // isCheck: false,
         // testData:this.config.dataInfo,
         searchInfo: that.searchInfo,//条件在不断变化,故需要有全局的条件监听
         displayTitle: ["报警人", "地址", "类型", "地址", "联系电话","状态","描述"],
@@ -305,8 +308,21 @@ class MaintenanceSearch extends BaseWidget {
         exportTitle: "抢险信息"
     }
     that.dataTable = this.ajaxSend.DataTables_check(option);
-}
-
+   }
+   deleteScheduler(){
+    var senddata = [];
+    this.dataTable.aExtentData.checkCurrentData.forEach(element => {
+        senddata.push(element.id);
+    });
+    this.ajaxSend.sendAjax(this, senddata, this.config.deleteScheduler, this.ajaxSend.type.delete, function (results) {
+        if (results.code != 1) {
+            this.toast.Show(results.message);
+            return;
+        }
+        this.toast.Show(results.message);
+        this.getMaintenanceList();
+    }.bind(this))
+   }
     /**
      * 销毁对象
      */
@@ -323,4 +339,4 @@ class MaintenanceSearch extends BaseWidget {
         this.domObj.remove();
         this.afterDestroy();
     }
-}
+}

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

@@ -6,8 +6,9 @@
     "getUserList": "/base/user/getUserByDepts/list",
     "rushReport":"/zmrq/rushrepair/auditend",
     "getRushList":"/zmrq/scheduler/page",
+    "deleteScheduler":"/zmrq/scheduler/deleteByIds",
     "tolerance": 3,
-    "zoomscale": 1000,  
+    "zoomscale": 1000,
     "dataInfo": {
         "code": 1,
         "result": {

+ 7 - 2
src/widgets/PlanSearch/Widget.html

@@ -35,8 +35,13 @@
             <div id="toolbar" class=" btn-group btn-group-sm toolbar">
                 <div class="form-group">
                     <button type="button" class="btn btn-default btn-primary btn-search">
-                    <span class="glyphicon glyphicon-search" aria-hidden="true"></span>查询
-                </button>
+                        <span class="glyphicon glyphicon-search" aria-hidden="true"></span>查询
+                    </button>
+                </div>
+                <div class="form-group">
+                    <button type="button" class="btn btn-default btn-primary btn-delete">
+                        <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>删除
+                    </button>
                 </div>
                 <!-- <div class="form-group">
                     <button title="转移计划" id="btn_transplans" type="button" class="btn btn-default btn-danger btn_transplans" data-toggle="modal">

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

@@ -178,6 +178,10 @@ class PlanSearch extends BaseWidget {
             this.clearCurrentTr();
             this.getPlanSearch();
         }.bind(this));
+        //删除计划
+        this.domObj.find(".btn-delete").off("click").on("click", function () {
+            this.deletePlanSearch();
+        }.bind(this));
 
     }
 
@@ -444,7 +448,20 @@ class PlanSearch extends BaseWidget {
         }
         that.dataTable_all = this.ajaxSend.DataTables_check(option);
     }
-
+    deletePlanSearch(){
+        var senddata = [];
+        this.dataTable_all.aExtentData.checkCurrentData.forEach(element => {
+            senddata.push(element.id);
+        });
+        this.ajaxSend.sendAjax(this, senddata, this.config.deleteMainList, this.ajaxSend.type.delete, function (results) {
+            if (results.code != 1) {
+                this.toast.Show(results.message);
+                return;
+            }
+            this.toast.Show(results.message);
+            this.getPlanSearch();
+        }.bind(this))
+    }
     /**
      * @function 获取巡检计划详情
      * @param data 查询的计划

+ 1 - 0
src/widgets/PlanSearch/config.json

@@ -9,6 +9,7 @@
     "getPlanType": "/zmrq/planpointtype/page",
     "getPeriod": "/zmrq/planperiodtype/page",
     "getPlanRegionList": "/zmrq/gpsregion/page",
+    "deleteMainList":"/zmrq/plan/deleteByIds",
     "addTrans":"/zmrq/plan/checkTransfer",
     "getRegionInfo": "/zmrq/planpoint/page",
     "getUserPlanPointList": "/Plan/Get_Curerent_Plan_Point",

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

@@ -22,6 +22,11 @@
                 <span class="glyphicon glyphicon-search" aria-hidden="true"></span>查询
             </button>
         </div>
+        <div class="form-group">
+            <button id="btn_delete" type="button" class="btn btn-sm btn-default btn-success btn_delete">
+                <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>删除
+            </button>
+        </div>
         <div class="form-group">
             <button id="btn_export" type="button"
                 class="btn btn-sm btn-default btn-success btn_exportExcel">

+ 18 - 2
src/widgets/SiteSupervisionAllSearch/Widget.ts

@@ -131,6 +131,9 @@ class SiteSupervisionAllSearch extends BaseWidget {
         this.domObj.find(".btn_exportExcel").off().click(e => {
             this.domObj.find(".buttons-excel").trigger("click");
         });
+        this.domObj.find(".btn_delete").off().click(e => {
+            this.deleteSiteSupervisionList();
+        });
     }
 
     /**
@@ -291,7 +294,7 @@ class SiteSupervisionAllSearch extends BaseWidget {
             dataTable: that.dataTable,
             elementId: "SiteSupervisionAllSearchinfodata",
             url: that.config.getRushList,
-            isCheck: false,
+            // isCheck: false,
             searchInfo: that.searchInfo,//条件在不断变化,故需要有全局的条件监听
             displayTitle: ["工地名称", "工地类型", "施工单位", "工地负责人", "主管单位", "主管人", "施工地点", "描述", '状态'],
             displayField: ["siteName", "siteTypeName", "constructionUnit", "personInCharge", "manageUnit", "manager", "constructionAddress", "description", "constructionStateName"],
@@ -326,7 +329,20 @@ class SiteSupervisionAllSearch extends BaseWidget {
         }
         that.dataTable = this.ajaxSend.DataTables_check(option);
     }
-
+    deleteSiteSupervisionList(){
+        var senddata = [];
+        this.dataTable.aExtentData.checkCurrentData.forEach(element => {
+            senddata.push(element.id);
+        });
+        this.ajaxSend.sendAjax(this, senddata, this.config.deleteSiteSupervisionList, this.ajaxSend.type.delete, function (results) {
+            if (results.code != 1) {
+                this.toast.Show(results.message);
+                return;
+            }
+            this.toast.Show(results.message);
+            this.getsiteSupervisionList();
+        }.bind(this))
+    }
     /**
      * 销毁对象
      */

+ 1 - 0
src/widgets/SiteSupervisionAllSearch/config.json

@@ -5,6 +5,7 @@
     "getDepartment":"/base/department/page",
     "getUserList": "/base/user/getUserByDepts/list",
     "getRushList":"/zmrq/constructionsite/pagenew",
+    "deleteSiteSupervisionList":"/zmrq/constructionsite",
     "tolerance": 3,
     "zoomscale": 1000
 }