@steedos/standard-process-approval 3.0.0-beta.22 → 3.0.0-beta.24
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/objects/workflow-actions/workflow_rule.object.yml +25 -24
- package/main/default/pages/workflow_notifications_form.page.amis.json +47 -0
- package/main/default/pages/workflow_notifications_form.page.yml +13 -0
- package/main/default/pages/workflow_rule_form.page.amis.json +38 -0
- package/main/default/pages/workflow_rule_form.page.yml +13 -0
- package/main/default/triggers/process_instance_history.trigger.js +8 -1
- package/package.json +3 -3
|
@@ -116,40 +116,18 @@ fields:
|
|
|
116
116
|
group: time_dependent_action
|
|
117
117
|
amis:
|
|
118
118
|
showIndex: true
|
|
119
|
-
columns: ["
|
|
119
|
+
columns: ["date_field", "type", "number", "unit"]
|
|
120
120
|
time_triggers.$:
|
|
121
121
|
label: Field
|
|
122
122
|
blackbox: true
|
|
123
123
|
type: object
|
|
124
|
-
time_triggers.$.number:
|
|
125
|
-
label: 数值
|
|
126
|
-
type: number
|
|
127
|
-
scale: 0
|
|
128
|
-
required: true
|
|
129
|
-
time_triggers.$.unit:
|
|
130
|
-
label: 单位
|
|
131
|
-
type: select
|
|
132
|
-
options:
|
|
133
|
-
- label: 小时
|
|
134
|
-
value: hour
|
|
135
|
-
- label: 天
|
|
136
|
-
value: day
|
|
137
|
-
required: true
|
|
138
|
-
time_triggers.$.type:
|
|
139
|
-
label: 类型
|
|
140
|
-
type: select
|
|
141
|
-
options:
|
|
142
|
-
- label: 早于
|
|
143
|
-
value: earlier_than
|
|
144
|
-
- label: 晚于
|
|
145
|
-
value: later_than
|
|
146
|
-
required: true
|
|
147
124
|
time_triggers.$.date_field:
|
|
148
125
|
label: 日期字段
|
|
149
126
|
type: lookup
|
|
150
127
|
reference_to: object_fields
|
|
151
128
|
reference_to_field: name
|
|
152
129
|
enable_enhanced_lookup: false
|
|
130
|
+
required: true
|
|
153
131
|
depend_on:
|
|
154
132
|
- object_name
|
|
155
133
|
filtersFunction: !<tag:yaml.org,2002:js/function> |-
|
|
@@ -161,6 +139,29 @@ fields:
|
|
|
161
139
|
return ['_id', '=', 'no']
|
|
162
140
|
}
|
|
163
141
|
}
|
|
142
|
+
time_triggers.$.type:
|
|
143
|
+
label: 类型
|
|
144
|
+
type: select
|
|
145
|
+
options:
|
|
146
|
+
- label: 早于
|
|
147
|
+
value: earlier_than
|
|
148
|
+
- label: 晚于
|
|
149
|
+
value: later_than
|
|
150
|
+
required: true
|
|
151
|
+
time_triggers.$.number:
|
|
152
|
+
label: 数值
|
|
153
|
+
type: number
|
|
154
|
+
scale: 0
|
|
155
|
+
required: true
|
|
156
|
+
time_triggers.$.unit:
|
|
157
|
+
label: 单位
|
|
158
|
+
type: select
|
|
159
|
+
options:
|
|
160
|
+
- label: 小时
|
|
161
|
+
value: hour
|
|
162
|
+
- label: 天
|
|
163
|
+
value: day
|
|
164
|
+
required: true
|
|
164
165
|
time_triggers.$.updates_field_actions:
|
|
165
166
|
type: lookup
|
|
166
167
|
multiple: true
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "service",
|
|
3
|
+
"body": [
|
|
4
|
+
{
|
|
5
|
+
"type": "steedos-object-form",
|
|
6
|
+
"label": "对象表单",
|
|
7
|
+
"objectApiName": "workflow_notifications",
|
|
8
|
+
"recordId": "${recordId}",
|
|
9
|
+
"className": "",
|
|
10
|
+
"id": "u:b3d626885b90",
|
|
11
|
+
"enableTabs": false,
|
|
12
|
+
"mode": "edit",
|
|
13
|
+
"layout": "normal",
|
|
14
|
+
"tabsMode": "",
|
|
15
|
+
"fieldsExtend": {
|
|
16
|
+
"title": {
|
|
17
|
+
"amis": {
|
|
18
|
+
"type": "service",
|
|
19
|
+
"schemaApi": {
|
|
20
|
+
"method": "get",
|
|
21
|
+
"url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/${object_name}/fields/options",
|
|
22
|
+
"cache": 30000,
|
|
23
|
+
"adaptor": "const fields = context.uiSchema.fields;\nconst titleField = fields && fields.title;\nconst bodyField = fields && fields.body;\nconst variables = SteedosUI.getFormulaVariables(payload.data.options);\n var fieldSchema=[{\n label: titleField.label,\n type: 'input-formula',\n name: 'title',\n evalMode: false,\n variableMode: 'tabs',\n variables: variables,\n labelRemark: titleField.inlineHelpText,\n description: titleField.description\n}, {\n label: bodyField.label,\n type: 'input-formula',\n name: 'body',\n evalMode: false,\n variableMode: 'tabs',\n variables: variables,\n labelRemark: bodyField.inlineHelpText,\n description: bodyField.description\n}]\nreturn {...payload, data:fieldSchema};",
|
|
24
|
+
"trackExpression": "${object_name}",
|
|
25
|
+
"sendOn": "${object_name}",
|
|
26
|
+
"requestAdaptor": "",
|
|
27
|
+
"messages": {}
|
|
28
|
+
},
|
|
29
|
+
"dsType": "api",
|
|
30
|
+
"id": "u:508198dbfac7",
|
|
31
|
+
"initFetchSchema": true
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"body": {
|
|
35
|
+
"amis": {
|
|
36
|
+
"id": "u:18ca55507d93",
|
|
37
|
+
"hidden": true
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"data": {},
|
|
44
|
+
"name": "page_workflow_notifications_form",
|
|
45
|
+
"id": "u:35c197d6b61a",
|
|
46
|
+
"dsType": "api"
|
|
47
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: workflow_notifications_form
|
|
2
|
+
is_active: true
|
|
3
|
+
label: 消息提醒表单
|
|
4
|
+
locked: false
|
|
5
|
+
object_name: workflow_notifications
|
|
6
|
+
pageAssignments:
|
|
7
|
+
- type: orgDefault
|
|
8
|
+
page: workflow_notifications_form
|
|
9
|
+
desktop: true
|
|
10
|
+
mobile: true
|
|
11
|
+
render_engine: amis
|
|
12
|
+
type: form
|
|
13
|
+
widgets: []
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "service",
|
|
3
|
+
"body": [
|
|
4
|
+
{
|
|
5
|
+
"type": "steedos-object-form",
|
|
6
|
+
"label": "对象表单",
|
|
7
|
+
"objectApiName": "workflow_rule",
|
|
8
|
+
"recordId": "${recordId}",
|
|
9
|
+
"className": "",
|
|
10
|
+
"id": "u:b3d626885b90",
|
|
11
|
+
"enableTabs": false,
|
|
12
|
+
"mode": "edit",
|
|
13
|
+
"layout": "normal",
|
|
14
|
+
"tabsMode": "",
|
|
15
|
+
"fieldsExtend": {
|
|
16
|
+
"formula": {
|
|
17
|
+
"amis": {
|
|
18
|
+
"type": "service",
|
|
19
|
+
"schemaApi": {
|
|
20
|
+
"method": "get",
|
|
21
|
+
"url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/${object_name}/fields/options",
|
|
22
|
+
"cache": 30000,
|
|
23
|
+
"adaptor": "const field = context.uiSchema.fields.formula; const variables = SteedosUI.getFormulaVariables(payload.data.options); \n var fieldSchema={label: field.label, type:'input-formula', name: 'formula', 'evalMode': false, variableMode: 'tabs', variables: variables, labelRemark: field.inlineHelpText, description: field.description } \n return {...payload, data:fieldSchema};",
|
|
24
|
+
"trackExpression": "${object_name}",
|
|
25
|
+
"sendOn": "${object_name}"
|
|
26
|
+
},
|
|
27
|
+
"dsType": "api",
|
|
28
|
+
"id": "u:508198dbfac7"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"data": {},
|
|
35
|
+
"name": "page_workflow_rule_form",
|
|
36
|
+
"id": "u:a4758c8d4978",
|
|
37
|
+
"dsType": "api"
|
|
38
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: workflow_rule_form
|
|
2
|
+
is_active: true
|
|
3
|
+
label: 工作流规则表单
|
|
4
|
+
locked: false
|
|
5
|
+
object_name: workflow_rule
|
|
6
|
+
pageAssignments:
|
|
7
|
+
- type: orgDefault
|
|
8
|
+
page: workflow_rule_form
|
|
9
|
+
desktop: true
|
|
10
|
+
mobile: true
|
|
11
|
+
render_engine: amis
|
|
12
|
+
type: form
|
|
13
|
+
widgets: []
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 殷亮辉 yinlianghui@hotoa.com
|
|
3
|
+
* @Date: 2025-04-14 09:47:57
|
|
4
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
5
|
+
* @LastEditTime: 2025-04-29 11:24:43
|
|
6
|
+
*/
|
|
1
7
|
const _ = require("underscore");
|
|
2
8
|
const auth = require("@steedos/auth");
|
|
9
|
+
const steedosI18n = require("@steedos/i18n");
|
|
3
10
|
|
|
4
11
|
const getLng = async function(userId){
|
|
5
12
|
const userSession = await auth.getSessionByUserId(userId);
|
|
@@ -8,7 +15,7 @@ const getLng = async function(userId){
|
|
|
8
15
|
|
|
9
16
|
const getEmptyNodeTitle = async function(userId){
|
|
10
17
|
let lng = await getLng(userId);
|
|
11
|
-
return t('process_approval_empty_node_title', {}, lng);
|
|
18
|
+
return steedosI18n.t('process_approval_empty_node_title', {}, lng);
|
|
12
19
|
}
|
|
13
20
|
|
|
14
21
|
module.exports = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/standard-process-approval",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.24",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"steedos"
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@steedos/process": "3.0.0-beta.
|
|
13
|
+
"@steedos/process": "3.0.0-beta.24",
|
|
14
14
|
"nanoid": "^3.3.4"
|
|
15
15
|
},
|
|
16
16
|
"description": "steedos package",
|
|
17
17
|
"repository": {},
|
|
18
18
|
"license": "MIT",
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "3df12ff072b51e68b21089386fc9689e1ff8dd88"
|
|
20
20
|
}
|