Browse Source

查询修改

dev
wenlele 2 years ago
parent
commit
667dbe1f6b
  1. 6
      api/app/lib/controllers/project/index.js
  2. 2
      web/client/src/sections/install/containers/system.jsx

6
api/app/lib/controllers/project/index.js

@ -75,9 +75,11 @@ async function pomsProject (ctx) {
let anxinProjectId = anxinProjectRes.map(v => v.id) let anxinProjectId = anxinProjectRes.map(v => v.id)
findOption.where.$or = [ findOption.where.$or = [
{ name: { $like: `%${keyword}%` } }, { name: { $like: `%${keyword}%` } },]
{ pepProjectId: { $in: projectId } }]
if (projectId.length > 0) { if (projectId.length > 0) {
findOption.where.$or.push({ pepProjectId: { $in: projectId } })
}
if (anxinProjectId.length > 0) {
findOption.where.$or.push({ anxinProjectId: { $contains: anxinProjectId } }) findOption.where.$or.push({ anxinProjectId: { $contains: anxinProjectId } })
} }

2
web/client/src/sections/install/containers/system.jsx

@ -370,7 +370,7 @@ const Example = (props) => {
}} }}
onClick={() => { onClick={() => {
setQuery({ limit: 10, page: 0 }) setQuery({ limit: 10, page: 0 })
getProjectPomsList({ limit: 10, page: 0 }) // getProjectPomsList({ limit: 10, page: 0 })
}} }}
> >
搜索 搜索

Loading…
Cancel
Save