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; }); } }