@zgfe/modules-settings 2.0.0-zhongyuan.32 → 2.0.0-zhongyuan.33

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.
@@ -202,7 +202,7 @@ var CreateDemand = function CreateDemand(props) {
202
202
  });
203
203
  };
204
204
  useEffect(function () {
205
- if (props.data.demand && (props === null || props === void 0 ? void 0 : props.data.demand.demandName)) {
205
+ if (props.data && props.data.demand && (props === null || props === void 0 ? void 0 : props.data.demand.demandName)) {
206
206
  setDemandName(props === null || props === void 0 ? void 0 : props.data.demand.demandName);
207
207
  setDemandDescribe(props === null || props === void 0 ? void 0 : props.data.demand.demandDescribe);
208
208
  setCompletionTime(moment(new Date(props === null || props === void 0 ? void 0 : props.data.demand.completionTime)));
@@ -324,6 +324,7 @@ var CreateDemand = function CreateDemand(props) {
324
324
  // type on单击事件 save保存 flow
325
325
  var onCreate = function onCreate() {
326
326
  var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'save';
327
+ var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
327
328
  if (!demandName) {
328
329
  message.warning('请填写需求名称');
329
330
  return;
@@ -349,8 +350,8 @@ var CreateDemand = function CreateDemand(props) {
349
350
  }),
350
351
  pointEventStatus: type != 'flow' ? pointEventInfo === null || pointEventInfo === void 0 ? void 0 : pointEventInfo.map(function (item) {
351
352
  return item.status;
352
- }) : [] //走流程不用传状态 状态会自动修改成0
353
- })
353
+ }) : []
354
+ }, data)
354
355
  }).then(function (res) {
355
356
  if ((res === null || res === void 0 ? void 0 : res.code) === '100000') {
356
357
  if (type == 'on') {
@@ -1075,7 +1076,6 @@ var CreateDemand = function CreateDemand(props) {
1075
1076
  shape: "round",
1076
1077
  className: "button",
1077
1078
  onClick: function onClick() {
1078
- setIsEdit(true);
1079
1079
  props.setIsShowSelectList && props.setIsShowSelectList(function (val) {
1080
1080
  setPointEventInfo(val.map(function (val) {
1081
1081
  return _objectSpread(_objectSpread({}, val), {}, {
@@ -1097,10 +1097,20 @@ var CreateDemand = function CreateDemand(props) {
1097
1097
  }, getLableValue(demandStatus, 'buttonName'))), isRead ? null : demandStatus == 2 && (/*#__PURE__*/React.createElement(Button, {
1098
1098
  className: "".concat(classPrefix, "-info-right-button forbiddenColor"),
1099
1099
  onClick: function onClick() {
1100
- setPointEventInfo(pointEventInfo ? pointEventInfo.filter(function (item) {
1101
- return selectedRowKeys.indexOf(item.id) == -1;
1102
- }) : []);
1103
- onCreate('save');
1100
+ var list = pointEventInfo === null || pointEventInfo === void 0 ? void 0 : pointEventInfo.map(function (item) {
1101
+ if (selectedRowKeys.indexOf(item.id) == -1) {
1102
+ pointEventInfo.slice(selectedRowKeys.indexOf(item.id));
1103
+ }
1104
+ });
1105
+ setPointEventInfo(list);
1106
+ onCreate('save', {
1107
+ pointEventIds: list.map(function (res) {
1108
+ return res.id;
1109
+ }),
1110
+ pointEventStatus: list.map(function (res) {
1111
+ return res.status;
1112
+ })
1113
+ });
1104
1114
  }
1105
1115
  }, "\u79FB\u9664")), isRead ? null : (demandStatus == 3 || demandStatus == 4) && (/*#__PURE__*/React.createElement(Button, {
1106
1116
  className: "".concat(classPrefix, "-info-right-button forbiddenColor"),
@@ -213,7 +213,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
213
213
  }
214
214
  }, {
215
215
  title: '操作',
216
- width: 260,
216
+ width: 270,
217
217
  fixed: 'right',
218
218
  render: function render(record) {
219
219
  return /*#__PURE__*/React.createElement(DealDom, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-settings",
3
- "version": "2.0.0-zhongyuan.32",
3
+ "version": "2.0.0-zhongyuan.33",
4
4
  "private": false,
5
5
  "module": "es/index.js",
6
6
  "typings": "es/index.d.ts",
@@ -67,7 +67,7 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "b4f7a3ec17a8918fbbefcf4719bacd097747c90d",
70
+ "gitHead": "4367b3551c9d444da0595648853393ad23f106d1",
71
71
  "gitHooks": {
72
72
  "pre-commit": "lint-staged"
73
73
  }