venus-design 1.0.87 → 1.0.89

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.
@@ -155,6 +155,9 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
155
155
  wfBaseCode: workflowcode,
156
156
  wfBaseName: workflowname
157
157
  }]);
158
+ form.setFieldsValue({
159
+ processDef: workflowcode
160
+ });
158
161
  }
159
162
  // 4. 处理 componentUrl
160
163
  if (_componentUrl) {
@@ -165,7 +168,7 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
165
168
  break;
166
169
  }
167
170
  _context.next = 20;
168
- return getWfTitle(wfTitleConfig, record);
171
+ return getWfTitle(wfTitleConfig, record.data);
169
172
  case 20:
170
173
  wfTitle = _context.sent;
171
174
  name = wfTitle;
@@ -209,25 +212,23 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
209
212
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
210
213
  while (1) switch (_context2.prev = _context2.next) {
211
214
  case 0:
212
- console.log(workflowcode);
213
215
  form.setFieldsValue({
214
216
  person: null
215
217
  });
216
218
  // 3. 查询审批人
217
- _context2.next = 4;
219
+ _context2.next = 3;
218
220
  return findByUserid(workflowcode, record);
219
- case 4:
221
+ case 3:
220
222
  userRes = _context2.sent;
221
223
  if (userRes !== null && userRes !== void 0 && userRes.success) {
222
- _context2.next = 8;
224
+ _context2.next = 7;
223
225
  break;
224
226
  }
225
227
  _message.error('查询候选人失败!');
226
228
  // setDefaultName(record, name);
227
229
  return _context2.abrupt("return");
228
- case 8:
230
+ case 7:
229
231
  _ref3 = (_userRes$data = userRes.data) !== null && _userRes$data !== void 0 ? _userRes$data : {}, rolename = _ref3.rolename, username = _ref3.username, selectType = _ref3.selectType;
230
- console.log(username);
231
232
  setuserdata(userRes.data);
232
233
  setSelectType(selectType);
233
234
 
@@ -245,7 +246,7 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
245
246
  }
246
247
  options.push.apply(options, _toConsumableArray(users));
247
248
  }
248
- case 15:
249
+ case 13:
249
250
  case "end":
250
251
  return _context2.stop();
251
252
  }
@@ -59,5 +59,4 @@ export declare const getColumnNumberSearchProps: (dataIndex: string) => {
59
59
  }) => React.JSX.Element;
60
60
  filterIcon: (filtered: boolean) => React.JSX.Element;
61
61
  onFilter: boolean;
62
- render: (text: string) => string;
63
62
  };
@@ -336,9 +336,7 @@ export var getColumnNumberSearchProps = function getColumnNumberSearchProps(data
336
336
  }
337
337
  }));
338
338
  },
339
- onFilter: true,
340
- render: function render(text) {
341
- return text;
342
- }
339
+ onFilter: true
340
+ // render: (text:string) => text
343
341
  };
344
342
  };
