@pisell/materials 2.2.2 → 2.2.3

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 (111) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +13 -13
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +12 -12
  11. package/es/components/Pagination/index.d.ts +1 -1
  12. package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +7 -0
  13. package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.js +143 -0
  14. package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.less +29 -0
  15. package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
  16. package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +87 -0
  17. package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +8 -0
  18. package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.js +41 -0
  19. package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.less +5 -0
  20. package/es/components/table/Actions/component/ExportImport/components/ImportLog/Detail.d.ts +4 -0
  21. package/es/components/table/Actions/component/ExportImport/components/ImportLog/Detail.js +97 -0
  22. package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +7 -0
  23. package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.js +137 -0
  24. package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.less +48 -0
  25. package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +10 -0
  26. package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.js +149 -0
  27. package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.less +97 -0
  28. package/es/components/table/Actions/component/ExportImport/index.d.ts +8 -0
  29. package/es/components/table/Actions/component/ExportImport/index.js +232 -0
  30. package/es/components/table/Actions/component/ExportImport/index.less +194 -0
  31. package/es/components/table/Actions/component/ExportImport/utils/date.d.ts +8 -0
  32. package/es/components/table/Actions/component/ExportImport/utils/date.js +19 -0
  33. package/es/components/table/Actions/component/ExportImport/utils/download.d.ts +3 -0
  34. package/es/components/table/Actions/component/ExportImport/utils/download.js +39 -0
  35. package/es/components/table/Actions/component/ExportImport/utils/file.d.ts +7 -0
  36. package/es/components/table/Actions/component/ExportImport/utils/file.js +21 -0
  37. package/es/components/table/Actions/index.d.ts +3 -2
  38. package/es/components/table/Actions/index.js +12 -8
  39. package/es/components/table/BasicTable/index.js +11 -1
  40. package/es/components/table/Table/index.js +6 -0
  41. package/es/components/table/Table/utils.d.ts +1 -1
  42. package/es/components/table/hooks/useTableSetting.d.ts +2 -1
  43. package/es/components/table/hooks/useTableSetting.js +2 -1
  44. package/es/components/table/index.js +15 -13
  45. package/es/components/table/model.d.ts +2 -0
  46. package/es/components/table/model.js +15 -1
  47. package/es/components/table/serve.d.ts +11 -0
  48. package/es/components/table/serve.js +38 -0
  49. package/es/components/table/status.d.ts +19 -0
  50. package/es/components/table/status.js +26 -0
  51. package/es/components/table/types.d.ts +20 -0
  52. package/es/components/table/utils.d.ts +15 -0
  53. package/es/components/table/utils.js +26 -0
  54. package/es/locales/en-US.d.ts +46 -0
  55. package/es/locales/en-US.js +59 -1
  56. package/es/locales/zh-CN.d.ts +46 -0
  57. package/es/locales/zh-CN.js +59 -1
  58. package/es/locales/zh-TW.d.ts +46 -0
  59. package/es/locales/zh-TW.js +59 -1
  60. package/lib/components/Pagination/index.d.ts +1 -1
  61. package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +7 -0
  62. package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.js +150 -0
  63. package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.less +29 -0
  64. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
  65. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +78 -0
  66. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +8 -0
  67. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.js +60 -0
  68. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.less +5 -0
  69. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/Detail.d.ts +4 -0
  70. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/Detail.js +117 -0
  71. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +7 -0
  72. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.js +141 -0
  73. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.less +48 -0
  74. package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +10 -0
  75. package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.js +124 -0
  76. package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.less +97 -0
  77. package/lib/components/table/Actions/component/ExportImport/index.d.ts +8 -0
  78. package/lib/components/table/Actions/component/ExportImport/index.js +210 -0
  79. package/lib/components/table/Actions/component/ExportImport/index.less +194 -0
  80. package/lib/components/table/Actions/component/ExportImport/utils/date.d.ts +8 -0
  81. package/lib/components/table/Actions/component/ExportImport/utils/date.js +49 -0
  82. package/lib/components/table/Actions/component/ExportImport/utils/download.d.ts +3 -0
  83. package/lib/components/table/Actions/component/ExportImport/utils/download.js +62 -0
  84. package/lib/components/table/Actions/component/ExportImport/utils/file.d.ts +7 -0
  85. package/lib/components/table/Actions/component/ExportImport/utils/file.js +55 -0
  86. package/lib/components/table/Actions/index.d.ts +3 -2
  87. package/lib/components/table/Actions/index.js +11 -7
  88. package/lib/components/table/BasicTable/index.js +9 -0
  89. package/lib/components/table/Table/index.js +6 -0
  90. package/lib/components/table/Table/utils.d.ts +1 -1
  91. package/lib/components/table/hooks/useTableSetting.d.ts +2 -1
  92. package/lib/components/table/hooks/useTableSetting.js +2 -1
  93. package/lib/components/table/index.js +14 -12
  94. package/lib/components/table/model.d.ts +2 -0
  95. package/lib/components/table/model.js +11 -1
  96. package/lib/components/table/serve.d.ts +11 -0
  97. package/lib/components/table/serve.js +41 -0
  98. package/lib/components/table/status.d.ts +19 -0
  99. package/lib/components/table/status.js +55 -0
  100. package/lib/components/table/types.d.ts +20 -0
  101. package/lib/components/table/utils.d.ts +15 -0
  102. package/lib/components/table/utils.js +40 -0
  103. package/lib/locales/en-US.d.ts +46 -0
  104. package/lib/locales/en-US.js +51 -1
  105. package/lib/locales/zh-CN.d.ts +46 -0
  106. package/lib/locales/zh-CN.js +51 -1
  107. package/lib/locales/zh-TW.d.ts +46 -0
  108. package/lib/locales/zh-TW.js +51 -1
  109. package/lowcode/table/meta.ts +84 -1
  110. package/lowcode/table/snippets.ts +8 -0
  111. package/package.json +3 -3
