cloud-web-corejs 1.0.281 → 1.1.0-dev.11

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.
Files changed (175) hide show
  1. package/package.json +6 -2
  2. package/src/components/VabUpload/image-viewer.vue +442 -442
  3. package/src/components/VabUpload/index.vue +45 -3
  4. package/src/components/VabUpload/mixins.js +126 -19
  5. package/src/components/VabUpload/view.vue +248 -209
  6. package/src/components/baseTabs/mixins.js +181 -181
  7. package/src/components/bizTab/BizBillActions.vue +129 -0
  8. package/src/components/bizTab/BizTabListPage.vue +391 -0
  9. package/src/components/bizTab/README.md +378 -0
  10. package/src/components/bizTab/billTableUtil.js +48 -0
  11. package/src/components/bizTab/billValidators.js +136 -0
  12. package/src/components/bizTab/bizBillDetailMixin.js +705 -0
  13. package/src/components/bizTab/index.js +24 -0
  14. package/src/components/excelExport/exportFieldDialog.vue +23 -12
  15. package/src/components/excelExport/exportItemConfigUtil.js +30 -0
  16. package/src/components/excelExport/mixins.js +3 -3
  17. package/src/components/excelImport/index.vue +156 -156
  18. package/src/components/jsonImport/index.vue +1 -1
  19. package/src/components/langImport/index.vue +1 -1
  20. package/src/components/mobile/statusTag/mixins.js +1 -61
  21. package/src/components/mobile/wf/addTaskUserdialog.vue +23 -3
  22. package/src/components/mobile/wf/content.vue +1705 -1556
  23. package/src/components/mobile/wf/deleteTaskUserDialog.vue +22 -3
  24. package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +8 -6
  25. package/src/components/mobile/wf/selectUserDialog.vue +118 -0
  26. package/src/components/mobile/wf/setCandidateDialog.vue +25 -4
  27. package/src/components/mobile/wf/urgingDialog.vue +26 -3
  28. package/src/components/mobile/wf/wfModifyDialog.vue +4 -0
  29. package/src/components/obsUpload/index.vue +1 -1
  30. package/src/components/table/config.js +78 -78
  31. package/src/components/table/index.js +1276 -1276
  32. package/src/components/table/plugins/cell-area/index.js +1055 -0
  33. package/src/components/table/plugins/cell-area/index.scss +77 -0
  34. package/src/components/table/plugins/cell-area/util.js +224 -0
  35. package/src/components/table/tableForm.vue +330 -330
  36. package/src/components/table/tableFormMixin.js +318 -318
  37. package/src/components/table/vxeFilter/index.js +163 -163
  38. package/src/components/table/vxeFilter/mixin.js +316 -316
  39. package/src/components/wf/content.vue +1188 -1188
  40. package/src/components/wf/wf.js +40 -20
  41. package/src/components/wf/wfActionDropdown.vue +1 -1
  42. package/src/components/wf/wfActionItems.js +1 -1
  43. package/src/components/xform/form-designer/designer.js +51 -52
  44. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +269 -269
  45. package/src/components/xform/form-designer/form-widget/container-widget/detail-h5-widget.vue +18 -2
  46. package/src/components/xform/form-designer/form-widget/container-widget/detail-temp-widget.vue +132 -0
  47. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +250 -250
  48. package/src/components/xform/form-designer/form-widget/container-widget/h5-card-pane-widget.vue +23 -2
  49. package/src/components/xform/form-designer/form-widget/container-widget/h5-card-widget.vue +30 -1
  50. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +319 -320
  51. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +365 -365
  52. package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +185 -185
  53. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +554 -555
  54. package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +409 -409
  55. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +150 -132
  56. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +114 -114
  57. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +154 -154
  58. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +47 -1
  59. package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +178 -178
  60. package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -77
  61. package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +6 -0
  62. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +139 -139
  63. package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +1 -1
  64. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +106 -106
  65. package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +134 -134
  66. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +3 -2
  67. package/src/components/xform/form-designer/indexMixin.js +35 -1
  68. package/src/components/xform/form-designer/setting-panel/form-setting.vue +39 -39
  69. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +10 -10
  70. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +438 -432
  71. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +2103 -2103
  72. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-temp-edito.vue +90 -0
  73. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +82 -82
  74. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +833 -846
  75. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +8 -8
  76. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +137 -137
  77. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
  78. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +43 -43
  79. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +43 -43
  80. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -96
  81. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +51 -0
  82. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +42 -42
  83. package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +43 -43
  84. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +158 -158
  85. package/src/components/xform/form-designer/setting-panel/property-editor/h5Span-editor.vue +51 -0
  86. package/src/components/xform/form-designer/setting-panel/property-editor/itemStyle-editor.vue +39 -0
  87. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -188
  88. package/src/components/xform/form-designer/setting-panel/property-editor/styleTempClass-editor.vue +51 -0
  89. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +347 -347
  90. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +12 -0
  91. package/src/components/xform/form-designer/toolbar-panel/index.vue +884 -874
  92. package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +14 -0
  93. package/src/components/xform/form-designer/widget-panel/index.vue +11 -7
  94. package/src/components/xform/form-designer/widget-panel/indexMixin.js +30 -6
  95. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +112 -4
  96. package/src/components/xform/form-render/container-item/data-table-mixin.js +151 -93
  97. package/src/components/xform/form-render/container-item/detail-h5-item.vue +204 -34
  98. package/src/components/xform/form-render/container-item/detail-temp-item.vue +110 -0
  99. package/src/components/xform/form-render/container-item/h5-card-pane-item.vue +160 -140
  100. package/src/components/xform/form-render/container-item/list-h5-item.vue +1913 -1699
  101. package/src/components/xform/form-render/index.vue +153 -147
  102. package/src/components/xform/form-render/indexMixin.js +35 -3
  103. package/src/components/xform/lang/en-US.js +14 -0
  104. package/src/components/xform/lang/zh-CN.js +17 -0
  105. package/src/components/xform/mixins/defaultHandle.js +707 -707
  106. package/src/components/xform/styles/h5.scss +2262 -0
  107. package/src/components/xform/utils/textMaskUtil.js +182 -179
  108. package/src/components/xform/utils/treeTableUtil.js +1292 -1265
  109. package/src/components/xform/utils/util.js +56 -11
  110. package/src/directive/append-to-body/index.js +48 -0
  111. package/src/index.js +13 -4
  112. package/src/layout/components/Sidebar/default.vue +1655 -1655
  113. package/src/layout/components/extractedCode/viewDialog.vue +7 -7
  114. package/src/router/index.js +48 -27
  115. package/src/router/modules/customer.js +71 -14
  116. package/src/store/modules/permission.js +17 -18
  117. package/src/utils/assetUrl.js +19 -0
  118. package/src/utils/pdfUtil.js +429 -429
  119. package/src/utils/resolveViewComponent.js +142 -16
  120. package/src/utils/vab.js +1283 -1279
  121. package/src/views/bd/project/branch/bd_branch/edit.vue +145 -0
  122. package/src/views/bd/project/branch/bd_branch/list.vue +72 -0
  123. package/src/views/bd/project/branch/bd_branch/menuKindDialog.vue +106 -0
  124. package/src/views/bd/project/branch/bd_branch/mixins/edit.js +189 -0
  125. package/src/views/bd/project/branch/bd_branch/mixins/list.js +124 -0
  126. package/src/views/bd/project/branch/bd_branch/mixins/menuKindDialog.js +85 -0
  127. package/src/views/bd/project/branch/form_script/list.vue +31 -0
  128. package/src/views/bd/project/branch/form_template/list.vue +30 -0
  129. package/src/views/bd/project/branch/menu_kind/list.vue +31 -0
  130. package/src/views/bd/project/common/form_script/list.vue +16 -0
  131. package/src/views/bd/project/common/form_template/list.vue +15 -0
  132. package/src/views/bd/project/common/menu_kind/list.vue +15 -0
  133. package/src/views/bd/project/core/branchContext.js +100 -0
  134. package/src/views/bd/project/core/branchPage.js +78 -0
  135. package/src/views/bd/project/core/branchPageWrap.vue +225 -0
  136. package/src/views/bd/project/core/branchScope.js +44 -0
  137. package/src/views/bd/project/core/branchSearchPage.js +285 -0
  138. package/src/views/bd/project/core/branchSelect.vue +85 -0
  139. package/src/views/bd/project/core/branchTreeBar.vue +81 -0
  140. package/src/views/bd/project/core/httpBranchPatch.js +58 -0
  141. package/src/views/bd/project/datatable/menu_kind/list.vue +15 -0
  142. package/src/views/bd/project/datatable/table_model/list.vue +15 -0
  143. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
  144. package/src/views/bd/setting/form_template/edit.vue +378 -356
  145. package/src/views/bd/setting/form_template/formDesignerDialog.vue +6 -0
  146. package/src/views/bd/setting/form_template/formTemplateType.js +43 -0
  147. package/src/views/bd/setting/form_template/list.vue +304 -303
  148. package/src/views/bd/setting/form_template/mixins/edit.js +344 -280
  149. package/src/views/bd/setting/form_template/mixins/list.js +748 -721
  150. package/src/views/bd/setting/table_model/edit.vue +1066 -1066
  151. package/src/views/bd/setting/table_model/mixins/edit.js +1455 -1455
  152. package/src/views/bd/setting/table_model/mixins/zdDialog.js +148 -148
  153. package/src/views/support/form-dialog-demo/demoPickerDialog.vue +72 -0
  154. package/src/views/support/form-dialog-demo/index.vue +537 -0
  155. package/src/views/user/file_view_ins/list.vue +970 -970
  156. package/src/views/user/form/vform/designer.vue +823 -821
  157. package/src/views/user/home/default.vue +1117 -1117
  158. package/src/views/user/home/default2.vue +1 -1
  159. package/src/views/user/home/index.vue +103 -101
  160. package/src/views/user/notify_message/dialog.vue +139 -137
  161. package/src/views/user/outLink/form_view.vue +202 -202
  162. package/src/views/user/outLink/index.vue +110 -110
  163. package/src/views/user/outLink/view.vue +3 -3
  164. package/src/views/user/role/edit.vue +632 -632
  165. package/src/views/user/role/list.vue +260 -260
  166. package/src/views/user/wf/iframe/index.vue +51 -51
  167. package/src/views/user/wf/iframe/index2.vue +64 -64
  168. package/src/views/user/wf/wf_manage/list.vue +1112 -1116
  169. package/src/views/user/wf/wf_manage/list2.vue +871 -875
  170. package/src/views/user/wf/wf_manage/wfContentDialog.vue +134 -131
  171. package/src/views/user/wf/wf_obj_config/importItemDialog.vue +1 -1
  172. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +0 -106
  173. package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +0 -99
  174. package/src/components/xform/form-render/container-item/list-h5-item2.vue +0 -1340
  175. package/src/utils/wf.js +0 -766
