Browse Source

feat: 数据看板 - 公众号数据&公众号数据趋势&短剧数据&短剧粉丝激活趋势 - 权限控制逻辑

zhengxy 2 years ago
parent
commit
9789588042

+ 7 - 1
project/src/components/dataBoard/playletData.vue

@@ -8,7 +8,7 @@
8 8
           @channelDefine="(val) => { playlet_id = val; duplicateRemovalData.flag = false; init(1) }">
9 9
         </self-channel>
10 10
       </div>
11
-      <el-button type="primary" size="mini" @click="init(1, 'export')">导出Excel</el-button>
11
+      <el-button v-if="isCanExport" type="primary" size="mini" @click="init(1, 'export')">导出Excel</el-button>
12 12
     </div>
13 13
     <div class="dataInfoBox">
14 14
       <div class="dataInfoItem">
@@ -315,6 +315,12 @@ export default {
315 315
       },//去重数据
316 316
     }
317 317
   },
318
+  computed: {
319
+    // 是否有“导出”权限
320
+    isCanExport() {
321
+      return !!this.$store.state.dataBoardAuth.can_export
322
+    },
323
+  },
318 324
   created () {
319 325
     this.height = document.documentElement.clientHeight - 300 > 400 ? document.documentElement.clientHeight - 400 : 400
320 326
     this.time = this.default_time

+ 7 - 1
project/src/components/dataBoard/playletFansActTrend.vue

@@ -21,7 +21,7 @@
21 21
         </div>
22 22
 
23 23
       </div>
24
-      <el-button type="primary" size="mini" @click="init(1, 'export')">导出Excel</el-button>
24
+      <el-button v-if="isCanExport" type="primary" size="mini" @click="init(1, 'export')">导出Excel</el-button>
25 25
     </div>
26 26
     <ux-grid ref="plxTable" :border="false" @row-click="() => { return }"
27 27
       :header-cell-style="() => { return { backgroundColor: '#FFFFFF !important', border: 'none!important' } }"
@@ -118,6 +118,12 @@ export default {
118 118
       max_paid: ''
119 119
     }
120 120
   },
121
+  computed: {
122
+    // 是否有“导出”权限
123
+    isCanExport() {
124
+      return !!this.$store.state.dataBoardAuth.can_export
125
+    },
126
+  },
121 127
   created () {
122 128
     this.time = this.default_time
123 129
     this.height = document.documentElement.clientHeight - 220 > 400 ? document.documentElement.clientHeight - 220 : 400

+ 7 - 1
project/src/components/dataBoard/thePublic.vue

@@ -7,7 +7,7 @@
7 7
         <self-channel title="公众号" type='thePublic' @channelDefine="publicChange">
8 8
         </self-channel>
9 9
       </div>
10
-      <el-button type="primary" size="mini" @click="init(1, 'export')">导出Excel</el-button>
10
+      <el-button v-if="isCanExport" type="primary" size="mini" @click="init(1, 'export')">导出Excel</el-button>
11 11
     </div>
12 12
     <div class="dataInfoBox">
13 13
       <div class="dataInfoItem">
@@ -310,6 +310,12 @@ export default {
310 310
       },//去重数据
311 311
     }
312 312
   },
313
+  computed: {
314
+    // 是否有“导出”权限
315
+    isCanExport() {
316
+      return !!this.$store.state.dataBoardAuth.can_export
317
+    },
318
+  },
313 319
   created () {
314 320
     this.height = document.documentElement.clientHeight - 300 > 400 ? document.documentElement.clientHeight - 400 : 400
315 321
     this.time = this.default_time

+ 7 - 1
project/src/components/dataBoard/thePublicTrend.vue

@@ -7,7 +7,7 @@
7 7
         <self-channel title="公众号" type='thePublic' @channelDefine="publicChange">
8 8
         </self-channel>
9 9
       </div>
10
-      <el-button type="primary" size="mini" @click="init(1, 'export')">导出Excel</el-button>
10
+      <el-button v-if="isCanExport" type="primary" size="mini" @click="init(1, 'export')">导出Excel</el-button>
11 11
     </div>
12 12
     <div class="dataInfoBox" v-loading="dataLoading">
13 13
       <div class="dataInfoItem" v-for="(item, index) in dataInfoArrs" :key="index">
@@ -255,6 +255,12 @@ export default {
255 255
       },//去重数据
256 256
     }
257 257
   },
258
+  computed: {
259
+    // 是否有“导出”权限
260
+    isCanExport() {
261
+      return !!this.$store.state.dataBoardAuth.can_export
262
+    },
263
+  },
258 264
   created () {
259 265
     this.time = this.default_time
260 266
     this.height = document.documentElement.clientHeight - 350 > 400 ? document.documentElement.clientHeight - 350 : 400