|
@@ -1,7 +1,8 @@
|
|
|
<template>
|
|
|
<div class="variety-list-page">
|
|
|
<div class="top">
|
|
|
- <el-button type="primary" @click="addVarietyHandle(null)" v-if="isCanAdd">添加品种</el-button>
|
|
|
+ <el-button v-permission="permissionBtn.stockPlantPermission.stockPlant_saveVariety"
|
|
|
+ type="primary" @click="addVarietyHandle(null)" v-if="isCanAdd">添加品种</el-button>
|
|
|
<div class="top-right">
|
|
|
<el-checkbox v-model="isCanAnalyse" @change="pageChangeHandle(1)" v-if="!isCanAdd">只看可分析</el-checkbox>
|
|
|
<el-input
|
|
@@ -35,9 +36,12 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center">
|
|
|
<template slot-scope="{row}">
|
|
|
- <el-button type="text" @click="analyseVarietyHandle(row)" v-if="row.Button.Analyse">分析</el-button>
|
|
|
- <el-button type="text" @click="addVarietyHandle(row)" v-if="row.Button.Edit">编辑</el-button>
|
|
|
- <span class="deletesty" @click="delHandle(row)" style="margin-left: 10px;" v-if="row.Button.Delete">删除</span>
|
|
|
+ <el-button v-permission="permissionBtn.stockPlantPermission.stockPlant_anlysisView"
|
|
|
+ type="text" @click="analyseVarietyHandle(row)" v-if="row.Button.Analyse">分析</el-button>
|
|
|
+ <el-button v-permission="permissionBtn.stockPlantPermission.stockPlant_saveVariety"
|
|
|
+ type="text" @click="addVarietyHandle(row)" v-if="row.Button.Edit">编辑</el-button>
|
|
|
+ <span v-permission="permissionBtn.stockPlantPermission.stockPlant_del"
|
|
|
+ class="deletesty" @click="delHandle(row)" style="margin-left: 10px;" v-if="row.Button.Delete">删除</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<div slot="empty" style="padding: 20px 0">
|
|
@@ -119,6 +123,10 @@ export default {
|
|
|
},
|
|
|
|
|
|
analyseVarietyHandle(row,type='') {
|
|
|
+ //如果没有分析查看的权限,就不跳转
|
|
|
+ if(!this.permissionBtn.checkPermissionBtn(
|
|
|
+ this.permissionBtn.stockPlantPermission.stockPlant_anlysisView
|
|
|
+ )) return
|
|
|
this.$router.push({
|
|
|
path:'/analyseVariety',
|
|
|
query:{id:row.VarietyId,type}
|