ANG YU пре 5 година
родитељ
комит
3ac85f79d6
2 измењених фајлова са 164 додато и 193 уклоњено
  1. 3 21
      app/Http/Controllers/ControlPanelController.php
  2. 161 172
      resources/views/control/panel.blade.php

+ 3 - 21
app/Http/Controllers/ControlPanelController.php

@@ -32,29 +32,11 @@ class ControlPanelController extends Controller
 
     public function index()
     {
-        /**
-         * @var $orderCountingRecordService  NewOrderCountingRecordService
-         * @var $laborReportsCountingRecordService LaborReportsCountingRecordService
-         */
-        $checkActiveMenuService = app(CheckActiveMenuService::class);
-        $menus = $checkActiveMenuService->activeMenus();
-        $realtimePendingOrdersService = app(RealtimePendingOrdersService::class);
-        $warehousesOrders = $realtimePendingOrdersService->warehousesOrders();
-        $orderCountingRecordService = app(NewOrderCountingRecordService::class);
-        //默认查询一个月的数据
-        $start = (new Carbon())->subMonth()->toDateString();
-        $end = (new Carbon())->toDateString();
         $ownerIds = $this->getCountingOwnerIds(null);
+        $menus = app(CheckActiveMenuService::class)->activeMenus();
         $owners=Owner::query()->whereIn('id',$ownerIds)->get();
-        $unit = '日';
-        $orderCountingRecords = $orderCountingRecordService->orderCountingRecordsFromCache($start, $end, $unit, $ownerIds);
-        $logisticsCountingRecords = $orderCountingRecordService->logisticsCountingRecords($start, $end, $ownerIds);
-        $warehouseCountingRecords = $orderCountingRecordService->warehouseCountingRecords($start, $end, $ownerIds);
-
-        $laborReportsCountingRecordService = app(LaborReportsCountingRecordService::class);
-        $laborReportsCountingRecords = $laborReportsCountingRecordService->get($start, $end, $unit);
-        $laborReportsUserGroupsCount = $laborReportsCountingRecordService->userGroupsCount($start, $end);
-        return view('control.panel', compact('owners','menus', 'warehousesOrders', 'orderCountingRecords', 'logisticsCountingRecords', 'warehouseCountingRecords', 'laborReportsCountingRecords', 'laborReportsUserGroupsCount'));
+        $warehousesOrders = app(RealtimePendingOrdersService::class)->warehousesOrders();
+        return view('control.panel', compact('owners','menus', 'warehousesOrders'));
     }
 
     public function orderCountingRecordsApi(Request $request)

+ 161 - 172
resources/views/control/panel.blade.php

@@ -53,78 +53,76 @@
                 </div>
             </div>
             <div class="row my-3">
-                <div class="col-sm-6 col-lg-6  col-xl-6 col-md-6">
+                <div class="col-6">
                     <div class="card">
                         <div class="card-header">
-                            <div class="block row">
-                                <div>
-                                    <span v-show="orderCountingRecordsDayShow" class="demonstration mt-1">起始日期:</span>
-                                    <el-date-picker
-                                        size="small"
-                                        @blur="orderCountingRecordApi('')"
-                                        v-show="orderCountingRecordsDayShow"
-                                        v-model="orderCountingRecordsStart"
-                                        type="date"
-                                        value-format="yyyy-MM-dd"
-                                        placeholder="选起始日期">
-                                    </el-date-picker>
+                            <div class="row">
+                                <span v-show="orderCountingRecordsDayShow" class="demonstration mt-1">起始日期:</span>
+                                <el-date-picker
+                                    size="small"
+                                    @blur="orderCountingRecordApi('')"
+                                    v-show="orderCountingRecordsDayShow"
+                                    v-model="orderCountingRecordsStart"
+                                    type="date"
+                                    value-format="yyyy-MM-dd"
+                                    placeholder="选起始日期">
+                                </el-date-picker>
 
-                                    <span v-show="orderCountingRecordsDayShow" class="demonstration mt-1">结束日期:</span>
-                                    <el-date-picker
-                                        size="small"
-                                        @blur="orderCountingRecordApi('')"
-                                        v-show="orderCountingRecordsDayShow"
-                                        v-model="orderCountingRecordsEnd"
-                                        type="date"
-                                        value-format="yyyy-MM-dd"
-                                        placeholder="选择结束日期">
-                                    </el-date-picker>
+                                <span v-show="orderCountingRecordsDayShow" class="demonstration mt-1">结束日期:</span>
+                                <el-date-picker
+                                    size="small"
+                                    @blur="orderCountingRecordApi('')"
+                                    v-show="orderCountingRecordsDayShow"
+                                    v-model="orderCountingRecordsEnd"
+                                    type="date"
+                                    value-format="yyyy-MM-dd"
+                                    placeholder="选择结束日期">
+                                </el-date-picker>
 
