更新溯源信息
This commit is contained in:
parent
b072af0215
commit
a9e71d4667
|
@ -2,8 +2,8 @@ const config = {
|
|||
terminal: 1, //终端
|
||||
title: '后台管理系统', //网站默认标题
|
||||
version: '1.6.0', //版本号
|
||||
baseUrl: `${import.meta.env.VITE_APP_BASE_URL || ''}/`, //请求接口域名
|
||||
// baseUrl: 'http://127.0.0.1:30005/',
|
||||
// baseUrl: `${import.meta.env.VITE_APP_BASE_URL || ''}/`, //请求接口域名
|
||||
baseUrl: 'http://127.0.0.1:30005/',
|
||||
urlPrefix: 'adminapi', //请求默认前缀
|
||||
timeout: 10 * 1000 //请求超时时长
|
||||
}
|
||||
|
|
|
@ -73,7 +73,15 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="溯源二维码" width="150" align="center" prop="qr_code">
|
||||
<template #default="{ row }">
|
||||
<el-image style="width:50px;height:50px;" :src="row.qr_code" />
|
||||
<el-image
|
||||
v-if="
|
||||
row.qr_code !== null &&
|
||||
row.qr_code !== undefined &&
|
||||
row.qr_code !== ''
|
||||
"
|
||||
style="width: 50px; height: 50px"
|
||||
:src="row.qr_code"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="播种时间" width="180" align="center" prop="plant_date">
|
||||
|
@ -81,7 +89,7 @@
|
|||
<span>{{ row.plant_date ? timeFormat(row.plant_date, 'yyyy-mm-dd hh:MM:ss') : '' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="300" align="center" fixed="right">
|
||||
<el-table-column label="操作" width="340" align="center" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['land.land_plant/edit']"
|
||||
|
@ -91,6 +99,14 @@
|
|||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['land.land_plant/edit']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
溯源信息
|
||||
</el-button>
|
||||
<el-button type="primary" link @click="handleDetail(row)"
|
||||
>
|
||||
种植图片
|
||||
|
|
|
@ -150,7 +150,9 @@ class LandPlantLogic extends BaseLogic
|
|||
return false;
|
||||
}
|
||||
$plantInfo['pic'] = json_decode($plantInfo['pic'],true);
|
||||
$plantInfo['group_day'] = floor(($plantInfo['harvest_date'] - $plantInfo['plant_date']) / 86400);
|
||||
$plantInfo['plant_date'] = date('Y-m-d',$plantInfo['plant_date']);
|
||||
$plantInfo['harvest_date'] = date('Y-m-d',$plantInfo['harvest_date']);
|
||||
$plantInfo['land_name'] = $landInfo['title'];
|
||||
$plantInfo['land_area'] = $landInfo['total_area'];
|
||||
$plantInfo['land_address'] = $landInfo['province_name'].$landInfo['city_name'].$landInfo['county_name'].$landInfo['town_name'].$landInfo['village_name'].$landInfo['group_name'];
|
||||
|
|
Loading…
Reference in New Issue