update
This commit is contained in:
parent
0d1ce3369d
commit
280fd94d4b
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue