|
@@ -6,8 +6,8 @@ use think\App;
|
|
|
use think\facade\Db;
|
|
|
|
|
|
//数据统计类
|
|
|
-//class Data extends Base
|
|
|
-class Data
|
|
|
+class Data extends Base
|
|
|
+
|
|
|
{
|
|
|
//数据看板,获取相关统计数据
|
|
|
public function index()
|
|
@@ -46,20 +46,20 @@ class Data
|
|
|
|
|
|
//5.本月完成率列表(按照完成率排序,前三名的部门、完成单数和完成率,区分今日、本周、本月和毛利率状态:2达标、1最低、0不达标等情况)
|
|
|
$data['month_completion_rate'] = [
|
|
|
- 'today'=>[
|
|
|
- ['company' => 'xxx部', 'completion rate' => '30%', 'type' => '2'],
|
|
|
- ['company' => 'xx部', 'completion rate' => '20%', 'type' => '1'],
|
|
|
- ['company' => 'x部', 'completion rate' => '10%', 'type' => '0'],
|
|
|
+ 'today' => [
|
|
|
+ ['company' => 'xxx部', 'completion' => 10, 'completion_rate' => '30%', 'type' => '2'],
|
|
|
+ ['company' => 'xx部', 'completion' => 10, 'completion_rate' => '20%', 'type' => '1'],
|
|
|
+ ['company' => 'x部', 'completion' => 10, 'completion_rate' => '10%', 'type' => '0'],
|
|
|
],
|
|
|
- 'week'=>[
|
|
|
- ['company' => 'xxx部', 'completion rate' => '30%', 'type' => '2'],
|
|
|
- ['company' => 'xx部', 'completion rate' => '20%', 'type' => '1'],
|
|
|
- ['company' => 'x部', 'completion rate' => '10%', 'type' => '0'],
|
|
|
+ 'week' => [
|
|
|
+ ['company' => 'xxx部', 'completion' => 10, 'completion_rate' => '30%', 'type' => '2'],
|
|
|
+ ['company' => 'xx部', 'completion' => 10, 'completion_rate' => '20%', 'type' => '1'],
|
|
|
+ ['company' => 'x部', 'completion' => 10, 'completion_rate' => '10%', 'type' => '0'],
|
|
|
],
|
|
|
- 'month'=>[
|
|
|
- ['company' => 'xxx部', 'completion rate' => '30%', 'type' => '2'],
|
|
|
- ['company' => 'xx部', 'completion rate' => '20%', 'type' => '1'],
|
|
|
- ['company' => 'x部', 'completion rate' => '10%', 'type' => '0'],
|
|
|
+ 'month' => [
|
|
|
+ ['company' => 'xxx部', 'completion' => 10, 'completion_rate' => '30%', 'type' => '2'],
|
|
|
+ ['company' => 'xx部', 'completion' => 10, 'completion_rate' => '20%', 'type' => '1'],
|
|
|
+ ['company' => 'x部', 'completion' => 10, 'completion_rate' => '10%', 'type' => '0'],
|
|
|
],
|
|
|
];
|
|
|
|