@zgfe/modules-dm 1.0.57-zhongyuan.49 → 1.0.57-zhongyuan.51
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.
|
@@ -17,7 +17,7 @@ import AddRule from './addRule';
|
|
|
17
17
|
import request from '../../utils/ajax';
|
|
18
18
|
import apis from '../../constants/api';
|
|
19
19
|
import UseModal from '../CutsModal';
|
|
20
|
-
import { typeArr,
|
|
20
|
+
import { typeArr, shuzhiArr } from './data';
|
|
21
21
|
var TextArea = Input.TextArea;
|
|
22
22
|
var AddFormulate = function AddFormulate(_ref) {
|
|
23
23
|
var addruleShow = _ref.addruleShow,
|
|
@@ -157,7 +157,7 @@ var AddFormulate = function AddFormulate(_ref) {
|
|
|
157
157
|
tableParams = _useState14[0],
|
|
158
158
|
setTableParams = _useState14[1];
|
|
159
159
|
var typeValue = function typeValue(detailRow, tag) {
|
|
160
|
-
var str =
|
|
160
|
+
var str = tag == 1 ? detailRow.sourceValue : detailRow.targetValue;
|
|
161
161
|
//类型转换
|
|
162
162
|
if (detailRow.ruleType == 3) {
|
|
163
163
|
var _shuzhiArr$find;
|
|
@@ -165,14 +165,6 @@ var AddFormulate = function AddFormulate(_ref) {
|
|
|
165
165
|
return o.value == (tag == 1 ? detailRow.sourceValue : detailRow.targetValue);
|
|
166
166
|
})) === null || _shuzhiArr$find === void 0 ? void 0 : _shuzhiArr$find.label;
|
|
167
167
|
}
|
|
168
|
-
// 替换缺失值
|
|
169
|
-
if (detailRow.ruleType == 4) {
|
|
170
|
-
var _tianchongArr$find;
|
|
171
|
-
str = (_tianchongArr$find = tianchongArr.find(function (o) {
|
|
172
|
-
return o.value == detailRow.ruleType;
|
|
173
|
-
})) === null || _tianchongArr$find === void 0 ? void 0 : _tianchongArr$find.label;
|
|
174
|
-
}
|
|
175
|
-
str = tag == 1 ? detailRow.sourceValue : detailRow.targetValue;
|
|
176
168
|
return str;
|
|
177
169
|
};
|
|
178
170
|
var getList = function getList() {
|
|
@@ -338,6 +330,9 @@ var AddFormulate = function AddFormulate(_ref) {
|
|
|
338
330
|
onPointerEnterCapture: undefined,
|
|
339
331
|
onPointerLeaveCapture: undefined
|
|
340
332
|
}),
|
|
333
|
+
disabled: dataSource.length >= 1 && dataSource.find(function (j) {
|
|
334
|
+
return j.currentType == 5;
|
|
335
|
+
}) ? true : false,
|
|
341
336
|
type: "link",
|
|
342
337
|
onClick: function onClick() {
|
|
343
338
|
setOpenRule(true);
|
|
@@ -52,13 +52,30 @@ var AddRule = function AddRule(_ref) {
|
|
|
52
52
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
53
53
|
currentType = _useState4[0],
|
|
54
54
|
setCurrentType = _useState4[1];
|
|
55
|
-
// 值类型选择限制
|
|
55
|
+
// 值类型选择限制 选择替换为空值,其他规则选项禁用;选择其他规则后,替换为空值禁用 并且已经选过的也禁用
|
|
56
56
|
var _useState5 = useState(typeArr),
|
|
57
57
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
58
58
|
prohibitionType = _useState6[0],
|
|
59
59
|
setProhibitionType = _useState6[1];
|
|
60
60
|
useEffect(function () {
|
|
61
|
+
if (editStatus) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
61
64
|
var arr = prohibitionType === null || prohibitionType === void 0 ? void 0 : prohibitionType.map(function (o) {
|
|
65
|
+
if (allDataSource === null || allDataSource === void 0 ? void 0 : allDataSource.find(function (j) {
|
|
66
|
+
return j.currentType == 5;
|
|
67
|
+
})) {
|
|
68
|
+
return _objectSpread(_objectSpread({}, o), {}, {
|
|
69
|
+
disabled: true
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
if (allDataSource && (allDataSource === null || allDataSource === void 0 ? void 0 : allDataSource.length) >= 1 && (allDataSource === null || allDataSource === void 0 ? void 0 : allDataSource.find(function (j) {
|
|
73
|
+
return j.currentType != 5;
|
|
74
|
+
})) && o.value == 5) {
|
|
75
|
+
return _objectSpread(_objectSpread({}, o), {}, {
|
|
76
|
+
disabled: true
|
|
77
|
+
});
|
|
78
|
+
}
|
|
62
79
|
if (allDataSource === null || allDataSource === void 0 ? void 0 : allDataSource.find(function (k) {
|
|
63
80
|
return k.currentType == o.value;
|
|
64
81
|
})) {
|
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.51",
|
|
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": "ddc8627d0b8558799d6f38b50dac2bb42028d525",
|
|
61
61
|
"gitHooks": {
|
|
62
62
|
"pre-commit": "lint-staged"
|
|
63
63
|
}
|