Explorar el Código

Merge remote-tracking branch 'origin/saas_adminUi' into saas_adminUi

yys hace 2 días
padre
commit
c262b3653a
Se han modificado 1 ficheros con 13 adiciones y 1 borrados
  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)