Quellcode durchsuchen

feature_20251117_日报填写内容自定义配置

zhujindu vor 1 Woche
Ursprung
Commit
1d6afb5e2f
3 geänderte Dateien mit 30 neuen und 25 gelöschten Zeilen
  1. 2 2
      src/views/week/daily.vue
  2. 14 11
      src/views/week/dailyDetails.vue
  3. 14 12
      src/views/week/dailyHistoricalDetails.vue

+ 2 - 2
src/views/week/daily.vue

@@ -738,7 +738,7 @@ export default {
           this.tsContentsFun();
         } else {
           // 新的
-          if (this.reportTarget.customTaskList.length) {
+          if (this.reportTarget.customTaskList && this.reportTarget.customTaskList.length) {
             // 配置任务
             this.filterReportCustomData((reportCustomAnswers) => {
               this.tsContentsFun(reportCustomAnswers);
@@ -819,7 +819,7 @@ export default {
           this.submintFun();
         } else {
           // 新的
-          if (this.reportTarget.customTaskList.length) {
+          if (this.reportTarget.customTaskList && this.reportTarget.customTaskList.length) {
             // 配置任务
             this.reportCustomTabstoreVal((reportCustomAnswers) => {
               this.submintFun(reportCustomAnswers);

+ 14 - 11
src/views/week/dailyDetails.vue

@@ -839,17 +839,20 @@ export default {
         this.reportContents = [];
         // <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
         if (this.reportTarget.isHistory == '0') {
-          for (let x = 0; x < this.reportTarget.customTaskList.length; x++) {
-            let sfaReportCustomCollections =
-              this.reportTarget.customTaskList[x].sfaReportCustomCollections;
-            if (sfaReportCustomCollections) {
-              for (let y = 0; y < sfaReportCustomCollections.length; y++) {
-                let custom = this.shareReportConfig.filter(
-                  (val) => val.dictValue == sfaReportCustomCollections[y].reportCustomCollectionName
-                );
-                if (custom.length) {
-                  custom[0].content = sfaReportCustomCollections[y].answerValue;
-                  this.reportContents = this.reportContents.concat(custom);
+          if (this.reportTarget.customTaskList && this.reportTarget.customTaskList.length) {
+            for (let x = 0; x < this.reportTarget.customTaskList.length; x++) {
+              let sfaReportCustomCollections =
+                this.reportTarget.customTaskList[x].sfaReportCustomCollections;
+              if (sfaReportCustomCollections) {
+                for (let y = 0; y < sfaReportCustomCollections.length; y++) {
+                  let custom = this.shareReportConfig.filter(
+                    (val) =>
+                      val.dictValue == sfaReportCustomCollections[y].reportCustomCollectionName
+                  );
+                  if (custom.length) {
+                    custom[0].content = sfaReportCustomCollections[y].answerValue;
+                    this.reportContents = this.reportContents.concat(custom);
+                  }
                 }
               }
             }

+ 14 - 12
src/views/week/dailyHistoricalDetails.vue

@@ -1014,18 +1014,20 @@ export default {
           this.reportContents = [];
           // <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
           if (this.reportTarget.isHistory == '0') {
-            for (let x = 0; x < this.reportTarget.customTaskList.length; x++) {
-              let sfaReportCustomCollections =
-                this.reportTarget.customTaskList[x].sfaReportCustomCollections;
-              if (sfaReportCustomCollections) {
-                for (let y = 0; y < sfaReportCustomCollections.length; y++) {
-                  let custom = this.shareReportConfig.filter(
-                    (val) =>
-                      val.dictValue == sfaReportCustomCollections[y].reportCustomCollectionName
-                  );
-                  if (custom.length) {
-                    custom[0].content = sfaReportCustomCollections[y].answerValue;
-                    this.reportContents = this.reportContents.concat(custom);
+            if (this.reportTarget.customTaskList && this.reportTarget.customTaskList.length) {
+              for (let x = 0; x < this.reportTarget.customTaskList.length; x++) {
+                let sfaReportCustomCollections =
+                  this.reportTarget.customTaskList[x].sfaReportCustomCollections;
+                if (sfaReportCustomCollections) {
+                  for (let y = 0; y < sfaReportCustomCollections.length; y++) {
+                    let custom = this.shareReportConfig.filter(
+                      (val) =>
+                        val.dictValue == sfaReportCustomCollections[y].reportCustomCollectionName
+                    );
+                    if (custom.length) {
+                      custom[0].content = sfaReportCustomCollections[y].answerValue;
+                      this.reportContents = this.reportContents.concat(custom);
+                    }
                   }
                 }
               }