From 92da519033ce471566bf4948232dc4f8d587d7da Mon Sep 17 00:00:00 2001
From: KKbes <1620284052@qq.com>
Date: 星期四, 13 四月 2023 11:12:09 +0800
Subject: [PATCH] IpadDownLoad for BBoard

---
 force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.html        |    4 ++
 force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.css         |   11 +++++
 force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js-meta.xml |   11 +++++
 force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js          |   55 +++++++++++++++++++++++++++
 4 files changed, 81 insertions(+), 0 deletions(-)

diff --git a/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.css b/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.css
new file mode 100644
index 0000000..b606828
--- /dev/null
+++ b/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.css
@@ -0,0 +1,11 @@
+.lexFinlibraryHolder{
+ position: relative;
+ display: inline-block;
+ width: 80px;
+ height: 80px;
+ text-align: center;
+}
+
+.container .uiContainerManager{
+ display : none !important;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.html b/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.html
new file mode 100644
index 0000000..aab9e0c
--- /dev/null
+++ b/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.html
@@ -0,0 +1,4 @@
+<template>
+<div class="lexFinlibraryHolder" if:true={IsLoding}>
+<lightning-spinner alternative-text="Loading" size="medium">  </lightning-spinner> </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js b/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js
new file mode 100644
index 0000000..febcdf5
--- /dev/null
+++ b/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js
@@ -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());
+    }
+
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js-meta.xml b/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js-meta.xml
new file mode 100644
index 0000000..79fced5
--- /dev/null
+++ b/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js-meta.xml
@@ -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>
\ No newline at end of file

--
Gitblit v1.9.1