@bit-sun/business-component 4.2.0-alpha.6.1 → 4.2.0-alpha.6.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/components/Business/AddSelectBusiness/index.d.ts +4 -3
- package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +2 -1
- package/dist/components/Business/BsLayouts/Components/ChooseStore/index.d.ts +2 -1
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +1 -1
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.d.ts +1 -1
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.d.ts +2 -2
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.d.ts +2 -1
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.d.ts +2 -1
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +1 -1
- package/dist/components/Business/BsLayouts/Components/GlobalHeader/index.d.ts +2 -1
- package/dist/components/Business/BsLayouts/Components/RightContent/LoginModal.d.ts +2 -1
- package/dist/components/Business/BsLayouts/index.d.ts +1 -1
- package/dist/components/Business/BsSulaQueryTable/SearchItemSetting.d.ts +5 -5
- package/dist/components/Business/BsSulaQueryTable/index.d.ts +2 -1
- package/dist/components/Business/BsSulaQueryTable/setting.d.ts +6 -6
- package/dist/components/Business/BsSulaQueryTable/utils.d.ts +15 -14
- package/dist/components/Business/CommodityEntry/index.d.ts +2 -1
- package/dist/components/Business/CommonAlert/index.d.ts +2 -1
- package/dist/components/Business/CommonGuideWrapper/index.d.ts +3 -3
- package/dist/components/Business/DetailPageWrapper/index.d.ts +12 -11
- package/dist/components/Business/HomePageWrapper/index.d.ts +2 -1
- package/dist/components/Business/ItemPropertySelector/index.d.ts +2 -1
- package/dist/components/Business/JsonQueryTable/components/FieldsModifyModal.d.ts +2 -1
- package/dist/components/Business/JsonQueryTable/components/FieldsSettingsTable.d.ts +2 -1
- package/dist/components/Business/JsonQueryTable/components/Formula.d.ts +2 -1
- package/dist/components/Business/JsonQueryTable/components/MaintainOptions.d.ts +2 -1
- package/dist/components/Business/JsonQueryTable/drawer/index.d.ts +2 -1
- package/dist/components/Business/PropertyModal/index.d.ts +2 -1
- package/dist/components/Business/PropertyModal/propertyGroup.d.ts +1 -1
- package/dist/components/Business/SearchSelect/index.d.ts +1 -1
- package/dist/components/Business/StateFlow/index.d.ts +2 -1
- package/dist/components/Business/TreeSearchSelect/index.d.ts +1 -1
- package/dist/components/Business/columnSettingTable/columnSetting.d.ts +6 -6
- package/dist/components/Business/columnSettingTable/components/TableSumComponent.d.ts +2 -1
- package/dist/components/Business/columnSettingTable/index.d.ts +3 -3
- package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +3 -3
- package/dist/components/Business/columnSettingTable/utils.d.ts +2 -1
- package/dist/components/Business/moreTreeTable/FixedScrollBar.d.ts +1 -1
- package/dist/components/Common/ParagraphCopier/index.d.ts +1 -1
- package/dist/components/Common/Section/index.d.ts +1 -1
- package/dist/components/Functional/AddSelect/index.d.ts +2 -1
- package/dist/components/Functional/AuthButton/index.d.ts +2 -1
- package/dist/components/Functional/DataImport/index.d.ts +3 -3
- package/dist/components/Functional/DataValidation/index.d.ts +4 -4
- package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +2 -1
- package/dist/components/Functional/QueryMutipleInput/index.d.ts +2 -1
- package/dist/components/Functional/QueryMutipleSelect/index.d.ts +2 -1
- package/dist/components/Functional/SearchSelect/index.d.ts +1 -1
- package/dist/components/Functional/SearchSelect/utils.d.ts +3 -2
- package/dist/components/Functional/TreeSearchSelect/index.d.ts +2 -1
- package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/CustomSelectorModal.d.ts +1 -1
- package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/index.d.ts +2 -1
- package/dist/components/Solution/RuleComponent/Formula.d.ts +2 -1
- package/dist/components/Solution/RuleComponent/InnerSelect.d.ts +2 -1
- package/dist/components/Solution/RuleComponent/RenderCompItem.d.ts +2 -1
- package/dist/components/Solution/RuleSetter/RuleInstance.d.ts +2 -1
- package/dist/components/Solution/RuleSetter/baseRule.d.ts +1 -1
- package/dist/components/Solution/RuleSetter/index.d.ts +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.esm.js +1092 -860
- package/dist/index.js +1091 -861
- package/dist/plugin/TableColumnSetting/index.d.ts +5 -5
- package/dist/utils/TableUtils.d.ts +19 -18
- package/dist/utils/utils.d.ts +0 -41
- package/package.json +1 -1
- package/src/components/Business/SearchSelect/BusinessUtils.tsx +93 -2
- package/src/index.ts +0 -2
- package/src/utils/utils.ts +1 -41
- package/dist/components/Business/SystemLog/index.d.ts +0 -78
- package/src/components/Business/SystemLog/index.md +0 -37
- package/src/components/Business/SystemLog/index.tsx +0 -87
|
@@ -38,14 +38,14 @@ declare class TableColumnSetting extends React.Component<TableColumnSettingProps
|
|
|
38
38
|
} | {
|
|
39
39
|
title: string;
|
|
40
40
|
dataIndex: string;
|
|
41
|
-
render: (text: any, record: any) => JSX.Element;
|
|
41
|
+
render: (text: any, record: any) => React.JSX.Element;
|
|
42
42
|
className?: undefined;
|
|
43
43
|
width?: undefined;
|
|
44
44
|
} | {
|
|
45
45
|
title: string;
|
|
46
46
|
dataIndex: string;
|
|
47
47
|
className: string;
|
|
48
|
-
render: () => JSX.Element;
|
|
48
|
+
render: () => React.JSX.Element;
|
|
49
49
|
width?: undefined;
|
|
50
50
|
})[];
|
|
51
51
|
showModal: () => void;
|
|
@@ -53,13 +53,13 @@ declare class TableColumnSetting extends React.Component<TableColumnSettingProps
|
|
|
53
53
|
handleCancel: (e: React.MouseEvent<HTMLElement>) => void;
|
|
54
54
|
handleTableHeadHidden: (title: string) => void;
|
|
55
55
|
onSortEnd: ({ oldIndex, newIndex }: any) => void;
|
|
56
|
-
DraggableContainer: (props: any) => JSX.Element;
|
|
57
|
-
DraggableBodyRow: ({ className, style, ...restProps }: any) => JSX.Element;
|
|
56
|
+
DraggableContainer: (props: any) => React.JSX.Element;
|
|
57
|
+
DraggableBodyRow: ({ className, style, ...restProps }: any) => React.JSX.Element;
|
|
58
58
|
onChange: (e: any, title: any) => void;
|
|
59
59
|
handleReset: () => void;
|
|
60
60
|
handleResetSetting: () => Promise<unknown>;
|
|
61
61
|
onSearch: (e: any) => void;
|
|
62
62
|
onSearchSort: (e: any) => void;
|
|
63
|
-
render(): JSX.Element;
|
|
63
|
+
render(): React.JSX.Element;
|
|
64
64
|
}
|
|
65
65
|
export default TableColumnSetting;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import moment from 'moment';
|
|
2
3
|
type mediaListType = {
|
|
3
4
|
type: number;
|
|
@@ -48,24 +49,24 @@ declare const updateGuanDate: (requestParams: any, dateKeyParams?: any) => {
|
|
|
48
49
|
};
|
|
49
50
|
submit: any;
|
|
50
51
|
};
|
|
51
|
-
declare const textIcon: (type: string | number, text?: string) => JSX.Element | undefined;
|
|
52
|
-
declare const handleTextDoubleOrId: (textOne: string | undefined, textTwo: string | undefined) => JSX.Element;
|
|
53
|
-
declare const handleTextDouble: (textOne: string | undefined, textTwo: string | undefined) => JSX.Element;
|
|
54
|
-
declare const handleTextOverflow: (text: string | undefined, width?: number) => JSX.Element;
|
|
55
|
-
declare const handleTextLineFeed: (text: string | undefined, width?: number) => JSX.Element;
|
|
56
|
-
declare const handleTextTooltip: (text: any) => JSX.Element;
|
|
57
|
-
declare const handleTextBreakSpaces: (text: any) => JSX.Element;
|
|
58
|
-
declare const handleStatusBadge: (text: any, color: any) => JSX.Element;
|
|
59
|
-
declare const HandleTotalCount: (totalParams: any) => JSX.Element;
|
|
52
|
+
declare const textIcon: (type: string | number, text?: string) => React.JSX.Element | undefined;
|
|
53
|
+
declare const handleTextDoubleOrId: (textOne: string | undefined, textTwo: string | undefined) => React.JSX.Element;
|
|
54
|
+
declare const handleTextDouble: (textOne: string | undefined, textTwo: string | undefined) => React.JSX.Element;
|
|
55
|
+
declare const handleTextOverflow: (text: string | undefined, width?: number) => React.JSX.Element;
|
|
56
|
+
declare const handleTextLineFeed: (text: string | undefined, width?: number) => React.JSX.Element;
|
|
57
|
+
declare const handleTextTooltip: (text: any) => React.JSX.Element;
|
|
58
|
+
declare const handleTextBreakSpaces: (text: any) => React.JSX.Element;
|
|
59
|
+
declare const handleStatusBadge: (text: any, color: any) => React.JSX.Element;
|
|
60
|
+
declare const HandleTotalCount: (totalParams: any) => React.JSX.Element;
|
|
60
61
|
declare const handleCommonTimeRender: (text: any, format?: any) => any;
|
|
61
|
-
declare const handleTooltip: (text: any, timeTrue?: boolean) => JSX.Element;
|
|
62
|
-
declare const handleTooltipHours: (text: any, timeTrue?: boolean) => JSX.Element;
|
|
62
|
+
declare const handleTooltip: (text: any, timeTrue?: boolean) => React.JSX.Element;
|
|
63
|
+
declare const handleTooltipHours: (text: any, timeTrue?: boolean) => React.JSX.Element;
|
|
63
64
|
type tableColumnsImageType = {
|
|
64
65
|
width?: number | string;
|
|
65
66
|
height?: number | string;
|
|
66
67
|
[key: string]: any;
|
|
67
68
|
};
|
|
68
|
-
declare const tableColumnsImage: (url?: string, paramsObj?: tableColumnsImageType) => JSX.Element;
|
|
69
|
+
declare const tableColumnsImage: (url?: string, paramsObj?: tableColumnsImageType) => React.JSX.Element;
|
|
69
70
|
interface ColumnsEditInterfave {
|
|
70
71
|
text?: string;
|
|
71
72
|
record?: any;
|
|
@@ -81,7 +82,7 @@ interface ColumnsEditInterfave {
|
|
|
81
82
|
};
|
|
82
83
|
[key: string]: any;
|
|
83
84
|
}
|
|
84
|
-
declare const ColumnsEdit: (props: ColumnsEditInterfave) => JSX.Element;
|
|
85
|
+
declare const ColumnsEdit: (props: ColumnsEditInterfave) => React.JSX.Element;
|
|
85
86
|
type UserColumnsType = {
|
|
86
87
|
name: string;
|
|
87
88
|
department?: string;
|
|
@@ -89,13 +90,13 @@ type UserColumnsType = {
|
|
|
89
90
|
company?: string;
|
|
90
91
|
avatar?: string;
|
|
91
92
|
};
|
|
92
|
-
declare const userColumns: (props: UserColumnsType) => JSX.Element;
|
|
93
|
-
declare const userInfoCard: (props: any) => JSX.Element;
|
|
93
|
+
declare const userColumns: (props: UserColumnsType) => React.JSX.Element;
|
|
94
|
+
declare const userInfoCard: (props: any) => React.JSX.Element;
|
|
94
95
|
declare const getItemDefaultWidth: (item: any) => number;
|
|
95
|
-
declare const sulaTableRenderTooltip: ({ text }: any) => JSX.Element;
|
|
96
|
+
declare const sulaTableRenderTooltip: ({ text }: any) => React.JSX.Element;
|
|
96
97
|
declare const renderNumberText: ({ text }: any) => any;
|
|
97
98
|
declare const renderFixed2: (text: any) => any;
|
|
98
|
-
declare const handleTextWarpCustom: (text: any, style?: {}) => JSX.Element;
|
|
99
|
+
declare const handleTextWarpCustom: (text: any, style?: {}) => React.JSX.Element;
|
|
99
100
|
declare const calculateValidPeriod: (start: any, end: any) => string;
|
|
100
|
-
declare const handleTextWarp: (text: any) => JSX.Element;
|
|
101
|
+
declare const handleTextWarp: (text: any) => React.JSX.Element;
|
|
101
102
|
export { getSkuImg, updateGuanDate, textIcon, handleTextDoubleOrId, handleTextDouble, handleTextOverflow, handleTextLineFeed, handleTextTooltip, handleTextBreakSpaces, handleStatusBadge, HandleTotalCount, handleTooltip, handleCommonTimeRender, handleTooltipHours, tableColumnsImage, ColumnsEdit, userColumns, userInfoCard, getItemDefaultWidth, renderNumberText, sulaTableRenderTooltip, renderFixed2, handleTextWarpCustom, handleTextWarp, calculateValidPeriod };
|
package/dist/utils/utils.d.ts
CHANGED
|
@@ -31,44 +31,3 @@ export declare const randomString: (len?: any) => string;
|
|
|
31
31
|
export declare const createUniqID: (length: any) => string;
|
|
32
32
|
export declare const handleConvertResponse: (items: any, total: number) => object;
|
|
33
33
|
export declare const noEmptyArray: (targetObj: any) => boolean;
|
|
34
|
-
export declare const formContainerAndItemLayout: (type: string, title: any, name: string) => {
|
|
35
|
-
container: {
|
|
36
|
-
type: string;
|
|
37
|
-
props: {
|
|
38
|
-
title: any;
|
|
39
|
-
id: number;
|
|
40
|
-
level: number;
|
|
41
|
-
name: string;
|
|
42
|
-
bordered?: undefined;
|
|
43
|
-
isWhiteCard?: undefined;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
itemLayout: {
|
|
47
|
-
span: number;
|
|
48
|
-
labelCol: {
|
|
49
|
-
span: number;
|
|
50
|
-
};
|
|
51
|
-
wrapperCol: {
|
|
52
|
-
span: number;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
} | {
|
|
56
|
-
container: {
|
|
57
|
-
type: string;
|
|
58
|
-
props: {
|
|
59
|
-
title: any;
|
|
60
|
-
id: number;
|
|
61
|
-
level: number;
|
|
62
|
-
bordered: null;
|
|
63
|
-
isWhiteCard: boolean;
|
|
64
|
-
name: string;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
itemLayout: {
|
|
68
|
-
wrapperCol: {
|
|
69
|
-
span: number;
|
|
70
|
-
};
|
|
71
|
-
span?: undefined;
|
|
72
|
-
labelCol?: undefined;
|
|
73
|
-
};
|
|
74
|
-
};
|
package/package.json
CHANGED
|
@@ -1198,12 +1198,84 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1198
1198
|
sourceName: 'warehouseIds',
|
|
1199
1199
|
...requestConfigProp,
|
|
1200
1200
|
}
|
|
1201
|
+
const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
|
|
1202
|
+
Promise.all([
|
|
1203
|
+
loadSelectSource(`/channel-manage/channelInfo/tree`, {
|
|
1204
|
+
'qp-status-eq': 10,
|
|
1205
|
+
'qp-isMain-eq': 1,
|
|
1206
|
+
'qp-type-in': '1,2',
|
|
1207
|
+
},getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
|
|
1208
|
+
loadSelectSource(`/channel-manage/tagNode/getTree/10`, {
|
|
1209
|
+
'qp-status-eq': 1,
|
|
1210
|
+
},getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
|
|
1211
|
+
]).then((x: any)=>{
|
|
1212
|
+
const channelDisabledJude = (data: any) => data['parentCode'] === '0'; // 所属销售渠道 树节点不能点判断
|
|
1213
|
+
const areaDisabledJude = (data: any) => data['parent'] === '0'; // 所属营销区域 树节点不能点判断
|
|
1214
|
+
formatTreeDataSource(x, 0, 4, tableSearchForm, ['code','name'], 'channelInfoSon', channelDisabledJude)
|
|
1215
|
+
formatTreeDataSource(x, 1, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude)
|
|
1216
|
+
})
|
|
1201
1217
|
tableSearchForm = [
|
|
1202
1218
|
{ name: 'realWarehouseName*multiInput', label: '逻辑仓名称', type: 'multipleQueryInput' },
|
|
1203
1219
|
{ name: 'realWarehouseCode*multiInput', label: '逻辑仓编码', type: 'multipleQueryInput' },
|
|
1204
1220
|
{ name: 'qp-realWarehouseType-eq', type: 'select', label: '逻辑仓类型', initialSource: getDictionarySource('SC00004') },
|
|
1205
1221
|
{ name: 'belongArea', field: {type: 'select', props: {mode: 'multiple',}}, label: '管理大区', initialSource: getDictionarySource('BUSINESS_belongArea'), },
|
|
1206
|
-
|
|
1222
|
+
{
|
|
1223
|
+
name: 'qp-channelCode-in', type: 'treeSelect', label: '销售渠道', field: {
|
|
1224
|
+
type: 'treeSelect',
|
|
1225
|
+
props: {
|
|
1226
|
+
multiple: true,
|
|
1227
|
+
treeData: [],
|
|
1228
|
+
treeCheckable: false,
|
|
1229
|
+
notFoundContent: '暂无数据',
|
|
1230
|
+
allowClear: true,
|
|
1231
|
+
showSearch: true,
|
|
1232
|
+
showArrow: true,
|
|
1233
|
+
maxTagCount: 1,
|
|
1234
|
+
optionFilterProp: 'children',
|
|
1235
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
1236
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1237
|
+
showCheckedStrategy: 'TreeSelect.SHOW_ALL',
|
|
1238
|
+
},
|
|
1239
|
+
}
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
name: 'qp-refCode-in', type: 'treeSelect', label: '营销区域', field: {
|
|
1243
|
+
type: 'treeSelect',
|
|
1244
|
+
props: {
|
|
1245
|
+
multiple: true,
|
|
1246
|
+
treeData: [],
|
|
1247
|
+
treeCheckable: false,
|
|
1248
|
+
notFoundContent: '暂无数据',
|
|
1249
|
+
allowClear: true,
|
|
1250
|
+
showSearch: true,
|
|
1251
|
+
showArrow: true,
|
|
1252
|
+
maxTagCount: 1,
|
|
1253
|
+
optionFilterProp: 'children',
|
|
1254
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
1255
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1256
|
+
|
|
1257
|
+
showCheckedStrategy: 'TreeSelect.SHOW_ALL',
|
|
1258
|
+
},
|
|
1259
|
+
}
|
|
1260
|
+
},
|
|
1261
|
+
{
|
|
1262
|
+
name: 'qp-type-in', type: 'select', label: '店铺性质', field: {
|
|
1263
|
+
type: 'select',
|
|
1264
|
+
props: {
|
|
1265
|
+
mode: 'multiple',
|
|
1266
|
+
notFoundContent: '暂无数据',
|
|
1267
|
+
allowClear: true,
|
|
1268
|
+
showSearch: true,
|
|
1269
|
+
showArrow: true,
|
|
1270
|
+
maxTagCount: 1,
|
|
1271
|
+
optionFilterProp: 'children',
|
|
1272
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
1273
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1274
|
+
},
|
|
1275
|
+
},
|
|
1276
|
+
initialSource: getDictionarySource('BUSINESS_StoreType')
|
|
1277
|
+
},
|
|
1278
|
+
...(modalTableBusProps?.needStatusSearch?[{ name: 'qp-isEnable-eq', type: 'select', label: '逻辑仓状态', initialSource: getDictionarySource('SC00001') }]:[]),
|
|
1207
1279
|
]
|
|
1208
1280
|
modalTableProps = {
|
|
1209
1281
|
modalTableTitle: '选择逻辑仓',
|
|
@@ -1230,10 +1302,29 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1230
1302
|
defaultSort: 3,
|
|
1231
1303
|
render: (text: number) => getDictionaryTextByValue('SC00004', text),
|
|
1232
1304
|
},
|
|
1305
|
+
{
|
|
1306
|
+
title: '所属销售渠道',
|
|
1307
|
+
dataIndex: 'channelName',
|
|
1308
|
+
defaultSort: 4,
|
|
1309
|
+
width: 100,
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
title: '营销区域',
|
|
1313
|
+
dataIndex: 'commonRelationAreaName',
|
|
1314
|
+
defaultSort: 5,
|
|
1315
|
+
width: 100,
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
title: '店铺性质',
|
|
1319
|
+
dataIndex: 'type',
|
|
1320
|
+
defaultSort: 6,
|
|
1321
|
+
render: (text: any) => getDictionaryTextByValue('BUSINESS_StoreType', text),
|
|
1322
|
+
width: 80,
|
|
1323
|
+
},
|
|
1233
1324
|
...(modalTableBusProps?.needStatusSearch?[{
|
|
1234
1325
|
title: '状态',
|
|
1235
1326
|
dataIndex: 'isEnable',
|
|
1236
|
-
defaultSort:
|
|
1327
|
+
defaultSort: 7,
|
|
1237
1328
|
render: (text: number) => getDictionaryTextByValue('SC00001', text),
|
|
1238
1329
|
}]:[]),
|
|
1239
1330
|
],
|
package/src/index.ts
CHANGED
|
@@ -48,5 +48,3 @@ export { default as RuleSetter} from './components/Solution/RuleSetter';
|
|
|
48
48
|
export { default as ExtendedCollapse } from './components/Common/ExtendedCollapse';
|
|
49
49
|
export { default as Section } from './components/Common/Section';
|
|
50
50
|
export { default as ParagraphCopier } from './components/Common/ParagraphCopier';
|
|
51
|
-
|
|
52
|
-
export { default as SystemLog } from './components/Business/SystemLog';
|
package/src/utils/utils.ts
CHANGED
|
@@ -267,44 +267,4 @@ export const handleConvertResponse = (items: any, total: number): object => {
|
|
|
267
267
|
|
|
268
268
|
export const noEmptyArray = (targetObj: any) => {
|
|
269
269
|
return Array.isArray(targetObj) && targetObj.length !== 0;
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
export const formContainerAndItemLayout = (type: string, title: any, name: string) => {
|
|
273
|
-
return type === 'form' ? {
|
|
274
|
-
container: {
|
|
275
|
-
type: 'card',
|
|
276
|
-
props: {
|
|
277
|
-
title,
|
|
278
|
-
id: Math.random(),
|
|
279
|
-
level: 1,
|
|
280
|
-
name
|
|
281
|
-
},
|
|
282
|
-
},
|
|
283
|
-
itemLayout: {
|
|
284
|
-
span: 8, // span表示每项所占的栅格数
|
|
285
|
-
labelCol: {
|
|
286
|
-
span: 8,
|
|
287
|
-
},
|
|
288
|
-
wrapperCol: {
|
|
289
|
-
span: 18,
|
|
290
|
-
},
|
|
291
|
-
},
|
|
292
|
-
} : {
|
|
293
|
-
container: {
|
|
294
|
-
type: 'card',
|
|
295
|
-
props: {
|
|
296
|
-
title,
|
|
297
|
-
id: Math.random(),
|
|
298
|
-
level: 1,
|
|
299
|
-
bordered: null,
|
|
300
|
-
isWhiteCard: true,
|
|
301
|
-
name
|
|
302
|
-
},
|
|
303
|
-
},
|
|
304
|
-
itemLayout: {
|
|
305
|
-
wrapperCol: {
|
|
306
|
-
span: 0,
|
|
307
|
-
},
|
|
308
|
-
},
|
|
309
|
-
}
|
|
310
|
-
}
|
|
270
|
+
};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
declare const SystemLog: ({ modeType, code, containerName, renderLogRef, extraParams, }: {
|
|
2
|
-
modeType: string;
|
|
3
|
-
code: any;
|
|
4
|
-
containerName: string;
|
|
5
|
-
renderLogRef: object;
|
|
6
|
-
extraParams?: object | undefined;
|
|
7
|
-
}) => {
|
|
8
|
-
initialVisible: boolean;
|
|
9
|
-
fields: {
|
|
10
|
-
name: string;
|
|
11
|
-
label: boolean;
|
|
12
|
-
itemLayout: {
|
|
13
|
-
span: number;
|
|
14
|
-
labelCol: {
|
|
15
|
-
span: number;
|
|
16
|
-
};
|
|
17
|
-
wrapperCol: {
|
|
18
|
-
span: number;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
field: (ctx: any) => any;
|
|
22
|
-
}[];
|
|
23
|
-
container: {
|
|
24
|
-
type: string;
|
|
25
|
-
props: {
|
|
26
|
-
title: any;
|
|
27
|
-
id: number;
|
|
28
|
-
level: number;
|
|
29
|
-
name: string;
|
|
30
|
-
bordered?: undefined;
|
|
31
|
-
isWhiteCard?: undefined;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
itemLayout: {
|
|
35
|
-
span: number;
|
|
36
|
-
labelCol: {
|
|
37
|
-
span: number;
|
|
38
|
-
};
|
|
39
|
-
wrapperCol: {
|
|
40
|
-
span: number;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
} | {
|
|
44
|
-
initialVisible: boolean;
|
|
45
|
-
fields: {
|
|
46
|
-
name: string;
|
|
47
|
-
label: boolean;
|
|
48
|
-
itemLayout: {
|
|
49
|
-
span: number;
|
|
50
|
-
labelCol: {
|
|
51
|
-
span: number;
|
|
52
|
-
};
|
|
53
|
-
wrapperCol: {
|
|
54
|
-
span: number;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
field: (ctx: any) => any;
|
|
58
|
-
}[];
|
|
59
|
-
container: {
|
|
60
|
-
type: string;
|
|
61
|
-
props: {
|
|
62
|
-
title: any;
|
|
63
|
-
id: number;
|
|
64
|
-
level: number;
|
|
65
|
-
bordered: null;
|
|
66
|
-
isWhiteCard: boolean;
|
|
67
|
-
name: string;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
itemLayout: {
|
|
71
|
-
wrapperCol: {
|
|
72
|
-
span: number;
|
|
73
|
-
};
|
|
74
|
-
span?: undefined;
|
|
75
|
-
labelCol?: undefined;
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
export default SystemLog;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
nav:
|
|
3
|
-
title: '组件'
|
|
4
|
-
order: 1
|
|
5
|
-
group:
|
|
6
|
-
title: 业务组件
|
|
7
|
-
order: 1
|
|
8
|
-
title: 日志组件
|
|
9
|
-
order: 1
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# SystemLog
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
## 日志业务组件
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
import React, { useState } from 'react';
|
|
19
|
-
import { SystemLog } from '../../../index.ts';
|
|
20
|
-
|
|
21
|
-
export default () => {
|
|
22
|
-
const [modeType, setModeType] = useState('view');
|
|
23
|
-
const renderLogRef = useRef<any>();
|
|
24
|
-
|
|
25
|
-
return {
|
|
26
|
-
fields: [
|
|
27
|
-
SystemLog({
|
|
28
|
-
modeType,
|
|
29
|
-
code: '123',
|
|
30
|
-
containerName: 'Test_Log_Info',
|
|
31
|
-
renderLogRef,
|
|
32
|
-
extraParams: {},
|
|
33
|
-
})
|
|
34
|
-
],
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
```
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { handleCommonTimeRender } from '@/utils/TableUtils';
|
|
2
|
-
import { formContainerAndItemLayout, handleConvertResponse } from '@/utils/utils';
|
|
3
|
-
import { Table as BsTable } from 'bssula';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
|
|
6
|
-
//操作日志
|
|
7
|
-
const SystemLog = ({
|
|
8
|
-
modeType,
|
|
9
|
-
code,
|
|
10
|
-
containerName,
|
|
11
|
-
renderLogRef = {},
|
|
12
|
-
extraParams = {},
|
|
13
|
-
}: {
|
|
14
|
-
modeType: string,
|
|
15
|
-
code: any
|
|
16
|
-
containerName: string,
|
|
17
|
-
renderLogRef: object,
|
|
18
|
-
extraParams?: object,
|
|
19
|
-
}) => {
|
|
20
|
-
return {
|
|
21
|
-
...formContainerAndItemLayout('table', '操作日志', containerName),
|
|
22
|
-
initialVisible: modeType != 'create',
|
|
23
|
-
fields: [
|
|
24
|
-
{
|
|
25
|
-
name: 'table',
|
|
26
|
-
label: false,
|
|
27
|
-
itemLayout: {
|
|
28
|
-
span: 24,
|
|
29
|
-
labelCol: {
|
|
30
|
-
span: 0,
|
|
31
|
-
},
|
|
32
|
-
wrapperCol: {
|
|
33
|
-
span: 24,
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
field: (ctx: any) => {
|
|
37
|
-
return code && <BsTable
|
|
38
|
-
remoteDataSource={{
|
|
39
|
-
url: `/oms-ops/logInfo?qp-businessCode-eq=${code}`,
|
|
40
|
-
convertParams: ({ params }: any) => {
|
|
41
|
-
return {
|
|
42
|
-
pageSize: params.pageSize,
|
|
43
|
-
currentPage: params.current,
|
|
44
|
-
...extraParams,
|
|
45
|
-
};
|
|
46
|
-
},
|
|
47
|
-
converter: ({ data }: any) => {
|
|
48
|
-
return {
|
|
49
|
-
...handleConvertResponse(data.list, data.total || data.totalCount),
|
|
50
|
-
};
|
|
51
|
-
},
|
|
52
|
-
}}
|
|
53
|
-
columns={[
|
|
54
|
-
{
|
|
55
|
-
title: '操作人',
|
|
56
|
-
dataIndex: 'handlerName',
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
title: '操作名称',
|
|
60
|
-
dataIndex: 'handlerType',
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
title: '操作时间',
|
|
64
|
-
dataIndex: 'handlerTime',
|
|
65
|
-
render: ({ text }: { text: any }) => handleCommonTimeRender(text)
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
title: '操作内容',
|
|
69
|
-
dataIndex: 'logcontent',
|
|
70
|
-
},
|
|
71
|
-
]}
|
|
72
|
-
style={{ width: '100%', marginTop: '-16px', padding: '0px' }}
|
|
73
|
-
rowKey="id"
|
|
74
|
-
scroll={{ x: 'max-content' }}
|
|
75
|
-
pagination={{
|
|
76
|
-
showTotal: (total: any) => `共 ${total} 条`,
|
|
77
|
-
showQuickJumper: true,
|
|
78
|
-
hideOnSinglePage: true,
|
|
79
|
-
}}
|
|
80
|
-
ref={renderLogRef}
|
|
81
|
-
/>
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
],
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
export default SystemLog
|