@steedos-widgets/amis-lib 6.10.1-beta.48 → 6.10.1-beta.50
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 +239 -47
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +240 -48
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +223 -202
- package/dist/index.umd.js.map +1 -1
- package/dist/types/workflow/approve.d.ts +2 -2
- package/dist/types/workflow/attachment.d.ts +4 -4
- package/dist/types/workflow/flow.d.ts +50 -7
- package/dist/types/workflow/history.d.ts +1 -1
- package/dist/types/workflow/related.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ import i18next from 'i18next';
|
|
|
4
4
|
export { default as i18next } from 'i18next';
|
|
5
5
|
import { initReactI18next } from 'react-i18next';
|
|
6
6
|
import isPlainObject from 'lodash/isPlainObject';
|
|
7
|
-
import { Router as Router$1, getSteedosAuth as getSteedosAuth$1, lookupToAmis as lookupToAmis$1, fetchAPI as fetchAPI$1 } from '@steedos-widgets/amis-lib';
|
|
7
|
+
import { Router as Router$1, i18next as i18next$1, getSteedosAuth as getSteedosAuth$1, lookupToAmis as lookupToAmis$1, fetchAPI as fetchAPI$1 } from '@steedos-widgets/amis-lib';
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
10
|
* @Author: baozhoutao@steedos.com
|
|
@@ -1572,6 +1572,21 @@ var frontend_app_launcher_dialog_new_app_title$1 = "New App";
|
|
|
1572
1572
|
var frontend_app_launcher_dialog_new_app_code_label$1 = "App ID";
|
|
1573
1573
|
var frontend_app_launcher_dialog_new_app_name_label$1 = "Label";
|
|
1574
1574
|
var frontend_app_launcher_dialog_new_app_icon_label$1 = "Icon";
|
|
1575
|
+
var frontend_crud_toolbar_quick_search_placeholder$1 = "Quick Search";
|
|
1576
|
+
var frontend_crud_toolbar_quick_search_tooltip_prefix$1 = "Searchable fields:";
|
|
1577
|
+
var frontend_workflow_instances_applicant_name_prefix$1 = "Applicant name:";
|
|
1578
|
+
var frontend_workflow_instance_submit_date_prefix$1 = "Submission date:";
|
|
1579
|
+
var frontend_workflow_instance_button_sign$1 = "Sign";
|
|
1580
|
+
var frontend_workflow_approval_history$1 = "Approval History";
|
|
1581
|
+
var frontend_workflow_approval_history_read$1 = "Read";
|
|
1582
|
+
var frontend_workflow_approval_history_unprocessed$1 = "Unprocessed";
|
|
1583
|
+
var frontend_workflow_attachment$1 = "Attachment";
|
|
1584
|
+
var frontend_workflow_attachment_upload$1 = "Upload";
|
|
1585
|
+
var frontend_workflow_related_file$1 = "Related File";
|
|
1586
|
+
var frontend_workflow_judge_option_approved$1 = "Approved";
|
|
1587
|
+
var frontend_workflow_judge_option_rejected$1 = "Rejected";
|
|
1588
|
+
var frontend_workflow_judge_option_readed$1 = "Readed";
|
|
1589
|
+
var frontend_workflow_next_step$1 = "Next Step";
|
|
1575
1590
|
var en_us$1 = {
|
|
1576
1591
|
frontend_field_group_generalization: frontend_field_group_generalization$1,
|
|
1577
1592
|
frontend_download: frontend_download$1,
|
|
@@ -1688,7 +1703,22 @@ var en_us$1 = {
|
|
|
1688
1703
|
frontend_app_launcher_dialog_new_app_title: frontend_app_launcher_dialog_new_app_title$1,
|
|
1689
1704
|
frontend_app_launcher_dialog_new_app_code_label: frontend_app_launcher_dialog_new_app_code_label$1,
|
|
1690
1705
|
frontend_app_launcher_dialog_new_app_name_label: frontend_app_launcher_dialog_new_app_name_label$1,
|
|
1691
|
-
frontend_app_launcher_dialog_new_app_icon_label: frontend_app_launcher_dialog_new_app_icon_label$1
|
|
1706
|
+
frontend_app_launcher_dialog_new_app_icon_label: frontend_app_launcher_dialog_new_app_icon_label$1,
|
|
1707
|
+
frontend_crud_toolbar_quick_search_placeholder: frontend_crud_toolbar_quick_search_placeholder$1,
|
|
1708
|
+
frontend_crud_toolbar_quick_search_tooltip_prefix: frontend_crud_toolbar_quick_search_tooltip_prefix$1,
|
|
1709
|
+
frontend_workflow_instances_applicant_name_prefix: frontend_workflow_instances_applicant_name_prefix$1,
|
|
1710
|
+
frontend_workflow_instance_submit_date_prefix: frontend_workflow_instance_submit_date_prefix$1,
|
|
1711
|
+
frontend_workflow_instance_button_sign: frontend_workflow_instance_button_sign$1,
|
|
1712
|
+
frontend_workflow_approval_history: frontend_workflow_approval_history$1,
|
|
1713
|
+
frontend_workflow_approval_history_read: frontend_workflow_approval_history_read$1,
|
|
1714
|
+
frontend_workflow_approval_history_unprocessed: frontend_workflow_approval_history_unprocessed$1,
|
|
1715
|
+
frontend_workflow_attachment: frontend_workflow_attachment$1,
|
|
1716
|
+
frontend_workflow_attachment_upload: frontend_workflow_attachment_upload$1,
|
|
1717
|
+
frontend_workflow_related_file: frontend_workflow_related_file$1,
|
|
1718
|
+
frontend_workflow_judge_option_approved: frontend_workflow_judge_option_approved$1,
|
|
1719
|
+
frontend_workflow_judge_option_rejected: frontend_workflow_judge_option_rejected$1,
|
|
1720
|
+
frontend_workflow_judge_option_readed: frontend_workflow_judge_option_readed$1,
|
|
1721
|
+
frontend_workflow_next_step: frontend_workflow_next_step$1
|
|
1692
1722
|
};
|
|
1693
1723
|
|
|
1694
1724
|
var frontend_field_group_generalization = "通用";
|
|
@@ -1808,6 +1838,31 @@ var frontend_app_launcher_dialog_new_app_title = "新建应用";
|
|
|
1808
1838
|
var frontend_app_launcher_dialog_new_app_code_label = "应用唯一标识";
|
|
1809
1839
|
var frontend_app_launcher_dialog_new_app_name_label = "显示名称";
|
|
1810
1840
|
var frontend_app_launcher_dialog_new_app_icon_label = "图标";
|
|
1841
|
+
var frontend_crud_toolbar_quick_search_placeholder = "快捷搜索";
|
|
1842
|
+
var frontend_crud_toolbar_quick_search_tooltip_prefix = "可搜索字段:";
|
|
1843
|
+
var frontend_workflow_instances_applicant_name_prefix = "提交人:";
|
|
1844
|
+
var frontend_workflow_instance_submit_date_prefix = "提交日期:";
|
|
1845
|
+
var frontend_workflow_approval_judge_returned = "已退回";
|
|
1846
|
+
var frontend_workflow_approval_judge_terminated = "被取回";
|
|
1847
|
+
var frontend_workflow_approval_judge_pending = "审核中";
|
|
1848
|
+
var frontend_workflow_approval_judge_approved = "已核准";
|
|
1849
|
+
var frontend_workflow_approval_judge_rejected = "已驳回";
|
|
1850
|
+
var frontend_workflow_approval_judge_finished = "已完成";
|
|
1851
|
+
var frontend_workflow_approval_judge_reassigned = "转签核";
|
|
1852
|
+
var frontend_workflow_approval_judge_inhand = "处理中";
|
|
1853
|
+
var frontend_workflow_approval_judge_relocated = "重定位";
|
|
1854
|
+
var frontend_workflow_approval_judge_readed = "已阅";
|
|
1855
|
+
var frontend_workflow_instance_button_sign = "签批";
|
|
1856
|
+
var frontend_workflow_approval_history = "签批历程";
|
|
1857
|
+
var frontend_workflow_approval_history_read = "已读";
|
|
1858
|
+
var frontend_workflow_approval_history_unprocessed = "未处理";
|
|
1859
|
+
var frontend_workflow_attachment = "附件";
|
|
1860
|
+
var frontend_workflow_attachment_upload = "上传";
|
|
1861
|
+
var frontend_workflow_related_file = "相关文件";
|
|
1862
|
+
var frontend_workflow_judge_option_approved = "核准";
|
|
1863
|
+
var frontend_workflow_judge_option_rejected = "驳回";
|
|
1864
|
+
var frontend_workflow_judge_option_readed = "已阅";
|
|
1865
|
+
var frontend_workflow_next_step = "下一步";
|
|
1811
1866
|
var zh_cn$1 = {
|
|
1812
1867
|
frontend_field_group_generalization: frontend_field_group_generalization,
|
|
1813
1868
|
frontend_download: frontend_download,
|
|
@@ -1925,7 +1980,32 @@ var zh_cn$1 = {
|
|
|
1925
1980
|
frontend_app_launcher_dialog_new_app_title: frontend_app_launcher_dialog_new_app_title,
|
|
1926
1981
|
frontend_app_launcher_dialog_new_app_code_label: frontend_app_launcher_dialog_new_app_code_label,
|
|
1927
1982
|
frontend_app_launcher_dialog_new_app_name_label: frontend_app_launcher_dialog_new_app_name_label,
|
|
1928
|
-
frontend_app_launcher_dialog_new_app_icon_label: frontend_app_launcher_dialog_new_app_icon_label
|
|
1983
|
+
frontend_app_launcher_dialog_new_app_icon_label: frontend_app_launcher_dialog_new_app_icon_label,
|
|
1984
|
+
frontend_crud_toolbar_quick_search_placeholder: frontend_crud_toolbar_quick_search_placeholder,
|
|
1985
|
+
frontend_crud_toolbar_quick_search_tooltip_prefix: frontend_crud_toolbar_quick_search_tooltip_prefix,
|
|
1986
|
+
frontend_workflow_instances_applicant_name_prefix: frontend_workflow_instances_applicant_name_prefix,
|
|
1987
|
+
frontend_workflow_instance_submit_date_prefix: frontend_workflow_instance_submit_date_prefix,
|
|
1988
|
+
frontend_workflow_approval_judge_returned: frontend_workflow_approval_judge_returned,
|
|
1989
|
+
frontend_workflow_approval_judge_terminated: frontend_workflow_approval_judge_terminated,
|
|
1990
|
+
frontend_workflow_approval_judge_pending: frontend_workflow_approval_judge_pending,
|
|
1991
|
+
frontend_workflow_approval_judge_approved: frontend_workflow_approval_judge_approved,
|
|
1992
|
+
frontend_workflow_approval_judge_rejected: frontend_workflow_approval_judge_rejected,
|
|
1993
|
+
frontend_workflow_approval_judge_finished: frontend_workflow_approval_judge_finished,
|
|
1994
|
+
frontend_workflow_approval_judge_reassigned: frontend_workflow_approval_judge_reassigned,
|
|
1995
|
+
frontend_workflow_approval_judge_inhand: frontend_workflow_approval_judge_inhand,
|
|
1996
|
+
frontend_workflow_approval_judge_relocated: frontend_workflow_approval_judge_relocated,
|
|
1997
|
+
frontend_workflow_approval_judge_readed: frontend_workflow_approval_judge_readed,
|
|
1998
|
+
frontend_workflow_instance_button_sign: frontend_workflow_instance_button_sign,
|
|
1999
|
+
frontend_workflow_approval_history: frontend_workflow_approval_history,
|
|
2000
|
+
frontend_workflow_approval_history_read: frontend_workflow_approval_history_read,
|
|
2001
|
+
frontend_workflow_approval_history_unprocessed: frontend_workflow_approval_history_unprocessed,
|
|
2002
|
+
frontend_workflow_attachment: frontend_workflow_attachment,
|
|
2003
|
+
frontend_workflow_attachment_upload: frontend_workflow_attachment_upload,
|
|
2004
|
+
frontend_workflow_related_file: frontend_workflow_related_file,
|
|
2005
|
+
frontend_workflow_judge_option_approved: frontend_workflow_judge_option_approved,
|
|
2006
|
+
frontend_workflow_judge_option_rejected: frontend_workflow_judge_option_rejected,
|
|
2007
|
+
frontend_workflow_judge_option_readed: frontend_workflow_judge_option_readed,
|
|
2008
|
+
frontend_workflow_next_step: frontend_workflow_next_step
|
|
1929
2009
|
};
|
|
1930
2010
|
|
|
1931
2011
|
/*
|
|
@@ -9243,7 +9323,7 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
9243
9323
|
"id": "steedos_crud_toolbar_quick_search",
|
|
9244
9324
|
"align": "right",
|
|
9245
9325
|
"title": "",
|
|
9246
|
-
"content":
|
|
9326
|
+
"content": i18next.t('frontend_crud_toolbar_quick_search_tooltip_prefix') + searchableFieldsLabel.join(","),
|
|
9247
9327
|
"placement": "bottom",
|
|
9248
9328
|
"tooltipTheme": "dark",
|
|
9249
9329
|
"trigger": "click",
|
|
@@ -9253,7 +9333,7 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
9253
9333
|
{
|
|
9254
9334
|
"type": "search-box",
|
|
9255
9335
|
"name": keywordsSearchBoxName,
|
|
9256
|
-
"placeholder": "快捷搜索",
|
|
9336
|
+
"placeholder": i18next.t('frontend_crud_toolbar_quick_search_placeholder'),//"快捷搜索",
|
|
9257
9337
|
"value": crudKeywords,
|
|
9258
9338
|
"mini": true,
|
|
9259
9339
|
"clearable": true,//因为清除并不会触发失去焦点事件,只有禁用,但是它会触发change事件,所以等升级到amis 3.4+后可以重新放开
|
|
@@ -16900,11 +16980,11 @@ const getJudgeOptions = async (instance) => {
|
|
|
16900
16980
|
const options = [];
|
|
16901
16981
|
if (step.step_type === "sign") {
|
|
16902
16982
|
options.push({
|
|
16903
|
-
label: "核准",
|
|
16983
|
+
label: i18next$1.t('frontend_workflow_judge_option_approved'),//"核准",
|
|
16904
16984
|
value: "approved",
|
|
16905
16985
|
});
|
|
16906
16986
|
options.push({
|
|
16907
|
-
label: "驳回",
|
|
16987
|
+
label: i18next$1.t('frontend_workflow_judge_option_rejected'),//"驳回",
|
|
16908
16988
|
value: "rejected",
|
|
16909
16989
|
});
|
|
16910
16990
|
} else if (
|
|
@@ -16912,15 +16992,15 @@ const getJudgeOptions = async (instance) => {
|
|
|
16912
16992
|
HIDE_COUNTER_SIGN_JUDGE_OPTIONS != true
|
|
16913
16993
|
) {
|
|
16914
16994
|
options.push({
|
|
16915
|
-
label: "核准",
|
|
16995
|
+
label: i18next$1.t('frontend_workflow_judge_option_approved'),//"核准",
|
|
16916
16996
|
value: "approved",
|
|
16917
16997
|
});
|
|
16918
16998
|
options.push({
|
|
16919
|
-
label: "驳回",
|
|
16999
|
+
label: i18next$1.t('frontend_workflow_judge_option_rejected'),//"驳回",
|
|
16920
17000
|
value: "rejected",
|
|
16921
17001
|
});
|
|
16922
17002
|
options.push({
|
|
16923
|
-
label: "已阅",
|
|
17003
|
+
label: i18next$1.t('frontend_workflow_judge_option_readed'),//"已阅",
|
|
16924
17004
|
value: "readed",
|
|
16925
17005
|
});
|
|
16926
17006
|
}
|
|
@@ -16981,7 +17061,7 @@ const getNextStepInput = async (instance) => {
|
|
|
16981
17061
|
body: [
|
|
16982
17062
|
{
|
|
16983
17063
|
type: "tpl",
|
|
16984
|
-
tpl: "下一步",
|
|
17064
|
+
tpl: i18next$1.t('frontend_workflow_next_step'),//"下一步",
|
|
16985
17065
|
inline: true,
|
|
16986
17066
|
wrapperComponent: "",
|
|
16987
17067
|
id: "u:0a85de51480f",
|
|
@@ -17459,7 +17539,7 @@ const getApprovalDrawerSchema = async (instance) => {
|
|
|
17459
17539
|
actions: [
|
|
17460
17540
|
{
|
|
17461
17541
|
type: "button",
|
|
17462
|
-
label: "
|
|
17542
|
+
label: "${'Submit' | t}",
|
|
17463
17543
|
onEvent: {
|
|
17464
17544
|
click: {
|
|
17465
17545
|
actions: await getSubmitActions(instance),
|
|
@@ -17470,7 +17550,7 @@ const getApprovalDrawerSchema = async (instance) => {
|
|
|
17470
17550
|
},
|
|
17471
17551
|
{
|
|
17472
17552
|
type: "button",
|
|
17473
|
-
label: "
|
|
17553
|
+
label: "${'Cancel' | t}",
|
|
17474
17554
|
onEvent: {
|
|
17475
17555
|
click: {
|
|
17476
17556
|
actions: [
|
|
@@ -17491,8 +17571,8 @@ const getApprovalDrawerSchema = async (instance) => {
|
|
|
17491
17571
|
/*
|
|
17492
17572
|
* @Author: baozhoutao@steedos.com
|
|
17493
17573
|
* @Date: 2022-09-16 17:27:24
|
|
17494
|
-
* @LastEditors:
|
|
17495
|
-
* @LastEditTime:
|
|
17574
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
17575
|
+
* @LastEditTime: 2025-08-28 01:24:26
|
|
17496
17576
|
* @Description:
|
|
17497
17577
|
*/
|
|
17498
17578
|
// TODO attachments
|
|
@@ -17564,11 +17644,11 @@ const getAttachmentUploadInput = async (instance)=>{
|
|
|
17564
17644
|
"type": "input-file",
|
|
17565
17645
|
labelClassName: "antd-List-heading",
|
|
17566
17646
|
className: "flex items-center",
|
|
17567
|
-
"label":
|
|
17647
|
+
"label": i18next$1.t('frontend_workflow_attachment'),
|
|
17568
17648
|
mode:"inline",
|
|
17569
17649
|
"name": "file",
|
|
17570
17650
|
"id": "u:a58d02614e04",
|
|
17571
|
-
"btnLabel":
|
|
17651
|
+
"btnLabel": i18next$1.t('frontend_workflow_attachment_upload'),
|
|
17572
17652
|
"btnClassName": "m-0",
|
|
17573
17653
|
"multiple": true,
|
|
17574
17654
|
"maxLength": 10,
|
|
@@ -17636,8 +17716,8 @@ const getAttachmentUploadInput = async (instance)=>{
|
|
|
17636
17716
|
/*
|
|
17637
17717
|
* @Author: baozhoutao@steedos.com
|
|
17638
17718
|
* @Date: 2022-09-16 17:26:12
|
|
17639
|
-
* @LastEditors:
|
|
17640
|
-
* @LastEditTime:
|
|
17719
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
17720
|
+
* @LastEditTime: 2025-08-28 01:23:32
|
|
17641
17721
|
* @Description:
|
|
17642
17722
|
*/
|
|
17643
17723
|
const getRelatedRecords = async (instance)=>{
|
|
@@ -17663,7 +17743,7 @@ const getRelatedInstances = async (instance)=>{
|
|
|
17663
17743
|
"type": "list",
|
|
17664
17744
|
"name": "relatedInstances",
|
|
17665
17745
|
"source": "${related_instances}",
|
|
17666
|
-
title:
|
|
17746
|
+
title: i18next$1.t('frontend_workflow_related_file'),
|
|
17667
17747
|
"listItem": {
|
|
17668
17748
|
"body": [
|
|
17669
17749
|
{
|
|
@@ -17683,8 +17763,8 @@ const getRelatedInstances = async (instance)=>{
|
|
|
17683
17763
|
/*
|
|
17684
17764
|
* @Author: baozhoutao@steedos.com
|
|
17685
17765
|
* @Date: 2022-09-24 16:48:28
|
|
17686
|
-
* @LastEditors:
|
|
17687
|
-
* @LastEditTime:
|
|
17766
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
17767
|
+
* @LastEditTime: 2025-08-28 01:38:39
|
|
17688
17768
|
* @Description:
|
|
17689
17769
|
*/
|
|
17690
17770
|
|
|
@@ -17692,7 +17772,7 @@ const getInstanceApprovalHistory = async ()=>{
|
|
|
17692
17772
|
return {
|
|
17693
17773
|
"type": "table",
|
|
17694
17774
|
"headerClassName": "hidden",
|
|
17695
|
-
"title":
|
|
17775
|
+
"title": i18next$1.t('frontend_workflow_approval_history'),
|
|
17696
17776
|
"source": "${historyApproves}",
|
|
17697
17777
|
"className": "m-b-none instance-approve-history",
|
|
17698
17778
|
"columnsTogglable": false,
|
|
@@ -17713,14 +17793,14 @@ const getInstanceApprovalHistory = async ()=>{
|
|
|
17713
17793
|
{
|
|
17714
17794
|
"name": "finish_date",
|
|
17715
17795
|
"label": "finish_date",
|
|
17716
|
-
"classNameExpr": "<%= data.finish_date == '
|
|
17796
|
+
"classNameExpr": "<%= data.finish_date == i18next.t('frontend_workflow_approval_history_read') ? 'text-[blue]' : (data.finish_date == i18next.t('frontend_workflow_approval_history_unprocessed') ? 'text-[red]' : '') %>"
|
|
17717
17797
|
// "type": "datetime",
|
|
17718
17798
|
// "format": "YYYY-MM-DD HH:mm"
|
|
17719
17799
|
},
|
|
17720
17800
|
{
|
|
17721
17801
|
"name": "judge",
|
|
17722
17802
|
"label": "judge",
|
|
17723
|
-
"classNameExpr": "<%= data.judge == '
|
|
17803
|
+
"classNameExpr": "<%= data.judge == i18next.t('frontend_workflow_approval_judge_approved') ? 'text-green-600' : (data.judge == i18next.t('frontend_workflow_approval_judge_rejected') ? 'text-[red]' : '') %>"
|
|
17724
17804
|
}
|
|
17725
17805
|
]
|
|
17726
17806
|
}
|
|
@@ -17729,8 +17809,8 @@ const getInstanceApprovalHistory = async ()=>{
|
|
|
17729
17809
|
/*
|
|
17730
17810
|
* @Author: baozhoutao@steedos.com
|
|
17731
17811
|
* @Date: 2022-09-07 16:20:45
|
|
17732
|
-
* @LastEditors:
|
|
17733
|
-
* @LastEditTime:
|
|
17812
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
17813
|
+
* @LastEditTime: 2025-08-28 02:36:59
|
|
17734
17814
|
* @Description:
|
|
17735
17815
|
*/
|
|
17736
17816
|
|
|
@@ -18092,6 +18172,8 @@ const getFieldEditTpl = async (field, label)=>{
|
|
|
18092
18172
|
tpl.editable = tpl.addable;
|
|
18093
18173
|
tpl.copyable = tpl.addable;
|
|
18094
18174
|
tpl.removable = tpl.addable;
|
|
18175
|
+
// tpl.fieldPrefix = field.name + "_";
|
|
18176
|
+
tpl.autoGeneratePrimaryKeyValue = true;
|
|
18095
18177
|
tpl.fields = [];
|
|
18096
18178
|
if(tpl.editable){
|
|
18097
18179
|
tpl.className = `${tpl.className || ''} steedos-input-table-editable`;
|
|
@@ -18333,6 +18415,95 @@ const getFormTableView = async (instance) => {
|
|
|
18333
18415
|
return formSchema;
|
|
18334
18416
|
};
|
|
18335
18417
|
|
|
18418
|
+
const getFormSteps = async (instance) => {
|
|
18419
|
+
const stepsSchema = [];
|
|
18420
|
+
let stepFields = [];
|
|
18421
|
+
let fields = [];
|
|
18422
|
+
let unGroupFields = [];
|
|
18423
|
+
each(instance.fields, (field) => {
|
|
18424
|
+
if (field.type === "section") {
|
|
18425
|
+
fields.push(field);
|
|
18426
|
+
}
|
|
18427
|
+
else {
|
|
18428
|
+
unGroupFields.push(field);
|
|
18429
|
+
}
|
|
18430
|
+
});
|
|
18431
|
+
if (unGroupFields.length > 0) {
|
|
18432
|
+
fields = [{
|
|
18433
|
+
type: "section",
|
|
18434
|
+
name: "General",
|
|
18435
|
+
code: "General",
|
|
18436
|
+
fields: unGroupFields
|
|
18437
|
+
}].concat(fields);
|
|
18438
|
+
}
|
|
18439
|
+
|
|
18440
|
+
for (const field of fields) {
|
|
18441
|
+
if (field.type === "section" && field.fields) {
|
|
18442
|
+
stepFields = [];
|
|
18443
|
+
let fieldSchema;
|
|
18444
|
+
for (const childField of field.fields) {
|
|
18445
|
+
fieldSchema = await getTdInputTpl(childField, true);
|
|
18446
|
+
stepFields.push(fieldSchema);
|
|
18447
|
+
}
|
|
18448
|
+
stepsSchema.push({
|
|
18449
|
+
"title": field.name,
|
|
18450
|
+
"mode": "horizontal",
|
|
18451
|
+
"body": stepFields
|
|
18452
|
+
});
|
|
18453
|
+
}
|
|
18454
|
+
}
|
|
18455
|
+
var isReadonlyBox = instance.box !== 'inbox' && instance.box !== 'draft';
|
|
18456
|
+
if (isReadonlyBox) {
|
|
18457
|
+
// 只读的审批箱中最后一步的保存按钮要隐藏
|
|
18458
|
+
if (stepsSchema.length == 1) {
|
|
18459
|
+
stepsSchema[stepsSchema.length - 1].actions = [];
|
|
18460
|
+
}
|
|
18461
|
+
else if (stepsSchema.length > 1) {
|
|
18462
|
+
stepsSchema[stepsSchema.length - 1].actions = [
|
|
18463
|
+
{
|
|
18464
|
+
"label": "Prev",
|
|
18465
|
+
"type": "button",
|
|
18466
|
+
"actionType": "prev"
|
|
18467
|
+
}
|
|
18468
|
+
];
|
|
18469
|
+
}
|
|
18470
|
+
}
|
|
18471
|
+
return stepsSchema;
|
|
18472
|
+
};
|
|
18473
|
+
|
|
18474
|
+
const getFormWizardView = async (instance) => {
|
|
18475
|
+
const formSchema = {
|
|
18476
|
+
type: "wizard",
|
|
18477
|
+
className: "instance-form-view-wizard pt-4",
|
|
18478
|
+
steps: await getFormSteps(instance),
|
|
18479
|
+
actionFinishLabel: "${'CustomAction.instances.instance_save' | t}",//"保存",
|
|
18480
|
+
id: "u:instance_wizard",
|
|
18481
|
+
target: "instance_form",
|
|
18482
|
+
"onEvent": {
|
|
18483
|
+
"change": {
|
|
18484
|
+
"actions": [
|
|
18485
|
+
{
|
|
18486
|
+
"actionType": "setValue",
|
|
18487
|
+
"componentId": "instance_form",
|
|
18488
|
+
"args": {
|
|
18489
|
+
"value": "${event.data}"
|
|
18490
|
+
}
|
|
18491
|
+
}
|
|
18492
|
+
]
|
|
18493
|
+
},
|
|
18494
|
+
"finished": { //点最后一步完成按钮触发暂存按钮事件保存数据
|
|
18495
|
+
"actions": [
|
|
18496
|
+
{
|
|
18497
|
+
"actionType": "click",
|
|
18498
|
+
"componentId": "u:instance_save"
|
|
18499
|
+
}
|
|
18500
|
+
]
|
|
18501
|
+
}
|
|
18502
|
+
},
|
|
18503
|
+
};
|
|
18504
|
+
return formSchema;
|
|
18505
|
+
};
|
|
18506
|
+
|
|
18336
18507
|
const getApplicantTableView = async (instance) => {
|
|
18337
18508
|
let applicantInput = null;
|
|
18338
18509
|
if(instance.state === 'draft'){
|
|
@@ -18383,7 +18554,7 @@ const getApplicantTableView = async (instance) => {
|
|
|
18383
18554
|
body: [
|
|
18384
18555
|
{
|
|
18385
18556
|
type: "tpl",
|
|
18386
|
-
tpl: "<div class='inline-left'
|
|
18557
|
+
tpl: "<div class='inline-left'>" + i18next$1.t('frontend_workflow_instances_applicant_name_prefix') + "</div>",
|
|
18387
18558
|
id: "u:ee62634201bf",
|
|
18388
18559
|
},
|
|
18389
18560
|
applicantInput
|
|
@@ -18402,7 +18573,7 @@ const getApplicantTableView = async (instance) => {
|
|
|
18402
18573
|
body: [
|
|
18403
18574
|
{
|
|
18404
18575
|
type: "tpl",
|
|
18405
|
-
tpl: "<div class='inline-left'
|
|
18576
|
+
tpl: "<div class='inline-left'>" + i18next$1.t('frontend_workflow_instance_submit_date_prefix') + "</div>",
|
|
18406
18577
|
id: "u:6d0a7763d527",
|
|
18407
18578
|
},
|
|
18408
18579
|
{
|
|
@@ -18441,7 +18612,7 @@ const getApproveButton = async (instance)=>{
|
|
|
18441
18612
|
}
|
|
18442
18613
|
return {
|
|
18443
18614
|
type: "button",
|
|
18444
|
-
label:
|
|
18615
|
+
label: i18next$1.t('frontend_workflow_instance_button_sign'),
|
|
18445
18616
|
onEvent: {
|
|
18446
18617
|
click: {
|
|
18447
18618
|
actions: [
|
|
@@ -18462,6 +18633,14 @@ const getApproveButton = async (instance)=>{
|
|
|
18462
18633
|
};
|
|
18463
18634
|
|
|
18464
18635
|
const getFlowFormSchema = async (instance, box) => {
|
|
18636
|
+
const formStyle = instance.form.current.style || "table";
|
|
18637
|
+
let formContentSchema;
|
|
18638
|
+
if (formStyle === "wizard") {
|
|
18639
|
+
formContentSchema = await getFormWizardView(instance);
|
|
18640
|
+
}
|
|
18641
|
+
else {
|
|
18642
|
+
formContentSchema = await getFormTableView(instance);
|
|
18643
|
+
}
|
|
18465
18644
|
return {
|
|
18466
18645
|
type: "page",
|
|
18467
18646
|
name: "instancePage",
|
|
@@ -18538,7 +18717,7 @@ const getFlowFormSchema = async (instance, box) => {
|
|
|
18538
18717
|
textAlign: "center",
|
|
18539
18718
|
},
|
|
18540
18719
|
},
|
|
18541
|
-
|
|
18720
|
+
formContentSchema,
|
|
18542
18721
|
await getApplicantTableView(instance),
|
|
18543
18722
|
|
|
18544
18723
|
],
|
|
@@ -18591,7 +18770,19 @@ const getFlowFormSchema = async (instance, box) => {
|
|
|
18591
18770
|
actionType: "reload"
|
|
18592
18771
|
}
|
|
18593
18772
|
]
|
|
18594
|
-
}
|
|
18773
|
+
},
|
|
18774
|
+
"inited": {
|
|
18775
|
+
"actions": [
|
|
18776
|
+
{
|
|
18777
|
+
"actionType": "setValue",
|
|
18778
|
+
"componentId": "instance_form",
|
|
18779
|
+
"args": {
|
|
18780
|
+
"value": "${event.data.context.approveValues}"
|
|
18781
|
+
},
|
|
18782
|
+
"expression": "${event.data.context.form.current.style === 'wizard'}"// 表单为 wizard 样式时需要初始同步表单数据,否则直接点击暂存按钮会清空数据
|
|
18783
|
+
}
|
|
18784
|
+
]
|
|
18785
|
+
},
|
|
18595
18786
|
// inited: {
|
|
18596
18787
|
// weight: 0,
|
|
18597
18788
|
// actions: [
|
|
@@ -18719,8 +18910,8 @@ const getOpinionFieldStepsName = (field, top_keywords) => {
|
|
|
18719
18910
|
/*
|
|
18720
18911
|
* @Author: baozhoutao@steedos.com
|
|
18721
18912
|
* @Date: 2022-09-09 17:47:37
|
|
18722
|
-
* @LastEditors:
|
|
18723
|
-
* @LastEditTime:
|
|
18913
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
18914
|
+
* @LastEditTime: 2025-08-28 01:47:42
|
|
18724
18915
|
* @Description:
|
|
18725
18916
|
*/
|
|
18726
18917
|
|
|
@@ -18895,7 +19086,8 @@ const getInstanceInfo = async (props) => {
|
|
|
18895
19086
|
form_version,
|
|
18896
19087
|
form:form__expand{
|
|
18897
19088
|
_id,
|
|
18898
|
-
name
|
|
19089
|
+
name,
|
|
19090
|
+
style,
|
|
18899
19091
|
current,
|
|
18900
19092
|
historys
|
|
18901
19093
|
},
|
|
@@ -19009,7 +19201,7 @@ const getInstanceInfo = async (props) => {
|
|
|
19009
19201
|
opinion = approve.cc_description;
|
|
19010
19202
|
}
|
|
19011
19203
|
if (!finishDate) {
|
|
19012
|
-
finishDate = approve.is_read ?
|
|
19204
|
+
finishDate = approve.is_read ? i18next$1.t('frontend_workflow_approval_history_read') : i18next$1.t('frontend_workflow_approval_history_unprocessed');
|
|
19013
19205
|
judge = null;
|
|
19014
19206
|
} else {
|
|
19015
19207
|
finishDate = moment && moment(finishDate).format("YYYY-MM-DD HH:mm");
|
|
@@ -19020,34 +19212,34 @@ const getInstanceInfo = async (props) => {
|
|
|
19020
19212
|
judge = "";
|
|
19021
19213
|
break;
|
|
19022
19214
|
case "returned":
|
|
19023
|
-
judge = "已退回"
|
|
19215
|
+
judge = i18next$1.t('frontend_workflow_approval_judge_returned');//"已退回"
|
|
19024
19216
|
break;
|
|
19025
19217
|
case "terminated":
|
|
19026
|
-
judge = "被取回";
|
|
19218
|
+
judge = i18next$1.t('frontend_workflow_approval_judge_terminated');//"被取回";
|
|
19027
19219
|
break;
|
|
19028
19220
|
case "pending":
|
|
19029
|
-
judge = "审核中";
|
|
19221
|
+
judge = i18next$1.t('frontend_workflow_approval_judge_pending');//"审核中";
|
|
19030
19222
|
break;
|
|
19031
19223
|
case "approved":
|
|
19032
|
-
judge = "已核准";
|
|
19224
|
+
judge = i18next$1.t('frontend_workflow_approval_judge_approved');//"已核准";
|
|
19033
19225
|
break;
|
|
19034
19226
|
case "rejected":
|
|
19035
|
-
judge = "已驳回";
|
|
19227
|
+
judge = i18next$1.t('frontend_workflow_approval_judge_rejected');//"已驳回";
|
|
19036
19228
|
break;
|
|
19037
19229
|
case "finished":
|
|
19038
|
-
judge = "已完成";
|
|
19230
|
+
judge = i18next$1.t('frontend_workflow_approval_judge_finished');//"已完成";
|
|
19039
19231
|
break;
|
|
19040
19232
|
case "reassigned":
|
|
19041
|
-
judge = "转签核";
|
|
19233
|
+
judge = i18next$1.t('frontend_workflow_approval_judge_reassigned');//"转签核";
|
|
19042
19234
|
break;
|
|
19043
19235
|
case "inhand":
|
|
19044
|
-
judge = "处理中";
|
|
19236
|
+
judge = i18next$1.t('frontend_workflow_approval_judge_inhand');//"处理中";
|
|
19045
19237
|
break;
|
|
19046
19238
|
case "relocated":
|
|
19047
|
-
judge = "重定位";
|
|
19239
|
+
judge = i18next$1.t('frontend_workflow_approval_judge_relocated');//"重定位";
|
|
19048
19240
|
break;
|
|
19049
19241
|
case "readed":
|
|
19050
|
-
judge = "已阅";
|
|
19242
|
+
judge = i18next$1.t('frontend_workflow_approval_judge_readed');//"已阅";
|
|
19051
19243
|
break;
|
|
19052
19244
|
}
|
|
19053
19245
|
return {
|
|
@@ -19124,7 +19316,7 @@ var en_us = {
|
|
|
19124
19316
|
"CRUD.exportExcel": "Export Excel",
|
|
19125
19317
|
"CRUD.fetchFailed": "Fetch failed",
|
|
19126
19318
|
"CRUD.filter": "Filter",
|
|
19127
|
-
"CRUD.selected": "selected {{total}} items
|
|
19319
|
+
"CRUD.selected": "selected {{total}} items",
|
|
19128
19320
|
"CRUD.invalidArray": "data.items must be an array",
|
|
19129
19321
|
"CRUD.invalidData": "data is empty",
|
|
19130
19322
|
"CRUD.loadMore": "Load more",
|
|
@@ -19499,7 +19691,7 @@ var zh_cn = {
|
|
|
19499
19691
|
"CRUD.exportExcel": "导出 Excel",
|
|
19500
19692
|
"CRUD.fetchFailed": "获取失败",
|
|
19501
19693
|
"CRUD.filter": "筛选",
|
|
19502
|
-
"CRUD.selected": "已选{{total}}
|
|
19694
|
+
"CRUD.selected": "已选{{total}}条:",
|
|
19503
19695
|
"CRUD.invalidArray": "data.items 必须是数组",
|
|
19504
19696
|
"CRUD.invalidData": "返回数据格式不正确,data 没有数据",
|
|
19505
19697
|
"CRUD.loadMore": "加载更多",
|