-                                    <span v-show="orderCountingRecordsMonthShow" class="demonstration mt-1">起始月:</span>
-                                    <el-date-picker
-                                        size="small"
-                                        @blur="orderCountingRecordApi('')"
-                                        v-show="orderCountingRecordsMonthShow"
-                                        v-model="orderCountingRecordsStart"
-                                        type="month"
-                                        value-format="yyyy-MM-dd"
-                                        placeholder="选择起始月">
-                                    </el-date-picker>
+                                <span v-show="orderCountingRecordsMonthShow" class="demonstration mt-1">起始月:</span>
+                                <el-date-picker
+                                    size="small"
+                                    @blur="orderCountingRecordApi('')"
+                                    v-show="orderCountingRecordsMonthShow"
+                                    v-model="orderCountingRecordsStart"
+                                    type="month"
+                                    value-format="yyyy-MM-dd"
+                                    placeholder="选择起始月">
+                                </el-date-picker>
 
-                                    <span v-show="orderCountingRecordsMonthShow" class="demonstration mt-1">结束月:</span>
-                                    <el-date-picker
-                                        size="small"
-                                        @blur="orderCountingRecordApi('')"
-                                        v-show="orderCountingRecordsMonthShow"
-                                        v-model="orderCountingRecordsEnd"
-                                        type="month"
-                                        value-format="yyyy-MM-dd"
-                                        placeholder="选择结束月">
-                                    </el-date-picker>
+                                <span v-show="orderCountingRecordsMonthShow" class="demonstration mt-1">结束月:</span>
+                                <el-date-picker
+                                    size="small"
+                                    @blur="orderCountingRecordApi('')"
+                                    v-show="orderCountingRecordsMonthShow"
+                                    v-model="orderCountingRecordsEnd"
+                                    type="month"
+                                    value-format="yyyy-MM-dd"
+                                    placeholder="选择结束月">
+                                </el-date-picker>
 
-                                    <span v-show="orderCountingRecordsYearShow" class="demonstration mt-1">起始年:</span>
-                                    <el-date-picker
-                                        size="small"
-                                        @blur="orderCountingRecordApi('')"
-                                        v-show="orderCountingRecordsYearShow"
-                                        v-model="orderCountingRecordsStart"
-                                        type="year"
-                                        value-format="yyyy-MM-dd"
-                                        placeholder="选择年">
-                                    </el-date-picker>
+                                <span v-show="orderCountingRecordsYearShow" class="demonstration mt-1">起始年:</span>
+                                <el-date-picker
+                                    size="small"
+                                    @blur="orderCountingRecordApi('')"
+                                    v-show="orderCountingRecordsYearShow"
+                                    v-model="orderCountingRecordsStart"
+                                    type="year"
+                                    value-format="yyyy-MM-dd"
+                                    placeholder="选择年">
+                                </el-date-picker>
 
-                                    <span v-show="orderCountingRecordsYearShow" class="demonstration mt-1">结束年:</span>
-                                    <el-date-picker
-                                        size="small"
-                                        @blur="orderCountingRecordApi('')"
-                                        v-show="orderCountingRecordsYearShow"
-                                        v-model="orderCountingRecordsEnd"
-                                        type="year"
-                                        value-format="yyyy-MM-dd"
-                                        placeholder="选择年">
-                                    </el-date-picker>
-                                </div>
-                                <div class="btn-group btn-group-sm ml-2" role="group" >
+                                <span v-show="orderCountingRecordsYearShow" class="demonstration mt-1">结束年:</span>
+                                <el-date-picker
+                                    size="small"
+                                    @blur="orderCountingRecordApi('')"
+                                    v-show="orderCountingRecordsYearShow"
+                                    v-model="orderCountingRecordsEnd"
+                                    type="year"
+                                    value-format="yyyy-MM-dd"
+                                    placeholder="选择年">
+                                </el-date-picker>
+                                <div class="btn-group btn-group-sm ml-2" role="group">
                                     <el-button type="primary" value="日" @click="orderCountingRecordApi('日')"
                                                class="btn btn-secondary"
                                                v-model="orderCountingRecordsUnit">日
