KKbes
2023-04-13 92da519033ce471566bf4948232dc4f8d587d7da
IpadDownLoad for BBoard
4个文件已添加
81 ■■■■■ 已修改文件
force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.css 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.css
New file
@@ -0,0 +1,11 @@
.lexFinlibraryHolder{
 position: relative;
 display: inline-block;
 width: 80px;
 height: 80px;
 text-align: center;
}
.container .uiContainerManager{
 display : none !important;
}
force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.html
New file
@@ -0,0 +1,4 @@
<template>
<div class="lexFinlibraryHolder" if:true={IsLoding}>
<lightning-spinner alternative-text="Loading" size="medium">  </lightning-spinner> </div>
</template>
force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js
New file
@@ -0,0 +1,55 @@
import { LightningElement, track, wire,api } from 'lwc';
import getBulletinBoard  from '@salesforce/apex/FinLibraryButtonController.getBulletinBoard';
import {CurrentPageReference} from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
export default class lexFinLibrary 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.FinLibrary();
        }
        else{
             var a="没进方法";
             console.log(a);
        }
    }).catch(error =>{
        console.log("error");
        console.log(error.message);
    }).finally(()=>{
    });
    }
    FinLibrary(){
        window.open(this.Bulletin_Board__c.iPad_Finlibrary__c, 'FinLibrary', '_top');
        this.dispatchEvent(new CloseActionScreenEvent());
    }
}
force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.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="lexFinLibrary">
    <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>