From 4420517bbbffea48cabe7a7dcdf2e1c4b440fc85 Mon Sep 17 00:00:00 2001
From: GWY <guweiyi@prec-tech.com>
Date: 星期一, 30 五月 2022 16:15:26 +0800
Subject: [PATCH] 两个LS特殊条件在说明的增减
---
force-app/main/default/pages/ViewUserFaultInfoDecryptInfo.page | 68 ++++++++++++++++++++++++++++++---
1 files changed, 61 insertions(+), 7 deletions(-)
diff --git a/force-app/main/default/pages/ViewUserFaultInfoDecryptInfo.page b/force-app/main/default/pages/ViewUserFaultInfoDecryptInfo.page
index a5e93a2..c2cde7e 100644
--- a/force-app/main/default/pages/ViewUserFaultInfoDecryptInfo.page
+++ b/force-app/main/default/pages/ViewUserFaultInfoDecryptInfo.page
@@ -1,10 +1,3 @@
-<!--
- @description :
- @author : ChangeMeIn@UserSettingsUnder.SFDoc
- @group :
- @last modified on : 02-28-2022
- @last modified by : ChangeMeIn@UserSettingsUnder.SFDoc
--->
<apex:page standardController="User_FaultInfo__c" extensions="NewAndEditUserFaultInfoController" id="page">
<apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }"/>
<apex:form id="form">
@@ -14,6 +7,8 @@
<apex:repeat value="{!layoutEncryptedAPIList}" var="encryptedAPI">
<apex:outputField html-data-id="{!encryptedAPI}" title="{!ApiPrefix}{!encryptedAPI}" value="{!User_FaultInfo__c[encryptedAPI]}" />
</apex:repeat>
+ <apex:outputField html-data-id="CONTACT__c" title="{!ApiPrefix}CONTACT__c" value="{!User_FaultInfo__c['CONTACT__c']}" />
+ <apex:outputField html-data-id="UFContact__c" title="{!ApiPrefix}UFContact__c" value="{!User_FaultInfo__c['UFContact__c']}" />
</apex:pageBlockSection>
<script>
var config = {
@@ -24,9 +19,68 @@
AWSToSobjectEncryptedMap:{!AWSToSobjectEncryptedMapJson}
};
var staticResources = JSON.parse('{!staticResource}');
+ var staticResourceContact = JSON.parse('{!staticResourceContact}');
+ console.log('{!contactAWSDataId}')
+ console.log('{!contactName}')
+
+ console.log('{!endUserDAWSDataId}')
+ console.log('{!endUserDName}')
function QuerySobjectFromAWS() {
AWSService.query(staticResources.queryUrl, '{!AWSDataId}', queryBack, staticResources.token);
+ debugger
+ let t = "[title='"+config.ApiPrefix+"CONTACT__c']";
+ let ele = document.querySelector(t);
+ if('{!contactAWSDataId}' != '鏃�' && '{!contactName}' != '鏃�'){
+ if('{!contactAWSDataId}' != ''){
+ AWSService.query(staticResourceContact.queryUrl, '{!contactAWSDataId}', queryContactBack, staticResourceContact.token);
+ }else{
+ ele.innerHTML = '{!contactName}';
+ }
+ }else{
+ ele.innerHTML = '';
+ }
+ debugger
+ let contactUserD = "[title='"+config.ApiPrefix+"UFContact__c']";
+ let eleUserD = document.querySelector(contactUserD);
+ if('{!endUserDAWSDataId}' != '鏃�' && '{!endUserDName}' != '鏃�'){
+ if('{!endUserDAWSDataId}' != ''){
+ AWSService.query(staticResourceContact.queryUrl, '{!endUserDAWSDataId}', queryEndUserDBack, staticResourceContact.token);
+ }else{
+ eleUserD.innerHTML = '{!endUserDName}';
+ }
+ }else{
+ eleUserD.innerHTML = '';
+ }
}
+ var queryContactBack = function queryContactBack(data){
+ if(!data.object){
+ console.log('data.object is ' + data.object);
+ return;
+ }
+ console.log('data.object is ' + data.object);
+
+ let t = "[title='"+config.ApiPrefix+"CONTACT__c']";
+ let ele = document.querySelector(t);
+ if(ele){
+ ele.title='';
+ ele.innerHTML = data.object.lastName;
+ }
+ };
+
+ var queryEndUserDBack = function queryEndUserDBack(data){
+ if(!data.object){
+ console.log('data.object is ' + data.object);
+ return;
+ }
+ console.log('data.object is ' + data.object);
+
+ let endUserD = "[title='"+config.ApiPrefix+"UFContact__c']";
+ let eleUserD = document.querySelector(endUserD);
+ if(eleUserD){
+ eleUserD.title='';
+ eleUserD.innerHTML = data.object.lastName;
+ }
+ };
var queryBack = function queryBack(data) {
if(!data.object){
console.log('data.object is ' + data.object);
--
Gitblit v1.9.1