@zgfe/modules-dm 1.0.28 → 1.0.29

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.
@@ -39,6 +39,8 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
39
39
  setValueLoading = _useState4[1];
40
40
  var _useContext2 = useContext(DmContext),
41
41
  state = _useContext2.state;
42
+ // 内置属性(名称, 用户id)可编辑加密状态
43
+ var uniqueAttrs = ['name', 'app_user_id'];
42
44
  // 判断是否在方案中: 处理表格class添加异常样式 | 处理表格行异常信息展示, true异常
43
45
  var rowRenderHandle = function rowRenderHandle(name) {
44
46
  if (source == 'event' && eventAttrsData.owner == 'zg_abp') {
@@ -76,7 +78,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
76
78
  }).then(function (res) {
77
79
  if (!res) throw new Error();
78
80
  var afterData = res.data.filter(function (item) {
79
- if (item.dimension_sub == 'user_attr') {
81
+ if (item.dimension_sub == 'user_attr' || uniqueAttrs.includes(item.dimension_sub)) {
80
82
  return item;
81
83
  }
82
84
  });
@@ -180,7 +182,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
180
182
  return /*#__PURE__*/React.createElement(Input, {
181
183
  className: "alias_name",
182
184
  placeholder: "\u7F16\u8F91\u522B\u540D",
183
- disabled: isDemo || record.isIdMappingProp,
185
+ disabled: isDemo || record.isIdMappingProp || record.category === 'fixed',
184
186
  defaultValue: record.alias_name,
185
187
  onFocus: aliasFocus,
186
188
  onBlur: function onBlur(e) {
@@ -200,7 +202,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
200
202
  }, /*#__PURE__*/React.createElement(Input, {
201
203
  className: "alias_name",
202
204
  placeholder: "\u7F16\u8F91\u522B\u540D",
203
- disabled: isDemo || record.isIdMappingProp,
205
+ disabled: isDemo || record.isIdMappingProp || record.category === 'fixed',
204
206
  defaultValue: record.alias_name,
205
207
  onFocus: aliasFocus,
206
208
  onBlur: function onBlur(e) {
@@ -215,9 +217,9 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
215
217
  width: 120,
216
218
  render: function render(text, record, index) {
217
219
  return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && /*#__PURE__*/React.createElement("span", {
218
- className: "attr_alias_name ".concat(isDemo || record.isIdMappingProp ? 'disabled' : ''),
220
+ className: "attr_alias_name ".concat(isDemo || record.isIdMappingProp || record.category === 'fixed' ? 'disabled' : ''),
219
221
  onClick: function onClick() {
220
- if (record.isIdMappingProp) return;
222
+ if (record.isIdMappingProp || record.category === 'fixed') return;
221
223
  if (isDemo) {
222
224
  message.error('demo环境,无法编辑');
223
225
  return;
@@ -242,7 +244,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
242
244
  style: {
243
245
  width: '100%'
244
246
  },
245
- disabled: isDemo || record.isIdMappingProp,
247
+ disabled: isDemo || record.isIdMappingProp || record.category === 'fixed',
246
248
  onChange: function onChange(e) {
247
249
  return attrChangeHandle(e, record, 'type');
248
250
  },
@@ -264,11 +266,11 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
264
266
  width: 120,
265
267
  render: function render(text, record, index) {
266
268
  return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && /*#__PURE__*/React.createElement(Select, {
267
- defaultValue: record.hidden,
269
+ defaultValue: record.hidden || 0,
268
270
  style: {
269
271
  width: '100%'
270
272
  },
271
- disabled: isDemo || record.isIdMappingProp,
273
+ disabled: isDemo || record.isIdMappingProp || record.category === 'fixed',
272
274
  onChange: function onChange(e) {
273
275
  return attrChangeHandle(e, record, 'hidden');
274
276
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-dm",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "license": "ISC",
5
5
  "module": "es/index.js",
6
6
  "typings": "es/index.d.ts",
@@ -49,7 +49,7 @@
49
49
  "umi-request": "^1.4.0",
50
50
  "yorkie": "^2.0.0"
51
51
  },
52
- "gitHead": "5644bb7969cc889d25d07ffef97d85354bc19289",
52
+ "gitHead": "1b519f4f74516d9f9c76a1f07fb8d72827ed7020",
53
53
  "gitHooks": {
54
54
  "pre-commit": "lint-staged"
55
55
  }