This commit is contained in:
chenbo 2024-01-15 10:35:57 +08:00
parent 0d1ce3369d
commit 280fd94d4b
2 changed files with 8 additions and 8 deletions

View File

@ -13,7 +13,7 @@
<div class="flex flex-wrap">
<div class="w-1/2 md:w-1/4">
<div class="leading-10">地数</div>
<div class="leading-10">地数</div>
<div class="text-6xl">{{ workbenchData.today.total_land }}</div>
<div class="text-tx-secondary">
今日新增{{ workbenchData.today.today_land }}
@ -94,7 +94,7 @@ const workbenchData: any = reactive({
type: 'value'
},
legend: {
data: ['地数', '产品数', '设备数', '报警数']
data: ['地数', '产品数', '设备数', '报警数']
},
itemStyle: {
//
@ -105,7 +105,7 @@ const workbenchData: any = reactive({
},
series: [
{
name: '地数',
name: '地数',
data: [0],
type: 'line',
smooth: true

View File

@ -57,9 +57,9 @@ class WorkbenchLogic extends BaseLogic
{
return [
[
'name' => '地列表',
'name' => '地列表',
'image' => FileService::getFileUrl(config('project.default_image.menu_dict')),
'url' => '/land/land'
'url' => '/land/farm'
],
[
'name' => '产品列表',
@ -98,8 +98,8 @@ class WorkbenchLogic extends BaseLogic
if (!(request()->adminInfo)['root'] && (request()->adminInfo)['user_id']) {
$userWhere['user_id'] = (request()->adminInfo)['user_id'];
}
$totalLand = Db::name('land')->where($userWhere)->count();
$todayLand = Db::name('land')->where($userWhere)->where('create_time', 'between', [$todayStart, $todayEnd])->count();
$totalLand = Db::name('farm')->where($userWhere)->count();
$todayLand = Db::name('farm')->where($userWhere)->where('create_time', 'between', [$todayStart, $todayEnd])->count();
$totalProduct = Db::name('product')->where($userWhere)->count();
$todayProduct = Db::name('product')->where($userWhere)->where('create_time', 'between', [$todayStart, $todayEnd])->count();
$totalDevice = Db::name('device')->where($userWhere)->count();
@ -142,7 +142,7 @@ class WorkbenchLogic extends BaseLogic
$date[] = date('Y-m-d', $where_start);
$todayStart = $where_start;
$todayEnd = $where_start + 86400 -1;
$todayLand = Db::name('land')->where($userWhere)->where('create_time', 'between', [$todayStart, $todayEnd])->count();
$todayLand = Db::name('farm')->where($userWhere)->where('create_time', 'between', [$todayStart, $todayEnd])->count();
$land[$i] = $todayLand;
$todayProduct = Db::name('product')->where($userWhere)->where('create_time', 'between', [$todayStart, $todayEnd])->count();
$product[$i] = $todayProduct;