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.
- package/package.json +6 -2
- package/src/components/VabUpload/image-viewer.vue +442 -442
- package/src/components/VabUpload/index.vue +45 -3
- package/src/components/VabUpload/mixins.js +126 -19
- package/src/components/VabUpload/view.vue +248 -209
- package/src/components/baseTabs/mixins.js +181 -181
- package/src/components/bizTab/BizBillActions.vue +129 -0
- package/src/components/bizTab/BizTabListPage.vue +391 -0
- package/src/components/bizTab/README.md +378 -0
- package/src/components/bizTab/billTableUtil.js +48 -0
- package/src/components/bizTab/billValidators.js +136 -0
- package/src/components/bizTab/bizBillDetailMixin.js +705 -0
- package/src/components/bizTab/index.js +24 -0
- package/src/components/excelExport/exportFieldDialog.vue +23 -12
- package/src/components/excelExport/exportItemConfigUtil.js +30 -0
- package/src/components/excelExport/mixins.js +3 -3
- package/src/components/excelImport/index.vue +156 -156
- package/src/components/jsonImport/index.vue +1 -1
- package/src/components/langImport/index.vue +1 -1
- package/src/components/mobile/statusTag/mixins.js +1 -61
- package/src/components/mobile/wf/addTaskUserdialog.vue +23 -3
- package/src/components/mobile/wf/content.vue +1705 -1556
- package/src/components/mobile/wf/deleteTaskUserDialog.vue +22 -3
- package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +8 -6
- package/src/components/mobile/wf/selectUserDialog.vue +118 -0
- package/src/components/mobile/wf/setCandidateDialog.vue +25 -4
- package/src/components/mobile/wf/urgingDialog.vue +26 -3
- package/src/components/mobile/wf/wfModifyDialog.vue +4 -0
- package/src/components/obsUpload/index.vue +1 -1
- package/src/components/table/config.js +78 -78
- package/src/components/table/index.js +1276 -1276
- package/src/components/table/plugins/cell-area/index.js +1055 -0
- package/src/components/table/plugins/cell-area/index.scss +77 -0
- package/src/components/table/plugins/cell-area/util.js +224 -0
- package/src/components/table/tableForm.vue +330 -330
- package/src/components/table/tableFormMixin.js +318 -318
- package/src/components/table/vxeFilter/index.js +163 -163
- package/src/components/table/vxeFilter/mixin.js +316 -316
- package/src/components/wf/content.vue +1188 -1188
- package/src/components/wf/wf.js +40 -20
- package/src/components/wf/wfActionDropdown.vue +1 -1
- package/src/components/wf/wfActionItems.js +1 -1
- package/src/components/xform/form-designer/designer.js +51 -52
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +269 -269
- package/src/components/xform/form-designer/form-widget/container-widget/detail-h5-widget.vue +18 -2
- package/src/components/xform/form-designer/form-widget/container-widget/detail-temp-widget.vue +132 -0
- package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +250 -250
- package/src/components/xform/form-designer/form-widget/container-widget/h5-card-pane-widget.vue +23 -2
- package/src/components/xform/form-designer/form-widget/container-widget/h5-card-widget.vue +30 -1
- package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +319 -320
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +365 -365
- package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +185 -185
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +554 -555
- package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +409 -409
- package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +150 -132
- package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +114 -114
- package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +154 -154
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +47 -1
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +178 -178
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -77
- package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +6 -0
- package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +139 -139
- package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +106 -106
- package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +134 -134
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +3 -2
- package/src/components/xform/form-designer/indexMixin.js +35 -1
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +39 -39
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +10 -10
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +438 -432
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +2103 -2103
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-temp-edito.vue +90 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +82 -82
- package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +833 -846
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +8 -8
- package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +137 -137
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +43 -43
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +43 -43
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -96
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +51 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +42 -42
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +43 -43
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +158 -158
- package/src/components/xform/form-designer/setting-panel/property-editor/h5Span-editor.vue +51 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/itemStyle-editor.vue +39 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -188
- package/src/components/xform/form-designer/setting-panel/property-editor/styleTempClass-editor.vue +51 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +347 -347
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +12 -0
- package/src/components/xform/form-designer/toolbar-panel/index.vue +884 -874
- package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +14 -0
- package/src/components/xform/form-designer/widget-panel/index.vue +11 -7
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +30 -6
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +112 -4
- package/src/components/xform/form-render/container-item/data-table-mixin.js +151 -93
- package/src/components/xform/form-render/container-item/detail-h5-item.vue +204 -34
- package/src/components/xform/form-render/container-item/detail-temp-item.vue +110 -0
- package/src/components/xform/form-render/container-item/h5-card-pane-item.vue +160 -140
- package/src/components/xform/form-render/container-item/list-h5-item.vue +1913 -1699
- package/src/components/xform/form-render/index.vue +153 -147
- package/src/components/xform/form-render/indexMixin.js +35 -3
- package/src/components/xform/lang/en-US.js +14 -0
- package/src/components/xform/lang/zh-CN.js +17 -0
- package/src/components/xform/mixins/defaultHandle.js +707 -707
- package/src/components/xform/styles/h5.scss +2262 -0
- package/src/components/xform/utils/textMaskUtil.js +182 -179
- package/src/components/xform/utils/treeTableUtil.js +1292 -1265
- package/src/components/xform/utils/util.js +56 -11
- package/src/directive/append-to-body/index.js +48 -0
- package/src/index.js +13 -4
- package/src/layout/components/Sidebar/default.vue +1655 -1655
- package/src/layout/components/extractedCode/viewDialog.vue +7 -7
- package/src/router/index.js +48 -27
- package/src/router/modules/customer.js +71 -14
- package/src/store/modules/permission.js +17 -18
- package/src/utils/assetUrl.js +19 -0
- package/src/utils/pdfUtil.js +429 -429
- package/src/utils/resolveViewComponent.js +142 -16
- package/src/utils/vab.js +1283 -1279
- package/src/views/bd/project/branch/bd_branch/edit.vue +145 -0
- package/src/views/bd/project/branch/bd_branch/list.vue +72 -0
- package/src/views/bd/project/branch/bd_branch/menuKindDialog.vue +106 -0
- package/src/views/bd/project/branch/bd_branch/mixins/edit.js +189 -0
- package/src/views/bd/project/branch/bd_branch/mixins/list.js +124 -0
- package/src/views/bd/project/branch/bd_branch/mixins/menuKindDialog.js +85 -0
- package/src/views/bd/project/branch/form_script/list.vue +31 -0
- package/src/views/bd/project/branch/form_template/list.vue +30 -0
- package/src/views/bd/project/branch/menu_kind/list.vue +31 -0
- package/src/views/bd/project/common/form_script/list.vue +16 -0
- package/src/views/bd/project/common/form_template/list.vue +15 -0
- package/src/views/bd/project/common/menu_kind/list.vue +15 -0
- package/src/views/bd/project/core/branchContext.js +100 -0
- package/src/views/bd/project/core/branchPage.js +78 -0
- package/src/views/bd/project/core/branchPageWrap.vue +225 -0
- package/src/views/bd/project/core/branchScope.js +44 -0
- package/src/views/bd/project/core/branchSearchPage.js +285 -0
- package/src/views/bd/project/core/branchSelect.vue +85 -0
- package/src/views/bd/project/core/branchTreeBar.vue +81 -0
- package/src/views/bd/project/core/httpBranchPatch.js +58 -0
- package/src/views/bd/project/datatable/menu_kind/list.vue +15 -0
- package/src/views/bd/project/datatable/table_model/list.vue +15 -0
- package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
- package/src/views/bd/setting/form_template/edit.vue +378 -356
- package/src/views/bd/setting/form_template/formDesignerDialog.vue +6 -0
- package/src/views/bd/setting/form_template/formTemplateType.js +43 -0
- package/src/views/bd/setting/form_template/list.vue +304 -303
- package/src/views/bd/setting/form_template/mixins/edit.js +344 -280
- package/src/views/bd/setting/form_template/mixins/list.js +748 -721
- package/src/views/bd/setting/table_model/edit.vue +1066 -1066
- package/src/views/bd/setting/table_model/mixins/edit.js +1455 -1455
- package/src/views/bd/setting/table_model/mixins/zdDialog.js +148 -148
- package/src/views/support/form-dialog-demo/demoPickerDialog.vue +72 -0
- package/src/views/support/form-dialog-demo/index.vue +537 -0
- package/src/views/user/file_view_ins/list.vue +970 -970
- package/src/views/user/form/vform/designer.vue +823 -821
- package/src/views/user/home/default.vue +1117 -1117
- package/src/views/user/home/default2.vue +1 -1
- package/src/views/user/home/index.vue +103 -101
- package/src/views/user/notify_message/dialog.vue +139 -137
- package/src/views/user/outLink/form_view.vue +202 -202
- package/src/views/user/outLink/index.vue +110 -110
- package/src/views/user/outLink/view.vue +3 -3
- package/src/views/user/role/edit.vue +632 -632
- package/src/views/user/role/list.vue +260 -260
- package/src/views/user/wf/iframe/index.vue +51 -51
- package/src/views/user/wf/iframe/index2.vue +64 -64
- package/src/views/user/wf/wf_manage/list.vue +1112 -1116
- package/src/views/user/wf/wf_manage/list2.vue +871 -875
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +134 -131
- package/src/views/user/wf/wf_obj_config/importItemDialog.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +0 -106
- package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +0 -99
- package/src/components/xform/form-render/container-item/list-h5-item2.vue +0 -1340
- package/src/utils/wf.js +0 -766
package/src/components/wf/wf.js
CHANGED
|
@@ -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 {
|
|
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
|
|
13
|
-
//
|
|
12
|
+
// 归属自己 / 包内组件本地渲染;归属别家子应用(remote)、缺文件或 chunk 加载失败时
|
|
13
|
+
// 解析为 null,不抛错崩溃。返回 Promise,调用方必须 await。
|
|
14
|
+
// 归属解析见 @base/utils/resolveViewComponent。
|
|
14
15
|
requireView: (url) => {
|
|
15
|
-
return
|
|
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
|
-
|
|
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
|
-
|
|
864
|
+
go();
|
|
850
865
|
}
|
|
851
866
|
},
|
|
852
867
|
error: (e) => {
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
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
|
-
|
|
2009
|
+
// await 之后再 $openEditView:它是 200ms 定时放行,冷启动拉 chunk 常超过它
|
|
2010
|
+
this.content = await configUtil.requireView(url);
|
|
1991
2011
|
this.$openEditView("showBillEdit");
|
|
1992
2012
|
},
|
|
1993
2013
|
modfyDialogClose() {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
/* 详情标题栏里不收进下拉、直接平铺成独立按钮的操作。
|
|
12
12
|
顺序按 getWfActionItems 的定义序,不按这里的书写序。 */
|
|
13
|
-
export const HEADER_STANDALONE_KEYS = ["agree", "
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
);
|
|
1588
|
+
);
|
|
1606
1589
|
newCardPane.widgetList.push(vabUploadCon);
|
|
1607
1590
|
} else if (newCon.type === "h5-table") {
|
|
1608
|
-
|
|
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
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
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
|
|