408249787 2 years ago
parent
commit
1b2fb073ca

+ 2 - 2
src/views/statisticView/DayStatistics.vue

@@ -16,7 +16,7 @@
             </a-date-picker>
             {{ BaseTool.Date.formatter(time,BaseTool.Date.PICKER_NORM_DATE_PATTERN) }}
           </div>
-<!--          <div class="dateStatistics" style="float:left">
+          <!--          <div class="dateStatistics" style="float:left">
             <a-button type="primary" @click="doExport()">导出</a-button>
           </div>-->
         </div>
@@ -86,7 +86,7 @@ export default {
         this.total = res.data.reduce((pre, list, index) => {
           pre = list.lines.map((item, i) => {
             const newItem = {
-              positive: item.positive + (index === 0 ? 0 : pre[i].positive)
+              positive: (item.positive ? item.positive : 0) + (index === 0 ? 0 : pre[i].positive)
             }
             return newItem
           })

+ 2 - 2
src/views/statisticView/MonthStatistics.vue

@@ -13,7 +13,7 @@
             </a-month-picker>
             {{ BaseTool.Date.formatter(time,BaseTool.Date.PICKER_NORM_YEAR_MONTH) }}
           </div>
-<!--          <div class="dateStatistics" style="float:left">
+          <!--          <div class="dateStatistics" style="float:left">
             <a-button type="primary" @click="doExport()">导出</a-button>
           </div>-->
         </div>
@@ -81,7 +81,7 @@ export default {
         this.total = res.data.reduce((pre, list, index) => {
           pre = list.lines.map((item, i) => {
             const newItem = {
-              positive: item.positive + (index === 0 ? 0 : pre[i].positive)
+              positive: (item.positive ? item.positive : 0) + (index === 0 ? 0 : pre[i].positive)
             }
             return newItem
           })