@@ -139,19 +137,18 @@
                                     </el-button>
                                 </div>
                                 <div class="ml-2">
-                                    <el-select  placeholder="请选择对应货主" multiple v-model="selectOrderOwners" size="small"  @change="orderCountingRecordApi('')">
+                                    <el-select placeholder="请选择对应货主" multiple v-model="selectOrderOwners" size="small"
+                                               @change="orderCountingRecordApi('')">
                                         <el-option label="选择所有" value="all"></el-option>
-                                        <el-option v-for="item in owners" :label="item.name" :value="item.id" :key="item.id"></el-option>
+                                        <el-option v-for="item in owners" :label="item.name" :value="item.id"
+                                                   :key="item.id"></el-option>
                                     </el-select>
                                 </div>
                             </div>
                         </div>
-                        <div class="card-body">
-                            <div v-show="orderCountingRecordsShow" id="orderCountingRecords"
-                                 style="width: 100%;height:500px;"></div>
-                        </div>
-                        <div v-show="!orderCountingRecordsShow" class="text-center">
-                            <h3>正在加载...</h3>
+                        <div class="card-body row">
+                            <div id="orderCountingRecords" class="col-12"
+                                 style="min-height: 500px"></div>
                         </div>
                     </div>
                 </div>
@@ -181,11 +178,8 @@
                             </div>
                         </div>
                         <div class="card-body row">
-                            <div v-show="logisticsCountingRecordsShow" id="logisticsCountingRecords" class="col"
-                                 style="width: 100%;height:500px;"></div>
-                            <div v-show="!logisticsCountingRecordsShow" class="text-center">
-                                <h3>正在加载...</h3>
-                            </div>
+                            <div id="logisticsCountingRecords" class="col-12"
+                                 style="min-height:500px;"></div>
                         </div>
                     </div>
                 </div>
@@ -211,11 +205,9 @@
                             </div>
                         </div>
                         <div class="card-body row">
-                            <div v-show="warehouseCountingRecordsShow" id="warehouseCountingRecords" class="col"
-                                 style="width: 100%;height:500px;"></div>
-                            <div v-show="!warehouseCountingRecordsShow">
-                                <h3>正在加载...</h3>
-                            </div>
+                            <div  id="warehouseCountingRecords" class="col-12"
+                                 style=min-height:500px;"></div>
+
                         </div>
                     </div>
                 </div>
@@ -227,7 +219,8 @@
                             <div class="card-header">
                                 <div class="block row">
                                     <span class="demonstration"></span>
-                                    <span v-show="laborReportsCountingRecordsDayShow" class="demonstration mt-1">起始日期:</span>
+                                    <span v-show="laborReportsCountingRecordsDayShow"
+                                          class="demonstration mt-1">起始日期:</span>
                                     <el-date-picker
                                         size="small"
                                         @blur="laborReportsCountingRecordApi('')"
@@ -237,7 +230,8 @@
                                         value-format="yyyy-MM-dd"
                                         placeholder="选起始日期">
                                     </el-date-picker>
-                                    <span v-show="laborReportsCountingRecordsDayShow" class="demonstration mt-1">结束日期:</span>
+                                    <span v-show="laborReportsCountingRecordsDayShow"
+                                          class="demonstration mt-1">结束日期:</span>
                                     <el-date-picker
                                         size="small"
                                         @blur="laborReportsCountingRecordApi('')"
@@ -247,7 +241,8 @@
                                         value-format="yyyy-MM-dd"
                                         placeholder="选择结束日期">
                                     </el-date-picker>
-                                    <span v-show="laborReportsCountingRecordsMonthShow" class="demonstration mt-1">起始月:</span>
+                                    <span v-show="laborReportsCountingRecordsMonthShow"
+                                          class="demonstration mt-1">起始月:</span>
                                     <el-date-picker
                                         size="small"
                                         @blur="laborReportsCountingRecordApi('')"
@@ -258,7 +253,8 @@
                                         placeholder="选择起始月">
                                     </el-date-picker>
 
-                                    <span v-show="laborReportsCountingRecordsMonthShow" class="demonstration mt-1">结束月:</span>
+                                    <span v-show="laborReportsCountingRecordsMonthShow"
+                                          class="demonstration mt-1">结束月:</span>
                                     <el-date-picker
                                         size="small"
                                         @blur="laborReportsCountingRecordApi('')"
