From 41ad0c0840a6135b7acf2280f0eebdc29bf6479b Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期二, 30 五月 2023 14:25:11 +0800
Subject: [PATCH] backup0530

---
 force-app/main/default/lwc/customWeeklyReportComp/customWeeklyReportComp.js |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/force-app/main/default/lwc/customWeeklyReportComp/customWeeklyReportComp.js b/force-app/main/default/lwc/customWeeklyReportComp/customWeeklyReportComp.js
index bb70b3f..c8e976e 100644
--- a/force-app/main/default/lwc/customWeeklyReportComp/customWeeklyReportComp.js
+++ b/force-app/main/default/lwc/customWeeklyReportComp/customWeeklyReportComp.js
@@ -1,21 +1,27 @@
-import { LightningElement,api } from 'lwc';
+import { LightningElement, api, track } from 'lwc';
 import { NavigationMixin } from "lightning/navigation";
+import View_Weekly_Report from '@salesforce/label/c.View_Weekly_Report';
 
+const customLabel = {
+    View_Weekly_Report
+}
 export default class CustomWeeklyReportComp extends NavigationMixin(LightningElement) {
+    @track label = customLabel;
+
     @api recordId;
     @api hospitalName;
     @api isShowButton;
 
-    connectedCallback(){
+    connectedCallback() {
         console.log('CustomWeeklyReportComp recordId = ' + this.recordId);
         console.log('CustomWeeklyReportComp hospitalName = ' + this.hospitalName);
     }
 
-    toWeeklyReport(){
+    toWeeklyReport() {
         console.log('鍘绘姤琛�');
         let reportFilters = '[{"operator":"equals","value":"' + this.hospitalName + '","column":"Agency_Report__c.Hospital__c"}]';
-        let url = "/report/00O0l000000zo9aEAA?reportFilters=" + encodeURIComponent(reportFilters);
-        //let url = "/report/00O0l000000zo9aEAA";
+        let reportUrl = this.label.View_Weekly_Report;
+        let url = "/report/" + reportUrl + "?reportFilters=" + encodeURIComponent(reportFilters);
         this[NavigationMixin.Navigate]({
             type: "standard__webPage",
             attributes: {

--
Gitblit v1.9.1