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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { LightningElement, track, wire , api  } from 'lwc';
import checkMinister from '@salesforce/apex/Event_Confirmation.checkMinister';
import { NavigationMixin } from 'lightning/navigation';
import { ShowToastEvent } from "lightning/platformShowToastEvent";
import LightningConfirm from 'lightning/confirm';
import Save_Completion from '@salesforce/label/c.Save_Completion';
export default class lexMinisterEventc extends NavigationMixin(LightningElement) {
 
    
    //只获取当前list选中的一览Id
    @api Ids;
    IsLoading=false;
 
    connectedCallback(){    
        this.IsLoading=true;
        console.log(this.Ids);
        console.log(this.Ids[0]);
        console.log(this.Ids[1]);
        debugger;
        console.log('hongkongboy=');
        if(this.Ids){
            // debugger;
            console.log('123');
            // debugger;
            if(confirm('请确认,是否要做确认处理?')){                
                checkMinister({idList: this.Ids}).then(res=>{
                    console.log(res);
                    console.log(Save_Completion);
                    // debugger;
                    if(res == Save_Completion){
                        alert(res);
                        window.history.go(-1);
                    }
                    else{
                        alert(res);
                        window.history.go(-1);
                    }
                })
            }
 
        }            
        
    }
 
 
}