@zgfe/modules-dm 1.0.57-zhongyuan.36 → 1.0.57-zhongyuan.38
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.
package/es/constants/api.d.ts
CHANGED
package/es/constants/api.js
CHANGED
|
@@ -152,7 +152,8 @@ var apis = {
|
|
|
152
152
|
exportFile: '/zg/web/v2/verify/report/export',
|
|
153
153
|
downloadTemple: '/zg/web/v2/verify/downloadMould',
|
|
154
154
|
allOpenStatus: '/zg/web/v2/verify/statusMain',
|
|
155
|
-
checkStatus: '/zg/web/v2/verify/statusBefore'
|
|
155
|
+
checkStatus: '/zg/web/v2/verify/statusBefore',
|
|
156
|
+
checkExists: '/zg/web/v2/verify/checkExists'
|
|
156
157
|
},
|
|
157
158
|
clearRule: {
|
|
158
159
|
getList: '/zg/web/v2/rinseShiftRule/queryRinseShiftRuleList',
|
|
@@ -237,6 +237,23 @@ var AddRule = function AddRule(_ref) {
|
|
|
237
237
|
setBizAttributeSelectorValue(undefined);
|
|
238
238
|
setOptions([].concat(initOptions));
|
|
239
239
|
} else {
|
|
240
|
+
// 先查询是否有属性规则一开启的
|
|
241
|
+
request(apis.rule.checkExists, {
|
|
242
|
+
method: 'post',
|
|
243
|
+
data: {
|
|
244
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
245
|
+
event: event.id,
|
|
246
|
+
attr: attr === null || attr === void 0 ? void 0 : attr.id
|
|
247
|
+
}
|
|
248
|
+
}).then(function (res) {
|
|
249
|
+
if (!res) return;
|
|
250
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
|
|
251
|
+
// 判断属性是否已经存在
|
|
252
|
+
var exists = res.data; // 假设后端返回的数据结构中有一个字段表示是否存在
|
|
253
|
+
!exists && message.error('该属性的规则已存在,请重新选择属性!');
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
});
|
|
240
257
|
var _value = attr.propCategory === 'eventProp' ? attr.id : attr.name;
|
|
241
258
|
setBizAttributeSelectorValue(_objectSpread(_objectSpread({}, attr), {}, {
|
|
242
259
|
value: _value
|
|
@@ -351,9 +368,7 @@ var AddRule = function AddRule(_ref) {
|
|
|
351
368
|
value: selectType
|
|
352
369
|
}, /*#__PURE__*/React.createElement(Radio, {
|
|
353
370
|
value: 'eventProp'
|
|
354
|
-
}, "\u4E8B\u4EF6\u5C5E\u6027\u6821\u9A8C"), /*#__PURE__*/React.createElement(
|
|
355
|
-
value: 'user'
|
|
356
|
-
}, "\u89D2\u8272\u5C5E\u6027\u6821\u9A8C")), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("div", {
|
|
371
|
+
}, "\u4E8B\u4EF6\u5C5E\u6027\u6821\u9A8C")), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("div", {
|
|
357
372
|
className: "selectVent"
|
|
358
373
|
}, selectType == 'eventProp' && (/*#__PURE__*/React.createElement(BizEventSelector, {
|
|
359
374
|
showAllEvent: true,
|
|
@@ -368,9 +383,9 @@ var AddRule = function AddRule(_ref) {
|
|
|
368
383
|
onChange: onChangeEvent,
|
|
369
384
|
placeholder: "\u8BF7\u9009\u62E9\u4E8B\u4EF6"
|
|
370
385
|
})), /*#__PURE__*/React.createElement(BizAttributeSelector, {
|
|
371
|
-
enableEventProp:
|
|
372
|
-
enableUserProp:
|
|
373
|
-
enableEnvProp:
|
|
386
|
+
enableEventProp: selectType == 'eventProp',
|
|
387
|
+
enableUserProp: false,
|
|
388
|
+
enableEnvProp: false,
|
|
374
389
|
eventIdList: [event === null || event === void 0 ? void 0 : event.id],
|
|
375
390
|
value: bizAttributeSelectorValue,
|
|
376
391
|
enableDelete: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-dm",
|
|
3
|
-
"version": "1.0.57-zhongyuan.
|
|
3
|
+
"version": "1.0.57-zhongyuan.38",
|
|
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": "
|
|
60
|
+
"gitHead": "905d25ce59c27bb99555fbd6f7ec1e1754df5ea1",
|
|
61
61
|
"gitHooks": {
|
|
62
62
|
"pre-commit": "lint-staged"
|
|
63
63
|
}
|