kts-components-document-access-point 2.0.0 → 2.0.2
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.
- package/dist/DocumentsList/DocumentsListController/DocumentsListControllerState/index.d.ts +4 -0
- package/dist/index.esm.js +540 -476
- package/dist/index.js +592 -528
- package/package.json +4 -4
- package/src/DocumentWhiteList/control/actions/blacklist/index.ts +3 -0
- package/src/DocumentWhiteList/control/actions/checkclient/index.ts +4 -1
- package/src/DocumentWhiteList/control/actions/didilist/index.ts +3 -0
- package/src/DocumentWhiteList/control/actions/enableblacklist/index.ts +3 -0
- package/src/DocumentWhiteList/control/actions/enablelist/index.ts +3 -0
- package/src/DocumentWhiteList/control/actions/enablewhitelist/index.ts +3 -0
- package/src/DocumentWhiteList/control/actions/synclist/index.ts +3 -0
- package/src/DocumentWhiteList/control/actions/whitelist/index.ts +3 -0
- package/src/DocumentWhiteList/ui/pageheader/BlackHeader.tsx +87 -10
- package/src/DocumentWhiteList/ui/pageheader/WhiteHeader.tsx +89 -9
- package/src/DocumentsEdit/ui/EditRule/ui/RuleForm/fn/algorithmFormComponent/index.tsx +1 -1
- package/src/DocumentsList/DocumentsListController/DocumentsListControllerState/index.ts +4 -0
- package/src/DocumentsList/ui/PageHeader/SendHeader.tsx +107 -168
- package/src/DocumentsList/ui/PageHeader/index.tsx +150 -213
- package/src/DocumentsList/ui/RuleTable/index.tsx +7 -3
- package/dist/DocumentWhiteList/ui/UnifiedSearch/index.d.ts +0 -11
- package/src/DocumentWhiteList/ui/UnifiedSearch/index.scss +0 -119
- package/src/DocumentWhiteList/ui/UnifiedSearch/index.tsx +0 -146
|
@@ -1,146 +0,0 @@
|
|
|
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
|
-
}
|