From 5d4f265aab8e9813eaa2a9d6eb6247955218f8ef Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期一, 15 四月 2024 11:59:45 +0800
Subject: [PATCH] 123

---
 force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js b/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js
index febcdf5..576fe17 100644
--- a/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js
+++ b/force-app/main/default/lwc/lexFinLibrary/lexFinLibrary.js
@@ -2,6 +2,8 @@
 import getBulletinBoard  from '@salesforce/apex/FinLibraryButtonController.getBulletinBoard';
 import {CurrentPageReference} from 'lightning/navigation';
 import { CloseActionScreenEvent } from 'lightning/actions';
+import LightningAlert from 'lightning/alert';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 export default class lexFinLibrary extends LightningElement {
 
 		@api recordId;
@@ -25,15 +27,15 @@
 
 
     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();
+        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="娌¤繘鏂规硶";
@@ -47,9 +49,9 @@
     });
     }
 
-    FinLibrary(){
-    	window.open(this.Bulletin_Board__c.iPad_Finlibrary__c, 'FinLibrary', '_top');
-    	this.dispatchEvent(new CloseActionScreenEvent());
+    async FinLibrary(){
+        this.dispatchEvent(new CloseActionScreenEvent());
+    	window.open(this.Bulletin_Board__c.iPad_Finlibrary__c, 'FinLibrary', '_top');	
     }
 
 }
\ No newline at end of file

--
Gitblit v1.9.1