/* * @Description: * @version: * @Author: chen jing wu * @Date: 2023-09-12 16:14:53 * @LastEditors: chen jing wu * @LastEditTime: 2023-09-12 16:19:28 */ import { LightningElement,api,wire } from 'lwc'; import { CloseActionScreenEvent } from "lightning/actions"; import { CurrentPageReference } from "lightning/navigation"; import Sample_OrderListDN_Report from "@salesforce/label/c.Sample_OrderListDN_Report"; import init from '@salesforce/apex/lexAccountController.init'; export default class LexSampleOrderListDNReport extends LightningElement { @api recordId; name; @wire(CurrentPageReference) getStateParameters(currentPageReference) { if (currentPageReference) { this.url = currentPageReference.state.backgroundContext; const urlValue = currentPageReference.state.recordId; if (urlValue) { let str = `${urlValue}`; this.recordId = str; } } } connectedCallback() { init({ recordId: this.recordId }).then(result=>{ this.name = result.name; window.open('/lightning/r/Report/' + Sample_OrderListDN_Report + '/view?fv0=' + this.name,'_blank'); this.closeAction(); }); } closeAction() { this.dispatchEvent(new CloseActionScreenEvent()); return; } }