From 7454e4fe769b5148309b8a932fbf2bc03b41b376 Mon Sep 17 00:00:00 2001
From: liangxiaozhen <liangxiaozhen>
Date: 星期日, 06 八月 2023 19:06:33 +0800
Subject: [PATCH] G级页面简单修改

---
 force-app/main/default/lwc/customWeeklyReportComp/customWeeklyReportComp.js |   41 +++++++++++++++++++++++++++++------------
 1 files changed, 29 insertions(+), 12 deletions(-)

diff --git a/force-app/main/default/lwc/customWeeklyReportComp/customWeeklyReportComp.js b/force-app/main/default/lwc/customWeeklyReportComp/customWeeklyReportComp.js
index bb70b3f..184e80d 100644
--- a/force-app/main/default/lwc/customWeeklyReportComp/customWeeklyReportComp.js
+++ b/force-app/main/default/lwc/customWeeklyReportComp/customWeeklyReportComp.js
@@ -1,26 +1,43 @@
-import { LightningElement,api } from 'lwc';
-import { NavigationMixin } from "lightning/navigation";
+import { LightningElement, api, track } from 'lwc';
+import { NavigationMixin } from 'lightning/navigation';
+import View_Weekly_Report from '@salesforce/label/c.View_Weekly_Report';
 
-export default class CustomWeeklyReportComp extends NavigationMixin(LightningElement) {
+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);
+        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 reportFilters =
+            '[{"operator":"equals","value":"' +
+            this.hospitalName +
+            '","column":"Agency_Report__c.Hospital__c"}]';
+        let reportUrl = this.label.View_Weekly_Report;
+        let url =
+            '/report/' +
+            reportUrl +
+            '?reportFilters=' +
+            encodeURIComponent(reportFilters);
         this[NavigationMixin.Navigate]({
-            type: "standard__webPage",
+            type: 'standard__webPage',
             attributes: {
-                url: url,
-            },
+                url: url
+            }
         });
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1