kts-components-document-access-point 1.4.12 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/DocumentWhiteList/___demo___/base/index.d.ts +2 -1
  2. package/dist/DocumentWhiteList/___demo___/setService/index.d.ts +2 -1
  3. package/dist/DocumentWhiteList/control/actions/addblack/index.d.ts +1 -1
  4. package/dist/DocumentWhiteList/control/actions/addwhite/index.d.ts +1 -1
  5. package/dist/DocumentWhiteList/control/actions/blacklist/index.d.ts +1 -1
  6. package/dist/DocumentWhiteList/control/actions/demo/index.d.ts +1 -1
  7. package/dist/DocumentWhiteList/control/actions/didilist/index.d.ts +1 -1
  8. package/dist/DocumentWhiteList/control/actions/enableblacklist/index.d.ts +1 -1
  9. package/dist/DocumentWhiteList/control/actions/enablelist/index.d.ts +1 -1
  10. package/dist/DocumentWhiteList/control/actions/enablewhitelist/index.d.ts +1 -1
  11. package/dist/DocumentWhiteList/control/actions/getmode/index.d.ts +1 -1
  12. package/dist/DocumentWhiteList/control/actions/synclist/index.d.ts +1 -1
  13. package/dist/DocumentWhiteList/control/actions/whitelist/index.d.ts +1 -1
  14. package/dist/DocumentWhiteList/index.d.ts +1 -1
  15. package/dist/DocumentWhiteList/ui/UnifiedSearch/index.d.ts +11 -0
  16. package/dist/DocumentWhiteList/ui/clientmodal/index.d.ts +2 -1
  17. package/dist/DocumentWhiteList/ui/main/black.d.ts +2 -1
  18. package/dist/DocumentWhiteList/ui/main/index.d.ts +2 -1
  19. package/dist/DocumentWhiteList/ui/main/switchmode.d.ts +2 -1
  20. package/dist/DocumentWhiteList/ui/main/white.d.ts +2 -1
  21. package/dist/DocumentWhiteList/ui/pageheader/BlackHeader.d.ts +2 -1
  22. package/dist/DocumentWhiteList/ui/pageheader/WhiteHeader.d.ts +2 -1
  23. package/dist/DocumentWhiteList/ui/pageui/index.d.ts +1 -1
  24. package/dist/DocumentWhiteList/ui/whitemodal/index.d.ts +2 -1
  25. package/dist/DocumentsCont/___demo___/base/index.d.ts +2 -1
  26. package/dist/DocumentsCont/___demo___/setService/index.d.ts +2 -1
  27. package/dist/DocumentsCont/index.d.ts +1 -1
  28. package/dist/DocumentsDemo/Text.d.ts +2 -1
  29. package/dist/DocumentsDemo/___demo___/base/index.d.ts +2 -1
  30. package/dist/DocumentsDemo/index.d.ts +1 -1
  31. package/dist/DocumentsEdit/DocumentsEditController/DocumentsEditControllerState/IProperties/index.d.ts +3 -3
  32. package/dist/DocumentsEdit/DocumentsEditController/DocumentsEditControllerState/RuleState/index.d.ts +1 -1
  33. package/dist/DocumentsEdit/DocumentsEditController/actions/addProperties/index.d.ts +3 -3
  34. package/dist/DocumentsEdit/DocumentsEditController/actions/delProperties/index.d.ts +1 -1
  35. package/dist/DocumentsEdit/___demo___/conventional/index.d.ts +2 -1
  36. package/dist/DocumentsEdit/___demo___/monitor/index.d.ts +2 -1
  37. package/dist/DocumentsEdit/___demo___/readOnly/index.d.ts +2 -1
  38. package/dist/DocumentsEdit/index.d.ts +1 -1
  39. package/dist/DocumentsEdit/ui/AddPropertyButton/index.d.ts +2 -1
  40. package/dist/DocumentsEdit/ui/Breadcrumb/index.d.ts +2 -1
  41. package/dist/DocumentsEdit/ui/EditProperty/index.d.ts +2 -1
  42. package/dist/DocumentsEdit/ui/EditRule/index.d.ts +2 -1
  43. package/dist/DocumentsEdit/ui/EditRule/ui/AddRuleButton/index.d.ts +2 -1
  44. package/dist/DocumentsEdit/ui/EditRule/ui/DelRuleButton/index.d.ts +2 -1
  45. package/dist/DocumentsEdit/ui/EditRule/ui/RuleForm/fn/algorithmFormComponent/index.d.ts +2 -1
  46. package/dist/DocumentsEdit/ui/EditRule/ui/RuleForm/index.d.ts +2 -1
  47. package/dist/DocumentsEdit/ui/PropertyTable/hooks/useTableProps/ui/AddChildPropertyButton/index.d.ts +2 -1
  48. package/dist/DocumentsEdit/ui/PropertyTable/hooks/useTableProps/ui/AddRuleButton/index.d.ts +2 -1
  49. package/dist/DocumentsEdit/ui/PropertyTable/hooks/useTableProps/ui/EditPropertyButton/index.d.ts +2 -1
  50. package/dist/DocumentsEdit/ui/PropertyTable/index.d.ts +2 -1
  51. package/dist/DocumentsEdit/ui/RefPropertyButton/index.d.ts +2 -1
  52. package/dist/DocumentsList/DocumentsListController/actions/demo/index.d.ts +1 -1
  53. package/dist/DocumentsList/___demo___/list/index.d.ts +2 -1
  54. package/dist/DocumentsList/index.d.ts +1 -1
  55. package/dist/DocumentsList/ui/ModalComfirm/index.d.ts +2 -1
  56. package/dist/DocumentsList/ui/PageHeader/SendHeader.d.ts +2 -1
  57. package/dist/DocumentsList/ui/PageHeader/index.d.ts +2 -1
  58. package/dist/DocumentsList/ui/PageUI/index.d.ts +1 -1
  59. package/dist/DocumentsList/ui/RuleTable/index.d.ts +2 -1
  60. package/dist/DocumentsList/ui/sendlist/index.d.ts +2 -1
  61. package/dist/DocumentsRule/index.d.ts +1 -1
  62. package/dist/DocumentsRule/ui/main/index.d.ts +2 -1
  63. package/dist/index.esm.js +3140 -4165
  64. package/dist/index.js +3131 -4156
  65. package/package.json +5 -5
  66. package/src/DocumentWhiteList/control/actions/checkclient/index.ts +1 -1
  67. package/src/DocumentWhiteList/ui/UnifiedSearch/index.scss +119 -0
  68. package/src/DocumentWhiteList/ui/UnifiedSearch/index.tsx +146 -0
  69. package/src/DocumentWhiteList/ui/pageheader/BlackHeader.tsx +8 -78
  70. package/src/DocumentWhiteList/ui/pageheader/WhiteHeader.tsx +8 -77
  71. package/src/DocumentsEdit/constant/propertyColumns/index.tsx +1 -1
  72. package/src/DocumentsEdit/ui/EditRule/ui/RuleForm/fn/algorithmFormComponent/index.tsx +3 -3
  73. package/src/DocumentsList/index.less +0 -23
  74. package/src/DocumentsList/ui/PageHeader/SendHeader.tsx +168 -107
  75. package/src/DocumentsList/ui/PageHeader/index.tsx +272 -184
  76. package/tsconfig.json +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-components-document-access-point",
