mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-07 20:06:08 +08:00
任务视图支持标签筛选
This commit is contained in:
parent
a9cc1cb4b9
commit
4526c84330
|
@ -12,8 +12,7 @@ import {
|
|||
killTask,
|
||||
} from '../config/util';
|
||||
import { promises, existsSync } from 'fs';
|
||||
import { promisify } from 'util';
|
||||
import { Op } from 'sequelize';
|
||||
import { Op, where, col as colFn } from 'sequelize';
|
||||
import path from 'path';
|
||||
|
||||
@Service()
|
||||
|
@ -164,10 +163,24 @@ export default class CronService {
|
|||
}
|
||||
if (operate && operate2) {
|
||||
q[property] = {
|
||||
[Op.or]: [
|
||||
{
|
||||
[operate2]: [
|
||||
{ [operate]: `%${value}%` },
|
||||
{ [operate]: `%${encodeURIComponent(value)}%` },
|
||||
],
|
||||
},
|
||||
{
|
||||
[operate2]: [
|
||||
where(colFn(property), operate, `%${value}%`),
|
||||
where(
|
||||
colFn(property),
|
||||
operate,
|
||||
`%${encodeURIComponent(value)}%`,
|
||||
),
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
query[primaryOperate].push(q);
|
||||
|
|
|
@ -20,7 +20,7 @@ const PROPERTIES = [
|
|||
{ name: '名称', value: 'name' },
|
||||
{ name: '定时规则', value: 'schedule' },
|
||||
{ name: '状态', value: 'status' },
|
||||
// { name: '标签', value: 'labels' },
|
||||
{ name: '标签', value: 'labels' },
|
||||
];
|
||||
|
||||
const EOperation: any = {
|
||||
|
|
Loading…
Reference in New Issue
Block a user