force-app/main/default/lwc/lexMainFixtureSelect/lexMainFixtureSelect.html
@@ -1,5 +1,2 @@ <template> <div class="sisToOPDHolder" if:true={IsLoading}> <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> </div> </template> force-app/main/default/lwc/lexMainFixtureSelect/lexMainFixtureSelect.js
@@ -1,6 +1,5 @@ import { LightningElement, track, wire, api } from 'lwc'; import { CurrentPageReference,NavigationMixin } from 'lightning/navigation'; import { CloseActionScreenEvent } from 'lightning/actions'; import init from '@salesforce/apex/MainFixtureSelectButtonController.init'; export default class lexMainFixtureSelect extends LightningElement { @@ -20,14 +19,11 @@ connectedCallback(){ init({ recordId:this.recordId }).then(res=>{ window.open("/apex/MainFixtureSelect?pt_recid=" + res, "_top"); this.dispatchEvent(new CloseActionScreenEvent()); }).catch(err=>{ console.log(err); this.dispatchEvent(new CloseActionScreenEvent()); }) window.open("/apex/MainFixtureSelect?pt_recid=" + this.recordId, "_top"); } closeAction() { //返回当前的备品申请 window.open("/"+this.recordId,'_self'); } } force-app/main/default/lwc/lexMainFixtureSelect/lexMainFixtureSelect.js-meta.xml
@@ -1,11 +1,17 @@ <?xml version="1.0" encoding="UTF-8"?> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexOCMSubmit"> <apiVersion>54.0</apiVersion> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexMainFixtureSelect"> <apiVersion>51.0</apiVersion> <isExposed>true</isExposed> <targets> <target>lightning__RecordPage</target> <target>lightning__AppPage</target> <target>lightning__RecordPage</target> <target>lightning__HomePage</target> <target>lightning__RecordAction</target> <target>lightning__FlowScreen</target> </targets> <targetConfigs> <targetConfig targets="lightning__FlowScreen"> <property name="recordId" type="String" label="recordId"/> </targetConfig> </targetConfigs> </LightningComponentBundle>