force-app/main/default/classes/FinLibraryButtonController2.cls
New file @@ -0,0 +1,24 @@ /********************************************************************** * * * @url: /services/apexrest/rest * @data: * { } *************************************************************************/ global with sharing class FinLibraryButtonController2 { @AuraEnabled public static Bulletin_Board__c getBulletinBoard(String recordId){ Bulletin_Board__c res=new Bulletin_Board__c(); try{ res=[select iPad_Finlibrary_2__c from Bulletin_Board__c where Id=: recordId]; } catch(Exception e){ System.debug(Logginglevel.info,'*******e'+e); } return res; } } force-app/main/default/classes/FinLibraryButtonController2.cls-meta.xml
New file @@ -0,0 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> <apiVersion>51.0</apiVersion> <status>Active</status> </ApexClass> force-app/main/default/classes/FinLibraryButtonController3.cls
New file @@ -0,0 +1,13 @@ global with sharing class FinLibraryButtonController3 { @AuraEnabled public static Bulletin_Board__c getBulletinBoard(String recordId){ Bulletin_Board__c res=new Bulletin_Board__c(); try{ res=[select iPad_Finlibrary_3__c from Bulletin_Board__c where Id= : recordId]; } catch(Exception e){ System.debug(Logginglevel.info,'*******e'+e); } return res; } } force-app/main/default/classes/FinLibraryButtonController3.cls-meta.xml
New file @@ -0,0 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> <apiVersion>51.0</apiVersion> <status>Active</status> </ApexClass> force-app/main/default/lwc/lexFinLibrary2/lexFinLibrary2.css
New file @@ -0,0 +1,11 @@ .lexFinlibraryHolder2{ position: relative; display: inline-block; width: 80px; height: 80px; text-align: center; } .container .uiContainerManager{ display : none !important; } force-app/main/default/lwc/lexFinLibrary2/lexFinLibrary2.html
New file @@ -0,0 +1,4 @@ <template> <div class="lexFinlibraryHolder2" if:true={IsLoding}> <lightning-spinner alternative-text="Loading" size="medium"> </lightning-spinner> </div> </template> force-app/main/default/lwc/lexFinLibrary2/lexFinLibrary2.js
New file @@ -0,0 +1,62 @@ import { LightningElement, track, wire,api } from 'lwc'; import getBulletinBoard from '@salesforce/apex/FinLibraryButtonController2.getBulletinBoard'; import {CurrentPageReference} from 'lightning/navigation'; import { CloseActionScreenEvent } from 'lightning/actions'; export default class lexFinLibrary2 extends LightningElement { @api recordId; IsLoading; Bulletin_Board__c; @wire(CurrentPageReference) getStateParameters(currentPageReference){ if(currentPageReference){ console.log(currentPageReference); console.log("进入获取page参数") const IdValue=currentPageReference.state.recordId; if(IdValue){ let str=`${IdValue}`; this.recordId=str; console.log("recordId="+str); } } } connectedCallback(){ getBulletinBoard({recordId:this.recordId}).then(res=>{ if(res!=null){ this.IsLoading=false; console.log("res"); console.log(res); console.log("进入初始化对象其他属性"); this.Bulletin_Board__c=res; console.log(this.Bulletin_Board__c); this.FinLibrary2(); } else{ var a="没进方法"; console.log(a); } }).catch(error =>{ console.log("error"); console.log(error.message); }).finally(()=>{ }); } FinLibrary2(){ window.open(this.Bulletin_Board__c.iPad_Finlibrary_2__c, 'FinLibrary', '_top'); this.dispatchEvent(new CloseActionScreenEvent()); } } force-app/main/default/lwc/lexFinLibrary2/lexFinLibrary2.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" fqn="lexFinLibrary2"> <apiVersion>51.0</apiVersion> <isExposed>true</isExposed> <targets> <target>lightning__AppPage</target> <target>lightning__RecordPage</target> <target>lightning__HomePage</target> <target>lightning__RecordAction</target> </targets> </LightningComponentBundle> force-app/main/default/lwc/lexFinLibrary3/lexFinLibrary3.css
New file @@ -0,0 +1,11 @@ .lexFinlibraryHolder3{ position: relative; display: inline-block; width: 80px; height: 80px; text-align: center; } .container .uiContainerManager{ display : none !important; } force-app/main/default/lwc/lexFinLibrary3/lexFinLibrary3.html
New file @@ -0,0 +1,4 @@ <template> <div class="lexFinlibraryHolder3" if:true={IsLoding}> <lightning-spinner alternative-text="Loading" size="medium"> </lightning-spinner> </div> </template> force-app/main/default/lwc/lexFinLibrary3/lexFinLibrary3.js
New file @@ -0,0 +1,58 @@ import { LightningElement, track, wire,api } from 'lwc'; import getBulletinBoard from '@salesforce/apex/FinLibraryButtonController3.getBulletinBoard'; import {CurrentPageReference} from 'lightning/navigation'; import { CloseActionScreenEvent } from 'lightning/actions'; export default class lexFinLibrary3 extends LightningElement { @api recordId; IsLoading; Bulletin_Board__c; @wire(CurrentPageReference) getStateParameters(currentPageReference){ if(currentPageReference){ console.log(currentPageReference); console.log("进入获取page参数") const IdValue=currentPageReference.state.recordId; if(IdValue){ let str=`${IdValue}`; this.recordId=str; console.log("recordId="+str); } } } connectedCallback(){ getBulletinBoard({recordId:this.recordId}).then(res=>{ if(res!=null){ this.IsLoading=false; console.log("res"); console.log(res); console.log("进入初始化对象其他属性"); this.Bulletin_Board__c=res; console.log(this.Bulletin_Board__c); this.FinLibrary3(); } else{ var a="没进方法"; console.log(a); } }).catch(error =>{ console.log("error"); console.log(error.message); }).finally(()=>{ }); } FinLibrary3(){ window.open(this.Bulletin_Board__c.iPad_Finlibrary_3__c, 'FinLibrary', '_top'); this.dispatchEvent(new CloseActionScreenEvent()); } } force-app/main/default/lwc/lexFinLibrary3/lexFinLibrary3.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" fqn="lexFinLibrary3"> <apiVersion>51.0</apiVersion> <isExposed>true</isExposed> <targets> <target>lightning__AppPage</target> <target>lightning__RecordPage</target> <target>lightning__HomePage</target> <target>lightning__RecordAction</target> </targets> </LightningComponentBundle>