Преглед изворни кода

100 总后台内容审计:文章管理点击导出及待审计提示表不存在

Long пре 3 дана
родитељ
комит
20f46de13a
1 измењених фајлова са 13 додато и 1 уклоњено
  1. 13 1
      src/views/admin/article/index.vue

+ 13 - 1
src/views/admin/article/index.vue

@@ -58,7 +58,7 @@
           plain
           icon="el-icon-bar-chart"
           size="mini"
-          @click="showStatistics = true"
+          @click="showStatisticsDialog"
         >文章统计</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -261,6 +261,10 @@ export default {
       })
     },
     handlePending() {
+      if (!this.queryParams.tenantId) {
+        this.$message.warning('请先选择租户')
+        return
+      }
       this.loading = true
       listPendingArticles().then(response => {
         this.articleList = response.rows
@@ -325,12 +329,20 @@ export default {
       })
     },
     showStatisticsDialog() {
+      if (!this.queryParams.tenantId) {
+        this.$message.warning('请先选择租户')
+        return
+      }
       getArticleStatistics().then(response => {
         this.statistics = response.data
         this.showStatistics = true
       })
     },
     handleExport() {
+      if (!this.queryParams.tenantId) {
+        this.$message.warning('请先选择租户')
+        return
+      }
       this.exportLoading = true
       exportAllArticles(this.queryParams).then(response => {
         this.download(response.msg)