Explorar el Código

项目详情导出

傅行帆 hace 5 años
padre
commit
9d782f8f0e
Se han modificado 2 ficheros con 7 adiciones y 2 borrados
  1. 2
    2
      src/pages/statistical/building/detail.jsx
  2. 5
    0
      src/services/apis.js

+ 2
- 2
src/pages/statistical/building/detail.jsx Ver fichero

@@ -91,7 +91,7 @@ class buildingDetailStats extends React.Component {
91 91
 
92 92
   //导出
93 93
   exportBuildingStats = () => {
94
-    request({ ...apis.stats.buildingExport, params: { startDate: this.state.startDate, endDate: this.state.endDate, buildingId: this.state.buildingId } })
94
+    request({ ...apis.stats.buildingTimeExport, params: { startDate: this.state.startDate, endDate: this.state.endDate, buildingId: this.state.buildingId } })
95 95
       .then(data => {
96 96
         if (!data) {
97 97
           return
@@ -100,7 +100,7 @@ class buildingDetailStats extends React.Component {
100 100
         const link = document.createElement('a')
101 101
         link.style.display = 'none'
102 102
         link.href = url
103
-        link.setAttribute('download', '项目统计.xlsx')
103
+        link.setAttribute('download', '项目详情统计.xlsx')
104 104
         document.body.append(link)
105 105
         link.click()
106 106
       }).catch(() => {

+ 5
- 0
src/services/apis.js Ver fichero

@@ -1607,5 +1607,10 @@ export default {
1607 1607
       url: `${prefix}/stats/timeTableList`,
1608 1608
       action: 'admin.contract.list.get',
1609 1609
     },
1610
+    buildingTimeExport: {
1611
+      method: 'GET',
1612
+      url: `${prefix}/stats/buildingTimeExport`,
1613
+      action: 'admin.contract.list.get',
1614
+    }
1610 1615
   }
1611 1616
 }