@@ -28,7 +28,7 @@ export var handleColumnFns = function handleColumnFns(columnList, showIndexColum
28
28
  dataIndex: "number",
29
29
  align: 'center',
30
30
  key: "number",
31
- width: 50,
31
+ width: (actions === null || actions === void 0 ? void 0 : actions.IndexColumnWidth) || 50,
32
32
  render: function render(text, record, index) {
33
33
  return "".concat((current - 1) * pageSize + (index + 1));
34
34
  }
@@ -100,7 +100,7 @@ var VenusTable = /*#__PURE__*/forwardRef(function (props, ref) {
100
100
  _useState8 = _slicedToArray(_useState7, 2),
101
101
  dataParam = _useState8[0],
102
102
  setdataParam = _useState8[1];
103
- var _useState9 = useState(pageInfoPagin || {
103
+ var _useState9 = useState(pageInfoPagin || props.defaultPageInfo || {
104
104
  current: 1,
105
105
  pageSize: 15
106
106
  }),
@@ -345,13 +345,21 @@ var VenusTable = /*#__PURE__*/forwardRef(function (props, ref) {
345
345
  //获取当前系统标识
346
346
  ownerApp = storage.getSessionItem("OWNER_APP");
347
347
  appPrefix = APP_PREFIXS[ownerApp.code];
348
- _context3.next = 4;
348
+ if (!(props.actions && props.actions.onUpdateFields)) {
349
+ _context3.next = 6;
350
+ break;
351
+ }
352
+ props.actions.onUpdateFields(value, fieldName, innerId);
353
+ _context3.next = 10;
354
+ break;
355
+ case 6:
356
+ _context3.next = 8;
349
357
  return updateFields({
350
358
  updateFieldValue: value,
351
359
  updateFieldName: fieldName,
352
360
  innerId: innerId
353
361
  }, props.apiPrefix || appPrefix, record.classId.toLowerCase());
354
- case 4:
362
+ case 8:
355
363
  res = _context3.sent;
356
364
  if (res && res.success) {
357
365
  //更新成功
@@ -359,10 +367,7 @@ var VenusTable = /*#__PURE__*/forwardRef(function (props, ref) {
359
367
  props.actions.updateFieldValueAfter(value, fieldName, innerId, record, res);
360
368
  }
361
369
  }
362
- /*if(props.actions&&props.actions.onUpdateFields){
363
- props.actions.onUpdateFields(value,fieldName,innerId);
364
- }*/
365
- case 6:
370
+ case 10:
366
371
  case "end":
367
372
  return _context3.stop();
368
373
  }
@@ -42,6 +42,7 @@ export default interface VenusTableType {
42
42
  exportFileName?: String;
43
43
  scroll?: any;
44
44
  alwaysShowAlert?: boolean;
45
+ defaultPageInfo?: any;
45
46
  key?: string;
46
47
  onChangeTable?: Function;
47
48
  filters?: VenusEnumType[];
@@ -15,7 +15,7 @@ function _updateFields() {
15
15
  return _regeneratorRuntime().wrap(function _callee$(_context) {
16
16
  while (1) switch (_context.prev = _context.next) {
17
17
  case 0:
18
- return _context.abrupt("return", request("".concat(urlPrefix, "/update/field"), {
18
+ return _context.abrupt("return", request("/".concat(urlPrefix, "/update/field"), {
19
19
  method: 'post',
20
20
  data: data,
21
21
  prefix: prefix
@@ -409,32 +409,32 @@ export var VENUS_TABLE_COLUMNRENDER_TYPE = {
409
409
  };
410
410
  },
411
411
  "renderStatus": function renderStatus(column, actions) {
412
- return function (text, record, _, action) {
413
- return [record.stateId == "DRAFT" ? /*#__PURE__*/React.createElement(_Badge, {
412
+ return function (text, record) {
413
+ return [text == "DRAFT" ? /*#__PURE__*/React.createElement(_Badge, {
414
414
  status: "success",
415
415
  text: text,
416
416
  style: {
417
417
  marginRight: 3
418
418
  }
419
- }) : record.stateId == "ADJUSTAPPROVAL" ? /*#__PURE__*/React.createElement(_Badge, {
419
+ }) : text == "ADJUSTAPPROVAL" ? /*#__PURE__*/React.createElement(_Badge, {
420
420
  status: "processing",
421
421
  text: text,
422
422
  style: {
423
423
  marginRight: 3
424
424
  }
425
- }) : record.stateId == "APPROVAL" ? /*#__PURE__*/React.createElement(_Badge, {
425
+ }) : text == "APPROVAL" ? /*#__PURE__*/React.createElement(_Badge, {
426
426
  status: "error",
427
427
  text: text,
428
428
  style: {
429
429
  marginRight: 3
430
430
  }
431
- }) : record.stateId == "COMPLETED" ? /*#__PURE__*/React.createElement(_Badge, {
431
+ }) : text == "COMPLETED" ? /*#__PURE__*/React.createElement(_Badge, {
432
432
  color: "rgb(0, 255, 119)",
433
433
  text: text,
434
434
  style: {
435
435
  marginRight: 3
436
436
  }
437
- }) : record.stateId == "DISAGREE" ? /*#__PURE__*/React.createElement(_Badge, {
437
+ }) : text == "DISAGREE" ? /*#__PURE__*/React.createElement(_Badge, {
438
438
  color: "rgb(255, 0, 30)",
439
439
  text: text,
440
440
  style: {
@@ -507,6 +507,11 @@ export var VENUS_TABLE_COLUMNRENDER_TYPE = {
507
507
  return /*#__PURE__*/React.createElement("span", null, text);
508
508
  }
509
509
  }
510
+ if (actions && actions.isEditCell) {
511
+ if (!actions.isEditCell(record.innerId, column.fieldId)) {
512
+ return /*#__PURE__*/React.createElement("span", null, text);
513
+ }
514
+ }
510
515
  var key = "".concat(record.innerId, "-").concat(column.fieldId);
511
516
  var editing = Boolean(actions.editingMap[key]);
512
517
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venus-design",
3
- "version": "1.0.87",
3
+ "version": "1.0.89",
4
4
  "description": "venus all compoments",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",