@zgfe/modules-dm 1.0.57-zhongyuan.50 → 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, tianchongArr, shuzhiArr } from './data';
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,
@@ -165,13 +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 && tag == 1) {
170
- var _tianchongArr$find;
171
- str = (_tianchongArr$find = tianchongArr.find(function (o) {
172
- return o.value == detailRow.sourceValue;
173
- })) === null || _tianchongArr$find === void 0 ? void 0 : _tianchongArr$find.label;
174
- }
175
168
  return str;
176
169
  };
177
170
  var getList = function getList() {
@@ -337,6 +330,9 @@ var AddFormulate = function AddFormulate(_ref) {
337
330
  onPointerEnterCapture: undefined,
338
331
  onPointerLeaveCapture: undefined
339
332
  }),
333
+ disabled: dataSource.length >= 1 && dataSource.find(function (j) {
334
+ return j.currentType == 5;
335
+ }) ? true : false,
340
336
  type: "link",
341
337
  onClick: function onClick() {
342
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
  })) {
@@ -69,7 +69,7 @@ var FormulateRule = function FormulateRule() {
69
69
  }, {
70
70
  title: '操作',
71
71
  key: 'action',
72
- width: 200,
72
+ width: 240,
73
73
  render: function render(_, record) {
74
74
  return /*#__PURE__*/React.createElement(Space, {
75
75
  size: "middle"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-dm",
3
- "version": "1.0.57-zhongyuan.50",
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": "e01d0f0851652d7b35f5a4745dd1fa87c68da2a3",
60
+ "gitHead": "ddc8627d0b8558799d6f38b50dac2bb42028d525",
61
61
  "gitHooks": {
62
62
  "pre-commit": "lint-staged"
63
63
  }