From b51b57a619d3f0075ccaa13303c99c9e849bf23a Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期二, 23 四月 2024 18:13:54 +0800
Subject: [PATCH] 123
---
force-app/main/default/pages/ImprovedForecastTimeAno.page | 86 ++++++++++++++++++++++++++++--------------
1 files changed, 57 insertions(+), 29 deletions(-)
diff --git a/force-app/main/default/pages/ImprovedForecastTimeAno.page b/force-app/main/default/pages/ImprovedForecastTimeAno.page
index f794c37..95ad951 100644
--- a/force-app/main/default/pages/ImprovedForecastTimeAno.page
+++ b/force-app/main/default/pages/ImprovedForecastTimeAno.page
@@ -1,36 +1,64 @@
-<apex:page showHeader="false" sidebar="false" id="ImprovedForecastTimeApp" title="棰勬祴鏃ユ湡鏀瑰彉">
+<apex:page showHeader="false" sidebar="false" id="ImprovedForecastTimeApp" title="棰勬祴鏃ユ湡鏀瑰彉" lightningStylesheets="true">
<apex:includeLightning />
<div style="width:100%;height:100%;" id="ImprovedForecastTimeApp" />
-
+ <style>
+ .slds-theme_error{
+ --lwc-colorBackgroundToastError: #ba0517 !important;
+ }
+ </style>
<script>
- $Lightning.use("c:ImprovedForecastTimeApp", function () {
- $Lightning.createComponent("c:ImprovedForecastTime",
- {},
- "ImprovedForecastTimeApp",
- function (cmp) {
- console.log('Component created, do something cool here');
- });
- });
+
+ init();
+ function init(){
+ var id = getParam('id');
+ console.log(id);
+ $Lightning.use("c:ImprovedForecastTimeApp", function () {
+ $Lightning.createComponent("c:lexImprovedForecastTimeNew",
+ {
+ 'recordId': id
+ },
+ "ImprovedForecastTimeApp",
+ function (cmp) {
+ var errorMessageElement = document.getElementById('auraErrorMessage');
- var interval = setInterval(()=>{
- var hrefStr = window.location.href;
- if (hrefStr.indexOf("Refresh") != -1) {
- // var query = window.location.search.substring(1);
- // var vars = query.split("&");
- // var oppId = '';
- // for (var i = 0; i < vars.length; i++) {
- // var pair = vars[i].split("=");
- // if (pair[0] == 'id') {
- // oppId = pair[1];
- // }
- // }
- // if (oppId != '') {
- // window.open('/'+oppId, '_self');
- // }
- top.window.close();
- clearInterval(interval);
- }
- },1000);
+ // 妫�鏌ユ槸鍚︽壘鍒颁簡鍏冪礌
+ if (errorMessageElement) {
+ // 闅愯棌鍏冪礌
+ errorMessageElement.style.display = 'none';
+ }
+
+ });
+ });
+ }
+
+
+ // var interval = setInterval(()=>{
+ // var hrefStr = window.location.href;
+ // if (hrefStr.indexOf("Refresh") != -1) {
+ // // var query = window.location.search.substring(1);
+ // // var vars = query.split("&");
+ // // var oppId = '';
+ // // for (var i = 0; i < vars.length; i++) {
+ // // var pair = vars[i].split("=");
+ // // if (pair[0] == 'id') {
+ // // oppId = pair[1];
+ // // }
+ // // }
+ // // if (oppId != '') {
+ // // window.open('/'+oppId, '_self');
+ // // }
+ // top.window.close();
+ // clearInterval(interval);
+ // }
+ // },1000);
+ function getParam(paramName) {
+ paramValue = "", isFound = !1;
+ if (this.location.search.indexOf("?") == 0 && this.location.search.indexOf("=") > 1) {
+ arrSource = decodeURI(this.location.search).substring(1, this.location.search.length).split("&"), i = 0;
+ while (i < arrSource.length && !isFound) arrSource[i].indexOf("=") > 0 && arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase() && (paramValue = arrSource[i].split("=")[1], isFound = !0), i++
+ }
+ return paramValue == "" && (paramValue = null), paramValue;
+ }
</script>
</apex:page>
\ No newline at end of file
--
Gitblit v1.9.1