From 874d06c838d77ed9e4e19ca888161c1590d02e2b Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期二, 08 八月 2023 12:16:50 +0800
Subject: [PATCH] 修改页面
---
force-app/main/default/lwc/lexCreateEvent/lexCreateEvent.js | 27 ++++++++++++++++-----------
1 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/force-app/main/default/lwc/lexCreateEvent/lexCreateEvent.js b/force-app/main/default/lwc/lexCreateEvent/lexCreateEvent.js
index 615e3ee..b7ccc1f 100644
--- a/force-app/main/default/lwc/lexCreateEvent/lexCreateEvent.js
+++ b/force-app/main/default/lwc/lexCreateEvent/lexCreateEvent.js
@@ -2,17 +2,9 @@
* @Description:
* @version:
* @Author: chen jing wu
- * @Date: 2023-04-20 14:08:55
- * @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-21 14:12:53
- */
-/*
- * @Description:
- * @version:
- * @Author: chen jing wu
* @Date: 2023-04-13 13:50:23
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-13 14:39:54
+ * @LastEditTime: 2023-06-05 09:13:58
*/
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -20,7 +12,9 @@
import init from '@salesforce/apex/OpportunityLightingButtonController.initForCreateEventButton';
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
-export default class LexCreateEvent extends LightningElement {
+import { NavigationMixin } from 'lightning/navigation';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+export default class LexCreateEvent extends NavigationMixin(LightningElement) {
@api recordId;
accountId;
@wire(CurrentPageReference)
@@ -50,7 +44,18 @@
})
}
createEvent(){
- window.open("/00U/e?retURL=%2Fapex%2FVFClosePage&accid=" + this.accountId + "&oid=" + this.recordId, "鏂板缓璁″垝");
+ this[NavigationMixin.Navigate]({
+ type: 'standard__objectPage',
+ attributes: {
+ objectApiName: 'Event',
+ actionName: 'new'
+ },
+ state: {
+ // retURL: '/apex/VFClosePage',
+ accid: this.accountId,
+ oid: this.recordId
+ }
+ });
this.dispatchEvent(new CloseActionScreenEvent());
}
showToast(msg,type) {
--
Gitblit v1.9.1