Browse Source

feat: 数据看板 - 推广数据&客户群发&客户朋友圈 -"导出"权限控制逻辑

zhengxy 2 years ago
parent
commit
2e97343041

+ 7 - 1
project/src/components/dataBoard/populariz/customerPyq.vue

@@ -9,7 +9,7 @@
9 9
           @channelDefine="(val) => { circleCreate_val = val; search_change() }"></self-channel>
10 10
       </div>
11 11
       <div class="right">
12
-        <el-button type="primary" size="mini" @click="init(1, 'export')">导出Excel</el-button>
12
+        <el-button v-if="isCanExport" type="primary" size="mini" @click="init(1, 'export')">导出Excel</el-button>
13 13
       </div>
14 14
     </div>
15 15
     <div class="dataInfoBox" v-loading="dataLoading">
@@ -147,6 +147,12 @@ export default {
147 147
       },
148 148
     }
149 149
   },
150
+  computed: {
151
+    // 是否有“导出”权限
152
+    isCanExport() {
153
+      return !!this.$store.state.dataBoardAuth.can_export
154
+    },
155
+  },
150 156
   created () {
151 157
     this.time = this.default_time
152 158
     this.height = document.documentElement.clientHeight - 320 > 400 ? document.documentElement.clientHeight - 320 : 400

+ 7 - 1
project/src/components/dataBoard/populariz/customerSend.vue

@@ -9,7 +9,7 @@
9 9
           @channelDefine="(val) => { circleCreate_val = val; search_change() }"></self-channel>
10 10
       </div>
11 11
       <div class="right">
12
-        <el-button type="primary" size="mini" @click="init(1, 'export')">导出Excel</el-button>
12
+        <el-button v-if="isCanExport" type="primary" size="mini" @click="init(1, 'export')">导出Excel</el-button>
13 13
       </div>
14 14
     </div>
15 15
     <div class="dataInfoBox" v-loading="dataLoading">
@@ -149,6 +149,12 @@ export default {
149 149
       },
150 150
     }
151 151
   },
152
+  computed: {
153
+    // 是否有“导出”权限
154
+    isCanExport() {
155
+      return !!this.$store.state.dataBoardAuth.can_export
156
+    },
157
+  },
152 158
   created () {
153 159
     this.time = this.default_time
154 160
     this.height = document.documentElement.clientHeight - 400 > 400 ? document.documentElement.clientHeight - 400 : 400