config.data.ts
1.2 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
import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { findDictItemByCode } from '/@/api/system/dict';
export const columns: BasicColumn[] = [
  {
    title: '场景联动名称',
    dataIndex: 'name',
  },
  {
    title: '触发方式',
    // dataIndex: 'name',
    width: 200,
  },
  {
    title: '状态',
    dataIndex: 'status',
    width: 200,
  },
  {
    title: '描述',
    dataIndex: 'description',
    width: 180,
  },
];
export const formSchema: FormSchema[] = [
  {
    field: 'configName',
    label: '场景联动名称',
    required: true,
    component: 'Input',
  },
  {
    field: 'messageType',
    label: '所属组织',
    required: true,
    component: 'ApiSelect',
    componentProps: {
      api: findDictItemByCode,
      params: {
        dictCode: 'message_type',
      },
      labelField: 'itemText',
      valueField: 'itemValue',
    },
  },
  {
    field: 'no1',
    label: '触发器',
    required: true,
    component: 'Input',
  },
  {
    field: 'no2',
    label: '执行条件',
    required: true,
    component: 'Input',
  },
  {
    field: 'no3',
    label: '执行动作',
    required: true,
    component: 'Input',
  },
];