Compare commits
4 Commits
dev_DTD_ol
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 575bd6ce75 | |||
| 6c7ecf7f26 | |||
| cb889f1084 | |||
| b29904a2b5 |
@@ -3,6 +3,5 @@
|
|||||||
return [
|
return [
|
||||||
'adminEmail' => 'admin@example.com',
|
'adminEmail' => 'admin@example.com',
|
||||||
"maxLogs" => 100000,
|
"maxLogs" => 100000,
|
||||||
"maxPicture" => 5,
|
"maxPicture" => 2
|
||||||
"version" => "1.0.7"
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ class ApiController extends Controller {
|
|||||||
"Staff" => $post["id"],
|
"Staff" => $post["id"],
|
||||||
"Time" => $time,
|
"Time" => $time,
|
||||||
"Image" => $fileName,
|
"Image" => $fileName,
|
||||||
"Confidence" => json_encode($post["confidence"])
|
"Confidence" => strval($post["confidence"])
|
||||||
]);
|
]);
|
||||||
$server_ip = \app\models\SyncUrl::findOne(['key_config' => 'server_api']);
|
$server_ip = \app\models\SyncUrl::findOne(['key_config' => 'server_api']);
|
||||||
$ip = "https://dev-dc.beetai.com";
|
$ip = "https://dev-dc.beetai.com";
|
||||||
@@ -124,30 +124,17 @@ class ApiController extends Controller {
|
|||||||
$allFeatures = [];
|
$allFeatures = [];
|
||||||
foreach ($listManagement as $key => $value) {
|
foreach ($listManagement as $key => $value) {
|
||||||
$features = json_decode($value->image, true);
|
$features = json_decode($value->image, true);
|
||||||
// $f = [];
|
$f = [];
|
||||||
// foreach ($features as $k => $v) {
|
|
||||||
// $f[] = $v['features'];
|
|
||||||
// if (isset($v['features512']))
|
|
||||||
// if (count($v['features512']))
|
|
||||||
// $f[] = $v['features512'];
|
|
||||||
// }
|
|
||||||
// $allFeatures[] = [
|
|
||||||
// "id" => $value->id,
|
|
||||||
// "name" => $this->convert_vi_to_en($value->name),
|
|
||||||
// "features" => $f
|
|
||||||
// ];
|
|
||||||
$feature1 = $feature2 = [];
|
|
||||||
foreach ($features as $k => $v) {
|
foreach ($features as $k => $v) {
|
||||||
$feature1[] = $v['features'];
|
$f[] = $v['features'];
|
||||||
if (isset($v['features512']))
|
if (isset($v['features512']))
|
||||||
if (count($v['features512']))
|
if (count($v['features512']))
|
||||||
$feature2[] = $v['features512'];
|
$f[] = $v['features512'];
|
||||||
}
|
}
|
||||||
$allFeatures[] = [
|
$allFeatures[] = [
|
||||||
"id" => $value->id,
|
"id" => $value->id,
|
||||||
"name" => $this->convert_vi_to_en($value->name),
|
"name" => $this->convert_vi_to_en($value->name),
|
||||||
"feature1" => $feature1,
|
"features" => $f
|
||||||
"feature2" => $feature2
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
Yii::$app->response->format = "json";
|
Yii::$app->response->format = "json";
|
||||||
@@ -248,8 +235,6 @@ class ApiController extends Controller {
|
|||||||
|
|
||||||
public function actionAutoGenFeature() {
|
public function actionAutoGenFeature() {
|
||||||
Yii::$app->response->format = "json";
|
Yii::$app->response->format = "json";
|
||||||
if (!$this->check512())
|
|
||||||
return ["status" => false];
|
|
||||||
$updating = \app\models\SyncUrl::findOne(['key_config' => 'updating']);
|
$updating = \app\models\SyncUrl::findOne(['key_config' => 'updating']);
|
||||||
if (!$updating) {
|
if (!$updating) {
|
||||||
$model = new \app\models\SyncUrl();
|
$model = new \app\models\SyncUrl();
|
||||||
@@ -259,21 +244,13 @@ class ApiController extends Controller {
|
|||||||
]);
|
]);
|
||||||
$updating = \app\models\SyncUrl::findOne(['key_config' => 'updating']);
|
$updating = \app\models\SyncUrl::findOne(['key_config' => 'updating']);
|
||||||
}
|
}
|
||||||
$currentCache = json_decode(file_get_contents("http://localhost:2305/current-cache"), true);
|
|
||||||
if ($updating->data === "true") {
|
if ($updating->data === "true") {
|
||||||
if ($currentCache['n_128'] == $currentCache['n_512']) {
|
$txt = "\n" . date("H:i:s d/m/Y") . " " . "updating";
|
||||||
$updating->data = "false";
|
file_put_contents(date('Ymd') . "_logs.txt", $txt, FILE_APPEND);
|
||||||
$updating->save();
|
return ["status" => false];
|
||||||
$txt = "\n" . date("H:i:s d/m/Y") . " " . "success";
|
|
||||||
file_put_contents(date('Ymd') . "_logs.txt", $txt, FILE_APPEND);
|
|
||||||
return ["status" => false];
|
|
||||||
} else {
|
|
||||||
$txt = "\n" . date("H:i:s d/m/Y") . " " . "updating";
|
|
||||||
file_put_contents(date('Ymd') . "_logs.txt", $txt, FILE_APPEND);
|
|
||||||
return ["status" => false];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$currentCache = json_decode(file_get_contents("http://localhost:2305/current-cache"), true);
|
||||||
if ($currentCache['n_128'] == $currentCache['n_512']) {
|
if ($currentCache['n_128'] == $currentCache['n_512']) {
|
||||||
$txt = "\n" . date("H:i:s d/m/Y") . " " . "success";
|
$txt = "\n" . date("H:i:s d/m/Y") . " " . "success";
|
||||||
file_put_contents(date('Ymd') . "_logs.txt", $txt, FILE_APPEND);
|
file_put_contents(date('Ymd') . "_logs.txt", $txt, FILE_APPEND);
|
||||||
@@ -415,66 +392,31 @@ class ApiController extends Controller {
|
|||||||
'data' => $post['token']
|
'data' => $post['token']
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
$version = \app\models\SyncUrl::findOne(['key_config' => 'version']);
|
|
||||||
if ($version) {
|
|
||||||
$version->data = $post['version'];
|
|
||||||
$version->save();
|
|
||||||
} else {
|
|
||||||
$model = new \app\models\SyncUrl();
|
|
||||||
$model->create([
|
|
||||||
'key_config' => "version",
|
|
||||||
'data' => $post['version']
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
Yii::$app->response->format = "json";
|
Yii::$app->response->format = "json";
|
||||||
return ["status" => true];
|
return ["status" => true];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function check512() {
|
|
||||||
$tempConfig = json_decode(file_get_contents("http://localhost:4004/ReadEngineConfig", false, stream_context_create([
|
|
||||||
'http' => [
|
|
||||||
'header' => "Content-Type: application/json",
|
|
||||||
'method' => "POST"
|
|
||||||
]
|
|
||||||
])), true);
|
|
||||||
if (!$tempConfig['status'])
|
|
||||||
return false;
|
|
||||||
|
|
||||||
$engineConfig = json_decode($tempConfig['data'], true);
|
|
||||||
if (count($engineConfig['data']['engines']) == 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
$checkConfig = json_decode(file_get_contents("http://localhost:4004/ReadConfig", false, stream_context_create([
|
|
||||||
'http' => [
|
|
||||||
'header' => "Content-Type: application/json",
|
|
||||||
'method' => "POST",
|
|
||||||
'content' => json_encode([
|
|
||||||
'path' => $engineConfig['data']['engines'][0]['path']
|
|
||||||
])
|
|
||||||
]
|
|
||||||
])), true);
|
|
||||||
|
|
||||||
if (!$checkConfig['status'])
|
|
||||||
return false;
|
|
||||||
|
|
||||||
$config_json = "";
|
|
||||||
if ($checkConfig['status']) {
|
|
||||||
$config_json = json_decode($checkConfig['data'], true);
|
|
||||||
$check512 = $config_json['feature']['type2']['enable'];
|
|
||||||
if ($check512 !== "0")
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function actionTest() {
|
public function actionTest() {
|
||||||
// $updating = \app\models\SyncUrl::findOne(['key_config' => 'token']);
|
$check = \app\models\SyncUrl::findOne(['key_config' => 'updating']);
|
||||||
$updating = \app\models\SyncUrl::find()->all();
|
$check->data = "false";
|
||||||
foreach ($updating as $key => $value) {
|
$check->save();
|
||||||
echo $value->key_config . " " . $value->data . "<br>";
|
return var_dump($check);
|
||||||
|
// file_get_contents("http://localhost:2305/update-feature");
|
||||||
|
// return;
|
||||||
|
set_time_limit(0);
|
||||||
|
$lists = ListManagement::find()->all();
|
||||||
|
foreach ($lists as $key => $value) {
|
||||||
|
$extract = false;
|
||||||
|
$images = json_decode($value->image, true);
|
||||||
|
$newImgs = [];
|
||||||
|
foreach ($images as $k => $v) {
|
||||||
|
$v['features512'] = [];
|
||||||
|
$newImgs[] = $v;
|
||||||
|
}
|
||||||
|
$value->image = json_encode($newImgs);
|
||||||
|
$value->save();
|
||||||
}
|
}
|
||||||
exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function actionReGenFeature() {
|
public function actionReGenFeature() {
|
||||||
@@ -486,15 +428,7 @@ class ApiController extends Controller {
|
|||||||
'data' => "false"
|
'data' => "false"
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
if ($this->check512()) {
|
$updating->data = "false";
|
||||||
$currentCache = json_decode(file_get_contents("http://localhost:2305/current-cache"), true);
|
|
||||||
if ($currentCache['n_128'] == $currentCache['n_512']) {
|
|
||||||
$updating->data = "true";
|
|
||||||
} else {
|
|
||||||
$updating->data = "false";
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
$updating->data = "false";
|
|
||||||
$updating->save();
|
$updating->save();
|
||||||
}
|
}
|
||||||
Yii::$app->response->format = "json";
|
Yii::$app->response->format = "json";
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ class ConfigController extends Controller {
|
|||||||
try {
|
try {
|
||||||
file_get_contents("http://localhost:2305/update-feature");
|
file_get_contents("http://localhost:2305/update-feature");
|
||||||
} catch (\Exception $exc) {
|
} catch (\Exception $exc) {
|
||||||
|
// echo $exc->getTraceAsString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Url::to(['/config']);
|
return Url::to(['/config']);
|
||||||
|
|||||||
@@ -578,8 +578,7 @@ class ListManagementController extends Controller {
|
|||||||
])), true);
|
])), true);
|
||||||
foreach ($results as $key => $value) {
|
foreach ($results as $key => $value) {
|
||||||
$images = [];
|
$images = [];
|
||||||
$imagesReverse = array_reverse($value['images']);
|
foreach ($value['images'] as $k => $v) {
|
||||||
foreach ($imagesReverse as $k => $v) {
|
|
||||||
if ($k < Yii::$app->params['maxPicture']) {
|
if ($k < Yii::$app->params['maxPicture']) {
|
||||||
$key = common::generateRandomString();
|
$key = common::generateRandomString();
|
||||||
$RootFolder = Yii::getAlias('@webroot') . "/data/uploads";
|
$RootFolder = Yii::getAlias('@webroot') . "/data/uploads";
|
||||||
|
|||||||
@@ -63,62 +63,11 @@ class CaptureLogsGrid {
|
|||||||
|
|
||||||
public static function confidence() {
|
public static function confidence() {
|
||||||
return function($model) {
|
return function($model) {
|
||||||
$confidence = json_decode($model->confidence, true);
|
return number_format($model->confidence, 2);
|
||||||
// $person1_html = $person2_html = "";
|
|
||||||
// $person1 = \app\models\ListManagement::findOne($confidence['id1']);
|
|
||||||
// if ($person1) {
|
|
||||||
// $images = json_decode($person1->image, true);
|
|
||||||
// $person1_html = "<div class='feature-img'>" . Html::img("/data/uploads/face/" . $images[0]['url'], [
|
|
||||||
// "class" => "img-thumbnail",
|
|
||||||
// "style" => "width: 100px;height:100px;"
|
|
||||||
// ]) . "<br>" . $person1->name . " [" . $confidence['percent1'] . "]" . "</div>";
|
|
||||||
// }
|
|
||||||
// if ($confidence['id2'] !== "0" && $confidence['id2'] != $confidence['id1']) {
|
|
||||||
// $person2 = \app\models\ListManagement::findOne($confidence['id2']);
|
|
||||||
// if ($person2) {
|
|
||||||
// $images = json_decode($person2->image, true);
|
|
||||||
// $person2_html = "<div class='feature-img'>" . Html::img("/data/uploads/face/" . $images[0]['url'], [
|
|
||||||
// "class" => "img-thumbnail",
|
|
||||||
// "style" => "width: 100px;height:100px;"
|
|
||||||
// ]) . "<br>" . $person2->name . " [" . $confidence['percent2'] . "]" . "</div>";
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
return $confidence['percent1']; //$person1_html . $person2_html;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function confidenceControlLogs() {
|
|
||||||
return function($model) {
|
|
||||||
$confidence = json_decode($model->confidence, true);
|
|
||||||
return $confidence['percent1'] . ($confidence['percent2'] > 0 ? " [" . $confidence['percent2'] . "]" : "");
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function rows() {
|
public static function rows() {
|
||||||
return function($model, $index, $widget, $grid) {
|
|
||||||
$confidence = json_decode($model->confidence, true);
|
|
||||||
$person = isset($confidence['id1']) ? \app\models\ListManagement::findOne($confidence['id1']) : false;
|
|
||||||
$images = false;
|
|
||||||
if ($person) {
|
|
||||||
$images = json_decode($person->image, true);
|
|
||||||
}
|
|
||||||
return [
|
|
||||||
"ondblclick" => "_form(this);",
|
|
||||||
"style" => "cursor: pointer;",
|
|
||||||
"data" => [
|
|
||||||
"id" => $model->id,
|
|
||||||
"img" => "/data/uploads/face/" . $model->image,
|
|
||||||
"confidence" => json_encode([
|
|
||||||
"name" => $person ? $person->name : "",
|
|
||||||
"score" => isset($confidence['percent1']) ? $confidence['percent1'] : "",
|
|
||||||
"img" => isset($images[0]) ? "/data/uploads/face/" . $images[0]['url'] : ""
|
|
||||||
])
|
|
||||||
]
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function rowsControlLogs() {
|
|
||||||
return function($model, $index, $widget, $grid) {
|
return function($model, $index, $widget, $grid) {
|
||||||
return [
|
return [
|
||||||
"ondblclick" => "_form(this);",
|
"ondblclick" => "_form(this);",
|
||||||
|
|||||||
@@ -118,24 +118,14 @@ class ListManagement extends \yii\db\ActiveRecord {
|
|||||||
|
|
||||||
public function getAllFeatures() {
|
public function getAllFeatures() {
|
||||||
$features = json_decode($this->image, true);
|
$features = json_decode($this->image, true);
|
||||||
// $f = [];
|
$f = [];
|
||||||
// foreach ($features as $k => $v) {
|
|
||||||
// $f[] = $v['features'];
|
|
||||||
// if (isset($v['features512']))
|
|
||||||
// if (count($v['features512']))
|
|
||||||
// $f[] = $v['features512'];
|
|
||||||
// }
|
|
||||||
$feature1 = $feature2 = [];
|
|
||||||
foreach ($features as $k => $v) {
|
foreach ($features as $k => $v) {
|
||||||
$feature1[] = $v['features'];
|
$f[] = $v['features'];
|
||||||
if (isset($v['features512']))
|
if (isset($v['features512']))
|
||||||
if (count($v['features512']))
|
if (count($v['features512']))
|
||||||
$feature2[] = $v['features512'];
|
$f[] = $v['features512'];
|
||||||
}
|
}
|
||||||
return [
|
return $f;
|
||||||
"feature1" => $feature1,
|
|
||||||
"feature2" => $feature2
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function statisticFeatures() {
|
public static function statisticFeatures() {
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ copy.src.target=
|
|||||||
remote.connection=BiFace-99bab6
|
remote.connection=BiFace-99bab6
|
||||||
remote.directory=/BiFace_Server_Lite
|
remote.directory=/BiFace_Server_Lite
|
||||||
remote.upload=ON_SAVE
|
remote.upload=ON_SAVE
|
||||||
run.as=REMOTE
|
run.as=LOCAL
|
||||||
url=http://localhost/
|
url=http://localhost/
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use yii\widgets\Breadcrumbs;
|
use yii\widgets\Breadcrumbs;
|
||||||
use dmstr\widgets\Alert;
|
use dmstr\widgets\Alert;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<!-- <section class="content-header">
|
<!-- <section class="content-header">
|
||||||
<?=
|
<?=
|
||||||
Breadcrumbs::widget(
|
Breadcrumbs::widget(
|
||||||
[
|
[
|
||||||
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
|
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
|
||||||
]
|
]
|
||||||
)
|
) ?>
|
||||||
?>
|
|
||||||
</section>-->
|
</section>-->
|
||||||
|
|
||||||
<section class="content" style="padding: 0 0 15px 0;">
|
<section class="content" style="padding: 0 0 15px 0;">
|
||||||
@@ -22,12 +21,8 @@ use dmstr\widgets\Alert;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer class="main-footer">
|
<footer class="main-footer">
|
||||||
<div class="pull-right hidden-xs">
|
<div class="pull-right hidden-xs" style="margin-top: 10px;">
|
||||||
<b>Version: </b>
|
<!--<b>Hotline</b> <a href="tel:0912461556">091.246.1556</a>-->
|
||||||
<?php
|
|
||||||
$version = \app\models\SyncUrl::findOne(['key_config' => 'version']);
|
|
||||||
echo $version ? $version->data : Yii::$app->params["version"];
|
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
<!--<strong>Copyright © 2020 <a href="https://beetinnovators.com/"><img src="/images/BI_Logo.png" width="80px"></a> & <a href="https://tctech.vn/"><img src="/images/TCTech.jpg" width="80px"></a>.</strong> All rights reserved.-->
|
<!--<strong>Copyright © 2020 <a href="https://beetinnovators.com/"><img src="/images/BI_Logo.png" width="80px"></a> & <a href="https://tctech.vn/"><img src="/images/TCTech.jpg" width="80px"></a>.</strong> All rights reserved.-->
|
||||||
<strong>Copyright © 2020 <a href="https://beetinnovators.com/">BEETINNOVATORS</a>.</strong> All rights reserved.
|
<strong>Copyright © 2020 <a href="https://beetinnovators.com/">BEETINNOVATORS</a>.</strong> All rights reserved.
|
||||||
|
|||||||
@@ -55,7 +55,6 @@
|
|||||||
'attribute' => 'confidence',
|
'attribute' => 'confidence',
|
||||||
'contentOptions' => ['class' => 'text-center'],
|
'contentOptions' => ['class' => 'text-center'],
|
||||||
'headerOptions' => ['class' => 'text-center'],
|
'headerOptions' => ['class' => 'text-center'],
|
||||||
'format' => "raw",
|
|
||||||
'value' => \app\helpers\CaptureLogsGrid::confidence()
|
'value' => \app\helpers\CaptureLogsGrid::confidence()
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -90,22 +89,17 @@
|
|||||||
<div style="width: 500px;position: absolute;right:0;top: 250px;" id='form' class="hidden">
|
<div style="width: 500px;position: absolute;right:0;top: 250px;" id='form' class="hidden">
|
||||||
<div class="panel panel-info">
|
<div class="panel panel-info">
|
||||||
<div class="panel-heading text-bold">
|
<div class="panel-heading text-bold">
|
||||||
Quản lý mẫu
|
List management
|
||||||
<i class="fa fa-remove pull-right" style="cursor: pointer;" onclick="_close();"></i>
|
<i class="fa fa-remove pull-right" style="cursor: pointer;" onclick="_close();"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4 text-center">
|
<div class="col-md-4 text-center">
|
||||||
<img src="" class="img-thumbnail" id="FaceImage" style="width: 150px;height: 150px;">
|
<img src="" class="img-thumbnail" id="FaceImage" style="width: 150px;height: 150px;">
|
||||||
<div class='feature-img'>
|
|
||||||
<img src="" class="img-thumbnail" id="closest-img" style="width: 100px;height:100px;">
|
|
||||||
<br>
|
|
||||||
<i id="closest-name"></i>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4 text-right">Danh sách</div>
|
<div class="col-md-4 text-right">Type</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<select style="width: 100%;height: 26px;" name="Type">
|
<select style="width: 100%;height: 26px;" name="Type">
|
||||||
<option value="wl">White list</option>
|
<option value="wl">White list</option>
|
||||||
@@ -123,34 +117,34 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4 text-right">Tên</div>
|
<div class="col-md-4 text-right">Name</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<input type="text" name="Name">
|
<input type="text" name="Name">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4 text-right">Giới tính</div>
|
<div class="col-md-4 text-right">Gender</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<select style="width: 100%;height: 26px;" name="Gender">
|
<select style="width: 100%;height: 26px;" name="Gender">
|
||||||
<option value="Male">Nam</option>
|
<option value="Male">Male</option>
|
||||||
<option value="Female">Nữ</option>
|
<option value="Female">Female</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4 text-right">Ngày sinh</div>
|
<div class="col-md-4 text-right">Birthday</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<input type="text" name="Birthday" id="birthday">
|
<input type="text" name="Birthday" id="birthday">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4 text-right">Điện thoại</div>
|
<div class="col-md-4 text-right">Telephone</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<input type="text" name="Telephone">
|
<input type="text" name="Telephone">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4 text-right">Đơn vị</div>
|
<div class="col-md-4 text-right">Department</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<input type="text" name="Address">
|
<input type="text" name="Address">
|
||||||
</div>
|
</div>
|
||||||
@@ -159,8 +153,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<input type="hidden" value="" name="CaptureLogsID">
|
<input type="hidden" value="" name="CaptureLogsID">
|
||||||
<button onclick="_save(this);" data-href='{Url::to(["/list-management/create"])}'>Lưu</button>
|
<button onclick="_save(this);" data-href='{Url::to(["/list-management/create"])}'>Save</button>
|
||||||
<button onclick="_close();">Hủy</button>
|
<button onclick="_close();">Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
'class' => 'table table-striped table-bordered',
|
'class' => 'table table-striped table-bordered',
|
||||||
'style' => 'background:#fff;min-width:700px;'
|
'style' => 'background:#fff;min-width:700px;'
|
||||||
],
|
],
|
||||||
'rowOptions' => \app\helpers\CaptureLogsGrid::rowsControlLogs(),
|
'rowOptions' => \app\helpers\CaptureLogsGrid::rows(),
|
||||||
'columns' => [
|
'columns' => [
|
||||||
[
|
[
|
||||||
'attribute' => 'id',
|
'attribute' => 'id',
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
'attribute' => 'confidence',
|
'attribute' => 'confidence',
|
||||||
'contentOptions' => ['class' => 'text-center'],
|
'contentOptions' => ['class' => 'text-center'],
|
||||||
'headerOptions' => ['class' => 'text-center'],
|
'headerOptions' => ['class' => 'text-center'],
|
||||||
'value' => \app\helpers\CaptureLogsGrid::confidenceControlLogs()
|
'value' => \app\helpers\CaptureLogsGrid::confidence()
|
||||||
],
|
],
|
||||||
'listManagement.name',
|
'listManagement.name',
|
||||||
'listManagement.gender',
|
'listManagement.gender',
|
||||||
|
|||||||
@@ -23,9 +23,6 @@ function _form(e) {
|
|||||||
$("#form").removeClass("hidden");
|
$("#form").removeClass("hidden");
|
||||||
$("input[name='CaptureLogsID']").val($(e).attr("data-id"));
|
$("input[name='CaptureLogsID']").val($(e).attr("data-id"));
|
||||||
$("#FaceImage").attr("src", $(e).attr("data-img"));
|
$("#FaceImage").attr("src", $(e).attr("data-img"));
|
||||||
var confidence = JSON.parse($(e).attr("data-confidence"));
|
|
||||||
$("#closest-img").attr("src", confidence.img);
|
|
||||||
$("#closest-name").html(confidence.name + " [" + confidence.score + "]");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function _close() {
|
function _close() {
|
||||||
|
|||||||
Reference in New Issue
Block a user