Browse Source

处理后台数据统计自定义日期优化

wangcz 7 years ago
parent
commit
f23b59edcb

+ 4 - 1
src/main/webapp/resources/js/admin/controllers/statsDataCtrl.js

@@ -69,6 +69,10 @@ define([ 'app/app' ], function(app) {
             }
             }
         };
         };
 
 
+        $scope.setFiltersAll = function () {
+            initData()
+        }
+
         $scope.condition = [];
         $scope.condition = [];
         var start = {
         var start = {
             open : false
             open : false
@@ -107,7 +111,6 @@ define([ 'app/app' ], function(app) {
                 $scope.endDate = new Date($scope.endDate.getFullYear(), $scope.endDate.getMonth(), $scope.endDate.getDate())
                 $scope.endDate = new Date($scope.endDate.getFullYear(), $scope.endDate.getMonth(), $scope.endDate.getDate())
                 $scope.endDate = new Date($scope.endDate.getTime() + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
                 $scope.endDate = new Date($scope.endDate.getTime() + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
             }
             }
-            initData();
         };
         };
 
 
         $scope.detailOpenClick = function (type) {
         $scope.detailOpenClick = function (type) {

+ 7 - 0
src/main/webapp/resources/view/admin/stats_data.html

@@ -44,6 +44,12 @@
         margin-right: 10px;
         margin-right: 10px;
         cursor:pointer;
         cursor:pointer;
     }
     }
+    #rootStats .screen .sreach .sreach-btn{
+        margin-left:15px;
+        text-decoration:none;
+        cursor:pointer;
+    }
+
     #rootStats .screen .sreach .date{
     #rootStats .screen .sreach .date{
         margin:0 20px;
         margin:0 20px;
     }
     }
@@ -353,6 +359,7 @@
                                    ng-change="onDateCondition(2, endDate)"/>
                                    ng-change="onDateCondition(2, endDate)"/>
                             <button class="open" ng-click="openDatePicker($event, condition, 1)"></button>
                             <button class="open" ng-click="openDatePicker($event, condition, 1)"></button>
                         </div>
                         </div>
+                        <a class="sreach-btn" ng-click="setFiltersAll()">确认</a>
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>