ztxkui 3.0.15 → 3.0.18

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/App.js CHANGED
@@ -614,6 +614,9 @@ var summaryConfig = [
614
614
  toFixedNum: 3,
615
615
  },
616
616
  ],
617
+ onClickHandle: function (data) {
618
+ console.log(data);
619
+ },
617
620
  },
618
621
  {
619
622
  type: 'total',
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @author 陈亚雄
3
+ * @description
4
+ */
5
+ import React from 'react';
6
+ declare const SinaturesDemo: React.FC;
7
+ export default SinaturesDemo;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @author 陈亚雄
3
+ * @description
4
+ */
5
+ import React from 'react';
6
+ // redux
7
+ // ztxkui公共组件
8
+ import { Sinatures } from '../index';
9
+ // 路由配置
10
+ // store
11
+ // 自定义组件
12
+ // 其他文件
13
+ var SinaturesDemo = function () {
14
+ return (React.createElement("div", null,
15
+ React.createElement(Sinatures, null)));
16
+ };
17
+ export default SinaturesDemo;
@@ -524,14 +524,16 @@ function EnhanceSelect(_a) {
524
524
  // 选中时
525
525
  var onSelectHandle = function (value, obj) {
526
526
  // console.log('选中数据事件');
527
- var text = textContent(obj.children);
528
- var textarea = document.createElement('textarea');
529
- textarea.setAttribute('readonly', 'readonly');
530
- textarea.value = text;
531
- document.body.appendChild(textarea);
532
- textarea.select();
533
- document === null || document === void 0 ? void 0 : document.execCommand('copy');
534
- document.body.removeChild(textarea);
527
+ if (restProps.mode !== 'multiple') {
528
+ var text = textContent(obj.children);
529
+ var textarea = document.createElement('textarea');
530
+ textarea.setAttribute('readonly', 'readonly');
531
+ textarea.value = text;
532
+ document.body.appendChild(textarea);
533
+ textarea.select();
534
+ document === null || document === void 0 ? void 0 : document.execCommand('copy');
535
+ document.body.removeChild(textarea);
536
+ }
535
537
  if (!restProps.mode) {
536
538
  setIsOpen(false);
537
539
  }
@@ -4,6 +4,7 @@ export interface ISummaryData {
4
4
  key: string;
5
5
  titleIndex: number;
6
6
  list: (string | number | null)[];
7
+ [prop: string]: any;
7
8
  }
8
9
  interface IProps {
9
10
  summaryData: ISummaryData[];
@@ -162,16 +162,25 @@ function Table(props) {
162
162
  ? function (pageData) {
163
163
  var summaryData = getSummaryData(summaryConfig, pageData, newColumns, props.rowSelection ? true : false);
164
164
  return (React.createElement(AntTable.Summary, { fixed: summaryFixed }, summaryData.map(function (summary) {
165
- var title = summary.title, key = summary.key, titleIndex = summary.titleIndex, list = summary.list;
165
+ var title = summary.title, key = summary.key, titleIndex = summary.titleIndex, list = summary.list, columnList = summary.columnList, onClickHandle = summary.onClickHandle;
166
166
  return (React.createElement(AntTable.Summary.Row, { key: key }, Array.isArray(list) &&
167
167
  list.map(function (item, index) {
168
+ var data = {
169
+ index: index,
170
+ column: Array.isArray(columnList)
171
+ ? columnList[index]
172
+ : null,
173
+ num: item,
174
+ };
168
175
  if (titleIndex === index) {
169
- return (React.createElement(AntTable.Summary.Cell, { key: index, index: index }, title));
176
+ return (React.createElement(AntTable.Summary.Cell, { key: index, index: index }, onClickHandle ? (React.createElement("div", { onClick: function () { return onClickHandle === null || onClickHandle === void 0 ? void 0 : onClickHandle(data); } }, title)) : (title)));
170
177
  }
171
178
  else {
172
179
  return (React.createElement(AntTable.Summary.Cell, { key: index, index: index },
173
180
  React.createElement("div", { style: {
174
181
  color: '#ff6666',
182
+ }, onClick: function () {
183
+ return onClickHandle && (onClickHandle === null || onClickHandle === void 0 ? void 0 : onClickHandle(data));
175
184
  } }, item)));
176
185
  }
177
186
  })));
@@ -9,6 +9,8 @@ export interface ISummaryConfig {
9
9
  type: 'subtotal' | 'total';
10
10
  fields: (string | IFields)[];
11
11
  title?: string;
12
+ onClickHandle?: any;
13
+ [prop: string]: any;
12
14
  }
13
15
  /**
14
16
  * @description 获取总结栏数据
@@ -17,7 +17,7 @@ function getSummaryData(summaryConfig, pageData, columns, hasRowSelection) {
17
17
  var _summaryData = [];
18
18
  if (Array.isArray(summaryConfig)) {
19
19
  summaryConfig.forEach(function (summary) {
20
- var type = summary.type, fields = summary.fields, title = summary.title;
20
+ var type = summary.type, fields = summary.fields, title = summary.title, onClickHandle = summary.onClickHandle;
21
21
  switch (type) {
22
22
  case 'subtotal': // 小计
23
23
  // 如果没有设置 统计字段 那么直接跳出循环
@@ -35,12 +35,19 @@ function getSummaryData(summaryConfig, pageData, columns, hasRowSelection) {
35
35
  ? subtotalObj_1[col.key || col.dataIndex]
36
36
  : undefined;
37
37
  });
38
+ var columnResult = columns.map(function (col) { return ({
39
+ key: col === null || col === void 0 ? void 0 : col.key,
40
+ dataIndex: col === null || col === void 0 ? void 0 : col.dataIndex,
41
+ }); });
38
42
  _summaryData.push({
39
43
  title: title || '小计',
40
44
  titleIndex: 0 + (hasRowSelection ? 1 : 0),
41
45
  key: 'subtotal',
42
46
  list: hasRowSelection
43
47
  ? __spreadArray([undefined], subtotalResult) : subtotalResult,
48
+ columnList: hasRowSelection
49
+ ? __spreadArray([undefined], columnResult) : columnResult,
50
+ onClickHandle: onClickHandle,
44
51
  });
45
52
  break;
46
53
  case 'total': // 总计
@@ -59,11 +66,18 @@ function getSummaryData(summaryConfig, pageData, columns, hasRowSelection) {
59
66
  ? totalObj_1[col.key || col.dataIndex]
60
67
  : undefined;
61
68
  });
69
+ var columnResult_1 = columns.map(function (col) { return ({
70
+ key: col === null || col === void 0 ? void 0 : col.key,
71
+ dataIndex: col === null || col === void 0 ? void 0 : col.dataIndex,
72
+ }); });
62
73
  _summaryData.push({
63
74
  title: title || '总计',
64
75
  titleIndex: 0 + (hasRowSelection ? 1 : 0),
65
76
  key: 'total',
66
77
  list: hasRowSelection ? __spreadArray([undefined], totalResult) : totalResult,
78
+ columnList: hasRowSelection
79
+ ? __spreadArray([undefined], columnResult_1) : columnResult_1,
80
+ onClickHandle: onClickHandle,
67
81
  });
68
82
  }
69
83
  break;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @author 陈亚雄
3
+ * @description 电子签章组件
4
+ */
5
+ import React from 'react';
6
+ /**
7
+ * TodoList
8
+ * 实现可以上传文件,删除列
9
+ * 实现受控,接收一个附件列表
10
+ */
11
+ declare const Sinatures: React.FC;
12
+ export default Sinatures;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @author 陈亚雄
3
+ * @description 电子签章组件
4
+ */
5
+ import React from 'react';
6
+ // redux
7
+ // ztxkui公共组件
8
+ // 路由配置
9
+ // store
10
+ // 自定义组件
11
+ // 其他文件
12
+ /**
13
+ * TodoList
14
+ * 实现可以上传文件,删除列
15
+ * 实现受控,接收一个附件列表
16
+ */
17
+ var Sinatures = function () {
18
+ return React.createElement("div", null, "Sinatures");
19
+ };
20
+ export default Sinatures;
@@ -0,0 +1,19 @@
1
+ export interface IFileItem {
2
+ attachId: string;
3
+ attachName: string;
4
+ attachSize?: number;
5
+ attachType?: string;
6
+ attachTypeName?: string;
7
+ isCustomerReference?: boolean;
8
+ templateAttachId?: string;
9
+ templateAttachName?: string;
10
+ compareAttachId?: string;
11
+ compareAttachName?: string;
12
+ [prop: string]: any;
13
+ }
14
+ export interface IProps {
15
+ /** 是否显示上传按钮 */
16
+ isUpdate?: boolean;
17
+ /** 附件列表 */
18
+ fileList?: IFileItem[];
19
+ }
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.css CHANGED
@@ -1752,12 +1752,12 @@ template {
1752
1752
  }
1753
1753
 
1754
1754
  .print-container--content {
1755
- margin-top: 42px;
1756
1755
  width: 1000px;
1757
- min-height: 90vh;
1756
+ min-height: 100vh;
1758
1757
  margin-right: auto;
1759
1758
  margin-left: auto;
1760
1759
  padding: 10px 15px;
1760
+ padding-top: 52px;
1761
1761
  }
1762
1762
  .print-container--content .ant-table {
1763
1763
  background: none;
package/dist/index.d.ts CHANGED
@@ -42,6 +42,7 @@ export { default as SortList } from './components/business/SortList';
42
42
  export { default as Empty } from './components/Empty';
43
43
  export { default as Print } from './components/Print';
44
44
  export { default as PrintContainer } from './components/PrintContainer';
45
+ export { default as Sinatures } from './components/business/Signatures';
45
46
  export { ConfigProvider, Drawer, message, Space, Grid, Divider, Dropdown, Badge, List, Result, Spin, Popconfirm, TreeSelect, Tree, Progress, Cascader, Tooltip, Descriptions, Image, Popover, Breadcrumb, Transfer, Row, Col, } from 'antd';
46
47
  export { default as zhCN } from 'antd/lib/locale/zh_CN';
47
48
  export { default as Icon, createFromIconfontCN } from '@ant-design/icons';
package/dist/index.js CHANGED
@@ -21,6 +21,7 @@
21
21
  // import DragSort from './DemoCom/DragSort';
22
22
  // import PrintDemo from './DemoCom/PrintDemo';
23
23
  // import PrintContainerDemo from './DemoCom/PrintContainerDemo';
24
+ // import SinaturesDemo from './DemoCom/SinaturesDemo';
24
25
  // dayjs.locale(zhCn);
25
26
  // ReactDOM.render(
26
27
  // // <React.StrictMode>
@@ -75,6 +76,9 @@
75
76
  // <Route exact path="/drag-sort">
76
77
  // <DragSort />
77
78
  // </Route>
79
+ // <Route exact path="/sinatures">
80
+ // <SinaturesDemo />
81
+ // </Route>
78
82
  // <Route exact path="/test">
79
83
  // <div>
80
84
  // <h1>
@@ -144,6 +148,7 @@ export { default as SortList } from './components/business/SortList';
144
148
  export { default as Empty } from './components/Empty';
145
149
  export { default as Print } from './components/Print';
146
150
  export { default as PrintContainer } from './components/PrintContainer';
151
+ export { default as Sinatures } from './components/business/Signatures';
147
152
  export { ConfigProvider, Drawer, message, Space, Grid, Divider, Dropdown, Badge, List, Result, Spin, Popconfirm, TreeSelect, Tree, Progress, Cascader, Tooltip, Descriptions, Image, Popover, Breadcrumb, Transfer, Row, Col, } from 'antd';
148
153
  export { default as zhCN } from 'antd/lib/locale/zh_CN';
149
154
  export { default as Icon, createFromIconfontCN } from '@ant-design/icons';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkui",
3
- "version": "3.0.15",
3
+ "version": "3.0.18",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",