@@ -0,0 +1,26 @@
1
+ import { getText } from "../../locales/index";
2
+ // 默认值
3
+ export var defaultOptions = {
4
+ exportType: 'current-page',
5
+ footerHintTypes: ["export_file", "import_log"],
6
+ okShowButtonTypes: ["export", "import"],
7
+ exportValue: 'export',
8
+ importValue: 'import'
9
+ };
10
+ export var suffixOptions = {
11
+ '1': "".concat(getText('page.customer.list.table.num')),
12
+ '2': "".concat(getText('page.customer.suffix')),
13
+ product: "".concat(getText('page.product.suffix')),
14
+ '4': "".concat(getText('page.voucher.suffix')),
15
+ '5': "".concat(getText('page.recharge.suffix')),
16
+ '6': "".concat(getText('page.ticket.suffix')),
17
+ '7': "".concat(getText('page.package.ticket.suffix'))
18
+ };
19
+
20
+ // 导入导出
21
+ export var exportImportOptions = {
22
+ import: getText('table-action-export-import-button-import'),
23
+ export: getText('table-action-export-import-button'),
24
+ export_file: getText('table-action-export-import-export-title'),
25
+ import_log: getText('table-action-export-import-import-title')
26
+ };
@@ -158,6 +158,25 @@ declare type SortDetail = {
158
158
  fromItem: Record<string, any>;
159
159
  toItem: Record<string, any>;
160
160
  };
