明树Git Lab

Commit b5cf3a4e authored by zfp1's avatar zfp1

1

parent b86ed16d
...@@ -696,8 +696,8 @@ async function getOwnProjects(req, res, next) { ...@@ -696,8 +696,8 @@ async function getOwnProjects(req, res, next) {
search.raw = true; search.raw = true;
console.log(search, "-==") console.log(search, "-==")
let ret = await DB.Project.findAndCountAll(search); let ret = await DB.Project.findAndCountAll(search);
// let lastRet = await projectModule.handleProjectData(ret, search.attributes); let lastRet = await projectModule.handleProjectData(ret, search.attributes);
return res.sendData(ret); return res.sendData(lastRet);
} catch (error) { } catch (error) {
next(error); next(error);
} }
......
...@@ -16,11 +16,14 @@ const projectModule = require('../module/projectModule'); ...@@ -16,11 +16,14 @@ const projectModule = require('../module/projectModule');
async function handleProjectData(ret, queryAttrs) { async function handleProjectData(ret, queryAttrs) {
let rawAttributes = DB.Project.rawAttributes; let rawAttributes = DB.Project.rawAttributes;
console.log(rawAttributes, "====") console.log(rawAttributes, "====")
let queryRawAtr = []; let queryRawAtr = [], resourceKeys = [];
for (let index = 0; index < queryAttrs.length; index++) { for (let index = 0; index < queryAttrs.length; index++) {
const element = queryAttrs[index]; const element = queryAttrs[index];
if(rawAttributes[element]) { if(rawAttributes[element]) {
queryRawAtr.push(rawAttributes[element]); queryRawAtr.push(rawAttributes[element]);
if(['danxuan'].includes(element.zjType)) {
resourceKeys.push(element);
}
} }
} }
console.log(queryRawAtr); console.log(queryRawAtr);
......
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