lilei 2 年之前
父节点
当前提交
1856a50c9b
共有 2 个文件被更改,包括 8 次插入4 次删除
  1. 4 2
      src/utils/util.js
  2. 4 2
      src/views/productManagement/productNotOnline/list.vue

+ 4 - 2
src/utils/util.js

@@ -192,11 +192,13 @@ export function hasPriceAuth(authNode, priceOptions, userAuthCode){
       codes.push(a[a.length-1])
     }
   })
+  // console.log(codes)
   // 根据拥有的价格权限生成数组标记[1,0,1,0,0],每一位对应一个价格权限
   // 有权限标记1,否则标记0
   priceOptions.map(item => {
     ret.push(codes.includes(item.value)?1:0)
   })
+  // console.log(ret)
   return ret
 }
 // 获取接口对应的价格权限code
@@ -216,14 +218,14 @@ export function getAuthPriceCode (config, router, store) {
     const a = item.split('_')
     return priceOptions.find(k => k.value == a[a.length-1])
   })
-  // console.log(userAuthCode)
-  console.log(authCode)
+
   // 如果有权限code
   if(authCode){
     // 当前正在调用的接口url
     const url = config.url
     // 所有的权限菜单数据
     const authTree = store.state.app.authMenusList
+    
     // 从所有的权限菜单中查找当前权限code对应的权限菜单数据
     const authNode = treeFind(authTree,(item)=>item.code == authCode)
     console.log(authNode)

+ 4 - 2
src/views/productManagement/productNotOnline/list.vue

@@ -51,7 +51,7 @@
                 class="button-warning"
                 @click="handleExport"
                 :disabled="disabled"
-                v-if="$hasPermissions('B_ProductPriceExoprt')"
+                v-if="$hasPermissions('M_productOnlineExport')"
                 id="productInfoList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
@@ -97,7 +97,7 @@ import { queryOnlinePage, excelOnlineList } from '@/api/product'
 import ProductType from '@/views/common/productType.js'
 import ProductBrand from '@/views/common/productBrand.js'
 export default {
-  name: 'ProductPricingList',
+  name: 'productNotOnlineList',
   mixins: [commonMixin],
   components: { STable, VSelect, rangeDate, ProductBrand, ProductType },
   data () {
@@ -221,10 +221,12 @@ export default {
     //  导出
     handleExport () {
       const _this = this
+      _this.$store.state.app.curActionPermission = 'M_productOnlineExport'
       const params = this.queryParam
       this.spinning = true
       exportExcel(excelOnlineList, params, '产品状态信息导出', function () {
         _this.spinning = false
+        _this.$store.state.app.curActionPermission = ''
       })
     },
     //  产品分类  change