cloud-web-corejs 1.0.280 → 1.1.0-dev.10
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 +174 -34
- package/src/components/VabUpload/previewGroup.js +128 -0
- 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 +122 -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/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 +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 +2238 -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/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 +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/home/wjl/content.vue +1569 -0
- package/src/views/user/notify_message/dialog.vue +139 -137
- package/src/views/user/outLink/cc_form_view.vue +188 -0
- 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
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
# xform H5 —— P2 实现规格
|
|
2
|
+
|
|
3
|
+
> 日期:2026-08-25
|
|
4
|
+
> 上位文档:`2026-08 xform 移动端布局对齐 bill_setting 方案.md`(决策 7 / 9 / 10)
|
|
5
|
+
> 前置:P0(根类 + 样式基线)、P1(骨架 + 底栏 + 明细卡片)**已编码完成**
|
|
6
|
+
> 状态:**wf 移动化 + 附件统一已编码完成**(2026-08-25,lint 无新增错误 + 601 单测全过 +
|
|
7
|
+
> 生产构建通过),待真机联调;**页签一项按拍板跳过**。
|
|
8
|
+
> P2 边界:全链路对齐的最后一段 —— 审批 UI、附件口径、页签皮肤。
|
|
9
|
+
|
|
10
|
+
P2 交付 3 件事:
|
|
11
|
+
|
|
12
|
+
1. 审批(wf)移动化(决策 9,**本文修正该决策**)—— 已编码
|
|
13
|
+
2. 附件缩略图口径统一为 74px(决策 7)—— 已编码(`styles/h5.scss` 块 J)
|
|
14
|
+
3. ~~页签 H5 皮肤(决策 10)~~ —— **跳过**(目标侧 bill_setting 自己把页签关掉了,没有对照基准)
|
|
15
|
+
|
|
16
|
+
## 编码后的补充发现(实施时才暴露,规格里没有)
|
|
17
|
+
|
|
18
|
+
1. **`components/mobile/wf/content.vue` 的 `_wfInfo` / `_taskParam` 是死 props** ——
|
|
19
|
+
`created` 里那行赋值是注释掉的,组件在 `mounted` 里调 `init()` 自己取数,是自给自足的。
|
|
20
|
+
因此 §1.4 设想的「detail-h5 取数后传给面板」行不通:**面板会自己再取一次**。
|
|
21
|
+
最终实现是 detail-h5-item 取一次(算底栏按钮显隐)+ 面板自己取一次,
|
|
22
|
+
与手写移动页现状一致(那边也是 mixin 取一次、content 取一次)。
|
|
23
|
+
没有为省一次请求去改这个公共组件。
|
|
24
|
+
2. **`content.vue` 的根节点 `<h5-card-pane>` 此前没在它自己的 `components` 里注册** ——
|
|
25
|
+
手写移动页是靠 `mixins/mobile/common` 在**宿主**上局部注册才碰巧能渲染。
|
|
26
|
+
Vue 2 解析组件只查自身 `components` 与全局注册、**不查父组件的局部注册**,
|
|
27
|
+
所以被 xform 引用时会渲染不出来。已在 `content.vue` 补上自注册(补它自己的依赖声明)。
|
|
28
|
+
3. **移动版 `wfStartDialog` 不支持 `startConfirmText`** —— 它的 props 只有
|
|
29
|
+
`{dataId, code, serviceId, startParam, visible, parentVue, wfName}`,没有 `option` 通道。
|
|
30
|
+
H5 下该配置此前也从未生效(按钮本就没挂上),故不算能力回退;`wfOption` 里保留该字段。
|
|
31
|
+
同理没有复用 `wfUtil.openStartWfDialog` —— 那个函数把组件来源写死在 `components/wf/` 下,
|
|
32
|
+
拿到的是 PC 弹框。
|
|
33
|
+
4. **卡片外壳没有重复搬** —— `h5CardPane` 的 `.c-item` / `.tit` 直接并进了块 B 的选择器,
|
|
34
|
+
wf 面板复用 xform 已有的卡片视觉,避免维护两套卡片皮肤。
|
|
35
|
+
5. **`.pop-tipsBox` 的 `.icon` 依赖 `resources/images` 下的图标**,而该目录与
|
|
36
|
+
`resources/css` 一样**不在 `package.json` 的 `files` 里** —— 属隐式依赖
|
|
37
|
+
(消费应用现有的 h5.scss 已引用同一批图,风险可控)。已在 scss 里注释标注。
|
|
38
|
+
本项目构建时 webpack 把它内联成 base64,消费应用构建时则解析到它自己的同名文件。
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 一、审批(wf)移动化
|
|
43
|
+
|
|
44
|
+
### 1.1 现状纠正:不是「用了 PC 的 UI」,而是 UI 一概没挂上
|
|
45
|
+
|
|
46
|
+
总方案 §4.8 与 P1 规格都写成「H5 下跑的是 PC 审批 UI」。读完 `components/wf/wfUtil.js` 后确认这个描述是错的,实际情况更严重:
|
|
47
|
+
|
|
48
|
+
`detail-h5-item.createWf` 调 `initWf.call(formTarget.$parent, option)`,而 `initWf` 的 `done()` 是这样找挂载点的:
|
|
49
|
+
|
|
50
|
+
```js
|
|
51
|
+
let wfBtnRegion = $wfBtnRegion ? $wfBtnRegion.$el : that.$el.querySelector(".el-form .d-header >.fr");
|
|
52
|
+
let wfViewRegion = $wfViewRegion ? $wfViewRegion.$el : that.$el.querySelector(".el-form .d-cont");
|
|
53
|
+
let slideWrap = $wfViewRegion ? $wfViewRegion.$el : that.$el.querySelector(".el-form .slide-wrap");
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
这三个选择器全部来自 **PC 详情容器** `detail-item.vue`(它有 `.d-header`)。
|
|
57
|
+
`detail-h5-item.vue` 的 DOM 里**没有** `.d-header` / `.d-cont` / `.slide-wrap`
|
|
58
|
+
(只有 `.h5-detail-wrap` / `.h5-header` / `.h5-detail-body` / `.h5-fixed-bottom-btns`),
|
|
59
|
+
且 `detail-h5-item` 没有传 `option.wfBtnRegion` / `wfViewRegion`,`$refs` 也取不到。
|
|
60
|
+
|
|
61
|
+
于是在 H5 下:
|
|
62
|
+
|
|
63
|
+
| 环节 | 实际结果 |
|
|
64
|
+
|---|---|
|
|
65
|
+
| `wfViewRegion && wfViewRegion.append(instance.$mount().$el)` | 短路,**流程面板既没 mount 也没进 DOM** |
|
|
66
|
+
| 「修改单据」按钮 | 需要 `wfBtnRegion`,不挂 |
|
|
67
|
+
| 「流程启动」按钮 | 需要 `wfBtnRegion`,不挂 |
|
|
68
|
+
| `shouldMountHeaderActions` | 需要 `wfBtnRegion`,恒 false |
|
|
69
|
+
| `option.callback({wfInfo})` | 唯一生效的一环 |
|
|
70
|
+
|
|
71
|
+
`detail-h5-item` 把 callback 里的 `wfInfo` 存进 `data`,**但模板里从未使用** —— 也是死的。
|
|
72
|
+
|
|
73
|
+
**结论:H5 表单的审批能力目前等于零。** P2 不是「换一套皮」,是「从没有到有」。
|
|
74
|
+
|
|
75
|
+
### 1.2 两种范式,别硬套
|
|
76
|
+
|
|
77
|
+
| | PC(`components/wf/wfUtil.js`) | 移动(`mixins/mobile/wf/index.js` + `components/mobile/wf/*`) |
|
|
78
|
+
|---|---|---|
|
|
79
|
+
| 范式 | **注入式**:自己发请求、自己 `querySelector` 找宿主 DOM、`new` 出实例 `append` 进去 | **声明式**:mixin 只提供数据与开关(`wfInfo` / `taskParam` / `hasWf` / `showWfStartBtn` / `showWfModifyBtn` / `wfOption`)和两个方法(`openStartWfDialog` / `openWfModifyDialog`),**UI 由宿主页面自己在模板里摆** |
|
|
80
|
+
| 组件来源 | `require('../../components/wf' + path)` | `require('../../../components/mobile/wf' + path)` |
|
|
81
|
+
| content.vue props | `objId, wfCode, serviceId, _wfInfo, _taskParam, parentVue, defaultShowWfContent, wfConfig` | `_wfInfo, _taskParam, wfOption, defaultShowWfContent`(无 objId/wfCode/serviceId/parentVue,用 `getTarget(this)` 找宿主) |
|
|
82
|
+
|
|
83
|
+
两套 content.vue 的 props **不兼容**(`wfConfig` vs `wfOption`),不能简单换个 require 路径了事。
|
|
84
|
+
|
|
85
|
+
### 1.3 决策修正
|
|
86
|
+
|
|
87
|
+
> **总方案决策 9 原文**:「`wfUtil.initWf` 增加 H5 分支,按 layoutType 选 `components/mobile/wf/*`」。
|
|
88
|
+
> **本文修正为**:**不改 `wfUtil.js`**,`detail-h5-item` 改走声明式,自行取数 + 在模板里渲染移动审批 UI。
|
|
89
|
+
|
|
90
|
+
修正理由:
|
|
91
|
+
|
|
92
|
+
1. 给 `initWf` 加 H5 分支,等于要在 H5 容器里造一批 `.d-header > .fr` / `.d-cont` 假节点去迎合注入式的 `querySelector` —— 为了复用一个本来就不适配的编排,反过来污染 H5 的 DOM 结构;
|
|
93
|
+
2. 两套 content.vue 的 props 不兼容,分支要同时兼容两种 propsData,`wfUtil` 会更难维护,而它是 PC 全线在用的公共文件,**改它的回归面远大于改 detail-h5-item**;
|
|
94
|
+
3. `detail-h5-item` 本身就是个 Vue 组件,模板里直接渲染即可,根本不需要 DOM 注入;
|
|
95
|
+
4. 移动那套声明式编排已经在手写移动页上跑通了,是现成的、验证过的范式。
|
|
96
|
+
|
|
97
|
+
### 1.4 取数
|
|
98
|
+
|
|
99
|
+
`mixins/mobile/wf/index.js` 的取数入口是 `_getBillInfo(option)` —— 它耦合了「先查单据再查流程」的手写页流程(`opt.url` 打业务接口、从 url 里切 `serviceId`)。
|
|
100
|
+
xform 的单据数据是表单自己取的,**不需要那一层**,只需要它内部那两个流程接口:
|
|
101
|
+
|
|
102
|
+
```js
|
|
103
|
+
// wf_prefix = '/' + serviceId
|
|
104
|
+
POST {wf_prefix}/wf/getWfInfo { objTypeCode: wfCode, objId }
|
|
105
|
+
POST {wf_prefix}/wf/getTaskVariables { stringOne: taskId }
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
两个接口 PC/移动完全一致(`wfUtil.js` 的 `initWfInfo` / `getTaskParams` 与 mobile mixin 里的同名方法参数相同)。
|
|
109
|
+
|
|
110
|
+
**做法**:在 `detail-h5-item.vue` 里写一个小的 `loadWfInfo()`,直接打这两个接口,得到
|
|
111
|
+
`hasWf / wfInfo / taskParam`,再按 mobile mixin 的口径算出两个开关:
|
|
112
|
+
|
|
113
|
+
```js
|
|
114
|
+
showWfStartBtn = !hasWf && (option.showStartBtn !== false)
|
|
115
|
+
showWfModifyBtn = hasWf && !!taskParam && !!taskParam.mobileurl && !!wfInfo.toSubmit
|
|
116
|
+
&& (option.showModifyBtn !== false)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
> ★ 注意 `taskParam.mobileurl`:移动版判修改按钮用的是 **`mobileurl`**,PC 版用的是 `url`
|
|
120
|
+
> (`wfUtil.js` 里是 `taskParam.url`)。这是后端给的两个不同字段,别混用 ——
|
|
121
|
+
> 用错会导致「移动端点修改单据打开的是 PC 页面」。
|
|
122
|
+
|
|
123
|
+
### 1.5 模板与选项
|
|
124
|
+
|
|
125
|
+
`detail-h5-item.vue` 模板增加两处:
|
|
126
|
+
|
|
127
|
+
**① 流程面板**,放在 `.h5-detail-body` 内、`panes` 之后:
|
|
128
|
+
|
|
129
|
+
```html
|
|
130
|
+
<component
|
|
131
|
+
v-if="wfEnabled && hasWf"
|
|
132
|
+
:is="mobileWfContent"
|
|
133
|
+
:_wfInfo="wfInfo"
|
|
134
|
+
:_taskParam="taskParam"
|
|
135
|
+
:wfOption="wfOption"
|
|
136
|
+
:defaultShowWfContent="defaultShowWfContent"
|
|
137
|
+
/>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
`mobileWfContent` 用异步组件,避免 PC 表单也把移动 wf 那坨打进主包:
|
|
141
|
+
|
|
142
|
+
```js
|
|
143
|
+
mobileWfContent() {
|
|
144
|
+
return () => import("@base/components/mobile/wf/content.vue");
|
|
145
|
+
},
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**② 启动 / 修改按钮**,进**底部动作栏**(不是标题栏,见 1.6),与 P1 的按钮分流合流 ——
|
|
149
|
+
即把这两个内建按钮拼进 `bottomButtons` 的计算结果里,让它们同样受
|
|
150
|
+
`maxVisibleButtons` 管辖,不然按钮一多底栏还是会挤。
|
|
151
|
+
|
|
152
|
+
`detail-h5.options` 已有 `wfEnabled`,无需新增开关。
|
|
153
|
+
|
|
154
|
+
### 1.6 与既有 wf 方案的关系
|
|
155
|
+
|
|
156
|
+
- **「审批按钮进详情标题栏」(`wfActionInHeaderEnabled` / `wfActionDropdown.vue`)是 PC 口径**,
|
|
157
|
+
H5 不启用:H5 的标题栏只有 38px、放不下,且底部动作栏本来就是移动端的动作区。
|
|
158
|
+
`shouldMountHeaderActions` 在 H5 下本来也恒 false(1.1),保持现状即可,**不要**去改它。
|
|
159
|
+
- **「流程确认框自动确认 param19」「保存并提交收敛为表单设置」是数据/流程口径**,与布局无关,
|
|
160
|
+
H5 直接继承,无需改动。
|
|
161
|
+
- `detail-h5-item.createWf` 里现有的 `startConfirmText: () => formTarget.getWfStartConfirmText()`
|
|
162
|
+
要保留,接进新的启动流程。
|
|
163
|
+
|
|
164
|
+
### 1.7 风险
|
|
165
|
+
|
|
166
|
+
1. `components/mobile/wf/content.vue` 用 `getTarget(this)` 找宿主,取的是 `_hideWf` 等属性 ——
|
|
167
|
+
需要确认它在 xform 的组件树下能正确找到宿主(手写移动页的树形与 xform 不同)。**编码时先验证这一条**,
|
|
168
|
+
不通就给它显式传 props。
|
|
169
|
+
2. `components/mobile/wf/content.vue` 内部 import 了
|
|
170
|
+
`views/mobile/user/user/dialog.vue`(用户选择弹框)——该路径在 `package.json` 的 `files`
|
|
171
|
+
里(`src/views/mobile/user`),随包发布没问题,但消费应用要确认存在。
|
|
172
|
+
3. 移动 wf 的样式依赖 `resources/css/h5.scss`(`.h5-process-info` 等),而那份**不随包发布**
|
|
173
|
+
且 xform 引不到。P2 落地时需把移动 wf 面板用到的样式一并搬进 `xform/styles/h5.scss`,
|
|
174
|
+
或确认 `.mobileApp` 场景下由消费应用自带的 h5.scss 兜住 —— **这是本项最大的不确定点**,
|
|
175
|
+
见 五、待确认 1。
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## 二、附件缩略图口径统一
|
|
180
|
+
|
|
181
|
+
### 2.1 现状:两套并存且互不相通
|
|
182
|
+
|
|
183
|
+
| | 位置 | 尺寸 | 谁在用 |
|
|
184
|
+
|---|---|---|---|
|
|
185
|
+
| A(bill_setting 口径) | `resources/css/h5.scss` 的 `.h5-upload-box` / `.h5-upload-list` | 74px | 只被 `components/mobile/buttonGroup` 与 `views/mobile/user/*/dialog.vue` 三处 `@import`,**xform 引不到** |
|
|
186
|
+
| B(xform 现用) | `resources/css/style.scss:13818` 起 `.h5-form-box .el-upload-list__item` | 102px | xform H5 表单 |
|
|
187
|
+
|
|
188
|
+
### 2.2 做法
|
|
189
|
+
|
|
190
|
+
把 A 的规则搬进 `xform/styles/h5.scss`(作用域 `.xform-h5`,新增块 J),
|
|
191
|
+
覆盖 B。对手是 `.h5-detail-wrap .h5-item .h5-form-box .el-upload-list__item`(0,4,0),
|
|
192
|
+
本方写到 (0,5,0) 以上,遵守 P0 §2.2 的特异度约束。
|
|
193
|
+
|
|
194
|
+
要点:缩略图 74×74 + `border-radius:6px`;上传格子用 `el-icon-camera`;
|
|
195
|
+
删除角标红圆点右上角外挂(`right:-10px; top:-10px`)。
|
|
196
|
+
|
|
197
|
+
**style.scss 的 B 段本次不删**(`components/mobile/*` 手写页可能用到),P3 统一评估。
|
|
198
|
+
|
|
199
|
+
### 2.3 顺带清理:两处 isH5 死代码
|
|
200
|
+
|
|
201
|
+
`isH5` 在四个上传组件里都赋了值,但只有两个真正用了:
|
|
202
|
+
|
|
203
|
+
| 组件 | 用途 | 结论 |
|
|
204
|
+
|---|---|---|
|
|
205
|
+
| `vabUpload-widget.vue:27-28` | `:hidePasteArea.sync="isH5"` + `uploadDialogCustomClass='dialog-upload-h5'` | 有效,保留 |
|
|
206
|
+
| `singleUpload-widget.vue:13-14` | 同上 | 有效,保留 |
|
|
207
|
+
| `baseAttachment-widget.vue:68,145` | 只在 data 声明并赋值,**模板中从未引用** | 死代码 |
|
|
208
|
+
| `vabUpload2-widget.vue:191,223` | 同上,**模板中从未引用** | 死代码 |
|
|
209
|
+
|
|
210
|
+
两处死代码有两条路:删掉,或者补上 `hidePasteArea` / `dialog-upload-h5`
|
|
211
|
+
让它们与另外两个上传组件行为一致。**倾向后者** —— 从命名看当初就是想这么做只是没写完,
|
|
212
|
+
且移动端粘贴区确实该隐藏。见 五、待确认 2。
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## 三、页签 H5 皮肤
|
|
217
|
+
|
|
218
|
+
### 3.1 现状
|
|
219
|
+
|
|
220
|
+
`style.scss:13892` 对 `.h5-detail-wrap .el-tabs.tab-box` 只做了两件事:
|
|
221
|
+
|
|
222
|
+
```scss
|
|
223
|
+
.el-tabs.tab-box {
|
|
224
|
+
.el-tabs__header { background: #fff; line-height: 40px; }
|
|
225
|
+
.el-tabs__content { padding: 0; }
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
没有横向滚动,也没有下划线指示器 —— 与 bill_setting 的 `.tab-box`
|
|
230
|
+
(横滑 + `.item.on::after` 20px 宽 4px 高圆角下划线)差得远。
|
|
231
|
+
|
|
232
|
+
### 3.2 做法(决策 10:不自绘,给 el-tabs 套皮)
|
|
233
|
+
|
|
234
|
+
新增块 K,`.xform-h5 .h5-detail-wrap .el-tabs.tab-box`(0,4,0,压过对手的 0,2,0):
|
|
235
|
+
|
|
236
|
+
- `.el-tabs__nav-wrap` 横向可滚、隐藏滚动条、`::after` 那条通栏底线去掉;
|
|
237
|
+
- `.el-tabs__item` 字号 13px、未选中 `#808080`、选中 `#323232`;
|
|
238
|
+
- `.el-tabs__active-bar` 改成 20px 宽、4px 高、`border-radius:4px`、居中
|
|
239
|
+
(Element 的 active-bar 宽度是 JS 按 item 宽算的,要用 `transform` 配合
|
|
240
|
+
`width:20px !important` 覆盖,并注意它 `transition` 时的位移基准)。
|
|
241
|
+
|
|
242
|
+
> bill_setting 自己的 `.tab-box` 目前是被 `style="height:0"` 关掉的 ——
|
|
243
|
+
> 目标侧这块也没定型,所以本项优先级最低,可以最后做或先跳过。
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## 四、自测清单
|
|
248
|
+
|
|
249
|
+
wf:
|
|
250
|
+
|
|
251
|
+
1. H5 表单挂到一条已启动流程的单据上:流程面板出现在内容区底部、能展开/折叠;
|
|
252
|
+
2. 未启动流程的单据:底栏出现「流程启动」,点击弹移动版启动弹框;
|
|
253
|
+
3. 有待办任务的单据:底栏出现「修改单据」,点击打开的是 **mobileurl** 指向的移动页(不是 PC 页);
|
|
254
|
+
4. 启动确认文案(`startConfirmText`)仍生效;
|
|
255
|
+
5. wf 按钮与业务按钮一起参与 `maxVisibleButtons` 分流,不挤爆底栏;
|
|
256
|
+
6. `wfEnabled=false` 的 H5 表单:不发流程请求、不渲染面板(回归底线);
|
|
257
|
+
7. **PC 表单的审批完全不受影响**(本项没动 `wfUtil.js`,重点回归 PC 详情页)。
|
|
258
|
+
|
|
259
|
+
附件:
|
|
260
|
+
|
|
261
|
+
8. H5 表单里附件缩略图 74×74、圆角 6、删除角标在右上角外挂;
|
|
262
|
+
9. 上传格子是相机图标;
|
|
263
|
+
10. 粘贴区在 H5 下隐藏(四个上传组件表现一致)。
|
|
264
|
+
|
|
265
|
+
页签:
|
|
266
|
+
|
|
267
|
+
11. 页签数量超出一屏时可横滑;
|
|
268
|
+
12. 选中项下方是 20px 短下划线,不是通栏长条。
|
|
269
|
+
|
|
270
|
+
回归:
|
|
271
|
+
|
|
272
|
+
13. PC 版式(layoutType≠H5)下以上全部不生效;
|
|
273
|
+
14. `npm run lint`;`npm run test:unit`;`npm run build:prod`。
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## 五、待确认
|
|
278
|
+
|
|
279
|
+
1. **移动 wf 面板的样式从哪来?**(1.7 风险 3)
|
|
280
|
+
`resources/css/h5.scss` 不随包发布、xform 引不到。三条路:
|
|
281
|
+
a) 把移动 wf 面板用到的样式搬进 `xform/styles/h5.scss`(工作量中等,但彻底);
|
|
282
|
+
b) 只在 `.mobileApp` 场景下用,靠消费应用自带的 h5.scss 兜(回到"样式要手工同步"的老问题);
|
|
283
|
+
c) 先做功能、样式缺失单列一期。
|
|
284
|
+
**倾向 a**,但需要先摸清移动 wf 面板究竟依赖哪些类名,可能不小。
|
|
285
|
+
2. **`baseAttachment` / `vabUpload2` 的 isH5 死代码**:删掉,还是补齐成与另两个一致?倾向补齐。
|
|
286
|
+
3. **页签这项要不要做?** 目标侧(bill_setting)自己都把页签关掉了,
|
|
287
|
+
做了也没有对照基准。倾向:先跳过,等真机看 el-tabs 默认样式在 H5 下是否可接受。
|