简化农场分区和菜地划分模块的权限设计,分为查询、更新和导出3种。

This commit is contained in:
jlt 2022-03-29 20:37:23 +08:00
parent 7690c7e74f
commit f8622fc273
4 changed files with 21 additions and 21 deletions

View File

@ -37,7 +37,7 @@ public class FarmZoneController extends BaseController
/**
* 查询农场分区列表
*/
@PreAuthorize("@ss.hasPermi('csa:farmzone:list')")
@PreAuthorize("@ss.hasPermi('csa:farmzone:query')")
@GetMapping("/list")
public TableDataInfo list(FarmZone farmZone)
{
@ -72,7 +72,7 @@ public class FarmZoneController extends BaseController
/**
* 新增农场分区
*/
@PreAuthorize("@ss.hasPermi('csa:farmzone:add')")
@PreAuthorize("@ss.hasPermi('csa:farmzone:update')")
@Log(title = "农场分区", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody FarmZone farmZone)
@ -83,7 +83,7 @@ public class FarmZoneController extends BaseController
/**
* 修改农场分区
*/
@PreAuthorize("@ss.hasPermi('csa:farmzone:edit')")
@PreAuthorize("@ss.hasPermi('csa:farmzone:update')")
@Log(title = "农场分区", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody FarmZone farmZone)
@ -94,7 +94,7 @@ public class FarmZoneController extends BaseController
/**
* 删除农场分区
*/
@PreAuthorize("@ss.hasPermi('csa:farmzone:remove')")
@PreAuthorize("@ss.hasPermi('csa:farmzone:update')")
@Log(title = "农场分区", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)

View File

@ -37,7 +37,7 @@ public class GardenController extends BaseController
/**
* 查询菜地划分列表
*/
@PreAuthorize("@ss.hasPermi('csa:garden:list')")
@PreAuthorize("@ss.hasPermi('csa:garden:query')")
@GetMapping("/list")
public TableDataInfo list(Garden garden)
{
@ -72,7 +72,7 @@ public class GardenController extends BaseController
/**
* 新增菜地划分
*/
@PreAuthorize("@ss.hasPermi('csa:garden:add')")
@PreAuthorize("@ss.hasPermi('csa:garden:update')")
@Log(title = "菜地划分", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Garden garden)
@ -83,7 +83,7 @@ public class GardenController extends BaseController
/**
* 修改菜地划分
*/
@PreAuthorize("@ss.hasPermi('csa:garden:edit')")
@PreAuthorize("@ss.hasPermi('csa:garden:update')")
@Log(title = "菜地划分", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Garden garden)
@ -94,8 +94,8 @@ public class GardenController extends BaseController
/**
* 批量更新菜地状态
*/
@PreAuthorize("@ss.hasPermi('csa:garden:edit')")
@Log(title = "农场分区", businessType = BusinessType.UPDATE)
@PreAuthorize("@ss.hasPermi('csa:garden:update')")
@Log(title = "菜地划分", businessType = BusinessType.UPDATE)
@PutMapping("/{ids}")
public AjaxResult updateStatus(@RequestBody Garden garden, @PathVariable Long[] ids)
{
@ -105,7 +105,7 @@ public class GardenController extends BaseController
/**
* 删除菜地划分
*/
@PreAuthorize("@ss.hasPermi('csa:garden:remove')")
@PreAuthorize("@ss.hasPermi('csa:garden:update')")
@Log(title = "菜地划分", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)

View File

@ -43,7 +43,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['csa:farmzone:add']"
v-hasPermi="['csa:farmzone:update']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
@ -54,7 +54,7 @@
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['csa:farmzone:edit']"
v-hasPermi="['csa:farmzone:update']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
@ -65,7 +65,7 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['csa:farmzone:remove']"
v-hasPermi="['csa:farmzone:update']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
@ -102,14 +102,14 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['csa:farmzone:edit']"
v-hasPermi="['csa:farmzone:update']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['csa:farmzone:remove']"
v-hasPermi="['csa:farmzone:update']"
>删除</el-button>
</template>
</el-table-column>

View File

@ -43,7 +43,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['csa:garden:add']"
v-hasPermi="['csa:garden:update']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
@ -54,7 +54,7 @@
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['csa:garden:edit']"
v-hasPermi="['csa:garden:update']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
@ -65,7 +65,7 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['csa:garden:remove']"
v-hasPermi="['csa:garden:update']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
@ -85,7 +85,7 @@
icon="el-icon-finished"
size="mini"
@click="handleComplete"
v-hasPermi="['csa:garden:edit']"
v-hasPermi="['csa:garden:update']"
>竣工</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@ -134,7 +134,7 @@
icon="el-icon-edit"
:disabled="scope.row.isCompleted == 'Y'"
@click="handleUpdate(scope.row)"
v-hasPermi="['csa:garden:edit']"
v-hasPermi="['csa:garden:update']"
>修改</el-button>
<el-button
size="mini"
@ -142,7 +142,7 @@
icon="el-icon-delete"
:disabled="scope.row.isCompleted == 'Y'"
@click="handleDelete(scope.row)"
v-hasPermi="['csa:garden:remove']"
v-hasPermi="['csa:garden:update']"
>删除</el-button>
</template>
</el-table-column>