Explorar o código

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

Long hai 3 días
pai
achega
20f46de13a
Modificáronse 1 ficheiros con 13 adicións e 1 borrados
  1. 13 1
      src/views/admin/article/index.vue

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

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