liuyn
2024-03-11 a87f1c3df03078814ee97ad0c8ac200a232419e9
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
<apex:page showHeader="false" sidebar="false" id="toAddMC"  title="添加小合同">
    <apex:includeLightning />
    <div style="width:100%;height:100%;" id="toAddMCContainer" />
    <style>
        body .slds-slot .slds-col .slds-combobox__input .slds-form-element__control button{
            background:none !important;
        }
        .slds-button.slds-button_brand {
            margin-top: 3px;
        }
    </style>
    <script>
        $Lightning.use("c:lexToAddMCApp", function () {
            $Lightning.createComponent("c:lexToAddMaintenanceContract",
                {},
                "toAddMCContainer",
                function (cmp) {
                    console.log('Component created, do something cool here');
                });
        });
 
        var interval = setInterval(()=>{
            var hrefStr = window.location.href;
            if (hrefStr.indexOf("Refresh") != -1) {
                var arr = hrefStr.split("==");
                window.opener.parent.location.href = "/"+arr[1];
                window.location.hash = '';
            }
        },1000);
    </script>
 
</apex:page>