@coding-flow/flow-pc-approval 0.0.35 → 0.0.37

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.
@@ -22,6 +22,10 @@ const OperatorSelectView = (props)=>{
22
22
  props.onChange(result);
23
23
  setVisible(false);
24
24
  };
25
+ const initialValues = props.options.reduce((acc, option)=>{
26
+ if (option.operators && option.operators.length > 0) acc[option.id] = option.operators.map((o)=>o.userId).join(',');
27
+ return acc;
28
+ }, {});
25
29
  return /*#__PURE__*/ jsx(Modal, {
26
30
  title: "请选择操作人",
27
31
  width: "40%",
@@ -38,9 +42,13 @@ const OperatorSelectView = (props)=>{
38
42
  form: form,
39
43
  onFinish: handleFinish,
40
44
  layout: "vertical",
41
- children: props.options.map((option)=>/*#__PURE__*/ jsx(Form.Item, {
45
+ initialValues: initialValues,
46
+ children: props.options.map((option)=>{
47
+ const rangeHint = option.operators && option.operators.length > 0 ? `可选:${option.operators.map((o)=>`${o.name}(${o.userId})`).join('、')}` : void 0;
48
+ return /*#__PURE__*/ jsx(Form.Item, {
42
49
  name: option.id,
43
50
  label: `${option.name} - 操作人`,
51
+ extra: rangeHint,
44
52
  rules: [
45
53
  {
46
54
  required: true,
@@ -50,7 +58,8 @@ const OperatorSelectView = (props)=>{
50
58
  children: /*#__PURE__*/ jsx(Input, {
51
59
  placeholder: "请输入操作人ID,多个用逗号分隔"
52
60
  })
53
- }, option.id))
61
+ }, option.id);
62
+ })
54
63
  })
55
64
  });
56
65
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coding-flow/flow-pc-approval",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "description": "flow-engine pc form approval components",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -39,15 +39,19 @@
39
39
  "dayjs": "^1.11.19",
40
40
  "immer": "^11.1.3",
41
41
  "react-redux": "^9.2.0",
42
- "@coding-flow/flow-core": "0.0.35",
43
- "@coding-flow/flow-icons": "0.0.35",
44
- "@coding-flow/flow-types": "0.0.35",
45
- "@coding-flow/flow-approval-presenter": "0.0.35",
46
- "@coding-flow/flow-pc-form": "0.0.35",
47
- "@coding-flow/flow-pc-ui": "0.0.35"
42
+ "@coding-flow/flow-core": "0.0.37",
43
+ "@coding-flow/flow-icons": "0.0.37",
44
+ "@coding-flow/flow-approval-presenter": "0.0.37",
45
+ "@coding-flow/flow-types": "0.0.37",
46
+ "@coding-flow/flow-pc-ui": "0.0.37",
47
+ "@coding-flow/flow-pc-form": "0.0.37"
48
48
  },
49
49
  "devDependencies": {
50
- "@coding-flow/flow-types": "0.0.35"
50
+ "@coding-flow/flow-types": "0.0.37",
51
+ "@coding-flow/flow-core": "0.0.37",
52
+ "@coding-flow/flow-approval-presenter": "0.0.37",
53
+ "@coding-flow/flow-pc-ui": "0.0.37",
54
+ "@coding-flow/flow-pc-form": "0.0.37"
51
55
  },
52
56
  "scripts": {
53
57
  "build": "rslib build",