@zgfe/modules-event 0.1.7-heyh.2 → 0.1.7

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.
@@ -34,8 +34,7 @@ var EventTable = function EventTable(props) {
34
34
  _useContext$eventGrou = _useContext.eventGroupList,
35
35
  eventGroupList = _useContext$eventGrou === void 0 ? [] : _useContext$eventGrou,
36
36
  eventEnvList = _useContext.eventEnvList,
37
- userPropList = _useContext.userPropList,
38
- authority = _useContext.authority;
37
+ userPropList = _useContext.userPropList;
39
38
  var _useContext2 = useContext(EventContext),
40
39
  onUserDrill = _useContext2.onUserDrill,
41
40
  _useContext2$defaultS = _useContext2.defaultSearch,
@@ -180,9 +179,9 @@ var EventTable = function EventTable(props) {
180
179
  className: classPrefix
181
180
  }, /*#__PURE__*/React.createElement("div", {
182
181
  className: "".concat(classPrefix, "-table-header")
183
- }, /*#__PURE__*/React.createElement("span", null, "\u6307\u6807\u8BE6\u60C5"), /*#__PURE__*/React.createElement("div", null, authority[100051] && /*#__PURE__*/React.createElement("div", {
182
+ }, /*#__PURE__*/React.createElement("span", null, "\u6307\u6807\u8BE6\u60C5"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
184
183
  onClick: seeSql
185
- }, "\u67E5\u770BSQL"), authority[100050] && /*#__PURE__*/React.createElement("div", {
184
+ }, "\u67E5\u770BSQL"), /*#__PURE__*/React.createElement("div", {
186
185
  onClick: download
187
186
  }, /*#__PURE__*/React.createElement(IconFont, {
188
187
  type: "xiazai1"
@@ -19,6 +19,7 @@ var TopBar = function TopBar(props) {
19
19
  var _useContext = useContext(EventContext),
20
20
  panelId = _useContext.panelId,
21
21
  afterEditTarget = _useContext.afterEditTarget,
22
+ enableAddScene = _useContext.enableAddScene,
22
23
  loading = _useContext.loading,
23
24
  onLossWarning = _useContext.onLossWarning,
24
25
  showWarning = _useContext.showWarning,
@@ -33,8 +34,7 @@ var TopBar = function TopBar(props) {
33
34
  setShowScene = _useState4[1];
34
35
  var _useContext2 = useContext(BizGlobalDataContext),
35
36
  currentApp = _useContext2.currentApp,
36
- eventGroupList = _useContext2.eventGroupList,
37
- authority = _useContext2.authority;
37
+ eventGroupList = _useContext2.eventGroupList;
38
38
  var searchData = props.searchData,
39
39
  showList = props.showList,
40
40
  platformChange = props.platformChange,
@@ -89,7 +89,6 @@ var TopBar = function TopBar(props) {
89
89
  }, !panelId && /*#__PURE__*/React.createElement("div", {
90
90
  className: "".concat(classPrefix, "-panel")
91
91
  }, /*#__PURE__*/React.createElement(Button, {
92
- disabled: !authority[100049],
93
92
  onClick: function onClick() {
94
93
  setShowPanel(true);
95
94
  }
@@ -108,10 +107,9 @@ var TopBar = function TopBar(props) {
108
107
  onOk: function onOk(data) {
109
108
  return _onOk('panel', data);
110
109
  }
111
- })), !panelId && /*#__PURE__*/React.createElement("div", {
110
+ })), enableAddScene && /*#__PURE__*/React.createElement("div", {
112
111
  className: "".concat(classPrefix, "-scene")
113
112
  }, /*#__PURE__*/React.createElement(Button, {
114
- disabled: !authority[100048],
115
113
  onClick: function onClick() {
116
114
  setShowScene(true);
117
115
  }
@@ -25,8 +25,7 @@ var cancel;
25
25
  var classPrefix = 'event-content';
26
26
  var EventContent = function EventContent(props) {
27
27
  var _useContext = useContext(BizGlobalDataContext),
28
- currentApp = _useContext.currentApp,
29
- authority = _useContext.authority;
28
+ currentApp = _useContext.currentApp;
30
29
  var _useContext2 = useContext(EventContext),
31
30
  searchData = _useContext2.searchData,
32
31
  setSearchData = _useContext2.setSearchData,
@@ -78,10 +77,6 @@ var EventContent = function EventContent(props) {
78
77
  handleSearch && handleSearch(loading);
79
78
  }, [loading]);
80
79
  var fetchRequest = function fetchRequest(flag) {
81
- if (!authority[100047]) {
82
- message.error('无查询权限');
83
- return;
84
- }
85
80
  if (JSON.stringify(searchData) === JSON.stringify(finalSearchData)) {
86
81
  return;
87
82
  }
@@ -13,7 +13,7 @@ export var judgeFilterValue = function judgeFilterValue(data, count) {
13
13
  }
14
14
  data.conditions.map(function (item) {
15
15
  var _item$values;
16
- if (item.values && (((_item$values = item.values) === null || _item$values === void 0 ? void 0 : _item$values.length) <= 0 || item.values[0] === '')) flag = false;
16
+ if (item.values && (((_item$values = item.values) === null || _item$values === void 0 ? void 0 : _item$values.length) <= 0 || item.values[0] === '') && !((item === null || item === void 0 ? void 0 : item.operator) && /^is null$|^is not null$/.test(item === null || item === void 0 ? void 0 : item.operator))) flag = false;
17
17
  });
18
18
  }
19
19
  return flag;
@@ -43,7 +43,8 @@ var defaultValue = {
43
43
  }
44
44
  },
45
45
  chosen_data: [],
46
- source: 'EVENT'
46
+ source: 'EVENT',
47
+ enableAddScene: false
47
48
  };
48
49
  export default (function () {
49
50
  var _useState = useState(false),
@@ -149,6 +149,7 @@ var ModuleEvent = function ModuleEvent(props) {
149
149
  panelName: title,
150
150
  includeToday: props.includeToday,
151
151
  showWarning: props.showWarning,
152
+ enableAddScene: props.defaultValue && props.defaultValue.enableAddScene === false ? false : true,
152
153
  afterEditTarget: props.afterEditTarget,
153
154
  onUserDrill: props.onUserDrill,
154
155
  onLossWarning: props.onLossWarning,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-event",
3
- "version": "0.1.7-heyh.2",
3
+ "version": "0.1.7",
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": "a6d558ffb7c4485f2fcd84494558c08aa8280734",
52
+ "gitHead": "503e6bdfdefb7bf6e99cb74290273bf2b8e8dec0",
53
53
  "dependencies": {
54
54
  "react-copy-to-clipboard": "^5.1.0",
55
55
  "react-highlight": "^0.15.0"