沙世明
2023-03-09 99b667bdfd8d4fd4d56c2952510169d7f7be794c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<aura:component extensible="true" abstract="true"
                implements="force:hasRecordId,force:lightningQuickActionWithoutHeader"
                controller="LCC_JSMQueryResultService">
    <aura:attribute name="recordId" type="Id" />
    <aura:attribute name="sObjectInfo" type="Object" />
    <aura:attribute name="simpleRecord" type="Object"/>
    <aura:attribute name="recordError" type="String"/>
    <aura:attribute name="isAdditionalObject" type="Boolean" default="false"/>
 
    <!-- For loading additional objects -->
    <aura:handler name="init" value="{!this}" action="{!c.loadCurrentObject}"/>
    
    <!--attributes for global variables-->
    <aura:attribute name="User" type="LCC_JSMUserInfo" />
    <aura:attribute name="Profile" type="Profile" />
    <aura:attribute name="Site" type="LCC_JSMSiteInfo" />
 
    <!-- register the events to fire -->
    <aura:registerEvent name="GenericApplicationEvent"   type="c:LCC_GenericApplicationEvent"/>
    <aura:registerEvent name="QueryApplicationEvent" type="c:LCC_QueryApplicationEvent"/>
 
    <!-- Style for Lightning alerts modal in quick actions -->
    <aura:html tag="style">
        .cuf-content {
            padding: 0 0rem !important;
        }
        .slds-p-around--medium {
            padding: 0rem !important;
        }
        .slds-modal__content{
            overflow-y:hidden !important;
            height:unset !important;
            max-height:unset !important;
        }
    </aura:html>
 
    <aura:if isTrue="{!not(v.isAdditionalObject)}">
        <force:recordData aura:id="recordLoader"
                          recordId="{!v.recordId}"
                          layoutType="FULL"
                          targetRecord="{!v.simpleRecord}"
                          targetFields="{!v.sObjectInfo}"
                          targetError="{!v.recordError}"
                          recordUpdated="{!c.handleRecordUpdated}"/>
    </aura:if>
    
    <aura:attribute name="partially" type="Boolean" default="false"/>
    <aura:renderIf isTrue="{!v.partially}">
        <div class="slds-m-horizontal--xx-large slds-m-top_xx-large slds-text-align_center">
            <lightning:icon iconName="utility:warning" size="large"/>
        </div>
        <div class="slds-m-around--x-large slds-text-align_center slds-text-heading_small">
            <p>This Js Button has been partially migrated. Contact with your System Administrator to review the functionality.</p>
        </div>
    </aura:renderIf>
    <!-- body of sub components -->
      {!v.body}
    
    <!-- Display Lightning Data Service errors, if any -->
    <aura:if isTrue="{!not(empty(v.recordError))}">
        <div class="recordError">
            <ui:message title="Error" severity="error" closable="true">
                {!v.recordError}
            </ui:message>
        </div>
    </aura:if>
</aura:component>