161
+ /** 导入导出模式 */
162
+ export declare type ExportImportModeType = "import" | "export" | "export_file" | "import_log";
163
+ /**
164
+ * 导入导出配置
165
+ */
166
+ export declare type ExportImportType = {
167
+ /** 是否展示 */
168
+ show: boolean;
169
+ /** 表id */
170
+ formId?: string;
171
+ /** 表key */
172
+ formCode?: string;
173
+ /** 当前所选项 */
174
+ selectLists: string[];
175
+ /** 导入模版链接 */
176
+ templateFileUrl: string;
177
+ /** 标题 */
178
+ title: string;
179
+ };
161
180
  export declare type GridViewProps = {
162
181
  columns: any;
163
182
  dataSource: any[];
@@ -177,6 +196,7 @@ export declare type GridViewProps = {
177
196
  actionButtons: any;
178
197
  sort: SortType;
179
198
  title: any;
199
+ exportImport: ExportImportType;
180
200
  onValuesChange: (changedValues: any, values: any) => void;
181
201
  summary: any;
182
202
  utils: any;
@@ -0,0 +1,15 @@
1
+ declare type RType = (url: string, data?: {} | undefined, config?: {} | undefined) => Promise<any>;
2
+ declare class Request {
3
+ private request;
4
+ constructor();
5
+ setRequest(val: any): void;
6
+ getRequest(): {
7
+ get: RType;
8
+ post: RType;
9
+ put: RType;
10
+ remove: RType;
11
+ custom: RType;
12
+ };
13
+ }
14
+ export declare const request: Request;
15
+ export {};
@@ -0,0 +1,26 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
+ var Request = /*#__PURE__*/function () {
9
+ function Request() {
10
+ _classCallCheck(this, Request);
11
+ _defineProperty(this, "request", {});
12
+ }
13
+ _createClass(Request, [{
14
+ key: "setRequest",
15
+ value: function setRequest(val) {
16
+ this.request = val;
17
+ }
18
+ }, {
19
+ key: "getRequest",
20
+ value: function getRequest() {
21
+ return this.request;
22
+ }
23
+ }]);
24
+ return Request;
25
+ }();
26
+ export var request = new Request();
@@ -50,5 +50,51 @@ declare const _default: {
50
50
  'batch-editor-what-price': string;
51
51
  'batch-editor-quick-edit-title': (product: string, num: string) => string;
52
52
  'batch-editor-quick-edit-title-2': (product: string) => string;
53
+ 'table-action-export-import-export-success': string;
54
+ 'table-action-export-import-button': string;
55
+ 'table-action-export-import-export-range': string;
56
+ 'table-action-export-import-current-page': string;
57
+ 'table-action-export-import-all-records': string;
58
+ 'table-action-export-import-selected-records': string;
59
+ 'table-action-export-import-selected': string;
60
+ 'table-action-export-import-item': (length: number) => string;
61
+ 'table-action-export-import-product': string;
62
+ 'table-action-export-import-table-text-input-title': string;
63
+ 'table-action-export-import-table-text-input-describe': string;
64
+ 'table-action-export-import-table-error-file': string;
65
+ 'table-action-export-import-import-success': string;
66
+ 'table-action-export-import-import-phone': string;
67
+ 'table-action-export-import-table-success-download': string;
68
+ 'table-action-export-import-table-textimport-product': string;
69
+ 'table-action-export-import-table-text-product-template': string;
70
+ 'table-action-export-import-table-text-click-download': string;
71
+ 'table-action-export-import-table-text-edit-file': string;
72
+ 'table-action-export-import-button-import': string;
73
+ 'table-action-export-import-cancel': string;
74
+ 'table-action-export-import-file-completed': string;
75
+ 'table-action-export-import-file-processing': string;
76
+ 'table-action-export-import-file-pending': string;
77
+ 'table-action-export-import-file-refresh': string;
78
+ 'table-action-export-import-export-title': string;
79
+ 'table-action-export-import-file-hint': string;
80
+ 'table-action-export-import-file-name': string;
81
+ 'table-action-export-import-file-content': string;
82
+ 'table-action-export-import-file-content-all': string;
83
+ 'table-action-export-import-file-content-part': string;
84
+ 'table-action-export-import-file-status': string;
85
+ 'table-action-export-import-file-account': string;
86
+ 'table-action-export-import-file-created': string;
87
+ 'table-action-export-import-file-record': (length: number) => string;
88
+ 'table-action-export-import-import-title': string;
89
+ 'table-action-export-import-log-hint': string;
90
+ 'table-action-export-import-log-name': string;
91
+ 'table-action-export-import-log-result': string;
92
+ 'table-action-export-import-log-ok': (num: number) => string;
93
+ 'table-action-export-import-log-err': (num: number) => string;
94
+ 'table-action-export-import-log-check': string;
95
+ 'table-action-export-import-log-detail-title': string;
96
+ 'table-action-export-import-log-err-log': string;
97
+ 'table-action-export-import-log-copy': string;
98
+ 'table-action-export-import-table-success-copy': string;
53
99
  };
54
100
  export default _default;
@@ -59,5 +59,63 @@ export default {
59
59
  },
60
60
  'batch-editor-quick-edit-title-2': function batchEditorQuickEditTitle2(product) {
61
61
  return "You have selected ".concat(product);
62
- }
62
+ },
63
+ // 导出
64
+ 'table-action-export-import-export-success': 'Export successful! ',
65
+ 'table-action-export-import-button': 'Export',
66
+ 'table-action-export-import-export-range': 'Export Range',
67
+ 'table-action-export-import-current-page': 'Current Page',
68
+ 'table-action-export-import-all-records': 'All Records',
69
+ 'table-action-export-import-selected-records': 'Selected Records',
70
+ 'table-action-export-import-selected': 'Selected',
71
+ 'table-action-export-import-item': function tableActionExportImportItem(length) {
72
+ return "".concat(length, " ").concat(length > 1 ? 'items' : 'item');
73
+ },
74
+ 'table-action-export-import-product': 'Export Products',
75
+ // 导入
76
+ 'table-action-export-import-table-text-input-title': 'Click or drag file to this area to upload',
77
+ 'table-action-export-import-table-text-input-describe': 'Support both single and bulk uploads. Do not upload data file other than supported template.',
78
+ 'table-action-export-import-table-error-file': 'Only supports uploading files in.csv,.xls,.xlsx format.',
79
+ 'table-action-export-import-import-success': 'Import successful! ',
80
+ 'table-action-export-import-import-phone': 'Whether to replace data with the same mobile number?',
81
+ 'table-action-export-import-table-success-download': 'Download Success',
82
+ 'table-action-export-import-table-textimport-product': 'Import Products',
83
+ 'table-action-export-import-table-text-product-template': 'Import Template',
84
+ 'table-action-export-import-table-text-click-download': 'Click to download',
85
+ 'table-action-export-import-table-text-edit-file': 'Replace file',
86
+ 'table-action-export-import-button-import': 'Import',
87
+ 'table-action-export-import-cancel': 'Cancel',
88
+ 'table-action-export-import-file-completed': 'completed',
89
+ 'table-action-export-import-file-processing': 'processing',
90
+ 'table-action-export-import-file-pending': 'pending',
91
+ 'table-action-export-import-file-refresh': 'Refresh',
92
+ 'table-action-export-import-export-title': 'Export File',
93
+ 'table-action-export-import-file-hint': 'Display only the last 10 export histories',
94
+ 'table-action-export-import-file-name': 'Export File',
95
+ 'table-action-export-import-file-content': 'Content',
96
+ 'table-action-export-import-file-content-all': 'All',
97
+ 'table-action-export-import-file-content-part': 'Selected',
98
+ 'table-action-export-import-file-status': 'Status',
99
+ 'table-action-export-import-file-account': 'Operator',
100
+ 'table-action-export-import-file-created': 'Operation Time',
101
+ 'table-action-export-import-file-record': function tableActionExportImportFileRecord(length) {
102
+ return "".concat(length, " ").concat(length > 1 ? 'records' : 'record');
103
+ },
104
+ // 导入日志
105
+ 'table-action-export-import-import-title': 'Import Log',
106
+ 'table-action-export-import-log-hint': 'Display only the last 10 import histories',
107
+ 'table-action-export-import-log-name': 'Import File',
108
+ 'table-action-export-import-log-result': 'Import Results',
109
+ 'table-action-export-import-log-ok': function tableActionExportImportLogOk(num) {
110
+ return "".concat(num, " successful");
111
+ },
112
+ 'table-action-export-import-log-err': function tableActionExportImportLogErr(num) {
113
+ return ", ".concat(num, " failures");
114
+ },
115
+ 'table-action-export-import-log-check': "View more",
116
+ // 导入详情
117
+ 'table-action-export-import-log-detail-title': 'Import Details',
118
+ 'table-action-export-import-log-err-log': 'Failure Log',
119
+ 'table-action-export-import-log-copy': 'Copy',
120
+ 'table-action-export-import-table-success-copy': 'Copy Success'
63
121
  };
