@zgfe/modules-event 0.0.2-event.60 → 0.0.2-event.62

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.
@@ -70,7 +70,7 @@ var EventFilter = function EventFilter(props) {
70
70
  if (_data.dimension) {
71
71
  var _attr = _data.dimension;
72
72
  setBizAttributeSelectorValue(_objectSpread(_objectSpread({}, _data.dimension), {}, {
73
- key: _attr.propCategory === 'eventProp' ? "".concat(_attr.propCategory, "-").concat(_attr.value) : "".concat(_attr.propCategory, "-").concat(_attr.value)
73
+ key: "".concat(_attr.propCategory, "-").concat(_attr.value)
74
74
  }));
75
75
  }
76
76
  }
@@ -122,7 +122,7 @@ var EventFilter = function EventFilter(props) {
122
122
  category: attr.category,
123
123
  value: _value,
124
124
  id: attr.id,
125
- key: attr.propCategory === 'eventProp' ? "".concat(attr.propCategory, "-").concat(_value) : "".concat(attr.propCategory, "-").concat(_value)
125
+ key: "".concat(attr.propCategory, "-").concat(_value)
126
126
  });
127
127
  }
128
128
  };
@@ -66,28 +66,7 @@ var EventContent = function EventContent(props) {
66
66
  var collapseRef = useRef();
67
67
  var chartRef = useRef();
68
68
  useEffect(function () {
69
- if (searchData) {
70
- if (searchData.dimension) {
71
- var _getValue;
72
- var _attrName = (_getValue = getValue(searchData.dimension, eventGroupList, eventEnvList, userPropList)) === null || _getValue === void 0 ? void 0 : _getValue.name;
73
- if (_attrName) {
74
- setEnableSelectChart(judgeIsArea(_attrName));
75
- setIsCity(judgeIsCity(_attrName));
76
- }
77
- } else {
78
- setEnableSelectChart(false);
79
- if (searchData.chartType === 'map') {
80
- setSearchData(function (data) {
81
- onChangeUrlParam(_objectSpread(_objectSpread({}, data), {}, {
82
- chartType: 'line'
83
- }));
84
- return _objectSpread(_objectSpread({}, data), {}, {
85
- chartType: 'line'
86
- });
87
- });
88
- }
89
- }
90
- }
69
+ console.log('searchData改变了,准备请求数据', searchData);
91
70
  if (timer) clearTimeout(timer);
92
71
  var flag = true;
93
72
  timer = setTimeout(function () {
@@ -170,6 +149,19 @@ var EventContent = function EventContent(props) {
170
149
  analysisIndex: _searchData.analysisIndex,
171
150
  chartType: _searchData.chartType
172
151
  }, data);
152
+ if (_data.dimension) {
153
+ var _getValue;
154
+ var _attrName = (_getValue = getValue(_data.dimension, eventGroupList, eventEnvList, userPropList)) === null || _getValue === void 0 ? void 0 : _getValue.name;
155
+ if (_attrName) {
156
+ setEnableSelectChart(judgeIsArea(_attrName));
157
+ setIsCity(judgeIsCity(_attrName));
158
+ }
159
+ } else {
160
+ setEnableSelectChart(false);
161
+ if (_data.chartType === 'map') {
162
+ _data.chartType = 'line';
163
+ }
164
+ }
173
165
  onChangeUrlParam(_objectSpread({}, _data));
174
166
  return _objectSpread({}, _data);
175
167
  });
@@ -28,7 +28,7 @@ export var judgeIsArea = function judgeIsArea(name) {
28
28
  };
29
29
  export var getValue = function getValue(param, eventGroupList, eventEnvList, userPropList) {
30
30
  var res = undefined;
31
- var key = param.propCategory === 'eventProp' ? "".concat(param.propCategory, "-").concat(param.value) : "".concat(param.propCategory, "-").concat(param.value, "-").concat(param.id);
31
+ var key = "".concat(param.propCategory, "-").concat(param.value);
32
32
  if ((param === null || param === void 0 ? void 0 : param.propCategory) === 'envProp') {
33
33
  eventEnvList === null || eventEnvList === void 0 ? void 0 : eventEnvList.forEach(function (attr) {
34
34
  if (attr.key === key) res = attr;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-event",
3
- "version": "0.0.2-event.60",
3
+ "version": "0.0.2-event.62",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -49,7 +49,7 @@
49
49
  "react": "^16.12.0 || ^17.0.0",
50
50
  "yorkie": "^2.0.0"
51
51
  },
52
- "gitHead": "cd9662040f1240369707a4e89cc29edbc181f61c",
52
+ "gitHead": "f26750c49881e1434e039143751f6f93a2422b6b",
53
53
  "dependencies": {
54
54
  "react-copy-to-clipboard": "^5.1.0",
55
55
  "react-highlight": "^0.15.0"