From 3962c2bb0435484b60a3e408e4738d792e249a53 Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期一, 05 六月 2023 11:09:55 +0800
Subject: [PATCH] LEX CommunityNewCmp

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

diff --git a/force-app/main/default/lwc/customWeeklyReportComp/customWeeklyReportComp.js b/force-app/main/default/lwc/customWeeklyReportComp/customWeeklyReportComp.js
new file mode 100644
index 0000000..9c1404f
--- /dev/null
+++ b/force-app/main/default/lwc/customWeeklyReportComp/customWeeklyReportComp.js
@@ -0,0 +1,33 @@
+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() {
+        console.log('CustomWeeklyReportComp recordId = ' + this.recordId);
+        console.log('CustomWeeklyReportComp hospitalName = ' + this.hospitalName);
+    }
+
+    toWeeklyReport() {
+        console.log('鍘绘姤琛�');
+        let reportFilters = '[{"operator":"equals","value":"' + this.hospitalName + '","column":"Agency_Report__c.Hospital__c"}]';
+        let reportUrl = this.label.View_Weekly_Report;
+        console.log('reportUrl = ' + reportUrl);
+        let url = "/report/" + reportUrl + "?reportFilters=" + encodeURIComponent(reportFilters);
+        this[NavigationMixin.Navigate]({
+            type: "standard__webPage",
+            attributes: {
+                url: url,
+            },
+        });
+    }
+}
\ No newline at end of file

--
Gitblit v1.9.1