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