@zgfe/modules-dm 1.0.57-zhongyuan.51 → 1.0.57-zhongyuan.54
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.
|
@@ -338,11 +338,6 @@ var AddRule = function AddRule(_ref) {
|
|
|
338
338
|
}
|
|
339
339
|
}, []);
|
|
340
340
|
// 禁用按钮规则
|
|
341
|
-
// { label: '属性类型', value: 1 },
|
|
342
|
-
// { label: '正则匹配', value: 2 },
|
|
343
|
-
// { label: '数值区间', value: 3 },
|
|
344
|
-
// { label: '枚举', value: 4 },
|
|
345
|
-
// { label: '非空', value: 5 },
|
|
346
341
|
// 1字符串类型 2数值类型 3日期类型
|
|
347
342
|
var handleDisabled = function handleDisabled(btnItem) {
|
|
348
343
|
var result = true;
|
|
@@ -381,7 +376,7 @@ var AddRule = function AddRule(_ref) {
|
|
|
381
376
|
className: "addRule"
|
|
382
377
|
}, /*#__PURE__*/React.createElement(Drawer, {
|
|
383
378
|
className: "addRuleForm",
|
|
384
|
-
title: /*#__PURE__*/React.createElement("div", null, currentRuleDetail ? '修改' : '新增', "\u81EA\u5B9A\u4E49\u5165\u5E93\u6821\u9A8C\u89C4\u5219", /*#__PURE__*/React.createElement("div", {
|
|
379
|
+
title: /*#__PURE__*/React.createElement("div", null, ruleRowView ? '查看' : currentRuleDetail ? '修改' : '新增', "\u81EA\u5B9A\u4E49\u5165\u5E93\u6821\u9A8C\u89C4\u5219", /*#__PURE__*/React.createElement("div", {
|
|
385
380
|
className: "drawerCloseIcon",
|
|
386
381
|
onClick: onClose
|
|
387
382
|
}, /*#__PURE__*/React.createElement(CloseOutlined, {
|
|
@@ -445,7 +440,11 @@ var AddRule = function AddRule(_ref) {
|
|
|
445
440
|
value: selectType
|
|
446
441
|
}, /*#__PURE__*/React.createElement(Radio, {
|
|
447
442
|
value: 'eventProp'
|
|
448
|
-
}, "\u4E8B\u4EF6\u5C5E\u6027\u6821\u9A8C")), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(
|
|
443
|
+
}, "\u4E8B\u4EF6\u5C5E\u6027\u6821\u9A8C")), /*#__PURE__*/React.createElement("br", null), ruleRowView && (/*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
|
|
444
|
+
type: "link"
|
|
445
|
+
}, "\u4E8B\u4EF6\u5C5E\u6027\uFF1A\u4E8B\u4EF6\u5C5E\u6027\u6821\u9A8C"), /*#__PURE__*/React.createElement(Button, {
|
|
446
|
+
type: "link"
|
|
447
|
+
}, "\u7EC6\u5206\u5C5E\u6027\uFF1A\u89D2\u8272\u5C5E\u6027\u6821\u9A8C"))), !ruleRowView && (/*#__PURE__*/React.createElement("div", {
|
|
449
448
|
className: "selectVent"
|
|
450
449
|
}, selectType == 'eventProp' && (/*#__PURE__*/React.createElement(BizEventSelector, {
|
|
451
450
|
showAllEvent: true,
|
|
@@ -471,7 +470,7 @@ var AddRule = function AddRule(_ref) {
|
|
|
471
470
|
onChangeAttr(undefined);
|
|
472
471
|
},
|
|
473
472
|
placeholder: "\u8BF7\u9009\u62E9\u7EC6\u5206\u5C5E\u6027"
|
|
474
|
-
})), bizAttributeSelectorValue && (/*#__PURE__*/React.createElement("div", {
|
|
473
|
+
}))), bizAttributeSelectorValue && (/*#__PURE__*/React.createElement("div", {
|
|
475
474
|
className: "attrValue"
|
|
476
475
|
}, optionsRule.length > 1 && /*#__PURE__*/React.createElement("span", {
|
|
477
476
|
className: "attrValue-styleLine"
|
|
@@ -482,6 +481,7 @@ var AddRule = function AddRule(_ref) {
|
|
|
482
481
|
}, /*#__PURE__*/React.createElement("div", null, (bizAttributeSelectorValue === null || bizAttributeSelectorValue === void 0 ? void 0 : bizAttributeSelectorValue.label) || bizAttributeSelectorValue.name), /*#__PURE__*/React.createElement(TypeComponent, {
|
|
483
482
|
type: o.ruleType,
|
|
484
483
|
optionsValue: optionsRule,
|
|
484
|
+
viewDisabled: ruleRowView,
|
|
485
485
|
id: o.uniqueId,
|
|
486
486
|
editStatus: currentRuleDetail ? true : false
|
|
487
487
|
}), /*#__PURE__*/React.createElement("div", {
|
|
@@ -492,7 +492,7 @@ var AddRule = function AddRule(_ref) {
|
|
|
492
492
|
return handleRuleDel(o.uniqueId);
|
|
493
493
|
}
|
|
494
494
|
}, "X"));
|
|
495
|
-
}))), /*#__PURE__*/React.createElement(Space, null, options.map(function (item, index) {
|
|
495
|
+
}))), /*#__PURE__*/React.createElement(Space, null, !ruleRowView && options.map(function (item, index) {
|
|
496
496
|
return /*#__PURE__*/React.createElement(Button, {
|
|
497
497
|
key: index,
|
|
498
498
|
type: "primary",
|
|
@@ -524,7 +524,8 @@ var TypeComponent = function TypeComponent(_ref2) {
|
|
|
524
524
|
var type = _ref2.type,
|
|
525
525
|
optionsValue = _ref2.optionsValue,
|
|
526
526
|
editStatus = _ref2.editStatus,
|
|
527
|
-
id = _ref2.id
|
|
527
|
+
id = _ref2.id,
|
|
528
|
+
viewDisabled = _ref2.viewDisabled;
|
|
528
529
|
// type:1 string 2:正则 3:数字区间 4:枚举
|
|
529
530
|
var Component = null;
|
|
530
531
|
var _useContext2 = useContext(BizGlobalDataContext),
|
|
@@ -656,6 +657,7 @@ var TypeComponent = function TypeComponent(_ref2) {
|
|
|
656
657
|
Component = /*#__PURE__*/React.createElement(Input, {
|
|
657
658
|
placeholder: "\u8BF7\u8F93\u5165\u6B63\u5219\u8868\u5355\u5F0F",
|
|
658
659
|
value: testValue,
|
|
660
|
+
disabled: viewDisabled,
|
|
659
661
|
onChange: function onChange(event) {
|
|
660
662
|
setTestValue(event.target.value);
|
|
661
663
|
optionsValue.filter(function (r) {
|
|
@@ -674,6 +676,7 @@ var TypeComponent = function TypeComponent(_ref2) {
|
|
|
674
676
|
cursor: 'pointer'
|
|
675
677
|
},
|
|
676
678
|
onClick: function onClick() {
|
|
679
|
+
if (viewDisabled) return;
|
|
677
680
|
setIncludedMinState(function (pre) {
|
|
678
681
|
optionsValue.filter(function (r) {
|
|
679
682
|
return r.uniqueId == id;
|
|
@@ -684,6 +687,7 @@ var TypeComponent = function TypeComponent(_ref2) {
|
|
|
684
687
|
}, includedMinState ? '[' : '(')), /*#__PURE__*/React.createElement(InputNumber, {
|
|
685
688
|
min: 1,
|
|
686
689
|
max: 100000,
|
|
690
|
+
disabled: viewDisabled,
|
|
687
691
|
value: minNum,
|
|
688
692
|
onChange: function onChange(value) {
|
|
689
693
|
setMinNum(value);
|
|
@@ -694,6 +698,7 @@ var TypeComponent = function TypeComponent(_ref2) {
|
|
|
694
698
|
}), "-", /*#__PURE__*/React.createElement(InputNumber, {
|
|
695
699
|
min: 1,
|
|
696
700
|
max: 100000,
|
|
701
|
+
disabled: viewDisabled,
|
|
697
702
|
value: maxNum,
|
|
698
703
|
onChange: function onChange(value) {
|
|
699
704
|
setMaxNum(value);
|
|
@@ -708,6 +713,7 @@ var TypeComponent = function TypeComponent(_ref2) {
|
|
|
708
713
|
cursor: 'pointer'
|
|
709
714
|
},
|
|
710
715
|
onClick: function onClick() {
|
|
716
|
+
if (viewDisabled) return;
|
|
711
717
|
setIncludedMaxState(function (pre) {
|
|
712
718
|
optionsValue.filter(function (r) {
|
|
713
719
|
return r.uniqueId == id;
|
|
@@ -724,6 +730,7 @@ var TypeComponent = function TypeComponent(_ref2) {
|
|
|
724
730
|
width: '100%'
|
|
725
731
|
},
|
|
726
732
|
placeholder: "\u8BF7\u8F93\u5165",
|
|
733
|
+
disabled: viewDisabled,
|
|
727
734
|
value: optionsValue.filter(function (r) {
|
|
728
735
|
return r.uniqueId == id;
|
|
729
736
|
})[0].content,
|
|
@@ -739,6 +746,7 @@ var TypeComponent = function TypeComponent(_ref2) {
|
|
|
739
746
|
value: ziduanValue,
|
|
740
747
|
placeholder: "\u9009\u62E9\u5B57\u5178\u89C4\u5219",
|
|
741
748
|
options: dictList,
|
|
749
|
+
disabled: viewDisabled,
|
|
742
750
|
onChange: function onChange(value) {
|
|
743
751
|
setZiduanValue(value);
|
|
744
752
|
optionsValue.filter(function (r) {
|
|
@@ -83,7 +83,11 @@ var ClearRule = function ClearRule() {
|
|
|
83
83
|
onClick: function onClick() {
|
|
84
84
|
handleEditRule(record);
|
|
85
85
|
}
|
|
86
|
-
}, "\u7F16\u8F91")),
|
|
86
|
+
}, "\u7F16\u8F91")), /*#__PURE__*/React.createElement("a", {
|
|
87
|
+
onClick: function onClick() {
|
|
88
|
+
return handleViewRule(record);
|
|
89
|
+
}
|
|
90
|
+
}, "\u67E5\u770B"), authority[170928557413] && (/*#__PURE__*/React.createElement(Button, {
|
|
87
91
|
type: "link",
|
|
88
92
|
disabled: record.status == 1,
|
|
89
93
|
onClick: function onClick() {
|
|
@@ -202,6 +206,7 @@ var ClearRule = function ClearRule() {
|
|
|
202
206
|
addruleShow = _useState12[0],
|
|
203
207
|
setAddruleshow = _useState12[1];
|
|
204
208
|
var handleAddRule = function handleAddRule() {
|
|
209
|
+
setRuleRowEdit(undefined);
|
|
205
210
|
setAddruleshow(true);
|
|
206
211
|
setEditStatus(false);
|
|
207
212
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
2
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
3
|
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
2
4
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
5
|
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
@@ -77,9 +79,6 @@ var AddFormulate = function AddFormulate(_ref) {
|
|
|
77
79
|
}
|
|
78
80
|
});
|
|
79
81
|
};
|
|
80
|
-
var handleSave = function handleSave() {
|
|
81
|
-
ruleForm.submit();
|
|
82
|
-
};
|
|
83
82
|
var _useState3 = useState([]),
|
|
84
83
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
85
84
|
dataSource = _useState4[0],
|
|
@@ -88,7 +87,19 @@ var AddFormulate = function AddFormulate(_ref) {
|
|
|
88
87
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
89
88
|
dataSourceItemEdit = _useState6[0],
|
|
90
89
|
setDataSoureItemEdit = _useState6[1];
|
|
91
|
-
var columns = [{
|
|
90
|
+
var columns = ruleRowView ? [{
|
|
91
|
+
title: '类型',
|
|
92
|
+
dataIndex: 'currentTypeName',
|
|
93
|
+
key: 'currentTypeName'
|
|
94
|
+
}, {
|
|
95
|
+
title: '原属性',
|
|
96
|
+
dataIndex: 'sourceValue',
|
|
97
|
+
key: 'sourceValue'
|
|
98
|
+
}, {
|
|
99
|
+
title: '清洗后属性',
|
|
100
|
+
dataIndex: 'targetValue',
|
|
101
|
+
key: 'targetValue'
|
|
102
|
+
}] : [{
|
|
92
103
|
title: '类型',
|
|
93
104
|
dataIndex: 'currentTypeName',
|
|
94
105
|
key: 'currentTypeName'
|
|
@@ -142,7 +153,7 @@ var AddFormulate = function AddFormulate(_ref) {
|
|
|
142
153
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
143
154
|
openRule = _useState10[0],
|
|
144
155
|
setOpenRule = _useState10[1];
|
|
145
|
-
var _useState11 = useState(
|
|
156
|
+
var _useState11 = useState(),
|
|
146
157
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
147
158
|
ruleList = _useState12[0],
|
|
148
159
|
setRuleList = _useState12[1];
|
|
@@ -161,6 +172,9 @@ var AddFormulate = function AddFormulate(_ref) {
|
|
|
161
172
|
//类型转换
|
|
162
173
|
if (detailRow.ruleType == 3) {
|
|
163
174
|
var _shuzhiArr$find;
|
|
175
|
+
if (!detailRow.sourceValue || !detailRow.targetValue) {
|
|
176
|
+
return str;
|
|
177
|
+
}
|
|
164
178
|
str = (_shuzhiArr$find = shuzhiArr.find(function (o) {
|
|
165
179
|
return o.value == (tag == 1 ? detailRow.sourceValue : detailRow.targetValue);
|
|
166
180
|
})) === null || _shuzhiArr$find === void 0 ? void 0 : _shuzhiArr$find.label;
|
|
@@ -194,6 +208,7 @@ var AddFormulate = function AddFormulate(_ref) {
|
|
|
194
208
|
ruleArr: detailData === null || detailData === void 0 ? void 0 : detailData.rinseShiftRuleDetails
|
|
195
209
|
});
|
|
196
210
|
var arr = detailData === null || detailData === void 0 ? void 0 : (_detailData$rinseShif = detailData.rinseShiftRuleDetails) === null || _detailData$rinseShif === void 0 ? void 0 : _detailData$rinseShif.map(function (o) {
|
|
211
|
+
var _shuzhiArr$find2, _shuzhiArr$find3;
|
|
197
212
|
return {
|
|
198
213
|
currentType: o.ruleType,
|
|
199
214
|
currentTypeName: typeArr.filter(function (j) {
|
|
@@ -201,6 +216,12 @@ var AddFormulate = function AddFormulate(_ref) {
|
|
|
201
216
|
})[0].label,
|
|
202
217
|
sourceValue: o.ruleType == 5 ? '' : typeValue(o, 1),
|
|
203
218
|
targetValue: typeValue(o, 2),
|
|
219
|
+
sourceValueId: o.ruleType == 3 && ((_shuzhiArr$find2 = shuzhiArr.find(function (j) {
|
|
220
|
+
return j.value == o.sourceValue;
|
|
221
|
+
})) === null || _shuzhiArr$find2 === void 0 ? void 0 : _shuzhiArr$find2.value),
|
|
222
|
+
targetValueId: o.ruleType == 3 && ((_shuzhiArr$find3 = shuzhiArr.find(function (j) {
|
|
223
|
+
return j.value == o.targetValue;
|
|
224
|
+
})) === null || _shuzhiArr$find3 === void 0 ? void 0 : _shuzhiArr$find3.value),
|
|
204
225
|
key: o.id
|
|
205
226
|
};
|
|
206
227
|
});
|
|
@@ -239,11 +260,61 @@ var AddFormulate = function AddFormulate(_ref) {
|
|
|
239
260
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
240
261
|
currentBizAttributeSelectorValue = _useState16[0],
|
|
241
262
|
setCurrentBizAttributeSelectorValue = _useState16[1];
|
|
263
|
+
// 判断是否都包含
|
|
264
|
+
var isAllTypeIncluded = function isAllTypeIncluded(arrA, arrB) {
|
|
265
|
+
// 边界处理:arrA 为空数组 → 默认全包含(无需要检查的 type)
|
|
266
|
+
if (!arrA || arrA.length === 0) return true;
|
|
267
|
+
// 边界处理:arrB 为空数组 → 不可能包含任何 type → 返回 false
|
|
268
|
+
if (!arrB || arrB.length === 0) return false;
|
|
269
|
+
// 步骤 1:提取 arrA 中所有不重复的 type(去重后检查更高效)
|
|
270
|
+
var arrATypes = new Set(arrA.map(function (item) {
|
|
271
|
+
return item;
|
|
272
|
+
})); // 去重,避免重复检查
|
|
273
|
+
// 步骤 2:提取 arrB 中所有的“有效对比值”(支持 arrB 是字符串数组或对象数组)
|
|
274
|
+
var arrBValues = new Set(arrB.map(function (item) {
|
|
275
|
+
// 若 arrB 元素是对象,取其 type 属性;若为字符串,直接用元素本身
|
|
276
|
+
return _typeof(item) === 'object' && item !== null ? item.currentType : item;
|
|
277
|
+
}));
|
|
278
|
+
// 步骤 3:检查 arrA 的每个 type 是否都在 arrB 的值中
|
|
279
|
+
var _iterator = _createForOfIteratorHelper(arrATypes),
|
|
280
|
+
_step;
|
|
281
|
+
try {
|
|
282
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
283
|
+
var type = _step.value;
|
|
284
|
+
if (!arrBValues.has(type)) {
|
|
285
|
+
return false; // 找到一个不包含的 type,直接返回 false
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
} catch (err) {
|
|
289
|
+
_iterator.e(err);
|
|
290
|
+
} finally {
|
|
291
|
+
_iterator.f();
|
|
292
|
+
}
|
|
293
|
+
return true; // 所有 type 都包含,返回 true
|
|
294
|
+
};
|
|
295
|
+
// 添加校验规则按钮禁用状态
|
|
296
|
+
var addBtndisabled = function addBtndisabled() {
|
|
297
|
+
var type = [1, 2, 3, 4];
|
|
298
|
+
// 查看数据时禁用按钮
|
|
299
|
+
if (ruleRowView) {
|
|
300
|
+
return true;
|
|
301
|
+
}
|
|
302
|
+
if (dataSource.length >= 1 && dataSource.find(function (j) {
|
|
303
|
+
return j.currentType == 5;
|
|
304
|
+
})) {
|
|
305
|
+
return true;
|
|
306
|
+
}
|
|
307
|
+
// 值类型也限制了
|
|
308
|
+
// if (isAllTypeIncluded(type, dataSource)) {
|
|
309
|
+
// return true;
|
|
310
|
+
// }
|
|
311
|
+
return false;
|
|
312
|
+
};
|
|
242
313
|
return /*#__PURE__*/React.createElement("div", {
|
|
243
314
|
className: "addRule"
|
|
244
315
|
}, /*#__PURE__*/React.createElement(Drawer, {
|
|
245
316
|
className: "addRuleForm",
|
|
246
|
-
title: /*#__PURE__*/React.createElement("div", null, detailData ? '修改自定义校验规则清洗' : '新建自定义校验规则清洗', /*#__PURE__*/React.createElement("div", {
|
|
317
|
+
title: /*#__PURE__*/React.createElement("div", null, ruleRowView ? '查看自定义校验规则清洗' : detailData ? '修改自定义校验规则清洗' : '新建自定义校验规则清洗', /*#__PURE__*/React.createElement("div", {
|
|
247
318
|
className: "drawerCloseIcon",
|
|
248
319
|
onClick: onClose
|
|
249
320
|
}, /*#__PURE__*/React.createElement(CloseOutlined, {
|
|
@@ -259,7 +330,9 @@ var AddFormulate = function AddFormulate(_ref) {
|
|
|
259
330
|
onClick: onClose
|
|
260
331
|
}, "\u53D6\u6D88"), ruleRowView === false && (/*#__PURE__*/React.createElement(Button, {
|
|
261
332
|
type: "primary",
|
|
262
|
-
onClick:
|
|
333
|
+
onClick: function onClick() {
|
|
334
|
+
return ruleForm.submit();
|
|
335
|
+
}
|
|
263
336
|
}, "\u786E\u5B9A"))))
|
|
264
337
|
}, /*#__PURE__*/React.createElement(Form, {
|
|
265
338
|
form: ruleForm,
|
|
@@ -309,7 +382,7 @@ var AddFormulate = function AddFormulate(_ref) {
|
|
|
309
382
|
width: '320px'
|
|
310
383
|
},
|
|
311
384
|
onChange: function onChange(value) {
|
|
312
|
-
setCurrentBizAttributeSelectorValue(JSON.parse(ruleList.find(function (o) {
|
|
385
|
+
setCurrentBizAttributeSelectorValue(JSON.parse(ruleList === null || ruleList === void 0 ? void 0 : ruleList.find(function (o) {
|
|
313
386
|
return o.ruleId == value;
|
|
314
387
|
}).extraMes));
|
|
315
388
|
},
|
|
@@ -330,9 +403,7 @@ var AddFormulate = function AddFormulate(_ref) {
|
|
|
330
403
|
onPointerEnterCapture: undefined,
|
|
331
404
|
onPointerLeaveCapture: undefined
|
|
332
405
|
}),
|
|
333
|
-
disabled:
|
|
334
|
-
return j.currentType == 5;
|
|
335
|
-
}) ? true : false,
|
|
406
|
+
disabled: addBtndisabled(),
|
|
336
407
|
type: "link",
|
|
337
408
|
onClick: function onClick() {
|
|
338
409
|
setOpenRule(true);
|
|
@@ -76,9 +76,9 @@ var AddRule = function AddRule(_ref) {
|
|
|
76
76
|
disabled: true
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
if (allDataSource === null || allDataSource === void 0 ? void 0 : allDataSource.find(function (k) {
|
|
79
|
+
if ((allDataSource === null || allDataSource === void 0 ? void 0 : allDataSource.find(function (k) {
|
|
80
80
|
return k.currentType == o.value;
|
|
81
|
-
})) {
|
|
81
|
+
})) && o.value != 1) {
|
|
82
82
|
return _objectSpread(_objectSpread({}, o), {}, {
|
|
83
83
|
disabled: true
|
|
84
84
|
});
|
|
@@ -118,6 +118,7 @@ var AddRule = function AddRule(_ref) {
|
|
|
118
118
|
errorTip = _useState8[0],
|
|
119
119
|
setErrorTip = _useState8[1]; // 值变换的提示信息
|
|
120
120
|
var handleSave = function handleSave() {
|
|
121
|
+
// 原表格值变换校验
|
|
121
122
|
if (hasDuplicate(dataSource).duplicateObjs.length >= 1) {
|
|
122
123
|
var resultaArr = hasDuplicate(dataSource).duplicateObjs;
|
|
123
124
|
var arr = dataSource.map(function (o) {
|
|
@@ -131,6 +132,7 @@ var AddRule = function AddRule(_ref) {
|
|
|
131
132
|
message.error('有原始值相同');
|
|
132
133
|
return;
|
|
133
134
|
}
|
|
135
|
+
// 原始值和目标值空值
|
|
134
136
|
if (dataSource.find(function (o) {
|
|
135
137
|
return !o.sourceValue;
|
|
136
138
|
}) || dataSource.find(function (o) {
|
|
@@ -144,6 +146,13 @@ var AddRule = function AddRule(_ref) {
|
|
|
144
146
|
var _SelectValueForm$getF = SelectValueForm.getFieldsValue(),
|
|
145
147
|
sourceValue = _SelectValueForm$getF.sourceValue,
|
|
146
148
|
targetValue = _SelectValueForm$getF.targetValue;
|
|
149
|
+
// 修改状态下 原始值不能相同
|
|
150
|
+
if (allDataSource === null || allDataSource === void 0 ? void 0 : allDataSource.find(function (o) {
|
|
151
|
+
return o.sourceValue == sourceValue && o.key != (oneRow === null || oneRow === void 0 ? void 0 : oneRow.key);
|
|
152
|
+
})) {
|
|
153
|
+
message.error('有原始值相同');
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
147
156
|
onSave({
|
|
148
157
|
key: oneRow === null || oneRow === void 0 ? void 0 : oneRow.key,
|
|
149
158
|
sourceValue: sourceValue,
|
|
@@ -332,7 +341,11 @@ var AddRule = function AddRule(_ref) {
|
|
|
332
341
|
setDataSoure(_toConsumableArray(arr));
|
|
333
342
|
return;
|
|
334
343
|
}
|
|
335
|
-
setDataSoure([].concat(_toConsumableArray(dataSource)
|
|
344
|
+
setDataSoure([].concat(_toConsumableArray(dataSource.map(function (o) {
|
|
345
|
+
return _objectSpread(_objectSpread({}, o), {}, {
|
|
346
|
+
status: 'success'
|
|
347
|
+
});
|
|
348
|
+
})), [{
|
|
336
349
|
key: getKey(),
|
|
337
350
|
sourceValue: '',
|
|
338
351
|
targetValue: '',
|
|
@@ -597,7 +610,7 @@ var AddRule = function AddRule(_ref) {
|
|
|
597
610
|
span: 19
|
|
598
611
|
},
|
|
599
612
|
initialValues: {
|
|
600
|
-
sourceValueId:
|
|
613
|
+
sourceValueId: undefined,
|
|
601
614
|
targetValueId: undefined
|
|
602
615
|
},
|
|
603
616
|
onFinish: onShuzhiFinish
|
|
@@ -609,6 +622,7 @@ var AddRule = function AddRule(_ref) {
|
|
|
609
622
|
message: '请选择属性原类型'
|
|
610
623
|
}]
|
|
611
624
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
625
|
+
defaultValue: currentBizAttributeSelectorValue === null || currentBizAttributeSelectorValue === void 0 ? void 0 : currentBizAttributeSelectorValue.type,
|
|
612
626
|
options: shuzhiArr,
|
|
613
627
|
disabled: true
|
|
614
628
|
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
@@ -84,7 +84,11 @@ var FormulateRule = function FormulateRule() {
|
|
|
84
84
|
onClick: function onClick() {
|
|
85
85
|
handleEdit(record.ruleId);
|
|
86
86
|
}
|
|
87
|
-
}, "\u7F16\u8F91")),
|
|
87
|
+
}, "\u7F16\u8F91")), /*#__PURE__*/React.createElement("a", {
|
|
88
|
+
onClick: function onClick() {
|
|
89
|
+
handleView(record.ruleId);
|
|
90
|
+
}
|
|
91
|
+
}, "\u67E5\u770B"), authority[170928557423] && (/*#__PURE__*/React.createElement(Button, {
|
|
88
92
|
type: "link",
|
|
89
93
|
disabled: record.status == 1,
|
|
90
94
|
onClick: function onClick() {
|
|
@@ -458,6 +462,7 @@ var FormulateRule = function FormulateRule() {
|
|
|
458
462
|
onClick: function onClick() {
|
|
459
463
|
setOpenAddDraw(true);
|
|
460
464
|
setDetailData(null);
|
|
465
|
+
setRuleRowEdit(undefined);
|
|
461
466
|
}
|
|
462
467
|
}, "\u521B\u5EFA\u6E05\u6D17\u8F6C\u6362\u4EFB\u52A1"))), /*#__PURE__*/React.createElement(Table, {
|
|
463
468
|
rowKey: "ruleId",
|
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.54",
|
|
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": "9ead8ae23d0760c49387a7f3074d22ca05cfa51b",
|
|
61
61
|
"gitHooks": {
|
|
62
62
|
"pre-commit": "lint-staged"
|
|
63
63
|
}
|