update 代码生成模板 适配新excel导出

This commit is contained in:
疯狂的狮子li
2021-08-05 10:22:29 +08:00
parent 79bf332c53
commit 4e54190e3a
5 changed files with 23 additions and 35 deletions

View File

@ -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}",
@ -599,18 +600,7 @@ export default {
#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);
}
}
};