@@ -50,5 +50,51 @@ declare const _default: {
50
50
  'batch-editor-what-price': string;
51
51
  'batch-editor-quick-edit-title': (product: string, num: string) => string;
52
52
  'batch-editor-quick-edit-title-2': (product: string) => string;
53
+ 'table-action-export-import-export-success': string;
54
+ 'table-action-export-import-button': string;
55
+ 'table-action-export-import-export-range': string;
56
+ 'table-action-export-import-current-page': string;
57
+ 'table-action-export-import-all-records': string;
58
+ 'table-action-export-import-selected-records': string;
59
+ 'table-action-export-import-selected': string;
60
+ 'table-action-export-import-item': (length: number) => string;
61
+ 'table-action-export-import-product': string;
62
+ 'table-action-export-import-table-text-input-title': string;
63
+ 'table-action-export-import-table-text-input-describe': string;
64
+ 'table-action-export-import-table-error-file': string;
65
+ 'table-action-export-import-import-success': string;
66
+ 'table-action-export-import-import-phone': string;
67
+ 'table-action-export-import-table-success-download': string;
68
+ 'table-action-export-import-table-textimport-product': string;
69
+ 'table-action-export-import-table-text-product-template': string;
70
+ 'table-action-export-import-table-text-click-download': string;
71
+ 'table-action-export-import-table-text-edit-file': string;
72
+ 'table-action-export-import-button-import': string;
73
+ 'table-action-export-import-cancel': string;
74
+ 'table-action-export-import-file-completed': string;
75
+ 'table-action-export-import-file-processing': string;
76
+ 'table-action-export-import-file-pending': string;
77
+ 'table-action-export-import-file-refresh': string;
78
+ 'table-action-export-import-export-title': string;
79
+ 'table-action-export-import-file-hint': string;
80
+ 'table-action-export-import-file-name': string;
81
+ 'table-action-export-import-file-content': string;
82
+ 'table-action-export-import-file-content-all': string;
83
+ 'table-action-export-import-file-content-part': string;
84
+ 'table-action-export-import-file-status': string;
85
+ 'table-action-export-import-file-account': string;
86
+ 'table-action-export-import-file-created': string;
87
+ 'table-action-export-import-file-record': (length: number) => string;
88
+ 'table-action-export-import-import-title': string;
89
+ 'table-action-export-import-log-hint': string;
90
+ 'table-action-export-import-log-name': string;
91
+ 'table-action-export-import-log-result': string;
92
+ 'table-action-export-import-log-ok': (num: number) => string;
93
+ 'table-action-export-import-log-err': (num: number) => string;
94
+ 'table-action-export-import-log-check': string;
95
+ 'table-action-export-import-log-detail-title': string;
96
+ 'table-action-export-import-log-err-log': string;
97
+ 'table-action-export-import-log-copy': string;
98
+ 'table-action-export-import-table-success-copy': string;
53
99
  };
