修复会员入驻的列表刷新错误,合约类中的菜地对象类型错误。

This commit is contained in:
JiaLeiTao 2022-04-07 11:41:22 +08:00
parent e84fdf8e5a
commit 662d38da56
2 changed files with 14 additions and 5 deletions

View File

@ -38,7 +38,7 @@ public class FarmerContract extends BaseEntity
private Long gardenId;
/** 菜地 */
private Farmer garden;
private Garden garden;
/** 签约人 */
@Excel(name = "签约人")
@ -147,11 +147,11 @@ public class FarmerContract extends BaseEntity
this.gardenId = gardenId;
}
public Farmer getGarden() {
public Garden getGarden() {
return garden;
}
public void setGarden(Farmer garden) {
public void setGarden(Garden garden) {
this.garden = garden;
}

View File

@ -63,9 +63,18 @@
<el-table-column label="菜地编号" align="center" prop="garden.Name">
<template slot-scope="scope">
<el-tag
:key="scope.row.contractId"
:key="'c' + scope.row.contractId"
:type="scope.row.status == '1' ? 'success' : 'warning'" effect="plain">
{{ scope.row.garden ? scope.row.garden.Name : '未认领' }}
{{ scope.row.garden ? scope.row.garden.code : '未认领' }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="菜地名称" align="center" prop="garden.Name">
<template slot-scope="scope">
<el-tag
:key="'n' + scope.row.contractId"
:type="scope.row.status == '1' ? 'success' : 'warning'" effect="plain">
{{ scope.row.garden ? (scope.row.garden.name != '' ? scope.row.garden.name : '未命名' ) : '未认领' }}
</el-tag>
</template>
</el-table-column>