|
@@ -588,30 +588,13 @@ let mExport = {
|
|
|
});
|
|
|
},
|
|
|
// 导出所有的报表数据
|
|
|
- getAllBackupData: async function (req, res) {
|
|
|
+ async getAllBackupData(req, res) {
|
|
|
try {
|
|
|
- const filePath = "./public/building_reportBackup.zip";
|
|
|
- let rptTemplate = [];
|
|
|
- let rptTplTree = [];
|
|
|
- let rptConfig = [];
|
|
|
- let rptField = [];
|
|
|
- await new Promise(async function (resolve) {
|
|
|
- rptTemplate = await RptTplModel.find({}, "-_id");
|
|
|
- resolve();
|
|
|
- });
|
|
|
-
|
|
|
- await new Promise(async function (resolve) {
|
|
|
- rptTplTree = await TreeNodeModel.find({}, "-_id");
|
|
|
- resolve();
|
|
|
- });
|
|
|
- await new Promise(async function (resolve) {
|
|
|
- rptConfig = await rpt_cfg_mdl.find({}, "-_id");
|
|
|
- resolve();
|
|
|
- });
|
|
|
- await new Promise(async function (resolve) {
|
|
|
- rptField = await Rpt_Map_Fld_Mdl.find({}, "-_id");
|
|
|
- resolve();
|
|
|
- });
|
|
|
+ const filePath = "./public/highWay_reportBackup.zip";
|
|
|
+ const rptConfig = await rpt_cfg_mdl.find({}, "-_id");
|
|
|
+ const rptTemplate = await RptTplModel.find({}, "-_id");
|
|
|
+ const rptTplTree = await TreeNodeModel.find({}, "-_id");
|
|
|
+ const rptField = await Rpt_Map_Fld_Mdl.find({}, "-_id");
|
|
|
var zip = new JSZip();
|
|
|
zip.file(
|
|
|
"报表模板备份.json",
|