index.ts
1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import { TaskTargetEnum } from '/@/views/task/center/config';
import {
ExecuteTimeTypeEnum,
PeriodTypeEnum,
PushWayEnum,
} from '/@/views/task/center/components/DetailModal/config';
import { TaskTypeEnum } from '/@/views/task/center/config';
export interface GetTaskListParamsType {
page: number;
pageSize: number;
state?: string;
tbDeviceId?: string;
}
export interface CreateTaskRecordType {
name: string;
targetType: TaskTargetEnum;
executeTarget: {
organizationId?: string;
deviceProfileId?: string;
deviceType?: string;
cancelExecuteDevices?: string[];
data?: string[];
};
executeContent: {
pushContent: {
rpcCommand: string | Recordable;
};
pushWay: PushWayEnum;
type: TaskTypeEnum;
};
executeTime: {
cron: string;
type: ExecuteTimeTypeEnum;
periodType: PeriodTypeEnum;
period: string;
time: string;
pollUnit: string;
};
}
export interface TaskRecordType extends CreateTaskRecordType {
id: string;
createTime: string;
creator: string;
enabled: boolean;
state: number;
lastExecuteTime?: number;
lastExecuteStr?: string;
tkDeviceTaskCenter?: {
allowState: number;
taskCenterId: string;
tbDeviceId: string;
};
}
export interface GenModbusCommandType {
crc: string;
deviceCode: string;
method: string;
registerAddr: string;
registerNum?: number;
registerValues?: number[];
}
export interface ImmediateExecuteTaskType {
executeTarget: TaskTargetEnum;
id: string;
cronExpression: string;
targetIds: string[];
name: string;
}