chenrui  1 жил өмнө
parent
commit
267bfbb3c4

+ 14 - 0
src/views/statisticsCharts/components/newPieStatisticsChartscpsy.vue

@@ -49,6 +49,14 @@ export default {
   name: 'CommonBarStatisticsCharts',
   components: { StatisticsHeader, PublicPageHeader, SimpleQuery, AuthButton },
   props: {
+    dataTitle: {
+      type: String,
+      default: ''
+    },
+    pageAuthtablesList: {
+      type: Object,
+      default: () => {},
+    },
     chartsTitle: {
       type: String,
       required: true,
@@ -264,6 +272,12 @@ export default {
     },
   },
   watch: {
+    pageAuthtablesList: {
+      handler(obj) {
+        this.getPageTableSetting(obj.authArrs, obj.pageAuthtables)
+      },
+      deep: true,
+    },
     pieTitle: {
       handler(val) {
         this.options.title.text = val

+ 10 - 0
src/views/statisticsCharts/views/abnormalBaggageClassificationStatisticsCharts.vue

@@ -1,6 +1,7 @@
 <template>
   <CommonPieStatisticsCharts
     charts-title="异常行李分类"
+    :pageAuthtablesList="pageAuthtablesList"
     :query-settings="querySettings"
     :categories="categories"
     :form-data="formData"
@@ -59,6 +60,10 @@ export default {
           requiredWarning: '请先选择统计时间范围',
         },
       ],
+      pageAuthtablesList: {
+        authArrs: [],
+        pageAuthtables:[]
+      },
     }
   },
   computed: {
@@ -77,12 +82,17 @@ export default {
       const { pagecode, qid, auth_id } = this.$route.meta
       //获取页面权限类型组件  pagetype 1模块  2页面  3按钮 4表格 5树形  6弹窗 
       const pageAuths = this.authArrs
+      this.pageAuthtablesList.authArrs = pageAuths
       if (!pageAuths.length) return
       //获取当前页面权限类型
       const pageAuthArrs = pageAuths.filter(item => item['superiorid'] == auth_id)
       if (!pageAuthArrs.length) return
       // console.log(pageAuthArrs)
       this.querySettings.serviceid = pageAuthArrs[0].serviceid
+       //获取图表权限
+      const pageAuthtables = pageAuthArrs.filter(item => item.pagetype == 'chart')
+      this.pageAuthtablesList.pageAuthtables = pageAuthtables
+      if (pageAuthtables?.length) return
     },
   },
 }