@zgfe/modules-dm 1.0.2-dm.21 → 1.0.2-dm.23

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.
@@ -241,8 +241,9 @@ var CollectionEventList = function CollectionEventList(props) {
241
241
  case 'is_stop':
242
242
  return item.is_stop == filterItem.value || item.groupId != undefined;
243
243
  }
244
- }; // 多条件同时筛选
244
+ };
245
245
 
246
+ var clearEmptyGroupFlag = false; // 多条件同时筛选
246
247
 
247
248
  var _tableHandleData = [];
248
249
  tableHandleDataBasics.map(function (item) {
@@ -250,6 +251,7 @@ var CollectionEventList = function CollectionEventList(props) {
250
251
  filterTypeData.map(function (filterItem) {
251
252
  if (!_judgeFun(item, filterItem)) {
252
253
  falg = false;
254
+ if (filterItem.type == 'event_hidden' || filterItem.type == 'is_stop') clearEmptyGroupFlag = true;
253
255
  }
254
256
  });
255
257
  falg && _tableHandleData.push(item);
@@ -262,7 +264,7 @@ var CollectionEventList = function CollectionEventList(props) {
262
264
  }
263
265
  });
264
266
 
265
- setTotal(total); // 过滤空组
267
+ setTotal(total); // 过滤空组 , event_hidden 和 is_stop,触发
266
268
 
267
269
  var clearEmptyGroup = function clearEmptyGroup(data) {
268
270
  var _data = _.cloneDeep(data);
@@ -281,7 +283,11 @@ var CollectionEventList = function CollectionEventList(props) {
281
283
  return _data;
282
284
  };
283
285
 
284
- setTableHandleData(clearEmptyGroup(_tableHandleData));
286
+ if (!clearEmptyGroupFlag) {
287
+ setTableHandleData(_tableHandleData);
288
+ } else {
289
+ setTableHandleData(clearEmptyGroup(_tableHandleData));
290
+ }
285
291
  }, [filterTypeData, tableHandleDataBasics]); // 是否已包含筛选type
286
292
 
287
293
  var filterHas = function filterHas(type) {
@@ -173,6 +173,7 @@
173
173
  }
174
174
  }
175
175
  .select-style {
176
+ width: 126px;
176
177
  .ant-select-selection-item {
177
178
  color: #021429;
178
179
  font-weight: 500;
@@ -74,6 +74,8 @@ var DataManage = function DataManage(props) {
74
74
  }
75
75
  }, /*#__PURE__*/React.createElement("div", {
76
76
  className: classPrefix
77
+ }, /*#__PURE__*/React.createElement("div", {
78
+ className: "tabs-box"
77
79
  }, /*#__PURE__*/React.createElement(Tabs, {
78
80
  className: "tabs",
79
81
  defaultActiveKey: "0",
@@ -93,7 +95,7 @@ var DataManage = function DataManage(props) {
93
95
  type: "maidianfanganguanli"
94
96
  }), "\u57CB\u70B9\u65B9\u6848\u7BA1\u7406"),
95
97
  key: "1"
96
- })), listTab == '0' && /*#__PURE__*/React.createElement(DataCollection, null), listTab == '1' && /*#__PURE__*/React.createElement(PlanList, null)));
98
+ }))), listTab == '0' && /*#__PURE__*/React.createElement(DataCollection, null), listTab == '1' && /*#__PURE__*/React.createElement(PlanList, null)));
97
99
  };
98
100
 
99
101
  export default DataManage;
@@ -5,6 +5,10 @@
5
5
  top: 0;
6
6
  left: 0;
7
7
  width: 100%;
8
+ .tabs {
9
+ position: absolute !important;
10
+ top: 0 !important;
11
+ }
8
12
  }