3
- "version": "1.4.12",
3
+ "version": "2.0.0",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "start": "dumi dev",
@@ -33,9 +33,9 @@
33
33
  "antd": "3.26.20",
34
34
  "grey-react-box": "0.2.15",
35
35
  "kts-component-service": "^1.0.4",
36
- "kts-components": "^1.2.26",
37
- "kts-components-antd-x4": "^4.0.3",
38
- "kts-xui": "^1.0.31",
36
+ "kts-components": "1.3.9",
37
+ "kts-components-antd-x4": "5.0.0",
38
+ "kts-xui": "^2.2.29",
39
39
  "lodash": "^4.17.21",
40
40
  "moment": "2.29.1",
41
41
  "query-string": "^7.0.1",
@@ -47,7 +47,7 @@
47
47
  "@types/lodash": "^4.14.171",
48
48
  "@umijs/test": "^3.0.5",
49
49
  "dumi": "^1.0.16",
50
- "father-build": "^1.17.2",
50
+ "father-build": "^1.22.5",
51
51
  "gh-pages": "^3.0.0",
52
52
  "lint-staged": "^10.0.7",
53
53
  "prettier": "^2.2.1",
@@ -4,7 +4,7 @@ import { DocumentsService } from "../../../..";
4
4
 
5
5
 
6
6
  export default async (s: ControllerState,) => {
7
- const res = await DocumentsService.instance.service?.call({ url: '/whiteblacklist/config/showButton', data: {}, type: 'post' }) as any;
7
+ const res = await DocumentsService.instance.service!.call({ url: '/whiteblacklist/config/showButton', data: {}, type: 'post' }) as any;
8
8
  if (res.err) {
9
9
  return false;
10
10
  }
@@ -0,0 +1,119 @@
1
+ // UnifiedSearch 组件样式 - 控件只有下边框
2
+ .unifiedSearch {
3
+ :global(.ktsAntX-xui-page-header-foot){
4
+ box-shadow: none !important;
5
+ }
6
+ :global(.ktsAntX-xui-page-header-foot::after) {
7
+ box-shadow: none !important;
8
+ }
9
+ :global(.ktsAntX-xui-page-header-foot .ktsAntX-xui-page-header-operate) {
10
+ border: none !important;
11
+ }
12
+ :global(.ktsAntX-xui-page-header-operate){
13
+ padding: 0px !important;
14
+ }
15
+ }
16
+
17
+ // 按钮容器样式
18
+ .btnBox {
19
+ display: flex;
20
+ flex-direction: row;
21
+ align-items: flex-start;
22
+ justify-content: flex-end;
23
+ flex: 1;
24
+ margin-top: 13px;
25
+ .btn {
26
+ height:30px;
27
+ line-height: 30px;
28
+ background-color:rgba(0,116,255,1);
29
+ border-radius:15px;
30
+ border:1px solid rgba(0,116,255,1);
31
+ font-size:12px;
32
+ color: #FFFFFF;
33
+ padding: 0px 28px;
34
+ cursor: pointer;
35
+ margin-left: 10px;
36
+ word-break: keep-all;
37
+ }
38
+ .moreBtn {
39
+ height:30px;
40
+ line-height: 30px;
41
+ background-color: #ffffff;
42
+ border-radius:15px;
43
+ border:1px solid #0074FF;
44
+ font-size:12px;
45
+ color: #0074FF;
46
+ padding: 0px 28px;
47
+ cursor: pointer;
48
+ margin-left: 10px;
49
+ word-break: keep-all;
50
+ }
51
+ .moreBtn:hover {
52
+ background-color: rgba(0, 116, 255, 0.2);
53
+ }
54
+ .refreshBtn {
55
+ padding: 0 18px;
56
+ justify-content: center;
57
+ align-items: center;
58
+ display: inline-flex;
59
+ .refreshIcon {
60
+ height: 18px;
61
+ width: 18px;
62
+ }
63
+ }
64
+ }
65
+
66
+ // 全局样式 - 所有输入框只显示下边框
67
+ :global(.underline-datepicker) {
68
+ :global(.ant-input){
69
+ border: none !important;
70
+ border-bottom: 1px solid #d9d9d9 !important;
71
+ }
72
+ }
73
+ :global(.underline){
74
+ :global(.ktsAntX-select-selector){
75
+ border: none !important;
76
+ border-bottom: 1px solid #d9d9d9 !important;
77
+ }
78
+ }
79
+ // kts-xui 组件全局样式覆盖 - 只显示下边框
80
+ :global(.ktsAntX-xui-input .ant-input) {
81
+ border: none !important;
82
+ border-bottom: 1px solid #d9d9d9 !important;
83
+ border-radius: 0 !important;
84
+ box-shadow: none !important;
85
+ background: transparent !important;
86
+ outline: none !important;
87
+ }
88
+
89
+ :global(.ktsAntX-xui-input .ant-input:focus),
90
+ :global(.ktsAntX-xui-input .ant-input:hover) {
91
+ border-bottom: 1px solid #40a9ff !important;
92
+ box-shadow: none !important;
93
+ }
94
+
95
+ :global(.ktsAntX-xui-input .ant-input:focus) {
96
+ border-bottom: 1px solid #1890ff !important;
97
+ }
98
+
99
+ :global(.ktsAntX-xui-select .ant-select-selector) {
100
+ border: none !important;
101
+ border-bottom: 1px solid #d9d9d9 !important;
102
+ border-radius: 0 !important;
103
+ box-shadow: none !important;
104
+ background: transparent !important;
105
+ outline: none !important;
106
+ }
107
+
108
+ :global(.ktsAntX-xui-select .ant-select-selector:hover) {
109
+ border-bottom: 1px solid #40a9ff !important;
110
+ }
111
+
112
+ :global(.ktsAntX-xui-select.ant-select-focused .ant-select-selector) {
113
+ border-bottom: 1px solid #1890ff !important;
114
+ box-shadow: none !important;
115
+ }
116
+
117
+ :global(.ktsAntX-xui-select .ant-select-arrow) {
118
+ color: #666;
119
+ }
@@ -0,0 +1,146 @@
1
+ import * as React from "react";
2
+ import {
3
+ ISearchItemProps,
4
+ Search as SearchXui,
5
+ searchFormat,
6
+ searchUnFormat,
7
+ } from "kts-xui";
8
+ import { Select, DatePicker } from "antd";
9
+ import { Select as SearchSelect } from "kts-xui";
10
+
11
+ const { Option } = Select;
12
+ const { RangePicker } = DatePicker;
13
+
14
+ interface UnifiedSearchProps {
15
+ searchFormSubmit: (values: any) => void;
16
+ searchValues: any;
17
+ right?: any;
18
+ onRefresh?: () => void;
19
+ didlist?: any[];
20
+ labelCol?: number; // 标签列数,默认为 7
21
+ }
22
+
23
+ export default function UnifiedSearch(props: UnifiedSearchProps) {
24
+ const {
25
+ searchFormSubmit,
26
+ searchValues,
27
+ right,
28
+ onRefresh,
29
+ didlist = [],
30
+ labelCol = 7,
31
+ } = props;
32
+
33
+ // 动态生成 formItems
34
+ const formItems: ISearchItemProps[] = React.useMemo(() => {
35
+ const items: ISearchItemProps[] = [];
36
+
37
+ // DID
38
+ items.push({
39
+ name: "customerDid",
40
+ label: "DID",
41
+ children: <SearchXui.Input />,
42
+ });
43
+
44
+ // 所属公司
45
+ items.push({
46
+ name: "customerName",
47
+ label: "所属公司",
48
+ children: <SearchXui.Input />,
49
+ });
50
+
51
+ // 我司对应DID
52
+ items.push({
53
+ name: "companyDid",
54
+ label: "我司对应DID",
55
+ children: (
56
+ <SearchSelect className="underline" allowClear={true}>
57
+ {didlist.map((item: any) => (
58
+ <Option key={item.participantId} value={item.participantId}>
59
+ {item.remarkName + ':' + item.participantId}
60
+ </Option>
61
+ ))}
62
+ </SearchSelect>
63
+ ),
64
+ });
65
+
66
+ // 数据状态
67
+ items.push({
68
+ name: "dataStatus",
69
+ label: "数据状态",
70
+ children: (
71
+ <SearchSelect className="underline" allowClear={true}>
72
+ <Option value={1}>使用中</Option>
73
+ <Option value={2}>停用</Option>
74
+ </SearchSelect>
75
+ ),
76
+ });
77
+
78
+ // 创建时间
79
+ items.push({
80
+ name: "createTime",
81
+ label: "创建时间",
82
+ children: (
83
+ <RangePicker
84
+ style={{ width: "100%" }}
85
+ showTime={true}
86
+ format="YYYY-MM-DD HH:mm:ss"
87
+ placeholder={["开始时间", "结束时间"]}
88
+ className="underline-datepicker"
89
+ />
90
+ ),
91
+ });
92
+
93
+ return items;
94
+ }, [didlist]);
95
+
96
+ const { search, inventory, setSearchValues } = SearchXui.useCreate({
97
+ labelCol,
98
+ onSubmit: (e) => {
99
+ if (searchFormSubmit) {
100
+ // 处理日期字段格式转换
101
+ const processedValues = {
102
+ ...e,
103
+ beginCreateTime: e.createTime && e.createTime[0] ? e.createTime[0].format('YYYY-MM-DD 00:00:00') : undefined,
104
+ endCreateTime: e.createTime && e.createTime[1] ? e.createTime[1].format('YYYY-MM-DD 23:59:59') : undefined,
105
+ pageNum: 1,
106
+ pageSize: 10
107
+ };
108
+ // 移除原始的 createTime 字段,因为已经转换了
109
+ delete processedValues.createTime;
110
+ searchFormSubmit(processedValues);
111
+ }
112
+ },
113
+ values: React.useMemo(() => {
114
+ // 将搜索值转换回组件所需的格式
115
+ const convertedValues = { ...searchValues };
116
+ if (searchValues.beginCreateTime && searchValues.endCreateTime) {
117
+ // 如果有处理过的日期字段,需要转换回来
118
+ // 这里可能需要根据实际需求调整
119
+ convertedValues.createTime = [searchValues.beginCreateTime, searchValues.endCreateTime];
120
+ }
121
+ return searchUnFormat(convertedValues, formItems);
122
+ }, [searchValues, formItems]),
123
+ formItems,
124
+ });
125
+
126
+ React.useEffect(() => {
127
+ const convertedValues = { ...searchValues };
128
+ if (searchValues.beginCreateTime && searchValues.endCreateTime) {
129
+ convertedValues.createTime = [searchValues.beginCreateTime, searchValues.endCreateTime];
130
+ }
131
+ setSearchValues(searchUnFormat(convertedValues, formItems));
132
+ }, [formItems, searchValues, setSearchValues]);
133
+
134
+ return (
135
+ <div style={{ width: "100%" }} className={'unifiedSearch'}>
136
+ <div style={{ display: "flex", alignItems: "flex-start", gap: "16px" }}>
137
+ <div style={{ flex: 1 }}>{search}</div>
138
+ {right && (
139
+ <div style={{ display: "flex", alignItems: "center", gap: "8px" }}>
140
+ {right}
141
+ </div>
142
+ )}
143
+ </div>
144
+ </div>
145
+ );
146
+ }
@@ -1,13 +1,10 @@
1
1
  import React, { useState, useEffect, useCallback } from 'react';
2
2
  import { Button, PageHeaderFoot } from 'kts-xui';
3
- import { AdvancedSearch, KtsForm } from 'kts-components';
4
3
  import Main from '../../index';
5
- // import { LifeCycleTypes } from "@formily/antd";
4
+ import UnifiedSearch from '../UnifiedSearch';
6
5
  import _ from 'lodash';
7
- import moment from 'moment';
8
6
  export default () => {
9
7
  const controller = Main.useController();
10
- const [schema, setSchema] = useState({});
11
8
  const pageMeta = controller.useMemo((s) => s.pageMeta, []);
12
9
  const params = controller.useMemo(s => s.params, [])
13
10
  const clientInfo = controller.useMemo(s => s.clientInfo, [])
@@ -16,13 +13,6 @@ export default () => {
16
13
  const didlist = controller.useMemo((s) => s.didlist, []);
17
14
  const [companyDidNote, setNote] = useState('');
18
15
  const onSearchFormSubmit = React.useCallback((value) => {
19
- value = {
20
- ...value,
21
- beginCreateTime: value['beginCreateTime'] && moment(value['beginCreateTime']).format('YYYY-MM-DD 00:00:00'),
22
- endCreateTime: value['endCreateTime'] && moment(value['endCreateTime']).format('YYYY-MM-DD 23:59:59'),
23
- pageNum: 1,
24
- pageSize: 10
25
- }
26
16
  controller.pipeline(async s => {
27
17
  s.params = value;
28
18
  })()
@@ -33,54 +23,7 @@ export default () => {
33
23
  useEffect(() => {
34
24
  controller.didList({}) as any;
35
25
  }, []);
36
- useEffect(() => {
37
- const didEnum = didlist.map(item => {
38
- return { label: item.remarkName + ':' + item.participantId, value: item.participantId };
39
- })
40
- let obj: any = {
41
- type: "object",
42
- properties: {
43
- customerDid: {
44
- type: "string",
45
- title: "DID",
46
- },
47
- customerName: {
48
- type: "string",
49
- title: "所属公司",
50
- },
51
- companyDid: {
52
- type: "string",
53
- title: "我司对应DID",
54
- enum: didEnum
55
- },
56
- dataStatus: {
57
- type: "string",
58
- title: "数据状态",
59
- enum: [{
60
- "label": "使用中",
61
- "value": 1
62
- }, {
63
- "label": "停用",
64
- "value": 2
65
- }],
66
- },
67
- createTime: {
68
- type: "daterange",
69
- title: "创建时间",
70
- 'x-props':{
71
- extendsFields: ['beginCreateTime', 'endCreateTime'],
72
- }
73
- },
74
- // '[beginUpdateTime,endUpdateTime]': {
75
- // key: "[beginUpdateTime,endUpdateTime]",
76
- // name: "[beginUpdateTime,endUpdateTime]",
77
- // type: "daterange",
78
- // title: "更新时间",
79
- // },
80
- }
81
- }
82
- setSchema(obj);
83
- }, [didlist])
26
+ // UnifiedSearch 组件内部处理字段定义,不需要 schema
84
27
  const batchBlockList = useCallback((type: number) => {
85
28
  (async () => {
86
29
  const res = await controller.enableblacklist({
@@ -106,27 +49,14 @@ export default () => {
106
49
  }, []);
107
50
  const topExpand = useCallback(() => {
108
51
  return (
109
- <AdvancedSearch
110
- width={380}
111
- height={44}
112
- compact={true}
113
- defaultKey="customerDid"
114
- placeholder="输入DID"
52
+ <UnifiedSearch
115
53
  searchFormSubmit={onSearchFormSubmit}
116
- >
117
- <KtsForm
118
- labelCol={9}
119
- wrapperCol={15}
120
- labelAlign='left'
121
- compact={true}
122
- schema={schema}
123
- defaultValue={params}
124
-
125
- >
126
- </KtsForm>
127
- </AdvancedSearch>
54
+ searchValues={params}
55
+ didlist={didlist}
56
+ labelCol={9}
57
+ />
128
58
  );
129
- }, [schema, params]);
59
+ }, [params, didlist]);
130
60
  return (
131
61
  <div style={{ flex: 'none', position: 'relative', zIndex: 1 }} >
132
62
  <PageHeaderFoot
@@ -1,12 +1,10 @@
1
1
  import React, { useState, useEffect, useCallback } from 'react';
2
2
  import { Button, PageHeaderFoot } from 'kts-xui';
3
- import { AdvancedSearch, KtsForm } from 'kts-components';
4
3
  import Main from '../../index';
4
+ import UnifiedSearch from '../UnifiedSearch';
5
5
  import _ from 'lodash';
6
- import moment from 'moment';
7
6
  export default () => {
8
7
  const controller = Main.useController();
9
- const [schema, setSchema] = useState({});
10
8
  const pageMeta = controller.useMemo((s) => s.pageMeta, []);
11
9
  const whiteParams = controller.useMemo(s => s.whiteParams, [])
12
10
  const clientInfo = controller.useMemo(s => s.clientInfo, [])
@@ -14,13 +12,6 @@ export default () => {
14
12
  const disabled = selectedRowKey.length > 0 ? false : true
15
13
  const didlist = controller.useMemo((s) => s.didlist, []);
16
14
  const onSearchFormSubmit = React.useCallback((value) => {
17
- value = {
18
- ...value,
19
- beginCreateTime: value['beginCreateTime'] && moment(value['beginCreateTime']).format('YYYY-MM-DD 00:00:00'),
20
- endCreateTime: value['endCreateTime'] && moment(value['endCreateTime']).format('YYYY-MM-DD 23:59:59'),
21
- pageNum: 1,
22
- pageSize: 10
23
- }
24
15
  controller.pipeline(async s => {
25
16
  s.whiteParams = value;
26
17
  })()
@@ -40,55 +31,7 @@ export default () => {
40
31
 
41
32
 
42
33
  }, []);
43
- useEffect(() => {
44
- const didEnum = didlist.map(item => {
45
- return { label: item.remarkName + ':' + item.participantId, value: item.participantId };
46
- })
47
-
48
- let obj: any = {
49
- type: "object",
50
- properties: {
51
- customerDid: {
52
- type: "string",
53
- title: "DID",
54
- },
55
- customerName: {
56
- type: "string",
57
- title: "所属公司",
58
- },
59
- companyDid: {
60
- type: "string",
61
- title: "我司对应DID",
62
- enum: didEnum
63
- },
64
- dataStatus: {
65
- type: "string",
66
- title: "数据状态",
67
- enum: [{
68
- "label": "使用中",
69
- "value": 1
70
- }, {
71
- "label": "停用",
72
- "value": 2
73
- }],
74
- },
75
- createTime: {
76
- type: "daterange",
77
- title: "创建时间",
78
- 'x-props':{
79
- extendsFields: ['beginCreateTime', 'endCreateTime'],
80
- }
81
- },
82
- // '[beginUpdateTime,endUpdateTime]': {
83
- // key: "[beginUpdateTime,endUpdateTime]",
84
- // name: "[beginUpdateTime,endUpdateTime]",
85
- // type: "daterange",
86
- // title: "更新时间",
87
- // },
88
- }
89
- }
90
- setSchema(obj);
91
- }, [didlist])
34
+ // UnifiedSearch 组件内部处理字段定义,不需要 schema
92
35
  const batchBlockList = useCallback((type: number) => {
93
36
  (async () => {
94
37
  const res = await controller.enablewhitelist({
@@ -114,26 +57,14 @@ export default () => {
114
57
  }, []);
115
58
  const topExpand = useCallback(() => {
116
59
  return (
117
- <AdvancedSearch
118
- width={380}
119
- height={44}
120
- compact={true}
121
- defaultKey="customerDid"
122
- placeholder="输入DID"
60
+ <UnifiedSearch
123
61
  searchFormSubmit={onSearchFormSubmit}
124
- >
125
- <KtsForm
126
- labelCol={9}
127
- wrapperCol={15}
128
- labelAlign='left'
129
- compact={true}
130
- schema={schema}
131
- defaultValue={whiteParams}
132
- >
133
- </KtsForm>
134
- </AdvancedSearch>
62
+ searchValues={whiteParams}
63
+ didlist={didlist}
64
+ labelCol={9}
65
+ />
135
66
  );
136
- }, [schema, whiteParams]);
67
+ }, [whiteParams, didlist]);
137
68
  return (
138
69
  <div style={{ flex: 'none', position: 'relative', zIndex: 1 }} >
139
70
  <PageHeaderFoot
@@ -46,7 +46,7 @@ const propertyColumns: ColumnType<any>[] = [
46
46
  },
47
47
  ]
48
48
 
49
- class MySpan extends React.Component {
49
+ class MySpan extends React.Component<any> {
50
50
  render() {
51
51
  return (
52
52
  <span style={{ padding: '0 8px' }}>
@@ -13,7 +13,7 @@ export default function algorithmFormComponent(operator: IOperator, ruleProperti
13
13
 
14
14
  const info = ruleProperties.items ? ruleProperties.items : ruleProperties;
15
15
 
16
- function renderFormItem(child: React.ReactChild) {
16
+ function renderFormItem(child: React.ReactNode) {
17
17
  return (
18
18
  <Form.Item key={`algorithmForm_${operator.name}`} {...operator}>
19
19
  {child}
@@ -109,7 +109,7 @@ const MyDatePickerTime = (props: { value?: any, disabled?: boolean, onChange?: (
109
109
  props.onChange && props.onChange(e ? e.format('YYYY-MM-DDTHH:mm:ss') : undefined)
110
110
  }, [props.onChange])
111
111
  const value = React.useMemo(() => props.value ? moment(props.value) : undefined, [props.value])
112
- return <DatePicker disabled={props.disabled} value={value} onChange={onChange} showTime />
112
+ return <DatePicker disabled={props.disabled} value={value as any} onChange={onChange} showTime />
113
113
  }
114
114
 
115
115
  const MyDatePicker = (props: { value?: any, disabled?: boolean, onChange?: (e: any) => void }) => {
@@ -117,7 +117,7 @@ const MyDatePicker = (props: { value?: any, disabled?: boolean, onChange?: (e: a
117
117
  props.onChange && props.onChange(e ? e.format('YYYY-MM-DD') : undefined)
118
118
  }, [props.onChange])
119
119
  const value = React.useMemo(() => props.value ? moment(props.value) : undefined, [props.value])
120
- return <DatePicker disabled={props.disabled} value={value} onChange={onChange} />
120
+ return <DatePicker disabled={props.disabled} value={value as any} onChange={onChange} />
121
121
  }
122
122
 
123
123
  const MyArray = (props: { readOnly?: boolean, value?: string[] | string, onChange?: (e: string) => void }) => {
@@ -1,23 +0,0 @@
1
- .header{
2
- padding:10px 0px;
3
- display: flex;
4
- align-items: center;
5
- .buttonGroup{
6
- margin-right: 20px;
7
- white-space: nowrap;
8
- }
9
- .buttons{
10
- text-align: right;
11
- flex: 1;
12
- white-space: nowrap;
13
- }
14
- }
15
- .tabel-action{
16
- padding: 0 5px;
17
- font-size: 12px;
18
- font-family: PingFangSC-Regular,PingFang SC;
19
- font-weight: 400;
20
- color: #0074ff;
21
- white-space: nowrap;
22
- cursor: pointer;
23
- }