import { LightningElement, track, wire, api } from 'lwc';
|
import {CurrentPageReference} from 'lightning/navigation';
|
|
export default class lexUnassign extends LightningElement {
|
@api recordId;
|
@api rentalApplySetIds;
|
msg;
|
IsLoading=true;
|
|
@wire(CurrentPageReference)
|
getStateParameters(currentPageReference){
|
console.log("进入页面");
|
console.log(currentPageReference);
|
if(currentPageReference){
|
const urvalue=currentPageReference.state.recordId;
|
if(urvalue){
|
let str=`${urvalue}`;
|
console.log('str');
|
console.log(str);
|
this.recordId=str;
|
}
|
}
|
}
|
|
connectedCallback(){
|
|
if(this.rentalApplySetIds == undefined || this.rentalApplySetIds.length<1){
|
window.open("/apex/EquipmentRentalUnassign?raId="+this.recordId);
|
}else{
|
window.open("/apex/EquipmentRentalUnassign?raId="+this.recordId+"&EquipmentId="+this.rentalApplySetIds);
|
}
|
this.closeAction();
|
}
|
|
closeAction() {
|
//返回当前的备品申请
|
window.open("/"+this.recordId,'_self');
|
}
|
}
|