@@ -2,17 +2,18 @@
2
2
  import {getToken} from "../../utils/auth";
3
3
  import settingConfig from "@/settings.js";
4
4
  import {selectDialogMixins} from "../../mixins/selectDialog";
5
- import {requireViewCompat} from "@base/utils/resolveViewComponent";
5
+ import {requireViewAsync} from "@base/utils/resolveViewComponent";
6
6
  import {getWfButtonNames, loadWfButtonNames} from "./wfButtonName";
7
7
  import {isWfAutoConfirm, loadWfAutoConfirm} from "./wfAutoConfirm";
8
8
 
9
9
  let configUtil = {
10
10
  baseUrl: process.env.VUE_APP_BASE_API,
11
11
  getToken,
12
- // 归属自己 / 包内组件本地渲染;归属别家子应用(remote)或缺文件时返回 null,
13
- // 不再抛错崩溃。归属解析见 @base/utils/resolveViewComponent
12
+ // 归属自己 / 包内组件本地渲染;归属别家子应用(remote)、缺文件或 chunk 加载失败时
13
+ // 解析为 null,不抛错崩溃。返回 Promise,调用方必须 await
14
+ // 归属解析见 @base/utils/resolveViewComponent。
14
15
  requireView: (url) => {
15
- return requireViewCompat(url);
16
+ return requireViewAsync(url);
16
17
  },
17
18
  };
