zyp 9 月之前
父节点
当前提交
72477ae05e
共有 1 个文件被更改,包括 22 次插入0 次删除
  1. 22 0
      src/views/store/storeProductCategory/index.vue

+ 22 - 0
src/views/store/storeProductCategory/index.vue

@@ -26,6 +26,15 @@
           v-hasPermi="['store:storeProductCategory:add']"
         >新增</el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['store:storeProductCategory:export']"
+        >导出</el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -273,6 +282,19 @@ export default {
           this.getList();
           this.msgSuccess("删除成功");
         }).catch(function() {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有商品分类数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportStoreProductCategory(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        }).catch(function() {});
     }
   }
 };