9
13
  .__dumi-default-menu {
10
14
  width: 0;
@@ -15,9 +19,17 @@
15
19
  display: flex;
16
20
  height: 100%;
17
21
  background: #f5f5f5;
22
+ .tabs-box {
23
+ position: relative;
24
+ min-width: 240px;
25
+ margin-right: 24px;
26
+ background: #fff;
27
+ }
18
28
  .tabs {
19
- box-sizing: border-box;
20
- width: 240px;
29
+ position: fixed;
30
+ top: 48px;
31
+ left: 0;
32
+ min-width: 240px;
21
33
  margin-right: 24px;
22
34
  padding-top: 16px;
23
35
  background: #fff;
@@ -152,15 +152,14 @@ var addEventOrUser = function addEventOrUser(props) {
152
152
 
153
153
  var tableColumnsPropsRender = function tableColumnsPropsRender(item) {
154
154
  var render = function render(text, record, index) {
155
- return /*#__PURE__*/React.createElement(React.Fragment, null, item.dataIndex == 'set' ? /*#__PURE__*/React.createElement(Button, {
156
- type: "text",
157
- className: "".concat(classPrefix, "-table-del"),
155
+ return /*#__PURE__*/React.createElement(React.Fragment, null, item.dataIndex == 'set' ? /*#__PURE__*/React.createElement(IconFont, {
156
+ className: "set-del ".concat(tableRowData.length <= 1 ? 'set-del-err' : ''),
157
+ disabled: true,
158
+ type: "shanchu1",
158
159
  onClick: function onClick() {
159
160
  handleRow('del', record);
160
161
  }
161
- }, /*#__PURE__*/React.createElement(IconFont, {
162
- type: "shanchu1"
163
- })) : /*#__PURE__*/React.createElement(Form.Item, {
162
+ }) : /*#__PURE__*/React.createElement(Form.Item, {
164
163
  name: "".concat(item.dataIndex, "-").concat(record.key),
165
164
  rules: rulesData(item)
166
165
  }, /*#__PURE__*/React.createElement(Input, null)));
@@ -187,12 +186,20 @@ var addEventOrUser = function addEventOrUser(props) {
187
186
 
188
187
 
189
188
  var _columns_event = [{
190
- title: '*事件名称',
189
+ title: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
190
+ style: {
191
+ color: 'red'
192
+ }
193
+ }, "*"), " \u4E8B\u4EF6\u540D\u79F0"),
191
194
  dataIndex: 'eventName',
192
195
  key: 'eventName',
193
196
  align: 'center'
194
197
  }, {
195
- title: '*事件属性',
198
+ title: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
199
+ style: {
200
+ color: 'red'
201
+ }
202
+ }, "*"), " \u4E8B\u4EF6\u5C5E\u6027"),
196
203
  dataIndex: 'attrName',
197
204
  key: 'attrName',
198
205
  align: 'center'
@@ -203,12 +210,20 @@ var addEventOrUser = function addEventOrUser(props) {
203
210
  }]; // 表格列 - user
204
211
 
205
212
  var _columns_user = [{
206
- title: '*唯一标识',
213
+ title: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
214
+ style: {
215
+ color: 'red'
216
+ }
217
+ }, "*"), " \u552F\u4E00\u6807\u8BC6"),
207
218
  dataIndex: 'identify',
208
219
  key: 'identify',
209
220
  align: 'center'
210
221
  }, {
211
- title: '*属性名称',
222
+ title: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
223
+ style: {
224
+ color: 'red'
225
+ }
226
+ }, "*"), " \u5C5E\u6027\u540D\u79F0"),
212
227
  dataIndex: 'propName',
213
228
  key: 'propName',
214
229
  align: 'center'
@@ -17,7 +17,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
17
17
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
18
 
19
19
  import { BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
20
- import { Input, Button, Select, Tabs, Drawer, Upload, message, Checkbox, Empty, Spin } from 'antd';
20
+ import { Input, Button, Select, Tabs, Drawer, Upload, message, Checkbox, Spin, Table } from 'antd';
21
21
  var Option = Select.Option;
22
22
  import React, { useEffect, useState, useContext } from 'react';
23
23
  import './styles/index.less';
@@ -425,6 +425,7 @@ var AddPlan = function AddPlan(props) {
425
425
 
426
426
  var savePlanData = function savePlanData() {
427
427
  if (planName == '') {
428
+ message.error('请输入方案名称');
428
429
  setplanNameInputStatus('warning');
429
430
  return;
430
431
  }
@@ -651,8 +652,36 @@ var AddPlan = function AddPlan(props) {
651
652
  } else {
652
653
  setSearchTotal(userAttrData.length);
653
654
  }
654
- }, [listTab, eventListData, userAttrData]);
655
+ }, [listTab, eventListData, userAttrData]); // 表格列
656
+
657
+ var columns = [{
658
+ title: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Checkbox, {
659
+ className: allCheckedClassName,
660
+ checked: tableAllchecked,
661
+ style: {
662
+ marginRight: '10px'
663
+ },
664
+ onChange: function onChange(e) {
665
+ allCheck(e);
666
+ }
667
+ }), "\u4E8B\u4EF6\u540D\u79F0"),
668
+ dataIndex: 'eventName',
669
+ width: '25%'
670
+ }, {
671
+ title: '采集状态',
672
+ dataIndex: 'eventActive',
673
+ width: '25%'
674
+ }, {
675
+ title: '事件属性',
676
+ dataIndex: 'attributeName',
677
+ width: '25%'
678
+ }, {
679
+ title: '采集状态',
680
+ dataIndex: 'attributeActive',
681
+ width: '25%'
682
+ }];
655
683
  return /*#__PURE__*/React.createElement(Drawer, {
684
+ className: "".concat(classPrefix, "-drawer"),
656
685
  width: '70%',
657
686
  placement: "right",
658
687
  destroyOnClose: true,
@@ -679,9 +708,7 @@ var AddPlan = function AddPlan(props) {
679
708
  value: planName,
680
709
  status: planNameInputStatus,
681
710
  onChange: PlanNameChange
682
- }), planNameInputStatus != '' && /*#__PURE__*/React.createElement("div", {
683
- className: "input-waring"
684
- }, "\u8BF7\u8F93\u5165\u65B9\u6848\u540D\u79F0"), (props.detailId == -1 || editOperate) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
711
+ }), (props.detailId == -1 || editOperate) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
685
712
  className: "cancel",