54
100
  export default _default;
@@ -59,5 +59,63 @@ export default {
59
59
  },
60
60
  'batch-editor-quick-edit-title-2': function batchEditorQuickEditTitle2(product) {
61
61
  return "\u60A8\u5DF2\u9009\u62E9 ".concat(product);
62
- }
62
+ },
63
+ // 导出
64
+ 'table-action-export-import-export-success': '导出成功!',
65
+ 'table-action-export-import-button': '导出',
66
+ 'table-action-export-import-export-range': '导出范围',
67
+ 'table-action-export-import-current-page': '当前页面',
68
+ 'table-action-export-import-all-records': '所有记录',
69
+ 'table-action-export-import-selected-records': '所选记录',
70
+ 'table-action-export-import-selected': '已选',
71
+ 'table-action-export-import-item': function tableActionExportImportItem(length) {
72
+ return "".concat(length, " \u6761");
73
+ },
74
+ 'table-action-export-import-product': '导出商品',
75
+ // 导入
76
+ 'table-action-export-import-table-text-input-title': '单击或拖动文件到该区域进行上传',
77
+ 'table-action-export-import-table-text-input-describe': '支持单个上传。严禁上传公司数据或其他band文件。',
78
+ 'table-action-export-import-table-error-file': '仅支持上传.csv,.xls,.xlsx格式的文件!',
79
+ 'table-action-export-import-import-success': '导入成功!',
80
+ 'table-action-export-import-import-phone': '手机相同的是否覆盖',
81
+ 'table-action-export-import-table-success-download': '下载成功',
82
+ 'table-action-export-import-table-textimport-product': '导入商品',
83
+ 'table-action-export-import-table-text-product-template': '导入模板',
84
+ 'table-action-export-import-table-text-click-download': '点击下载',
85
+ 'table-action-export-import-table-text-edit-file': '替换文件',
86
+ 'table-action-export-import-button-import': '导入',
87
+ 'table-action-export-import-cancel': '取消',
88
+ 'table-action-export-import-file-completed': '已完成',
89
+ 'table-action-export-import-file-processing': '处理中',
90
+ 'table-action-export-import-file-pending': '待处理',
91
+ 'table-action-export-import-file-refresh': '刷新',
92
+ 'table-action-export-import-export-title': '导出文件',
93
+ 'table-action-export-import-file-hint': '仅显示最近的10次导出记录',
94
+ 'table-action-export-import-file-name': '导出文件',
95
+ 'table-action-export-import-file-content': '导出内容',
96
+ 'table-action-export-import-file-content-all': '所有',
97
+ 'table-action-export-import-file-content-part': '所选',
98
+ 'table-action-export-import-file-status': '状态',
99
+ 'table-action-export-import-file-account': '操作人',
100
+ 'table-action-export-import-file-created': '操作时间',
101
+ 'table-action-export-import-file-record': function tableActionExportImportFileRecord(length) {
102
+ return "".concat(length, " \u6761\u8BB0\u5F55");
103
+ },
104
+ // 导入日志
105
+ 'table-action-export-import-import-title': '导入日志',
106
+ 'table-action-export-import-log-hint': '仅显示最近的10次导入记录',
107
+ 'table-action-export-import-log-name': '导入文件',
108
+ 'table-action-export-import-log-result': '导入结果',
109
+ 'table-action-export-import-log-ok': function tableActionExportImportLogOk(num) {
110
+ return "\u6210\u529F ".concat(num, " \u6761");
111
+ },
112
+ 'table-action-export-import-log-err': function tableActionExportImportLogErr(num) {
113
+ return ", \u5931\u8D25 ".concat(num, " \u6761");
114
+ },
115
+ 'table-action-export-import-log-check': "\u67E5\u770B\u539F\u56E0",
116
+ // 导入详情
117
+ 'table-action-export-import-log-detail-title': '导入详情',
118
+ 'table-action-export-import-log-err-log': '失败日志',
119
+ 'table-action-export-import-log-copy': '复制',
120
+ 'table-action-export-import-table-success-copy': '复制成功'
63
121
  };
