cloud-web-corejs 1.0.258 → 1.0.260
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 +32 -25
- package/src/components/VabUpload/fileLibraryDialog.vue +296 -0
- package/src/components/VabUpload/index.js +22 -2
- package/src/components/VabUpload/index.vue +242 -231
- package/src/components/VabUpload/mixins/fileLibraryDialog.js +1112 -0
- package/src/components/VabUpload/mixins.js +1971 -1829
- package/src/components/VabUpload/privateProfileDialog.vue +2 -2
- package/src/components/baseArea/index.vue +1628 -0
- package/src/components/baseInputExport/mixins.js +48 -31
- package/src/components/baseInputNumber/index.vue +9 -9
- package/src/components/baseTabs/index.vue +16 -8
- package/src/components/code-editor/async.js +29 -0
- package/src/components/code-editor/index.vue +93 -4
- package/src/components/errorMsg/index.js +10 -9
- package/src/components/errorMsg/mixins.js +25 -23
- package/src/components/excelExport/exportFieldDialog.vue +40 -18
- package/src/components/excelExport/index.js +62 -3
- package/src/components/excelExport/index.vue +2 -1
- package/src/components/excelExport/mixins.js +496 -340
- package/src/components/excelImport/index.js +69 -7
- package/src/components/excelImport/mixins.js +841 -9
- package/src/components/fileLibrary/categoryMoveDialog.vue +109 -109
- package/src/components/fileLibrary/fileHistoryDialog.vue +1 -1
- package/src/components/fileLibrary/fileObjAuthDialog.vue +297 -298
- package/src/components/fileLibrary/fileObjAuthEdit.vue +1 -1
- package/src/components/fileLibrary/filterDialog.vue +1 -1
- package/src/components/fileLibrary/index.vue +1109 -1110
- package/src/components/fileLibrary/mixins/indexMixins.js +10 -0
- package/src/components/fileLibrary/propertiesDialog.vue +190 -190
- package/src/components/fileLibrary/recycleBinDialog.vue +237 -236
- package/src/components/formOplog/mixins.js +85 -80
- package/src/components/hiprint/view/design/index.vue +7 -2
- package/src/components/jsonImport/exportUtil.js +106 -0
- package/src/components/jsonImport/index.js +75 -50
- package/src/components/jsonImport/mixins.js +350 -348
- package/src/components/langImport/mixins.js +502 -500
- package/src/components/micro-view-host/contract.js +66 -0
- package/src/components/micro-view-host/index.vue +148 -0
- package/src/components/mobile/file/index.vue +10 -0
- package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +51 -47
- package/src/components/obsUpload/index.vue +234 -231
- package/src/components/obsUpload/mixins.js +1542 -1476
- package/src/components/onlineTalk/talkUserDialog.vue +1 -1
- package/src/components/table/CellSlot.vue +12 -10
- package/src/components/table/config.js +74 -1
- package/src/components/table/index.js +1209 -1
- package/src/components/table/tableForm.vue +4 -2
- package/src/components/table/tableFormMixin.js +285 -1
- package/src/components/table/util/index.js +38 -40
- package/src/components/table/vxeFilter/index.js +153 -2
- package/src/components/table/vxeFilter/mixin.js +305 -3
- package/src/components/tempStorage/tempStorageDialog.vue +1 -1
- package/src/components/vb-tabs/x-tabs.vue +10 -5
- package/src/components/wf/addTaskUserdialog.vue +1 -1
- package/src/components/wf/mixins/setCandidateDialog.js +217 -217
- package/src/components/wf/mixins/setCandidateDialog2.js +252 -252
- package/src/components/wf/wf.js +2224 -2203
- package/src/components/wf/wfUtil.js +2 -1
- package/src/components/xform/docs/2026-08 /345/210/227/350/241/250/345/257/274/345/207/272/350/204/261/346/225/217/345/210/227/345/211/224/351/231/244/350/220/275/345/234/260/346/226/207/346/241/243.md" +173 -0
- package/src/components/xform/form-designer/designer.js +1 -0
- package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +110 -1
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +282 -1
- package/src/components/xform/form-designer/form-widget/field-widget/area-select-widget.vue +272 -0
- package/src/components/xform/form-designer/form-widget/field-widget/autocomplete-widget.vue +119 -0
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +14 -0
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +18 -73
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/autocomplete-mixin.js +451 -0
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +157 -0
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/utc-transform-mixin.js +75 -0
- package/src/components/xform/form-designer/form-widget/field-widget/save_submit_wf_button-widget.vue +112 -0
- package/src/components/xform/form-designer/form-widget/field-widget/script-input-widget.vue +149 -0
- package/src/components/xform/form-designer/form-widget/indexMixin.js +179 -1
- package/src/components/xform/form-designer/indexMixin.js +823 -1
- package/src/components/xform/form-designer/refMixinDesign.js +27 -1
- package/src/components/xform/form-designer/setting-panel/action-button-config-dialog.vue +241 -0
- package/src/components/xform/form-designer/setting-panel/form-dynamicField-setting.vue +601 -0
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +6 -0
- package/src/components/xform/form-designer/setting-panel/index.vue +314 -309
- package/src/components/xform/form-designer/setting-panel/indexMixin.js +324 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +8 -7
- package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +8 -7
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +344 -0
- 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/field-area-select/areaDataType-editor.vue +25 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaMinLevel-editor.vue +50 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaName-editor.vue +20 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-autocomplete/autocomplete-vabSearchName-editor.vue +199 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-baseAttachment/baseAttachment-fileTypes-editor.vue +23 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-cascader/showAllLevels-editor.vue +21 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-dateLimit-editor.vue +157 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-script-input/script-input-editor.vue +55 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/vabUpload-fileTypes-editor.vue +23 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/fileTypesEditorMixin.js +116 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/fileTypesSelect.vue +176 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/utcTransformEnabled-editor.vue +19 -0
- package/src/components/xform/form-designer/setting-panel/widgetPropertyDialogMixin.js +186 -0
- package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +566 -1
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +290 -1
- package/src/components/xform/form-render/compareDelList.vue +83 -0
- package/src/components/xform/form-render/compareView.vue +76 -0
- package/src/components/xform/form-render/container-item/containerItemMixin.js +378 -1
- package/src/components/xform/form-render/container-item/data-table-mixin.js +35 -0
- package/src/components/xform/form-render/container-item/detail-item.vue +41 -0
- package/src/components/xform/form-render/container-item/dynamicFieldEngine.js +285 -0
- package/src/components/xform/form-render/container-item/dynamicFieldMixin.js +416 -0
- package/src/components/xform/form-render/container-item/list-h5-item.vue +12 -0
- package/src/components/xform/form-render/dynamicDialogRender.js +195 -1
- package/src/components/xform/form-render/dynamicDrawerRender.js +229 -0
- package/src/components/xform/form-render/formDynamicFieldMixin.js +131 -0
- package/src/components/xform/form-render/refMixin.js +29 -1
- package/src/components/xform/mixins/scriptHttp.js +172 -1
- package/src/components/xform/utils/dynamicSchemaUtil.js +361 -0
- package/src/components/xform/utils/tableCellValidateUtil.js +148 -0
- package/src/components/xform/utils/textMaskUtil.js +179 -0
- package/src/components/xform/utils/treeTableUtil.js +1265 -0
- package/src/components/xform/utils/util.js +1 -0
- package/src/components/xform/utils/validators.js +133 -1
- package/src/directive/LimitNumber/index.js +143 -124
- package/src/microRouter/index.js +447 -0
- package/src/mixins/tableTree/index.js +77 -14
- package/src/permission.js +132 -107
- package/src/public-path.js +38 -0
- package/src/router/index.js +3 -3
- package/src/store/modules/micro.js +57 -0
- package/src/store/modules/permission.js +535 -371
- package/src/store/modules/tagsView.js +38 -21
- package/src/store/modules/user.js +409 -370
- package/src/utils/aes.js +9 -3
- package/src/utils/auth.js +1 -1
- package/src/utils/componentDialog.js +162 -40
- package/src/utils/global.js +35 -34
- package/src/utils/index.js +579 -579
- package/src/utils/keepAlive.js +8 -4
- package/src/utils/lazyPlugin.js +66 -0
- package/src/utils/menuAdapter.js +277 -0
- package/src/utils/repeatOpen.js +48 -0
- package/src/utils/request.js +417 -395
- package/src/utils/resolveViewComponent.js +203 -0
- package/src/utils/vab.js +14 -3
- package/src/utils/validate.js +104 -106
- package/src/views/bd/setting/bd_attach_setting/dialog.vue +1 -1
- package/src/views/bd/setting/bd_attach_setting/list.vue +1 -1
- package/src/views/bd/setting/bd_company_env/dialog.vue +1 -1
- package/src/views/bd/setting/bd_company_env/list.vue +1 -1
- package/src/views/bd/setting/formVersion/ftHistoryDialog.vue +488 -489
- package/src/views/bd/setting/form_import_log/list.vue +1 -1
- package/src/views/bd/setting/form_script/dialog.vue +1 -1
- package/src/views/bd/setting/form_script/form_list.vue +174 -166
- package/src/views/bd/setting/form_script/list.vue +1 -1
- package/src/views/bd/setting/form_script/list1.vue +1 -1
- package/src/views/bd/setting/form_script/mixins/form_list.js +330 -322
- package/src/views/bd/setting/form_template/dialog.vue +1 -1
- package/src/views/bd/setting/form_template/formDesignerDialog.vue +172 -171
- package/src/views/bd/setting/form_template/ftHistoryDialog.vue +1 -1
- package/src/views/bd/setting/form_template/itemList.vue +1 -1
- package/src/views/bd/setting/form_template/list.vue +3 -3
- package/src/views/bd/setting/form_template/mixins/edit.js +3 -3
- package/src/views/bd/setting/form_template/mixins/list.js +3 -3
- package/src/views/bd/setting/form_template/mixins/list2.js +3 -3
- package/src/views/bd/setting/form_template/mixins/wf_list.js +3 -3
- package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +253 -254
- package/src/views/bd/setting/form_template/wf_list.vue +3 -3
- package/src/views/bd/setting/logic_param/edit.vue +20 -20
- package/src/views/bd/setting/logic_param/list.vue +1 -1
- package/src/views/bd/setting/menu_kind/dialog.vue +1 -1
- package/src/views/bd/setting/menu_kind/list.vue +1 -1
- package/src/views/bd/setting/push_data/list.vue +1 -1
- package/src/views/bd/setting/push_data_h/list.vue +1 -1
- package/src/views/bd/setting/request_async_setting/list.vue +1 -1
- package/src/views/bd/setting/request_setting/list.vue +1 -1
- package/src/views/bd/setting/table_model/dialog.vue +1 -1
- package/src/views/bd/setting/table_model/list.vue +1 -1
- package/src/views/bd/setting/table_model/zdDialog.vue +1 -1
- package/src/views/user/access_log/list.vue +1 -1
- package/src/views/user/access_log/list2.vue +1 -1
- package/src/views/user/api_request/list.vue +1 -1
- package/src/views/user/area/dialog.vue +1 -1
- package/src/views/user/area/list.vue +1 -1
- package/src/views/user/bill_setting/list.vue +1 -1
- package/src/views/user/bill_setting/userDialog.vue +1 -1
- package/src/views/user/code_rules/list.vue +1 -1
- package/src/views/user/commMenu/index.vue +2 -2
- package/src/views/user/common_attribute/list.vue +2 -2
- package/src/views/user/common_script/list.vue +1 -1
- package/src/views/user/company_info/dialog.vue +1 -1
- package/src/views/user/country/dialog.vue +1 -1
- package/src/views/user/country/list.vue +1 -1
- package/src/views/user/data_type_setting/dialog.vue +1 -1
- package/src/views/user/extend_datasource/dialog.vue +4 -1
- package/src/views/user/extend_datasource/edit.vue +2 -1
- package/src/views/user/extend_datasource/list.vue +4 -1
- package/src/views/user/fieldTranslation/list.vue +1 -1
- package/src/views/user/field_values_invisible/list.vue +1 -1
- package/src/views/user/file_type/list.vue +1 -1
- package/src/views/user/file_view_area/list.vue +1 -1
- package/src/views/user/file_view_ins/list.vue +22 -1
- package/src/views/user/form/view/list.vue +64 -1
- package/src/views/user/groups/dialog.vue +1 -1
- package/src/views/user/groups/list.vue +1 -1
- package/src/views/user/home/default.vue +2 -2
- package/src/views/user/home/default2.vue +1158 -1148
- package/src/views/user/home/index.vue +3 -10
- package/src/views/user/lang_tag/dialog.vue +1 -1
- package/src/views/user/lang_tag/list.vue +1 -1
- package/src/views/user/language_setting/list.vue +1 -1
- package/src/views/user/login/default.vue +0 -8
- package/src/views/user/login/indexMixin.js +547 -556
- package/src/views/user/menu/list.vue +25 -2
- package/src/views/user/menuFallback/index.vue +123 -0
- package/src/views/user/mobile_menu/list.vue +1 -1
- package/src/views/user/notify_message/dialog.vue +22 -1
- package/src/views/user/notify_message/list.vue +1 -1
- package/src/views/user/notify_template/list.vue +1 -1
- package/src/views/user/notify_template/list2.vue +1 -1
- package/src/views/user/oplog/list.vue +1 -1
- package/src/views/user/outLink/form_view.vue +5 -14
- package/src/views/user/outLink/index.vue +6 -1
- package/src/views/user/outLink/view.vue +5 -13
- package/src/views/user/position/dialog.vue +1 -1
- package/src/views/user/position/list.vue +1 -1
- package/src/views/user/project_tag/dialog.vue +1 -1
- package/src/views/user/project_tag/list.vue +1 -1
- package/src/views/user/push_setting/list.vue +1 -1
- package/src/views/user/request_setting/list.vue +1 -1
- package/src/views/user/role/dialog.vue +1 -1
- package/src/views/user/role/list.vue +1 -1
- package/src/views/user/sale_org/dialog.vue +1 -1
- package/src/views/user/sale_org/list.vue +1 -1
- package/src/views/user/system_notice/list.vue +1 -1
- package/src/views/user/system_parameter/list.vue +1 -1
- package/src/views/user/user/dialog.vue +1 -1
- package/src/views/user/user/edit.vue +306 -159
- package/src/views/user/user/form_dialog.vue +1 -1
- package/src/views/user/user/form_list.vue +1 -1
- package/src/views/user/user/list.vue +2 -2
- package/src/views/user/user_log_classify/list.vue +1 -1
- package/src/views/user/wf/iframe/index.vue +6 -1
- package/src/views/user/wf/iframe/index2.vue +6 -1
- package/src/views/user/wf/wfReport/index.vue +12 -6
- package/src/views/user/wf/wf_auto_submit_data/list.vue +2 -2
- package/src/views/user/wf/wf_manage/list.vue +97 -24
- package/src/views/user/wf/wf_manage/list2.vue +875 -0
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +23 -1
- package/src/views/user/wf/wf_obj_config/dialog.vue +1 -1
- package/src/views/user/wf/wf_obj_config/list.vue +1 -1
- package/src/views/user/wf/wf_obj_config/list_form.vue +1 -1
- package/src/views/user/wf/wf_transfer_setting/list.vue +1 -1
- package/src/views/user/workbench_menu/list.vue +1 -1
package/src/utils/request.js
CHANGED
|
@@ -1,395 +1,417 @@
|
|
|
1
|
-
/**version-1.0*/
|
|
2
|
-
import Vue from
|
|
3
|
-
import axios from
|
|
4
|
-
import qs from
|
|
5
|
-
import store from
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
config.headers[
|
|
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
|
-
if (config.
|
|
74
|
-
config.
|
|
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
|
-
if (
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
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
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
config.
|
|
349
|
-
config.
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
);
|
|
394
|
-
|
|
395
|
-
|
|
1
|
+
/**version-1.0*/
|
|
2
|
+
import Vue from "vue";
|
|
3
|
+
import axios from "axios";
|
|
4
|
+
import qs from "qs";
|
|
5
|
+
import store from "../store/index.js";
|
|
6
|
+
import { getToken } from "./auth.js";
|
|
7
|
+
import ErroreBox from "../components/errorMsg/index.js";
|
|
8
|
+
import PopupManager from "element-ui/src/utils/popup/popup-manager.js";
|
|
9
|
+
import settingConfig from "@/settings.js";
|
|
10
|
+
import { encode } from "js-base64";
|
|
11
|
+
import { encrypt } from "@base/utils/aes";
|
|
12
|
+
|
|
13
|
+
let configUtil = {
|
|
14
|
+
baseUrl: process.env.VUE_APP_BASE_API,
|
|
15
|
+
logout: function () {
|
|
16
|
+
store.dispatch("user/resetToken").then(() => {
|
|
17
|
+
let redirect =
|
|
18
|
+
window.$vueRoot &&
|
|
19
|
+
window.$vueRoot.$router & window.$vueRoot.$router.fullPath
|
|
20
|
+
? window.$vueRoot.$router.fullPath
|
|
21
|
+
: null;
|
|
22
|
+
let path = redirect ? `/login?redirect=${redirect}` : `/login`;
|
|
23
|
+
window.location.hash = path;
|
|
24
|
+
location.reload(true);
|
|
25
|
+
});
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
let service;
|
|
29
|
+
|
|
30
|
+
// create an axios instance
|
|
31
|
+
service = axios.create({
|
|
32
|
+
baseURL: configUtil.baseUrl, // url = base url + request url
|
|
33
|
+
// withCredentials: true, // send cookies when cross-domain requests
|
|
34
|
+
//timeout: 5000 // request timeout
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// request interceptor
|
|
38
|
+
service.interceptors.request.use(
|
|
39
|
+
(config) => {
|
|
40
|
+
if (config.useToken !== false) {
|
|
41
|
+
let token = getToken();
|
|
42
|
+
if (token) {
|
|
43
|
+
config.headers["X-Token"] = token;
|
|
44
|
+
config.headers["Authorization"] = "Bearer " + token;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/* if (!config.headers['Content-Type']) {
|
|
48
|
+
config.headers['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
|
|
49
|
+
} */
|
|
50
|
+
if (
|
|
51
|
+
!config.filterConfig ||
|
|
52
|
+
(config.filterConfig.enabled !== false && window.commonDataUtil)
|
|
53
|
+
) {
|
|
54
|
+
config.data = window.commonDataUtil.handleForm(
|
|
55
|
+
config.data,
|
|
56
|
+
config.filterConfig
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
if (
|
|
60
|
+
(config.headers["Content-Type"] === "application/x-www-form-urlencoded" ||
|
|
61
|
+
config.headers["Content-Type"] ===
|
|
62
|
+
"application/x-www-form-urlencoded;charset=UTF-8") &&
|
|
63
|
+
typeof config.data !== "string" &&
|
|
64
|
+
config.data
|
|
65
|
+
) {
|
|
66
|
+
config.data = qs.stringify(config.data);
|
|
67
|
+
} else if (
|
|
68
|
+
settingConfig.base64Urls &&
|
|
69
|
+
settingConfig.base64Urls.includes(config.url)
|
|
70
|
+
) {
|
|
71
|
+
// config.data = {"_baenboda": encode(JSON.stringify(config.data))};
|
|
72
|
+
config.data = { _aeenboda: encrypt(JSON.stringify(config.data)) };
|
|
73
|
+
} else if (config.aes) {
|
|
74
|
+
config.data = { _aeenboda: encrypt(JSON.stringify(config.data)) };
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (config.modal !== false && config.loadingTarget) {
|
|
78
|
+
let zIndex = PopupManager.nextZIndex();
|
|
79
|
+
let pd = document.createElement("div");
|
|
80
|
+
pd.className = "el-loading-mask AjaxOverlay";
|
|
81
|
+
pd.style =
|
|
82
|
+
"display: block !important;background-color: unset;z-index:" +
|
|
83
|
+
zIndex +
|
|
84
|
+
";";
|
|
85
|
+
config.loadingTarget.append(pd);
|
|
86
|
+
config.ajaxOverlay = pd;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (config.isLoading) {
|
|
90
|
+
config.loadingInstance = Vue.prototype.$baseLoading({
|
|
91
|
+
target: config.loadingTarget || document.body,
|
|
92
|
+
background: "unset",
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
return config;
|
|
96
|
+
},
|
|
97
|
+
(error) => {
|
|
98
|
+
// do something with request error
|
|
99
|
+
console.error(error); // for debug
|
|
100
|
+
return Promise.reject(error);
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
function removeModel(config) {
|
|
105
|
+
if (config) {
|
|
106
|
+
if (config.modal !== false && config.ajaxOverlay) {
|
|
107
|
+
config.ajaxOverlay.remove();
|
|
108
|
+
}
|
|
109
|
+
if (config.loadingInstance) {
|
|
110
|
+
setTimeout(function () {
|
|
111
|
+
config.loadingInstance.close();
|
|
112
|
+
config.loadingInstance = null;
|
|
113
|
+
}, 200);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
async function handleNickName(option) {
|
|
119
|
+
let { vueTarget, res, callback, config } = option;
|
|
120
|
+
if (res.type !== "success" || !res.objx) {
|
|
121
|
+
callback && callback(res);
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
let data = res.objx;
|
|
125
|
+
if (Array.isArray(data) || data.hasOwnProperty("records")) {
|
|
126
|
+
await handleNickName2(option);
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
let createBy = getCreateBy(data);
|
|
131
|
+
let modifyBy = getModifyBy(data);
|
|
132
|
+
let requestData = [];
|
|
133
|
+
if (createBy) {
|
|
134
|
+
requestData.push(createBy);
|
|
135
|
+
}
|
|
136
|
+
if (modifyBy && !requestData.includes(modifyBy)) {
|
|
137
|
+
requestData.push(modifyBy);
|
|
138
|
+
}
|
|
139
|
+
if (!requestData.length) {
|
|
140
|
+
callback && callback(res);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
if (!vueTarget) vueTarget = window.$vueRoot;
|
|
144
|
+
let modal = config.modal ?? true;
|
|
145
|
+
let isLoading = config.isLoading || false;
|
|
146
|
+
return vueTarget.$http({
|
|
147
|
+
url: USER_PREFIX + `/userb/getUserBasicInfos`,
|
|
148
|
+
method: `post`,
|
|
149
|
+
data: requestData,
|
|
150
|
+
modal: modal,
|
|
151
|
+
isLoading: isLoading,
|
|
152
|
+
success: (res2) => {
|
|
153
|
+
let arr = res2.objx || [];
|
|
154
|
+
if (createBy) {
|
|
155
|
+
let obj = arr.find((item) => item.loginAccount === createBy);
|
|
156
|
+
if (obj && obj.nickName) {
|
|
157
|
+
res.objx._createNickName = obj.nickName;
|
|
158
|
+
res.objx._createMobile = obj.mobile;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
if (modifyBy) {
|
|
162
|
+
let obj = arr.find((item) => item.loginAccount === modifyBy);
|
|
163
|
+
if (obj && obj.nickName) {
|
|
164
|
+
res.objx._modifyNickName = obj.nickName;
|
|
165
|
+
res.objx._modifyMobile = obj.mobile;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function handleCreateInfo(config, res) {
|
|
173
|
+
if (!config.addCreateInfo) return;
|
|
174
|
+
let queryCreateInfo = config.queryCreateInfo || "0";
|
|
175
|
+
let toDo = (row) => {
|
|
176
|
+
if (!row) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
let _createBy = null;
|
|
180
|
+
let _modifyBy = null;
|
|
181
|
+
if (row._createNickName) {
|
|
182
|
+
if (queryCreateInfo === "1") {
|
|
183
|
+
_createBy = getCreateBy(row) + "(" + row._createNickName + ")";
|
|
184
|
+
} else if (queryCreateInfo === "2") {
|
|
185
|
+
_createBy = row._createNickName;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
if (row._modifyNickName) {
|
|
189
|
+
if (queryCreateInfo === "1") {
|
|
190
|
+
_modifyBy = getModifyBy(row) + "(" + row._modifyNickName + ")";
|
|
191
|
+
} else if (queryCreateInfo === "2") {
|
|
192
|
+
_modifyBy = row._modifyNickName;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
row._createBy = _createBy || getCreateBy(row) || null;
|
|
196
|
+
row._modifyBy = _modifyBy || getModifyBy(row) || null;
|
|
197
|
+
};
|
|
198
|
+
let data = res.objx;
|
|
199
|
+
if (typeof res.objx === "object") {
|
|
200
|
+
if (Array.isArray(data)) {
|
|
201
|
+
for (let item of res.objx) {
|
|
202
|
+
toDo(item);
|
|
203
|
+
}
|
|
204
|
+
/* res.objx.forEach(item => {
|
|
205
|
+
toDo(item);
|
|
206
|
+
}) */
|
|
207
|
+
} else if (data && res.objx.hasOwnProperty("records")) {
|
|
208
|
+
let records = res.objx.records || [];
|
|
209
|
+
for (let item of records) {
|
|
210
|
+
toDo(item);
|
|
211
|
+
}
|
|
212
|
+
/* records.forEach(item => {
|
|
213
|
+
toDo(item);
|
|
214
|
+
}) */
|
|
215
|
+
} else {
|
|
216
|
+
toDo(res.objx);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function getCreateBy(row) {
|
|
222
|
+
let result = null;
|
|
223
|
+
if (row) {
|
|
224
|
+
if (row.hasOwnProperty("createBy")) {
|
|
225
|
+
result = row.createBy;
|
|
226
|
+
} else if (row.hasOwnProperty("create_by")) {
|
|
227
|
+
result = row.create_by;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return result;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function getModifyBy(row) {
|
|
234
|
+
let result = null;
|
|
235
|
+
if (row) {
|
|
236
|
+
if (row.hasOwnProperty("modifyBy")) {
|
|
237
|
+
result = row.modifyBy;
|
|
238
|
+
} else if (row.hasOwnProperty("modify_by")) {
|
|
239
|
+
result = row.modify_by;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return result;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
async function handleNickName2(option) {
|
|
246
|
+
let { vueTarget, res, callback, config } = option;
|
|
247
|
+
if (res.type !== "success" || !res.objx) {
|
|
248
|
+
callback && callback(res);
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
let data = res.objx;
|
|
252
|
+
if (!Array.isArray(data)) {
|
|
253
|
+
data = res.objx.records;
|
|
254
|
+
}
|
|
255
|
+
let requestData = [];
|
|
256
|
+
for (let item of data) {
|
|
257
|
+
let createBy = getCreateBy(item);
|
|
258
|
+
let modifyBy = getModifyBy(item);
|
|
259
|
+
|
|
260
|
+
if (createBy && !requestData.includes(createBy)) {
|
|
261
|
+
requestData.push(createBy);
|
|
262
|
+
}
|
|
263
|
+
if (modifyBy && !requestData.includes(modifyBy)) {
|
|
264
|
+
requestData.push(modifyBy);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
/* data.forEach(item => {
|
|
268
|
+
let createBy = getCreateBy(item);
|
|
269
|
+
let modifyBy = getModifyBy(item);
|
|
270
|
+
|
|
271
|
+
if (createBy && !requestData.includes(createBy)) {
|
|
272
|
+
requestData.push(createBy)
|
|
273
|
+
}
|
|
274
|
+
if (modifyBy && !requestData.includes(modifyBy)) {
|
|
275
|
+
requestData.push(modifyBy)
|
|
276
|
+
}
|
|
277
|
+
}) */
|
|
278
|
+
if (!requestData.length) {
|
|
279
|
+
callback && callback(res);
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
if (!vueTarget) vueTarget = window.$vueRoot;
|
|
283
|
+
|
|
284
|
+
let modal = config.modal ?? true;
|
|
285
|
+
let isLoading = config.isLoading || false;
|
|
286
|
+
|
|
287
|
+
return vueTarget.$http({
|
|
288
|
+
url: USER_PREFIX + `/userb/getUserBasicInfos`,
|
|
289
|
+
method: `post`,
|
|
290
|
+
data: requestData,
|
|
291
|
+
modal: modal,
|
|
292
|
+
isLoading: isLoading,
|
|
293
|
+
success: (res2) => {
|
|
294
|
+
let arr = res2.objx || [];
|
|
295
|
+
for (let item of data) {
|
|
296
|
+
let createBy = getCreateBy(item);
|
|
297
|
+
let modifyBy = getModifyBy(item);
|
|
298
|
+
if (createBy) {
|
|
299
|
+
let obj = arr.find((item) => item.loginAccount === createBy);
|
|
300
|
+
if (obj && obj.nickName) {
|
|
301
|
+
item._createNickName = obj.nickName;
|
|
302
|
+
item._createMobile = obj.mobile;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
if (modifyBy) {
|
|
306
|
+
let obj = arr.find((item) => item.loginAccount === modifyBy);
|
|
307
|
+
if (obj && obj.nickName) {
|
|
308
|
+
item._modifyNickName = obj.nickName;
|
|
309
|
+
item._modifyMobile = obj.mobile;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
/* data.forEach(item => {
|
|
314
|
+
let createBy = getCreateBy(item);
|
|
315
|
+
let modifyBy = getModifyBy(item);
|
|
316
|
+
if (createBy) {
|
|
317
|
+
let obj = arr.find(item => item.loginAccount === createBy);
|
|
318
|
+
if (obj && obj.nickName) {
|
|
319
|
+
item._createNickName = obj.nickName;
|
|
320
|
+
item._createMobile = obj.mobile;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
if (modifyBy) {
|
|
324
|
+
let obj = arr.find(item => item.loginAccount === modifyBy);
|
|
325
|
+
if (obj && obj.nickName) {
|
|
326
|
+
item._modifyNickName = obj.nickName;
|
|
327
|
+
item._modifyMobile = obj.mobile;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}) */
|
|
331
|
+
},
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// response interceptor
|
|
336
|
+
service.interceptors.response.use(
|
|
337
|
+
async (response) => {
|
|
338
|
+
const res = response.data;
|
|
339
|
+
const config = response.config;
|
|
340
|
+
if (config.resultType === "other") {
|
|
341
|
+
config.callback && config.callback(res, response);
|
|
342
|
+
removeModel(config);
|
|
343
|
+
return res;
|
|
344
|
+
} else if (res.type) {
|
|
345
|
+
if (res.type === "success") {
|
|
346
|
+
if (
|
|
347
|
+
settingConfig.queryCreateInfo !== false &&
|
|
348
|
+
config.queryCreateInfo &&
|
|
349
|
+
config.queryCreateInfo !== "0"
|
|
350
|
+
) {
|
|
351
|
+
let vueTarget = config.vueTarget;
|
|
352
|
+
await handleNickName({ vueTarget, res, config });
|
|
353
|
+
}
|
|
354
|
+
if (config.addCreateInfo) {
|
|
355
|
+
handleCreateInfo(config, res);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
config.success && config.success(res, response);
|
|
359
|
+
config.callback && config.callback(res, response);
|
|
360
|
+
removeModel(config);
|
|
361
|
+
return res;
|
|
362
|
+
} else {
|
|
363
|
+
if (res.rmid === "999999999") {
|
|
364
|
+
removeModel(config);
|
|
365
|
+
configUtil.logout();
|
|
366
|
+
} else {
|
|
367
|
+
config.fail && config.fail(res, response);
|
|
368
|
+
config.callback && config.callback(res, response);
|
|
369
|
+
if (config.modalStrictly !== true) {
|
|
370
|
+
removeModel(config);
|
|
371
|
+
}
|
|
372
|
+
if (config.resultType !== "special" && config.failMsg !== false) {
|
|
373
|
+
ErroreBox.msg(res);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
return res;
|
|
377
|
+
}
|
|
378
|
+
} else {
|
|
379
|
+
if (config.modalStrictly !== true) {
|
|
380
|
+
removeModel(config);
|
|
381
|
+
}
|
|
382
|
+
return res;
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
(error) => {
|
|
386
|
+
let config = error.config;
|
|
387
|
+
if (
|
|
388
|
+
error.response &&
|
|
389
|
+
error.response.data &&
|
|
390
|
+
error.response.data.rmid === "999999999"
|
|
391
|
+
) {
|
|
392
|
+
removeModel(config);
|
|
393
|
+
configUtil.logout();
|
|
394
|
+
} else {
|
|
395
|
+
if (config) {
|
|
396
|
+
config.error && config.error(error);
|
|
397
|
+
if (config.modalStrictly !== true) {
|
|
398
|
+
removeModel(config);
|
|
399
|
+
}
|
|
400
|
+
if (config.errorMsg !== false) {
|
|
401
|
+
ErroreBox.msg({
|
|
402
|
+
content: error.message,
|
|
403
|
+
type: "error",
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
} else {
|
|
407
|
+
ErroreBox.msg({
|
|
408
|
+
content: error.message,
|
|
409
|
+
type: "error",
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
return Promise.reject(error);
|
|
414
|
+
}
|
|
415
|
+
);
|
|
416
|
+
|
|
417
|
+
export default service;
|