686
713
  onClick: function onClick() {
687
714
  return closeDrawer('close');
@@ -735,18 +762,12 @@ var AddPlan = function AddPlan(props) {
735
762
  setSearchData: setSearchData,
736
763
  setVisible: setVisible,
737
764
  isDemo: isDemo
738
- }), listTab == '1' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("ul", {
739
- className: "".concat(classPrefix, "-table-header")
740
- }, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement(Checkbox, {
741
- className: allCheckedClassName,
742
- checked: tableAllchecked,
743
- style: {
744
- marginRight: '10px'
745
- },
746
- onChange: function onChange(e) {
747
- allCheck(e);
748
- }
749
- }), "\u4E8B\u4EF6\u540D\u79F0"), /*#__PURE__*/React.createElement("li", null, "\u91C7\u96C6\u72B6\u6001"), /*#__PURE__*/React.createElement("li", null, "\u4E8B\u4EF6\u5C5E\u6027"), /*#__PURE__*/React.createElement("li", null, "\u91C7\u96C6\u72B6\u6001")), eventListData.map(function (item, index) {
765
+ }), listTab == '1' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Table, {
766
+ className: "".concat(classPrefix, "-table-header ").concat(JSON.stringify(eventListData).indexOf('eventName') == -1 ? 'empty' : ''),
767
+ columns: columns,
768
+ dataSource: [],
769
+ pagination: false
770
+ }), eventListData.map(function (item, index) {
750
771
  return /*#__PURE__*/React.createElement(EventList, {
751
772
  key: index,
752
773
  selectedRowKeys: selectedRowKeys,
@@ -756,8 +777,6 @@ var AddPlan = function AddPlan(props) {
756
777
  tableClick: tableClick,
757
778
  eventListDataIndex: index
758
779
  });
759
- }), JSON.stringify(eventListData).indexOf('eventName') == -1 && /*#__PURE__*/React.createElement(Empty, {
760
- image: Empty.PRESENTED_IMAGE_SIMPLE
761
780
  })), listTab == '2' && /*#__PURE__*/React.createElement(UserAttributeList, {
762
781
  tableCheck: tableCheck,
763
782
  allCheck: allCheck,
@@ -125,8 +125,7 @@ var PlanList = function PlanList(props) {
125
125
  appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
126
126
  }
127
127
  }).then(function (res) {
128
- if (!res) throw new Error();
129
- setListData(res.data.planList);
128
+ res.data && res.data.planList && setListData(res.data.planList);
130
129
  }).catch(function (err) {
131
130
  console.error('查询列表失败', err);
132
131
  }).finally(function () {});
