From 492f744d9d84289e27b2ddac9a9b4a2137fd11d6 Mon Sep 17 00:00:00 2001
From: KKbes <1620284052@qq.com>
Date: 星期一, 07 八月 2023 11:25:24 +0800
Subject: [PATCH] slefreview

---
 force-app/main/default/lwc/lexNoReportApplication/lexNoReportApplication.js |   39 ++++++++++++++++++++-------------------
 1 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/force-app/main/default/lwc/lexNoReportApplication/lexNoReportApplication.js b/force-app/main/default/lwc/lexNoReportApplication/lexNoReportApplication.js
index 5333b66..fb2e2d7 100644
--- a/force-app/main/default/lwc/lexNoReportApplication/lexNoReportApplication.js
+++ b/force-app/main/default/lwc/lexNoReportApplication/lexNoReportApplication.js
@@ -10,9 +10,9 @@
 import { CloseActionScreenEvent } from 'lightning/actions';
 
  const event = new ShowToastEvent({
-            title: '妫�鏌ョ姸鎬�',
             message:
                 '鍙湁鐘舵�佷负寰呮彁浜ゆ姤鍛婄殑OPD璁″垝鎵嶈兘杩涜鏃犳姤鍛婄敵璇�',
+            variant: 'error'
         });
 export default class lexNoReportApplication extends LightningElement {
 
@@ -28,13 +28,29 @@
 
 
     @wire(getRecord, { recordId: USER_ID, fields: [USERPROFILE_ID]}) 
-         userDetails({error, data}) {
+        userDetails({error, data}) {
             if (data) {
                 this.currentUserProfileId = data.fields.ProfileId.value;
                
             } else if (error) {
                 this.error = error ;
             }
+        init({
+            recordId: this.recordId
+        }).then(result=>{
+            this.OPDPlan__c=result;
+            this.NoReportApplication().then(result=>{
+                this.IsLoading=false;
+                this.dispatchEvent(new CloseActionScreenEvent());
+            });
+        }).catch(error=>{
+            const eventError = new ShowToastEvent({
+                title: '椤甸潰鍒濆鍖栭敊璇�',
+                message:
+                error.message,
+            });
+            this.dispatchEvent(eventError);
+        });
     }
 
     @wire(CurrentPageReference)
@@ -51,23 +67,8 @@
 
     
 
-    async connectedCallback(){
-        await init({
-            recordId: this.recordId
-        }).then(result=>{
-            this.OPDPlan__c=result;
-            this.NoReportApplication().then(result=>{
-                this.IsLoading=false;
-                this.dispatchEvent(new CloseActionScreenEvent());
-            });
-        }).catch(error=>{
-            const eventError = new ShowToastEvent({
-                title: '椤甸潰鍒濆鍖栭敊璇�',
-                message:
-                error.message,
-            });
-            this.dispatchEvent(eventError);
-        });
+    connectedCallback(){
+
     }
 
 

--
Gitblit v1.9.1