@@ -269,7 +265,8 @@
                                         placeholder="选择结束月">
                                     </el-date-picker>
 
-                                    <span v-show="laborReportsCountingRecordsYearShow" class="demonstration mt-1">起始年:</span>
+                                    <span v-show="laborReportsCountingRecordsYearShow"
+                                          class="demonstration mt-1">起始年:</span>
                                     <el-date-picker
                                         size="small"
                                         @blur="laborReportsCountingRecordApi('')"
@@ -280,7 +277,8 @@
                                         placeholder="选择年">
                                     </el-date-picker>
 
-                                    <span v-show="laborReportsCountingRecordsYearShow" class="demonstration mt-1">结束年:</span>
+                                    <span v-show="laborReportsCountingRecordsYearShow"
+                                          class="demonstration mt-1">结束年:</span>
                                     <el-date-picker
                                         size="small"
                                         @blur="laborReportsCountingRecordApi('')"
@@ -307,12 +305,9 @@
                                 </div>
                             </div>
                             <div class="card-body row">
-                                <div v-show="laborReportsCountingRecordsShow" id="laborReportsCountingRecords"
-                                     class="col"
-                                     style="width: 100%;height:500px;"></div>
-                                <div v-show="!laborReportsCountingRecordsShow">
-                                    <h3>正在加载...</h3>
-                                </div>
+                                <div id="laborReportsCountingRecords"
+                                     class="col-12"
+                                     style="min-height:500px;"></div>
                             </div>
                         </div>
                     </div>
@@ -335,12 +330,9 @@
                                 </el-date-picker>
                             </div>
                             <div class="card-body row">
-                                <div v-show="laborReportsUserGroupsCountShow" id="laborReportsUserGroupsCount"
-                                     class="col"
-                                     style="width: 100%;height:500px;"></div>
-                                <div v-show="!laborReportsUserGroupsCountShow">
-                                    <h3>正在加载...</h3>
-                                </div>
+                                <div  id="laborReportsUserGroupsCount"
+                                     class="col-12"
+                                     style="min-height:500px;"></div>
                             </div>
                         </div>
                     </div>
@@ -351,11 +343,15 @@
                     <div class="card">
                         <div class="card-header">
                             <div class="row">
-                                <el-date-picker size="small" class="col-6 date" @blur="loadWeightInfo()" type="daterange" align="right"
-                                                v-model="searchOption.weightDate" unlink-panels range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd">
+                                <el-date-picker size="small" class="col-6 date" @blur="loadWeightInfo()"
+                                                type="daterange" align="right"
+                                                v-model="searchOption.weightDate" unlink-panels range-separator="-"
+                                                start-placeholder="开始日期" end-placeholder="结束日期"
+                                                value-format="yyyy-MM-dd">
                                 </el-date-picker>
                                 <label class="col-3 offset-3">
-                                    <select class="form-control rounded" v-model="searchOption.weightSelect" @change="switchWeightDate()">
+                                    <select class="form-control rounded" v-model="searchOption.weightSelect"
+                                            @change="switchWeightDate()">
                                         <option v-for="(date,i) in dateOptions" :value="i">@{{ date.text }}</option>
                                     </select>
                                 </label>
@@ -372,8 +368,6 @@
 @endsection
 @section('lastScript')
     <script src="{{ mix('js/echarts.js') }}"></script>
