Ver Fonte

自动生成代码模板导出代码修改

Wang Zi Wen há 1 ano atrás
pai
commit
47b46cf0df
1 ficheiros alterados com 17 adições e 11 exclusões
  1. 17 11
      ruoyi-generator/src/main/resources/vm/vue/index.vue.vm

+ 17 - 11
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm

@@ -548,19 +548,25 @@ export default {
           this.#[[$modal]]#.msgSuccess("删除成功");
           this.#[[$modal]]#.msgSuccess("删除成功");
         })
         })
     },
     },
+    ## /** 导出按钮操作 */
+    ## handleExport() {
+    ##   const queryParams = this.queryParams;
+    ##   this.$confirm('是否确认导出所有${functionName}数据项?', "警告", {
+    ##       confirmButtonText: "确定",
+    ##       cancelButtonText: "取消",
+    ##       type: "warning"
+    ##     }).then(function() {
+    ##       return export${BusinessName}(queryParams);
+    ##     }).then(response => {
+    ##       this.download(response.msg);
+    ##     })
+    ## },
     /** 导出按钮操作 */
     /** 导出按钮操作 */
     handleExport() {
     handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有${functionName}数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return export${BusinessName}(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-        })
-    },
+        this.download('${moduleName}/${businessName}/export', {
+            ...this.queryParams
+        }, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`)
+    }
       /** 导入按钮操作 */
       /** 导入按钮操作 */
       handleImport() {
       handleImport() {
           this.upload.title = "用户导入";
           this.upload.title = "用户导入";