From 07390e2fcb4adf27c928335bf27ae7939c5a80ad Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期二, 23 五月 2023 11:28:12 +0800
Subject: [PATCH] bakcup20230523

---
 force-app/main/default/lwc/lexCreateNotesEmail/lexCreateNotesEmail.js |   48 ++++++++++++++++++++++++++----------------------
 1 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/force-app/main/default/lwc/lexCreateNotesEmail/lexCreateNotesEmail.js b/force-app/main/default/lwc/lexCreateNotesEmail/lexCreateNotesEmail.js
index 3130703..ff9e612 100644
--- a/force-app/main/default/lwc/lexCreateNotesEmail/lexCreateNotesEmail.js
+++ b/force-app/main/default/lwc/lexCreateNotesEmail/lexCreateNotesEmail.js
@@ -4,17 +4,17 @@
  * @Author: chen jing wu
  * @Date: 2023-03-27 13:53:40
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-10 14:22:27
+ * @LastEditTime: 2023-05-10 10:21:24
  */
 import { api, wire,LightningElement } from 'lwc';
 import { CurrentPageReference } from "lightning/navigation";
 import { CloseActionScreenEvent } from 'lightning/actions';
 import { NavigationMixin } from 'lightning/navigation';
 import init  from '@salesforce/apex/MonthlyReportController.initForCreateNoteEmailButton';
-import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
 
 export default class LexCreateNotesEmail extends LightningElement {
     @api recordId;
+    objectName;
     ownerEmail;
     ownerAlias;
     keyIssue;
@@ -22,9 +22,8 @@
     taskFollow;
     otherIssue;
     nextWeekPlan;
-    drSumUrl;
     IsLoading = true;
-    url;
+    Link;
 
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
@@ -32,12 +31,19 @@
             console.log(currentPageReference);
 
         if (currentPageReference) {
-          const urlValue = currentPageReference.state.recordId;
-          if (urlValue) {
-            let str = `${urlValue}`;
+          const urlValue1 = currentPageReference.state.recordId;
+          if (urlValue1) {
+            let str = `${urlValue1}`;
             console.log("str");
             console.log(str);
             this.recordId = str;
+          }
+          const urlValue2 = currentPageReference.state.backgroundContext;
+          if (urlValue2) {
+            let str = `${urlValue2}`;
+            console.log("str");
+            console.log(str);
+            this.Link = str;
           }
         }
     }
@@ -52,15 +58,14 @@
             console.log(result);
             if (result != null) {
                 this.IsLoading = false;
-                this.ownerEmail = result.ownerEmail;
-                this.ownerAlias = result.ownerAlias;
-                this.keyIssue = result.keyIssue;
-                this.feedBack = result.feedBack;
-                this.taskFollow = result.taskFollow;
-                this.otherIssue = result.otherIssue;
-                this.nextWeekPlan = result.nextWeekPlan;
-                this.drSumUrl = result.drSumUrl;
-                this.userEmail = result.userEmail;
+                this.ownerEmail = result.ownerEmail == undefined ? '' : result.ownerEmail;
+                this.ownerAlias = result.ownerAlias == undefined ? '' : result.ownerAlias;
+                this.keyIssue = result.keyIssue == undefined ? '' : result.keyIssue;
+                this.feedBack = result.feedBack == undefined ? '' : result.feedBack;
+                this.taskFollow = result.taskFollow == undefined ? '' : result.taskFollow;
+                this.otherIssue = result.otherIssue == undefined ? '' : result.otherIssue;
+                this.nextWeekPlan = result.nextWeekPlan == undefined ? '' : result.nextWeekPlan;
+                this.userEmail = result.userEmail == undefined ? '' : result.userEmail;
                 this.createEmail();
                 this.dispatchEvent(new CloseActionScreenEvent());
             }
@@ -73,11 +78,10 @@
     }
     createEmail() {
         console.log("start");
-    
-       window.location.href = ("mailto:" 
-        + this.ownerEmail
+        window.location.href = ("mailto:" 
+        + this.ownerEmail 
         +"?bcc=" 
-        +   this.userEmail
+        + this.userEmail
         +"&subject=銆愬懆鎶�:" 
         + this.ownerAlias 
         + "銆�" + "&body=鍏堢敓/濂冲+" + "%0D%0A" + "%0D%0A" + "涓昏鎶ュ憡浜嬮」锛�"
@@ -90,8 +94,8 @@
         + this.otherIssue 
         +"%0D%0A" + "涓嬪懆璁″垝锛�" 
         + this.nextWeekPlan 
-        +"%0D%0A" + "杩炴帴锛�" 
-        + this.drSumUrl
+        +"%0D%0A" + "杩炴帴锛�"  + "%0D%0A"
+        + window.location.origin + this.Link
         +"%0D%0A").substring(0,320).split("<br>").join("%0D%0A");
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1