-    <!-- 引入样式 -->
-    <!-- 引入组件库 -->
     <script src="{{ mix('js/element-ui.js') }}"></script>
     <script>
         let vue = new Vue({
@@ -382,15 +376,18 @@
                 myChart: null,
                 menus:{!! $menus !!},
                 owners:{!! $owners !!},
-                selectOrderOwners:[],
-                selectLogisticsOwners:[],
+                selectOrderOwners: [],
+                selectLogisticsOwners: [],
                 warehousesOrders:{!! $warehousesOrders !!},
-                orderCountingRecords:{!! $orderCountingRecords !!},
-                logisticsCountingRecords:{!! $logisticsCountingRecords !!},
-                warehouseCountingRecords:{!! $warehouseCountingRecords !!},
-                laborReportsCountingRecords:{!! $laborReportsCountingRecords !!},
-                laborReportsUserGroupsCount:{!! $laborReportsUserGroupsCount !!},
-                warehouses: {},
+                orderCountingRecords:{},
+                logisticsCountingRecords:{},
+                warehouseCountingRecords:{},
+                laborReportsCountingRecords:{},
+                laborReportsUserGroupsCount:{},
+                warehouses: {
+                    "WH01": '松江一仓',
+                    "WH02": '松江二仓',
+                    "WH03": '嘉定一仓',},
                 totalOrders: {
                     total: null,
                     createOrder: null,
@@ -450,11 +447,6 @@
                     moment(new Date()).format('yyyy-MM-DD')],
                 orderCountingRecordsUnit: '日',
                 laborReportsCountingRecordUnit: '日',
-                orderCountingRecordsShow: true,
-                logisticsCountingRecordsShow: true,
-                warehouseCountingRecordsShow: true,
-                laborReportsCountingRecordsShow: true,
-                laborReportsUserGroupsCountShow: true,
                 orderCountingRecordsDayShow: true,
                 orderCountingRecordsMonthShow: false,
                 orderCountingRecordsYearShow: false,
@@ -469,7 +461,6 @@
                     start_year: moment().subtract('12', 'month').format('yyyy-MM-DD'),
                     end_year: moment(new Date()).format('yyyy-MM-DD'),
                 },
-
                 laborReportsUnit: '日',
                 laborReportsData: {
                     start_day: moment().subtract('1', 'month').format('yyyy-MM-DD'),
@@ -509,17 +500,12 @@
                         this.selectLogisticsOwners.splice(val.indexOf('all'),1)
                 }
             },
