Browse Source

获取检查项分组的同时获取检查项

master
巴林闲侠 2 years ago
parent
commit
ffcaf30af4
  1. 6
      api/app/lib/controllers/patrolManage/checkItems.js

6
api/app/lib/controllers/patrolManage/checkItems.js

@ -5,7 +5,11 @@ async function getGroup(ctx, next) {
let rslt = []; let rslt = [];
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
let list = await models.CheckItemsGroup.findAll({}); let list = await models.CheckItemsGroup.findAll({
include: [{
model: models.CheckItems,
}]
});
rslt = list; rslt = list;
error = null; error = null;

Loading…
Cancel
Save