|
|
@ -893,6 +893,8 @@ function getModelList(row){ |
|
|
|
element.id = item.alertModelId; |
|
|
|
proxy.$refs.policyTable.toggleRowSelection(element,true); |
|
|
|
return element; |
|
|
|
}else{ |
|
|
|
element.id = null; |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
@ -985,6 +987,8 @@ function computeDelPolicy() { |
|
|
|
function computeAddPolicy() { |
|
|
|
const newSeletedRows = proxy.$refs.policyTable.getSelectionRows(); |
|
|
|
newSeletedRows.forEach(item=>{ |
|
|
|
console.log('item'); |
|
|
|
console.log(item); |
|
|
|
let flag = false; |
|
|
|
oldPolicyRows.value.forEach(element=>{ |
|
|
|
if(item.policyId == element.id){ |
|
|
@ -992,9 +996,13 @@ function computeAddPolicy() { |
|
|
|
} |
|
|
|
}) |
|
|
|
if(!flag){ |
|
|
|
console.log('policyParams-before'); |
|
|
|
console.log(policyParams.value); |
|
|
|
policyParams.value = policyParams.value.filter(element=>{ |
|
|
|
return item.policyId !== element.id; |
|
|
|
}) |
|
|
|
console.log('policyParams-after'); |
|
|
|
console.log(policyParams.value); |
|
|
|
//为了新增不能传id给后台 |
|
|
|
let policyParam = {}; |
|
|
|
policyParam.deviceId = policyDeviceUuid.value; |
|
|
|