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
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
<container-item-wrapper :widget="widget">
|
|
13
13
|
<div class="h5-detail-wrap grid-container" :class="[customClass]" :ref="widget.id">
|
|
14
14
|
<div class="h5-header">{{ widget.options.label }}</div>
|
|
15
|
-
|
|
15
|
+
<!-- 唯一滚动区:标题栏与底部动作栏 flex:none 固定,内容在这里滚。
|
|
16
|
+
样式见 components/xform/styles/h5.scss 块 G(.h5-detail-body 必须有 min-height:0) -->
|
|
17
|
+
<div class="h5-detail-body">
|
|
16
18
|
<transition-group name="fade" tag="div" class="form-widget-list">
|
|
17
19
|
<template v-if="!!widget.panes && (widget.panes.length > 0)">
|
|
18
20
|
<template v-for="(subWidget, swIdx) in widget.panes">
|
|
@@ -39,12 +41,24 @@
|
|
|
39
41
|
</template>
|
|
40
42
|
</template>
|
|
41
43
|
</transition-group>
|
|
44
|
+
<!-- 移动版流程面板:自给自足(mounted 里自己取数),只需给 wfOption。
|
|
45
|
+
全部用方法求值而非 computed —— 流程状态挂在表单实例上且非响应式,
|
|
46
|
+
computed 会缓存住早于流程就绪时的空值(见 wfStart 的注释)。
|
|
47
|
+
样式见 styles/h5.scss 块 L。 -->
|
|
48
|
+
<mobileWfContent v-if="showWfPanel()" ref="wfContent" :wfOption="getWfOption()"
|
|
49
|
+
:defaultShowWfContent="getDefaultShowWfContent()"
|
|
50
|
+
:hideActions="true"/>
|
|
42
51
|
</div>
|
|
43
52
|
<div class="h5-fixed-bottom-btns ">
|
|
44
53
|
<transition-group name="fade" tag="div" class="form-widget-list">
|
|
45
|
-
<template v-if="
|
|
46
|
-
<template v-for="(subWidget, swIdx) in
|
|
47
|
-
|
|
54
|
+
<template v-if="visibleButtons().length > 0">
|
|
55
|
+
<template v-for="(subWidget, swIdx) in visibleButtons()">
|
|
56
|
+
<!-- 审批动作按钮,不是 widget,单独渲染。只出文字不带图标 -->
|
|
57
|
+
<div class="field-wrapper" v-if="subWidget.__builtin" :key="'b-' + subWidget.__builtin">
|
|
58
|
+
<el-button class="button-sty" :type="subWidget.type"
|
|
59
|
+
@click="subWidget.onClick">{{ subWidget.label }}</el-button>
|
|
60
|
+
</div>
|
|
61
|
+
<template v-else-if="'container' === subWidget.category">
|
|
48
62
|
<component :is="subWidget.type + '-item'" :widget="subWidget" :key="swIdx"
|
|
49
63
|
:parent-list="widget.widgetList"
|
|
50
64
|
:index-of-parent-list="swIdx" :parent-widget="widget">
|
|
@@ -67,6 +81,25 @@
|
|
|
67
81
|
</template>
|
|
68
82
|
</template>
|
|
69
83
|
</transition-group>
|
|
84
|
+
<!-- 超出的按钮收进纯图标下拉。它按内容宽(不参与等分),排在最右。
|
|
85
|
+
popper-class 而非嵌套作用域:el-dropdown-menu 默认 append-to-body,
|
|
86
|
+
菜单 DOM 会被挪到 body 下、脱离 .xform-h5,故样式写成顶层
|
|
87
|
+
.xform-h5-dropdown 选择器(见 styles/h5.scss)。 -->
|
|
88
|
+
<el-dropdown v-if="overflowButtons().length > 0" class="h5-more-dropdown"
|
|
89
|
+
trigger="click" popper-class="xform-h5-dropdown">
|
|
90
|
+
<!-- 裸图标触发器,不套 el-button:底栏在页面底部、菜单往上弹,故用向上箭头 -->
|
|
91
|
+
<i class="el-icon-arrow-up h5-more-icon"></i>
|
|
92
|
+
<el-dropdown-menu slot="dropdown">
|
|
93
|
+
<el-dropdown-item v-for="(subWidget, swIdx) in overflowButtons()" :key="swIdx">
|
|
94
|
+
<el-button v-if="subWidget.__builtin" class="button-sty" :type="subWidget.type"
|
|
95
|
+
@click="subWidget.onClick">{{ subWidget.label }}</el-button>
|
|
96
|
+
<component v-else :is="subWidget.type + '-widget'" :field="subWidget" :designer="null"
|
|
97
|
+
:parent-list="widget.widgetList"
|
|
98
|
+
:index-of-parent-list="swIdx + visibleButtons().length"
|
|
99
|
+
:parent-widget="widget"/>
|
|
100
|
+
</el-dropdown-item>
|
|
101
|
+
</el-dropdown-menu>
|
|
102
|
+
</el-dropdown>
|
|
70
103
|
</div>
|
|
71
104
|
</div>
|
|
72
105
|
|
|
@@ -83,7 +116,18 @@ import containerItemMixin from "./containerItemMixin"
|
|
|
83
116
|
import FieldComponents from '../../../../components/xform/form-designer/form-widget/field-widget/index'
|
|
84
117
|
|
|
85
118
|
|
|
86
|
-
import {
|
|
119
|
+
import {getVisibleWfActionItems} from '../../../../components/wf/wfActionItems'
|
|
120
|
+
|
|
121
|
+
/* H5 底栏只放这四个审批动作,其余(催办/加签/减签/沟通/修改候选人/撤回…)不进底栏。
|
|
122
|
+
★ 这里的书写序就是底栏的显示序:通过 → 驳回 → 中断 → 转办。 */
|
|
123
|
+
const H5_WF_ACTION_KEYS = ['agree', 'reject', 'manual', 'transfer'];
|
|
124
|
+
|
|
125
|
+
/* 底栏平铺的按钮个数上限,超出的收进最右侧的「更多」图标下拉 ——
|
|
126
|
+
即一行最多「3 个操作按钮 + 1 个更多图标」。
|
|
127
|
+
写死而不做成表单选项:这个数由底栏宽度决定,配大了会挤成一团,
|
|
128
|
+
而且此前做成 options.maxVisibleButtons 后,已保存的表单会锁住旧值,
|
|
129
|
+
改了原型默认值也不生效,反成绊脚石。 */
|
|
130
|
+
const H5_BOTTOM_MAX_BUTTONS = 3;
|
|
87
131
|
|
|
88
132
|
export default {
|
|
89
133
|
name: "detail-h5-item",
|
|
@@ -92,6 +136,11 @@ export default {
|
|
|
92
136
|
components: {
|
|
93
137
|
ContainerItemWrapper,
|
|
94
138
|
...FieldComponents,
|
|
139
|
+
/* 懒加载:PC 版式的表单不该把移动 wf 那坨打进主包。
|
|
140
|
+
注:content.vue 的根节点是 <h5-card-pane>,Vue 2 的组件解析只查自身
|
|
141
|
+
components 与全局注册、不查父组件的局部注册,所以那个依赖必须由
|
|
142
|
+
content.vue 自己声明(已在该文件补上),在这里注册是没用的。 */
|
|
143
|
+
mobileWfContent: () => import('../../../../components/mobile/wf/content.vue'),
|
|
95
144
|
},
|
|
96
145
|
props: {
|
|
97
146
|
widget: Object,
|
|
@@ -103,19 +152,142 @@ export default {
|
|
|
103
152
|
},
|
|
104
153
|
mounted() {
|
|
105
154
|
this.handleOnMounted();
|
|
106
|
-
this.$nextTick(() => {
|
|
107
|
-
this.createWf();
|
|
108
|
-
})
|
|
109
155
|
},
|
|
110
156
|
beforeDestroy() {
|
|
111
157
|
this.unregisterFromRefList()
|
|
112
158
|
},
|
|
113
159
|
data() {
|
|
114
|
-
return {
|
|
115
|
-
wfInfo: {}
|
|
116
|
-
}
|
|
160
|
+
return {}
|
|
117
161
|
},
|
|
118
162
|
methods: {
|
|
163
|
+
/**
|
|
164
|
+
* 流程状态实时求值 —— 与 PC 的 detail-item.wfStart() 同口径。
|
|
165
|
+
*
|
|
166
|
+
* 取数不归本组件管:form-render 的 loadDefaultEntityData 在
|
|
167
|
+
* formConfig.wfEnabled 为真时就已经初始化好流程,把结果挂在表单实例上
|
|
168
|
+
* (wfStartOption / wfStartCtx / wfParam / hasWf),入参也在那边算好
|
|
169
|
+
* (objId = dataId、wfCode = reportTemplate.objTypeCode,见 indexMixin:1394)。
|
|
170
|
+
*
|
|
171
|
+
* 必须用方法而不是 computed:wfStartOption / wfStartCtx / wfParam **都不在
|
|
172
|
+
* form-render 的 data 里**(只有 hasWf 在),不是响应式的,computed 会把
|
|
173
|
+
* 早于流程就绪时求得的空值缓存住。监听 hasWf 也不行 —— 单据没启动流程时
|
|
174
|
+
* 它是 false 赋 false,watcher 根本不触发。
|
|
175
|
+
*
|
|
176
|
+
* 注意:容器 options 上那个 wfEnabled 是旧路径的开关,与表单设置里的
|
|
177
|
+
* formConfig.wfEnabled 不是一回事,这里一律以表单实例的状态为准。
|
|
178
|
+
*/
|
|
179
|
+
wfStart() {
|
|
180
|
+
let f = this.getFormRef && this.getFormRef();
|
|
181
|
+
if (!f || !f.wfStartOption) return null
|
|
182
|
+
let param = f.wfParam || {};
|
|
183
|
+
return {
|
|
184
|
+
ctx: f.wfStartCtx || f.$parent,
|
|
185
|
+
option: f.wfStartOption,
|
|
186
|
+
param: param,
|
|
187
|
+
hasWf: !!(f.hasWf || param.hasWf),
|
|
188
|
+
wfInfo: param.wfInfo || {},
|
|
189
|
+
taskParam: param.taskParam || {},
|
|
190
|
+
};
|
|
191
|
+
},
|
|
192
|
+
/**
|
|
193
|
+
* 映射成移动版 content.vue 要的 wfOption。
|
|
194
|
+
* 结果缓存在非响应式实例属性上:模板里调用的方法每次渲染都会执行,
|
|
195
|
+
* 每次返回新对象会让子组件 props 无谓变化;而在渲染期写 data 会触发重渲染循环。
|
|
196
|
+
*/
|
|
197
|
+
getWfOption() {
|
|
198
|
+
if (this._wfOptionCache) return this._wfOptionCache
|
|
199
|
+
let ws = this.wfStart();
|
|
200
|
+
if (!ws) return null
|
|
201
|
+
let opt = ws.option;
|
|
202
|
+
let serviceId = opt.serviceId || "user";
|
|
203
|
+
this._wfOptionCache = {
|
|
204
|
+
objId: opt.objId,
|
|
205
|
+
wfCode: opt.wfCode,
|
|
206
|
+
serviceId: serviceId,
|
|
207
|
+
wf_prefix: "/" + serviceId,
|
|
208
|
+
startParam: opt.startParam,
|
|
209
|
+
startConfirmText: opt.startConfirmText,
|
|
210
|
+
parentVue: ws.ctx,
|
|
211
|
+
};
|
|
212
|
+
return this._wfOptionCache
|
|
213
|
+
},
|
|
214
|
+
/* 流程面板:已启动流程且非预览态才渲染 */
|
|
215
|
+
showWfPanel() {
|
|
216
|
+
let ws = this.wfStart();
|
|
217
|
+
return !this.previewState && !!ws && ws.hasWf;
|
|
218
|
+
},
|
|
219
|
+
/* 宿主通过 $attrs 传「进来就展开流程区」,与 PC 版 wfUtil 同口径 */
|
|
220
|
+
getDefaultShowWfContent() {
|
|
221
|
+
let ws = this.wfStart();
|
|
222
|
+
let target = ws && ws.ctx;
|
|
223
|
+
return !!(target && target.$attrs && target.$attrs.defaultShowWfContent);
|
|
224
|
+
},
|
|
225
|
+
/* 注:H5 底栏不放「流程启动」和「修改单据」两个内建按钮
|
|
226
|
+
(PC 的 wfUtil 与移动版 mixin 里都有,这里按需求去掉),
|
|
227
|
+
底栏只有审批动作 + 业务按钮。 */
|
|
228
|
+
/**
|
|
229
|
+
* 审批动作按钮(通过/驳回/中断/转办)。
|
|
230
|
+
*
|
|
231
|
+
* 复用 PC 的动作注册表 wfActionItems —— 它的 run 是 (wfVm) => wfVm.openAgreeDialog()
|
|
232
|
+
* 这种形式,而这些方法名在移动版 content.vue 里完全一致,所以同一份注册表两边通用。
|
|
233
|
+
*
|
|
234
|
+
* show 用表单实例上的 wfInfo 求值(读 f.hasWf 会建立响应式依赖,流程就绪时能重渲染);
|
|
235
|
+
* run 则要真实的面板实例,点击时才从 $refs 取 —— 那时面板一定已经渲染好了。
|
|
236
|
+
* 面板内那一排同名按钮由 :hideActions="true" 藏掉,不会出现两份。
|
|
237
|
+
*/
|
|
238
|
+
wfActionButtons() {
|
|
239
|
+
let ws = this.wfStart();
|
|
240
|
+
if (!ws || !ws.hasWf || this.previewState) return []
|
|
241
|
+
// 只用 wfInfo 算显隐,不依赖面板实例(它可能还没渲染)
|
|
242
|
+
let items = getVisibleWfActionItems({ wfInfo: ws.wfInfo });
|
|
243
|
+
let byKey = {};
|
|
244
|
+
items.forEach((item) => {
|
|
245
|
+
byKey[item.key] = item;
|
|
246
|
+
});
|
|
247
|
+
// 按 H5_WF_ACTION_KEYS 取,顺序由它决定 —— 不能用 items.filter,
|
|
248
|
+
// 那样保留的是注册表的定义序(通过/中断/驳回/转办),与要求的顺序不一致
|
|
249
|
+
return H5_WF_ACTION_KEYS.map((key) => byKey[key])
|
|
250
|
+
.filter((item) => !!item)
|
|
251
|
+
.map((item) => ({
|
|
252
|
+
__builtin: "wfAction-" + item.key,
|
|
253
|
+
label: item.i18nPath
|
|
254
|
+
? this.$t2(item.defaultLabel, item.i18nPath)
|
|
255
|
+
: item.defaultLabel,
|
|
256
|
+
// 注册表里的 iconClass/elIcon 不取:H5 底栏按钮只出文字
|
|
257
|
+
type: item.buttonType || "primary",
|
|
258
|
+
onClick: () => {
|
|
259
|
+
let wfVm = this.$refs.wfContent;
|
|
260
|
+
if (!wfVm) return
|
|
261
|
+
item.run(wfVm);
|
|
262
|
+
},
|
|
263
|
+
}));
|
|
264
|
+
},
|
|
265
|
+
/**
|
|
266
|
+
* 底栏按钮:审批动作在前(审批中的单据以审批为主),然后是流程启动/修改单据,
|
|
267
|
+
* 最后是业务按钮。hidden 的业务按钮先剔除,否则「更多」里会留空条目
|
|
268
|
+
* (static-content-wrapper 内部只是 v-show 隐藏,el-dropdown-item 仍占一行)。
|
|
269
|
+
*/
|
|
270
|
+
bottomButtons() {
|
|
271
|
+
let widgetButtons = (this.widget.widgetList || []).filter(
|
|
272
|
+
(w) => !w.options || !w.options.hidden
|
|
273
|
+
);
|
|
274
|
+
return this.wfActionButtons().concat(widgetButtons);
|
|
275
|
+
},
|
|
276
|
+
/**
|
|
277
|
+
* 平铺的按钮。宽度由 CSS 的 flex:1 等分决定 ——
|
|
278
|
+
* 1 个铺满、2 个各一半、3 个各三分之一,不需要在这里算。
|
|
279
|
+
*/
|
|
280
|
+
visibleButtons() {
|
|
281
|
+
let list = this.bottomButtons();
|
|
282
|
+
if (list.length <= H5_BOTTOM_MAX_BUTTONS) return list;
|
|
283
|
+
return list.slice(0, H5_BOTTOM_MAX_BUTTONS);
|
|
284
|
+
},
|
|
285
|
+
/** 超出上限的按钮,收进底栏最右侧那个纯图标下拉 */
|
|
286
|
+
overflowButtons() {
|
|
287
|
+
let list = this.bottomButtons();
|
|
288
|
+
if (list.length <= H5_BOTTOM_MAX_BUTTONS) return [];
|
|
289
|
+
return list.slice(H5_BOTTOM_MAX_BUTTONS);
|
|
290
|
+
},
|
|
119
291
|
reload() {
|
|
120
292
|
this.getFormRef().$parent.$baseReload()
|
|
121
293
|
},
|
|
@@ -123,27 +295,6 @@ export default {
|
|
|
123
295
|
if (!!this.previewState) return
|
|
124
296
|
this.getFormRef().saveForm();
|
|
125
297
|
},
|
|
126
|
-
createWf() {
|
|
127
|
-
if (!!this.previewState || !this.widget.options.wfEnabled) return
|
|
128
|
-
let formTarget = this.getFormRef();
|
|
129
|
-
let formData = formTarget.formData;
|
|
130
|
-
if (formData && formData.object_foreign_id) {
|
|
131
|
-
let reportTemplate = formTarget.reportTemplate;
|
|
132
|
-
let formCode = reportTemplate.formCode;
|
|
133
|
-
let option = {
|
|
134
|
-
objId: formData.object_foreign_id, //单据ID
|
|
135
|
-
wfCode: formCode, //流程编码
|
|
136
|
-
showStartBtn: true, //是否放出启动按钮,流程已启动时此参数失效
|
|
137
|
-
serviceId: 'user',
|
|
138
|
-
startConfirmText: () => formTarget.getWfStartConfirmText(),
|
|
139
|
-
callback: ({wfInfo}) => {
|
|
140
|
-
this.wfInfo = wfInfo;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
initWf.call(formTarget.$parent, option);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
}
|
|
147
298
|
},
|
|
148
299
|
}
|
|
149
300
|
</script>
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
/**
|
|
3
|
+
* author: vformAdmin
|
|
4
|
+
* email: vdpadmin@163.com
|
|
5
|
+
* website: https://www.vform666.com
|
|
6
|
+
* date: 2021.08.18
|
|
7
|
+
* remark: 如果要分发VForm源码,需在本文件顶部保留此文件头信息!!
|
|
8
|
+
*/
|
|
9
|
+
-->
|
|
10
|
+
<template>
|
|
11
|
+
<container-item-wrapper :widget="widget">
|
|
12
|
+
<div class="detail-temp-wrap" :class="[customClass]" :ref="widget.id">
|
|
13
|
+
<div class="detail-temp-box" v-for="(paneWidget, index) in widget.panes" :key="paneWidget.id || index" :class="widget.options.styleTempClass">
|
|
14
|
+
<div class="detail-temp-header">
|
|
15
|
+
<span class="detail-temp-label">{{ getI18nLabel(paneWidget.options.label) || '模块' }}</span>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="detail-temp-body">
|
|
18
|
+
<template v-for="(subWidget, swIdx) in paneWidget.widgetList">
|
|
19
|
+
<template v-if="'container' === subWidget.category">
|
|
20
|
+
<component
|
|
21
|
+
:is="subWidget.type + '-item'"
|
|
22
|
+
:widget="subWidget"
|
|
23
|
+
:key="subWidget.id || swIdx"
|
|
24
|
+
:parent-list="paneWidget.widgetList"
|
|
25
|
+
:index-of-parent-list="swIdx"
|
|
26
|
+
:parent-widget="paneWidget"
|
|
27
|
+
>
|
|
28
|
+
<!-- 递归传递插槽 -->
|
|
29
|
+
<template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
|
|
30
|
+
<slot :name="slot" v-bind="scope" />
|
|
31
|
+
</template>
|
|
32
|
+
</component>
|
|
33
|
+
</template>
|
|
34
|
+
<template v-else>
|
|
35
|
+
<component
|
|
36
|
+
:is="subWidget.type + '-widget'"
|
|
37
|
+
:field="subWidget"
|
|
38
|
+
:designer="null"
|
|
39
|
+
:key="subWidget.id || swIdx"
|
|
40
|
+
:parent-list="paneWidget.widgetList"
|
|
41
|
+
:index-of-parent-list="swIdx"
|
|
42
|
+
:parent-widget="paneWidget"
|
|
43
|
+
>
|
|
44
|
+
<!-- 递归传递插槽 -->
|
|
45
|
+
<template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
|
|
46
|
+
<slot :name="slot" v-bind="scope" />
|
|
47
|
+
</template>
|
|
48
|
+
</component>
|
|
49
|
+
</template>
|
|
50
|
+
</template>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</container-item-wrapper>
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
<script>
|
|
58
|
+
import emitter from '../../../../components/xform/utils/emitter'
|
|
59
|
+
import i18n from "../../../../components/xform/utils/i18n"
|
|
60
|
+
import refMixin from "../../../../components/xform/form-render/refMixin"
|
|
61
|
+
import containerItemMixin from "./containerItemMixin"
|
|
62
|
+
import FieldComponents from '../../../../components/xform/form-designer/form-widget/field-widget/index'
|
|
63
|
+
|
|
64
|
+
export default {
|
|
65
|
+
name: "detail-temp-item",
|
|
66
|
+
componentName: 'ContainerItem',
|
|
67
|
+
mixins: [emitter, i18n, refMixin, containerItemMixin],
|
|
68
|
+
components: {
|
|
69
|
+
...FieldComponents,
|
|
70
|
+
},
|
|
71
|
+
props: {
|
|
72
|
+
widget: Object,
|
|
73
|
+
parentWidget: Object,
|
|
74
|
+
parentList: Array,
|
|
75
|
+
indexOfParentList: Number,
|
|
76
|
+
},
|
|
77
|
+
inject: ['refList', 'globalModel', 'previewState'],
|
|
78
|
+
computed: {
|
|
79
|
+
customClass() {
|
|
80
|
+
return this.widget.options.customClass || ''
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
watch: {
|
|
84
|
+
//
|
|
85
|
+
},
|
|
86
|
+
created() {
|
|
87
|
+
this.initRefList()
|
|
88
|
+
this.handleOnCreated();
|
|
89
|
+
},
|
|
90
|
+
mounted() {
|
|
91
|
+
this.handleOnMounted();
|
|
92
|
+
},
|
|
93
|
+
data() {
|
|
94
|
+
return {
|
|
95
|
+
showStatus: true,
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
methods: {
|
|
99
|
+
opeaShowCont() {
|
|
100
|
+
this.showStatus = !this.showStatus
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
</script>
|
|
105
|
+
|
|
106
|
+
<style lang="scss" scoped>
|
|
107
|
+
.detail-temp-wrap {
|
|
108
|
+
min-height: 50px;
|
|
109
|
+
}
|
|
110
|
+
</style>
|