Browse Source

com btn permission

changjiaming 7 months ago
parent
commit
663d640392

+ 2 - 2
src/views/enterpriseManagement/index.vue

@@ -8,8 +8,8 @@
         <div class="tempalte-content">
           <div class="search">
             <div class="left">
-              <!-- <el-button v-if="activeName === 'pending' && btnPermission.includes('addSupplier')" type="primary" style="margin-bottom: 15px" @click="() => { this.$refs.tradePlatform.show = true }">新增贸易平台</el-button> -->
-              <el-button v-if="activeName === 'pending'" type="primary" style="margin-bottom: 15px" @click="() => { this.$refs.tradePlatform.show = true }">新增贸易平台</el-button>
+              <el-button v-if="activeName === 'pending' && btnPermission.includes('addSupplier')" type="primary" style="margin-bottom: 15px" @click="() => { this.$refs.tradePlatform.show = true }">新增贸易平台</el-button>
+              <!-- <el-button v-if="activeName === 'pending'" type="primary" style="margin-bottom: 15px" @click="() => { this.$refs.tradePlatform.show = true }">新增贸易平台</el-button> -->
               <div v-if="activeName == 'all'" class="left" style="margin-bottom: 15px;">
                 <el-radio-group v-model="tableType" @change="changeSignType" class="other-radio">
                   <el-radio-button label="com">公司</el-radio-button>

+ 4 - 4
src/views/enterpriseManagement/indexTable.js

@@ -102,12 +102,12 @@ export default {
     tablePower() {
       return ({ item, row }) => {
         const { rowPower, power } = item
-        // if(power && !this.btnPermission.includes(power)) {
-        //   return false
-        // }
-        if(rowPower && (!row.authStatus || !rowPower.includes(row.authStatus))) {
+        if(power && !this.btnPermission.includes(power)) {
           return false
         }
+        // if(rowPower && (!row.authStatus || !rowPower.includes(row.authStatus))) {
+        //   return false
+        // }
         return true
       }
     }

+ 3 - 3
src/views/enterpriseManagement/signComTable.js

@@ -94,9 +94,9 @@ export default {
     comTablePower() {
       return ({ item }) => {
         const { power } = item
-        // if(power && !this.btnPermission.includes(power)) {
-        //   return false
-        // }
+        if(power && !this.btnPermission.includes(power)) {
+          return false
+        }
         return true
       }
     }

+ 6 - 12
src/views/enterpriseManagement/signPersonTable.js

@@ -75,15 +75,9 @@ export default {
                 category: 'createPersonUrl'
               }
             ]
-            if(!row.authStatus) {
-              btnList.pop()
-            }
-            // btnList.push({
-            //   msg: '删除',
-            //   icon: 'iconfont icon-shanchu',
-            //   power: 'projectNumber:delete',
-            //   category: 'personUrlDelete'
-            // })
+            // if(!row.authStatus) {
+            //   btnList.pop()
+            // }
             const options = btnList.map(item => {
               let str = item.svgIcon ? 
                 <svg-icon icon-class={item.svgIcon} style="width: 16px; height: 16px;" />
@@ -107,9 +101,9 @@ export default {
     personTablePower() {
       return ({ item }) => {
         const { power } = item
-        // if(power && !this.btnPermission.includes(power)) {
-        //   return false
-        // }
+        if(power && !this.btnPermission.includes(power)) {
+          return false
+        }
         return true
       }
     }