@zgfe/modules-dm 1.0.1 → 1.0.2-dm.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.
- package/es/modules/dataCollection/collectionEventList.js +5 -0
- package/es/modules/dataCollection/tablePlus.js +9 -3
- package/es/modules/dataManage/index.js +2 -2
- package/es/modules/dataPlan/addEventOrUser.js +14 -1
- package/es/modules/dataPlan/addPlan.js +14 -1
- package/es/modules/dataPlan/index.js +1 -1
- package/es/modules/dataPlan/styles/index.less +1 -1
- package/package.json +3 -3
|
@@ -150,6 +150,11 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
150
150
|
|
|
151
151
|
|
|
152
152
|
var createEventGroup = function createEventGroup() {
|
|
153
|
+
if (eventNameInput.length > 20) {
|
|
154
|
+
message.error('名称不可超过20字符');
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
|
|
153
158
|
request(apis.upsertEventGroup, {
|
|
154
159
|
method: 'post',
|
|
155
160
|
data: {
|
|
@@ -348,7 +348,9 @@ var TablePlus = function TablePlus(props) {
|
|
|
348
348
|
placement: "bottom"
|
|
349
349
|
}, /*#__PURE__*/React.createElement("span", {
|
|
350
350
|
className: "group-handle"
|
|
351
|
-
},
|
|
351
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
352
|
+
type: "yidong"
|
|
353
|
+
}), "\u79FB\u52A8\u5230\u7EC4")), record.groupId != -1 && /*#__PURE__*/React.createElement(React.Fragment, null, groupPopoverContent(record, 'copy') != null && /*#__PURE__*/React.createElement(Popover, {
|
|
352
354
|
content: function content() {
|
|
353
355
|
return groupPopoverContent(record, 'copy');
|
|
354
356
|
},
|
|
@@ -356,12 +358,16 @@ var TablePlus = function TablePlus(props) {
|
|
|
356
358
|
placement: "bottom"
|
|
357
359
|
}, /*#__PURE__*/React.createElement("span", {
|
|
358
360
|
className: "group-handle"
|
|
359
|
-
},
|
|
361
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
362
|
+
type: "yidong"
|
|
363
|
+
}), "\u590D\u5236\u5230\u7EC4")), /*#__PURE__*/React.createElement("span", {
|
|
360
364
|
className: "group-handle",
|
|
361
365
|
onClick: function onClick() {
|
|
362
366
|
return groupHandle('move-out', record);
|
|
363
367
|
}
|
|
364
|
-
},
|
|
368
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
369
|
+
type: "yidong"
|
|
370
|
+
}), "\u79FB\u51FA\u5206\u7EC4"))));
|
|
365
371
|
} else {
|
|
366
372
|
return /*#__PURE__*/React.createElement("div", {
|
|
367
373
|
className: "event_name"
|
|
@@ -22,7 +22,7 @@ import DataCollection from '../dataCollection';
|
|
|
22
22
|
var DataManage = function DataManage(props) {
|
|
23
23
|
var classPrefix = 'data-manage';
|
|
24
24
|
|
|
25
|
-
var _useState = useState('
|
|
25
|
+
var _useState = useState('0'),
|
|
26
26
|
_useState2 = _slicedToArray(_useState, 2),
|
|
27
27
|
menuTab = _useState2[0],
|
|
28
28
|
setMenuTab = _useState2[1];
|
|
@@ -49,7 +49,7 @@ var DataManage = function DataManage(props) {
|
|
|
49
49
|
}, /*#__PURE__*/React.createElement("div", {
|
|
50
50
|
className: "".concat(classPrefix, "-menu")
|
|
51
51
|
}, /*#__PURE__*/React.createElement(Menu, {
|
|
52
|
-
defaultSelectedKeys: ['
|
|
52
|
+
defaultSelectedKeys: ['0'],
|
|
53
53
|
onSelect: onSelect,
|
|
54
54
|
items: items
|
|
55
55
|
})), menuTab == '0' && /*#__PURE__*/React.createElement(DataCollection, null), menuTab == '1' && /*#__PURE__*/React.createElement(PlanList, null));
|
|
@@ -21,7 +21,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
21
21
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
22
|
|
|
23
23
|
import { IconFont } from '@zgfe/business-lib';
|
|
24
|
-
import { Input, Button, Select, Table, Modal, Form } from 'antd';
|
|
24
|
+
import { Input, Button, Select, Table, Modal, Form, message } from 'antd';
|
|
25
25
|
var Option = Select.Option;
|
|
26
26
|
import React, { useEffect, useState } from 'react';
|
|
27
27
|
import './styles/index.less';
|
|
@@ -93,11 +93,21 @@ var addEventOrUser = function addEventOrUser(props) {
|
|
|
93
93
|
var handleRow = function handleRow(type, data) {
|
|
94
94
|
// console.log(type, data, tableRowData);
|
|
95
95
|
if (type == 'add') {
|
|
96
|
+
if (tableRowData.length >= 50) {
|
|
97
|
+
message.error('不可添加,最多添加50条数据');
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
|
|
96
101
|
var newRows = {
|
|
97
102
|
key: tableRowData[tableRowData.length - 1].key + 1
|
|
98
103
|
};
|
|
99
104
|
setTableRowData([].concat(_toConsumableArray(tableRowData), [newRows]));
|
|
100
105
|
} else {
|
|
106
|
+
if (tableRowData.length <= 1) {
|
|
107
|
+
message.error('不可删除,最少保留1条数据');
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
|
|
101
111
|
var _arr = Object.assign([], tableRowData).filter(function (item) {
|
|
102
112
|
if (item.key != (data === null || data === void 0 ? void 0 : data.key)) return item;
|
|
103
113
|
});
|
|
@@ -257,6 +267,9 @@ var addEventOrUser = function addEventOrUser(props) {
|
|
|
257
267
|
autoComplete: "off",
|
|
258
268
|
onFinish: onFinish
|
|
259
269
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
270
|
+
scroll: {
|
|
271
|
+
y: 400
|
|
272
|
+
},
|
|
260
273
|
className: "".concat(classPrefix, "-table"),
|
|
261
274
|
columns: columns,
|
|
262
275
|
dataSource: tableRowData,
|
|
@@ -145,6 +145,19 @@ var AddPlan = function AddPlan(props) {
|
|
|
145
145
|
maxCount: 1,
|
|
146
146
|
showUploadList: false,
|
|
147
147
|
beforeUpload: function beforeUpload(file) {
|
|
148
|
+
console.log(file);
|
|
149
|
+
var fileType = file.name.split('.');
|
|
150
|
+
|
|
151
|
+
if (fileType[fileType.length - 1] != 'xlsx' && fileType[fileType.length - 1] != 'xsl') {
|
|
152
|
+
message.error('上传仅支持xlsx或xsl格式的文件');
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (file.size > 5 * 1024 * 1024) {
|
|
157
|
+
message.error('最大支持上传5M的文件');
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
|
|
148
161
|
var formData = new FormData();
|
|
149
162
|
formData.append('file', file, file.name);
|
|
150
163
|
var data = new FormData();
|
|
@@ -597,7 +610,7 @@ var AddPlan = function AddPlan(props) {
|
|
|
597
610
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
598
611
|
type: "xiazai1"
|
|
599
612
|
}), "\u4E0B\u8F7D\u6A21\u677F"), /*#__PURE__*/React.createElement(Upload, _objectSpread({}, uploadProps), /*#__PURE__*/React.createElement(Button, null, /*#__PURE__*/React.createElement(IconFont, {
|
|
600
|
-
type: "
|
|
613
|
+
type: "daochu"
|
|
601
614
|
}), "\u6587\u4EF6\u4E0A\u4F20")))), /*#__PURE__*/React.createElement(Search, {
|
|
602
615
|
type: listTab == '1' ? 'event' : 'user',
|
|
603
616
|
total: searchTotal,
|
|
@@ -197,7 +197,7 @@ var PlanList = function PlanList(props) {
|
|
|
197
197
|
}, !drawerShow && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
198
198
|
className: "".concat(classPrefix, "-switchbox clearfix")
|
|
199
199
|
}, /*#__PURE__*/React.createElement("div", {
|
|
200
|
-
className: "switch"
|
|
200
|
+
className: "switch-div"
|
|
201
201
|
}, /*#__PURE__*/React.createElement("span", null, "\u57CB\u70B9\u65B9\u6848\u63A7\u5236"), /*#__PURE__*/React.createElement(Switch, {
|
|
202
202
|
onChange: isOpenChang,
|
|
203
203
|
checkedChildren: "\u5F00",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-dm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2-dm.0",
|
|
4
4
|
"module": "es/index.js",
|
|
5
5
|
"typings": "es/index.d.ts",
|
|
6
6
|
"license": "ISC",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@types/lodash": "^4.14.182",
|
|
42
42
|
"@umijs/fabric": "^2.8.1",
|
|
43
43
|
"@umijs/test": "^3.0.5",
|
|
44
|
-
"@zgfe/business-lib": "1.1.7-dmd.
|
|
44
|
+
"@zgfe/business-lib": "1.1.7-dmd.1",
|
|
45
45
|
"antd": "4.22.6",
|
|
46
46
|
"dumi": "^1.1.0",
|
|
47
47
|
"father-build": "^1.17.2",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"umi-request": "^1.4.0",
|
|
54
54
|
"yorkie": "^2.0.0"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "785ae49b00db143e5a1d2f6f153ae7e30ce6b6cb",
|
|
57
57
|
"gitHooks": {
|
|
58
58
|
"pre-commit": "lint-staged"
|
|
59
59
|
}
|