From 0a3f9325599467015aecc4af7543dd10fe70ec56 Mon Sep 17 00:00:00 2001
From: yumenghui <953181891@qq.com>
Date: 星期五, 04 八月 2023 14:14:28 +0800
Subject: [PATCH] 附件修改
---
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