|
@@ -70,6 +70,7 @@
|
|
<i class="el-icon-tickets"></i>
|
|
<i class="el-icon-tickets"></i>
|
|
<span>数据列表</span>
|
|
<span>数据列表</span>
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-if="createPermission"
|
|
class="btn-add"
|
|
class="btn-add"
|
|
@click="handleAddProduct()"
|
|
@click="handleAddProduct()"
|
|
size="mini">
|
|
size="mini">
|
|
@@ -163,6 +164,7 @@
|
|
@click="handleShowProduct(scope.$index, scope.row)">查看
|
|
@click="handleShowProduct(scope.$index, scope.row)">查看
|
|
</el-button> -->
|
|
</el-button> -->
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-if="updatePermission"
|
|
size="mini"
|
|
size="mini"
|
|
@click="handleUpdateProduct(scope.$index, scope.row)">编辑
|
|
@click="handleUpdateProduct(scope.$index, scope.row)">编辑
|
|
</el-button>
|
|
</el-button>
|
|
@@ -172,10 +174,11 @@
|
|
size="mini"
|
|
size="mini"
|
|
@click="handleShowLog(scope.$index, scope.row)">日志
|
|
@click="handleShowLog(scope.$index, scope.row)">日志
|
|
</el-button> -->
|
|
</el-button> -->
|
|
- <el-button size="mini" v-if="scope.row.verifyStatus==0" @click="handleVerify(scope.$index, scope.row)">
|
|
|
|
|
|
+ <el-button size="mini" v-if="scope.row.verifyStatus==0&&verifyPermission" @click="handleVerify(scope.$index, scope.row)">
|
|
审核
|
|
审核
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-if="delPermission"
|
|
size="mini"
|
|
size="mini"
|
|
type="danger"
|
|
type="danger"
|
|
@click="handleDelete(scope.$index, scope.row)">删除
|
|
@click="handleDelete(scope.$index, scope.row)">删除
|
|
@@ -311,7 +314,7 @@
|
|
productAttributeCategoryId:null,
|
|
productAttributeCategoryId:null,
|
|
stockList:[],
|
|
stockList:[],
|
|
productAttr:[],
|
|
productAttr:[],
|
|
- keyword:null
|
|
|
|
|
|
+ keyword:null,
|
|
},
|
|
},
|
|
operates: [
|
|
operates: [
|
|
{
|
|
{
|
|
@@ -369,13 +372,38 @@
|
|
}, {
|
|
}, {
|
|
value: 0,
|
|
value: 0,
|
|
label: '未审核'
|
|
label: '未审核'
|
|
- }]
|
|
|
|
|
|
+ }],
|
|
|
|
+ permissions:[],
|
|
|
|
+ verifyPermission:false,//审核权限
|
|
|
|
+ delPermission:false,//删除权限createPermission
|
|
|
|
+ updatePermission:false,//编辑权限
|
|
|
|
+ createPermission:false,//编辑权限
|
|
}
|
|
}
|
|
|
|
+
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getList();
|
|
this.getList();
|
|
this.getBrandList();
|
|
this.getBrandList();
|
|
this.getProductCateList();
|
|
this.getProductCateList();
|
|
|
|
+ //权限列表
|
|
|
|
+ this.permissions = localStorage.getItem("permissionList").split(',');
|
|
|
|
+ console.log('this.permissions',this.permissions);
|
|
|
|
+ // verifyPermission
|
|
|
|
+ let theverifyPermission = this.permissions.indexOf("/product/update/verify");
|
|
|
|
+ if(theverifyPermission>=0){this.verifyPermission=true};
|
|
|
|
+
|
|
|
|
+ let thedelPermission = this.permissions.indexOf("/update/deleteStatus");
|
|
|
|
+ if(thedelPermission>=0){this.delPermission=true};
|
|
|
|
+
|
|
|
|
+ let theUpdatePermission = this.permissions.indexOf("/product/update/");
|
|
|
|
+ if(theUpdatePermission>=0){this.updatePermission=true};
|
|
|
|
+
|
|
|
|
+ let theCreatePermission = this.permissions.indexOf("/product/create");
|
|
|
|
+ if(theCreatePermission>=0){this.createPermission=true};
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //权限列表
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
selectProductCateValue: function (newValue) {
|
|
selectProductCateValue: function (newValue) {
|