update thống kê
This commit is contained in:
@@ -2,17 +2,42 @@
|
||||
{use class="yii\helpers\Url"}
|
||||
{use class="yii\grid\GridView"}
|
||||
{use class="yii\widgets\Pjax" type="block"}
|
||||
{use class="app\assets\DepartmentAsset"}
|
||||
{DepartmentAsset::register($this)|void}
|
||||
{use class="app\assets\LogsAsset"}
|
||||
{LogsAsset::register($this)|void}
|
||||
{block name='content'}
|
||||
<style>
|
||||
.form-group{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
<div class="logs-index">
|
||||
<div class="" style="font-size: 15px;">
|
||||
<label class="action-button" onclick="common.form(this, '');" data-href="{Url::to(['tree'])}">
|
||||
<i class="fa fa-sitemap fa-1-5x"></i> Cây thư mục
|
||||
</label>
|
||||
<label class="action-button" onclick="_logs(this);" data-href="{Url::to(['logs'])}">
|
||||
<i class="fa fa-file fa-1-5x"></i> Ghi nhận hệ thống
|
||||
</label>
|
||||
<div class="row" style="font-size: 15px;">
|
||||
<div class="col-md-6">
|
||||
<label class="action-button" onclick="_export(this);" data-href="{Url::to(['export'])}">
|
||||
<i class="fa fa-download fa-1-5x"></i> Xuất
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-6" style="padding-top: 5px;">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-4 col-md-push-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">Từ</div>
|
||||
<input type='text' value="{$f|date_format:"%H:%M:%S %d/%m/%Y"}" class="form-control time-picker" name='FromTime' readonly="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-4 col-md-push-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">Đến</div>
|
||||
<input type='text' value="{$t|date_format:"%H:%M:%S %d/%m/%Y"}" class="form-control time-picker" name='ToTime' readonly="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-md-push-2">
|
||||
<button class="btn btn-primary btn-block" onclick="search(this);" data-href='{Url::to(['index'])}'>
|
||||
<i class="fa fa-bar-chart"></i> Thống kê
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{Pjax id="department-list"}
|
||||
{GridView::widget([
|
||||
@@ -23,14 +48,64 @@
|
||||
'class' => 'table table-striped table-bordered table-hover',
|
||||
'style' => 'background:#fff;min-width:700px;'
|
||||
],
|
||||
'rowOptions' => \app\helpers\LogsGrid::rowsColor(),
|
||||
'columns' => [
|
||||
[
|
||||
'class' => 'yii\grid\SerialColumn',
|
||||
'contentOptions' => ['class' => 'text-center'],
|
||||
'headerOptions' => ['class' => 'text-center', 'style' => 'width:3%']
|
||||
],
|
||||
'time',
|
||||
'staff_id'
|
||||
[
|
||||
'attribute' => 'time',
|
||||
'format' => 'raw',
|
||||
'headerOptions' => ['style' => 'width:10%'],
|
||||
'value' => \app\helpers\LogsGrid::time()
|
||||
],
|
||||
[
|
||||
'attribute' => 'staff_id',
|
||||
'contentOptions' => ['class' => 'text-center'],
|
||||
'headerOptions' => ['style' => 'width:5%']
|
||||
],
|
||||
[
|
||||
'attribute' => 'staff_name',
|
||||
'format' => 'raw',
|
||||
'value' => \app\helpers\LogsGrid::name()
|
||||
],
|
||||
[
|
||||
'attribute' => 'staff_department',
|
||||
'filter' => $departmentArray,
|
||||
'format' => 'raw',
|
||||
'value' => \app\helpers\LogsGrid::department($departmentArray)
|
||||
],
|
||||
'card_number',
|
||||
[
|
||||
'attribute' => 'device_id',
|
||||
'format' => 'raw',
|
||||
'filter' => $deviceArray,
|
||||
'headerOptions' => ['style' => 'width:10%'],
|
||||
'value' => \app\helpers\LogsGrid::device($deviceArray)
|
||||
],
|
||||
[
|
||||
'attribute' => 'door_id',
|
||||
'format' => 'raw',
|
||||
'filter' => $deviceArray,
|
||||
'headerOptions' => ['style' => 'width:10%'],
|
||||
'value' => \app\helpers\LogsGrid::door($deviceArray)
|
||||
],
|
||||
[
|
||||
'attribute' => 'in_out_state',
|
||||
'format' => 'raw',
|
||||
'filter' => $stateArray,
|
||||
'headerOptions' => ['style' => 'width:8%'],
|
||||
'contentOptions' => ['class' => 'text-center'],
|
||||
'value' => \app\helpers\LogsGrid::state($stateArray)
|
||||
],
|
||||
[
|
||||
'attribute' => 'event_type',
|
||||
'format' => 'raw',
|
||||
'filter' => $eventTypeArray,
|
||||
'value' => \app\helpers\LogsGrid::eventType($eventTypeArray)
|
||||
]
|
||||
]
|
||||
])}
|
||||
{/Pjax}
|
||||
|
||||
@@ -4,41 +4,42 @@
|
||||
{use class="app\assets\UserAsset"}
|
||||
{UserAsset::register($this)|void}
|
||||
{block name='content'}
|
||||
<div class="text-left">
|
||||
<button class="btn btn-primary" onclick="common.form(this, 'user');" data-href="{Url::to(['create'])}">
|
||||
<i class="fa fa-plus"></i> Thêm mới
|
||||
</button>
|
||||
</div>
|
||||
<br>
|
||||
{GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'filterModel' => $searchModel,
|
||||
'layout'=> \app\helpers\UserGrid::getLayout(),
|
||||
'tableOptions' => [
|
||||
'class' => 'table table-striped table-bordered',
|
||||
'style' => 'background:#fff;min-width:700px;'
|
||||
],
|
||||
'columns' => [
|
||||
['class' => 'yii\grid\SerialColumn'],
|
||||
'username',
|
||||
'first_name',
|
||||
[
|
||||
'attribute' => 'roleName',
|
||||
'format' => 'raw',
|
||||
'value' => \app\helpers\UserGrid::roles()
|
||||
<div class="logs-index">
|
||||
<div class="" style="font-size: 15px;">
|
||||
<label class="action-button" onclick="common.form(this, 'user');" data-href="{Url::to(['create'])}">
|
||||
<i class="fa fa-plus-square fa-1-5x"></i> Thêm
|
||||
</label>
|
||||
</div>
|
||||
{GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'filterModel' => $searchModel,
|
||||
'layout'=> \app\helpers\UserGrid::getLayout(),
|
||||
'tableOptions' => [
|
||||
'class' => 'table table-striped table-bordered',
|
||||
'style' => 'background:#fff;min-width:700px;'
|
||||
],
|
||||
'phone_number',
|
||||
'email',
|
||||
[
|
||||
'template'=> \app\helpers\UserGrid::actionTemplate(),
|
||||
'class' => 'yii\grid\ActionColumn',
|
||||
'contentOptions' => ['class' => 'text-center'],
|
||||
'headerOptions' => ['style' => 'width:10%'],
|
||||
'buttons' => [
|
||||
'update' => \app\helpers\UserGrid::update('user'),
|
||||
'delete' => \app\helpers\UserGrid::delete('Bạn có chắc chắn muốn xóa người dùng này không?')
|
||||
'columns' => [
|
||||
['class' => 'yii\grid\SerialColumn'],
|
||||
'username',
|
||||
'first_name',
|
||||
[
|
||||
'attribute' => 'roleName',
|
||||
'format' => 'raw',
|
||||
'value' => \app\helpers\UserGrid::roles()
|
||||
],
|
||||
'phone_number',
|
||||
'email',
|
||||
[
|
||||
'template'=> \app\helpers\UserGrid::actionTemplate(),
|
||||
'class' => 'yii\grid\ActionColumn',
|
||||
'contentOptions' => ['class' => 'text-center'],
|
||||
'headerOptions' => ['style' => 'width:10%'],
|
||||
'buttons' => [
|
||||
'update' => \app\helpers\UserGrid::update('user'),
|
||||
'delete' => \app\helpers\UserGrid::delete('Bạn có chắc chắn muốn xóa người dùng này không?')
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
])}
|
||||
])}
|
||||
</div>
|
||||
{/block}
|
||||
Reference in New Issue
Block a user