明树Git Lab

Commit 803b3e13 authored by zfp1's avatar zfp1

update

parent b5cf3a4e
......@@ -8,7 +8,7 @@ const projectModule = require('../module/projectModule');
async function getProjectFields(req, res, next) {
try {
let rawAttributes = DB.Project.rawAttributes;
let rawAttributes = _.cloneDeep(DB.Project.rawAttributes);
let obj = {
xmjbxx: '项目基本信息',
// jcpfxx: '决策及批复信息',
......
......@@ -20,13 +20,13 @@ async function handleProjectData(ret, queryAttrs) {
for (let index = 0; index < queryAttrs.length; index++) {
const element = queryAttrs[index];
if(rawAttributes[element]) {
queryRawAtr.push(rawAttributes[element]);
if(['danxuan'].includes(element.zjType)) {
queryRawAtr.push(rawAttributes[element]); //查询得所有字段
if(['danxuan'].includes(rawAttributes[element] && rawAttributes[element].zjType)) { //其中需要处理的资源库字段,单选、
resourceKeys.push(element);
}
}
}
console.log(queryRawAtr);
console.log(resourceKeys);
let groupAttr = _.groupBy(queryRawAtr, 'zjType');
return groupAttr;
}
......
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