From c69e36a64e4954b0b7e818843e8a833b3201ec29 Mon Sep 17 00:00:00 2001
From: liangxiaozhen <liangxiaozhen>
Date: 星期二, 08 八月 2023 18:23:15 +0800
Subject: [PATCH] 页面加lightning样式,开始询价LWC组件修改,补充controller

---
 force-app/main/default/lwc/lexStartTrading/lexStartTrading.js |   25 ++++++++++++-------------
 1 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/force-app/main/default/lwc/lexStartTrading/lexStartTrading.js b/force-app/main/default/lwc/lexStartTrading/lexStartTrading.js
index 8c0de44..fbb3301 100644
--- a/force-app/main/default/lwc/lexStartTrading/lexStartTrading.js
+++ b/force-app/main/default/lwc/lexStartTrading/lexStartTrading.js
@@ -7,7 +7,7 @@
 import start  from '@salesforce/apex/StartTradingController2.start';
 
 
-export default class LexStartTrading extends LightningElement {
+export default class LexStartTrading extends NavigationMixin(LightningElement) {
     @api recordId;
     IsLoading=true;
 	Hospital_Name__c;
@@ -65,17 +65,15 @@
 				console.log('start result==========',result);
 				if(result!=null){
 					this.showToast('宸叉垚鍔熻浆鍖栬浠�','success');
-					window.open('/lightning/r/Opportunity/'+result+'/view','_parent');
-					// this[NavigationMixin.GenerateUrl]({
-					// 	type: "standard_recordPage",
-					// 	attributes: {
-					// 		recordId: result,
-					// 		objectApiName:"Opportunity",
-					// 		actionName:"edit"
-					// 	}
-					// }).then(url => {
-					// 	window.open(url,"_blank");
-					// });
+					// window.open('/lightning/r/Opportunity/'+result+'/view','_parent');
+					this[NavigationMixin.GenerateUrl]({
+						type: "standard__recordPage",
+						attributes: {
+							recordId: result,
+							objectApiName:"Opportunity",
+							actionName:"edit"
+						}
+					})
 				}
 			});
 			// .catch(err=>{
@@ -83,6 +81,7 @@
 			// 	console.log(err);
 			// }).finally(()=>{});
 		}
+
 	}
 	comparDate(dateValue) {
 		return new Date().getTime() >= new Date(dateValue).getTime() + 3600 * 1000 * 24;
@@ -90,11 +89,11 @@
 
 	showToast(msg,type) {
         const event = new ShowToastEvent({
-            title: '',
             message: msg,
             variant: type
         });
 		this.IsLoading = false;
 		this.dispatchEvent(event);
+		this.dispatchEvent(new CloseActionScreenEvent());
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1