@zgfe/modules-settings 2.1.0-zhongyuan.1 → 2.1.0-zhongyuan.11

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.
Files changed (37) hide show
  1. package/es/components/importMetaDialog/index.d.ts +13 -0
  2. package/es/components/importMetaDialog/index.js +217 -0
  3. package/es/components/importMetaDialog/styles/index.less +115 -0
  4. package/es/constants/api.d.ts +19 -0
  5. package/es/constants/api.js +23 -0
  6. package/es/modules/companySetting/application/index.js +5 -6
  7. package/es/modules/createDemand/demo/selectPoint.js +0 -1
  8. package/es/modules/createDemand_bf/demo/index.js +0 -1
  9. package/es/modules/createDemand_bf/index.js +0 -1
  10. package/es/modules/dealDemand/demo/index.js +0 -1
  11. package/es/modules/dealDemand/index.js +0 -2
  12. package/es/modules/demandManage/index.js +2 -2
  13. package/es/modules/pointMap/createMetaDrawer.js +102 -34
  14. package/es/modules/pointMap/pageInfo.js +43 -15
  15. package/es/modules/pointMap/styles/index.less +13 -0
  16. package/es/modules/pointMap/styles/pageInfo.less +439 -426
  17. package/es/modules/pointMap/styles/tree.less +174 -149
  18. package/es/modules/pointMap/tree.js +212 -84
  19. package/es/modules/systemSetting/Dictionary.d.ts +5 -2
  20. package/es/modules/systemSetting/Dictionary.js +54 -370
  21. package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/create.d.ts +9 -0
  22. package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/create.js +244 -0
  23. package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/css/index.less +48 -0
  24. package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/index.d.ts +4 -0
  25. package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/index.js +207 -0
  26. package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/type/index.d.ts +10 -0
  27. package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/type/index.js +1 -0
  28. package/es/modules/systemSetting/dictionaryItem/eventTagManagement/create.d.ts +10 -0
  29. package/es/modules/systemSetting/dictionaryItem/eventTagManagement/create.js +124 -0
  30. package/es/modules/systemSetting/dictionaryItem/eventTagManagement/css/index.less +32 -0
  31. package/es/modules/systemSetting/dictionaryItem/eventTagManagement/index.d.ts +7 -0
  32. package/es/modules/systemSetting/dictionaryItem/eventTagManagement/index.js +263 -0
  33. package/es/modules/systemSetting/dictionaryItem/eventTagManagement/type/index.d.ts +9 -0
  34. package/es/modules/systemSetting/dictionaryItem/eventTagManagement/type/index.js +1 -0
  35. package/es/modules/systemSetting/document-setting/index.js +2 -2
  36. package/es/modules/systemSetting/index.js +3 -1
  37. package/package.json +2 -2
@@ -23,6 +23,8 @@ import React, { useContext, useEffect, useState } from 'react';
23
23
  import _ from 'lodash';
24
24
  import BizEditText from './editTxt';
25
25
  import './styles/index.less';
