Browse Source

巡检任务安排增加设备容差参数

CharlesLeocc 3 years ago
parent
commit
635cf1793d
2 changed files with 15 additions and 6 deletions
  1. 5 0
      src/widgets/MissionSchedule/Widget.html
  2. 10 6
      src/widgets/MissionSchedule/Widget.ts

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

@@ -174,6 +174,11 @@ $$
                     <span style="color: red">*</span>计划完成率</label>
                 <input type="number" class="input-sm  plan_rate" value="80" />%
             </div>
+            <div class="form-group" style="margin-left: 50px;">
+                <label for="tolerance">
+                    <span style="color: red">*</span>设备容差</label>
+                <input type="number" class="input-sm  plan_tolerance" value="100" min="0"/>
+            </div>
             <div class="form-group" style="margin-left: 50px;">
                 <label for="">
                 <input type="radio" class="input-sm radio xunjianArea" checked='true' value="巡检区域" name="xunjianSelect" />

+ 10 - 6
src/widgets/MissionSchedule/Widget.ts

@@ -91,7 +91,8 @@ class MissionSchedule extends BaseWidget {
 
         ],//新计划字段
         gisUrl: undefined,//管线设备信息的请求地址
-        objectIds: undefined//选中管线设备的objectid集合
+        objectIds: undefined,//选中管线设备的objectid集合,
+        plan_tolerance:undefined//设备容差
     }
 
     /**
@@ -327,7 +328,8 @@ class MissionSchedule extends BaseWidget {
             gisInfo: undefined,//巡检点、巡检线的内容
             gisInfoList:[],
             gisUrl: undefined,//管线设备信息的请求地址
-            objectIds: undefined//选中管线设备的objectid集合
+            objectIds: undefined,//选中管线设备的objectid集合
+            plan_tolerance:undefined//设备容差
         }
         this.dataTable_current_list = {};
         this.objectIdsStr = {};//id集合
@@ -571,8 +573,8 @@ class MissionSchedule extends BaseWidget {
             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.planMode = this.domObj.find(".radio:checked").val();
-
+            this.addData.planMode = this.domObj.find(".radio[name='radio']:checked").val();
+            this.addData.plan_tolerance = this.domObj.find(".plan_tolerance").val();
             //获取多选用户id
             var synergyUserIdsVal = [];
             let checkContent = this.domObj.find(".users option:selected").val();
@@ -792,7 +794,8 @@ class MissionSchedule extends BaseWidget {
                     planMode:this.addData.planMode,
                     planRate:JSON.stringify(this.addData.planRate),
                     synergyUserIds:this.addData.synergyUserIds || "",
-                    userId:Number(this.addData.userId)
+                    userId:Number(this.addData.userId),
+                    plan_tolerance:this.addData.plan_tolerance
                 }
                 this.ajaxSend.sendAjax(this, sendData, this.config.addMissionScheduleInfo, this.ajaxSend.type.post, this.addMissionScheduleInfoCallback.bind(this));
             }else{
@@ -903,7 +906,8 @@ class MissionSchedule extends BaseWidget {
                     planMode:this.addData.planMode,
                     planRate:JSON.stringify(this.addData.planRate),
                     synergyUserIds:this.addData.synergyUserIds || "",
-                    userId:Number(this.addData.userId)
+                    userId:Number(this.addData.userId),
+                    plan_tolerance:this.addData.plan_tolerance
                 }
                 this.ajaxSend.sendAjax(this, sendData2, this.config.addMissionScheduleInfo, this.ajaxSend.type.post, this.addMissionScheduleInfoCallback.bind(this));
                 }