@@ -50,5 +50,51 @@ declare const _default: {
50
50
  'batch-editor-quick-edit': string;
51
51
  'batch-editor-quick-edit-title': (product: string, num: string) => string;
52
52
  'batch-editor-quick-edit-title-2': (product: string) => string;
53
+ 'table-action-export-import-export-success': string;
54
+ 'table-action-export-import-button': string;
55
+ 'table-action-export-import-export-range': string;
56
+ 'table-action-export-import-current-page': string;
57
+ 'table-action-export-import-all-records': string;
58
+ 'table-action-export-import-selected-records': string;
59
+ 'table-action-export-import-selected': string;
60
+ 'table-action-export-import-item': (length: number) => string;
61
+ 'table-action-export-import-product': string;
62
+ 'table-action-export-import-table-text-input-title': string;
63
+ 'table-action-export-import-table-text-input-describe': string;
64
+ 'table-action-export-import-table-error-file': string;
65
+ 'table-action-export-import-import-success': string;
66
+ 'table-action-export-import-import-phone': string;
67
+ 'table-action-export-import-table-success-download': string;
68
+ 'table-action-export-import-table-textimport-product': string;
69
+ 'table-action-export-import-table-text-product-template': string;
70
+ 'table-action-export-import-table-text-click-download': string;
71
+ 'table-action-export-import-table-text-edit-file': string;
72
+ 'table-action-export-import-button-import': string;
73
+ 'table-action-export-import-cancel': string;
74
+ 'table-action-export-import-file-completed': string;
75
+ 'table-action-export-import-file-processing': string;
76
+ 'table-action-export-import-file-pending': string;
77
+ 'table-action-export-import-file-refresh': string;
78
+ 'table-action-export-import-export-title': string;
79
+ 'table-action-export-import-file-hint': string;
80
+ 'table-action-export-import-file-name': string;
81
+ 'table-action-export-import-file-content': string;
82
+ 'table-action-export-import-file-content-all': string;
83
+ 'table-action-export-import-file-content-part': string;
84
+ 'table-action-export-import-file-status': string;
85
+ 'table-action-export-import-file-account': string;
86
+ 'table-action-export-import-file-created': string;
87
+ 'table-action-export-import-file-record': (length: number) => string;
88
+ 'table-action-export-import-import-title': string;
89
+ 'table-action-export-import-log-hint': string;
90
+ 'table-action-export-import-log-name': string;
91
+ 'table-action-export-import-log-result': string;
92
+ 'table-action-export-import-log-ok': (num: number) => string;
93
+ 'table-action-export-import-log-err': (num: number) => string;
94
+ 'table-action-export-import-log-check': string;
95
+ 'table-action-export-import-log-detail-title': string;
96
+ 'table-action-export-import-log-err-log': string;
97
+ 'table-action-export-import-log-copy': string;
98
+ 'table-action-export-import-table-success-copy': string;
53
99
  };
54
100
  export default _default;
@@ -59,5 +59,63 @@ export default {
59
59
  },
