@zgfe/modules-event 0.1.5-event.5 → 0.1.5-event.6

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.
@@ -212,6 +212,7 @@ var EventFilter = function EventFilter(props) {
212
212
  onlyAnd: true,
213
213
  enableEventProp: true,
214
214
  enableDelete: true,
215
+ enableUserProp: analysisSubjectType === 'event' ? false : true,
215
216
  eventIdList: [event.id],
216
217
  onChange: onChangeFilters,
217
218
  onConditionsCount: setCount
@@ -123,11 +123,12 @@ var EventContent = function EventContent(props) {
123
123
  };
124
124
  var fetchRequest = function fetchRequest(flag) {
125
125
  if (JSON.stringify(searchData) === JSON.stringify(finalSearchData)) {
126
+ console.log('数据没变,终止请求', searchData);
126
127
  return;
127
128
  }
128
129
  if (flag !== undefined) ajaxFlag = flag;
129
- if (!ajaxFlag) return;
130
130
  if (analysisSubjectType === 'event' && !searchData.analysisSubject) return;
131
+ if (!ajaxFlag) return;
131
132
  setLoading(true);
132
133
  setEventData(undefined);
133
134
  if (typeof cancel === 'function') {
@@ -57,6 +57,14 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
57
57
  _data.userGroup = [0];
58
58
  }
59
59
  }
60
+ if (allData.analysisSubject && allData.analysisSubject.subjectId) {
61
+ _data.analysisSubject = {
62
+ subjectId: allData.analysisSubject.subjectId,
63
+ subjectName: allData.analysisSubject.subjectName,
64
+ subjectAlias: allData.analysisSubject.subjectAlias,
65
+ unit: allData.analysisSubject.unit
66
+ };
67
+ }
60
68
  if (data.filterConditions) {
61
69
  if (finalSearchData && finalSearchData.id && data.filterConditions.id === finalSearchData.id && data.filterConditions.eventGroupId === finalSearchData.eventGroupId) {
62
70
  ajaxFlag = false;
@@ -64,14 +72,6 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
64
72
  ajaxFlag = true;
65
73
  }
66
74
  }
67
- if (data.analysisSubject && data.analysisSubject.subjectId) {
68
- _data.analysisSubject = {
69
- subjectId: data.analysisSubject.subjectId,
70
- subjectName: data.analysisSubject.subjectName,
71
- subjectAlias: data.analysisSubject.subjectAlias,
72
- unit: data.analysisSubject.unit
73
- };
74
- }
75
75
  props.onChange(_data, ajaxFlag);
76
76
  };
77
77
  var resetting = function resetting() {
@@ -105,10 +105,10 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
105
105
  eventGroupId: value === null || value === void 0 ? void 0 : value.eventGroupId
106
106
  },
107
107
  analysisSubject: {
108
- subjectId: 0,
109
- subjectName: '',
110
- subjectAlias: '',
111
- unit: ''
108
+ subjectId: '12',
109
+ subjectName: '12321',
110
+ subjectAlias: '123',
111
+ unit: '123'
112
112
  }
113
113
  },
114
114
  scrollToFirstError: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-event",
3
- "version": "0.1.5-event.5",
3
+ "version": "0.1.5-event.6",
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": "ac609e4c3e8d783016cac54006054c6f91521bf8",
52
+ "gitHead": "aebace3cbd33d0e4c705d6d57946120b3f4f05b6",
53
53
  "dependencies": {
54
54
  "react-copy-to-clipboard": "^5.1.0",
55
55
  "react-highlight": "^0.15.0"