@@ -199,7 +198,7 @@ var PlanList = function PlanList(props) {
199
198
 
200
199
  return /*#__PURE__*/React.createElement("div", {
201
200
  className: classPrefix
202
- }, !drawerShow && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
201
+ }, /*#__PURE__*/React.createElement("div", {
203
202
  className: "".concat(classPrefix, "-switchbox clearfix")
204
203
  }, /*#__PURE__*/React.createElement("div", {
205
204
  className: "switch-div"
@@ -232,7 +231,7 @@ var PlanList = function PlanList(props) {
232
231
  dataSource: listData,
233
232
  // onChange={onChange}
234
233
  pagination: false
235
- })), /*#__PURE__*/React.createElement(AddPlan, {
234
+ }), /*#__PURE__*/React.createElement(AddPlan, {
236
235
  listData: listData,
237
236
  detailName: detailName,
238
237
  drawerShow: drawerShow,
@@ -23,7 +23,7 @@ var Search = function Search(props) {
23
23
  })
24
24
  }), /*#__PURE__*/React.createElement("div", {
25
25
  className: "".concat(classPrefix, "-text")
26
- }, "\u5171", /*#__PURE__*/React.createElement("span", null, props.total), "\u6761 / \u4E0A\u9650500\u6761"), /*#__PURE__*/React.createElement(Button, {
26
+ }, "\u5171 ", /*#__PURE__*/React.createElement("span", null, props.total), " \u6761 / \u4E0A\u9650500\u6761"), /*#__PURE__*/React.createElement(Button, {
27
27
  icon: /*#__PURE__*/React.createElement(IconFont, {
28
28
  type: "tianjia",
29
29
  style: {
@@ -83,6 +83,18 @@
83
83
  .add-plan {
84
84
  position: relative;
85
85
  height: 100%;
86
+ &-drawer {
87
+ .ant-drawer-header-title {
88
+ height: 20px;
89
+ .ant-drawer-close {
90
+ position: absolute;
91
+ right: 24px;
92
+ }
93
+ }
94
+ .ant-drawer-mask {
95
+ background: rgba(0, 0, 0, 0.8);
96
+ }
97
+ }
86
98
  .spin {
87
99
  position: absolute;
88
100
  top: 50%;
@@ -106,7 +118,8 @@
106
118
  &-top {
107
119
  position: relative;
108
120
  display: flex;
109
- margin-bottom: 30px;
121
+ margin-top: -8px;
122
+ margin-bottom: 8px;
110
123
  .input-waring {
111
124
  position: absolute;
112
125
  bottom: -30px;
@@ -143,7 +156,7 @@
143
156
  }
144
157
  &-tabs {
145
158
  position: relative;
146
- display: flex;
159
+ // display: flex;
147
160
  margin-bottom: 15px;
148
161
  > :nth-child(1) {
149
162
  border-radius: 4px 0 0 4px !important;
@@ -153,7 +166,7 @@
153
166
  }
154
167
  .handle-box {
155
168
  position: absolute;
156
- top: 14px;
169
+ top: 5px;
157
170
  right: 20px;
158
171
  .bsicon {
159
172
  margin-right: 10px;
@@ -170,15 +183,26 @@
170
183
  }
171
184
  }
172
185
  &-table-header {
173
- display: flex;
174
- margin: 0;
175
- padding: 0;
176
- list-style-type: none;
177
- background: #fff;
178
- li {
179
- width: 25%;
180
- padding: 16px;
181
- border: 1px solid #e8efff;
186
+ .ant-table-tbody {
187
+ display: none;
188
+ }
189
+ .ant-table {
190
+ border-radius: 8px 8px 0 0 !important;
191
+ }
192
+ // display: flex;
193
+ // margin: 0;
194
+ // padding: 0;
195
+ // list-style-type: none;
196
+ // background: #fff;
197
+ // li {
198
+ // width: 25%;
199
+ // padding: 16px;
200
+ // border: 1px solid #e8efff;
201
+ // }
202
+ }
203
+ &-table-header.empty {
204
+ .ant-table-tbody {
205
+ display: contents;
182
206
  }
183
207
  }
184
208
  .user-list,
@@ -221,6 +245,10 @@
221
245
  .ant-table-thead {
222
246
  display: none;
223
247
  }
248
+ .ant-table {
249
+ border: none;
250
+ border-radius: 0;
251
+ }
224
252
  }
225
253
  // &-table-header {
226
254
  // display: flex;
@@ -247,6 +275,16 @@
247
275
  }
248
276
  }
249
277
  .add-event {
278
+ .set-del {
279
+ margin-left: 15px;
280
+ color: #021429;
281
+ }
282
+ .set-del-err {
283
+ color: #cacdd4;
284
+ }
285
+ .ant-modal-body {
286
+ padding: 5px 24px 24px 24px;
287
+ }
250
288
  .ant-form-item {
251
289
  margin: 0;
252
290
  }
@@ -271,6 +309,7 @@
271
309
  &-text {
272
310
  span {
273
311
  color: @primary-color;
312
+ font-weight: bold;
274
313
  }
275
314
  }
276
315
  &-add-button {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-dm",
3
- "version": "1.0.2-dm.21",
3
+ "version": "1.0.2-dm.23",
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-dmd2.7",
44
+ "@zgfe/business-lib": "1.1.7-dmd2.8",
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": "428e45251462fb8f5135e28630fa7e4fde4e20c8",
56
+ "gitHead": "04b81f0ef247ec3084e74d34b068327862525217",
57
57
  "gitHooks": {
58
58
  "pre-commit": "lint-staged"
59
59
  }