@steedos-labs/plugin-workflow 3.0.0-beta.28 → 3.0.0-beta.30
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/main/default/client/object_workflows.client.js +8 -7
- package/main/default/manager/import.js +16 -1
- package/main/default/manager/index.js +2 -14
- package/main/default/manager/uuflowManagerForInitApproval.js +794 -0
- package/main/default/methods/trace_approve_cc.js +568 -0
- package/main/default/objectTranslations/instances.en/instances.en.objectTranslation.yml +212 -0
- package/main/default/objectTranslations/instances.zh-CN/instances.zh-CN.objectTranslation.yml +209 -0
- package/main/default/objects/flows/buttons/newimport.button.yml +2 -1
- package/main/default/objects/instances/buttons/instance_cc.button.yml +1 -1
- package/main/default/objects/instances/buttons/instance_save.button.yml +1 -1
- package/main/default/objects/instances/listviews/monitor.listview.yml +0 -1
- package/main/default/routes/api_cc.router.js +5 -12
- package/main/default/routes/api_get_object_workflows.router.js +79 -22
- package/main/default/routes/api_object_workflow_drafts.router.js +18 -19
- package/main/default/routes/api_workflow_instance_return.router.js +157 -166
- package/main/default/routes/flow_form_design.ejs +2 -0
- package/main/default/triggers/amis_form_design.trigger.js +1 -1
- package/main/default/utils/designerManager.js +1 -0
- package/package.json +2 -3
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
waitForThing(Builder, 'settings.context.user.authToken').then(function(){
|
|
2
|
+
Steedos.authRequest("/api/workflow/v2/get_object_workflows", {
|
|
3
|
+
type: 'get',
|
|
4
|
+
success: (data)=>{
|
|
5
|
+
window.Steedos.object_workflows = data;
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
})
|
|
@@ -295,6 +295,19 @@ async function objectWorkflow(spaceId, flowId, objectName, doc) {
|
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
+
// 如果没有name字段,则给name赋值code
|
|
299
|
+
function addFieldName(fields) {
|
|
300
|
+
return _.map(fields, function (f) {
|
|
301
|
+
if (!f.name && f.code) {
|
|
302
|
+
f.name = f.code;
|
|
303
|
+
}
|
|
304
|
+
if (f.type === 'section' || f.type === 'table') {
|
|
305
|
+
f.fields = addFieldName(f.fields);
|
|
306
|
+
}
|
|
307
|
+
return f;
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
|
|
298
311
|
async function workflow(uid, spaceId, form, enabled, company_id, options = {}) {
|
|
299
312
|
const { upgrade = false, formId: upgradeFormId, flowId: upgradeFlowId } = options;
|
|
300
313
|
const new_form_ids = [];
|
|
@@ -395,6 +408,8 @@ async function workflow(uid, spaceId, form, enabled, company_id, options = {}) {
|
|
|
395
408
|
form.modified = form.created;
|
|
396
409
|
form.modified_by = uid;
|
|
397
410
|
form.historys = [];
|
|
411
|
+
|
|
412
|
+
const fields = addFieldName(form.current?.fields || []);
|
|
398
413
|
|
|
399
414
|
form.current = {
|
|
400
415
|
_id: _makeNewID(),
|
|
@@ -404,7 +419,7 @@ async function workflow(uid, spaceId, form, enabled, company_id, options = {}) {
|
|
|
404
419
|
created_by: uid,
|
|
405
420
|
modified: new Date(),
|
|
406
421
|
modified_by: uid,
|
|
407
|
-
fields:
|
|
422
|
+
fields: fields,
|
|
408
423
|
form_script: form.current?.form_script || '',
|
|
409
424
|
name_forumla: form.current?.name_forumla || ''
|
|
410
425
|
};
|
|
@@ -1,22 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author: sunhaolin@hotoa.com
|
|
3
3
|
* @Date: 2022-12-20 14:49:06
|
|
4
|
-
* @LastEditors: sunhaolin@
|
|
5
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditors: 孙浩林 sunhaolin@steedos.com
|
|
5
|
+
* @LastEditTime: 2025-10-03 14:58:33
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
|
-
require('./approve_manager')
|
|
9
|
-
require('./export')
|
|
10
|
-
require('./flow_manager')
|
|
11
|
-
require('./form_manager')
|
|
12
|
-
require('./get_handlers_manager')
|
|
13
|
-
require('./import')
|
|
14
|
-
require('./instance_manager')
|
|
15
|
-
require('./permission_manager')
|
|
16
|
-
require('./push_manager')
|
|
17
|
-
require('./step_manager')
|
|
18
|
-
require('./uuflow_manager')
|
|
19
|
-
require('./workflow_manager')
|
|
20
8
|
|
|
21
9
|
module.exports = {
|
|
22
10
|
instance_tasks_manager: require('./instance_tasks_manager')
|