疯狂的狮子li
2021-08-13 a5a71bf505252ef6acbaef9c8a0a7eb0e89f917d
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
@@ -307,7 +307,8 @@
</template>
<script>
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName}, export${BusinessName} } from "@/api/${moduleName}/${businessName}";
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
import { downLoadExcel } from "@/utils/download";
export default {
  name: "${BusinessName}",
@@ -561,7 +562,9 @@
          this.loading = false;
          this.getList();
          this.msgSuccess("删除成功");
        }).catch(() => {});
      }).finally(() => {
          this.loading = false;
      });
    },
#if($table.sub)
   /** ${subTable.functionName}序号 */
@@ -599,18 +602,7 @@
#end
    /** 导出按钮操作 */
    handleExport() {
      const queryParams = this.queryParams;
      this.$confirm('是否确认导出所有${functionName}数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          this.exportLoading = true;
          return export${BusinessName}(queryParams);
        }).then(response => {
          this.download(response.msg);
          this.exportLoading = false;
        }).catch(() => {});
      downLoadExcel('/${moduleName}/${businessName}/export', this.queryParams);
    }
  }
};