@zgfe/modules-settings 2.1.0-zhongyuan.6 → 2.1.0-zhongyuan.8

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.
@@ -76,8 +76,10 @@ var CreateMeta = function CreateMeta(props) {
76
76
  form.setFieldsValue({
77
77
  aliasName: data.aliasName,
78
78
  eventName: data.eventName,
79
- triggeringOccasion: data.triggeringOccasion
79
+ businessLabelId: data.businessLabelId
80
80
  });
81
+ setTriTagInput(data.triggeringOccasion);
82
+ setTriTagId(data.triggerLabelId);
81
83
  setInputText(data.eventName);
82
84
  if (data.eventAttrList) {
83
85
  setEventAttrList(_toConsumableArray(data.eventAttrList));
@@ -113,7 +115,7 @@ var CreateMeta = function CreateMeta(props) {
113
115
  });
114
116
  return _context.abrupt("return");
115
117
  case 11:
116
- //吧参数传递给主页面
118
+ //把参数传递给主页面
117
119
  if (props.onSubmit) {
118
120
  if (props.data) {
119
121
  props.onSubmit(_objectSpread(_objectSpread({}, props.data), {}, {
@@ -123,34 +125,19 @@ var CreateMeta = function CreateMeta(props) {
123
125
  props.onSubmit({
124
126
  eventName: values.eventName,
125
127
  aliasName: values.aliasName,
126
- triggeringOccasion: values.triggeringOccasion,
127
- del: 1,
128
+ triggeringOccasion: triTagInput,
128
129
  eventAttrList: eventAttrList,
129
- bizTagId: bizTagId
130
+ businessLabelId: values.businessLabelId,
131
+ triggerLabelId: triTagId,
132
+ businessLabel: bizTag.filter(function (res) {
133
+ return res.id == values.businessLabelId;
134
+ })[0],
135
+ triggerLabel: triTag.filter(function (res) {
136
+ return res.id == values.businessLabelId;
137
+ })[0]
130
138
  }, 'create');
131
139
  }
132
140
  }
133
- // request<any>(apis.createEvent, {
134
- // method: 'POST',
135
- // data: {
136
- // app_id: currentApp?.appId,
137
- // eventName: values.eventName,
138
- // aliasName: values.aliasName,
139
- // triggeringOccasion: values.triggeringOccasion,
140
- // eventAttrList,
141
- // },
142
- // }).then((res) => {
143
- // if (res?.code === '100000') {
144
- // notification.success({
145
- // message: '保存成功',
146
- // });
147
- // props.onSubmit && props.onSubmit();
148
- // } else {
149
- // notification.error({
150
- // message: '保存失败',
151
- // });
152
- // }
153
- // });
154
141
  _context.next = 17;
155
142
  break;
156
143
  case 14:
@@ -473,8 +460,8 @@ var CreateMeta = function CreateMeta(props) {
473
460
  setBizTag = _useState18[1];
474
461
  var _useState19 = useState(),
475
462
  _useState20 = _slicedToArray(_useState19, 2),
476
- bizTagId = _useState20[0],
477
- setBizTagId = _useState20[1];
463
+ triTagInput = _useState20[0],
464
+ setTriTagInput = _useState20[1];
478
465
  var _useState21 = useState([]),
479
466
  _useState22 = _slicedToArray(_useState21, 2),
480
467
  triTag = _useState22[0],
@@ -496,7 +483,7 @@ var CreateMeta = function CreateMeta(props) {
496
483
  case 2:
497
484
  setBizTag(res.data.map(function (res) {
498
485
  return {
499
- label: res.name,
486
+ label: res.labelName,
500
487
  value: res.id
501
488
  };
502
489
  }));
@@ -504,7 +491,7 @@ var CreateMeta = function CreateMeta(props) {
504
491
  case 3:
505
492
  setTriTag(res.data.map(function (res) {
506
493
  return {
507
- label: res.name,
494
+ label: res.labelName,
508
495
  value: res.id
509
496
  };
510
497
  }));
@@ -554,7 +541,7 @@ var CreateMeta = function CreateMeta(props) {
554
541
  initialValues: {
555
542
  eventName: '',
556
543
  aliasName: '',
557
- triggeringOccasion: '',
544
+ businessLabelId: undefined,
558
545
  maidianID: []
559
546
  }
560
547
  }, homeType == 'create' && (/*#__PURE__*/React.createElement(Form.Item, {
@@ -619,9 +606,10 @@ var CreateMeta = function CreateMeta(props) {
619
606
  },
620
607
  disabled: homeType == 'update' || homeType == 'get',
621
608
  placeholder: "\u8BF7\u8F93\u5165\u89E6\u53D1\u6807\u7B7E",
609
+ defaultValue: triTagId,
622
610
  options: triTag,
623
611
  onChange: function onChange(value) {
624
- setBizTagId(value);
612
+ setTriTagId(value);
625
613
  setIsChange(true);
626
614
  }
627
615
  }), "\u6216", /*#__PURE__*/React.createElement(Input, {
@@ -632,9 +620,11 @@ var CreateMeta = function CreateMeta(props) {
632
620
  marginLeft: '10px'
633
621
  },
634
622
  placeholder: "\u8BF7\u8F93\u5165\u89E6\u53D1\u65F6\u673A\uFF0C\u4F8B\u5982\uFF1A\u7528\u6237\u70B9\u51FB\u786E\u8BA4\u6309\u94AE",
623
+ defaultValue: triTagInput,
635
624
  showCount: true,
636
625
  maxLength: 128,
637
626
  onChange: function onChange(e) {
627
+ setTriTagInput(e.target.value);
638
628
  setIsChange(true);
639
629
  }
640
630
  })), /*#__PURE__*/React.createElement(Form.Item, {
@@ -532,7 +532,7 @@ var PageInfo = function PageInfo(props) {
532
532
  }, record.triggerLabel.labelName)));
533
533
  return /*#__PURE__*/React.createElement(Popover, {
534
534
  content: content,
535
- title: sliceName(eventName) || ''
535
+ title: sliceName(record) || ''
536
536
  }, /*#__PURE__*/React.createElement("a", {
537
537
  onClick: function onClick() {
538
538
  if (!isSelect) {
@@ -886,20 +886,16 @@ var PageInfo = function PageInfo(props) {
886
886
  //设置新添加的元事件
887
887
  var onEventSet = function onEventSet(data, type) {
888
888
  if (type == 'create') {
889
- setEventAttrList([{
890
- eventName: data.eventName,
891
- triggeringOccasion: data.triggeringOccasion,
892
- aliasName: data.aliasName,
889
+ setEventAttrList([_objectSpread(_objectSpread({}, data), {}, {
893
890
  describe: '',
894
891
  pointSelect: undefined,
895
892
  imgPath: '',
896
893
  index: eventAttrList.length,
897
894
  key: new Date() * 1,
898
- eventAttrList: data.eventAttrList,
899
895
  pageName: pageName,
900
896
  pageId: id,
901
897
  pageImgUrl: imgPath
902
- }].concat(_toConsumableArray(eventAttrList)));
898
+ })].concat(_toConsumableArray(eventAttrList)));
903
899
  setShowIndex(eventAttrList.length);
904
900
  setTimeout(function () {
905
901
  setShowIndex(void 0);
@@ -920,7 +916,7 @@ var PageInfo = function PageInfo(props) {
920
916
  //拼接名称
921
917
  var sliceName = function sliceName(record) {
922
918
  var _record$businessLabel, _record$triggerLabel;
923
- var point = record.labels && record.labels.filter(function (res) {
919
+ var point = props.pageData.labels && props.pageData.labels.filter(function (res) {
924
920
  return res.labelType == 1;
925
921
  }).map(function (res) {
926
922
  return res.labelName;
@@ -1191,6 +1187,7 @@ var PageInfo = function PageInfo(props) {
1191
1187
  isEdit: true,
1192
1188
  onSubmit: function onSubmit(event, type) {
1193
1189
  setCreateMetaShow(false);
1190
+ // console.log(event, '事件内容');
1194
1191
  onEventSet(event, type);
1195
1192
  },
1196
1193
  // selectTreeName={props.selectTreeName}
@@ -1,157 +1,165 @@
1
- .setting-point-map {
2
- display: flex;
3
- flex-direction: row;
4
- gap: 16px;
5
- width: 100%;
6
- height: 100%;
7
- padding: 16px;
8
- background-color: #fafafb;
9
- &-left {
10
- position: relative;
11
- min-width: 350px;
12
- max-width: 600px;
13
- &-drag {
14
- position: absolute;
15
- top: 0;
16
- right: 0;
17
- width: 6px;
18
- height: 100%;
19
- border-right: 2px solid transparent;
20
- cursor: ew-resize;
21
- }
22
- }
23
- &-right {
24
- flex: 1;
25
- overflow: hidden;
26
- }
27
- .setting-point-map-page-content-img-select {
28
- position: relative;
29
- }
30
- .ant-image {
31
- position: static;
32
- }
33
- .ant-image .ant-image-mask {
34
- color: #fff;
35
- font-size: 24px;
36
- background: rgba(2, 20, 41, 0.5) !important;
37
- }
38
- &-addListBtn {
39
- display: flex;
40
- align-items: center;
41
- justify-content: space-between;
42
- }
43
- }
44
-
45
- .setting-create-meta-drawer {
46
- .set:hover {
47
- color: #ff4d4f;
48
- }
49
- &-content {
50
- display: flex;
51
- flex: 1;
52
- flex-direction: column;
53
- gap: 24px;
54
- &-select {
55
- display: flex;
56
- align-items: center;
57
- justify-content: right;
58
- margin-right: -12px;
59
- margin-left: -16px;
60
- }
61
- .ant-table-thead > tr > th {
62
- color: var(--io-N-, #021429);
63
- font-weight: 400;
64
- font-size: 14px;
65
- font-family: 'PingFang SC';
66
- font-style: normal;
67
- line-height: normal;
68
- }
69
- }
70
- &-table {
71
- margin: 20px 0px;
72
- overflow: hidden;
73
- border-radius: 8px;
74
- }
75
-
76
- &-info {
77
- display: flex;
78
- flex-direction: row;
79
- gap: 12px;
80
- align-items: center;
81
- height: 32px;
82
- &-title {
83
- display: flex;
84
- flex-direction: row;
85
- gap: 4px;
86
- justify-content: flex-end;
87
- width: 68px;
88
- color: var(--io-N6-, #67727f);
89
- font-weight: 400;
90
- font-size: 14px;
91
- font-family: 'PingFang SC';
92
- font-style: normal;
93
- line-height: 32px;
94
- line-height: normal;
95
- text-align: right;
96
- }
97
- &-input {
98
- position: relative;
99
- flex: 1;
100
- .button:not(.disabled):not(.ant-btn-primary) {
101
- float: right;
102
- padding: 0 16px;
103
- color: #1454e5;
104
- border: 1px solid #1454e5;
105
- }
106
- &-num {
107
- position: absolute;
108
- top: 6px;
109
- right: 12px;
110
- color: var(--io-N4-, #9aa1a9);
111
- font-weight: 400;
112
- font-size: 14px;
113
- font-family: 'PingFang SC';
114
- font-style: normal;
115
- line-height: 20px;
116
- }
117
- }
118
- }
119
-
120
- &-footer {
121
- display: flex;
122
- gap: 16px;
123
- align-items: center;
124
- justify-content: flex-end;
125
- margin: 0 -24px -24px;
126
- padding: 18px 24px 18px 0px;
127
- background: #fff;
128
- border-top: 1px solid var(--io-N1-, #e6e7ea);
129
- }
130
- .ant-drawer-content-wrapper {
131
- overflow-x: hidden;
132
- }
133
- .ant-drawer-content,
134
- .ant-drawer-wrapper-body {
135
- overflow: hidden !important;
136
- }
137
- .ant-drawer-body {
138
- display: flex;
139
- flex-direction: column;
140
- }
141
- .ant-drawer-title {
142
- span {
143
- margin-left: 8px;
144
- color: #9aa1a9;
145
- font-size: 12px;
146
- }
147
- }
148
- .ant-drawer-close {
149
- display: none;
150
- }
151
- .ant-drawer-extra {
152
- .qingchu {
153
- font-size: 20px !important;
154
- cursor: pointer;
155
- }
156
- }
157
- }
1
+ .setting-point-map {
2
+ display: flex;
3
+ flex-direction: row;
4
+ gap: 16px;
5
+ width: 100%;
6
+ height: 100%;
7
+ padding: 16px;
8
+ background-color: #fafafb;
9
+ &-left {
10
+ position: relative;
11
+ min-width: 350px;
12
+ max-width: 600px;
13
+ &-drag {
14
+ position: absolute;
15
+ top: 0;
16
+ right: 0;
17
+ width: 6px;
18
+ height: 100%;
19
+ border-right: 2px solid transparent;
20
+ cursor: ew-resize;
21
+ }
22
+ }
23
+ &-right {
24
+ flex: 1;
25
+ overflow: hidden;
26
+ }
27
+ .setting-point-map-page-content-img-select {
28
+ position: relative;
29
+ }
30
+ .ant-image {
31
+ position: static;
32
+ }
33
+ .ant-image .ant-image-mask {
34
+ color: #fff;
35
+ font-size: 24px;
36
+ background: rgba(2, 20, 41, 0.5) !important;
37
+ }
38
+ &-addListBtn {
39
+ display: flex;
40
+ align-items: center;
41
+ justify-content: space-between;
42
+ }
43
+ }
44
+
45
+ .setting-create-meta-drawer {
46
+ .set:hover {
47
+ color: #ff4d4f;
48
+ }
49
+ &-content {
50
+ display: flex;
51
+ flex: 1;
52
+ flex-direction: column;
53
+ gap: 24px;
54
+ &-select {
55
+ display: flex;
56
+ align-items: center;
57
+ justify-content: right;
58
+ margin-right: -12px;
59
+ margin-left: -16px;
60
+ }
61
+ .ant-table-thead > tr > th {
62
+ color: var(--io-N-, #021429);
63
+ font-weight: 400;
64
+ font-size: 14px;
65
+ font-family: 'PingFang SC';
66
+ font-style: normal;
67
+ line-height: normal;
68
+ }
69
+ }
70
+ &-table {
71
+ margin: 20px 0px;
72
+ overflow: hidden;
73
+ border-radius: 8px;
74
+ }
75
+
76
+ &-info {
77
+ display: flex;
78
+ flex-direction: row;
79
+ gap: 12px;
80
+ align-items: center;
81
+ height: 32px;
82
+ &-title {
83
+ display: flex;
84
+ flex-direction: row;
85
+ gap: 4px;
86
+ justify-content: flex-end;
87
+ width: 68px;
88
+ color: var(--io-N6-, #67727f);
89
+ font-weight: 400;
90
+ font-size: 14px;
91
+ font-family: 'PingFang SC';
92
+ font-style: normal;
93
+ line-height: 32px;
94
+ line-height: normal;
95
+ text-align: right;
96
+ }
97
+ &-input {
98
+ position: relative;
99
+ flex: 1;
100
+ .button:not(.disabled):not(.ant-btn-primary) {
101
+ float: right;
102
+ padding: 0 16px;
103
+ color: #1454e5;
104
+ border: 1px solid #1454e5;
105
+ }
106
+ &-num {
107
+ position: absolute;
108
+ top: 6px;
109
+ right: 12px;
110
+ color: var(--io-N4-, #9aa1a9);
111
+ font-weight: 400;
112
+ font-size: 14px;
113
+ font-family: 'PingFang SC';
114
+ font-style: normal;
115
+ line-height: 20px;
116
+ }
117
+ }
118
+ }
119
+
120
+ &-footer {
121
+ display: flex;
122
+ gap: 16px;
123
+ align-items: center;
124
+ justify-content: flex-end;
125
+ margin: 0 -24px -24px;
126
+ padding: 18px 24px 18px 0px;
127
+ background: #fff;
128
+ border-top: 1px solid var(--io-N1-, #e6e7ea);
129
+ }
130
+ .ant-drawer-content-wrapper {
131
+ overflow-x: hidden;
132
+ }
133
+ .ant-drawer-content,
134
+ .ant-drawer-wrapper-body {
135
+ overflow: hidden !important;
136
+ }
137
+ .ant-drawer-body {
138
+ display: flex;
139
+ flex-direction: column;
140
+ }
141
+ .ant-drawer-title {
142
+ span {
143
+ margin-left: 8px;
144
+ color: #9aa1a9;
145
+ font-size: 12px;
146
+ }
147
+ }
148
+ .ant-drawer-close {
149
+ display: none;
150
+ }
151
+ .ant-drawer-extra {
152
+ .qingchu {
153
+ font-size: 20px !important;
154
+ cursor: pointer;
155
+ }
156
+ }
157
+ .ant-form-item-control-input-content {
158
+ display: flex;
159
+ align-items: center;
160
+ }
161
+ .ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector {
162
+ color: #021429;
163
+ background-color: #f2f3f4;
164
+ }
165
+ }
@@ -201,7 +201,7 @@ var pointMap = function pointMap(props) {
201
201
  }
202
202
  }).then(function (res) {
203
203
  if (res && res.code === '100000') {
204
- pageNum = (res === null || res === void 0 ? void 0 : res.data.length) + 1;
204
+ pageNum = ((res === null || res === void 0 ? void 0 : res.data.length) || 0) + 1;
205
205
  setTreeData(formatTreeData((res === null || res === void 0 ? void 0 : res.data) || []));
206
206
  setTreeArr(formatTreeArr((res === null || res === void 0 ? void 0 : res.data) || [], [], '') || []);
207
207
  if (!selectedKeys) {
@@ -457,7 +457,7 @@ var pointMap = function pointMap(props) {
457
457
  }
458
458
  }, /*#__PURE__*/React.createElement("span", {
459
459
  className: "".concat(classPrefix, "-tree-item-title-name")
460
- }, nodeData.name, " ", nodeData.pointsum ? "(".concat(nodeData.pointsum, ")") : ''), /*#__PURE__*/React.createElement(Popover, {
460
+ }, nodeData.name, " (", nodeData.pointSum || 0, ")"), /*#__PURE__*/React.createElement(Popover, {
461
461
  placement: "topLeft",
462
462
  title: "\u4F4D\u7F6E\u6807\u7B7E",
463
463
  content: pointContent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-settings",
3
- "version": "2.1.0-zhongyuan.6",
3
+ "version": "2.1.0-zhongyuan.8",
4
4
  "private": false,
5
5
  "module": "es/index.js",
6
6
  "typings": "es/index.d.ts",
@@ -67,7 +67,7 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "d683909a541176c20d6bc50e315559251fa362a3",
70
+ "gitHead": "1756aba61064e28b66ad537e900d35c18c2e3f57",
71
71
  "gitHooks": {
72
72
  "pre-commit": "lint-staged"
73
73
  }