18
19
 
@@ -198,11 +199,12 @@ wfIndexMixin = {
198
199
  modalStrictly: true,
199
200
  });
200
201
  },
201
- openWfModifyDialog() {
202
+ async openWfModifyDialog() {
202
203
  let row = this.paramData;
203
204
  let url = row.url + ".vue";
204
205
  this.showModifyDialog = true;
205
- this.content = configUtil.requireView(url);
206
+ // await 之后再 $openEditView:它是 200ms 定时放行,冷启动拉 chunk 常超过它
207
+ this.content = await configUtil.requireView(url);
206
208
  this.$openEditView("showBillEdit");
207
209
  },
208
210
  modfyDialogClose() {
@@ -828,8 +830,23 @@ wfContentMixin = {
828
830
  },
829
831
  });
830
832
  },
833
+ /**
834
+ * 提醒只是主流程前面的一道增强,不能让它把主流程带崩或卡死:
835
+ * - 放行只允许一次(go 自带闸门),成功/异常各分支共用一个出口;
836
+ * - 确认框点取消 = 放弃本次操作,什么都不做,但 MessageBox 的 reject 必须吃掉,
837
+ * 否则是一条 unhandled rejection;
838
+ * - error 分支绝不能抛异常。request.js 是先调 config.error(e) 再 removeModel(config),
839
+ * 这里一抛,isLoading 的全屏遮罩就永远关不掉、整页被锁死。而网络失败/超时时
840
+ * e.response 本就是 undefined,老写法 e.response.status 必崩 —— 故 status 取值判空。
841
+ */
831
842
  handleReminderContent(scriptType, callback){
832
843
  let that = getTarget(this);
844
+ let called = false;
845
+ const go = () => {
846
+ if (called) return
847
+ called = true;
848
+ callback && callback();
849
+ };
833
850
  that.$http({
834
851
  url: this.current_prefix + "/wf/getReminderContent",
835
852
  data: {
@@ -841,23 +858,25 @@ wfContentMixin = {
841
858
  isLoading: true,
842
859
  errorMsg: false,
843
860
  success: (res) => {
844
- if(res.objx){
845
- that.$baseConfirm(res.objx).then(() => {
846
- callback && callback();
847
- });
861
+ if(res && res.objx){
862
+ that.$baseConfirm(res.objx).then(go).catch(() => {});
848
863
  }else{
849
- callback && callback();
864
+ go();
850
865
  }
851
866
  },
852
867
  error: (e) => {
853
- if(e.response.status === 404){
854
- callback && callback();
855
- }else{
856
- that.$errorMsg({
857
- content: e.message,
858
- type: 'error',
859
- });
868
+ let status = e && e.response ? e.response.status : null;
869
+ if(status === 404){
870
+ // 后端没部署这个接口,等同于「没有提醒」,静默放行
871
+ go();
872
+ return
860
873
  }
874
+ /* 其余错误只提示不放行:提醒内容可能是必须让人看到的业务警告,
875
+ 接口挂了就悄悄跳过等于把它吞掉。用户重试即可。 */
876
+ that.$errorMsg({
877
+ content: (e && e.message) || this.$t2('获取提醒内容失败', 'components.wf.reminderError'),
878
+ type: 'error',
879
+ }).catch(() => {});
861
880
  },
862
881
  });
863
882
  },
@@ -1983,11 +2002,12 @@ wfModifyMixin = {
1983
2002
  this.openWfModifyDialog(this.code);
1984
2003
  },
1985
2004
  methods: {
1986
- openWfModifyDialog() {
2005
+ async openWfModifyDialog() {
1987
2006
  let row = this.paramData;
1988
2007
  let url = row.url + ".vue";
1989
2008
  this.showModifyDialog = true;
1990
- this.content = configUtil.requireView(url);
2009
+ // await 之后再 $openEditView:它是 200ms 定时放行,冷启动拉 chunk 常超过它
2010
+ this.content = await configUtil.requireView(url);
1991
2011
  this.$openEditView("showBillEdit");
1992
2012
  },
1993
2013
  modfyDialogClose() {
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="wf-action-dropdown-wrap button-sty" v-show="items.length">
3
- <!-- 通过 / 驳回 / 撤回 挪出下拉,在标题栏直接平铺;其余操作仍收在「更多」下拉里 -->
3
+ <!-- 通过 / 中断 / 驳回 挪出下拉,在标题栏直接平铺;其余操作(含撤回)仍收在「更多」下拉里 -->
4
4
  <el-button
5
5
  v-for="item in standaloneItems"
6
6
  :key="item.key"
@@ -10,7 +10,7 @@
10
10
 
11
11
  /* 详情标题栏里不收进下拉、直接平铺成独立按钮的操作。
12
12
  顺序按 getWfActionItems 的定义序,不按这里的书写序。 */
13
- export const HEADER_STANDALONE_KEYS = ["agree", "reject", "revoke"];
13
+ export const HEADER_STANDALONE_KEYS = ["agree", "manual", "reject"];
14
14
 
15
15
  export function getWfActionItems(vm) {
16
16
  let wfInfo = (vm && vm.wfInfo) || {};
@@ -148,12 +148,17 @@ let chartContainers = [],
148
148
 
149
149
  clearDesigner(skipHistoryChange) {
150
150
  let emptyWidgetListFlag = this.widgetList.length === 0;
151
+ /* 版式是"当前在设计哪一端",不是表单内容的一部分。defaultFormConfig 里没有
152
+ layoutType,overwriteObj 之后 getLayoutType() 会退回 "PC" —— 在 H5 模板里
153
+ 点一下「清空」,左侧面板就跳回 PC 组件列表了。先存后还。 */
154
+ let keepLayoutType = this.getLayoutType();
151
155
  this.widgetList = [];
152
156
  this.selectedId = null;
153
157
  this.selectedWidgetName = null;
154
158
  this.selectedWidget = {}; //this.selectedWidget = null
155
159
  baseRefUtil.overwriteObj(this.formConfig, defaultFormConfig); //
156
160
  this.formConfig.gridConfig = defaultFormConfig.gridConfig;
161
+ this.formConfig.layoutType = keepLayoutType;
157
162
 
158
163
  if (!!skipHistoryChange) {
159
164
  //什么也不做!!
@@ -1543,57 +1548,35 @@ let chartContainers = [],
1543
1548
  newCol.options.label = "基本信息";
1544
1549
  newCon.panes.push(newCol);
1545
1550
  } else if (newCon.type === "detail-h5") {
1546
- /*let newTab = this.copyNewContainerWidget(this.getContainerByType('tab'));
1547
- newCon.panes.push(newTab)
1548
-
1549
- newTab.options.tabClass = "tab-box";
1550
- let newTabPane = newTab.tabs[0];
1551
- newTabPane.options.label = '基本信息';*/
1552
-
1553
- //基本信息
1551
+ // 一张 h5-card:基础信息 / 明细信息 / 附件信息
1554
1552
  let newCard = this.copyNewContainerWidget(
1555
1553
  this.getContainerByType("h5-card")
1556
1554
  );
1557
- // newTabPane.widgetList.push(newCard);
1558
1555
  newCon.panes.push(newCard);
1559
1556
 
1560
- //明细信息
1557
+ // 基础信息:默认放 h5 表格(一行两列),对齐 PC 详情的「基础信息 + 表格」
1558
+ let basicPane = newCard.panes[0];
1559
+ if (basicPane) {
1560
+ basicPane.options.label = "基础信息";
1561
+ let h5Table = this.copyNewContainerWidget(
1562
+ this.getContainerByType("h5-table")
1563
+ );
1564
+ basicPane.widgetList.push(h5Table);
1565
+ }
1566
+
1567
+ // 明细信息:H5 列表;只读阶段不预置新增/查看按钮(点行仍可进详情)
1561
1568
  let newCardPane = this.copyNewContainerWidget(
1562
1569
  this.getContainerByType("h5-card-pane")
1563
1570
  );
1564
1571
  newCardPane.options.label = "明细信息";
1565
1572
  newCard.panes.push(newCardPane);
1566
1573
 
1567
- //列表
1568
1574
  let listH5 = this.copyNewContainerWidget(
1569
1575
  this.getContainerByType("list-h5")
1570
- ); //vabUpload
1571
- newCardPane.widgetList.push(listH5);
1572
-
1573
- //列表新增按钮
1574
- let buttonCon = this.copyNewFieldWidget(
1575
- this.getFieldWidgetByType("button")
1576
- );
1577
- buttonCon.options.label = "新增";
1578
- buttonCon.options.icon = "el-icon-search";
1579
- buttonCon.options.onClick =
1580
- "this.getWidgetRef('" + listH5.options.name + "').addTableData();";
1581
- newCardPane.buttonWidgetList.push(buttonCon);
1582
-
1583
- //列表行查看按钮
1584
- buttonCon = this.copyNewFieldWidget(
1585
- this.getFieldWidgetByType("button")
1586
1576
  );
1587
- buttonCon.options.rowFlag = true;
1588
- buttonCon.options.label = "查看";
1589
- buttonCon.options.icon = "el-icon-edit";
1590
- buttonCon.options.onClick =
1591
- "this.getWidgetRef('" +
1592
- listH5.options.name +
1593
- "').openRowDetailDialog(row);";
1594
- listH5.lineButtons.push(buttonCon);
1577
+ newCardPane.widgetList.push(listH5);
1595
1578
 
1596
- //附件信息
1579
+ // 附件信息
1597
1580
  newCardPane = this.copyNewContainerWidget(
1598
1581
  this.getContainerByType("h5-card-pane")
1599
1582
  );
@@ -1602,30 +1585,31 @@ let chartContainers = [],
1602
1585
 
1603
1586
  let vabUploadCon = this.copyNewFieldWidget(
1604
1587
  this.getFieldWidgetByType("vabUpload")
1605
- ); //vabUpload
1588
+ );
1606
1589
  newCardPane.widgetList.push(vabUploadCon);
1607
1590
  } else if (newCon.type === "h5-table") {
1608
- for (let i = 0; i < 4; i++) {
1591
+ /* 默认 4 × 2 列,对齐 H5「一行两个」的紧凑版式。
1592
+ 不再预置 input:H5 面板已下架单行输入,空单元格由设计者拖入字段。 */
1593
+ const h5TableCols = 2;
1594
+ const h5TableRows = 4;
1595
+ for (let i = 0; i < h5TableRows; i++) {
1609
1596
  let newRow = {
1610
1597
  cols: [],
1611
1598
  };
1612
1599
  newRow.id = "table-row-" + baseRefUtil.generateId();
1613
1600
  newRow.merged = false;
1614
1601
 
1615
- let newCell = baseRefUtil.deepClone(
1616
- this.getContainerByType("h5-table-cell")
1617
- );
1618
- newCell.id = "table-cell-" + baseRefUtil.generateId();
1619
- newCell.options.name = newCell.id;
1620
- newCell.merged = false;
1621
- newCell.options.colspan = 1;
1622
- newCell.options.rowspan = 1;
1623
- newRow.cols.push(newCell);
1624
-
1625
- let newInput = this.copyNewFieldWidget(
1626
- this.getFieldWidgetByType("input")
1627
- );
1628
- newCell.widgetList.push(newInput);
1602
+ for (let j = 0; j < h5TableCols; j++) {
1603
+ let newCell = baseRefUtil.deepClone(
1604
+ this.getContainerByType("h5-table-cell")
1605
+ );
1606
+ newCell.id = "table-cell-" + baseRefUtil.generateId();
1607
+ newCell.options.name = newCell.id;
1608
+ newCell.merged = false;
1609
+ newCell.options.colspan = 1;
1610
+ newCell.options.rowspan = 1;
1611
+ newRow.cols.push(newCell);
1612
+ }
1629
1613
 
1630
1614
  newCon.rows.push(newRow);
1631
1615
  }
@@ -1770,6 +1754,21 @@ let chartContainers = [],
1770
1754
  newGridCol.id = "detail-pane-" + tmpId;
1771
1755
  newGridCol.options.name = "detailPane" + tmpId;
1772
1756
  newGridCol.options.label = "detailPane" + tmpId;
1757
+ // 默认添加一个栅格控件到新 pane 的 widgetList 中,含3列平均分布
1758
+ let defaultGrid = baseRefUtil.deepClone(
1759
+ this.getContainerByType("grid")
1760
+ );
1761
+ defaultGrid.id = "grid-" + baseRefUtil.generateId();
1762
+ // 添加3列,每列 span=8(24栏栅格均分)
1763
+ for (let i = 0; i < 3; i++) {
1764
+ let col = baseRefUtil.deepClone(
1765
+ this.getContainerByType("grid-col")
1766
+ );
1767
+ col.id = "grid-col-" + baseRefUtil.generateId();
1768
+ col.options.span = 8;
1769
+ defaultGrid.cols.push(col);
1770
+ }
1771
+ newGridCol.widgetList.push(defaultGrid);
1773
1772
  gridWidget.panes.push(newGridCol);
1774
1773
  },
1775
1774