@zgfe/modules-dm 1.0.34-heyh.15 → 1.0.34-heyh.17

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.
@@ -13,6 +13,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import { BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
14
14
  import { Input, Button, Select, Drawer, Form, message } from 'antd';
15
15
  import { Fragment } from 'react';
16
+ import moment from 'moment';
16
17
  var TextArea = Input.TextArea;
17
18
  import request from '../../../utils/ajax';
18
19
  import apis from '../../../constants/api';
@@ -136,7 +137,7 @@ var CreateVirtualDrawer = function CreateVirtualDrawer(props) {
136
137
  })
137
138
  }, /*#__PURE__*/React.createElement(Fragment, null, virtualDrawerType === 'see' && /*#__PURE__*/React.createElement("div", {
138
139
  className: "".concat(classPrefix, "-see-box")
139
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u540D\u79F0"), editVirtualEventData.eventName), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u522B\u540D"), editVirtualEventData.aliasName), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u5206\u7EC4"), editGroupOptions(editVirtualEventData.eventGroupId)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u5907\u6CE8"), editVirtualEventData.description), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u521B\u5EFA\u4EBA"), editVirtualEventData.createUser), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u521B\u5EFA\u65F6\u95F4"), editVirtualEventData.insertTime), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u66F4\u65B0\u65F6\u95F4"), editVirtualEventData.updateTime)), /*#__PURE__*/React.createElement(Form, {
140
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u540D\u79F0"), editVirtualEventData.eventName), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u522B\u540D"), editVirtualEventData.aliasName), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u5206\u7EC4"), editGroupOptions(editVirtualEventData.eventGroupId)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u5907\u6CE8"), editVirtualEventData.description), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u521B\u5EFA\u4EBA"), editVirtualEventData.createUser), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u521B\u5EFA\u65F6\u95F4"), moment(editVirtualEventData.insertTime).format('YYYY-MM-DD HH:mm:ss')), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u66F4\u65B0\u65F6\u95F4"), moment(editVirtualEventData.updateTime).format('YYYY-MM-DD HH:mm:ss'))), /*#__PURE__*/React.createElement(Form, {
140
141
  name: "basic",
141
142
  labelCol: {
142
143
  span: 2
@@ -222,7 +223,10 @@ var CreateVirtualDrawer = function CreateVirtualDrawer(props) {
222
223
  }))), virtualDrawerType !== 'see' && /*#__PURE__*/React.createElement("div", {
223
224
  className: "".concat(classPrefix, "-formSubmit")
224
225
  }, /*#__PURE__*/React.createElement(Button, {
225
- type: "default"
226
+ type: "default",
227
+ onClick: function onClick() {
228
+ return setCreateVirtualShow(false);
229
+ }
226
230
  }, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
227
231
  type: "primary",
228
232
  htmlType: "submit",
@@ -60,6 +60,10 @@ var EventFilter = function EventFilter(props) {
60
60
  message.error('最多可添加5条属性筛选');
61
61
  return;
62
62
  }
63
+ if (selectList.length <= 0) {
64
+ message.error('请选择事件');
65
+ return;
66
+ }
63
67
  setIsAdd(true);
64
68
  setTimeout(function () {
65
69
  conditionRef.current.add();
@@ -118,7 +122,7 @@ var EventFilter = function EventFilter(props) {
118
122
  placement: "top",
119
123
  title: '添加属性筛选'
120
124
  }, /*#__PURE__*/React.createElement(IconFont, {
121
- className: "".concat(count >= 5 ? 'disable' : ''),
125
+ className: "".concat(count < 5 && selectList.length > 0 ? '' : 'disable'),
122
126
  type: "shaixuan",
123
127
  onClick: function onClick() {
124
128
  return onAdd();
@@ -76,6 +76,8 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
76
76
  appId: getAppID(currentApp),
77
77
  ids: ids
78
78
  }
79
+ }).then(function () {
80
+ refresh();
79
81
  });
80
82
  }
81
83
  setIsDragDisabled(false);
@@ -221,7 +221,7 @@ var VirtualTablePlus = function VirtualTablePlus(props) {
221
221
  key: 'lastInsertTime',
222
222
  width: 187,
223
223
  render: function render(text) {
224
- return /*#__PURE__*/React.createElement("div", null, moment(text).format('YYYY-MM-DD HH:mm:ss'));
224
+ return /*#__PURE__*/React.createElement("div", null, text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : '');
225
225
  }
226
226
  }, {
227
227
  title: '描述',
@@ -408,6 +408,7 @@
408
408
  color: #021429;
409
409
  span {
410
410
  width: 84px;
411
+ min-width: 84px;
411
412
  color: #5f6085;
412
413
  text-align: right;
413
414
  }
@@ -218,10 +218,6 @@ var VirtualEventList = function VirtualEventList() {
218
218
  message.error('请输入分组名称');
219
219
  return;
220
220
  }
221
- if (eventNameInput.length > 20) {
222
- message.error('名称不可超过20字符');
223
- return;
224
- }
225
221
  request(apis.upsertEventGroup, {
226
222
  method: 'post',
227
223
  data: {
@@ -329,6 +325,7 @@ var VirtualEventList = function VirtualEventList() {
329
325
  }, /*#__PURE__*/React.createElement(Input, {
330
326
  placeholder: "\u8BF7\u8F93\u5165\u5206\u7EC4\u540D",
331
327
  value: eventNameInput,
328
+ maxLength: 20,
332
329
  onChange: function onChange(e) {
333
330
  return setEventNameInput(e.currentTarget.value);
334
331
  }
package/es/utils/index.js CHANGED
@@ -229,13 +229,13 @@ export var eventListHandle = function eventListHandle(data) {
229
229
  item.checked = false;
230
230
  item.open = false;
231
231
  if (item.eventList.length > 0) {
232
- if (!_open) {
233
- _open = true;
234
- item.open = true;
235
- }
236
232
  item.eventList = item.eventList.filter(function (_item) {
237
233
  return _item.is_delete === 0;
238
234
  });
235
+ if (item.eventList.length > 0 && !_open) {
236
+ _open = true;
237
+ item.open = true;
238
+ }
239
239
  }
240
240
  });
241
241
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-dm",
3
- "version": "1.0.34-heyh.15",
3
+ "version": "1.0.34-heyh.17",
4
4
  "license": "ISC",
5
5
  "module": "es/index.js",
6
6
  "typings": "es/index.d.ts",
@@ -52,7 +52,7 @@
52
52
  "umi-request": "^1.4.0",
53
53
  "yorkie": "^2.0.0"
54
54
  },
55
- "gitHead": "d39a1d41ee62eaa3659f148c7a93ef5c0fe544c5",
55
+ "gitHead": "502b39d611bc58bef31515cedd839f29622fd2fb",
56
56
  "gitHooks": {
57
57
  "pre-commit": "lint-staged"
58
58
  }