-            mounted: function () {
+            mounted() {
+                $('#list').removeClass('d-none');
                 let index = 4;
                 this.searchOption.weightSelect = index;
-                this.searchOption.weightDate = [this.dateOptions[index].start,this.dateOptions[index].end];
-                $('#list').removeClass('d-none');
+                this.searchOption.weightDate = [this.dateOptions[index].start, this.dateOptions[index].end];
                 let _this = this;
-                this.warehouses = {
-                    "WH01": '松江一仓',
-                    "WH02": '松江二仓',
-                    "WH03": '嘉定一仓',
-                }
                 this.warehousesOrders.forEach(function (item) {
                     _this.totalOrders.total += parseInt(item.total);
                     _this.totalOrders.createOrder += item.createOrder;
@@ -528,24 +514,27 @@
                     _this.totalOrders.partPacking += item.partPacking;
                     _this.totalOrders.sowComplete += item.sowComplete;
                 });
-                if (this.orderCountingRecords[0]!=null) {
-                    this.initOrderCountingRecords();
-                    this.orderCountingRecordsChart = echarts.init(document.getElementById('orderCountingRecords'));
-                    this.initOrderCountingRecordsChart();
-                }
-
+                //订单量趋势
+                this.orderCountingRecordsChart = echarts.init(document.getElementById('orderCountingRecords'));
+                this.initOrderCountingRecordsChart();
+                this.orderCountingRecordApi('日');
+                //订单快递分布
                 this.logisticsCountingRecordsChart = echarts.init(document.getElementById('logisticsCountingRecords'));
                 this.initLogisticsCountingRecordsChart();
-
+                this.logisticsCountingRecordsApi();
+                //订单仓库分布
                 this.warehouseCountingRecordsChart = echarts.init(document.getElementById('warehouseCountingRecords'));
                 this.initWarehouseCountingRecordsChart();
+                this.warehouseCountingRecordsApi();
+
                 @can('人事管理-临时工报表-可见全部组')
-                this.initLaborReportsCountingRecords();
                 this.laborReportsCountingRecordsChart = echarts.init(document.getElementById('laborReportsCountingRecords'));
                 this.initLaborReportsCountingRecordsChart();
+                this.laborReportsCountingRecordApi('日');
 
                 this.laborReportsUserGroupsCountChart = echarts.init(document.getElementById('laborReportsUserGroupsCount'));
                 this.initLaborReportsUserGroupsCountChart();
+                this.laborReportsUserGroupsCountApi();
 
                 this.cardPool.weight = echarts.init(document.getElementById("weight"));
                 this.loadWeightInfo();
@@ -622,9 +611,10 @@
                     }
                 },
                 initOrderCountingRecordsChart(text) {
-                    if (text==null ||text==''||text==undefined) text='默认显示权限下所有货主订单数量';
+                    this.orderCountingRecordsChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
+                    if (text == null || text == '' || text == undefined) text = '默认显示权限下所有货主订单数量';
                     this.orderCountingRecordsChart.setOption({
-                        title: {text: '订单量趋势',subtext: text,},
+                        title: {text: '订单量趋势', subtext: text,},
                         tooltip: {},
                         legend: {data: ['订单数']},
                         xAxis: {
@@ -640,6 +630,7 @@
                     });
                 },
                 initLaborReportsCountingRecordsChart() {
+                    this.laborReportsCountingRecordsChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
                     this.laborReportsCountingRecordsChart.setOption({
                         title: {text: '临时用工趋势'},
                         tooltip: {},
@@ -657,11 +648,12 @@
                     });
                 },
                 initLogisticsCountingRecordsChart(text) {
-                    if (text==null ||text==''||text==undefined) text='默认显示权限下所有货主快递分布';
+                    this.logisticsCountingRecordsChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
+                    if (text == null || text == '' || text == undefined) text = '默认显示权限下所有货主快递分布';
                     this.logisticsCountingRecordsChart.setOption({
                         title: {
                             text: '快递分布',
-                            subtext:text,
+                            subtext: text,
                             left: 'left'
                         },
                         tooltip: {
@@ -687,6 +679,7 @@
                     });
                 },
                 initWarehouseCountingRecordsChart() {
+                    this.warehouseCountingRecordsChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
                     this.warehouseCountingRecordsChart.setOption({
                         title: {
                             text: '仓库分布',
@@ -715,6 +708,7 @@
                     });
                 },
                 initLaborReportsUserGroupsCountChart() {
+                    this.laborReportsUserGroupsCountChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
                     this.laborReportsUserGroupsCountChart.setOption({
                         title: {
                             text: '小组临时工分布',
@@ -751,6 +745,7 @@
                 },
 
                 orderCountingRecordApi(orderCountingRecordsUnit) {
+                    this.orderCountingRecordsChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
                     if (orderCountingRecordsUnit === '') {
                         orderCountingRecordsUnit = this.orderCountingRecordsUnit;
                     }
@@ -774,49 +769,43 @@
                             break;
                     }
                     this.orderCountingRecordsUnit = orderCountingRecordsUnit;
-                    // let formData = new FormData();
-                    // formData.append('start', this.orderCountingRecordsStart);
-                    // formData.append('end', this.orderCountingRecordsEnd);
-                    // formData.append('unit', orderCountingRecordsUnit);
-                    // formData.append('owner_ids',this.selectOwners);
-                    this.orderCountingRecordsShow = false;
                     let _this = this;
                     let text = null;
-                    axios.post('{{url('apiLocal/control/panel/menu/orderCountingRecordApi')}}',{
-                        'start':this.orderCountingRecordsStart,'end':this.orderCountingRecordsEnd,
-                        'unit':orderCountingRecordsUnit,'owner_ids':this.selectOrderOwners}).then(function (res) {
+                    axios.post('{{url('apiLocal/control/panel/menu/orderCountingRecordApi')}}', {
+                        'start': this.orderCountingRecordsStart, 'end': this.orderCountingRecordsEnd,
+                        'unit': orderCountingRecordsUnit, 'owner_ids': this.selectOrderOwners
+                    }).then(function (res) {
                         if (res.status === 200) {
                             _this.orderCountingRecords = res.data.orderCountingRecords;
                             _this.orderCountingRecordsDateTarget = [];
                             _this.orderCountingRecordsData = [];
                             _this.initOrderCountingRecords();
-                            if (_this.selectOrderOwners.length>0) text='当前选中货主订单数量';
+                            if (_this.selectOrderOwners.length > 0) text = '当前选中货主订单数量';
                             _this.initOrderCountingRecordsChart(text);
-                            _this.orderCountingRecordsShow = true;
+                            _this.orderCountingRecordsChart.hideLoading();
                         }
                     });
                 },
                 logisticsCountingRecordsApi() {
+                    this.logisticsCountingRecordsChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
                     let text = null;
-                    this.logisticsCountingRecordsShow = false;
-                    // let formData = new FormData();
-                    // formData.append('start', this.logisticsCountingRecordsData[0]);
-                    // formData.append('end', this.logisticsCountingRecordsData[1]);
                     let _this = this;
-                    axios.post('{{url('apiLocal/control/panel/menu/logisticsCountingRecordsApi')}}',{
-                        'start':this.logisticsCountingRecordsData[0],'end':this.logisticsCountingRecordsData[1],'owner_ids':this.selectLogisticsOwners
+                    axios.post('{{url('apiLocal/control/panel/menu/logisticsCountingRecordsApi')}}', {
+                        'start': this.logisticsCountingRecordsData[0],
+                        'end': this.logisticsCountingRecordsData[1],
+                        'owner_ids': this.selectLogisticsOwners
                     }).then(function (res) {
                         if (res.status === 200) {
                             _this.logisticsCountingRecords = res.data.logisticsCountingRecords;
-                            if (_this.selectLogisticsOwners.length>0) text='当前选中货主快递分布';
+                            if (_this.selectLogisticsOwners.length > 0) text = '当前选中货主快递分布';
                             _this.initLogisticsCountingRecordsChart(text);
-                            _this.logisticsCountingRecordsShow = true;
+                            _this.logisticsCountingRecordsChart.hideLoading();
                         }
                     });
                 },
 
                 warehouseCountingRecordsApi() {
-                    this.warehouseCountingRecordsShow = false;
+                    this.warehouseCountingRecordsChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
                     let formData = new FormData();
                     formData.append('start', this.warehouseCountingRecordsData[0]);
                     formData.append('end', this.warehouseCountingRecordsData[1]);
@@ -825,14 +814,14 @@
                         if (res.status === 200) {
                             _this.warehouseCountingRecords = res.data.warehouseCountingRecords;
                             _this.initWarehouseCountingRecordsChart();
-                            _this.warehouseCountingRecordsShow = true;
+                            _this.warehouseCountingRecordsChart.hideLoading();
 
                         }
                     });
                 },
 
                 laborReportsCountingRecordApi(laborReportsCountingRecordUnit) {
-                    this.laborReportsCountingRecordsShow = false;
+                    this.laborReportsCountingRecordsChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
                     if (laborReportsCountingRecordUnit === '') {
                         laborReportsCountingRecordUnit = this.laborReportsCountingRecordUnit;
                     }
@@ -869,12 +858,12 @@
                             _this.laborReportsCountingRecordsData = [];
                             _this.initLaborReportsCountingRecords();
                             _this.initLaborReportsCountingRecordsChart();
-                            _this.laborReportsCountingRecordsShow = true;
+                            _this.laborReportsCountingRecordsChart.hideLoading();
                         }
                     });
                 },
                 laborReportsUserGroupsCountApi() {
-                    this.laborReportsUserGroupsCountShow = false;
+                    this.laborReportsUserGroupsCountChart.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
                     let formData = new FormData();
                     formData.append('start', this.laborReportsUserGroupsCountDate[0]);
                     formData.append('end', this.laborReportsUserGroupsCountDate[1]);
@@ -883,7 +872,7 @@
                         if (res.status === 200) {
                             _this.laborReportsUserGroupsCount = res.data.laborReportsUserGroupsCount;
                             _this.initLaborReportsUserGroupsCountChart();
-                            _this.laborReportsUserGroupsCountShow = true;
+                            _this.laborReportsUserGroupsCountChart.hideLoading();
                         }
                     });
                 },
@@ -919,7 +908,7 @@
                         tooltip: {
                             trigger: 'item',
                             formatter: function (params) {
-                                return params.data.date+"<br>"+"总量:<span class='text-success font-weight-bold'>"+params.data.total+"</span><br>"+"已称:<span class='text-info font-weight-bold'>"+params.data.count+"</span>";
+                                return params.data.date + "<br>" + "总量:<span class='text-success font-weight-bold'>" + params.data.total + "</span><br>" + "已称:<span class='text-info font-weight-bold'>" + params.data.count + "</span>";
                             }
                         }, xAxis: {
                             data: title
@@ -929,17 +918,17 @@
                                 interval: 'auto',
                                 formatter: '{value} %'
                             },
-                            max:100
-                        }, label:{
-                            show:true,
+                            max: 100
+                        }, label: {
+                            show: true,
                             position: 'top',
                             formatter: '{c}%',
-                            color:"red"
+                            color: "red"
                         }, series: [{
                             type: "bar",
                             data: data,
-                            itemStyle:{
-                                color:"RGB(62,157,231)",
+                            itemStyle: {
+                                color: "RGB(62,157,231)",
                             }
                         }]
                     };