|
|
@@ -205,13 +205,18 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
resultList(){
|
|
|
- let arr = [];
|
|
|
- this.checkList.forEach(v=>{
|
|
|
- if(v.itemName.indexOf(this.itemName) > -1){
|
|
|
- arr.push(v)
|
|
|
- }
|
|
|
- })
|
|
|
- return arr;
|
|
|
+ if (!this.itemName) {
|
|
|
+ return this.checkList;
|
|
|
+ }
|
|
|
+ // 使用传入的值来过滤数据
|
|
|
+ const filteredData = this.checkList.map(item => ({
|
|
|
+ ...item,
|
|
|
+ pointList:
|
|
|
+ item.pointList.filter(point =>
|
|
|
+ (point.itemName.includes(this.itemName) || point.pointName.includes(this.itemName))
|
|
|
+ )
|
|
|
+ })).filter(item => item.pointList.length > 0);
|
|
|
+ return filteredData;
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|