@zgfe/modules-dm 1.0.57-zhongyuan.30 → 1.0.57-zhongyuan.32

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.
@@ -610,13 +610,11 @@ var TypeComponent = function TypeComponent(_ref2) {
610
610
  });
611
611
  break;
612
612
  case 6:
613
- Component = /*#__PURE__*/React.createElement(Select
614
- // defaultValue={Number(optionsValue.filter((r) => r.ruleType == type)[0].content)}
615
- , {
616
- // defaultValue={Number(optionsValue.filter((r) => r.ruleType == type)[0].content)}
617
- value: optionsValue.filter(function (r) {
613
+ Component = /*#__PURE__*/React.createElement(Select, {
614
+ defaultValue: Number(optionsValue.filter(function (r) {
618
615
  return r.ruleType == type;
619
- })[0].content,
616
+ })[0].content),
617
+ // value={optionsValue.filter((r) => r.ruleType == type)[0].content}
620
618
  placeholder: "\u9009\u62E9\u5B57\u5178\u89C4\u5219",
621
619
  options: dictList,
622
620
  onChange: function onChange(value) {
@@ -649,6 +649,7 @@ var TablePlus = function TablePlus(props) {
649
649
  };
650
650
  //解除绑定标签
651
651
  var delLabelRelation = function delLabelRelation(id, type) {
652
+ var fn = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};
652
653
  request(apis.dict.delLabelRelation, {
653
654
  method: 'post',
654
655
  data: {
@@ -661,9 +662,7 @@ var TablePlus = function TablePlus(props) {
661
662
  if ((res === null || res === void 0 ? void 0 : res.data) === 0) {
662
663
  message.error(res.msg);
663
664
  } else {
664
- message.success('修改成功');
665
- props.Refresh();
666
- state.updateEventMetas && state.updateEventMetas(); // 更新store
665
+ fn();
667
666
  }
668
667
  });
669
668
  };
@@ -1303,7 +1302,10 @@ var TablePlus = function TablePlus(props) {
1303
1302
  setBizTagShow(false);
1304
1303
  });
1305
1304
  } else {
1306
- delLabelRelation(eventData === null || eventData === void 0 ? void 0 : eventData.businessLabelId, 2);
1305
+ delLabelRelation(eventData === null || eventData === void 0 ? void 0 : eventData.businessLabelId, 2, function () {
1306
+ props.Refresh();
1307
+ state.updateEventMetas && state.updateEventMetas(); // 更新store
1308
+ });
1307
1309
  }
1308
1310
  },
1309
1311
  onCancel: function onCancel() {
@@ -1391,14 +1393,21 @@ var TablePlus = function TablePlus(props) {
1391
1393
  okText: "\u786E\u5B9A",
1392
1394
  open: triggeringShow,
1393
1395
  onOk: function onOk() {
1394
- updateEvent({
1395
- triggeringOccasion: triggeringInput,
1396
- triggerLabelId: triTagId
1397
- }, function () {
1398
- setTriggeringShow(false);
1399
- });
1400
- if (!triTagId) {
1401
- delLabelRelation(eventData === null || eventData === void 0 ? void 0 : eventData.triggerLabelId, 3);
1396
+ var onUpdateEvent = function onUpdateEvent() {
1397
+ updateEvent({
1398
+ triggeringOccasion: triggeringInput,
1399
+ triggerLabelId: triTagId
1400
+ }, function () {
1401
+ setTriggeringShow(false);
1402
+ });
1403
+ };
1404
+ //这个代表是解绑原来有id现在不传id
1405
+ if (!triTagId && (eventData === null || eventData === void 0 ? void 0 : eventData.triggerLabelId)) {
1406
+ delLabelRelation(eventData === null || eventData === void 0 ? void 0 : eventData.triggerLabelId, 3, function () {
1407
+ onUpdateEvent();
1408
+ });
1409
+ } else {
1410
+ onUpdateEvent();
1402
1411
  }
1403
1412
  },
1404
1413
  onCancel: function onCancel() {