Browse Source

添加后台数据管理页面

master
wanghongjun 3 years ago
parent
commit
8737ea6dca
  1. 31
      source/application/admin/controller/pass/Pass.php
  2. 18
      source/application/admin/extra/menus.php
  3. 70
      source/application/admin/view/pass/pass/allIndex.php
  4. 68
      source/application/admin/view/pass/pass/index.php
  5. 62
      source/application/admin/view/pass/pass/realIndex.php

31
source/application/admin/controller/pass/Pass.php

@ -0,0 +1,31 @@
<?php
namespace app\admin\controller\pass;
use app\admin\controller\Controller;
use think\Db;
class Pass extends Controller
{
public function index()
{
return $this->fetch('index', [
'list' => Db::table('bt_passenger_flow')->order('granularity')->select()->toArray()
]);
}
public function allIndex()
{
return $this->fetch('allIndex', [
'list' => Db::table('bt_passenger_flow_all')->select()->toArray()
]);
}
public function realIndex()
{
return $this->fetch('realIndex', [
'list' => Db::table('bt_passenger_flow_real')->select()->toArray()
]);
}
}

18
source/application/admin/extra/menus.php

@ -44,4 +44,22 @@ return [
],
],
],
'statistics' => [
'name' => '数据统计',
'icon' => 'icon-shezhi',
'submenu' => [
[
'name' => '客流统计数据',
'index' => 'pass.pass/index'
],
[
'name' => '总客流统计数据',
'index' => 'pass.pass/allIndex'
],
[
'name' => '客流实时统计数据',
'index' => 'pass.pass/realIndex'
],
],
],
];

70
source/application/admin/view/pass/pass/allIndex.php

@ -0,0 +1,70 @@
<div class="row">
<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
<div class="widget am-cf">
<div class="widget-head am-cf">
<div class="widget-title am-cf">客流统计数据</div>
</div>
<div class="widget-body am-fr">
<div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
<div class="am-form-group">
<div class="am-btn-toolbar">
<div class="am-btn-group am-btn-group-xs">
</div>
</div>
</div>
</div>
<div class="am-u-sm-12">
<table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black ">
<thead>
<tr>
<th>统计组ID</th>
<th>统计组名称</th>
<th>去重前出客量</th>
<th>去重后出客量</th>
<th>去重前进客量</th>
<th>去重后进客量</th>
<th>集客力</th>
<th>创建时间</th>
<th>更新时间</th>
<th>保有量</th>
<th>统计时间</th>
<th>日期</th>
<th>统计日期</th>
</tr>
</thead>
<tbody>
<?php if (!empty($list)): foreach ($list as $item): ?>
<tr>
<td class="am-text-middle">
<p class="item-title"><?= $item['groupId'] ?></p>
</td>
<td class="am-text-middle">
<p class="item-title"><?= $item['groupName'] ?></p>
</td>
<td class="am-text-middle"><?= $item['flowInNum'] ?></td>
<td class="am-text-middle"><?= $item['flowOutNum'] ?></td>
<td class="am-text-middle"><?= $item['noRepeatInNum'] ?></td>
<td class="am-text-middle"><?= $item['noRepeatOutNum'] ?></td>
<td class="am-text-middle"><?= $item['holdValue'] ?></td>
<td class="am-text-middle"><?= $item['createTime'] ?></td>
<td class="am-text-middle"><?= $item['updateTime'] ?></td>
<td class="am-text-middle"><?= $item['netValue'] ?></td>
<td class="am-text-middle"><?= $item['statTime'] ?></td>
<td class="am-text-middle"><?= $item['granularity'] ?></td>
<td class="am-text-middle"><?= $item['date'] ?></td>
</tr>
<?php endforeach; else: ?>
<tr>
<td colspan="4" class="am-text-center">暂无记录</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script>
</script>

68
source/application/admin/view/pass/pass/index.php

@ -0,0 +1,68 @@
<div class="row">
<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
<div class="widget am-cf">
<div class="widget-head am-cf">
<div class="widget-title am-cf">客流统计数据</div>
</div>
<div class="widget-body am-fr">
<div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
<div class="am-form-group">
<div class="am-btn-toolbar">
<div class="am-btn-group am-btn-group-xs">
</div>
</div>
</div>
</div>
<div class="am-u-sm-12">
<table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black ">
<thead>
<tr>
<th>统计组ID</th>
<th>统计组名称</th>
<th>去重前出客量</th>
<th>去重后出客量</th>
<th>去重前进客量</th>
<th>去重后进客量</th>
<th>集客力</th>
<th>创建时间</th>
<th>更新时间</th>
<th>保有量</th>
<th>统计时间</th>
<th>日期</th>
</tr>
</thead>
<tbody>
<?php if (!empty($list)): foreach ($list as $item): ?>
<tr>
<td class="am-text-middle">
<p class="item-title"><?= $item['groupId'] ?></p>
</td>
<td class="am-text-middle">
<p class="item-title"><?= $item['groupName'] ?></p>
</td>
<td class="am-text-middle"><?= $item['flowInNum'] ?></td>
<td class="am-text-middle"><?= $item['flowOutNum'] ?></td>
<td class="am-text-middle"><?= $item['noRepeatInNum'] ?></td>
<td class="am-text-middle"><?= $item['noRepeatOutNum'] ?></td>
<td class="am-text-middle"><?= $item['holdValue'] ?></td>
<td class="am-text-middle"><?= $item['createTime'] ?></td>
<td class="am-text-middle"><?= $item['updateTime'] ?></td>
<td class="am-text-middle"><?= $item['netValue'] ?></td>
<td class="am-text-middle"><?= $item['statTime'] ?></td>
<td class="am-text-middle"><?= $item['granularity'] ?></td>
</tr>
<?php endforeach; else: ?>
<tr>
<td colspan="4" class="am-text-center">暂无记录</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script>
</script>

62
source/application/admin/view/pass/pass/realIndex.php

@ -0,0 +1,62 @@
<div class="row">
<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
<div class="widget am-cf">
<div class="widget-head am-cf">
<div class="widget-title am-cf">客流统计数据</div>
</div>
<div class="widget-body am-fr">
<div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
<div class="am-form-group">
<div class="am-btn-toolbar">
<div class="am-btn-group am-btn-group-xs">
</div>
</div>
</div>
</div>
<div class="am-u-sm-12">
<table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black ">
<thead>
<tr>
<th>统计组ID</th>
<th>区域id</th>
<th>统计组时间</th>
<th>去重后进客流</th>
<th>去重后出客流</th>
<th>总经过人数</th>
<th>保有量</th>
<th>去重前进入人数</th>
<th>去重前离开人数</th>
</tr>
</thead>
<tbody>
<?php if (!empty($list)): foreach ($list as $item): ?>
<tr>
<td class="am-text-middle">
<p class="item-title"><?= $item['groupId'] ?></p>
</td>
<td class="am-text-middle">
<p class="item-title"><?= $item['regionId'] ?></p>
</td>
<td class="am-text-middle"><?= $item['statisticsTime'] ?></td>
<td class="am-text-middle"><?= $item['enter'] ?></td>
<td class="am-text-middle"><?= $item['exit'] ?></td>
<td class="am-text-middle"><?= $item['pass'] ?></td>
<td class="am-text-middle"><?= $item['holdValue'] ?></td>
<td class="am-text-middle"><?= $item['allEnter'] ?></td>
<td class="am-text-middle"><?= $item['allExit'] ?></td>
</tr>
<?php endforeach; else: ?>
<tr>
<td colspan="4" class="am-text-center">暂无记录</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script>
</script>
Loading…
Cancel
Save