cloud-web-corejs 1.0.281 → 1.1.0-dev.5
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 +44 -2
- package/src/components/VabUpload/mixins.js +126 -19
- package/src/components/VabUpload/view.vue +247 -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/mobile/statusTag/mixins.js +1 -61
- package/src/components/mobile/wf/content.vue +1662 -1556
- package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +8 -6
- 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/docs/2026-08 xform H5 P0 /345/256/236/347/216/260/350/247/204/346/240/274.md" +528 -0
- package/src/components/xform/docs/2026-08 xform H5 P1 /345/256/236/347/216/260/350/247/204/346/240/274.md" +412 -0
- package/src/components/xform/docs/2026-08 xform H5 P2 /345/256/236/347/216/260/350/247/204/346/240/274.md" +287 -0
- package/src/components/xform/docs/2026-08 xform /347/247/273/345/212/250/347/253/257/345/270/203/345/261/200/345/257/271/351/275/220 bill_setting /346/226/271/346/241/210.md" +400 -0
- package/src/components/xform/form-designer/designer.js +15 -0
- 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-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/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/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/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 +1 -0
- 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 +19 -5
- 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 +4 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +59 -3
- 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 +183 -32
- 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 +1688 -1700
- package/src/components/xform/form-render/index.vue +153 -147
- package/src/components/xform/form-render/indexMixin.js +12 -0
- package/src/components/xform/lang/en-US.js +10 -0
- package/src/components/xform/lang/zh-CN.js +12 -0
- package/src/components/xform/mixins/defaultHandle.js +707 -707
- package/src/components/xform/styles/h5.scss +1992 -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/index.js +9 -4
- package/src/layout/components/Sidebar/default.vue +1 -1
- package/src/layout/components/extractedCode/viewDialog.vue +7 -7
- package/src/router/index.js +21 -0
- package/src/router/modules/customer.js +71 -14
- package/src/store/modules/permission.js +17 -18
- package/src/utils/pdfUtil.js +429 -429
- package/src/utils/resolveViewComponent.js +142 -16
- 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/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/demo/bizTab/bill/billConfig.js +41 -0
- package/src/views/demo/bizTab/bill/detail.vue +436 -0
- package/src/views/demo/bizTab/bill/list.vue +288 -0
- package/src/views/demo/bizTab/bill/productDialog.vue +176 -0
- package/src/views/demo/bizTab/simple/billApi.js +123 -0
- package/src/views/demo/bizTab/simple/detail.vue +407 -0
- package/src/views/demo/bizTab/simple/list.vue +217 -0
- package/src/views/demo/bizTab/standalone/index.vue +121 -0
- package/src/views/demo/bizTab/wf/billConfig.js +44 -0
- package/src/views/demo/bizTab/wf/detail.vue +661 -0
- package/src/views/demo/bizTab/wf/list.vue +242 -0
- 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 +3 -3
- package/src/views/user/home/default.vue +1 -1
- package/src/views/user/home/default2.vue +1 -1
- package/src/views/user/home/index.vue +8 -6
- package/src/views/user/home/wjl/content.vue +1569 -0
- package/src/views/user/notify_message/dialog.vue +7 -5
- package/src/views/user/outLink/cc_form_view.vue +188 -0
- package/src/views/user/outLink/form_view.vue +2 -2
- package/src/views/user/outLink/index.vue +4 -4
- 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 +3 -3
- package/src/views/user/wf/iframe/index2.vue +3 -3
- package/src/views/user/wf/wf_manage/list.vue +1112 -1116
- package/src/views/user/wf/wf_manage/list2.vue +9 -13
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +8 -5
- 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
|
@@ -509,6 +509,13 @@ function handleWidgetForTraverse(
|
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
|
|
512
|
+
/**
|
|
513
|
+
* 容器 → 子节点所在字段名。
|
|
514
|
+
*
|
|
515
|
+
* 注意:全库同一语义的映射有多份(designer.js 的局部表、indexMixin 的
|
|
516
|
+
* getTableFiledMap / getFormTemplateTableDTOs 两张局部表),改这里时请一并核对,
|
|
517
|
+
* 漏一份的后果参见 loopHandleWidgetItem 里关于 H5 容器的注释。
|
|
518
|
+
*/
|
|
512
519
|
export const itemFieldMap = {
|
|
513
520
|
grid: "cols",
|
|
514
521
|
table: "rows",
|
|
@@ -521,6 +528,7 @@ export const itemFieldMap = {
|
|
|
521
528
|
"vf-box": "widgetList",
|
|
522
529
|
card: "widgetList",
|
|
523
530
|
detail: "panes",
|
|
531
|
+
"detail-plain": "panes", // 与 indexMixin 的两张表对齐,此前这张漏了
|
|
524
532
|
"detail-pane": "widgetList",
|
|
525
533
|
"detail-h5": "panes",
|
|
526
534
|
"h5-card": "panes",
|
|
@@ -724,16 +732,22 @@ export function traverseWidgetsOfContainer(
|
|
|
724
732
|
});
|
|
725
733
|
} else if (con.category === "container") {
|
|
726
734
|
//自定义容器
|
|
735
|
+
/* 容器类型不在 itemFieldMap 里时 key 是 undefined,con[undefined] 也是 undefined,
|
|
736
|
+
直接 .forEach 会抛 TypeError —— 表里没覆盖到的容器(list-h5、detail-tabs、
|
|
737
|
+
tree-pane…)都会中招,故取值后判空再遍历。 */
|
|
727
738
|
let key = itemFieldMap[con.type];
|
|
728
|
-
con[key]
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
739
|
+
let childList = key ? con[key] : null;
|
|
740
|
+
if (childList && childList.length > 0) {
|
|
741
|
+
childList.forEach((cw) => {
|
|
742
|
+
handleContainerTraverse(
|
|
743
|
+
cw,
|
|
744
|
+
fieldHandler,
|
|
745
|
+
containerHandler,
|
|
746
|
+
internalContainerCallFlag,
|
|
747
|
+
staticWidgetsIncluded
|
|
748
|
+
);
|
|
749
|
+
});
|
|
750
|
+
}
|
|
737
751
|
}
|
|
738
752
|
}
|
|
739
753
|
|
|
@@ -1554,6 +1568,16 @@ export function loopHandleWidget(widgetList, callback) {
|
|
|
1554
1568
|
});
|
|
1555
1569
|
}
|
|
1556
1570
|
|
|
1571
|
+
/* 子节点挂在 panes 上的容器(detail-h5 另有 widgetList 承载底部动作栏按钮) */
|
|
1572
|
+
const PANES_CONTAINER_TYPES = [
|
|
1573
|
+
"detail",
|
|
1574
|
+
"detail-plain",
|
|
1575
|
+
"detail-h5",
|
|
1576
|
+
"h5-card",
|
|
1577
|
+
];
|
|
1578
|
+
/* 内容在 widgetList、按钮在 buttonWidgetList 的分组容器 */
|
|
1579
|
+
const PANE_CONTAINER_TYPES = ["detail-pane", "h5-card-pane"];
|
|
1580
|
+
|
|
1557
1581
|
function loopHandleWidgetItem(e, p, callback) {
|
|
1558
1582
|
if ("container" === e.category) {
|
|
1559
1583
|
callback(e, p);
|
|
@@ -1575,6 +1599,18 @@ function loopHandleWidgetItem(e, p, callback) {
|
|
|
1575
1599
|
loopHandleWidgetItem(childItem, e, callback);
|
|
1576
1600
|
});
|
|
1577
1601
|
}
|
|
1602
|
+
/* 行按钮与顶部查询按钮,与 data-table 的 buttons 同一性质,
|
|
1603
|
+
不遍历的话它们的 wf 联动与显隐规则同样不生效 */
|
|
1604
|
+
if (!!e.lineButtons && e.lineButtons.length > 0) {
|
|
1605
|
+
e.lineButtons.forEach((childItem) => {
|
|
1606
|
+
loopHandleWidgetItem(childItem, e, callback);
|
|
1607
|
+
});
|
|
1608
|
+
}
|
|
1609
|
+
if (!!e.buttons && e.buttons.length > 0) {
|
|
1610
|
+
e.buttons.forEach((childItem) => {
|
|
1611
|
+
loopHandleWidgetItem(childItem, e, callback);
|
|
1612
|
+
});
|
|
1613
|
+
}
|
|
1578
1614
|
} else if ("grid" === e.type) {
|
|
1579
1615
|
e.cols &&
|
|
1580
1616
|
e.cols.length > 0 &&
|
|
@@ -1611,7 +1647,14 @@ function loopHandleWidgetItem(e, p, callback) {
|
|
|
1611
1647
|
loopHandleWidgetItem(childItem, e, callback);
|
|
1612
1648
|
});
|
|
1613
1649
|
});
|
|
1614
|
-
|
|
1650
|
+
/* 子节点放在 panes 里的容器。detail-h5 / h5-card 是 H5 版式的两个,
|
|
1651
|
+
此前它们没有分支、落到最后的兜底 else,而兜底只遍历 widgetList ——
|
|
1652
|
+
等于 H5 表单的字段和按钮一个都进不了 traverseAllWidgets* 的回调,
|
|
1653
|
+
wf 联动(hiddenByWf/enabledByWf/wfEdit)、组件显隐规则等全部失效。
|
|
1654
|
+
设计器侧的 designer.js 早有正确映射("detail-h5"/"h5-card" → panes),
|
|
1655
|
+
这里是运行时遍历器没跟上。
|
|
1656
|
+
(detail-h5 的 widgetList 是底部动作栏按钮,也要一起遍历) */
|
|
1657
|
+
} else if (PANES_CONTAINER_TYPES.indexOf(e.type) > -1) {
|
|
1615
1658
|
if (e.panes) {
|
|
1616
1659
|
e.panes.forEach(function (childItem) {
|
|
1617
1660
|
loopHandleWidgetItem(childItem, e, callback);
|
|
@@ -1622,7 +1665,9 @@ function loopHandleWidgetItem(e, p, callback) {
|
|
|
1622
1665
|
loopHandleWidgetItem(childItem, e, callback);
|
|
1623
1666
|
});
|
|
1624
1667
|
}
|
|
1625
|
-
|
|
1668
|
+
/* h5-card-pane 与 detail-pane 同构:内容在 widgetList、分组按钮在 buttonWidgetList。
|
|
1669
|
+
兜底 else 只认 widgetList,会漏掉分组按钮(如自动骨架里的「新增」)。 */
|
|
1670
|
+
} else if (PANE_CONTAINER_TYPES.indexOf(e.type) > -1) {
|
|
1626
1671
|
if (e.widgetList) {
|
|
1627
1672
|
e.widgetList.forEach(function (childItem) {
|
|
1628
1673
|
loopHandleWidgetItem(childItem, e, callback);
|
package/src/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import store from "@base/store";
|
|
|
12
12
|
import router, { resetRouter } from "@base/router";
|
|
13
13
|
import settings from "@/settings";
|
|
14
14
|
import { setToken as setAuthToken } from "@base/utils/auth";
|
|
15
|
-
import {
|
|
15
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
|
|
16
16
|
|
|
17
17
|
import "@/icons"; // icon
|
|
18
18
|
import "@base/permission"; // permission control
|
|
@@ -28,7 +28,12 @@ Vue.component("BaseKeepAlive", BaseKeepAlive);
|
|
|
28
28
|
import VXETable from "vxe-table";
|
|
29
29
|
import "vxe-table/lib/style.css";
|
|
30
30
|
|
|
31
|
-
//
|
|
31
|
+
// 区域选取/复制粘贴:自研实现,通过 window.VXETableMixin 挂载,
|
|
32
|
+
// 必须在下面的 Vue.use(VXETable) 之前求值(core 在 install 时读取一次并 delete)
|
|
33
|
+
import "@base/components/table/plugins/cell-area/index.js";
|
|
34
|
+
import "@base/components/table/plugins/cell-area/index.scss";
|
|
35
|
+
|
|
36
|
+
// 引入扩展插件(官方付费插件,已由上面的自研 cell-area 替代,保留仅作回退参考)
|
|
32
37
|
// import "@base/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.es6.min.js";
|
|
33
38
|
// import "@base/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.min.css";
|
|
34
39
|
|
|
@@ -306,7 +311,7 @@ function render(props = {}) {
|
|
|
306
311
|
* 仅 $baseReload / _handleCallback 覆盖为回主应用的动作。个别详情页若有更深的 $parent 依赖,
|
|
307
312
|
* 按对接清单 §5.6 做最小改造。
|
|
308
313
|
*/
|
|
309
|
-
function mountDetailHost(props = {}) {
|
|
314
|
+
async function mountDetailHost(props = {}) {
|
|
310
315
|
if (props.appCode) settings.appCode = props.appCode;
|
|
311
316
|
if (props.token) {
|
|
312
317
|
setAuthToken(props.token);
|
|
@@ -315,7 +320,7 @@ function mountDetailHost(props = {}) {
|
|
|
315
320
|
if (props.lang) i18n.locale = props.lang;
|
|
316
321
|
|
|
317
322
|
const appCode = props.appCode || settings.appCode;
|
|
318
|
-
const resolved =
|
|
323
|
+
const resolved = await loadViewComponentAsync(props.targetPath, { appCode });
|
|
319
324
|
const target = resolved.component;
|
|
320
325
|
const bizParams = props.bizParams || {};
|
|
321
326
|
const viewMeta = props.viewMeta || {};
|
|
@@ -757,7 +757,7 @@ export default {
|
|
|
757
757
|
let userInfo = res.objx;
|
|
758
758
|
this.headPhotoUrl = userInfo.headPhotoUrl
|
|
759
759
|
? userInfo.headPhotoUrl
|
|
760
|
-
: require("@/resources/images"
|
|
760
|
+
: (require("@/resources/images/default-header.png").default || require("@/resources/images/default-header.png"));
|
|
761
761
|
this.userInfo = userInfo;
|
|
762
762
|
},
|
|
763
763
|
});
|
|
@@ -100,7 +100,7 @@ export default {
|
|
|
100
100
|
this.$emit("update:visible", false);
|
|
101
101
|
this.$emit("close");
|
|
102
102
|
},
|
|
103
|
-
openWfDialog() {
|
|
103
|
+
async openWfDialog() {
|
|
104
104
|
let obj = this.extractedRow?.obj;
|
|
105
105
|
if (!obj) return;
|
|
106
106
|
let objType = this.extractedRow.objType;
|
|
@@ -110,27 +110,27 @@ export default {
|
|
|
110
110
|
readonly: true,
|
|
111
111
|
};
|
|
112
112
|
|
|
113
|
-
let
|
|
113
|
+
let loadView;
|
|
114
114
|
if (objType == "FormTemplate") {
|
|
115
|
-
|
|
115
|
+
loadView = () => import("@base/views/bd/setting/form_template/edit.vue");
|
|
116
116
|
wfDataId = obj.formCode;
|
|
117
117
|
this.title = this.$t1("查看表单模板");
|
|
118
118
|
} else if (objType == "FormScript") {
|
|
119
119
|
if (obj.scriptType == 1) {
|
|
120
|
-
|
|
120
|
+
loadView = () => import("@base/views/bd/setting/form_script/edit1.vue");
|
|
121
121
|
} else {
|
|
122
|
-
|
|
122
|
+
loadView = () => import("@base/views/bd/setting/form_script/edit.vue");
|
|
123
123
|
}
|
|
124
124
|
this.title = this.$t1("查看表单脚本");
|
|
125
125
|
} else if (objType == "TableTemplate") {
|
|
126
|
-
|
|
126
|
+
loadView = () => import("@base/views/bd/setting/table_model/edit.vue");
|
|
127
127
|
this.title = this.$t1("查看数据表定义模板");
|
|
128
128
|
}
|
|
129
129
|
this.param = Object.assign(param, {
|
|
130
130
|
_dataId: wfDataId,
|
|
131
131
|
extractedObj: obj,
|
|
132
132
|
});
|
|
133
|
-
this.wfContent =
|
|
133
|
+
this.wfContent = loadView ? (await loadView()).default : null;
|
|
134
134
|
|
|
135
135
|
this.showWfContent = true;
|
|
136
136
|
},
|
package/src/router/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Vue from "vue";
|
|
2
2
|
import Router from "vue-router";
|
|
3
|
+
import { Message } from "element-ui";
|
|
3
4
|
|
|
4
5
|
Vue.use(Router);
|
|
5
6
|
|
|
@@ -19,6 +20,26 @@ const createRouter = () =>
|
|
|
19
20
|
|
|
20
21
|
const router = createRouter();
|
|
21
22
|
|
|
23
|
+
// 视图改按需加载后,路由跳转会真的去网络拉 chunk,于是多出一类以前不可能发生的失败:
|
|
24
|
+
// 发版后旧标签页持有的 chunk 哈希已失效(404)、网络超时、或被网关截断(截断表现为
|
|
25
|
+
// chunk 内 SyntaxError,不是网络错误)。vue-router 对这类失败是静默的——点了没反应。
|
|
26
|
+
//
|
|
27
|
+
// 菜单驱动的视图不走这里:store/modules/permission.js 的 loadView 自己 catch 后渲染
|
|
28
|
+
// MenuFallback。这里兜的是 constantRoutes 里那批 () => import(...) 的静态路由。
|
|
29
|
+
//
|
|
30
|
+
// 只提示、不自动 reload:本系统表单页多,自动刷新会吞掉用户未保存的录入;而且一旦
|
|
31
|
+
// 某个 chunk 持续拉不到(例如网关截断),自动刷新会退化成"用户每点一次就刷一次"的循环。
|
|
32
|
+
router.onError((error) => {
|
|
33
|
+
const msg = (error && error.message) || "";
|
|
34
|
+
if (!/Loading (CSS )?chunk .* failed|ChunkLoadError/i.test(msg)) return;
|
|
35
|
+
console.error("[router] 页面资源加载失败:", error);
|
|
36
|
+
try {
|
|
37
|
+
Message.error("页面资源加载失败,请刷新页面后重试");
|
|
38
|
+
} catch (e) {
|
|
39
|
+
// Message 尚未可用时静默,至少 console 里留了痕迹
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
22
43
|
export function resetRouter() {
|
|
23
44
|
const newRouter = createRouter();
|
|
24
45
|
router.matcher = newRouter.matcher; // reset router
|
|
@@ -1,19 +1,76 @@
|
|
|
1
1
|
export const constantRoutes = [
|
|
2
|
+
/*{
|
|
3
|
+
// 呼叫中心(CC)专用入口:只带 appid/appkey/account/callNo,
|
|
4
|
+
// 先换取 tp 再 replace 到 /form_outLinkView
|
|
5
|
+
path: "/cc_form_outLinkView",
|
|
6
|
+
component: () => import("@base/views/user/outLink/cc_form_view"),
|
|
7
|
+
meta: {
|
|
8
|
+
checkToken: false,
|
|
9
|
+
},
|
|
10
|
+
hidden: true,
|
|
11
|
+
},
|
|
2
12
|
{
|
|
3
13
|
path: "",
|
|
4
14
|
component: () => import("@/layout/index"),
|
|
5
|
-
children: [
|
|
6
|
-
{
|
|
7
|
-
path:
|
|
8
|
-
component: () => import(
|
|
9
|
-
name:
|
|
10
|
-
meta: {
|
|
11
|
-
title:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
children: [
|
|
16
|
+
{
|
|
17
|
+
path: "/basic/wf/wf_manage/list2",
|
|
18
|
+
component: () => import("@base/views/user/wf/wf_manage/list2"),
|
|
19
|
+
name: "wf_manage:list2",
|
|
20
|
+
meta: {
|
|
21
|
+
title: "流程待办",
|
|
22
|
+
icon: "dashboard",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
// bizTab 示例 A:手写接口版(前端 mock,无流程,不吃后台前置条件)
|
|
27
|
+
path: "/demo/bizTab/simple",
|
|
28
|
+
component: () => import("@base/views/demo/bizTab/simple/list"),
|
|
29
|
+
name: "demoBizTabSimple",
|
|
30
|
+
meta: {
|
|
31
|
+
title: "bizTab 示例(手写接口)",
|
|
32
|
+
icon: "dashboard",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
// bizTab 示例 B:formCode + 通用 bd_api(照 stdxx 的产品变更申请页)
|
|
37
|
+
path: "/demo/bizTab/bill",
|
|
38
|
+
component: () => import("@base/views/demo/bizTab/bill/list"),
|
|
39
|
+
name: "demoBizTabBill",
|
|
40
|
+
meta: {
|
|
41
|
+
title: "bizTab 示例(formCode+流程)",
|
|
42
|
+
icon: "dashboard",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
// bizTab 示例 C:自定义控制器 + 流程(照 std / 本仓库 pmd/price/ladderPrice 页)
|
|
47
|
+
path: "/demo/bizTab/wf",
|
|
48
|
+
component: () => import("@base/views/demo/bizTab/wf/list"),
|
|
49
|
+
name: "demoBizTabWf",
|
|
50
|
+
meta: {
|
|
51
|
+
title: "bizTab 示例(自定义接口+流程)",
|
|
52
|
+
icon: "dashboard",
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
// bizTab 示例 D:独立模式(不在页签里,待办直开走的路径),复用示例 C 的详情
|
|
57
|
+
path: "/demo/bizTab/standalone",
|
|
58
|
+
component: () => import("@base/views/demo/bizTab/standalone/index.vue"),
|
|
59
|
+
name: "demoBizTabStandalone",
|
|
60
|
+
meta: {
|
|
61
|
+
title: "bizTab 示例(独立模式)",
|
|
62
|
+
icon: "dashboard",
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
path: "/support/form-dialog-demo",
|
|
67
|
+
component: () => import("@/views/support/form-dialog-demo/index.vue"),
|
|
68
|
+
name: "formDialogDemo",
|
|
69
|
+
meta: {
|
|
70
|
+
title: "formDialog 示例",
|
|
71
|
+
icon: "dashboard",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
},*/
|
|
18
76
|
];
|
|
19
|
-
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
registerSubApps,
|
|
16
16
|
buildSubAppRoutes,
|
|
17
17
|
} from "@base/microRouter";
|
|
18
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
|
|
18
19
|
import MenuFallback from "@base/views/user/menuFallback/index.vue";
|
|
19
20
|
|
|
20
21
|
// qiankun 宿主态(仅 settings.microMainEnabled 的主应用登录后填充)
|
|
@@ -87,7 +88,7 @@ function buildUserInfoSnapshot(userState = {}) {
|
|
|
87
88
|
|
|
88
89
|
let modules = {};
|
|
89
90
|
|
|
90
|
-
// loadView 失败兜底:独立运行点到别家应用的菜单 /
|
|
91
|
+
// loadView 失败兜底:独立运行点到别家应用的菜单 / 菜单配置错误 / 视图 chunk 加载失败时展示提示页
|
|
91
92
|
function createFallbackComponent(view, error) {
|
|
92
93
|
return {
|
|
93
94
|
name: "menuLoadFallback",
|
|
@@ -108,25 +109,23 @@ let configUtl = {
|
|
|
108
109
|
sidebarRoutes,
|
|
109
110
|
Layout,
|
|
110
111
|
getRouters,
|
|
112
|
+
// 委托 resolveViewComponent(全仓唯一的视图 import 落地点)。
|
|
113
|
+
//
|
|
114
|
+
// 这里原来写的是 AMD 异步形式 require([...], resolve, fail),看着是懒加载,实则不是:
|
|
115
|
+
// webpack 的 AMDRequireDependenciesBlockParserPlugin 调 ContextDependencyHelpers.create
|
|
116
|
+
// 时不传 mode,默认落 mode:"sync",且 root/regExp 与 resolveViewComponent 那条完全一致
|
|
117
|
+
// (ContextIdentifier 相同 = 同一个 ContextModule),于是整棵 views 照样焊进入口 chunk。
|
|
118
|
+
// 必须一并改掉,否则只改 resolveViewComponent 的结果是:app.js 变小,但首次点菜单时
|
|
119
|
+
// 下载一个十几 MB 的异步 chunk。
|
|
120
|
+
//
|
|
121
|
+
// 顺带干掉本文件这份重复的 @base/views 前缀嗅探——归属判断统一由 resolveViewPath 负责。
|
|
111
122
|
loadView: function (view) {
|
|
112
123
|
return (resolve) => {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
if (view.startsWith(t)) {
|
|
119
|
-
let path = view.substr(t.length);
|
|
120
|
-
return require(["../../views" + path], resolve, fail);
|
|
121
|
-
} /* else if (view.startsWith(t2)) {
|
|
122
|
-
let path = view.substr(t2.length);
|
|
123
|
-
return require(['@/components' + path], resolve, fail);
|
|
124
|
-
} */
|
|
125
|
-
}
|
|
126
|
-
return require(["@/views" + view], resolve, fail);
|
|
127
|
-
} catch (e) {
|
|
128
|
-
fail(e);
|
|
129
|
-
}
|
|
124
|
+
loadViewComponentAsync(view)
|
|
125
|
+
.then((res) =>
|
|
126
|
+
resolve(res.component || createFallbackComponent(view, res.error))
|
|
127
|
+
)
|
|
128
|
+
.catch((e) => resolve(createFallbackComponent(view, e)));
|
|
130
129
|
};
|
|
131
130
|
},
|
|
132
131
|
};
|