@zgfe/modules-settings 2.1.0-zhongyuan.4 → 2.1.0-zhongyuan.5

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.
@@ -145,7 +145,7 @@ var apis = {
145
145
  dict: {
146
146
  //字典管理
147
147
  getDictList: '/zg/web/v2/systemSettings/attr/dict/list',
148
- getDictPage: '/zg/web/v2/systemsetting/attr/dict/listByPage',
148
+ getDictPage: '/zg/web/v2/systemSettings/attr/dict/listByPage',
149
149
  dictSave: '/zg/web/v2/systemSettings/attr/dict/save',
150
150
  dictUpdate: '/zg/web/v2/systemSettings/attr/dict/update',
151
151
  dictUpload: '/zg/web/v2/systemSettings/attr/dict/upload',
@@ -518,15 +518,15 @@ var PageInfo = function PageInfo(props) {
518
518
  className: "".concat(classPrefix, "-content-popoverTag-item")
519
519
  }, /*#__PURE__*/React.createElement("span", {
520
520
  className: "".concat(classPrefix, "-content-popoverTag-label")
521
- }, "\u4E1A\u52A1\u6807\u7B7E:"), /*#__PURE__*/React.createElement(Tag, {
522
- color: "blue"
523
- }, "\u4E1A\u52A1\u6807\u7B7E1")), /*#__PURE__*/React.createElement("div", {
521
+ }, "\u4E1A\u52A1\u6807\u7B7E:"), record.businessLabel && /*#__PURE__*/React.createElement(Tag, {
522
+ color: "blud"
523
+ }, record.businessLabel.labelName)), /*#__PURE__*/React.createElement("div", {
524
524
  className: "".concat(classPrefix, "-content-popoverTag-item")
525
525
  }, /*#__PURE__*/React.createElement("span", {
526
526
  className: "".concat(classPrefix, "-content-popoverTag-label")
527
- }, "\u89E6\u53D1\u6807\u7B7E:"), /*#__PURE__*/React.createElement(Tag, {
528
- color: "orange"
529
- }, "\u89E6\u53D1\u6807\u7B7E")));
527
+ }, "\u89E6\u53D1\u6807\u7B7E:"), record.triggerLabel && /*#__PURE__*/React.createElement(Tag, {
528
+ color: "blud"
529
+ }, record.triggerLabel.labelName)));
530
530
  return /*#__PURE__*/React.createElement(Popover, {
531
531
  content: content,
532
532
  title: eventName || ''
@@ -552,7 +552,7 @@ var PageInfo = function PageInfo(props) {
552
552
  setMetaDataIndex(index);
553
553
  }
554
554
  }
555
- }, eventName ? eventName : '选择元事件', !eventName && /*#__PURE__*/React.createElement(IconFont, {
555
+ }, eventName ? sliceName(record) : '选择元事件', !eventName && /*#__PURE__*/React.createElement(IconFont, {
556
556
  type: "zhuanfa",
557
557
  style: {
558
558
  marginLeft: 8
@@ -914,6 +914,21 @@ var PageInfo = function PageInfo(props) {
914
914
  setRecordShow(true);
915
915
  setEventData(row);
916
916
  };
917
+ //拼接名称
918
+ var sliceName = function sliceName(record) {
919
+ var _record$businessLabel, _record$triggerLabel;
920
+ var point = record.labels && record.labels.filter(function (res) {
921
+ return res.labelType == 2;
922
+ }).map(function (res) {
923
+ return res.labelName;
924
+ }).join('_') || '';
925
+ var biz = record.businessLabel && ((_record$businessLabel = record.businessLabel) === null || _record$businessLabel === void 0 ? void 0 : _record$businessLabel.labelName) || '';
926
+ var trig = record.triggerLabel && ((_record$triggerLabel = record.triggerLabel) === null || _record$triggerLabel === void 0 ? void 0 : _record$triggerLabel.labelName) || '' || '';
927
+ var arr = [biz, point, trig, record.eventName].filter(function (res) {
928
+ return res;
929
+ }).join('-');
930
+ return arr;
931
+ };
917
932
  return /*#__PURE__*/React.createElement("div", {
918
933
  className: "".concat(classPrefix)
919
934
  }, /*#__PURE__*/React.createElement("div", {
@@ -143,12 +143,17 @@ var pointMap = function pointMap(props) {
143
143
  _useState32 = _slicedToArray(_useState31, 2),
144
144
  isShowDel = _useState32[0],
145
145
  setIsShowDel = _useState32[1];
146
- var _useState33 = useState(!!props.pageStatusIsEdit),
146
+ var _useState33 = useState([]),
147
147
  _useState34 = _slicedToArray(_useState33, 2),
148
- pageStatusIsEdit = _useState34[0],
149
- setPageStatusIsEdit = _useState34[1];
148
+ pointList = _useState34[0],
149
+ setPointList = _useState34[1];
150
+ var _useState35 = useState(!!props.pageStatusIsEdit),
151
+ _useState36 = _slicedToArray(_useState35, 2),
152
+ pageStatusIsEdit = _useState36[0],
153
+ setPageStatusIsEdit = _useState36[1];
150
154
  useEffect(function () {
151
155
  pointGetVersion();
156
+ getPointList();
152
157
  }, []);
153
158
  useEffect(function () {
154
159
  setPageStatusIsEdit(!!props.pageStatusIsEdit);
@@ -211,6 +216,22 @@ var pointMap = function pointMap(props) {
211
216
  console.log(err);
212
217
  });
213
218
  };
219
+ //查询位置标签
220
+ var getPointList = function getPointList() {
221
+ request(apis.dict.getTagList, {
222
+ labelType: 1,
223
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
224
+ }).then(function (res) {
225
+ if (res.code == 100000) {
226
+ setPointList(res.data.map(function (res) {
227
+ return {
228
+ label: res.labelName,
229
+ value: res.id
230
+ };
231
+ }));
232
+ }
233
+ });
234
+ };
214
235
  var addPage = function addPage(operationType, parentId, targetPageId) {
215
236
  request(apis.createPage, {
216
237
  method: 'post',
@@ -471,23 +492,17 @@ var pointMap = function pointMap(props) {
471
492
  label: '选择位置标签',
472
493
  icon: /*#__PURE__*/React.createElement(EnvironmentOutlined, null),
473
494
  key: '5',
474
- children: [{
475
- key: '3-1',
476
- label: (/*#__PURE__*/React.createElement(Checkbox, {
477
- onChange: function onChange(e) {
478
- onChangeTag(e, 'key');
479
- }
480
- }, "\u6807\u7B7E1")),
481
- disabled: true
482
- }, {
483
- key: '3-2',
484
- label: (/*#__PURE__*/React.createElement(Checkbox, {
485
- onChange: function onChange(e) {
486
- onChangeTag(e, 'key');
487
- }
488
- }, "\u6807\u7B7E2")),
489
- disabled: true
490
- }]
495
+ children: pointList.map(function (res) {
496
+ return {
497
+ key: '3' + res.value,
498
+ label: (/*#__PURE__*/React.createElement(Checkbox, {
499
+ onChange: function onChange(e) {
500
+ onChangeTag(e, 'key');
501
+ }
502
+ }, res.label)),
503
+ disabled: true
504
+ };
505
+ })
491
506
  }, {
492
507
  type: 'divider'
493
508
  }, {
@@ -521,28 +536,28 @@ var pointMap = function pointMap(props) {
521
536
  var onChangeTag = function onChangeTag(e, key) {
522
537
  console.log(e, key, 'onChangeTag');
523
538
  };
524
- var _useState35 = useState(false),
525
- _useState36 = _slicedToArray(_useState35, 2),
526
- isOpen = _useState36[0],
527
- setIsOpen = _useState36[1];
539
+ var _useState37 = useState(false),
540
+ _useState38 = _slicedToArray(_useState37, 2),
541
+ isOpen = _useState38[0],
542
+ setIsOpen = _useState38[1];
528
543
  var downloadHelpFile = function downloadHelpFile() {
529
544
  window.open("/\u63A8\u8350\u57CB\u70B9\u65B9\u6848.xlsx");
530
545
  };
531
546
  // 分享看板二维码
532
- var _useState37 = useState(''),
533
- _useState38 = _slicedToArray(_useState37, 2),
534
- qrCodeShare = _useState38[0],
535
- setqrCodeShare = _useState38[1];
536
- // 分享看板二维码-显示控制
537
- var _useState39 = useState(false),
547
+ var _useState39 = useState(''),
538
548
  _useState40 = _slicedToArray(_useState39, 2),
539
- qrCodeShareShow = _useState40[0],
540
- setqrCodeShareShow = _useState40[1];
541
- // 二维码加载中
549
+ qrCodeShare = _useState40[0],
550
+ setqrCodeShare = _useState40[1];
551
+ // 分享看板二维码-显示控制
542
552
  var _useState41 = useState(false),
543
553
  _useState42 = _slicedToArray(_useState41, 2),
544
- qrCodeLoading = _useState42[0],
545
- setQrCodeLoading = _useState42[1];
554
+ qrCodeShareShow = _useState42[0],
555
+ setqrCodeShareShow = _useState42[1];
556
+ // 二维码加载中
557
+ var _useState43 = useState(false),
558
+ _useState44 = _slicedToArray(_useState43, 2),
559
+ qrCodeLoading = _useState44[0],
560
+ setQrCodeLoading = _useState44[1];
546
561
  var onOpenChangeShare = function onOpenChangeShare(open) {
547
562
  setqrCodeShareShow(open);
548
563
  if (qrCodeShare === '') {
@@ -124,12 +124,13 @@ var locationTagManagement = function locationTagManagement(_ref) {
124
124
  exportLoading = _useState10[0],
125
125
  setExportLoading = _useState10[1];
126
126
  var onExport = function onExport() {
127
- if (!exportLoading) return;
127
+ if (exportLoading) return;
128
128
  setExportLoading(true);
129
129
  request(apis.dict.tagDownload, {
130
130
  method: 'post',
131
131
  data: {
132
- appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
132
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
133
+ labelType: type
133
134
  },
134
135
  responseType: 'blob'
135
136
  }).then(function () {
@@ -251,6 +252,7 @@ var locationTagManagement = function locationTagManagement(_ref) {
251
252
  },
252
253
  onSuccess: function onSuccess(result) {
253
254
  setOpenImportModal(false);
255
+ getList();
254
256
  }
255
257
  })));
256
258
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-settings",
3
- "version": "2.1.0-zhongyuan.4",
3
+ "version": "2.1.0-zhongyuan.5",
4
4
  "private": false,
5
5
  "module": "es/index.js",
6
6
  "typings": "es/index.d.ts",
@@ -67,7 +67,7 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "4767afec1ef7fe458973efa32bf1195c4cc2c93c",
70
+ "gitHead": "15555af56920d4842b4bd5fc7c416585b975e9df",
71
71
  "gitHooks": {
72
72
  "pre-commit": "lint-staged"
73
73
  }