mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-17 17:54:32 +08:00
任务视图支持标签筛选
This commit is contained in:
+15
-2
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user