更新后台系统细节
This commit is contained in:
parent
a424d10d91
commit
a9a908f928
|
@ -89,37 +89,44 @@
|
||||||
<el-table-column label="用户信息" width="200">
|
<el-table-column label="用户信息" width="200">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag class="mr-2" type="success">ID: {{ row.user_id }}</el-tag>
|
<el-tag class="mr-2" type="success">ID: {{ row.user_id }}</el-tag>
|
||||||
<el-tag class="mr-2" type="success">账户: {{ row.user_id }}</el-tag>
|
<el-tag class="mr-2" type="success">账户: {{ row.account }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品信息">
|
<el-table-column label="土地信息" width="200">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag class="mr-2" type="success">{{ row.user_id }}</el-tag>
|
<el-tag class="mr-2" type="success">ID: {{ row.land_id }}</el-tag>
|
||||||
|
<el-tag class="mr-2" type="success">名称: {{ row.land_title }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="设备编码" prop="code" show-overflow-tooltip />
|
<el-table-column label="产品信息" width="200">
|
||||||
<el-table-column label="设备名称" prop="name" show-overflow-tooltip />
|
<template #default="{ row }">
|
||||||
<el-table-column label="设备类型" prop="type">
|
<el-tag class="mr-2" type="success">ID: {{ row.product_id }}</el-tag>
|
||||||
|
<el-tag class="mr-2" type="success">名称: {{ row.product_name }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="设备编码" width="120" prop="code" show-overflow-tooltip />
|
||||||
|
<el-table-column label="设备名称" width="200" prop="name" show-overflow-tooltip />
|
||||||
|
<el-table-column label="设备类型" width="150" prop="type">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<dict-value :options="dictData.device_type" :value="row.type" />
|
<dict-value :options="dictData.device_type" :value="row.type" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="设备状态" prop="status">
|
<el-table-column label="设备状态" width="100" align="center" prop="status">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<dict-value :options="dictData.device_status" :value="row.status" />
|
<dict-value :options="dictData.device_status" :value="row.status" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="是否在线" prop="is_online">
|
<el-table-column label="是否在线" width="100" align="center" prop="is_online">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<dict-value :options="dictData.device_online_status" :value="row.is_online" />
|
<dict-value :options="dictData.device_online_status" :value="row.is_online" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="是否绑定土地" prop="is_bind">
|
<el-table-column label="是否绑定土地" width="150" align="center" prop="is_bind">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<dict-value :options="dictData.device_bind_status" :value="row.is_bind" />
|
<dict-value :options="dictData.device_bind_status" :value="row.is_bind" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" width="160" prop="create_time">
|
<el-table-column label="创建时间" width="160" align="center" prop="create_time">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span>{{ row.create_time ? timeFormat(row.create_time, 'yyyy-mm-dd hh:MM:ss') : '' }}</span>
|
<span>{{ row.create_time ? timeFormat(row.create_time, 'yyyy-mm-dd hh:MM:ss') : '' }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -68,6 +68,22 @@
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-perms="['land.product/lists']"
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
>
|
||||||
|
<router-link
|
||||||
|
:to="{
|
||||||
|
path: getRoutePath('land.product/lists'),
|
||||||
|
query: {
|
||||||
|
land_id: row.id
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
产品信息
|
||||||
|
</router-link>
|
||||||
|
</el-button>
|
||||||
<el-button type="primary" link @click="handleDetail(row)"
|
<el-button type="primary" link @click="handleDetail(row)"
|
||||||
>
|
>
|
||||||
土地图片
|
土地图片
|
||||||
|
@ -88,22 +104,6 @@
|
||||||
种植信息
|
种植信息
|
||||||
</router-link>
|
</router-link>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
|
||||||
v-perms="['land.product/lists']"
|
|
||||||
type="primary"
|
|
||||||
link
|
|
||||||
>
|
|
||||||
<router-link
|
|
||||||
:to="{
|
|
||||||
path: getRoutePath('land.product/lists'),
|
|
||||||
query: {
|
|
||||||
land_id: row.id
|
|
||||||
}
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
产品信息
|
|
||||||
</router-link>
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
v-perms="['land.land/delete']"
|
v-perms="['land.land/delete']"
|
||||||
type="danger"
|
type="danger"
|
||||||
|
|
|
@ -66,17 +66,17 @@
|
||||||
<el-table-column label="种植品牌" prop="breed" show-overflow-tooltip />
|
<el-table-column label="种植品牌" prop="breed" show-overflow-tooltip />
|
||||||
<el-table-column label="种植面积" prop="area" show-overflow-tooltip />
|
<el-table-column label="种植面积" prop="area" show-overflow-tooltip />
|
||||||
<el-table-column label="种植人员" prop="user" show-overflow-tooltip />
|
<el-table-column label="种植人员" prop="user" show-overflow-tooltip />
|
||||||
<el-table-column label="生长状态" prop="status">
|
<el-table-column label="生长状态" align="center" prop="status">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<dict-value :options="dictData.plant_status" :value="row.status" />
|
<dict-value :options="dictData.plant_status" :value="row.status" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="溯源二维码" width="150" prop="qr_code">
|
<el-table-column label="溯源二维码" width="150" align="center" prop="qr_code">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-image style="width:50px;height:50px;" :src="row.qr_code" />
|
<el-image style="width:50px;height:50px;" :src="row.qr_code" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="播种时间" width="180" prop="plant_date">
|
<el-table-column label="播种时间" width="180" align="center" prop="plant_date">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span>{{ row.plant_date ? timeFormat(row.plant_date, 'yyyy-mm-dd hh:MM:ss') : '' }}</span>
|
<span>{{ row.plant_date ? timeFormat(row.plant_date, 'yyyy-mm-dd hh:MM:ss') : '' }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -52,14 +52,14 @@
|
||||||
<el-tag class="mr-2" type="success">类型: {{ row.kind }} 品牌: {{ row.breed }}</el-tag>
|
<el-tag class="mr-2" type="success">类型: {{ row.kind }} 品牌: {{ row.breed }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="种植操作类型" prop="type">
|
<el-table-column label="种植操作类型" align="center" prop="type">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<dict-value :options="dictData.land_plant_action" :value="row.type" />
|
<dict-value :options="dictData.land_plant_action" :value="row.type" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="种植操作" prop="type_text" show-overflow-tooltip />
|
<el-table-column label="种植操作" prop="type_text" show-overflow-tooltip />
|
||||||
<el-table-column label="种植操作详情" prop="detail" show-overflow-tooltip />
|
<el-table-column label="种植操作详情" prop="detail" show-overflow-tooltip />
|
||||||
<el-table-column label="种植操作时间" width="180" prop="plant_date">
|
<el-table-column label="种植操作时间" width="180" align="center" prop="plant_date">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span>{{ row.create_time ? timeFormat(row.create_time, 'yyyy-mm-dd hh:MM:ss') : '' }}</span>
|
<span>{{ row.create_time ? timeFormat(row.create_time, 'yyyy-mm-dd hh:MM:ss') : '' }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -74,12 +74,12 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品编号" prop="code" show-overflow-tooltip />
|
<el-table-column label="产品编号" prop="code" show-overflow-tooltip />
|
||||||
<el-table-column label="产品名称" prop="name" show-overflow-tooltip />
|
<el-table-column label="产品名称" prop="name" show-overflow-tooltip />
|
||||||
<el-table-column label="产品状态" prop="status">
|
<el-table-column label="产品状态" align="center" prop="status">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<dict-value :options="dictData.product_status" :value="row.status" />
|
<dict-value :options="dictData.product_status" :value="row.status" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" width="180" prop="create_time">
|
<el-table-column label="创建时间" width="180" align="center" prop="create_time">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span>{{ row.create_time ? timeFormat(row.create_time, 'yyyy-mm-dd hh:MM:ss') : '' }}</span>
|
<span>{{ row.create_time ? timeFormat(row.create_time, 'yyyy-mm-dd hh:MM:ss') : '' }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -41,7 +41,8 @@ class DeviceLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['d.code', 'd.name', 'd.type', 'd.status', 'd.is_online', 'd.is_bind'],
|
'%like%' => ['d.name'],
|
||||||
|
'=' => ['d.code', 'd.type', 'd.status', 'd.is_online', 'd.is_bind'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,9 +73,12 @@ class DeviceLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||||
{
|
{
|
||||||
return Db::name('device')->alias('d')
|
return Db::name('device')->alias('d')
|
||||||
->where($this->searchWhere)->where($this->userSearch())
|
->where($this->searchWhere)->where($this->userSearch())
|
||||||
// ->leftJoin('land_device ld','ld.device_id = d.id')
|
->leftJoin('user u','u.id = d.user_id')
|
||||||
// ->leftJoin('land l','l.id = ld.land_id')
|
->leftJoin('product_device pd','pd.device_id = d.id')
|
||||||
// ->field('d.*, ld.land_id, l.title')
|
->leftJoin('product p','p.id = pd.product_id')
|
||||||
|
->leftJoin('land_product lp','lp.product_id = pd.product_id')
|
||||||
|
->leftJoin('land l','l.id = lp.land_id')
|
||||||
|
->field('d.*, u.account, pd.product_id, p.name as product_name, lp.land_id, l.title as land_title')
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['d.id' => 'desc'])
|
->order(['d.id' => 'desc'])
|
||||||
->select()
|
->select()
|
||||||
|
|
Loading…
Reference in New Issue