From 1dc5060a88c703639d76847f12e5a4d56d4e142d Mon Sep 17 00:00:00 2001
From: 彭锟 <pengkun@prec-tech.com>
Date: 星期一, 21 三月 2022 18:11:41 +0800
Subject: [PATCH] LogAutoSendBatch修复

---
 force-app/main/default/pages/CM_SearchContactService.page |   66 +++++++++++++++++++++++---------
 1 files changed, 47 insertions(+), 19 deletions(-)

diff --git a/force-app/main/default/pages/CM_SearchContactService.page b/force-app/main/default/pages/CM_SearchContactService.page
index b902684..e0bb42c 100644
--- a/force-app/main/default/pages/CM_SearchContactService.page
+++ b/force-app/main/default/pages/CM_SearchContactService.page
@@ -6,6 +6,16 @@
     <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
     <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
     <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
+    <style>
+        .decrypt{position: absolute;
+        		top: 0;
+        		left: 100%;
+        		display: none;
+        		text-align: left;
+    			padding-left: 5px;
+        }
+		a:hover .decrypt{display: block;width: 150px}
+    </style>
     <script type="text/javascript">
 
         // 2022/02/15 寮犲崕寤� 鏀归�燩I start
@@ -16,6 +26,13 @@
         var now_edit_id = '';
         var aws_result = {};
         searchContactAll();
+    	function Foo(){
+        	j$('[aws-id]').each(function(i,e){
+                let awsDataId = j$(e).attr('aws-id');
+                let piInformation = 'Name:'+contact[awsDataId].lastName +'<br/>' +'Phone:'+ (contact[awsDataId].phone ? contact[awsDataId].phone :'');
+            	j$(e).find('.decrypt').html(piInformation);
+            });
+        }
 
         function preparePayloadForSearchContact(){
             let searchPayload = new Object();
@@ -39,6 +56,7 @@
                     contact[contacts[i].dataId] = temp;
                 }
                 console.log(JSON.stringify(contact));
+                Foo();
             };
             AWSService.search(staticResources.searchUrl,data,searchCallBack,staticResources.token);
         }
@@ -112,25 +130,29 @@
             window.close();
         }
 
-        function showPIDiv(awsDataId){
-            console.log('awsDataId Value:'+awsDataId);
-            let parentNode = document.getElementById(awsDataId);
-            let createDiv = document.createElement("div");  
-            createDiv.id = awsDataId+"_PI";  
-            let piInformation = 'Name:'+contact[awsDataId].lastName +'\n' +'Phone:'+contact[awsDataId].phone
-            //let piInformation = 'Name:'+contact['943114607025717249'].lastName +'\n' +'Phone:'+contact['943114607025717249'].phone
-            createDiv.innerText = piInformation;
-            let x=window.event.x;
-            let y=window.event.y; 
-            createDiv.style.left=x;  
-            createDiv.style.top=y;  
-            createDiv.style.background="#dddddd";
-            createDiv.style.position = "absolute";
-            parentNode.appendChild(createDiv);  
+        function showPIDiv(dataId,awsDataId){
+            // console.log('awsDataId Value:'+awsDataId);
+            // let parentNode = document.getElementById(awsDataId);
+            // let createDiv = document.createElement("div");  
+            // createDiv.id = awsDataId+"_PI";  
+            // let piInformation = 'Name:'+contact[awsDataId].lastName +'\n' +'Phone:'+contact[awsDataId].phone
+            // //let piInformation = 'Name:'+contact['943114607025717249'].lastName +'\n' +'Phone:'+contact['943114607025717249'].phone
+            // createDiv.innerText = piInformation;
+            // let x=window.event.x;
+            // let y=window.event.y; 
+            // createDiv.style.left=x;  
+            // createDiv.style.top=y;  
+            // createDiv.style.background="#dddddd";
+            // createDiv.style.position = "absolute";
+            // parentNode.appendChild(createDiv);  
+            console.log('dataId:'+dataId+'awsDataId Value:'+awsDataId);
+            let piInformation = 'Name:'+contact[awsDataId].lastName +'\n' +'Phone:'+ (contact[awsDataId].phone ? contact[awsDataId].phone :'');
+            document.getElementById(dataId+'_'+awsDataId).innerText = piInformation;
         }
 
-        function hidePIDiv(awsDataId){
-            document.getElementById(awsDataId+'_PI').remove();
+        function hidePIDiv(dataId,awsDataId){
+            // document.getElementById(awsDataId+'_PI').remove();
+            document.getElementById(dataId+'_'+awsDataId).innerText = '';
         }
 
         // 2022骞�2鏈�15鏃� PI鏀归�� 寰愪寒 start
@@ -247,7 +269,7 @@
                 <table class="edittable" border="0" style="border-collapse: collapse;width:580px;table-layout:fixed;">
                     <colgroup>
                         <col width="50px" />
-                        <col width="100px" />
+                        <col width="200px" />
                         <col width="380px" />
                         <col width="50px" />
                     </colgroup>
@@ -270,7 +292,13 @@
                         </td>
                         <!-- <td><a href="#" onclick="setContact('{!lineinfo.lineNo}');" id="943114607025717249" onmouseover="showPIDiv('943114607025717249')" onmouseout="hidePIDiv('943114607025717249')">{!lineinfo.con.Name}</a></td> -->
                         <!-- 2022/02/15 寮犲崕寤� 瑙e瘑淇℃伅 start -->
-                        <td><a href="#" onclick="setContact('{!lineinfo.lineNo}','{!lineinfo.con.AWS_Data_Id__c}');" id="{!lineinfo.con.AWS_Data_Id__c}" onmouseover="showPIDiv('{!lineinfo.con.AWS_Data_Id__c}')" onmouseout="hidePIDiv('{!lineinfo.con.AWS_Data_Id__c}')">{!lineinfo.con.Name}</a></td>
+                        <td>
+                            <a href="/{!lineinfo.con.Id}" onclick="setContact('{!lineinfo.lineNo}','{!lineinfo.con.AWS_Data_Id__c}');" aws-id="{!lineinfo.con.AWS_Data_Id__c}" style="position:relative">
+                                <span class="encrypt">{!lineinfo.con.Name}</span>
+                                <span class="decrypt"></span>
+                            </a>
+                            
+                        </td>
                         <!-- 2022/02/15 寮犲崕寤� 瑙e瘑淇℃伅 end -->
                         <td>{!lineinfo.con.AccountName__c}</td>
                         <td><input style="width:90%;" type="button" value="缂栬緫" onclick="editContactJs('{!lineinfo.con.Id}'); return null;" /></td>

--
Gitblit v1.9.1