19626
2023-04-04 4c5b740567d5664a2b4133e8f6b3a6ee86886beb
force-app/main/default/lwc/lexSubmitCompetitorReport/lexSubmitCompetitorReport.js
@@ -5,7 +5,7 @@
import  otherButtonInSubmitCompetitorReport  from '@salesforce/apex/ReportController.updateForSubmitCompetitorReportButton';
import { updateRecord } from 'lightning/uiRecordApi';
import init  from '@salesforce/apex/ReportController.initForSubmitCompetitorReportButton';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class LexSubmitCompetitorReport extends LightningElement {
    @api recordId;
    IsLoading = true;
@@ -19,10 +19,18 @@
            recordId: this.recordId
          }).then(result=>{
            this.submit();
            this.dispatchEvent(new CloseActionScreenEvent());
            this.IsLoading = false;  
          });
          
    }
    showToast(msg,type) {
      const event = new ShowToastEvent({
          title: '',
          message: msg,
          variant: type
      });
      this.dispatchEvent(event);
    }
    
@@ -30,7 +38,9 @@
      otherButtonInSubmitCompetitorReport({
        recordId: this.recordId
    }).then(result=>{
      this.showToast("提交对手竞争报告成功","success")
      this.updateRecordView(this.recordId);
      this.dispatchEvent(new CloseActionScreenEvent());
    });
    }
}