|
@@ -413,14 +413,30 @@ const gatewayDevDelete = (index: number) => {
|
|
};
|
|
};
|
|
|
|
|
|
const handleOk = () => {
|
|
const handleOk = () => {
|
|
- monitorAssociationGatewayList.value = mergeArrays(
|
|
|
|
- monitorAssociationGatewayList.value,
|
|
|
|
- monitorChooselistEquipment.value,
|
|
|
|
- );
|
|
|
|
- controlAssociationGatewayList.value = mergeArrays(
|
|
|
|
- controlAssociationGatewayList.value,
|
|
|
|
- controlChooselistEquipment.value,
|
|
|
|
- );
|
|
|
|
|
|
+ if (monitorChooselistEquipment.value.length) {
|
|
|
|
+ monitorAssociationGatewayList.value = mergeArrays(
|
|
|
|
+ monitorAssociationGatewayList.value,
|
|
|
|
+ monitorChooselistEquipment.value,
|
|
|
|
+ );
|
|
|
|
+ } else {
|
|
|
|
+ monitorAssociationGatewayList.value = monitorAssociationGatewayList.value.filter(
|
|
|
|
+ (item) =>
|
|
|
|
+ !(item.gatewayId === gatewayId && item.linkId === linkId && item.gatewayLinkProtocolId === groupNumberId),
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (controlChooselistEquipment.value.length) {
|
|
|
|
+ controlAssociationGatewayList.value = mergeArrays(
|
|
|
|
+ controlAssociationGatewayList.value,
|
|
|
|
+ controlChooselistEquipment.value,
|
|
|
|
+ );
|
|
|
|
+ } else {
|
|
|
|
+ controlAssociationGatewayList.value = controlAssociationGatewayList.value.filter(
|
|
|
|
+ (item) =>
|
|
|
|
+ !(item.gatewayId === gatewayId && item.linkId === linkId && item.gatewayLinkProtocolId === groupNumberId),
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
const dataList = [...monitorAssociationGatewayList.value, ...controlAssociationGatewayList.value];
|
|
const dataList = [...monitorAssociationGatewayList.value, ...controlAssociationGatewayList.value];
|
|
|
|
|
|
groupingList.value = Array.from(new Set(dataList.map((item) => item.groupName))).map((groupName, index) => ({
|
|
groupingList.value = Array.from(new Set(dataList.map((item) => item.groupName))).map((groupName, index) => ({
|