config.ts
2.05 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import { BasicColumn, FormSchema } from '/@/components/Table';
import { transformTime } from '/@/hooks/web/useDateToLocaleString';
import { h } from 'vue';
export const columns: BasicColumn[] = [
  {
    title: '创建时间',
    dataIndex: 'createdTime',
    width: 200,
    format: (_text: string, record: Recordable) => {
      return transformTime(record.createdTime);
    },
  },
  {
    title: '名称',
    dataIndex: 'name',
    width: 200,
  },
  {
    title: '说明',
    dataIndex: 'description',
    width: 120,
  },
  {
    title: '默认',
    dataIndex: 'default',
    width: 200,
    format: (_text: string, record: Recordable) => {
      return record.default == false ? '否' : '是';
    },
  },
];
export const searchFormSchema: FormSchema[] = [
  {
    field: 'textSearch',
    label: '租户配置名称',
    colProps: { span: 6 },
    component: 'Input',
    componentProps: {
      maxLength: 255,
      placeholder: '请输入租户配置名称',
    },
  },
];
export const formSchema: FormSchema[] = [
  {
    field: 'name',
    label: '名称',
    colProps: { span: 24 },
    required: true,
    component: 'Input',
    componentProps: {
      maxLength: 255,
      placeholder: '请输入名称',
    },
  },
  {
    field: 'isolatedTbRuleEngine',
    label: '',
    component: 'Checkbox',
    renderComponentContent: () => {
      return h('span', {}, [
        h('span', {}, '隔离板芯容器中的加工'),
        h('span', { style: { color: 'grey' } }, '(每个独立租户需要单独的微服务)'),
      ]);
    },
  },
  {
    field: 'isolatedTbCore',
    label: '',
    component: 'Checkbox',
    renderComponentContent: () => {
      return h('span', {}, [
        h('span', {}, '在独立的规则引擎中处理'),
        h('span', { style: { color: 'grey' } }, '(每个独立租户需要单独的微服务)'),
      ]);
    },
  },
  {
    field: 'description',
    label: '说明',
    colProps: { span: 24 },
    component: 'InputTextArea',
    componentProps: {
      maxLength: 255,
      placeholder: '请输入说明',
    },
  },
];