60
60
  'batch-editor-quick-edit-title-2': function batchEditorQuickEditTitle2(product) {
61
61
  return "\u60A8\u5DF2\u9078\u64C7 ".concat(product);
62
- }
62
+ },
63
+ // 导出
64
+ 'table-action-export-import-export-success': '導出成功!',
65
+ 'table-action-export-import-button': '匯出',
66
+ 'table-action-export-import-export-range': '導出範圍',
67
+ 'table-action-export-import-current-page': '當前頁面',
68
+ 'table-action-export-import-all-records': '所有記錄',
69
+ 'table-action-export-import-selected-records': '所選記錄',
70
+ 'table-action-export-import-selected': '已選',
71
+ 'table-action-export-import-item': function tableActionExportImportItem(length) {
72
+ return "".concat(length, " \u689D");
73
+ },
74
+ 'table-action-export-import-product': '導出商品',
75
+ // 导入
76
+ 'table-action-export-import-table-text-input-title': '單擊或拖動文件到該區域進行上傳',
77
+ 'table-action-export-import-table-text-input-describe': '支持單個上傳。嚴禁上傳公司數據或其他band文件。',
78
+ 'table-action-export-import-table-error-file': '僅支持上傳.csv,.xls,.xlsx格式的文件!',
79
+ 'table-action-export-import-import-success': '導入成功!',
80
+ 'table-action-export-import-import-phone': '手機相同的是否覆蓋',
81
+ 'table-action-export-import-table-success-download': '下載成功',
82
+ 'table-action-export-import-table-textimport-product': '導入商品',
83
+ 'table-action-export-import-table-text-product-template': '導入模板',
84
+ 'table-action-export-import-table-text-click-download': '點擊下載',
85
+ 'table-action-export-import-table-text-edit-file': '替換文件',
86
+ 'table-action-export-import-button-import': '導入',
87
+ 'table-action-export-import-cancel': '取消',
88
+ 'table-action-export-import-file-completed': '已完成',
89
+ 'table-action-export-import-file-processing': '處理中',
90
+ 'table-action-export-import-file-pending': '待處理',
91
+ 'table-action-export-import-file-refresh': '刷新',
92
+ 'table-action-export-import-export-title': '導出文件',
93
+ 'table-action-export-import-file-hint': '僅顯示最近的10次導出記錄',
94
+ 'table-action-export-import-file-name': '導出文件',
95
+ 'table-action-export-import-file-content': '導出內容',
96
+ 'table-action-export-import-file-content-all': '所有',
97
+ 'table-action-export-import-file-content-part': '所選',
98
+ 'table-action-export-import-file-status': '狀態',
99
+ 'table-action-export-import-file-account': '操作人',
100
+ 'table-action-export-import-file-created': '操作時間',
101
+ 'table-action-export-import-file-record': function tableActionExportImportFileRecord(length) {
102
+ return "".concat(length, " \u689D\u8A18\u9304");
103
+ },
104
+ // 导入日志
105
+ 'table-action-export-import-import-title': '導入日誌',
106
+ 'table-action-export-import-log-hint': '僅顯示最近的10次導入記錄',
107
+ 'table-action-export-import-log-name': '導入文件',
108
+ 'table-action-export-import-log-result': '導入結果',
109
+ 'table-action-export-import-log-ok': function tableActionExportImportLogOk(num) {
110
+ return "\u6210\u529F ".concat(num, " \u689D");
111
+ },
112
+ 'table-action-export-import-log-err': function tableActionExportImportLogErr(num) {
113
+ return ", \u5931\u8D25 ".concat(num, " \u689D");
114
+ },
115
+ 'table-action-export-import-log-check': "\u67E5\u770B\u539F\u56E0",
116
+ // 导入详情
117
+ 'table-action-export-import-log-detail-title': '導入詳情',
118
+ 'table-action-export-import-log-err-log': '失敗日誌',
119
+ 'table-action-export-import-log-copy': '復製',
120
+ 'table-action-export-import-table-success-copy': '復製成功'
63
121
  };
