123
chenjingwu
2024-04-15 43c7a9f8b03866ec59636450de9c3b8d6e27114b
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
47
48
49
50
51
52
53
54
55
56
57
58
import { LightningElement, track, wire, api } from 'lwc';
import {CurrentPageReference,NavigationMixin} from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
 
import init from '@salesforce/apex/LexPrintInspectupReportController.init';
export default class lexPrintInspectupReport extends LightningElement {
    @api recordId;
    initPage;
 
    activeSections = ['conditions1','conditions2','conditions3'];
 
    tableHeader = [
        { label: '信息对象', fieldName: 'chackPlanNo' },
        { label: '最后点检日', fieldName: 'executionEndDate', type: 'date' },
        { label: '勾选', fieldName: 'id', type: 'checkbox' }];
 
    isResultShowLOption =[
        { label: '--无--', value: '' },
        { label: '空白单据',value: '1' },
        { label: '合同全部', value: '2'}];
 
    selectAssetTypeOption =[
        { label: '--无--', value: '' },
        { label: '战略科室',value: '1' },
        { label: '科室', value: '2' },
        { label: '装机地点',value: '3'},
        { label: '机身号', value: '4'}];
 
    isResultShow;
 
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
        console.log(currentPageReference);
 
        if(currentPageReference) {
            const urlValue = currentPageReference.state.recordId;
            if(urlValue) {
                let str = `${urlValue}`;
                this.recordId = str;
            }
        }        
    }
    connectedCallback() {
        this.recordId = 'a0H1000001DV1cp';
        init({recordId: this.recordId}).then(result=>{
            this.isResultShow = result.isResultShow;
            this.selectAssetType = result.selectAssetType;
            this.strategyDepartment = result.strategyDepartment;
            this.department = result.department;
            this.installationSite = result.installationSite;
            this.isPaging = result.isPaging;
            this.activeOn = result.activeOn;
            this.inspectupPlanList = result.inspectupPlanList;
 
        });
    }
}