Ver código fonte

fix:企业权限修改

jiand 7 meses atrás
pai
commit
6d8ae72e7c
1 arquivos alterados com 8 adições e 3 exclusões
  1. 8 3
      src/views/enterpriseManagement/index.vue

+ 8 - 3
src/views/enterpriseManagement/index.vue

@@ -12,8 +12,10 @@
               <!-- <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" class="other-radio" @change="changeSignType">
-                  <el-radio-button label="com">公司</el-radio-button>
-                  <el-radio-button label="person">个人</el-radio-button>
+                  <el-radio-button label="com" v-if="btnPermission.includes('company')">公司</el-radio-button>
+                  <el-radio-button label="person" v-if="btnPermission.includes('individual')">个人</el-radio-button>
+                  <!-- <el-radio-button label="com">公司</el-radio-button>
+                  <el-radio-button label="person">个人</el-radio-button> -->
                 </el-radio-group>
               </div>
             </div>
@@ -328,6 +330,9 @@ export default {
     if (!this.btnPermission.includes('tradingPlatform')) {
       this.activeName = 'all'
     }
+    if(!this.btnPermission.includes('company')) {
+      this.tableType = 'person'
+    }
   },
   mounted() {
     this.fetchData()
@@ -450,7 +455,7 @@ export default {
     },
     handleTabClick(tab) {
       if (tab.name === 'all') {
-        this.tableType = 'com'
+        this.tableType = this.btnPermission.includes('company') ? 'com' : 'person'
       }
       // this.setListParams(tab.name, tab.name == 'pending' ? this.tableType : null, null)
       this.page = this.$refs.commTable.page = 1