|
@ -715,26 +715,26 @@ export default { |
|
|
this.newArr = [] |
|
|
this.newArr = [] |
|
|
// 如果是编辑的话回填的数据会有数组字符串需要将不是对象属性的过滤掉 |
|
|
// 如果是编辑的话回填的数据会有数组字符串需要将不是对象属性的过滤掉 |
|
|
let arr = []; |
|
|
let arr = []; |
|
|
let isOk = false; |
|
|
// let isOk = false; |
|
|
this.newFormData.serviceScopeList.forEach((item) => { |
|
|
this.newFormData.serviceScopeList.forEach((item) => { |
|
|
if (typeof item != "string") { |
|
|
if (typeof item != "string") { |
|
|
arr.push(item); |
|
|
arr.push(item); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
for(let i in arr){ |
|
|
// for(let i in arr){ |
|
|
if(arr[i].objectType == "neighborhood" || |
|
|
// if(arr[i].objectType == "neighborhood" || |
|
|
arr[i].objectType == "agency" || |
|
|
// arr[i].objectType == "agency" || |
|
|
arr[i].objectType == "grid"){ |
|
|
// arr[i].objectType == "grid"){ |
|
|
isOk = true; |
|
|
// isOk = true; |
|
|
}else{ |
|
|
// }else{ |
|
|
isOk = false; |
|
|
// isOk = false; |
|
|
this.$message.error("请选择正确的网格,社区,楼栋!"); |
|
|
// this.$message.error("请选择正确的网格,社区,楼栋!"); |
|
|
return |
|
|
// return |
|
|
} |
|
|
// } |
|
|
} |
|
|
// } |
|
|
console.log( this.newArr); |
|
|
|
|
|
this.newFormData.serviceScopeList = arr; |
|
|
this.newFormData.serviceScopeList = arr; |
|
|
if (!isOk && this.formData.assignFlag) return |
|
|
// if (!isOk && this.formData.assignFlag) return |
|
|
var url = ""; |
|
|
var url = ""; |
|
|
var params = {}; |
|
|
var params = {}; |
|
|
if (this.formType == "edit") { |
|
|
if (this.formType == "edit") { |
|
|