|
@@ -70,7 +70,7 @@
|
|
|
<i class="el-icon-tickets"></i>
|
|
|
<span>数据列表</span>
|
|
|
<el-button
|
|
|
- v-if="createPermission"
|
|
|
+ v-if="createproduct"
|
|
|
class="btn-add"
|
|
|
@click="handleAddProduct()"
|
|
|
size="mini">
|
|
@@ -164,7 +164,7 @@
|
|
|
@click="handleShowProduct(scope.$index, scope.row)">查看
|
|
|
</el-button> -->
|
|
|
<el-button
|
|
|
- v-if="updatePermission"
|
|
|
+ v-if="updateproduct"
|
|
|
size="mini"
|
|
|
@click="handleUpdateProduct(scope.$index, scope.row)">编辑
|
|
|
</el-button>
|
|
@@ -174,11 +174,11 @@
|
|
|
size="mini"
|
|
|
@click="handleShowLog(scope.$index, scope.row)">日志
|
|
|
</el-button> -->
|
|
|
- <el-button size="mini" v-if="scope.row.verifyStatus==0&&verifyPermission" @click="handleVerify(scope.$index, scope.row)">
|
|
|
+ <el-button size="mini" v-if="scope.row.verifyStatus==0&&verifyproduct" @click="handleVerify(scope.$index, scope.row)">
|
|
|
审核
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- v-if="delPermission"
|
|
|
+ v-if="delproduct"
|
|
|
size="mini"
|
|
|
type="danger"
|
|
|
@click="handleDelete(scope.$index, scope.row)">删除
|
|
@@ -293,6 +293,7 @@
|
|
|
import {fetchList as fetchProductAttrList} from '@/api/productAttr'
|
|
|
import {fetchList as fetchBrandList} from '@/api/brand'
|
|
|
import {fetchListWithChildren} from '@/api/productCate'
|
|
|
+ import {verifyproduct,delproduct,updateproduct,createproduct} from '@/api/permissions'
|
|
|
const defaultListQuery = {
|
|
|
keyword: null,
|
|
|
pageNum: 1,
|
|
@@ -307,6 +308,11 @@
|
|
|
name: "productList",
|
|
|
data() {
|
|
|
return {
|
|
|
+ //按钮权限
|
|
|
+ createproduct,
|
|
|
+ updateproduct,
|
|
|
+ delproduct,
|
|
|
+ verifyproduct,
|
|
|
editSkuInfo:{
|
|
|
dialogVisible:false,
|
|
|
productId:null,
|
|
@@ -372,12 +378,7 @@
|
|
|
}, {
|
|
|
value: 0,
|
|
|
label: '未审核'
|
|
|
- }],
|
|
|
- permissions:[],
|
|
|
- verifyPermission:false,//审核权限
|
|
|
- delPermission:false,//删除权限createPermission
|
|
|
- updatePermission:false,//编辑权限
|
|
|
- createPermission:false,//编辑权限
|
|
|
+ }],
|
|
|
}
|
|
|
|
|
|
},
|
|
@@ -385,25 +386,6 @@
|
|
|
this.getList();
|
|
|
this.getBrandList();
|
|
|
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: {
|
|
|
selectProductCateValue: function (newValue) {
|