|
@@ -169,6 +169,7 @@ const getIedChild = async () => {
|
|
|
ied_name: props.checkData.ied_name,
|
|
|
forcerefresh: 0,
|
|
|
});
|
|
|
+ if(!listData2.value.list||!childRes.data) return;
|
|
|
if (childRes.data) {
|
|
|
//左右侧内部侧数据组装
|
|
|
listData2.value.list.forEach((item, index) => {
|
|
@@ -283,6 +284,7 @@ const processArray = (arr) => {
|
|
|
// ref_ied_id作为键,obj作为值
|
|
|
const uniqueObjects = new Map();
|
|
|
// 遍历数组
|
|
|
+ if(!arr) return;
|
|
|
for (const obj of arr) {
|
|
|
const { ref_ied_id } = obj;
|
|
|
// 如果当前对象的 ref_ied_id 属性已经存在于 uniqueObjects 中
|
|
@@ -320,6 +322,7 @@ const clickResetLine2 = () => {
|
|
|
// 将设备列表分成两份
|
|
|
const bothSide = (data) => {
|
|
|
const formatArr = processArray(data);
|
|
|
+ if(!formatArr) return;
|
|
|
const arrlenght = formatArr.length;
|
|
|
const long1 = Math.ceil(arrlenght / 2);
|
|
|
leftList.value = formatArr.splice(0, long1);
|