| force-app/main/default/lwc/lexConsumTrialPDF/lexConsumTrialPDF.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexConsumTrialPDF/lexConsumTrialPDF.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexConsumTrialPDF/lexConsumTrialPDF.js-meta.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
force-app/main/default/lwc/lexConsumTrialPDF/lexConsumTrialPDF.html
New file @@ -0,0 +1,5 @@ <template> <div class="dispatchOCSMQARAHolder" if:true={IsLoading}> <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> </div> </template> force-app/main/default/lwc/lexConsumTrialPDF/lexConsumTrialPDF.js
New file @@ -0,0 +1,50 @@ import { LightningElement,wire,track,api} from 'lwc'; import { CurrentPageReference, NavigationMixin} from "lightning/navigation"; import { CloseActionScreenEvent } from 'lightning/actions'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; // 耗材 试用表 export default class LexConsumTrialPDF extends LightningElement { @api recordId; IsLoading = true; @wire(CurrentPageReference) getStateParameters(currentPageReference) { console.log(111); console.log(currentPageReference); if (currentPageReference) { const urlValue = currentPageReference.state.recordId; if (urlValue) { let str = `${urlValue}`; console.log("str"); console.log(str); this.recordId = str; } } } connectedCallback(){ this.IsLoading = false; console.log("pdf---",this.recordId,this.IsLoading); if(this.recordId){ window.open('/apex/ConsumTrialPDF?id='+this.recordId); } setTimeout(()=>{ this.dispatchEvent(new CloseActionScreenEvent()); }) } showToast(message, type) { const evt = new ShowToastEvent({ // title: '', message: message, variant: type }); this.dispatchEvent(evt); this.dispatchEvent(new CloseActionScreenEvent()); } } force-app/main/default/lwc/lexConsumTrialPDF/lexConsumTrialPDF.js-meta.xml
New file @@ -0,0 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> <apiVersion>56.0</apiVersion> <isExposed>true</isExposed> <targets> <target>lightning__AppPage</target> <target>lightning__RecordPage</target> <target>lightning__HomePage</target> <target>lightning__RecordAction</target> </targets> </LightningComponentBundle>