26
+ import request from '../../utils/ajax';
27
+ import apis from '../../constants/api';
26
28
  var CreateMeta = function CreateMeta(props) {
27
29
  var classPrefix = 'setting-create-meta-drawer';
28
30
  var _useContext = useContext(BizGlobalDataContext),
@@ -74,8 +76,10 @@ var CreateMeta = function CreateMeta(props) {
74
76
  form.setFieldsValue({
75
77
  aliasName: data.aliasName,
76
78
  eventName: data.eventName,
77
- triggeringOccasion: data.triggeringOccasion
79
+ businessLabelId: data.businessLabelId
78
80
  });
81
+ setTriTagInput(data.triggeringOccasion);
82
+ setTriTagId(data.triggerLabelId);
79
83
  setInputText(data.eventName);
80
84
  if (data.eventAttrList) {
81
85
  setEventAttrList(_toConsumableArray(data.eventAttrList));
@@ -111,10 +115,9 @@ var CreateMeta = function CreateMeta(props) {
111
115
  });
112
116
  return _context.abrupt("return");
113
117
  case 11:
114
- //吧参数传递给主页面
118
+ //把参数传递给主页面
115
119
  if (props.onSubmit) {
116
120
  if (props.data) {
117
- console.log(eventAttrList, 'EventAttrList');
118
121
  props.onSubmit(_objectSpread(_objectSpread({}, props.data), {}, {
119
122
  eventAttrList: eventAttrList
120
123
  }), 'update');
@@ -122,33 +125,19 @@ var CreateMeta = function CreateMeta(props) {
122
125
  props.onSubmit({
123
126
  eventName: values.eventName,
124
127
  aliasName: values.aliasName,
125
- triggeringOccasion: values.triggeringOccasion,
126
- del: 1,
127
- eventAttrList: eventAttrList
128
+ triggeringOccasion: triTagInput,
129
+ eventAttrList: eventAttrList,
130
+ businessLabelId: values.businessLabelId,
131
+ triggerLabelId: triTagId,
132
+ businessLabel: bizTag.filter(function (res) {
133
+ return res.id == values.businessLabelId;
134
+ })[0],
135
+ triggerLabel: triTag.filter(function (res) {
136
+ return res.id == values.businessLabelId;
137
+ })[0]
128
138
  }, 'create');
129
139
  }
130
140
  }
131
- // request<any>(apis.createEvent, {
132
- // method: 'POST',
133
- // data: {
134
- // app_id: currentApp?.appId,
135
- // eventName: values.eventName,
136
- // aliasName: values.aliasName,
137
- // triggeringOccasion: values.triggeringOccasion,
138
- // eventAttrList,
139
- // },
140
- // }).then((res) => {
141
- // if (res?.code === '100000') {
142
- // notification.success({
143
- // message: '保存成功',
144
- // });
145
- // props.onSubmit && props.onSubmit();
146
- // } else {
147
- // notification.error({
148
- // message: '保存失败',
149
- // });
150
- // }
151
- // });
152
141
  _context.next = 17;
153
142
  break;
154
143
  case 14:
@@ -434,6 +423,8 @@ var CreateMeta = function CreateMeta(props) {
434
423
  useEffect(function () {
435
424
  var _Y = getTableScroll(545, 'dataManageCreateMetaTable');
436
425
  setScrollY(_Y);
426
+ getTagList(2);
427
+ getTagList(3);
437
428
  }, []);
438
429
  var onClose = function onClose() {
439
430
  if (isChange) {
@@ -462,11 +453,58 @@ var CreateMeta = function CreateMeta(props) {
462
453
  })));
463
454
  }
464
455
  };
465
- // 自定义验证规则
466
- var _useState17 = useState(''),
456
+ //标签列表数据 2:业务标签 3:触发标签
457
+ var _useState17 = useState([]),
467
458
  _useState18 = _slicedToArray(_useState17, 2),
468
- inputText = _useState18[0],
469
- setInputText = _useState18[1];
459
+ bizTag = _useState18[0],
460
+ setBizTag = _useState18[1];
461
+ var _useState19 = useState(),
462
+ _useState20 = _slicedToArray(_useState19, 2),
463
+ triTagInput = _useState20[0],
464
+ setTriTagInput = _useState20[1];
465
+ var _useState21 = useState([]),
466
+ _useState22 = _slicedToArray(_useState21, 2),
467
+ triTag = _useState22[0],
468
+ setTriTag = _useState22[1];
469
+ var _useState23 = useState(),
470
+ _useState24 = _slicedToArray(_useState23, 2),
471
+ triTagId = _useState24[0],
472
+ setTriTagId = _useState24[1];
473
+ var getTagList = function getTagList(type) {
474
+ request(apis.dict.getTagList, {
475
+ method: 'post',
476
+ data: {
477
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
478
+ labelType: type
479
+ }
480
+ }).then(function (res) {
481
+ if (res && res.code == '100000') {
482
+ switch (type) {
483
+ case 2:
484
+ setBizTag(res.data.map(function (res) {
485
+ return {
486
+ label: res.labelName,
487
+ value: res.id
488
+ };
489
+ }));
490
+ break;
491
+ case 3:
492
+ setTriTag(res.data.map(function (res) {
493
+ return {
494
+ label: res.labelName,
495
+ value: res.id
496
+ };
497
+ }));
498
+ break;
499
+ }
500
+ }
501
+ });
502
+ };
503
+ // 自定义验证规则
504
+ var _useState25 = useState(''),
505
+ _useState26 = _slicedToArray(_useState25, 2),
506
+ inputText = _useState26[0],
507
+ setInputText = _useState26[1];
470
508
  // true 验证通过
471
509
  var validateContainsUnderscore = function validateContainsUnderscore(value) {
472
510
  if (!isChange) {
@@ -503,7 +541,7 @@ var CreateMeta = function CreateMeta(props) {
503
541
  initialValues: {
504
542
  eventName: '',
505
543
  aliasName: '',
506
- triggeringOccasion: '',
544
+ businessLabelId: undefined,
507
545
  maidianID: []
508
546
  }
509
547
  }, homeType == 'create' && (/*#__PURE__*/React.createElement(Form.Item, {
@@ -559,15 +597,45 @@ var CreateMeta = function CreateMeta(props) {
559
597
  })), /*#__PURE__*/React.createElement(Form.Item, {
560
598
  name: "triggeringOccasion",
561
599
  label: "\u89E6\u53D1\u65F6\u673A"
562
- }, /*#__PURE__*/React.createElement(Input, {
600
+ }, /*#__PURE__*/React.createElement(Select, {
601
+ allowClear: true,
602
+ style: {
603
+ border: 0,
604
+ width: '160px',
605
+ marginRight: '10px'
606
+ },
607
+ disabled: homeType == 'update' || homeType == 'get',
608
+ placeholder: "\u8BF7\u8F93\u5165\u89E6\u53D1\u6807\u7B7E",
609
+ defaultValue: triTagId,
610
+ options: triTag,
611
+ onChange: function onChange(value) {
612
+ setTriTagId(value);
613
+ setIsChange(true);
614
+ }
615
+ }), "\u6216", /*#__PURE__*/React.createElement(Input, {
563
616
  disabled: homeType == 'update' || homeType == 'get',
564
617
  style: {
565
- border: 0
618
+ border: 0,
619
+ width: 'calc(100% - 195px)',
620
+ marginLeft: '10px'
566
621
  },
567
622
  placeholder: "\u8BF7\u8F93\u5165\u89E6\u53D1\u65F6\u673A\uFF0C\u4F8B\u5982\uFF1A\u7528\u6237\u70B9\u51FB\u786E\u8BA4\u6309\u94AE",
623
+ defaultValue: triTagInput,
568
624
  showCount: true,
569
625
  maxLength: 128,
570
626
  onChange: function onChange(e) {
627
+ setTriTagInput(e.target.value);
628
+ setIsChange(true);
629
+ }
630
+ })), /*#__PURE__*/React.createElement(Form.Item, {
631
+ name: "businessLabelId",
632
+ label: "\u4E1A\u52A1\u6807\u7B7E"
633
+ }, /*#__PURE__*/React.createElement(Select, {
634
+ allowClear: true,
635
+ disabled: homeType == 'update' || homeType == 'get',
636
+ placeholder: "\u8BF7\u8F93\u5165\u4E1A\u52A1\u6807\u7B7E",
637
+ options: bizTag,
638
+ onChange: function onChange() {
571
639
  setIsChange(true);
572
640
  }
573
641
  }))), homeType != 'get' && (/*#__PURE__*/React.createElement("div", {
@@ -18,7 +18,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
18
18
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
19
19
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
20
20
  import { BizDialog, BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
21
- import { Input, message, Button, Table, notification, Upload, Image, Checkbox, Empty, Tooltip, Popover, Modal, Drawer, Spin } from 'antd';
21
+ import { Input, message, Button, Table, notification, Upload, Image, Checkbox, Empty, Tooltip, Popover, Modal, Drawer, Spin, Tag } from 'antd';
22
22
  import React, { useContext, useEffect, useState } from 'react';
23
23
  import _ from 'lodash';
24
24
  import './styles/pageInfo.less';
@@ -168,7 +168,6 @@ var PageInfo = function PageInfo(props) {
168
168
  recordShow = _useState52[0],
169
169
  setRecordShow = _useState52[1];
170
170
  useEffect(function () {
171
- // console.log('props.pageData', props.pageData);
172
171
  if (!props.pageData) {
173
172
  setIsEmpty(true);
174
173
  } else {
@@ -176,7 +175,6 @@ var PageInfo = function PageInfo(props) {
176
175
  }
177
176
  }, [props.pageData, props.refreshKey]);
178
177
  useEffect(function () {
179
- // console.log('props.pageData', props.pageData);
180
178
  props.onChangePageStatus && props.onChangePageStatus(isEdit);
181
179
  }, [isEdit]);
182
180
  var getPageConfig = function getPageConfig() {
@@ -217,7 +215,10 @@ var PageInfo = function PageInfo(props) {
217
215
  index: index,
218
216
  approvalStatus: item.approvalStatus,
219
217
  operationType: item.operationType,
220
- isOnline: item.isOnline || 0
218
+ isOnline: item.isOnline || 0,
219
+ businessLabel: item.businessLabel,
220
+ triggerLabel: item.triggerLabel,
221
+ labels: item.labels
221
222
  };
222
223
  }) : []);
223
224
  //计算出当前上线和下线总合数量
@@ -470,7 +471,7 @@ var PageInfo = function PageInfo(props) {
470
471
  }, [eventAttrList]);
471
472
  }
472
473
  // 表格列表筛选项
473
- var columns = [].concat(_toConsumableArray(!isEdit && !isSelect ? [{
474
+ var columns = [].concat(_toConsumableArray(isSelect ? [{
474
475
  title: (/*#__PURE__*/React.createElement(Checkbox, {
475
476
  checked: checkedAllHandle(),
476
477
  onChange: function onChange(e) {
@@ -512,9 +513,24 @@ var PageInfo = function PageInfo(props) {
512
513
  ellipsis: true,
513
514
  width: 198,
514
515
  render: function render(eventName, record, index) {
515
- return /*#__PURE__*/React.createElement(Tooltip, {
516
- title: eventName || '',
517
- placement: "topLeft"
516
+ var content = /*#__PURE__*/React.createElement("div", {
517
+ className: "".concat(classPrefix, "-content-popoverTag")
518
+ }, /*#__PURE__*/React.createElement("div", {
519
+ className: "".concat(classPrefix, "-content-popoverTag-item")
520
+ }, /*#__PURE__*/React.createElement("span", {
521
+ className: "".concat(classPrefix, "-content-popoverTag-label")
522
+ }, "\u4E1A\u52A1\u6807\u7B7E:"), record.businessLabel && /*#__PURE__*/React.createElement(Tag, {
523
+ color: "blue"
524
+ }, record.businessLabel.labelName)), /*#__PURE__*/React.createElement("div", {
525
+ className: "".concat(classPrefix, "-content-popoverTag-item")
526
+ }, /*#__PURE__*/React.createElement("span", {
527
+ className: "".concat(classPrefix, "-content-popoverTag-label")
528
+ }, "\u89E6\u53D1\u6807\u7B7E:"), record.triggerLabel && /*#__PURE__*/React.createElement(Tag, {
529
+ color: "orange"
530
+ }, record.triggerLabel.labelName)));
531
+ return /*#__PURE__*/React.createElement(Popover, {
532
+ content: content,
533
+ title: sliceName(record) || ''
518
534
  }, /*#__PURE__*/React.createElement("a", {
519
535
  onClick: function onClick() {
520
536
  if (!isSelect) {
@@ -537,7 +553,7 @@ var PageInfo = function PageInfo(props) {
537
553
  setMetaDataIndex(index);
538
554
  }
539
555
  }
540
- }, eventName ? eventName : '选择元事件', !eventName && /*#__PURE__*/React.createElement(IconFont, {
556
+ }, eventName ? sliceName(record) : '选择元事件', !eventName && /*#__PURE__*/React.createElement(IconFont, {
541
557
  type: "zhuanfa",
542
558
  style: {
543
559
  marginLeft: 8
@@ -868,20 +884,16 @@ var PageInfo = function PageInfo(props) {
868
884
  //设置新添加的元事件
869
885
  var onEventSet = function onEventSet(data, type) {
870
886
  if (type == 'create') {
871
- setEventAttrList([{
872
- eventName: data.eventName,
873
- triggeringOccasion: data.triggeringOccasion,
874
- aliasName: data.aliasName,
887
+ setEventAttrList([_objectSpread(_objectSpread({}, data), {}, {
875
888
  describe: '',
876
889
  pointSelect: undefined,
877
890
  imgPath: '',
878
891
  index: eventAttrList.length,
879
892
  key: new Date() * 1,
880
- eventAttrList: data.eventAttrList,
881
893
  pageName: pageName,
882
894
  pageId: id,
883
895
  pageImgUrl: imgPath
884
- }].concat(_toConsumableArray(eventAttrList)));
896
+ })].concat(_toConsumableArray(eventAttrList)));
885
897
  setShowIndex(eventAttrList.length);
886
898
  setTimeout(function () {
887
899
  setShowIndex(void 0);
@@ -899,6 +911,21 @@ var PageInfo = function PageInfo(props) {
899
911
  setRecordShow(true);
900
912
  setEventData(row);
901
913
  };
914
+ //拼接名称
915
+ var sliceName = function sliceName(record) {
916
+ var _record$businessLabel, _record$triggerLabel;
917
+ var point = props.pageData && props.pageData.labels && props.pageData.labels.filter(function (res) {
918
+ return res.labelType == 1;
919
+ }).map(function (res) {
920
+ return res.labelName;
921
+ }).join('_') || '';
922
+ var biz = (record === null || record === void 0 ? void 0 : record.businessLabel) && ((_record$businessLabel = record.businessLabel) === null || _record$businessLabel === void 0 ? void 0 : _record$businessLabel.labelName) || '';
923
+ var trig = (record === null || record === void 0 ? void 0 : record.triggerLabel) && ((_record$triggerLabel = record.triggerLabel) === null || _record$triggerLabel === void 0 ? void 0 : _record$triggerLabel.labelName) || '' || '';
924
+ var arr = [biz, point, trig, record.eventName].filter(function (res) {
925
+ return res;
926
+ }).join('-');
927
+ return arr;
928
+ };
902
929
  return /*#__PURE__*/React.createElement("div", {
903
930
  className: "".concat(classPrefix)
904
931
  }, /*#__PURE__*/React.createElement("div", {
@@ -1158,6 +1185,7 @@ var PageInfo = function PageInfo(props) {
1158
1185
  isEdit: true,
1159
1186
  onSubmit: function onSubmit(event, type) {
1160
1187
  setCreateMetaShow(false);
1188
+ // console.log(event, '事件内容');
1161
1189
  onEventSet(event, type);
1162
1190
  },
1163
1191
  // selectTreeName={props.selectTreeName}
@@ -35,6 +35,11 @@
35
35
  font-size: 24px;
36
36
  background: rgba(2, 20, 41, 0.5) !important;
37
37
  }
38
+ &-addListBtn {
39
+ display: flex;
40
+ align-items: center;
41
+ justify-content: space-between;
42
+ }
38
43
  }
39
44
 
40
45
  .setting-create-meta-drawer {
@@ -149,4 +154,12 @@
149
154
  cursor: pointer;
150
155
  }
151
156
  }
157
+ .ant-form-item-control-input-content {
158
+ display: flex;
159
+ align-items: center;
160
+ }
161
+ .ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector {
162
+ color: #021429;
163
+ background-color: #f2f3f4;
164
+ }
152
165
  }