@steedos-labs/plugin-workflow 3.0.0-beta.13 → 3.0.0-beta.14
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
Steedos.authRequest("/api/workflow/v2/get_object_workflows", {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
1
|
+
// Steedos.authRequest("/api/workflow/v2/get_object_workflows", {
|
|
2
|
+
// type: 'get',
|
|
3
|
+
// success: (data)=>{
|
|
4
|
+
// window.Creator.object_workflows = data;
|
|
5
|
+
// Creator.dataInit.set(true);
|
|
6
|
+
// }
|
|
7
|
+
// });
|
|
@@ -631,7 +631,7 @@ actions:
|
|
|
631
631
|
"requestAdaptor": "\n var filters = [];\n var top = 1000;\n if(api.data.$term){\n filters = [[\"label\", \"contains\", api.data.$term]];\n }\n // else if(api.data.$value){\n // filters = [[\"_id\", \"=\", api.data.$value]];\n // }\n\n var fieldFilters = [\"enable_workflow\",\"=\",true];\n if(fieldFilters && fieldFilters.length){\n filters.push(fieldFilters);\n }\n\n const filtersFunction = undefined;\n\n if(filtersFunction){\n const _filters = filtersFunction(filters, api.data.$);\n if(_filters && _filters.length > 0){\n filters.push(_filters);\n }\n }\n var sort = \"\";\n api.data.query = api.data.query.replace(/{__filters}/g, JSON.stringify(filters)).replace('{__top}', top).replace('{__sort}', sort.trim());\n\n var defaultValue = api.data.$value;\n var optionsFiltersOp = \"=\";\n var optionsFilters = [[\"name\", optionsFiltersOp, []]];\n if (defaultValue && !api.data.$term) { \n // 字段值单独请求,没值的时候在请求中返回空\n optionsFilters = [[\"name\", optionsFiltersOp, defaultValue]];\n }\n api.data.query = api.data.query.replace(/{__options_filters}/g, JSON.stringify(optionsFilters));\n return api;\n "
|
|
632
632
|
},
|
|
633
633
|
"multiple": false
|
|
634
|
-
}
|
|
634
|
+
}
|
|
635
635
|
],
|
|
636
636
|
"api": {
|
|
637
637
|
"method": "post",
|
|
@@ -640,7 +640,7 @@ actions:
|
|
|
640
640
|
"&": "$$",
|
|
641
641
|
"space": "${spaceId}"
|
|
642
642
|
},
|
|
643
|
-
"requestAdaptor": "const {id, name, space
|
|
643
|
+
"requestAdaptor": "const {id, name, space} = api.body;var form = {\n id,\n name,\n space,\n is_valid: true,\n app: 'workflow',\n current: {\n id\n }\n\n};\nvar body = api.body;\nif (body.category) {\n form.category = body.category\n}\n\nlet companyId = body.company_id\nif (companyId) {\n form.company_id = companyId\n}\n\nif (body.object_name2) {\n form.object_name = body.object_name2\n}\n\napi.data = {\n Forms: [form]\n};\n\nconsole.log(`api`, api)\nreturn api;"
|
|
644
644
|
},
|
|
645
645
|
"onEvent": {
|
|
646
646
|
"submitSucc": {
|