@steedos-widgets/amis-lib 6.10.1-beta.48 → 6.10.1-beta.49

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/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": "可搜索字段:" + searchableFieldsLabel.join(","),
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: baozhoutao@steedos.com
17495
- * @LastEditTime: 2023-02-08 10:13:06
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: baozhoutao@steedos.com
17640
- * @LastEditTime: 2023-02-09 09:48:18
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: baozhoutao@steedos.com
17687
- * @LastEditTime: 2022-09-27 16:45:58
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 == '已读' ? 'text-[blue]' : (data.finish_date == '未处理' ? 'text-[red]' : '') %>"
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 == '已核准' ? 'text-green-600' : (data.judge == '已驳回' ? 'text-[red]' : '') %>"
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: liaodaxue
17733
- * @LastEditTime: 2023-12-29 16:06:35
17812
+ * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
17813
+ * @LastEditTime: 2025-08-28 02:36:59
17734
17814
  * @Description:
17735
17815
  */
17736
17816
 
@@ -18333,6 +18413,95 @@ const getFormTableView = async (instance) => {
18333
18413
  return formSchema;
18334
18414
  };
18335
18415
 
18416
+ const getFormSteps = async (instance) => {
18417
+ const stepsSchema = [];
18418
+ let stepFields = [];
18419
+ let fields = [];
18420
+ let unGroupFields = [];
18421
+ each(instance.fields, (field) => {
18422
+ if (field.type === "section") {
18423
+ fields.push(field);
18424
+ }
18425
+ else {
18426
+ unGroupFields.push(field);
18427
+ }
18428
+ });
18429
+ if (unGroupFields.length > 0) {
18430
+ fields = [{
18431
+ type: "section",
18432
+ name: "General",
18433
+ code: "General",
18434
+ fields: unGroupFields
18435
+ }].concat(fields);
18436
+ }
18437
+
18438
+ for (const field of fields) {
18439
+ if (field.type === "section" && field.fields) {
18440
+ stepFields = [];
18441
+ let fieldSchema;
18442
+ for (const childField of field.fields) {
18443
+ fieldSchema = await getTdInputTpl(childField, true);
18444
+ stepFields.push(fieldSchema);
18445
+ }
18446
+ stepsSchema.push({
18447
+ "title": field.name,
18448
+ "mode": "horizontal",
18449
+ "body": stepFields
18450
+ });
18451
+ }
18452
+ }
18453
+ var isReadonlyBox = instance.box !== 'inbox' && instance.box !== 'draft';
18454
+ if (isReadonlyBox) {
18455
+ // 只读的审批箱中最后一步的保存按钮要隐藏
18456
+ if (stepsSchema.length == 1) {
18457
+ stepsSchema[stepsSchema.length - 1].actions = [];
18458
+ }
18459
+ else if (stepsSchema.length > 1) {
18460
+ stepsSchema[stepsSchema.length - 1].actions = [
18461
+ {
18462
+ "label": "Prev",
18463
+ "type": "button",
18464
+ "actionType": "prev"
18465
+ }
18466
+ ];
18467
+ }
18468
+ }
18469
+ return stepsSchema;
18470
+ };
18471
+
18472
+ const getFormWizardView = async (instance) => {
18473
+ const formSchema = {
18474
+ type: "wizard",
18475
+ className: "instance-form-view-wizard pt-4",
18476
+ steps: await getFormSteps(instance),
18477
+ actionFinishLabel: "${'CustomAction.instances.instance_save' | t}",//"保存",
18478
+ id: "u:instance_wizard",
18479
+ target: "instance_form",
18480
+ "onEvent": {
18481
+ "change": {
18482
+ "actions": [
18483
+ {
18484
+ "actionType": "setValue",
18485
+ "componentId": "instance_form",
18486
+ "args": {
18487
+ "value": "${event.data}"
18488
+ }
18489
+ }
18490
+ ]
18491
+ },
18492
+ "finished": { //点最后一步完成按钮触发暂存按钮事件保存数据
18493
+ "actions": [
18494
+ {
18495
+ "actionType": "click",
18496
+ "componentId": "u:instance_save"
18497
+ }
18498
+ ]
18499
+ }
18500
+ },
18501
+ };
18502
+ return formSchema;
18503
+ };
18504
+
18336
18505
  const getApplicantTableView = async (instance) => {
18337
18506
  let applicantInput = null;
18338
18507
  if(instance.state === 'draft'){
@@ -18383,7 +18552,7 @@ const getApplicantTableView = async (instance) => {
18383
18552
  body: [
18384
18553
  {
18385
18554
  type: "tpl",
18386
- tpl: "<div class='inline-left'>提交人:</div>",
18555
+ tpl: "<div class='inline-left'>" + i18next$1.t('frontend_workflow_instances_applicant_name_prefix') + "</div>",
18387
18556
  id: "u:ee62634201bf",
18388
18557
  },
18389
18558
  applicantInput
@@ -18402,7 +18571,7 @@ const getApplicantTableView = async (instance) => {
18402
18571
  body: [
18403
18572
  {
18404
18573
  type: "tpl",
18405
- tpl: "<div class='inline-left'>提交日期:</div>",
18574
+ tpl: "<div class='inline-left'>" + i18next$1.t('frontend_workflow_instance_submit_date_prefix') + "</div>",
18406
18575
  id: "u:6d0a7763d527",
18407
18576
  },
18408
18577
  {
@@ -18441,7 +18610,7 @@ const getApproveButton = async (instance)=>{
18441
18610
  }
18442
18611
  return {
18443
18612
  type: "button",
18444
- label: "签批",
18613
+ label: i18next$1.t('frontend_workflow_instance_button_sign'),
18445
18614
  onEvent: {
18446
18615
  click: {
18447
18616
  actions: [
@@ -18462,6 +18631,14 @@ const getApproveButton = async (instance)=>{
18462
18631
  };
18463
18632
 
18464
18633
  const getFlowFormSchema = async (instance, box) => {
18634
+ const formStyle = instance.form.current.style || "table";
18635
+ let formContentSchema;
18636
+ if (formStyle === "wizard") {
18637
+ formContentSchema = await getFormWizardView(instance);
18638
+ }
18639
+ else {
18640
+ formContentSchema = await getFormTableView(instance);
18641
+ }
18465
18642
  return {
18466
18643
  type: "page",
18467
18644
  name: "instancePage",
@@ -18538,7 +18715,7 @@ const getFlowFormSchema = async (instance, box) => {
18538
18715
  textAlign: "center",
18539
18716
  },
18540
18717
  },
18541
- await getFormTableView(instance),
18718
+ formContentSchema,
18542
18719
  await getApplicantTableView(instance),
18543
18720
 
18544
18721
  ],
@@ -18591,7 +18768,19 @@ const getFlowFormSchema = async (instance, box) => {
18591
18768
  actionType: "reload"
18592
18769
  }
18593
18770
  ]
18594
- }
18771
+ },
18772
+ "inited": {
18773
+ "actions": [
18774
+ {
18775
+ "actionType": "setValue",
18776
+ "componentId": "instance_form",
18777
+ "args": {
18778
+ "value": "${event.data.context.approveValues}"
18779
+ },
18780
+ "expression": "${event.data.context.form.current.style === 'wizard'}"// 表单为 wizard 样式时需要初始同步表单数据,否则直接点击暂存按钮会清空数据
18781
+ }
18782
+ ]
18783
+ },
18595
18784
  // inited: {
18596
18785
  // weight: 0,
18597
18786
  // actions: [
@@ -18719,8 +18908,8 @@ const getOpinionFieldStepsName = (field, top_keywords) => {
18719
18908
  /*
18720
18909
  * @Author: baozhoutao@steedos.com
18721
18910
  * @Date: 2022-09-09 17:47:37
18722
- * @LastEditors: baozhoutao@steedos.com
18723
- * @LastEditTime: 2023-10-10 13:57:02
18911
+ * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
18912
+ * @LastEditTime: 2025-08-28 01:47:42
18724
18913
  * @Description:
18725
18914
  */
18726
18915
 
@@ -18895,7 +19084,8 @@ const getInstanceInfo = async (props) => {
18895
19084
  form_version,
18896
19085
  form:form__expand{
18897
19086
  _id,
18898
- name
19087
+ name,
19088
+ style,
18899
19089
  current,
18900
19090
  historys
18901
19091
  },
@@ -19009,7 +19199,7 @@ const getInstanceInfo = async (props) => {
19009
19199
  opinion = approve.cc_description;
19010
19200
  }
19011
19201
  if (!finishDate) {
19012
- finishDate = approve.is_read ? "已读" : "未处理";
19202
+ finishDate = approve.is_read ? i18next$1.t('frontend_workflow_approval_history_read') : i18next$1.t('frontend_workflow_approval_history_unprocessed');
19013
19203
  judge = null;
19014
19204
  } else {
19015
19205
  finishDate = moment && moment(finishDate).format("YYYY-MM-DD HH:mm");
@@ -19020,34 +19210,34 @@ const getInstanceInfo = async (props) => {
19020
19210
  judge = "";
19021
19211
  break;
19022
19212
  case "returned":
19023
- judge = "已退回";
19213
+ judge = i18next$1.t('frontend_workflow_approval_judge_returned');//"已退回"
19024
19214
  break;
19025
19215
  case "terminated":
19026
- judge = "被取回";
19216
+ judge = i18next$1.t('frontend_workflow_approval_judge_terminated');//"被取回";
19027
19217
  break;
19028
19218
  case "pending":
19029
- judge = "审核中";
19219
+ judge = i18next$1.t('frontend_workflow_approval_judge_pending');//"审核中";
19030
19220
  break;
19031
19221
  case "approved":
19032
- judge = "已核准";
19222
+ judge = i18next$1.t('frontend_workflow_approval_judge_approved');//"已核准";
19033
19223
  break;
19034
19224
  case "rejected":
19035
- judge = "已驳回";
19225
+ judge = i18next$1.t('frontend_workflow_approval_judge_rejected');//"已驳回";
19036
19226
  break;
19037
19227
  case "finished":
19038
- judge = "已完成";
19228
+ judge = i18next$1.t('frontend_workflow_approval_judge_finished');//"已完成";
19039
19229
  break;
19040
19230
  case "reassigned":
19041
- judge = "转签核";
19231
+ judge = i18next$1.t('frontend_workflow_approval_judge_reassigned');//"转签核";
19042
19232
  break;
19043
19233
  case "inhand":
19044
- judge = "处理中";
19234
+ judge = i18next$1.t('frontend_workflow_approval_judge_inhand');//"处理中";
19045
19235
  break;
19046
19236
  case "relocated":
19047
- judge = "重定位";
19237
+ judge = i18next$1.t('frontend_workflow_approval_judge_relocated');//"重定位";
19048
19238
  break;
19049
19239
  case "readed":
19050
- judge = "已阅";
19240
+ judge = i18next$1.t('frontend_workflow_approval_judge_readed');//"已阅";
19051
19241
  break;
19052
19242
  }
19053
19243
  return {
@@ -19124,7 +19314,7 @@ var en_us = {
19124
19314
  "CRUD.exportExcel": "Export Excel",
19125
19315
  "CRUD.fetchFailed": "Fetch failed",
19126
19316
  "CRUD.filter": "Filter",
19127
- "CRUD.selected": "selected {{total}} items===: ",
19317
+ "CRUD.selected": "selected {{total}} items",
19128
19318
  "CRUD.invalidArray": "data.items must be an array",
19129
19319
  "CRUD.invalidData": "data is empty",
19130
19320
  "CRUD.loadMore": "Load more",
@@ -19499,7 +19689,7 @@ var zh_cn = {
19499
19689
  "CRUD.exportExcel": "导出 Excel",
19500
19690
  "CRUD.fetchFailed": "获取失败",
19501
19691
  "CRUD.filter": "筛选",
19502
- "CRUD.selected": "已选{{total}}条==:",
19692
+ "CRUD.selected": "已选{{total}}条:",
19503
19693
  "CRUD.invalidArray": "data.items 必须是数组",
19504
19694
  "CRUD.invalidData": "返回数据格式不正确,data 没有数据",
19505
19695
  "CRUD.loadMore": "加载更多",