@zgfe/modules-interval 1.0.0-interval.17 → 1.0.0-interval.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.
@@ -11,17 +11,21 @@
11
11
  }
12
12
 
13
13
  &-none-text {
14
- color: @text-color;
15
- font-size: 16px;
14
+ color: #354354;
15
+ font-size: 14px;
16
16
  }
17
17
 
18
18
  &-none {
19
- width: 348px;
20
- height: 132px;
21
- background: url('../../../style/image/noData.png') no-repeat;
19
+ width: 88px;
20
+ height: 88px;
21
+ background-image: url('../../../style/image/empty.png');
22
+ background-repeat: no-repeat;
23
+ background-size: cover;
22
24
  }
23
25
 
24
26
  &-none-container {
25
- text-align: center;
27
+ display: flex;
28
+ flex-direction: column;
29
+ align-items: center;
26
30
  }
27
31
  }
@@ -10,7 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
10
10
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
11
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- import { Switch, Tooltip } from 'antd';
13
+ import { Switch, Tooltip, message } from 'antd';
14
14
  import React, { useEffect, useRef, useState } from 'react';
15
15
  import { BizEventSelector, IconFont, BizAttrConditionGroup } from '@zgfe/business-lib';
16
16
  import "./styles/index.less";
@@ -82,11 +82,16 @@ var EventFilter = function EventFilter(props) {
82
82
 
83
83
  // 添加筛选
84
84
  var onAdd = function onAdd() {
85
+ if (!eventOverview) {
86
+ message.error('请先选择目标事件');
87
+ return;
88
+ }
85
89
  if (event.id === -1) {
86
90
  return;
87
91
  }
88
92
  // 最多可添加10条属性筛选
89
93
  if (count >= 10) {
94
+ message.error('最多可添加 10 条属性筛选');
90
95
  return;
91
96
  }
92
97
  setIsAdd(true);
@@ -97,12 +102,7 @@ var EventFilter = function EventFilter(props) {
97
102
 
98
103
  // 筛选条件改变
99
104
  var onChangeFilters = function onChangeFilters(data) {
100
- if (data && data.conditions && data.conditions.length > 0) {
101
- setFilter(data);
102
- } else {
103
- setFilter(undefined);
104
- setIsAdd(false);
105
- }
105
+ setFilter(data);
106
106
  };
107
107
  var onChangeEvent = function onChangeEvent(event) {
108
108
  if (event && event.event && event.event.id === null) {
@@ -151,25 +151,29 @@ var EventFilter = function EventFilter(props) {
151
151
  },
152
152
  onChange: onChangeEvent,
153
153
  placeholder: "\u8BF7\u9009\u62E9\u4E8B\u4EF6"
154
- }), eventOverview && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
154
+ }), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
155
155
  placement: "top",
156
- title: '添加属性筛选'
156
+ title: !eventOverview ? '请先选择目标事件' : count < 10 ? '添加属性筛选' : '最多可添加 10 条属性筛选'
157
157
  }, /*#__PURE__*/React.createElement(IconFont, {
158
- className: "".concat(count >= 10 || event.id === -1 ? 'disable' : ''),
158
+ className: "".concat(count >= 10 || event.id === -1 || !eventOverview ? 'disable' : ''),
159
159
  type: "shaixuan",
160
160
  onClick: function onClick() {
161
161
  return onAdd();
162
162
  }
163
- }))), props !== null && props !== void 0 && props.relevancy && eventOverview ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Switch, {
163
+ }))), props !== null && props !== void 0 && props.relevancy ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
164
+ placement: "top",
165
+ title: props.relevancyFl ? '请选择开始和结束事件' : ''
166
+ }, /*#__PURE__*/React.createElement(Switch, {
164
167
  size: "default",
165
168
  style: {
166
169
  marginLeft: 24
167
170
  },
168
171
  checked: relevancy,
172
+ disabled: props.relevancyFl,
169
173
  onChange: function onChange(checked) {
170
174
  return setRelevancy(checked);
171
175
  }
172
- }), /*#__PURE__*/React.createElement("span", {
176
+ })), /*#__PURE__*/React.createElement("span", {
173
177
  className: "switch-title"
174
178
  }, "\u8BBE\u7F6E\u5173\u8054\u5C5E\u6027")) : ''), (filter || isAdd) && /*#__PURE__*/React.createElement("div", {
175
179
  className: "".concat(count > 0 ? 'attr-box-show' : '', " top")
@@ -1,11 +1,8 @@
1
1
  .interval-box {
2
2
  > :nth-child(1) {
3
- display: flex;
4
3
  display: flex;
5
4
  gap: 16px;
6
5
  align-items: center;
7
- margin-bottom: 12px;
8
- margin-bottom: 12px;
9
6
 
10
7
  .biz-event-select,
11
8
  .biz-attr-select {
@@ -46,6 +46,7 @@ export interface ConditionsnProps {
46
46
  export interface EventFilterProps {
47
47
  id?: string;
48
48
  value?: eventProps;
49
+ relevancyFl?: boolean;
49
50
  relevancy?: boolean;
50
51
  onChange?: (event: eventProps) => {};
51
52
  }
@@ -49,7 +49,7 @@ var ContentPanel = function ContentPanel(props) {
49
49
  }) : /*#__PURE__*/React.createElement("div", {
50
50
  className: "".concat(classPrefix, "-MiNone")
51
51
  }, /*#__PURE__*/React.createElement(MiNone, {
52
- label: "\u6682\u65E0\u6570\u636E"
52
+ label: !eventData ? '请选择条件进行查询' : '暂无数据'
53
53
  }))));
54
54
  };
55
55
  export default ContentPanel;
@@ -115,6 +115,7 @@ var SearchPanel = function SearchPanel(props) {
115
115
  multiple: true,
116
116
  disable: displaySetupList.length === 0,
117
117
  onChange: onDimensionChange,
118
+ overlayClassName: "interval-select-overlay",
118
119
  className: "".concat(classPrefix, "-select"),
119
120
  placeholder: "\u8BF7\u9009\u62E9\u663E\u793A\u8BBE\u7F6E",
120
121
  enableSearch: true,
@@ -5,6 +5,10 @@
5
5
  height: 32px;
6
6
  margin-bottom: 24px;
7
7
 
8
+ .biz-date-picker-wrap-list {
9
+ font-size: 14px;
10
+ }
11
+
8
12
  &-search-right {
9
13
  display: flex;
10
14
  }
@@ -21,38 +25,40 @@
21
25
  }
22
26
  }
23
27
 
24
- .biz-select-option.biz-select-option-multiple:hover:not(.disabled) {
25
- color: var(--1, #021429);
26
- background: var(--io-i-1, #e8efff);
27
- }
28
+ .interval-select-overlay {
29
+ .biz-select-option.biz-select-option-multiple:hover:not(.disabled) {
30
+ color: var(--1, #021429);
31
+ background: var(--io-i-1, #e8efff);
32
+ }
28
33
 
29
- .biz-select-overlay {
30
- padding: 0;
31
- }
34
+ .biz-select-overlay {
35
+ padding: 0;
36
+ }
32
37
 
33
- .biz-select-list-panel {
34
- display: grid;
35
- gap: 8px;
36
- }
38
+ .biz-select-list-panel {
39
+ display: grid;
40
+ gap: 8px;
41
+ }
37
42
 
38
- .biz-select-option {
39
- padding: 0 16px;
40
- border-radius: 0;
41
- }
43
+ .biz-select-option {
44
+ padding: 0 16px;
45
+ border-radius: 0;
46
+ }
42
47
 
43
- .biz-select-option.biz-select-option-multiple.active:not(.disabled) {
44
- color: var(--1, #021429);
45
- }
48
+ .biz-select-option.biz-select-option-multiple.active:not(.disabled) {
49
+ color: var(--1, #021429);
50
+ }
46
51
 
47
- .biz-select-option.biz-select-option-multiple:hover:not(.disabled) .biz-select-checkbox {
48
- color: #ccd0d4;
49
- }
52
+ .biz-select-option.biz-select-option-multiple:hover:not(.disabled) .biz-select-checkbox {
53
+ color: #ccd0d4;
54
+ }
50
55
 
51
- .biz-select-option.biz-select-option-multiple.active:hover:not(.disabled) .biz-select-checkbox {
52
- color: #165dff;
53
- }
56
+ .biz-select-option.biz-select-option-multiple.active:hover:not(.disabled) .biz-select-checkbox {
57
+ color: #165dff;
58
+ }
54
59
 
55
- .biz-select-option.biz-select-option-multiple:active:not(.disabled) {
56
- color: #165dff;
57
- background: var(--io-i-1, #e8efff);
60
+ .biz-select-option.biz-select-option-multiple:active:not(.disabled) {
61
+ color: #165dff;
62
+ background: var(--io-i-1, #e8efff);
63
+ }
58
64
  }
@@ -21,6 +21,7 @@
21
21
  > div {
22
22
  position: relative;
23
23
  padding: 0 16px;
24
+ font-size: 14px;
24
25
  background: #fff;
25
26
  border: 1px solid #ecedf0;
26
27
  cursor: pointer;
@@ -88,7 +88,7 @@ var IntervalEventChart = function IntervalEventChart(props) {
88
88
  }
89
89
  if (!dataSource || !(dataSource !== null && dataSource !== void 0 && (_dataSource$appData2 = dataSource.appData) !== null && _dataSource$appData2 !== void 0 && _dataSource$appData2.series.length)) {
90
90
  return /*#__PURE__*/React.createElement(MiNone, {
91
- label: "\u6682\u65E0\u6570\u636E"
91
+ label: !dataSource ? '请选择条件进行查询' : '暂无数据'
92
92
  });
93
93
  }
94
94
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IntervalChart, {
@@ -195,6 +195,7 @@ var EventContent = function EventContent(props) {
195
195
  }), /*#__PURE__*/React.createElement(BizLayout, {
196
196
  showTitle: false,
197
197
  hasCollapse: true,
198
+ className: "interval-layout",
198
199
  collapseRef: collapseRef,
199
200
  topPanel: /*#__PURE__*/React.createElement(TopPanel, {
200
201
  collapseRef: collapseRef,
@@ -26,11 +26,7 @@ export declare function searchCondition(params: any): {
26
26
  condition: any;
27
27
  };
28
28
  export declare function searchDataParams(params: any): {
29
- time: {
30
- dimensionDate: any;
31
- beginDate: any;
32
- endDate: any;
33
- };
29
+ time: any;
34
30
  platform: any;
35
31
  userGroup: any;
36
32
  start: {
@@ -1,3 +1,9 @@
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ 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; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ 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); }
1
7
  /**
2
8
  * 判断当前细分属性是否为”城市“
3
9
  * @param name 属性名称
@@ -74,13 +80,9 @@ export function searchCondition(params) {
74
80
  };
75
81
  }
76
82
  export function searchDataParams(params) {
77
- var _params$time, _params$time2, _params$time3, _params$dimension, _params$dimension2, _params$dimension3, _params$dimension4, _params$dimension5, _params$dimension6, _params$dimension7, _params$dimension8, _params$dimension9, _params$dimension10, _params$dimension11, _params$dimension12, _params$associatedPre, _params$associatedNex;
83
+ var _params$dimension, _params$dimension2, _params$dimension3, _params$dimension4, _params$dimension5, _params$dimension6, _params$dimension7, _params$dimension8, _params$dimension9, _params$dimension10, _params$dimension11, _params$dimension12, _params$associatedPre, _params$associatedNex;
78
84
  return {
79
- time: {
80
- dimensionDate: params === null || params === void 0 ? void 0 : (_params$time = params.time) === null || _params$time === void 0 ? void 0 : _params$time.unit,
81
- beginDate: params === null || params === void 0 ? void 0 : (_params$time2 = params.time) === null || _params$time2 === void 0 ? void 0 : _params$time2.begin,
82
- endDate: params === null || params === void 0 ? void 0 : (_params$time3 = params.time) === null || _params$time3 === void 0 ? void 0 : _params$time3.end
83
- },
85
+ time: _objectSpread({}, params === null || params === void 0 ? void 0 : params.time),
84
86
  platform: (params === null || params === void 0 ? void 0 : params.platform) || 0,
85
87
  userGroup: params.userGroup,
86
88
  start: searchCondition(params === null || params === void 0 ? void 0 : params.start),
@@ -8,7 +8,11 @@
8
8
  min-width: 1000px;
9
9
  height: 100%;
10
10
  background: #fafafb;
11
-
11
+ .interval-layout {
12
+ .biz-layout-collapse-handle {
13
+ height: 24px;
14
+ }
15
+ }
12
16
  &-header-title {
13
17
  height: 48px;
14
18
  padding: 0px 24px;
@@ -40,7 +40,7 @@ var TopPanel = function TopPanel(props) {
40
40
  _useState6 = _slicedToArray(_useState5, 2),
41
41
  relevancy = _useState6[0],
42
42
  setRelevancy = _useState6[1];
43
- var _useState7 = useState(false),
43
+ var _useState7 = useState(true),
44
44
  _useState8 = _slicedToArray(_useState7, 2),
45
45
  relevancyFl = _useState8[0],
46
46
  setRelevancyFl = _useState8[1];
@@ -69,7 +69,7 @@ var TopPanel = function TopPanel(props) {
69
69
  }
70
70
  }
71
71
  if (startId && endId) {
72
- setRelevancyFl(true);
72
+ setRelevancyFl(false);
73
73
  }
74
74
  if (allData.userGroup) {
75
75
  _data.userGroup = allData.userGroup;
@@ -140,7 +140,7 @@ var TopPanel = function TopPanel(props) {
140
140
  form: form,
141
141
  component: "div",
142
142
  colon: false,
143
- className: "panel-form",
143
+ className: "panel-form-interval",
144
144
  layout: "vertical",
145
145
  initialValues: {
146
146
  userGroup: userGroup ? userGroup : [0],
@@ -170,7 +170,7 @@ var TopPanel = function TopPanel(props) {
170
170
  }, /*#__PURE__*/React.createElement(Form.Item, {
171
171
  label: "",
172
172
  name: "userGroup",
173
- className: "space-item",
173
+ className: "space-item interval-item",
174
174
  style: {
175
175
  paddingLeft: 0
176
176
  }
@@ -179,15 +179,13 @@ var TopPanel = function TopPanel(props) {
179
179
  max: 1
180
180
  })), /*#__PURE__*/React.createElement("div", {
181
181
  ref: collapseRef,
182
- style: {
183
- paddingLeft: 24
184
- },
185
182
  className: "collapseRefs"
186
183
  }, /*#__PURE__*/React.createElement(Form.Item, {
187
184
  label: "\u5F00\u59CB\u4E8B\u4EF6",
188
185
  name: "start"
189
186
  }, /*#__PURE__*/React.createElement(EventFilter, {
190
- relevancy: relevancyFl
187
+ relevancyFl: relevancyFl,
188
+ relevancy: true
191
189
  })), relevancy ? /*#__PURE__*/React.createElement(Form.Item, {
192
190
  style: {
193
191
  marginBottom: 0
@@ -248,7 +246,6 @@ var TopPanel = function TopPanel(props) {
248
246
  onChangeAttr(undefined, 'associatedPreAttr');
249
247
  onChangeAttr(undefined, 'associatedNextAttr');
250
248
  setRelevancy(false);
251
- setRelevancyFl(false);
252
249
  },
253
250
  className: "bsicon qingchu"
254
251
  })) : '', /*#__PURE__*/React.createElement(Form.Item, {
@@ -256,7 +253,8 @@ var TopPanel = function TopPanel(props) {
256
253
  name: "end"
257
254
  }, /*#__PURE__*/React.createElement(EventFilter, null)), /*#__PURE__*/React.createElement(Form.Item, {
258
255
  label: "\u6309\u5C5E\u6027\u7EC6\u5206",
259
- name: "dimension"
256
+ name: "dimension",
257
+ className: "dimension-interval"
260
258
  }, /*#__PURE__*/React.createElement(BizAttributeSelector, {
261
259
  enableEventProp: true,
262
260
  enableUserProp: true,
@@ -17,7 +17,35 @@
17
17
  }
18
18
  }
19
19
 
20
- .panel-form {
20
+ .panel-form-interval {
21
+ .interval-item {
22
+ .ant-space-vertical {
23
+ gap: 0px !important;
24
+ width: 100%;
25
+
26
+ .ant-space-item:nth-child(1) {
27
+ padding: 0 12px;
28
+ }
29
+
30
+ .ant-space-item:nth-child(2) {
31
+ display: flex;
32
+ align-items: center;
33
+ height: 42px;
34
+ margin-top: 4px;
35
+ padding: 0 12px;
36
+ }
37
+
38
+ .ant-space-item:nth-child(2):hover {
39
+ background-color: #e8efff;
40
+ }
41
+ }
42
+ }
43
+
44
+ .biz-user-group-header {
45
+ padding: 0;
46
+ background-color: #fff;
47
+ }
48
+
21
49
  .space-item {
22
50
  .ant-space-item {
23
51
  .biz-user-group {
@@ -32,9 +60,65 @@
32
60
  }
33
61
 
34
62
  .collapseRefs {
63
+ .biz-attr-condition-group-container {
64
+ margin-top: 12px;
65
+ }
66
+
35
67
  .ant-form-item {
36
68
  margin-bottom: 12px;
37
69
  }
70
+
71
+ .ant-form-item-control-input {
72
+ display: flex;
73
+ align-items: center;
74
+ }
75
+
76
+ .ant-form-item-label {
77
+ padding-left: 24px;
78
+ }
79
+
80
+ .interval-box {
81
+ > div:nth-child(1) {
82
+ padding: 4px 24px;
83
+ }
84
+
85
+ > div:nth-child(1):hover {
86
+ background-color: #e8efff;
87
+ }
88
+
89
+ .biz-attr-condition-group-handle {
90
+ margin-right: 0;
91
+ margin-left: 24px;
92
+ }
93
+
94
+ .biz-attr-condition-group-container {
95
+ gap: 4px !important;
96
+ }
97
+ .ant-space-item {
98
+ max-width: calc(100% + 24px) !important;
99
+ margin-left: -24px;
100
+ padding: 4px 48px;
101
+
102
+ .ant-space-item {
103
+ width: auto;
104
+ max-width: auto;
105
+ margin-left: 0px;
106
+ padding: 0;
107
+ }
108
+ }
109
+
110
+ .ant-space-item:hover {
111
+ background-color: #e8efff;
112
+ }
113
+ }
114
+ .dimension-interval {
115
+ .ant-form-item-control-input {
116
+ padding: 4px 24px;
117
+ }
118
+ .ant-form-item-control-input:hover {
119
+ background-color: #e8efff;
120
+ }
121
+ }
38
122
  }
39
123
 
40
124
  .biz-event-select {
@@ -43,7 +127,6 @@
43
127
 
44
128
  > .ant-form-item {
45
129
  margin-bottom: 12px;
46
- padding-left: 24px;
47
130
  }
48
131
 
49
132
  .associated {
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-interval",
3
- "version": "1.0.0-interval.17",
3
+ "version": "1.0.0-interval.18",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",