zhangqian
2023-08-10 af7f2ebba1ca53c05ad1c47361c889afd53a9765
force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js
@@ -10,9 +10,6 @@
    CloseActionScreenEvent
} from 'lightning/actions';
import init from '@salesforce/apex/buttonCampaignCtl.init';
import {
    ShowToastEvent
} from 'lightning/platformShowToastEvent';
export default class LexCreateAssessmentReport extends LightningElement {
    @api recordId;
@@ -20,6 +17,7 @@
    IsLoading = true;
    Id;
    Status;
    msg;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
@@ -38,7 +36,6 @@
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.Id = result.Id;
                this.Status = result.Status;
@@ -56,16 +53,12 @@
        if (status == '公开中') {
            window.open("/apex/AssessmentReport?camid=" + this.Id, "_top");
        } else {
            this.ShowToastEvent("只有批准后才能创建报告!", "error")
            this.msg = '只有批准后才能创建报告!';
            this.IsLoading = false;
        }
    }
    ShowToastEvent(msg, type) {
        const event = new ShowToastEvent({
            title: '',
            message: msg,
            variant: type
        });
        this.dispatchEvent(event);
    closeAction() {
        window.history.go(-1);
    }
}