Bladeren bron

月报问题修复

洪海涛 4 jaren geleden
bovenliggende
commit
4148536bad
1 gewijzigde bestanden met toevoegingen van 12 en 1 verwijderingen
  1. 12 1
      src/store/modules/monthlyReport/edit/index.js

+ 12 - 1
src/store/modules/monthlyReport/edit/index.js

@@ -1010,9 +1010,20 @@ export default {
       // 获取数据
       let baseData = {}
       let { subReportId } = route.query
+      const { pageType } = route.query
       const [tabKey, subTabKey] = state.subTabsActive
       if (!subReportId) {
-        subReportId = state.tabsActive.replace(/tab_/, '')
+        if (pageType !== 'readAll') {
+          subReportId = state.tabsActive.replace(/tab_/, '')
+        }
+        if (pageType === 'readAll') {
+          const tabName = state.tabsActive.replace(/tab_/, '')
+          state.subReportInfo.forEach(elm => {
+            if (elm.reportName === tabName) {
+              subReportId = elm.id
+            }
+          })
+        }
       }
       //
       const tabDataObj = {