cloud-web-corejs 1.0.54-dev.797 → 1.0.54-dev.799
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 +3 -1
- package/src/components/baseTabs/mixins.js +11 -12
- 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 +687 -0
- package/src/components/bizTab/index.js +24 -0
- package/src/components/excelExport/exportFieldDialog.vue +373 -367
- package/src/components/excelExport/exportType.js +49 -0
- package/src/components/excelExport/mixins.js +1153 -1141
- package/src/components/vb-tabs/x-tabs.vue +167 -143
- package/src/components/wf/wfUtil.js +327 -292
- package/src/components/xform/form-designer/designer.js +56 -8
- package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +59 -5
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +60 -8
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +8 -2
- package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +120 -92
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +63 -94
- package/src/components/xform/form-designer/index.vue +0 -1
- package/src/components/xform/form-designer/setting-panel/dataSource-setting.vue +397 -397
- package/src/components/xform/form-designer/setting-panel/form-dynamicField-setting.vue +602 -602
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +13 -13
- package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +585 -585
- package/src/components/xform/form-designer/setting-panel/property-editor/a-link-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/a-text-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/alignType-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/censusClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/colorClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/commonAttributeEnabled-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +1154 -1154
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +96 -80
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail-plain/detail-plain-editor.vue +75 -75
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/colHeight-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-height-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-span-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/container-h5-card/h5-card-editor.vue +124 -124
- package/src/components/xform/form-designer/setting-panel/property-editor/container-panel/height-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-panel/width-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tab/tab-customClass-editor.vue +119 -119
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tab/tabClass-editor.vue +45 -45
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +344 -344
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table-cell/cellHeight-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table-cell/cellWidth-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tree/tree-customClass-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tree-pane/tree-pane-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/cancelButtonLabel-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/okButtonLabel-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/title-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/width-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/containerClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/customClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/descriptionsItems-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/downloadButtonFlag-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/dsName-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/echartHeight-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/endPlaceholder-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-accessUrl/accessUrl-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaDataType-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaMinLevel-editor.vue +50 -50
- package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaName-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-autocomplete/autocomplete-vabSearchName-editor.vue +7 -7
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/addTableData-event-editor.vue +84 -84
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/button-type-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/clickBindEvent-editor.vue +97 -97
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/form-host-event-editor.vue +188 -188
- 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-common/keyName-editor.vue +74 -67
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-dateLimit-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-format-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-type-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-valueFormat-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultTime-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-format-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-type-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-valueFormat-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-divider/contentPosition-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-menu-editor.vue +59 -59
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-bar-editor.vue +11 -11
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-category-editor.vue +10 -10
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-pie-editor.vue +12 -12
- package/src/components/xform/form-designer/setting-panel/property-editor/field-file-upload/file-upload-fileTypes-editor.vue +44 -44
- package/src/components/xform/form-designer/setting-panel/property-editor/field-html-text/htmlContent-editor.vue +29 -29
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +6 -6
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/field-number/controlsPosition-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-picture-upload/picture-upload-fileTypes-editor.vue +44 -44
- package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +115 -115
- package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +115 -115
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/highThreshold-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/lowThreshold-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-max-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-script/script-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/field-script-input/script-input-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/fontSize-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/textContent-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/activeText-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/inactiveText-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/switchWidth-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-button-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +74 -71
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/table-export-button-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-format-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-timeLimit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-format-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchField-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchName-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vue-page/vue-page-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/fileMaxSize-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/fileTypesSelect.vue +176 -176
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +2 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/formatType-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/formula-editor.vue +972 -972
- package/src/components/xform/form-designer/setting-panel/property-editor/iconClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/label-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelAlign-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelColor-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelWidth-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/limit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/max-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/maxLength-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/min-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/minLength-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +178 -178
- package/src/components/xform/form-designer/setting-panel/property-editor/oplog-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/placeholder-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/precision-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +6 -6
- package/src/components/xform/form-designer/setting-panel/property-editor/requiredHint-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/rows-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/space-editor-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/startPlaceholder-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/step-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/styleTableClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/styleTitClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/tempStorage-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/type-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/uploadTip-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/uploadURL-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/urlValueEnabled-editor.vue +91 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/validation-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/validationHint-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/widgetWidth-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
- package/src/components/xform/form-designer/widget-panel/index.vue +3 -1
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +55 -13
- package/src/components/xform/form-render/container-item/data-table-mixin copy.js +5910 -0
- package/src/components/xform/form-render/container-item/data-table-mixin.js +59 -13
- package/src/components/xform/form-render/container-item/detail-item.vue +52 -11
- package/src/components/xform/form-render/container-item/tab-item.vue +6 -2
- package/src/components/xform/form-render/indexMixin.js +56 -16
- package/src/components/xform/lang/zh-CN.js +2 -1
- package/src/components/xform/utils/attachmentValueUtil.js +239 -0
- package/src/components/xform/utils/util.js +27 -0
- package/src/mixins/wf/index.js +40 -38
- package/src/router/modules/customer.js +50 -0
- package/src/store/config/index.js +46 -0
- package/src/utils/scrollUtil.js +25 -0
- 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/user/outLink/cc_form_view.vue +185 -0
|
@@ -1,292 +1,327 @@
|
|
|
1
|
-
import Vue from 'vue';
|
|
2
|
-
import settingConfig from '@/settings.js'
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
let
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
let
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
taskParam
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
return
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
1
|
+
import Vue from 'vue';
|
|
2
|
+
import settingConfig from '@/settings.js'
|
|
3
|
+
import { scrollIntoScrollParent } from '@base/utils/scrollUtil';
|
|
4
|
+
|
|
5
|
+
let f;
|
|
6
|
+
let configUtil = {
|
|
7
|
+
getWfObj(path) {
|
|
8
|
+
return require(`../../components/wf${path}`).default;
|
|
9
|
+
},
|
|
10
|
+
Vue,
|
|
11
|
+
settingConfig
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
f = async function (option) {
|
|
15
|
+
let serviceId = getServiceId(option.serviceId);
|
|
16
|
+
if (!serviceId) return;
|
|
17
|
+
let that = this;
|
|
18
|
+
if (option.objId && option.wfCode) {
|
|
19
|
+
/*
|
|
20
|
+
if (option.wfViewRegion === false || !wfViewRegion) {
|
|
21
|
+
return;
|
|
22
|
+
}*/
|
|
23
|
+
|
|
24
|
+
let hasWf = false;
|
|
25
|
+
let wfInfo, currentTask, taskParam;
|
|
26
|
+
await initWfInfo(that, option).then(res => {
|
|
27
|
+
if (res && res.type == 'success') {
|
|
28
|
+
if (res.objx && res.objx.procInstId) {
|
|
29
|
+
hasWf = true;
|
|
30
|
+
wfInfo = res.objx;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
if (hasWf) {
|
|
36
|
+
if (wfInfo.taskId) {
|
|
37
|
+
await getTaskParams(that, option, wfInfo.taskId).then(res2 => {
|
|
38
|
+
if (res2.type == 'success') {
|
|
39
|
+
taskParam = res2.objx;
|
|
40
|
+
taskParam.objId = option.objId;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* 下面这些实例都是手工 new 出来、只把 $el 塞进宿主 DOM 的,Vue 不会跟着宿主一起销毁它们:
|
|
47
|
+
实例活着 → watcher 活着、propsData.parentVue 死死引用已销毁的宿主、
|
|
48
|
+
content.vue 里的 $http 回调/定时器还会回来调宿主方法,
|
|
49
|
+
它内部那些 append-to-body 的 popover/dialog 的 DOM 也没人收。
|
|
50
|
+
页签模式下详情会被反复重挂载,一次一份,所以统一登记、挂到宿主的销毁钩子上回收。 */
|
|
51
|
+
let instances = [];
|
|
52
|
+
let disposed = false;
|
|
53
|
+
let registerDispose = () => {
|
|
54
|
+
if (!instances.length || !that.$once) return;
|
|
55
|
+
that.$once("hook:beforeDestroy", () => {
|
|
56
|
+
disposed = true;
|
|
57
|
+
instances.forEach((vm) => {
|
|
58
|
+
try {
|
|
59
|
+
vm.$destroy(); //会级联销毁子组件,append-to-body 的那些 el 由它们自己的 destroyed 摘掉
|
|
60
|
+
//$destroy 不管 DOM,自己收一下(宿主子树里的那份本来也会被父级移除)
|
|
61
|
+
if (vm.$el && vm.$el.parentNode) vm.$el.parentNode.removeChild(vm.$el);
|
|
62
|
+
} catch (e) {
|
|
63
|
+
//拆的时候出问题不要拖累宿主销毁
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
instances.length = 0;
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
let done = () => {
|
|
71
|
+
let $wfBtnRegion = that.$refs[option.wfBtnRegion || "wfBtnRegion"];
|
|
72
|
+
let $wfViewRegion = that.$refs[(option.wfViewRegion || "wfViewRegion")];
|
|
73
|
+
|
|
74
|
+
let wfBtnRegion = $wfBtnRegion ? $wfBtnRegion.$el : that.$el.querySelector(
|
|
75
|
+
".el-form .d-header >.fr");
|
|
76
|
+
let wfViewRegion = $wfViewRegion ? $wfViewRegion.$el : that.$el.querySelector(
|
|
77
|
+
".el-form .d-cont");
|
|
78
|
+
|
|
79
|
+
let slideWrap = $wfViewRegion ? $wfViewRegion.$el : that.$el.querySelector(
|
|
80
|
+
".el-form .slide-wrap");
|
|
81
|
+
|
|
82
|
+
let showStartBtn = option.showStartBtn != null ? option.showStartBtn : true;
|
|
83
|
+
let showModifyBtn = option.showModifyBtn != null ? option.showModifyBtn : true;
|
|
84
|
+
|
|
85
|
+
if (wfInfo) {
|
|
86
|
+
let wfModel = configUtil.settingConfig.wfModel || 1;
|
|
87
|
+
let url = wfModel == 2 ? '/content2.vue' : '/content.vue';
|
|
88
|
+
let a = configUtil.Vue.extend(configUtil.getWfObj(url));
|
|
89
|
+
let defaultShowWfContent = that.$attrs.defaultShowWfContent;
|
|
90
|
+
let instance = new a({
|
|
91
|
+
i18n: that._i18n,
|
|
92
|
+
propsData: {
|
|
93
|
+
objId: option.objId,
|
|
94
|
+
wfCode: option.wfCode,
|
|
95
|
+
serviceId: serviceId,
|
|
96
|
+
_wfInfo: wfInfo,
|
|
97
|
+
_taskParam: taskParam,
|
|
98
|
+
parentVue: that,
|
|
99
|
+
defaultShowWfContent: defaultShowWfContent,
|
|
100
|
+
wfConfig: option
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
instances.push(instance);
|
|
104
|
+
let _hideWf = that._hideWf || that.$attrs._hideWf;
|
|
105
|
+
let isHideWf = _hideWf === true || _hideWf === 'true';
|
|
106
|
+
if (!_hideWf && slideWrap) {
|
|
107
|
+
let navVm = new configUtil.Vue({
|
|
108
|
+
render: function (h) {
|
|
109
|
+
let node = h("div", {}, [
|
|
110
|
+
h("a", {
|
|
111
|
+
staticClass: "slide-nav",
|
|
112
|
+
attrs: {
|
|
113
|
+
id: "wfNavBtn"
|
|
114
|
+
},
|
|
115
|
+
on: {
|
|
116
|
+
click: (event) => {
|
|
117
|
+
instance.$children[0].handleFold(true);
|
|
118
|
+
that.$nextTick(() => {
|
|
119
|
+
//流程区是挂在 .d-cont 里滚的,直接 scrollIntoView 会把外层文档/宿主容器
|
|
120
|
+
//一起滚起来(固定头被顶走、微前端下滚的是主应用),只在真正的滚动容器里滚。
|
|
121
|
+
scrollIntoScrollParent(instance.$el);
|
|
122
|
+
})
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}, [h('i', {
|
|
126
|
+
staticClass: "ico"
|
|
127
|
+
}), h("p", that.$t2('流程信息', 'components.wf.wfInfo'))])
|
|
128
|
+
]);
|
|
129
|
+
return node;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
instances.push(navVm);
|
|
133
|
+
let navDom = navVm.$mount().$el;
|
|
134
|
+
if (settingConfig.version == 'oa') {
|
|
135
|
+
slideWrap = slideWrap.children[0];
|
|
136
|
+
}
|
|
137
|
+
setTimeout(() => {
|
|
138
|
+
if (disposed) return; //这一步延后了 500ms,期间宿主可能已经销毁
|
|
139
|
+
slideWrap.append(navDom);
|
|
140
|
+
if (that.$attrs.toWfArea) {
|
|
141
|
+
//待办进来,直接跳到流程模块
|
|
142
|
+
this.$nextTick(() => {
|
|
143
|
+
navDom.querySelector('a').click();
|
|
144
|
+
});
|
|
145
|
+
that.$emit("update:toWfArea", false);
|
|
146
|
+
}
|
|
147
|
+
}, 500);
|
|
148
|
+
}
|
|
149
|
+
wfViewRegion && wfViewRegion.append(instance.$mount().$el);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (wfBtnRegion && showModifyBtn && hasWf && taskParam && taskParam.url && wfInfo.toSubmit && !option.hiddenAllButton) {
|
|
153
|
+
let buttonName = getModifyButtonName(that, taskParam);
|
|
154
|
+
let modifyVm = new configUtil.Vue({
|
|
155
|
+
render: function (h) {
|
|
156
|
+
let modifyNode = h("el-button", {
|
|
157
|
+
attrs: {
|
|
158
|
+
type: "primary",
|
|
159
|
+
plain: "",
|
|
160
|
+
icon: "el-icon-edit"
|
|
161
|
+
},
|
|
162
|
+
staticClass: "button-sty",
|
|
163
|
+
on: {
|
|
164
|
+
click: () => {
|
|
165
|
+
openWfModifyDialog(that, taskParam, buttonName, wfInfo);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}, buttonName);
|
|
169
|
+
return modifyNode;
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
instances.push(modifyVm);
|
|
173
|
+
appendPrevChildDom(wfBtnRegion, modifyVm.$mount().$el);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
if (wfBtnRegion && showStartBtn && option.injectStartBtn !== false && !hasWf && !option.hiddenAllButton) {
|
|
177
|
+
let wfStartButtonName = configUtil.settingConfig.wfStartButtonName || this.$t2('流程启动', 'components.wf.wfStart');
|
|
178
|
+
let startVm = new configUtil.Vue({
|
|
179
|
+
render: function (h) {
|
|
180
|
+
let startNode = h("el-button", {
|
|
181
|
+
attrs: {
|
|
182
|
+
type: "success",
|
|
183
|
+
icon: "el-icon-video-play"
|
|
184
|
+
},
|
|
185
|
+
staticClass: "button-sty",
|
|
186
|
+
on: {
|
|
187
|
+
click: () => {
|
|
188
|
+
openStartWfDialog(that, option);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}, wfStartButtonName);
|
|
192
|
+
return startNode;
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
instances.push(startVm);
|
|
196
|
+
appendPrevChildDom(wfBtnRegion, startVm.$mount().$el)
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
registerDispose();
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
if (true || wfInfo) {
|
|
203
|
+
if (option.callback) {
|
|
204
|
+
option.callback({
|
|
205
|
+
wfInfo,
|
|
206
|
+
currentTask,
|
|
207
|
+
taskParam,
|
|
208
|
+
hasWf,
|
|
209
|
+
done
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
if (option.auto !== false) {
|
|
214
|
+
done();
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
function getModifyButtonName(that, taskParam) {
|
|
220
|
+
let buttonName = null;
|
|
221
|
+
if (!taskParam.buttonName || taskParam.buttonName == "修改单据") {
|
|
222
|
+
buttonName = that.$t2("修改单据", 'components.wf.modifyBill');
|
|
223
|
+
} else {
|
|
224
|
+
buttonName = taskParam.buttonName;
|
|
225
|
+
}
|
|
226
|
+
return buttonName;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
function getServiceId(str) {
|
|
230
|
+
let serviceId;
|
|
231
|
+
if (str) {
|
|
232
|
+
let strArr = str.split('/');
|
|
233
|
+
serviceId = strArr[0] == '/' ? strArr[1] : str;
|
|
234
|
+
} else {
|
|
235
|
+
serviceId = '';
|
|
236
|
+
}
|
|
237
|
+
return serviceId;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
function getCurrentPrefix(serviceId) {
|
|
241
|
+
let currentPrefix;
|
|
242
|
+
if (serviceId) {
|
|
243
|
+
currentPrefix = serviceId.split('/')[0] == '/' ? serviceId : ('/' + serviceId);
|
|
244
|
+
} else {
|
|
245
|
+
currentPrefix = '';
|
|
246
|
+
}
|
|
247
|
+
return currentPrefix;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
async function initWfInfo(that, option) {
|
|
251
|
+
let id = option.objId;
|
|
252
|
+
let code = option.wfCode;
|
|
253
|
+
return that.$http({
|
|
254
|
+
url: getCurrentPrefix(option.serviceId) + '/wf/getWfInfo',
|
|
255
|
+
method: `post`,
|
|
256
|
+
data: {
|
|
257
|
+
objTypeCode: code,
|
|
258
|
+
objId: id
|
|
259
|
+
},
|
|
260
|
+
isLoading: true,
|
|
261
|
+
modalStrictly: true
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
async function getTaskParams(that, option, taskId) {
|
|
266
|
+
return that.$http({
|
|
267
|
+
url: getCurrentPrefix(option.serviceId) + '/wf/getTaskVariables',
|
|
268
|
+
method: `post`,
|
|
269
|
+
data: {
|
|
270
|
+
stringOne: taskId
|
|
271
|
+
},
|
|
272
|
+
isLoading: true,
|
|
273
|
+
modalStrictly: true
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
function openStartWfDialog(that, option) {
|
|
278
|
+
let done = () => {
|
|
279
|
+
let a = configUtil.Vue.extend(configUtil.getWfObj('/wfStartDialog.vue'));
|
|
280
|
+
let instance = new a({
|
|
281
|
+
i18n: that._i18n,
|
|
282
|
+
propsData: {
|
|
283
|
+
code: option.wfCode,
|
|
284
|
+
dataId: option.objId,
|
|
285
|
+
serviceId: getServiceId(option.serviceId),
|
|
286
|
+
startParam: option.startParam,
|
|
287
|
+
parentVue: that,
|
|
288
|
+
visible: true,
|
|
289
|
+
formCode:(option.formCode || null),
|
|
290
|
+
option
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
document.body.append(instance.$mount().$el)
|
|
294
|
+
}
|
|
295
|
+
if (option.onStart) {
|
|
296
|
+
option.onStart(done)
|
|
297
|
+
} else {
|
|
298
|
+
done();
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
function openWfModifyDialog(that, paramData, title, wfInfo) {
|
|
303
|
+
let a = configUtil.Vue.extend(configUtil.getWfObj('/wfModifyDialog.vue'));
|
|
304
|
+
let instance = new a({
|
|
305
|
+
i18n: that._i18n,
|
|
306
|
+
propsData: {
|
|
307
|
+
paramData: paramData,
|
|
308
|
+
parentVue: that,
|
|
309
|
+
visible: true,
|
|
310
|
+
wfInfo: wfInfo,
|
|
311
|
+
title: title
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
document.body.append(instance.$mount().$el)
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
function appendPrevChildDom(parentDom, newDom) {
|
|
318
|
+
if (parentDom.hasChildNodes()) {
|
|
319
|
+
let currentDom = parentDom.children[0];
|
|
320
|
+
parentDom.insertBefore(newDom, currentDom);
|
|
321
|
+
} else {
|
|
322
|
+
parentDom.append(newDom);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
export const initWf = f;
|
|
327
|
+
export { openStartWfDialog };
|