明树Git Lab

Commit bc867b41 authored by zfp1's avatar zfp1

update

parent f87bf6c6
......@@ -115,10 +115,10 @@ async function exportExcel(req, res, next) {
try {
let search = {del: 0};
if (req.body.agrProName) {
search.agrProName = {$regex: req.body.agrProName};
search.name = {$regex: req.body.agrProName};
}
if (req.body.name) {
search.agrProName = {$regex: req.body.name};
search.name = {$regex: req.body.name};
}
if(req.body.startTime) {
search.time = search.time || {};
......
......@@ -147,7 +147,7 @@ async function exportExcel(req, res, next) {
search.agrProName = {$regex: req.body.agrProName};
}
if (req.body.name) {
search.agrProName = {$regex: req.body.name};
search.name = {$regex: req.body.name};
}
if(req.body.startTime) {
search.time = search.time || {};
......
......@@ -22,7 +22,7 @@ const fs = require('fs');
// exportExcel()
async function exportExcel() {
let info = await DB.ExcelRecord.findOne({ type: 2, status: 1 });
let info = await DB.ExcelRecord.findOne({ type: 2, status: 1, del: 0 });
console.log(info);
if (info && info._id && info.modleName) {
let workbook = new ExcelJS.Workbook();
......@@ -38,7 +38,7 @@ async function exportExcel() {
}
}
}
console.log(columns.length, "-=-=-");
console.log(columns.length, "-=-=-", name);
if (columns.length > 0) {
// TODO: 可以优化根据count翻页 暂时
worksheet.columns = columns;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment