@zgfe/modules-dm 1.0.57-zhongyuan.59 → 1.0.57-zhongyuan.60

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.
@@ -306,7 +306,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
306
306
  // }
307
307
  disabled: isDemo ||
308
308
  // !authority[1000004] ||
309
- record.category === 'fixed' || record.owner == 'zg_abp',
309
+ eventWhiteList.includes(record.attr_name) || record.category === 'fixed',
310
310
  defaultValue: record.alias_name,
311
311
  onFocus: aliasFocus,
312
312
  onBlur: function onBlur(e) {
@@ -334,7 +334,9 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
334
334
  // }
335
335
  disabled: isDemo ||
336
336
  // !authority[1000004] ||
337
- record.category === 'fixed' || record.owner == 'zg_abp',
337
+ //
338
+ // record.owner == 'zg_abp'
339
+ eventWhiteList.includes(record.attr_name) || record.category === 'fixed',
338
340
  defaultValue: record.alias_name,
339
341
  onFocus: aliasFocus,
340
342
  onBlur: function onBlur(e) {
@@ -430,7 +432,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
430
432
  width: 100
431
433
  },
432
434
  // disabled={isDemo || record.isIdMappingProp || record.category === 'fixed'}
433
- disabled: isDemo || !authority[1000004] || !record.canUpdate || record.category === 'fixed' || record.owner == 'zg_abp',
435
+ disabled: isDemo || !authority[1000004] || !record.canUpdate || record.category === 'fixed' || eventWhiteList.includes(record.attr_name),
434
436
  onChange: function onChange(e) {
435
437
  return attrChangeHandle(e, record, 'type');
436
438
  },
@@ -487,7 +489,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
487
489
  width: 100
488
490
  },
489
491
  // disabled={isDemo || record.isIdMappingProp || record.category === 'fixed'}
490
- disabled: isDemo || !authority[1000004] || record.category === 'fixed' || record.owner == 'zg_abp',
492
+ disabled: isDemo || !authority[1000004] || record.category === 'fixed' || eventWhiteList.includes(record.attr_name),
491
493
  onChange: function onChange(e) {
492
494
  return attrChangeHandle(e, record, 'hidden');
493
495
  },
@@ -549,7 +551,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
549
551
  width: 100
550
552
  },
551
553
  // disabled={isDemo || record.isIdMappingProp}
552
- disabled: isDemo || !authority[1000004] || record.category === 'fixed' || record.owner == 'zg_abp',
554
+ disabled: isDemo || !authority[1000004] || record.category === 'fixed' || eventWhiteList.includes(record.attr_name),
553
555
  onChange: function onChange(e) {
554
556
  return attrChangeHandle(e, record, 'encryption_type');
555
557
  },
@@ -623,20 +625,14 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
623
625
  }
624
626
  })
625
627
  })),
626
- // dataIndex: 'category',
628
+ dataIndex: 'category',
627
629
  width: 120,
628
- render: function render(record) {
629
- // let json: { [x: string]: string } = {
630
- // fixed: '内置',
631
- // custom: '自定义',
632
- // };
633
- //事件下的属性
634
- var eventAttrList = eventWhiteList.includes(eventAttrsData.event_name) ? eventAttrsData === null || eventAttrsData === void 0 ? void 0 : eventAttrsData.event_attrs.map(function (j) {
635
- return j.attr_name;
636
- }) : [];
637
- return /*#__PURE__*/React.createElement("div", null, eventAttrList && eventAttrList.length > 0 ? eventAttrList.filter(function (item) {
638
- return ownerWhiteListDataList.includes(item);
639
- }) ? '内置' : '自定义' : '自定义');
630
+ render: function render(category) {
631
+ var json = {
632
+ fixed: '内置',
633
+ custom: '自定义'
634
+ };
635
+ return /*#__PURE__*/React.createElement("div", null, json[category]);
640
636
  }
641
637
  }, {
642
638
  title: '创建人',
@@ -681,19 +677,14 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
681
677
  }
682
678
  })
683
679
  })),
684
- // dataIndex: 'owner',
680
+ dataIndex: 'attr_name',
685
681
  width: 120,
686
682
  render: function render(record) {
687
683
  var json = {
688
684
  zg_abp: '内置',
689
685
  zg: '自定义'
690
686
  };
691
- var eventAttrList = eventWhiteList.includes(eventAttrsData.event_name) ? eventAttrsData === null || eventAttrsData === void 0 ? void 0 : eventAttrsData.event_attrs.map(function (j) {
692
- return j.attr_name;
693
- }) : [];
694
- return /*#__PURE__*/React.createElement("div", null, eventAttrList && eventAttrList.length > 0 ? eventAttrList.filter(function (item) {
695
- return ownerWhiteListDataList.includes(item);
696
- }) ? '内置' : '自定义' : '自定义');
687
+ return /*#__PURE__*/React.createElement("div", null, ownerWhiteListDataList.includes(record) ? '内置' : '自定义');
697
688
  }
698
689
  }]), [{
699
690
  title: '操作',
@@ -705,7 +696,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
705
696
  style: {
706
697
  padding: 0
707
698
  },
708
- disabled: source === 'event' ? record.owner == 'zg_abp' || !authority[1000004] || !record.canUpdate : record.category == 'fixed' || isDemo || !authority[1000004],
699
+ disabled: source === 'event' ? eventWhiteList.includes(record.attr_name) || !authority[1000004] || !record.canUpdate : record.category == 'fixed' || isDemo || !authority[1000004],
709
700
  onClick: function onClick() {
710
701
  if (isDemo || !authority[1000004]) {
711
702
  message.error('无删除权限');
@@ -939,7 +930,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
939
930
  width: 64,
940
931
  render: function render(_, record, index) {
941
932
  return /*#__PURE__*/React.createElement("a", {
942
- className: "set ".concat(record.owner == 'zg_abp' ? 'set-error' : ''),
933
+ className: "set ".concat(eventWhiteList.includes(record.attr_name) ? 'set-error' : ''),
943
934
  onClick: function onClick() {
944
935
  return dealEventAttr(index);
945
936
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-dm",
3
- "version": "1.0.57-zhongyuan.59",
3
+ "version": "1.0.57-zhongyuan.60",
4
4
  "license": "ISC",
5
5
  "module": "es/index.js",
6
6
  "typings": "es/index.d.ts",
@@ -57,7 +57,7 @@
57
57
  "umi-request": "^1.4.0",
58
58
  "yorkie": "^2.0.0"
59
59
  },
60
- "gitHead": "e655d5290b7a1826c5d740d898dd2454460ae513",
60
+ "gitHead": "d394203f85c3a1180e90cdfc2a8c315cbc20c3d2",
61
61
  "gitHooks": {
62
62
  "pre-commit": "lint-staged"
63
63
  }