@@ -5,7 +5,7 @@ export declare const paginationConfig: {
5
5
  className: string;
6
6
  defaultCurrent: number;
7
7
  showTotal: (total: number, range: [number, number]) => string;
8
- itemRender: (page: number, type: "page" | "next" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
8
+ itemRender: (page: number, type: "next" | "page" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
9
9
  responsive: boolean;
10
10
  size: string;
11
11
  };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { ExportImportType } from "../../../../../types";
3
+ import "./index.less";
4
+ declare const ExportFile: (props: {
5
+ exportImport: ExportImportType;
6
+ }) => React.JSX.Element;
7
+ export default ExportFile;
@@ -0,0 +1,150 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/table/Actions/component/ExportImport/components/ExportFile/index.tsx
30
+ var ExportFile_exports = {};
31
+ __export(ExportFile_exports, {
32
+ default: () => ExportFile_default
33
+ });
34
+ module.exports = __toCommonJS(ExportFile_exports);
35
+ var import_ahooks = require("ahooks");
36
+ var import_antd = require("antd");
37
+ var import_react = __toESM(require("react"));
38
+ var import_useEngineContext = __toESM(require("../../../../../../../hooks/useEngineContext"));
39
+ var import_locales = require("../../../../../../../locales/index");
40
+ var import_serve = require("../../../../../serve");
41
+ var import_status = require("../../../../../status");
42
+ var import_utils = require("../../../../../utils");
43
+ var import_date = require("../../utils/date");
44
+ var import_download = __toESM(require("../../utils/download"));
45
+ var import_index = require("./index.less");
46
+ var defaultData = {
47
+ type: import_status.defaultOptions.exportValue,
48
+ skip: 1,
49
+ num: 10
50
+ };
51
+ var exportStatusOptions = {
52
+ pending: (0, import_locales.getText)("table-action-export-import-file-pending"),
53
+ processing: (0, import_locales.getText)("table-action-export-import-file-processing"),
54
+ completed: (0, import_locales.getText)("table-action-export-import-file-completed"),
55
+ complete: (0, import_locales.getText)("table-action-export-import-file-completed")
56
+ };
57
+ var ExportFile = (props) => {
58
+ const { exportImport } = props;
59
+ const { formId, formCode } = exportImport;
60
+ const [list, setList] = (0, import_react.useState)([]);
61
+ const [defaultParams, setDefaultParams] = (0, import_react.useState)(defaultData);
62
+ const context = (0, import_useEngineContext.default)();
63
+ import_utils.request.setRequest(context.appHelper.utils.request);
64
+ (0, import_react.useEffect)(() => {
65
+ let params = {};
66
+ if (formId) {
67
+ params.form_id = formId;
68
+ }
69
+ if (formCode) {
70
+ params.code = formCode;
71
+ }
72
+ setDefaultParams({
73
+ ...defaultParams,
74
+ ...params
75
+ });
76
+ }, [formId, formCode]);
77
+ const _historyList = (0, import_ahooks.useRequest)(import_serve.historyData, {
78
+ manual: true,
79
+ onSuccess: (res) => {
80
+ var _a;
81
+ if (res.code == 200) {
82
+ setList(((_a = res.data) == null ? void 0 : _a.list) || []);
83
+ }
84
+ }
85
+ });
86
+ const init = () => {
87
+ if ((defaultParams == null ? void 0 : defaultParams.form_id) || (defaultParams == null ? void 0 : defaultParams.code)) {
88
+ _historyList.run(defaultParams);
89
+ }
90
+ };
91
+ (0, import_react.useEffect)(() => {
92
+ init();
93
+ }, [defaultParams]);
94
+ const columns = [
95
+ {
96
+ title: (0, import_locales.getText)("table-action-export-import-file-name"),
97
+ dataIndex: "file_name",
98
+ render: (text, record) => {
99
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, record.status == "completed" || record.status == "complete" ? /* @__PURE__ */ import_react.default.createElement(
100
+ "a",
101
+ {
102
+ onClick: () => {
103
+ (0, import_download.default)(record.url, text);
104
+ }
105
+ },
106
+ text
107
+ ) : /* @__PURE__ */ import_react.default.createElement("span", null, text));
108
+ }
109
+ },
110
+ {
111
+ title: (0, import_locales.getText)("table-action-export-import-file-content"),
112
+ dataIndex: "setting",
113
+ render: (text, record) => {
114
+ var _a, _b, _c;
115
+ return /* @__PURE__ */ import_react.default.createElement("div", null, ((_b = (_a = text == null ? void 0 : text.params) == null ? void 0 : _a.ids) == null ? void 0 : _b.length) ? (0, import_locales.getText)("table-action-export-import-file-content-part") : (0, import_locales.getText)("table-action-export-import-file-content-all"), " ", (0, import_locales.getText)("table-action-export-import-file-record")(
116
+ `${((_c = record == null ? void 0 : record.result) == null ? void 0 : _c.total) || 0}`
117
+ ));
118
+ }
119
+ },
120
+ {
121
+ title: (0, import_locales.getText)("table-action-export-import-file-status"),
122
+ dataIndex: "status",
123
+ render: (text) => exportStatusOptions[text]
124
+ },
125
+ {
126
+ title: (0, import_locales.getText)("table-action-export-import-file-account"),
127
+ dataIndex: "account",
128
+ render: (text) => {
129
+ return text ? /* @__PURE__ */ import_react.default.createElement("div", null, `${(text == null ? void 0 : text.first_name) || ""} ${(text == null ? void 0 : text.last_name) || ""}`) : null;
130
+ }
131
+ },
132
+ {
133
+ title: (0, import_locales.getText)("table-action-export-import-file-created"),
134
+ dataIndex: "created_at",
135
+ render: (text) => (0, import_date.formatDate)(text)
136
+ }
137
+ ];
138
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "export-history-content" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Spin, { spinning: _historyList == null ? void 0 : _historyList.loading }, /* @__PURE__ */ import_react.default.createElement("div", { className: "content-hint" }, (0, import_locales.getText)("table-action-export-import-file-hint"), /* @__PURE__ */ import_react.default.createElement("a", { onClick: () => init() }, (0, import_locales.getText)("table-action-export-import-file-refresh"))), /* @__PURE__ */ import_react.default.createElement(
139
+ import_antd.Table,
140
+ {
141
+ rowClassName: "antd-table-row",
142
+ columns,
143
+ dataSource: list,
144
+ pagination: false,
145
+ rowKey: (record) => record.id,
146
+ scroll: { x: true }
147
+ }
148
+ ))));
149
+ };
150
+ var ExportFile_default = ExportFile;