@zgfe/modules-dm 1.0.57-zhongyuan.37 → 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.
@@ -89,6 +89,7 @@ declare let apis: {
89
89
  downloadTemple: string;
90
90
  allOpenStatus: string;
91
91
  checkStatus: string;
92
+ checkExists: string;
92
93
  };
93
94
  clearRule: {
94
95
  getList: string;
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-dm",
3
- "version": "1.0.57-zhongyuan.37",
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": "425c100daccfefb97c11efdcaa5761678936b7ad",
60
+ "gitHead": "905d25ce59c27bb99555fbd6f7ec1e1754df5ea1",
61
61
  "gitHooks": {
62
62
  "pre-commit": "lint-staged"
63
63
  }