| force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAura.cmp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAura.cmp-meta.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAuraController.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/classes/UploadOBPMController.cls | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.css | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.js-meta.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/pages/UploadOBPM.page | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAura.cmp
New file @@ -0,0 +1,8 @@ <aura:component implements="flexipage:availableForAllPageTypes,force:lightningQuickActionWithoutHeader,force:hasRecordId,lightning:actionOverride,lightning:isUrlAddressable" access="global"> <aura:attribute name="recordId" type="String" /> <aura:handler name="render" value="{!this}" action="{!c.closeModal}" /> <aura:attribute name="isDoneRendering" type="Boolean" default="false"/> <div class="exampleHolder"> <c:lexUploadOBPM recordId="{!v.recordId}" /> </div> </aura:component> force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAura.cmp-meta.xml
New file @@ -0,0 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata"> <apiVersion>54.0</apiVersion> <description>A Lightning Component Bundle</description> </AuraDefinitionBundle> force-app/main/default/aura/lexUploadOBPMAura/lexUploadOBPMAuraController.js
New file @@ -0,0 +1,8 @@ ({ closeModal: function(component, event, helper) { $A.get("e.force:closeQuickAction").fire(); if(!cmp.get("v.isDoneRendering")){ cmp.set("v.isDoneRendering", true); } } }) force-app/main/default/classes/UploadOBPMController.cls
@@ -154,6 +154,14 @@ } } //lwc改造 @AuraEnabled public static Campaign toUploadOBPM(String recordId) { Campaign cam = [select id, Name,IF_Approved__c from Campaign where id = :recordId]; return cam; } public class OBPMInfo { public Integer line { get; set; } public Campaign cam { get; set; } force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.css
New file @@ -0,0 +1,12 @@ .exampleHolder{ position: relative; top: 0; width: 0; left: 0; right: 0; margin: 0 auto; } .uiContainerManager { display:none; } force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.html
New file @@ -0,0 +1,3 @@ <template> </template> force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.js
New file @@ -0,0 +1,59 @@ import { LightningElement,wire,track,api} from 'lwc'; import { CurrentPageReference } from "lightning/navigation"; import { CloseActionScreenEvent } from 'lightning/actions'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; import init from '@salesforce/apex/UploadOBPMController.toUploadOBPM'; export default class lexUploadOBPM extends LightningElement { @api recordId; ifApproved; IsLoading = true; @wire(CurrentPageReference) getStateParameters(currentPageReference) { if (currentPageReference) { const urlValue = currentPageReference.state.recordId; if (urlValue) { let str = `${urlValue}`; this.recordId = str; } } } connectedCallback(){ document.getElementBy init({ recordId: this.recordId }).then(result => { console.log(result); if(!result.IF_Approved__c) { const event = new ShowToastEvent({ message: '此会议不需要申请决裁!', variant: 'warning' }); this.dispatchEvent(event); }else { window.open("/apex/UploadOBPM?id=" + result.Id,'UploadOBPM','height=400,width=650'); } this.IsLoading = false; }) } } //old js /*{!RequireScript("/soap/ajax/51.0/connection.js")} {!RequireScript("/soap/ajax/51.0/apex.js")} {!RequireScript("/resource/CommonUtilJs")} var foo = function() { // 判断是否需要申请决裁 var IF_Approved__c= "{!Campaign.IF_Approved__c}"; if (IF_Approved__c == false) { alert("此会议不需要申请决裁!"); return; } window.open("/apex/UploadOBPM?id=" + '{!URLENCODE(Campaign.Id)}','UploadOBPM','height=400,width=650,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no'); } foo();*/ force-app/main/default/lwc/lexUploadOBPM/lexUploadOBPM.js-meta.xml
New file @@ -0,0 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexUploadOBPM"> <apiVersion>51.0</apiVersion> <isExposed>true</isExposed> <targets> <target>lightning__RecordPage</target> <target>lightning__AppPage</target> <target>lightning__HomePage</target> <target>lightning__RecordAction</target> </targets> </LightningComponentBundle> force-app/main/default/pages/UploadOBPM.page
@@ -1,4 +1,4 @@ <apex:page controller="UploadOBPMController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="上传OBPM"> <apex:page controller="UploadOBPMController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="上传OBPM" lightningStylesheets="true"> <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/> <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>