Commit 801dd2f1 by zhangquan

bug修复

1 parent 5e848786
......@@ -371,22 +371,34 @@ export default {
// 返回值>0则b排在a前面,实现降序
return dateB - dateA;
});
let lastNo = '';
let currentIndex = 1;
let wiredList =
res.data.list
.filter(item => item.source == 1)
.map((item, index) => {
if (lastNo !== item.sn) {
currentIndex = index + 1;
}
lastNo = item.sn;
return {
...item,
idx: `有线设备${index + 1}`
idx: `有线设备${currentIndex}`
}
}) || []
let lastLessNo = '';
let currentLessIndex = 1;
let wirelessList =
res.data.list
.filter(item => !item.source)
.map((item, index) => {
if (lastLessNo !== item.sn) {
currentLessIndex = index + 1;
}
lastLessNo = item.sn;
return {
...item,
idx: `无线设备${index + 1}`
idx: `无线设备${currentLessIndex}`
}
}) || []
this.sitTableData = [...wiredList, ...wirelessList] || []
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!