@steedos-labs/plugin-workflow 3.0.0-beta.16 → 3.0.0-beta.18

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.
@@ -0,0 +1,211 @@
1
+ name: instance_tasks
2
+ label: Approval
3
+ description:
4
+ fields:
5
+ applicant:
6
+ label: Applicant
7
+ help:
8
+ description:
9
+ applicant_name:
10
+ label: Applicant Name
11
+ help:
12
+ description:
13
+ applicant_organization_name:
14
+ label: Applicant Organization Name
15
+ help:
16
+ description:
17
+ category:
18
+ label: Category
19
+ help:
20
+ description:
21
+ category_name:
22
+ label: Category Name
23
+ help:
24
+ description:
25
+ cost_time:
26
+ label: Cost Time
27
+ help:
28
+ description:
29
+ deadline:
30
+ label: Deadline
31
+ help:
32
+ description:
33
+ description:
34
+ label: Description
35
+ help:
36
+ description:
37
+ distribute_from_instance:
38
+ label: Distribute From Instance
39
+ help:
40
+ description:
41
+ due_date:
42
+ label: Due Date
43
+ help:
44
+ description:
45
+ extras:
46
+ label: Extras
47
+ help:
48
+ description:
49
+ finish_date:
50
+ label: Finished Date
51
+ help:
52
+ description:
53
+ flow:
54
+ label: Workflow
55
+ help:
56
+ description:
57
+ flow_name:
58
+ label: Workflow Name
59
+ help:
60
+ description:
61
+ form:
62
+ label: Form
63
+ help:
64
+ description:
65
+ forward_from_instance:
66
+ label: Forwarding source Instance
67
+ help:
68
+ description:
69
+ handler:
70
+ label: Handler
71
+ help:
72
+ description:
73
+ handler_name:
74
+ label: Handler Name
75
+ help:
76
+ description:
77
+ handler_organization:
78
+ label: Handler Organization
79
+ help:
80
+ description:
81
+ handler_organization_fullname:
82
+ label: Handler Organization FullName
83
+ help:
84
+ description:
85
+ handler_organization_name:
86
+ label: Handler Organization Name
87
+ help:
88
+ description:
89
+ instance:
90
+ label: Instance
91
+ help:
92
+ description:
93
+ instance_name:
94
+ label: Instance Title
95
+ help:
96
+ description:
97
+ instance_state:
98
+ label: Processing State
99
+ help:
100
+ options:
101
+ - label: Draft
102
+ value: draft
103
+ - label: Pending
104
+ value: pending
105
+ - label: Completed
106
+ value: completed
107
+ description:
108
+ is_archived:
109
+ label: Archived
110
+ help:
111
+ description:
112
+ is_error:
113
+ label: Error
114
+ help:
115
+ description:
116
+ is_finished:
117
+ label: Finished
118
+ help:
119
+ description:
120
+ is_latest_approve:
121
+ label: Is it the latest approval record of the same user in the same application form
122
+ help:
123
+ description:
124
+ is_read:
125
+ label: Read
126
+ help:
127
+ description:
128
+ keywords:
129
+ label: Keywords
130
+ help:
131
+ description:
132
+ next_steps.$.step:
133
+ label: Step
134
+ help:
135
+ description:
136
+ next_steps.$.users:
137
+ label: Step users
138
+ help:
139
+ description:
140
+ next_steps:
141
+ label: Next Step
142
+ help:
143
+ description:
144
+ read_date:
145
+ label: Read Date
146
+ help:
147
+ description:
148
+ remind_date:
149
+ label: Reminder time for urging
150
+ help:
151
+ description:
152
+ reminded_count:
153
+ label: The number of reminders for urging
154
+ help:
155
+ description:
156
+ sign_show:
157
+ label: Show Signature
158
+ help:
159
+ description:
160
+ start_date:
161
+ label: Start Date
162
+ help:
163
+ description:
164
+ step:
165
+ label: Step
166
+ help:
167
+ description:
168
+ step_name:
169
+ label: Step Name
170
+ help:
171
+ description:
172
+ submit_date:
173
+ label: Submit Date
174
+ help:
175
+ description:
176
+ submitter:
177
+ label: Submitter
178
+ help:
179
+ description:
180
+ submitter_name:
181
+ label: Submitter Name
182
+ help:
183
+ description:
184
+ trace:
185
+ label: Trace
186
+ help:
187
+ description:
188
+ type:
189
+ label:
190
+ help:
191
+ description:
192
+ user:
193
+ label: User
194
+ help:
195
+ description:
196
+ user_name:
197
+ label: User Name
198
+ help:
199
+ description:
200
+ values:
201
+ label: Form Values
202
+ help:
203
+ description:
204
+ listviews:
205
+ inbox:
206
+ label: Inbox
207
+ outbox:
208
+ label: Outbox
209
+ actions:
210
+ instance_new:
211
+ label: New
@@ -0,0 +1,211 @@
1
+ name: instance_tasks
2
+ label: 审批
3
+ description:
4
+ fields:
5
+ applicant:
6
+ label: 申请单申请人
7
+ help:
8
+ description:
9
+ applicant_name:
10
+ label: 申请单申请人姓名
11
+ help:
12
+ description:
13
+ applicant_organization_name:
14
+ label: 申请单申请人所属组织名称
15
+ help:
16
+ description:
17
+ category:
18
+ label: 分类
19
+ help:
20
+ description:
21
+ category_name:
22
+ label: 分类名称
23
+ help:
24
+ description:
25
+ cost_time:
26
+ label: 花费时间
27
+ help:
28
+ description:
29
+ deadline:
30
+ label: 催办截止时间
31
+ help:
32
+ description:
33
+ description:
34
+ label: 备注
35
+ help:
36
+ description:
37
+ distribute_from_instance:
38
+ label: 分发来源申请单
39
+ help:
40
+ description:
41
+ due_date:
42
+ label: 截止时间
43
+ help:
44
+ description:
45
+ extras:
46
+ label: Extras
47
+ help:
48
+ description:
49
+ finish_date:
50
+ label: 完成时间
51
+ help:
52
+ description:
53
+ flow:
54
+ label: 流程
55
+ help:
56
+ description:
57
+ flow_name:
58
+ label: 流程名称
59
+ help:
60
+ description:
61
+ form:
62
+ label: 表单
63
+ help:
64
+ description:
65
+ forward_from_instance:
66
+ label: 转发来源申请单
67
+ help:
68
+ description:
69
+ handler:
70
+ label: 实际处理人
71
+ help:
72
+ description:
73
+ handler_name:
74
+ label: 实际处理人姓名
75
+ help:
76
+ description:
77
+ handler_organization:
78
+ label: 实际处理人所属组织
79
+ help:
80
+ description:
81
+ handler_organization_fullname:
82
+ label: 实际处理人所属组织全称
83
+ help:
84
+ description:
85
+ handler_organization_name:
86
+ label: 实际处理人所属组织名称
87
+ help:
88
+ description:
89
+ instance:
90
+ label: 申请单
91
+ help:
92
+ description:
93
+ instance_name:
94
+ label: 文件标题
95
+ help:
96
+ description:
97
+ instance_state:
98
+ label: 申请单状态
99
+ help:
100
+ options:
101
+ - label: 草稿
102
+ value: draft
103
+ - label: 进行中
104
+ value: pending
105
+ - label: 已完成
106
+ value: completed
107
+ description:
108
+ is_archived:
109
+ label: 是否已归档
110
+ help:
111
+ description:
112
+ is_error:
113
+ label: 是否报错
114
+ help:
115
+ description:
116
+ is_finished:
117
+ label: 是否已完成
118
+ help:
119
+ description:
120
+ is_latest_approve:
121
+ label: 是否是同一个用户在同一个申请单中最新的审批记录
122
+ help:
123
+ description:
124
+ is_read:
125
+ label: 已读
126
+ help:
127
+ description:
128
+ keywords:
129
+ label: 关键字
130
+ help:
131
+ description:
132
+ next_steps.$.step:
133
+ label: 步骤
134
+ help:
135
+ description:
136
+ next_steps.$.users:
137
+ label: 步骤处理人
138
+ help:
139
+ description:
140
+ next_steps:
141
+ label: 下一步
142
+ help:
143
+ description:
144
+ read_date:
145
+ label: 已读时间
146
+ help:
147
+ description:
148
+ remind_date:
149
+ label: 催办提醒时间
150
+ help:
151
+ description:
152
+ reminded_count:
153
+ label: 催办提醒次数
154
+ help:
155
+ description:
156
+ sign_show:
157
+ label: 显示签名
158
+ help:
159
+ description:
160
+ start_date:
161
+ label: 开始时间
162
+ help:
163
+ description:
164
+ step:
165
+ label: 步骤
166
+ help:
167
+ description:
168
+ step_name:
169
+ label: 步骤名称
170
+ help:
171
+ description:
172
+ submit_date:
173
+ label: 提交时间
174
+ help:
175
+ description:
176
+ submitter:
177
+ label: 申请单提交人
178
+ help:
179
+ description:
180
+ submitter_name:
181
+ label: 提交人姓名
182
+ help:
183
+ description:
184
+ trace:
185
+ label: Trace
186
+ help:
187
+ description:
188
+ type:
189
+ label:
190
+ help:
191
+ description:
192
+ user:
193
+ label: 处理人
194
+ help:
195
+ description:
196
+ user_name:
197
+ label: 处理人姓名
198
+ help:
199
+ description:
200
+ values:
201
+ label: 表单内容
202
+ help:
203
+ description:
204
+ listviews:
205
+ inbox:
206
+ label: 待审批
207
+ outbox:
208
+ label: 已审批
209
+ actions:
210
+ instance_new:
211
+ label: 新建
@@ -5,7 +5,7 @@ amis_schema: |-
5
5
  "body": [
6
6
  {
7
7
  "type": "button",
8
- "label": "新建",
8
+ "label": "${'CustomAction.instances.instance_new' | t}",
9
9
  "id": "u:instance_new",
10
10
  "level": "primary",
11
11
  "className": "instance-new-btn",
@@ -16,7 +16,7 @@ amis_schema: |-
16
16
  "actionType": "dialog",
17
17
  "dialog": {
18
18
  "type": "dialog",
19
- "title": "请选择流程",
19
+ "title": "${'CustomLabels.instance_action_new_dialog_title' | t}",
20
20
  "body": [
21
21
  {
22
22
  "type": "steedos-select-flow",
@@ -5,7 +5,7 @@ amis_schema: |-
5
5
  "body": [
6
6
  {
7
7
  "type": "button",
8
- "label": "传阅",
8
+ "label": "${'CustomAction.instances.instance_cc' | t}",
9
9
  "id": "u:instance_cc",
10
10
  "className": " ",
11
11
  "onEvent": {
@@ -18,12 +18,12 @@ amis_schema: |-
18
18
  "title": {
19
19
  "type": "tpl",
20
20
  "id": "u:0bce3c33b6e5",
21
- "tpl": "<p>传阅<a href=\"https://www.steedos.cn/docs/user/workflow#%E5%A6%82%E4%BD%95%E4%BC%A0%E9%98%85\" target=\"_blank\" rel=\"noopener\"> ?&nbsp;</a></p>"
21
+ "tpl": "<p>${'CustomAction.instances.instance_cc' | t}<a href=\"https://www.steedos.cn/docs/user/workflow#%E5%A6%82%E4%BD%95%E4%BC%A0%E9%98%85\" target=\"_blank\" rel=\"noopener\"> ?&nbsp;</a></p>"
22
22
  },
23
23
  "body": [
24
24
  {
25
25
  "type": "tpl",
26
- "tpl": "<p>当前步骤: ${record.step.name}</p>",
26
+ "tpl": "<p>${'CustomLabels.instance_action_instance_cc_dialog_title_prefix' | t}${record.step.name}</p>",
27
27
  "inline": false,
28
28
  "id": "u:11bcfab80ce9",
29
29
  "className": "m-b-sm"
@@ -35,7 +35,7 @@ amis_schema: |-
35
35
  "body": [
36
36
  {
37
37
  "type": "steedos-select-user",
38
- "label": "传阅对象",
38
+ "label": "${'CustomLabels.instance_action_instance_cc_dialog_field_users' | t}",
39
39
  "name": "users",
40
40
  "id": "u:c3ad733db360",
41
41
  "multiple": true,
@@ -44,7 +44,7 @@ amis_schema: |-
44
44
  },
45
45
  {
46
46
  "type": "textarea",
47
- "label": "传阅说明",
47
+ "label": "${'CustomLabels.instance_action_instance_cc_dialog_field_description' | t}",
48
48
  "name": "description",
49
49
  "id": "u:1dc7e49e6e7d",
50
50
  "minRows": 3,
@@ -97,7 +97,7 @@ amis_schema: |-
97
97
  "actions": [
98
98
  {
99
99
  "type": "button",
100
- "label": "取消",
100
+ "label": "${'Cancel' | t}",
101
101
  "onEvent": {
102
102
  "click": {
103
103
  "actions": [
@@ -113,7 +113,7 @@ amis_schema: |-
113
113
  },
114
114
  {
115
115
  "type": "button",
116
- "label": "确定",
116
+ "label": "${'OK' | t}",
117
117
  "onEvent": {
118
118
  "click": {
119
119
  "actions": [
@@ -5,7 +5,7 @@ amis_schema: |-
5
5
  "body": [
6
6
  {
7
7
  "type": "button",
8
- "label": "删除",
8
+ "label": "${'CustomAction.instances.instance_delete' | t}",
9
9
  "id": "u:instance_delete",
10
10
  "onEvent": {
11
11
  "click": {
@@ -57,7 +57,7 @@ amis_schema: |-
57
57
  "weight": 0
58
58
  }
59
59
  },
60
- "confirmText": "确认要删除吗?",
60
+ "confirmText": "${'CustomLabels.confirm_delete' | t}",
61
61
  "hiddenOn": "!((record.box == 'draft' || record.box == 'monitor') \n && (context.user.is_space_admin \n || (_.includes(record.flow.perms.users_can_admin, context.user.userId) \n || _.intersection(record.flow.perms.orgs_can_admin, context.user.organizations_parents) > 0)\n ) \n || (record.box == 'inbox' && record.state == 'draft' && record.forward_from_instance))"
62
62
  }
63
63
  ],
@@ -5,7 +5,7 @@ amis_schema: |-
5
5
  "body": [
6
6
  {
7
7
  "type": "button",
8
- "label": "删除",
8
+ "label": "${'CustomAction.instances.instance_delete_many' | t}",
9
9
  "id": "u:instance_delete_many",
10
10
  "editorState": "default",
11
11
  "onEvent": {
@@ -14,7 +14,7 @@ amis_schema: |-
14
14
  "actions": [
15
15
  {
16
16
  "actionType": "custom",
17
- "script": "/* 自定义JS使用说明:\n * 1.动作执行函数doAction,可以执行所有类型的动作\n * 2.通过上下文对象context可以获取当前组件实例,例如context.props可以获取该组件相关属性\n * 3.事件对象event,在doAction之后执行event.stopPropagation();可以阻止后续动作执行\n*/\n\nconst uiSchema = event.data.uiSchema;\nconst objectName = event.data.objectName;\nconst listViewRef = event.context.scoped.getComponentById(\"listview_\" + objectName);\nconst selectedItems = listViewRef && listViewRef.props.store.toJSON().selectedItems || [];\nevent.data.selectedIds = _.map(selectedItems, uiSchema.idFieldName || '_id');\nconsole.log(selectedItems);\nif (selectedItems.length === 0) {\n doAction({ actionType: 'toast', args: { msg: '请至少选择一条记录' } });\n event.stopPropagation();\n};\n"
17
+ "script": "/* 自定义JS使用说明:\n * 1.动作执行函数doAction,可以执行所有类型的动作\n * 2.通过上下文对象context可以获取当前组件实例,例如context.props可以获取该组件相关属性\n * 3.事件对象event,在doAction之后执行event.stopPropagation();可以阻止后续动作执行\n*/\n\nconst uiSchema = event.data.uiSchema;\nconst objectName = event.data.objectName;\nconst listViewRef = event.context.scoped.getComponentById(\"listview_\" + objectName);\nconst selectedItems = listViewRef && listViewRef.props.store.toJSON().selectedItems || [];\nevent.data.selectedIds = _.map(selectedItems, uiSchema.idFieldName || '_id');\nconsole.log(selectedItems);\nif (selectedItems.length === 0) {\n doAction({ actionType: 'toast', args: { msg: t('CustomLabels.instance_action_delete_many_msg_not_select') } });\n event.stopPropagation();\n};\n"
18
18
  },
19
19
  {
20
20
  "actionType": "dialog",
@@ -11,7 +11,7 @@ amis_schema: |-
11
11
  "body": [
12
12
  {
13
13
  "type": "button",
14
- "label": "分发",
14
+ "label": "${'CustomAction.instances.instance_distribute' | t}",
15
15
  "id": "u:instance_distribute",
16
16
  "className": " ",
17
17
  "onEvent": {
@@ -26,12 +26,12 @@ amis_schema: |-
26
26
  "title": {
27
27
  "type": "tpl",
28
28
  "id": "u:0bce3c33b6e5",
29
- "tpl": "<p>分发<a href=\"https://www.steedos.cn/docs/user/workflow#%E5%A6%82%E4%BD%95%E5%88%86%E5%8F%91\" target=\"_blank\" rel=\"noopener\"> ?&nbsp;</a></p>"
29
+ "tpl": "<p>${'CustomAction.instances.instance_distribute' | t}<a href=\"https://www.steedos.cn/docs/user/workflow#%E5%A6%82%E4%BD%95%E5%88%86%E5%8F%91\" target=\"_blank\" rel=\"noopener\"> ?&nbsp;</a></p>"
30
30
  },
31
31
  "body": [
32
32
  {
33
33
  "type": "tpl",
34
- "tpl": "<p>将当前选中的文件分发到新的流程,继续执行审批操作</p>",
34
+ "tpl": "<p>${'CustomLabels.instance_action_instance_distribute_dialog_sub_title' | t}</p>",
35
35
  "inline": false,
36
36
  "id": "u:11bcfab80ce9",
37
37
  "className": "m-b-sm"
@@ -43,7 +43,7 @@ amis_schema: |-
43
43
  "body": [
44
44
  {
45
45
  "type": "steedos-select-flow",
46
- "label": "流程名称",
46
+ "label": "${'CustomLabels.instance_action_instance_distribute_dialog_field_process' | t}",
47
47
  "name": "flow_id",
48
48
  "id": "instanceForwardFlow",
49
49
  "multiple": false,
@@ -124,7 +124,7 @@ amis_schema: |-
124
124
  },
125
125
  {
126
126
  "type": "steedos-select-user",
127
- "label": "分发对象",
127
+ "label": "${'CustomLabels.instance_action_instance_distribute_dialog_field_users' | t}",
128
128
  "name": "users",
129
129
  "id": "u:c3ad733db365",
130
130
  "multiple": true,
@@ -133,7 +133,7 @@ amis_schema: |-
133
133
  },
134
134
  {
135
135
  "type": "steedos-select-user",
136
- "label": "分发对象",
136
+ "label": "${'CustomLabels.instance_action_instance_distribute_dialog_field_users' | t}",
137
137
  "name": "users",
138
138
  "id": "u:c3ad733db360",
139
139
  "multiple": true,
@@ -163,7 +163,7 @@ amis_schema: |-
163
163
  },
164
164
  {
165
165
  "type": "textarea",
166
- "label": "备注",
166
+ "label": "${'CustomLabels.instance_action_instance_distribute_dialog_field_description' | t}",
167
167
  "name": "description",
168
168
  "id": "u:1dc7e49e6e7d",
169
169
  "minRows": 3,
@@ -173,21 +173,21 @@ amis_schema: |-
173
173
  "type": "checkbox",
174
174
  "name": "instance_distribute_to_self",
175
175
  "id": "u:da17af0371f82",
176
- "option": "同时分发给自己",
176
+ "option": "${'CustomLabels.instance_action_instance_distribute_dialog_field_to_self' | t}",
177
177
  "hiddenOn": "${distribute_to_self != true}"
178
178
  },
179
179
  {
180
180
  "type": "checkbox",
181
181
  "name": "saveInstanceToAttachment",
182
182
  "id": "u:da17af0371f8",
183
- "option": "将原表单存储为附件",
183
+ "option": "${'CustomLabels.instance_action_instance_distribute_dialog_field_to_attachment' | t}",
184
184
  "hidden": true
185
185
  },
186
186
  {
187
187
  "type": "checkbox",
188
188
  "name": "instance_related",
189
189
  "id": "u:da17af0371f9",
190
- "option": "自动创建关联文件",
190
+ "option": "${'CustomLabels.instance_action_instance_distribute_dialog_field_related' | t}",
191
191
  "hiddenOn": "${enable_distribute_instance_related != true}"
192
192
  }
193
193
  ],
@@ -252,7 +252,7 @@ amis_schema: |-
252
252
  "actions": [
253
253
  {
254
254
  "type": "button",
255
- "label": "取消",
255
+ "label": "${'Cancel' | t}",
256
256
  "onEvent": {
257
257
  "click": {
258
258
  "actions": [
@@ -268,7 +268,7 @@ amis_schema: |-
268
268
  },
269
269
  {
270
270
  "type": "button",
271
- "label": "确定",
271
+ "label": "${'OK' | t}",
272
272
  "onEvent": {
273
273
  "click": {
274
274
  "actions": [
@@ -34,5 +34,5 @@ is_enable: true
34
34
  label: 流程图
35
35
  'on': record_only
36
36
  type: amis_button
37
- visible: true
37
+ visible: false
38
38
  sort: 180
@@ -5,7 +5,7 @@ amis_schema: |-
5
5
  "body": [
6
6
  {
7
7
  "type": "button",
8
- "label": "转发",
8
+ "label": "${'CustomAction.instances.instance_forward' | t}",
9
9
  "id": "u:instance_forward",
10
10
  "onEvent": {
11
11
  "click": {
@@ -17,12 +17,12 @@ amis_schema: |-
17
17
  "title": {
18
18
  "type": "tpl",
19
19
  "id": "u:4733f85da58b",
20
- "tpl": "<p>转发&nbsp;<a href=\"https://www.steedos.cn/docs/user/workflow#%E5%A6%82%E4%BD%95%E8%BD%AC%E5%8F%91\" target=\"_blank\" rel=\"noopener\">?</a></p>"
20
+ "tpl": "<p>${'CustomAction.instances.instance_forward' | t}&nbsp;<a href=\"https://www.steedos.cn/docs/user/workflow#%E5%A6%82%E4%BD%95%E8%BD%AC%E5%8F%91\" target=\"_blank\" rel=\"noopener\">?</a></p>"
21
21
  },
22
22
  "body": [
23
23
  {
24
24
  "type": "tpl",
25
- "tpl": "<div class=\"box-title\">将当前选中的文件转发到新的流程,继续执行审批操作</div>",
25
+ "tpl": "<div class=\"box-title\">${'CustomLabels.instance_action_instance_cc_dialog_sub_title' | t}</div>",
26
26
  "inline": false,
27
27
  "id": "u:cf94d83ee7a8",
28
28
  "className": "m-b-sm"
@@ -33,7 +33,7 @@ amis_schema: |-
33
33
  "title": "表单",
34
34
  "body": [
35
35
  {
36
- "label": "流程名称",
36
+ "label": "${'CustomLabels.instance_action_instance_distribute_dialog_field_process' | t}",
37
37
  "type": "steedos-select-flow",
38
38
  "mode": "tree-select",
39
39
  "name": "flow_id",
@@ -47,7 +47,7 @@ amis_schema: |-
47
47
  },
48
48
  {
49
49
  "type": "textarea",
50
- "label": "备注",
50
+ "label": "${'CustomLabels.instance_action_instance_distribute_dialog_field_description' | t}",
51
51
  "name": "description",
52
52
  "id": "u:bb3fcb0c4e8c",
53
53
  "minRows": 3,
@@ -57,7 +57,7 @@ amis_schema: |-
57
57
  "type": "checkbox",
58
58
  "name": "hasSaveInstanceToAttachment",
59
59
  "id": "u:da17af0371f8",
60
- "option": "将原表单存储为附件",
60
+ "option": "${'CustomLabels.instance_action_instance_distribute_dialog_field_to_attachment' | t}",
61
61
  "hidden": true
62
62
  }
63
63
  ],
@@ -100,7 +100,7 @@ amis_schema: |-
100
100
  "actions": [
101
101
  {
102
102
  "type": "button",
103
- "label": "取消",
103
+ "label": "${'Cancel' | t}",
104
104
  "onEvent": {
105
105
  "click": {
106
106
  "actions": [
@@ -116,7 +116,7 @@ amis_schema: |-
116
116
  },
117
117
  {
118
118
  "type": "button",
119
- "label": "确定",
119
+ "label": "${'OK' | t}",
120
120
  "onEvent": {
121
121
  "click": {
122
122
  "actions": [
@@ -5,7 +5,7 @@ amis_schema: |-
5
5
  "body": [
6
6
  {
7
7
  "type": "button",
8
- "label": "新建",
8
+ "label": "${'CustomAction.instances.instance_new' | t}",
9
9
  "level": "primary",
10
10
  "id": "u:instance_new",
11
11
  "className": "instance-new-btn",
@@ -16,7 +16,7 @@ amis_schema: |-
16
16
  "actionType": "dialog",
17
17
  "dialog": {
18
18
  "type": "dialog",
19
- "title": "请选择流程",
19
+ "title": "${'CustomLabels.instance_action_new_dialog_title' | t}",
20
20
  "body": [
21
21
  {
22
22
  "type": "steedos-select-flow",
@@ -5,7 +5,7 @@ amis_schema: |-
5
5
  "body": [
6
6
  {
7
7
  "type": "button",
8
- "label": "关联文件",
8
+ "label": "${'CustomAction.instances.instance_related' | t}",
9
9
  "id": "u:instance_link",
10
10
  "onEvent": {
11
11
  "click": {
@@ -14,7 +14,7 @@ amis_schema: |-
14
14
  "actionType": "dialog",
15
15
  "dialog": {
16
16
  "type": "dialog",
17
- "title": "关联文件",
17
+ "title": "${'CustomAction.instances.instance_related' | t}",
18
18
  "body": [
19
19
  {
20
20
  "type": "form",
@@ -5,7 +5,7 @@ amis_schema: |-
5
5
  "body": [
6
6
  {
7
7
  "type": "button",
8
- "label": "保存",
8
+ "label": "${'CustomAction.instances.instance_save' | t}",
9
9
  "id": "u:instance_save",
10
10
  "className": " ",
11
11
  "onEvent": {
@@ -5,7 +5,7 @@ amis_schema: |-
5
5
  "body": [
6
6
  {
7
7
  "type": "button",
8
- "label": "发送",
8
+ "label": "${'CustomAction.instances.instance_submit' | t}",
9
9
  "level": "primary",
10
10
  "id": "u:instance_submit",
11
11
  "hiddenOn": "!(this.record.box === 'inbox' || this.record.box === 'draft')",
@@ -5,7 +5,7 @@ amis_schema: |-
5
5
  "body": [
6
6
  {
7
7
  "type": "button",
8
- "label": "取消申请",
8
+ "label": "${'CustomAction.instances.instance_terminate' | t}",
9
9
  "id": "u:instance_terminate",
10
10
  "className": " ",
11
11
  "onEvent": {
@@ -1,2 +1,6 @@
1
+ CustomApplications:
2
+ approve_workflow:
3
+ name: Approval Workflow
4
+ description:
1
5
  CustomLabels:
2
6
  flows_tabs_form: Form
@@ -22,13 +22,15 @@ module.exports = {
22
22
  },
23
23
 
24
24
  afterDelete: async function () {
25
- const { doc } = this;
26
- let recordIds = doc.record_ids;
27
- if (recordIds && recordIds.length == 1) {
28
- let recordObjName = recordIds[0].o;
29
- let recordId = recordIds[0].ids[0];
30
- if (recordObjName && recordId) {
31
- await objectql.getObject(recordObjName).update(recordId, { "instances": null, "instance_state": null, "locked": false })
25
+ const { previousDoc } = this;
26
+ if(previousDoc){
27
+ let recordIds = previousDoc.record_ids;
28
+ if (recordIds && recordIds.length == 1) {
29
+ let recordObjName = recordIds[0].o;
30
+ let recordId = recordIds[0].ids[0];
31
+ if (recordObjName && recordId) {
32
+ await objectql.getObject(recordObjName).update(recordId, { "instances": null, "instance_state": null, "locked": false })
33
+ }
32
34
  }
33
35
  }
34
36
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos-labs/plugin-workflow",
3
- "version": "3.0.0-beta.16",
3
+ "version": "3.0.0-beta.18",
4
4
  "main": "package.service.js",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -926,7 +926,7 @@ InstanceRecordQueue.syncRelatedObjectsValue = async function (mainRecordId, rela
926
926
  }
927
927
  }
928
928
  //清理申请单上被删除子表记录对应的相关表记录
929
- for (const [tableCode, tableIds] of Object.entries(tableMap)) {
929
+ for (let [tableCode, tableIds] of Object.entries(tableMap)) {
930
930
  tableIds = _.compact(tableIds);
931
931
  var docsForRemove = await objectFind(relatedObject.object_name, { filters: [[relatedObject.foreign_key, '=', mainRecordId], ['_table._code', '=', tableCode]] });
932
932
  for (const doc of docsForRemove) {
@@ -1025,10 +1025,8 @@ InstanceRecordQueue.sendDoc = async function (doc) {
1025
1025
 
1026
1026
  // 同步新附件
1027
1027
  await InstanceRecordQueue.syncAttach(sync_attachment, insId, record.space, record._id, objectName);
1028
- console.log(`1031 ===>`)
1029
1028
  // 执行公式
1030
1029
  await runQuoted(objectName, record._id);
1031
- console.log(`runQuoted===>`)
1032
1030
  } catch (error) {
1033
1031
  console.error(error);
1034
1032