The last month of 2019, this year the story is simple, go through all the things encountered in general see people just like me.
The conditions correspond to a display table is known to condition the operating data to get
Data processing:
in data:
cardManagementVal: [], // receive all data
adminDataValue: [], // the receiving condition judgment data
gymnasium_id: '' '' // received known information
// Data View interface displays
the getList () {
const REQ = parameter passing {};
adminUserLook (REQ) .then (RES => {
IF (res.data.code == "200 is") { // all data received this.cardManagementVal = res.data.data.rows; this.cardManagementVal .map (Item => { // save up the login user information taken out here, known conditions to give
this.gymnasium_id = localStorage.getItem ( "gymnasiumIdLogin"); // this user belongs is determined venues, showing the corresponding data into a new array // If the user does not have venue was the platform level can view all data
IF ( item.gymnasiumId == this.gymnasium_id ) {
this.adminDataValue.push (Item);
} else if (
this.gymnasium_id == "" ||
this.gymnasium_id == null ||
this.gymnasium_id == undefined ||
!this.gymnasium_id
) {
this.cardManagementVal = res.data.data.rows;
}
});
// 执行分页方法
setTimeout(() => {
this.myChild();
}, 0.01);
} else {
return false;
}
});
}
Display Data:
So here I paged package passed by value, no matter what the table is bound mass is constant because the page has been re-assigned, and just need the data to the page on the line
<- Page! : CardManagementVal = "gymnasium_id adminDataValue:? cardManagementVal " If you pass adminDataValue venues exist otherwise cardManagementVal -> < COM-Page : cardManagementVal ="? gymnasium_id adminDataValue: cardManagementVal " ref =" myChild "> </ COM-Page>