@steedos-widgets/amis-lib 6.10.32 → 6.10.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.
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +126 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +126 -11
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +120 -114
- package/dist/index.umd.js.map +1 -1
- package/dist/types/lib/objects.d.ts +1 -1
- package/dist/types/workflow/flow.d.ts +60 -0
- package/dist/types/workflow/nextSteps.d.ts +61 -0
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -10557,7 +10557,7 @@ function formatUISchemaCache(objectName, uiSchema){
|
|
|
10557
10557
|
});
|
|
10558
10558
|
}
|
|
10559
10559
|
|
|
10560
|
-
async function getUISchema(objectName, force, retry = true) {
|
|
10560
|
+
async function getUISchema(objectName, force = false, retry = true) {
|
|
10561
10561
|
if (!objectName) {
|
|
10562
10562
|
return;
|
|
10563
10563
|
}
|
|
@@ -17770,7 +17770,7 @@ const getApprovalDrawerSchema = async (instance, events) => {
|
|
|
17770
17770
|
},
|
|
17771
17771
|
]
|
|
17772
17772
|
};
|
|
17773
|
-
console.log(`getApprovalDrawerSchema: `, schema)
|
|
17773
|
+
// console.log(`getApprovalDrawerSchema: `, schema)
|
|
17774
17774
|
return schema;
|
|
17775
17775
|
};
|
|
17776
17776
|
|
|
@@ -18007,14 +18007,122 @@ const getInstanceApprovalHistory = async ()=>{
|
|
|
18007
18007
|
}
|
|
18008
18008
|
};
|
|
18009
18009
|
|
|
18010
|
-
|
|
18011
|
-
|
|
18012
|
-
|
|
18013
|
-
|
|
18014
|
-
|
|
18015
|
-
|
|
18016
|
-
|
|
18017
|
-
|
|
18010
|
+
const getStepsSchema = (instance) => {
|
|
18011
|
+
if(instance.box === 'draft' && instance.state === 'draft' && instance.flow.allow_select_step){
|
|
18012
|
+
const schema = {
|
|
18013
|
+
"type": "service",
|
|
18014
|
+
"id": "u:set_steps_users",
|
|
18015
|
+
"api": {
|
|
18016
|
+
"url": "/api/workflow/v2/nextSteps",
|
|
18017
|
+
"method": "post",
|
|
18018
|
+
"requestAdaptor": `
|
|
18019
|
+
const ctx = api.data.context;
|
|
18020
|
+
const formValues = context._scoped.getComponentById("instance_form").getValues();
|
|
18021
|
+
api.data = {
|
|
18022
|
+
flowVersionId: ctx.flowVersion._id,
|
|
18023
|
+
instanceId: ctx._id,
|
|
18024
|
+
flowId: ctx.flow._id,
|
|
18025
|
+
step: ctx.step,
|
|
18026
|
+
values: formValues
|
|
18027
|
+
};
|
|
18028
|
+
return api;
|
|
18029
|
+
`,
|
|
18030
|
+
"adaptor": `
|
|
18031
|
+
payload.stepIds = _.map(payload.nextSteps, '_id');
|
|
18032
|
+
return payload;
|
|
18033
|
+
`
|
|
18034
|
+
}
|
|
18035
|
+
,
|
|
18036
|
+
"body": [
|
|
18037
|
+
{
|
|
18038
|
+
"type": "table2",
|
|
18039
|
+
"source": "$nextSteps",
|
|
18040
|
+
"className": "set-next-steps-users my-4",
|
|
18041
|
+
"label": false,
|
|
18042
|
+
"needConfirm": false,
|
|
18043
|
+
"bordered": true,
|
|
18044
|
+
"title": "审批步骤",
|
|
18045
|
+
"quickSaveItemApi": {
|
|
18046
|
+
"url": "/api/workflow/v2/set_instance_steps",
|
|
18047
|
+
"method": "post",
|
|
18048
|
+
"requestAdaptor": `
|
|
18049
|
+
if(event && false){
|
|
18050
|
+
api.data = {
|
|
18051
|
+
instanceId: 'none'
|
|
18052
|
+
}
|
|
18053
|
+
}else{
|
|
18054
|
+
const ctx = api.data.context;
|
|
18055
|
+
api.data = {
|
|
18056
|
+
instanceId: ctx._id,
|
|
18057
|
+
stepId: context._id,
|
|
18058
|
+
selected: context.selected,
|
|
18059
|
+
handler: context.stepHandler
|
|
18060
|
+
};
|
|
18061
|
+
}
|
|
18062
|
+
|
|
18063
|
+
return api;
|
|
18064
|
+
`,
|
|
18065
|
+
"adaptor": `
|
|
18066
|
+
payload.stepIds = _.map(payload.nextSteps, '_id');
|
|
18067
|
+
return payload;
|
|
18068
|
+
`
|
|
18069
|
+
},
|
|
18070
|
+
// "rowSelection": {
|
|
18071
|
+
// "type": "checkbox",
|
|
18072
|
+
// "keyField": "id",
|
|
18073
|
+
// "checked": true,
|
|
18074
|
+
// "selected": true,
|
|
18075
|
+
// // "disableOn": "${allow_skip != true}",
|
|
18076
|
+
// "selectedRowKeysExpr": "${ARRAYINCLUDES(stepIds, id)}"
|
|
18077
|
+
// },
|
|
18078
|
+
"columns": [
|
|
18079
|
+
{
|
|
18080
|
+
"label": "选择",
|
|
18081
|
+
"name": "selected",
|
|
18082
|
+
"width": 50,
|
|
18083
|
+
"quickEdit": {
|
|
18084
|
+
"type": "checkbox",
|
|
18085
|
+
"mode": "inline",
|
|
18086
|
+
"id": "selected",
|
|
18087
|
+
"name": "selected",
|
|
18088
|
+
"saveImmediately": true,
|
|
18089
|
+
"value": true,
|
|
18090
|
+
"disabledOn": "${allow_skip != true}",
|
|
18091
|
+
}
|
|
18092
|
+
},
|
|
18093
|
+
{
|
|
18094
|
+
"label": "步骤名称",
|
|
18095
|
+
"name": "name",
|
|
18096
|
+
"quickEdit": false
|
|
18097
|
+
},
|
|
18098
|
+
{
|
|
18099
|
+
"label": "处理人",
|
|
18100
|
+
"name": "stepHandler",
|
|
18101
|
+
"quickEdit": {
|
|
18102
|
+
"type": "steedos-instance-handler",
|
|
18103
|
+
"mode": "inline",
|
|
18104
|
+
"id": "stepHandler",
|
|
18105
|
+
"name": "stepHandler",
|
|
18106
|
+
"saveImmediately": true
|
|
18107
|
+
}
|
|
18108
|
+
},
|
|
18109
|
+
// {
|
|
18110
|
+
// "label": "操作",
|
|
18111
|
+
// "name": "actions"
|
|
18112
|
+
// }
|
|
18113
|
+
]
|
|
18114
|
+
}
|
|
18115
|
+
]
|
|
18116
|
+
};
|
|
18117
|
+
return schema;
|
|
18118
|
+
}else {
|
|
18119
|
+
return {
|
|
18120
|
+
type: 'tpl',
|
|
18121
|
+
id: "u:set_steps_users",
|
|
18122
|
+
tpl: ''
|
|
18123
|
+
}
|
|
18124
|
+
}
|
|
18125
|
+
};
|
|
18018
18126
|
|
|
18019
18127
|
const getSelectOptions = (field) => {
|
|
18020
18128
|
const options = [];
|
|
@@ -19179,11 +19287,17 @@ const getFlowFormSchema = async (instance, box) => {
|
|
|
19179
19287
|
"componentId": "u:next_step",
|
|
19180
19288
|
"args": {}
|
|
19181
19289
|
},
|
|
19290
|
+
{
|
|
19291
|
+
"actionType": "reload",
|
|
19292
|
+
"componentId": "u:set_steps_users",
|
|
19293
|
+
"args": {}
|
|
19294
|
+
},
|
|
19182
19295
|
...changeEvents
|
|
19183
19296
|
]
|
|
19184
19297
|
}
|
|
19185
19298
|
}
|
|
19186
19299
|
},
|
|
19300
|
+
await getStepsSchema(instance),
|
|
19187
19301
|
await getInstanceApprovalHistory(),
|
|
19188
19302
|
await getApproveButton(instance, { submitEvents , nextStepInitedEvents, nextStepChangeEvents, nextStepUserChangeEvents})
|
|
19189
19303
|
],
|
|
@@ -19452,7 +19566,8 @@ const getInstanceInfo = async (props) => {
|
|
|
19452
19566
|
flow:flow__expand{
|
|
19453
19567
|
_id,
|
|
19454
19568
|
name,
|
|
19455
|
-
perms
|
|
19569
|
+
perms,
|
|
19570
|
+
allow_select_step
|
|
19456
19571
|
}
|
|
19457
19572
|
}
|
|
19458
19573
|
}
|