|
|
@@ -229,7 +229,7 @@
|
|
|
:title="titleData"
|
|
|
:show-close="false"
|
|
|
:visible.sync="dialogVisible"
|
|
|
- width="45%"
|
|
|
+ width="800px"
|
|
|
:close-on-click-modal="false"
|
|
|
:close-on-press-escape="false"
|
|
|
>
|
|
|
@@ -400,7 +400,7 @@
|
|
|
:close-on-click-modal="false"
|
|
|
:close-on-press-escape="false"
|
|
|
:visible.sync="deviceVisible"
|
|
|
- width="45%"
|
|
|
+ width="800px"
|
|
|
>
|
|
|
<!-- 筛选 -->
|
|
|
<ul class="device_seek">
|
|
|
@@ -705,6 +705,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
checkList(val) {
|
|
|
+ console.log(val)
|
|
|
this.ybqCheckList = [];
|
|
|
this.ruleForm.checkList = [];
|
|
|
for (let i = 0; i < val.length; i++) {
|
|
|
@@ -716,6 +717,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ console.log(this.ruleForm.checkList)
|
|
|
},
|
|
|
},
|
|
|
//方法集合
|
|
|
@@ -994,6 +996,19 @@ export default {
|
|
|
this.ruleForm.endTime = "";
|
|
|
}
|
|
|
|
|
|
+ // 判断当前是否有修改诱捕器,如果没有修改需要将诱捕器列表格式更改
|
|
|
+ var arr = []
|
|
|
+ for (var i = 0; i < this.ruleForm.checkList.length; i++) {
|
|
|
+ if (typeof this.ruleForm.checkList[i] == "object") {
|
|
|
+ arr.push(this.ruleForm.checkList[i].id)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (arr.length == 0) {
|
|
|
+ arr = this.ruleForm.checkList
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
// 判断当前任务类型是否为有害生物
|
|
|
if (this.ruleForm.type !== "有害生物监测") {
|
|
|
this.ruleForm.checkList = [];
|
|
|
@@ -1011,7 +1026,7 @@ export default {
|
|
|
last_time: this.ruleForm.endTime, // 任务完成时间
|
|
|
task_type: this.ruleForm.type, // 任务类型
|
|
|
tesk_msg: this.ruleForm.desc, // 任务描述
|
|
|
- trap_id_list: JSON.stringify(this.ruleForm.checkList), // 诱捕器id列表
|
|
|
+ trap_id_list: JSON.stringify(arr), // 诱捕器id列表
|
|
|
}),
|
|
|
})
|
|
|
.then((res) => {
|
|
|
@@ -1049,7 +1064,7 @@ export default {
|
|
|
last_time: this.ruleForm.endTime, // 任务完成时间
|
|
|
task_type: this.ruleForm.type, // 任务类型
|
|
|
tesk_msg: this.ruleForm.desc, // 任务描述
|
|
|
- trap_id_list: JSON.stringify(this.ruleForm.checkList), // 诱捕器id列表
|
|
|
+ trap_id_list: JSON.stringify(arr), // 诱捕器id列表
|
|
|
}),
|
|
|
})
|
|
|
.then((res) => {
|