@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
@@ -15,8 +15,8 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
15
15
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
16
16
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
17
17
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
18
- import { Button, Dropdown, Empty, Input, message, Modal, Select, Tree, Popover, Spin } from 'antd';
19
- import { QuestionCircleOutlined } from '@ant-design/icons';
18
+ import { Button, Dropdown, Empty, Input, message, Modal, Select, Tree, Popover, Spin, Tag, Checkbox } from 'antd';
19
+ import { QuestionCircleOutlined, EnvironmentOutlined, PlusCircleOutlined, MinusCircleOutlined, EditOutlined } from '@ant-design/icons';
20
20
  import React, { useContext, useEffect, useRef, useState } from 'react';
21
21
  import './styles/tree.less';
22
22
  import { BizDialog, BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
@@ -57,7 +57,10 @@ var formatTreeArr = function formatTreeArr(list, arrTemp, parentName) {
57
57
  item.key = item.id;
58
58
  arrTemp.push({
59
59
  id: item.id,
60
- name: parentName ? parentName + ' / ' + item.name : item.name
60
+ name: parentName ? parentName + ' / ' + item.name : item.name,
61
+ tagJson: item.labels.map(function (res) {
62
+ return res.labelName;
63
+ }).join('')
61
64
  });
62
65
  if (item.children.length > 0) {
63
66
  formatTreeArr(item.children, arrTemp, item.name);
@@ -130,20 +133,29 @@ var pointMap = function pointMap(props) {
130
133
  _useState26 = _slicedToArray(_useState25, 2),
131
134
  value = _useState26[0],
132
135
  setValue = _useState26[1];
133
- var _useState27 = useState(true),
136
+ var _useState27 = useState('name'),
134
137
  _useState28 = _slicedToArray(_useState27, 2),
135
- isInit = _useState28[0],
136
- setIsInit = _useState28[1];
137
- var _useState29 = useState(false),
138
+ searchType = _useState28[0],
139
+ setSearchType = _useState28[1];
140
+ var _useState29 = useState(true),
138
141
  _useState30 = _slicedToArray(_useState29, 2),
139
- isShowDel = _useState30[0],
140
- setIsShowDel = _useState30[1];
141
- var _useState31 = useState(!!props.pageStatusIsEdit),
142
+ isInit = _useState30[0],
143
+ setIsInit = _useState30[1];
144
+ var _useState31 = useState(false),
142
145
  _useState32 = _slicedToArray(_useState31, 2),
143
- pageStatusIsEdit = _useState32[0],
144
- setPageStatusIsEdit = _useState32[1];
146
+ isShowDel = _useState32[0],
147
+ setIsShowDel = _useState32[1];
148
+ var _useState33 = useState([]),
149
+ _useState34 = _slicedToArray(_useState33, 2),
150
+ pointList = _useState34[0],
151
+ setPointList = _useState34[1];
152
+ var _useState35 = useState(!!props.pageStatusIsEdit),
153
+ _useState36 = _slicedToArray(_useState35, 2),
154
+ pageStatusIsEdit = _useState36[0],
155
+ setPageStatusIsEdit = _useState36[1];
145
156
  useEffect(function () {
146
157
  pointGetVersion();
158
+ getPointList();
147
159
  }, []);
148
160
  useEffect(function () {
149
161
  setPageStatusIsEdit(!!props.pageStatusIsEdit);
@@ -189,9 +201,9 @@ var pointMap = function pointMap(props) {
189
201
  }
190
202
  }).then(function (res) {
191
203
  if (res && res.code === '100000') {
204
+ pageNum = ((res === null || res === void 0 ? void 0 : res.data.length) || 0) + 1;
192
205
  setTreeData(formatTreeData((res === null || res === void 0 ? void 0 : res.data) || []));
193
206
  setTreeArr(formatTreeArr((res === null || res === void 0 ? void 0 : res.data) || [], [], '') || []);
194
- console.log('selectedKeys', selectedKeys);
195
207
  if (!selectedKeys) {
196
208
  setSelectedKeys((res === null || res === void 0 ? void 0 : res.data) ? [res === null || res === void 0 ? void 0 : res.data[0].id] : undefined);
197
209
  props.onChangePage((res === null || res === void 0 ? void 0 : res.data) ? _objectSpread(_objectSpread({}, res === null || res === void 0 ? void 0 : res.data[0]), {}, {
@@ -206,6 +218,25 @@ var pointMap = function pointMap(props) {
206
218
  console.log(err);
207
219
  });
208
220
  };
221
+ //查询位置标签
222
+ var getPointList = function getPointList() {
223
+ request(apis.dict.getTagList, {
224
+ method: 'post',
225
+ data: {
226
+ labelType: 1,
227
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
228
+ }
229
+ }).then(function (res) {
230
+ if (res && res.code == 100000) {
231
+ setPointList(res.data.map(function (res) {
232
+ return {
233
+ label: res.labelName,
234
+ value: res.id
235
+ };
236
+ }));
237
+ }
238
+ });
239
+ };
209
240
  var addPage = function addPage(operationType, parentId, targetPageId) {
210
241
  request(apis.createPage, {
211
242
  method: 'post',
@@ -311,7 +342,6 @@ var pointMap = function pointMap(props) {
311
342
  setAutoExpandParent(false);
312
343
  };
313
344
  var onDrop = function onDrop(info) {
314
- // console.log('onDrop', info, selectedKeys);
315
345
  moveNode({
316
346
  oldParentId: info.dragNode.parentId,
317
347
  newParentId: info.dropToGap ? info.node.parentId : info.node.id,
@@ -337,10 +367,7 @@ var pointMap = function pointMap(props) {
337
367
  }
338
368
  };
339
369
  var titleRender = function titleRender(nodeData) {
340
- // console.log('nodeData', nodeData);
341
- var onItemClick = function onItemClick(_ref) {
342
- var key = _ref.key;
343
- console.log('key', key);
370
+ var onItemClick = function onItemClick(key) {
344
371
  switch (key) {
345
372
  case '0':
346
373
  if (nodeData.storey >= 20) {
@@ -371,7 +398,81 @@ var pointMap = function pointMap(props) {
371
398
  }
372
399
  // message.info(`Click on item ${key}`);
373
400
  };
374
- return /*#__PURE__*/React.createElement("div", {
401
+ //位置标签list
402
+ var color = ['magenta', 'red', 'volcano', 'orange', 'gold', 'lime', 'green', 'cyan', 'blue', 'geekblue', 'purple'];
403
+ var pointContent = /*#__PURE__*/React.createElement(React.Fragment, null, nodeData.labels && nodeData.labels.map(function (res, index) {
404
+ return /*#__PURE__*/React.createElement(Tag, {
405
+ key: index,
406
+ color: color[index]
407
+ }, res.labelName);
408
+ }));
409
+ var pointIds = nodeData.labels && nodeData.labels.map(function (res) {
410
+ return res.id;
411
+ }) || [];
412
+ var menu = {
413
+ items: [{
414
+ label: '添加子页面',
415
+ icon: /*#__PURE__*/React.createElement(IconFont, {
416
+ type: "tianjia3"
417
+ }),
418
+ key: '0'
419
+ }, {
420
+ label: '上方添加页面',
421
+ icon: /*#__PURE__*/React.createElement(IconFont, {
422
+ type: "shangfangtianjia"
423
+ }),
424
+ key: '1'
425
+ }, {
426
+ label: '下方添加页面',
427
+ icon: /*#__PURE__*/React.createElement(IconFont, {
428
+ type: "xiafangtianjia"
429
+ }),
430
+ key: '2'
431
+ }, {
432
+ label: '选择位置标签',
433
+ icon: /*#__PURE__*/React.createElement(EnvironmentOutlined, null),
434
+ key: '5',
435
+ children: pointList.map(function (res) {
436
+ return {
437
+ key: '5' + res.value,
438
+ label: (/*#__PURE__*/React.createElement(Checkbox, {
439
+ defaultChecked: pointIds.indexOf(res.value) != -1,
440
+ onChange: function onChange(e) {
441
+ onChangeTag(e, nodeData, res);
442
+ }
443
+ }, res.label)),
444
+ disabled: true
445
+ };
446
+ })
447
+ }, {
448
+ type: 'divider'
449
+ }, {
450
+ label: '重命名',
451
+ icon: /*#__PURE__*/React.createElement(IconFont, {
452
+ type: "bianji1"
453
+ }),
454
+ key: '3'
455
+ }, {
456
+ type: 'divider'
457
+ }, {
458
+ label: '删除',
459
+ icon: /*#__PURE__*/React.createElement(IconFont, {
460
+ type: "shanchu2"
461
+ }),
462
+ key: '4'
463
+ }],
464
+ onClick: function onClick(item) {
465
+ onItemClick(item.key);
466
+ }
467
+ };
468
+ return /*#__PURE__*/React.createElement(Dropdown, {
469
+ disabled: !authority[1724922805],
470
+ menu: menu,
471
+ overlayStyle: {
472
+ width: 156
473
+ },
474
+ trigger: ['contextMenu']
475
+ }, /*#__PURE__*/React.createElement("div", {
375
476
  className: "".concat(classPrefix, "-tree-item")
376
477
  }, changeNameId === nodeData.id ? (/*#__PURE__*/React.createElement(Input, {
377
478
  style: {
@@ -415,80 +516,94 @@ var pointMap = function pointMap(props) {
415
516
  setChangeNameId(nodeData.id);
416
517
  setChangeNameString(nodeData.name);
417
518
  }
418
- }, nodeData.name))), /*#__PURE__*/React.createElement(Dropdown, {
519
+ }, /*#__PURE__*/React.createElement("span", {
520
+ className: "".concat(classPrefix, "-tree-item-title-name")
521
+ }, nodeData.name, " (", nodeData.pointSum || 0, ")"), /*#__PURE__*/React.createElement(Popover, {
522
+ placement: "topLeft",
523
+ title: "\u4F4D\u7F6E\u6807\u7B7E",
524
+ content: pointContent
525
+ }, pointContent)))), /*#__PURE__*/React.createElement("div", {
526
+ className: "".concat(classPrefix, "-tree-item-iconList")
527
+ }, /*#__PURE__*/React.createElement(EditOutlined, {
528
+ onClick: function onClick(e) {
529
+ e.stopPropagation();
530
+ onItemClick('3');
531
+ }
532
+ }), /*#__PURE__*/React.createElement(MinusCircleOutlined, {
533
+ onClick: function onClick(e) {
534
+ e.stopPropagation();
535
+ onItemClick('4');
536
+ }
537
+ }), /*#__PURE__*/React.createElement(PlusCircleOutlined, {
538
+ onClick: function onClick(e) {
539
+ e.stopPropagation();
540
+ onItemClick('2');
541
+ }
542
+ }), /*#__PURE__*/React.createElement(Dropdown, {
419
543
  disabled: !authority[1724922805],
420
- placement: 'bottomRight',
421
- menu: {
422
- items: [{
423
- label: '添加子页面',
424
- icon: /*#__PURE__*/React.createElement(IconFont, {
425
- type: "tianjia3"
426
- }),
427
- key: '0'
428
- }, {
429
- label: '上方添加页面',
430
- icon: /*#__PURE__*/React.createElement(IconFont, {
431
- type: "shangfangtianjia"
432
- }),
433
- key: '1'
434
- }, {
435
- label: '下方添加页面',
436
- icon: /*#__PURE__*/React.createElement(IconFont, {
437
- type: "xiafangtianjia"
438
- }),
439
- key: '2'
440
- }, {
441
- type: 'divider'
442
- }, {
443
- label: '重命名',
444
- icon: /*#__PURE__*/React.createElement(IconFont, {
445
- type: "bianji1"
446
- }),
447
- key: '3'
448
- }, {
449
- type: 'divider'
450
- }, {
451
- label: '删除',
452
- icon: /*#__PURE__*/React.createElement(IconFont, {
453
- type: "shanchu2"
454
- }),
455
- key: '4'
456
- }],
457
- onClick: onItemClick
458
- },
544
+ menu: menu,
459
545
  overlayStyle: {
460
546
  width: 156
461
547
  },
462
548
  trigger: ['click']
463
549
  }, /*#__PURE__*/React.createElement(IconFont, {
550
+ type: "gengduocaozuo1",
464
551
  onClick: function onClick(e) {
465
552
  e.stopPropagation();
466
- },
467
- type: "gengduocaozuo1"
468
- })));
553
+ }
554
+ })))));
469
555
  };
470
- var _useState33 = useState(false),
471
- _useState34 = _slicedToArray(_useState33, 2),
472
- isOpen = _useState34[0],
473
- setIsOpen = _useState34[1];
556
+ var onChangeTag = function onChangeTag(e, node, option) {
557
+ labelRelation(e.target.checked, node, option);
558
+ };
559
+ //绑定和解绑标签
560
+ var labelRelation = function labelRelation(checked, node, option) {
561
+ request(checked ? apis.dict.addLabelRelation : apis.dict.delLabelRelation, {
562
+ method: 'post',
563
+ data: {
564
+ id: option.value,
565
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
566
+ labelType: 1,
567
+ eventId: node.id
568
+ }
569
+ }).then(function (res) {
570
+ if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
571
+ getPointTree();
572
+ // setTimeout(() => {
573
+ // let labels = node.labels;
574
+ // if (checked) {
575
+ // labels.push(option);
576
+ // } else {
577
+ // labels = labels.filter((res: LabelsData) => res.id != option.value);
578
+ // }
579
+ // node.labels = labels;
580
+ // props.onChangePage({ ...node, currentPointVersion });
581
+ // }, 0);
582
+ }
583
+ });
584
+ };
585
+ var _useState37 = useState(false),
586
+ _useState38 = _slicedToArray(_useState37, 2),
587
+ isOpen = _useState38[0],
588
+ setIsOpen = _useState38[1];
474
589
  var downloadHelpFile = function downloadHelpFile() {
475
590
  window.open("/\u63A8\u8350\u57CB\u70B9\u65B9\u6848.xlsx");
476
591
  };
477
592
  // 分享看板二维码
478
- var _useState35 = useState(''),
479
- _useState36 = _slicedToArray(_useState35, 2),
480
- qrCodeShare = _useState36[0],
481
- setqrCodeShare = _useState36[1];
593
+ var _useState39 = useState(''),
594
+ _useState40 = _slicedToArray(_useState39, 2),
595
+ qrCodeShare = _useState40[0],
596
+ setqrCodeShare = _useState40[1];
482
597
  // 分享看板二维码-显示控制
483
- var _useState37 = useState(false),
484
- _useState38 = _slicedToArray(_useState37, 2),
485
- qrCodeShareShow = _useState38[0],
486
- setqrCodeShareShow = _useState38[1];
598
+ var _useState41 = useState(false),
599
+ _useState42 = _slicedToArray(_useState41, 2),
600
+ qrCodeShareShow = _useState42[0],
601
+ setqrCodeShareShow = _useState42[1];
487
602
  // 二维码加载中
488
- var _useState39 = useState(false),
489
- _useState40 = _slicedToArray(_useState39, 2),
490
- qrCodeLoading = _useState40[0],
491
- setQrCodeLoading = _useState40[1];
603
+ var _useState43 = useState(false),
604
+ _useState44 = _slicedToArray(_useState43, 2),
605
+ qrCodeLoading = _useState44[0],
606
+ setQrCodeLoading = _useState44[1];
492
607
  var onOpenChangeShare = function onOpenChangeShare(open) {
493
608
  setqrCodeShareShow(open);
494
609
  if (qrCodeShare === '') {
@@ -526,8 +641,8 @@ var pointMap = function pointMap(props) {
526
641
  key: item
527
642
  };
528
643
  }),
529
- onClick: function onClick(_ref2) {
530
- var key = _ref2.key;
644
+ onClick: function onClick(_ref) {
645
+ var key = _ref.key;
531
646
  setIsOpen(false);
532
647
  setValue('');
533
648
  setSelectedKeys(undefined);
@@ -580,10 +695,24 @@ var pointMap = function pointMap(props) {
580
695
  }), "\u5BFC\u5165\u9875\u9762")), /*#__PURE__*/React.createElement("div", {
581
696
  className: "".concat(classPrefix, "-search")
582
697
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, {
698
+ className: "".concat(classPrefix, "-search-selectType"),
699
+ value: searchType,
700
+ options: [{
701
+ label: '页面名',
702
+ value: 'name'
703
+ }, {
704
+ label: '位置标签',
705
+ value: 'tagJson'
706
+ }],
707
+ onChange: function onChange(value) {
708
+ setSearchType(value);
709
+ setValue(undefined);
710
+ }
711
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, {
583
712
  value: value,
584
- placeholder: "\u8BF7\u8F93\u5165\u9875\u9762\u540D\u79F0\u641C\u7D22",
713
+ placeholder: searchType == 'name' ? '请输入页面名称搜索' : '请输入位置标签名',
585
714
  // searchValue={value}
586
- optionFilterProp: 'name',
715
+ optionFilterProp: searchType,
587
716
  showArrow: false,
588
717
  showSearch: true,
589
718
  onChange: onTreeSelectChange,
@@ -594,10 +723,9 @@ var pointMap = function pointMap(props) {
594
723
  value: 'id',
595
724
  label: 'name'
596
725
  },
726
+ allowClear: true,
597
727
  options: treeArr,
598
728
  popupClassName: "".concat(classPrefix, "-search-popup")
599
- }), /*#__PURE__*/React.createElement(IconFont, {
600
- type: "sousuo"
601
729
  })), /*#__PURE__*/React.createElement("div", {
602
730
  className: "".concat(classPrefix, "-search-pop")
603
731
  }, /*#__PURE__*/React.createElement(Popover, {
@@ -1,3 +1,6 @@
1
1
  import React from 'react';
2
- declare const Dictionary: React.FC;
3
- export default Dictionary;
2
+ import './index.less';
3
+ declare const CompanySetting: React.FC<{
4
+ onShowProcess: (data?: any, isEdit?: boolean) => void;
5
+ }>;
6
+ export default CompanySetting;