cloud-web-corejs 1.0.258 → 1.0.259
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 +1208 -1
- 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
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {getToken} from "../../utils/auth";
|
|
2
|
-
import {openCnPrint} from "../../components/cnPrint/index";
|
|
3
|
-
import {openHiPrint} from "../../components/hiprint/index";
|
|
4
|
-
import {openJdPrint} from "../../components/jdPrint/index";
|
|
5
|
-
import {openPddPrint} from "../../components/pddPrint/index";
|
|
6
|
-
import {openVipPrint} from "../../components/vipPrint/index";
|
|
7
|
-
import {openXhsPrint} from "../../components/xhsPrint/index";
|
|
1
|
+
import { getToken } from "../../utils/auth";
|
|
2
|
+
import { openCnPrint } from "../../components/cnPrint/index";
|
|
3
|
+
import { openHiPrint } from "../../components/hiprint/index";
|
|
4
|
+
import { openJdPrint } from "../../components/jdPrint/index";
|
|
5
|
+
import { openPddPrint } from "../../components/pddPrint/index";
|
|
6
|
+
import { openVipPrint } from "../../components/vipPrint/index";
|
|
7
|
+
import { openXhsPrint } from "../../components/xhsPrint/index";
|
|
8
8
|
|
|
9
9
|
let modules;
|
|
10
10
|
let configUtil = {
|
|
@@ -29,7 +29,7 @@ modules = {
|
|
|
29
29
|
},
|
|
30
30
|
computed: {
|
|
31
31
|
buttonName() {
|
|
32
|
-
if(this.option.label){
|
|
32
|
+
if (this.option.label) {
|
|
33
33
|
return this.option.label;
|
|
34
34
|
}
|
|
35
35
|
let exportTemplates = this.exportTemplates;
|
|
@@ -143,14 +143,13 @@ modules = {
|
|
|
143
143
|
},
|
|
144
144
|
getTableGrid() {
|
|
145
145
|
let grid = null;
|
|
146
|
-
let tableTarget = this.option.tableTarget
|
|
146
|
+
let tableTarget = this.option.tableTarget;
|
|
147
147
|
if (tableTarget) {
|
|
148
148
|
if (typeof tableTarget === "function") {
|
|
149
149
|
grid = tableTarget();
|
|
150
150
|
} else {
|
|
151
151
|
grid = tableTarget;
|
|
152
152
|
}
|
|
153
|
-
|
|
154
153
|
} else if (this.option.tableRef) {
|
|
155
154
|
grid = this.parentTarget.$refs[this.option.tableRef];
|
|
156
155
|
}
|
|
@@ -160,23 +159,22 @@ modules = {
|
|
|
160
159
|
let checkRows = [];
|
|
161
160
|
let $grid = this.getTableGrid();
|
|
162
161
|
|
|
163
|
-
|
|
164
162
|
let condition = null;
|
|
165
|
-
if(this.option.customCondition){
|
|
163
|
+
if (this.option.customCondition) {
|
|
166
164
|
let condition1 = this.option.customCondition(item);
|
|
167
|
-
if(condition1)condition = condition1;
|
|
165
|
+
if (condition1) condition = condition1;
|
|
168
166
|
}
|
|
169
|
-
if(!condition){
|
|
167
|
+
if (!condition) {
|
|
170
168
|
if ($grid) {
|
|
171
169
|
checkRows = $grid.getCheckboxRecords(true);
|
|
172
170
|
} else {
|
|
173
|
-
checkRows
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
171
|
+
checkRows =
|
|
172
|
+
typeof this.option.param === "function"
|
|
173
|
+
? this.option.param(item)
|
|
174
|
+
: this.option.param;
|
|
177
175
|
}
|
|
178
176
|
let ids = checkRows ? checkRows.map((row) => row.id) : [];
|
|
179
|
-
condition = ids.length ? {id: ids} : null;
|
|
177
|
+
condition = ids.length ? { id: ids } : null;
|
|
180
178
|
}
|
|
181
179
|
return condition;
|
|
182
180
|
|
|
@@ -222,7 +220,12 @@ modules = {
|
|
|
222
220
|
if ($grid) {
|
|
223
221
|
checkRows = $grid.getCheckboxRecords(true);
|
|
224
222
|
if (!checkRows.length) {
|
|
225
|
-
this.$baseAlert(
|
|
223
|
+
this.$baseAlert(
|
|
224
|
+
this.$t2(
|
|
225
|
+
"请选择需要导出/打印的数据",
|
|
226
|
+
"components.baseInputExport.selectDataTip"
|
|
227
|
+
)
|
|
228
|
+
);
|
|
226
229
|
return;
|
|
227
230
|
}
|
|
228
231
|
}
|
|
@@ -238,7 +241,9 @@ modules = {
|
|
|
238
241
|
} else if (this.exportTypes.includes(etType)) {
|
|
239
242
|
//导出excel
|
|
240
243
|
let conditions = this.tableDefalutHandle(exportTemplate) || [];
|
|
241
|
-
this.$baseConfirm(
|
|
244
|
+
this.$baseConfirm(
|
|
245
|
+
this.$t2("您确定要导出吗?", "components.baseInputExport.exportTip")
|
|
246
|
+
).then(() => {
|
|
242
247
|
let condition = $grid
|
|
243
248
|
? this.tableDefalutHandle(exportTemplate)
|
|
244
249
|
: this.tableDefalutHandle(exportTemplate);
|
|
@@ -371,16 +376,28 @@ modules = {
|
|
|
371
376
|
}
|
|
372
377
|
|
|
373
378
|
function downLoadFile(row, that) {
|
|
374
|
-
let realFileName
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
379
|
+
let realFileName;
|
|
380
|
+
if (row.filename) {
|
|
381
|
+
//后台返回了文件名,用文件名+文件格式(格式取自uuid的后缀),不再拼接uuid
|
|
382
|
+
let uuid = row.uuid || "";
|
|
383
|
+
let dotIndex = uuid.lastIndexOf(".");
|
|
384
|
+
let suffix = dotIndex > -1 ? uuid.slice(dotIndex) : "";
|
|
385
|
+
realFileName =
|
|
386
|
+
suffix && row.filename.slice(-suffix.length) !== suffix
|
|
387
|
+
? row.filename + suffix
|
|
388
|
+
: row.filename;
|
|
389
|
+
} else {
|
|
390
|
+
realFileName = fileName ? fileName + "-" + row.uuid : row.uuid;
|
|
391
|
+
}
|
|
392
|
+
let fileUrl =
|
|
393
|
+
configUtil.baseUrl +
|
|
394
|
+
that.option.prefix +
|
|
395
|
+
"/export_ins/download?uuid=" +
|
|
396
|
+
row.uuid +
|
|
397
|
+
"&ippaaapp=" +
|
|
398
|
+
row.ippaaapp +
|
|
399
|
+
"&n=" +
|
|
400
|
+
realFileName;
|
|
384
401
|
var params = {};
|
|
385
402
|
that.parentTarget.$http({
|
|
386
403
|
method: "post",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-input-number class="noButton" autocomplete="off" size="small" v-limit-number="$attrs.scale" v-bind="$attrs" v-on="$listeners" />
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script>
|
|
6
|
-
export default {
|
|
7
|
-
name: 'baseInputNumber'
|
|
8
|
-
};
|
|
9
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<el-input-number class="noButton" autocomplete="off" :size="$attrs.size || 'small'" v-limit-number="$attrs.scale" v-bind="$attrs" v-on="$listeners" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
export default {
|
|
7
|
+
name: 'baseInputNumber'
|
|
8
|
+
};
|
|
9
|
+
</script>
|
|
10
10
|
<style></style>
|
|
@@ -1,27 +1,35 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<div class="slide-wrap" v-if="$attrs.showNav!==false">
|
|
3
|
+
<div class="slide-wrap" v-if="$attrs.showNav !== false">
|
|
4
4
|
<template v-for="(item, index) in navList">
|
|
5
|
-
<div :key="index" v-show="item.visible!==false">
|
|
6
|
-
<a
|
|
5
|
+
<div :key="index" v-show="item.visible !== false">
|
|
6
|
+
<a
|
|
7
|
+
href="javascript:void(0)"
|
|
8
|
+
class="slide-nav"
|
|
9
|
+
@click="handleChange(index)"
|
|
10
|
+
>
|
|
7
11
|
<p>{{ item.label }}</p>
|
|
8
12
|
</a>
|
|
9
13
|
</div>
|
|
10
14
|
</template>
|
|
11
15
|
</div>
|
|
12
|
-
<div class="d-cont">
|
|
16
|
+
<div class="d-cont" :class="{ 'full-width': $attrs.showNav === false }">
|
|
13
17
|
<slot></slot>
|
|
14
18
|
</div>
|
|
15
19
|
</div>
|
|
16
20
|
</template>
|
|
17
21
|
|
|
18
22
|
<script>
|
|
19
|
-
import {baseTabsMixin} from
|
|
23
|
+
import { baseTabsMixin } from "./mixins.js";
|
|
20
24
|
|
|
21
25
|
export default {
|
|
22
|
-
name:
|
|
23
|
-
mixins: [baseTabsMixin]
|
|
26
|
+
name: "baseTabs",
|
|
27
|
+
mixins: [baseTabsMixin],
|
|
24
28
|
};
|
|
25
29
|
</script>
|
|
26
30
|
|
|
27
|
-
<style
|
|
31
|
+
<style>
|
|
32
|
+
div.d-cont.full-width .d-item {
|
|
33
|
+
padding-right: 16px !important;
|
|
34
|
+
}
|
|
35
|
+
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* code-editor 的异步组件定义(ace 体积较大,保持独立 chunk)。
|
|
3
|
+
*
|
|
4
|
+
* 普通 `() => import(...)` 在 chunk 加载失败时会静默渲染成空白,与“编辑器渲染了但内容
|
|
5
|
+
* 为空”无法区分,排查成本很高,故统一走带 error 占位的高级异步组件形式。
|
|
6
|
+
*/
|
|
7
|
+
export default function createCodeEditorAsyncComponent() {
|
|
8
|
+
return {
|
|
9
|
+
component: import("./index.vue"),
|
|
10
|
+
error: {
|
|
11
|
+
name: "CodeEditorLoadError",
|
|
12
|
+
render(h) {
|
|
13
|
+
return h(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
staticClass: "ace-editor",
|
|
17
|
+
style: {
|
|
18
|
+
padding: "12px",
|
|
19
|
+
color: "#f56c6c",
|
|
20
|
+
fontSize: "12px",
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
"代码编辑器加载失败,请刷新页面重试"
|
|
24
|
+
);
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
timeout: 30000,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
@@ -22,6 +22,7 @@ import "ace-builds/src-min-noconflict/mode-javascript"; // 默认设置的语言
|
|
|
22
22
|
import "ace-builds/src-min-noconflict/mode-json"; //
|
|
23
23
|
import "ace-builds/src-min-noconflict/mode-css"; //
|
|
24
24
|
import "ace-builds/src-min-noconflict/mode-java"; //
|
|
25
|
+
import "ace-builds/src-min-noconflict/mode-text"; //
|
|
25
26
|
import "ace-builds/src-min-noconflict/ext-language_tools";
|
|
26
27
|
const ACE_BASE_PATH = window.WEB_PREFIX + "/base/ace/src-min-noconflict";
|
|
27
28
|
import indexUtil from "../../utils/index.js";
|
|
@@ -55,7 +56,7 @@ export default {
|
|
|
55
56
|
},
|
|
56
57
|
height: {
|
|
57
58
|
type: String,
|
|
58
|
-
default: "450px
|
|
59
|
+
default: "450px",
|
|
59
60
|
},
|
|
60
61
|
resize: {
|
|
61
62
|
//是否开启语法检查,默认开启
|
|
@@ -65,7 +66,10 @@ export default {
|
|
|
65
66
|
},
|
|
66
67
|
computed: {
|
|
67
68
|
editorStyle: function () {
|
|
68
|
-
|
|
69
|
+
// 对象形式绑定,避免调用方传入的 height 拼出非法 CSS。
|
|
70
|
+
// 历史调用方存在 height="414px;" 这种带分号的写法,对象形式下会被浏览器丢弃,需先清理。
|
|
71
|
+
let height = (this.height || "").trim().replace(/;+$/, "").trim();
|
|
72
|
+
return { height: height || "450px" };
|
|
69
73
|
},
|
|
70
74
|
modePath: function () {
|
|
71
75
|
return "ace/mode/" + this.mode;
|
|
@@ -156,6 +160,20 @@ export default {
|
|
|
156
160
|
//this.$emit('update:value', this.aceEditor.getValue()) // 触发更新事件, 实现.sync双向绑定!!
|
|
157
161
|
this.$emit("input", this.aceEditor.getValue());
|
|
158
162
|
});
|
|
163
|
+
|
|
164
|
+
this.observeSizeChange();
|
|
165
|
+
},
|
|
166
|
+
activated() {
|
|
167
|
+
// keep-alive 页签切回时 DOM 重新插入,需重新测量,否则内容不渲染
|
|
168
|
+
this.refresh();
|
|
169
|
+
},
|
|
170
|
+
beforeDestroy() {
|
|
171
|
+
this.disconnectObserver();
|
|
172
|
+
if (this.aceEditor) {
|
|
173
|
+
// ace 仅在 destroy 时才解绑它自己注册的 window resize 监听
|
|
174
|
+
this.aceEditor.destroy();
|
|
175
|
+
this.aceEditor = null;
|
|
176
|
+
}
|
|
159
177
|
},
|
|
160
178
|
data() {
|
|
161
179
|
return {
|
|
@@ -163,10 +181,79 @@ export default {
|
|
|
163
181
|
themePath: "ace/theme/sqlserver", // 不导入 webpack-resolver,该模块路径会报错
|
|
164
182
|
// modePath: 'ace/mode/javascript', // 同上
|
|
165
183
|
codeValue: this.value || "",
|
|
184
|
+
resizeObserver: null,
|
|
185
|
+
resizeRaf: null,
|
|
186
|
+
refreshPending: false,
|
|
166
187
|
};
|
|
167
188
|
},
|
|
168
|
-
watch: {
|
|
189
|
+
watch: {
|
|
190
|
+
value(val) {
|
|
191
|
+
if (!this.aceEditor) {
|
|
192
|
+
// 实例尚未创建(异步组件解析中)时不能丢弃,否则这次赋值永久丢失
|
|
193
|
+
this.codeValue = val || "";
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
const newVal = val || "";
|
|
197
|
+
if (this.aceEditor.getValue() !== newVal) {
|
|
198
|
+
this.aceEditor.setValue(newVal, -1);
|
|
199
|
+
this.aceEditor.clearSelection();
|
|
200
|
+
this.aceEditor.resize();
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
mode() {
|
|
204
|
+
if (!this.aceEditor) return;
|
|
205
|
+
if (this.mode === "json") {
|
|
206
|
+
this.setJsonMode();
|
|
207
|
+
} else if (this.mode === "css") {
|
|
208
|
+
this.setCssMode();
|
|
209
|
+
} else {
|
|
210
|
+
this.aceEditor.getSession().setMode(this.modePath);
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
height() {
|
|
214
|
+
this.$nextTick(() => {
|
|
215
|
+
this.refresh();
|
|
216
|
+
});
|
|
217
|
+
},
|
|
218
|
+
},
|
|
169
219
|
methods: {
|
|
220
|
+
/**
|
|
221
|
+
* ace 在 mounted 时同步初始化,若此刻祖先为 display:none(隐藏字段、非激活 tab、
|
|
222
|
+
* 未展开的弹窗等),字符与容器尺寸都会被测成 0,之后没有任何时机重新测量
|
|
223
|
+
* —— ace 自身只监听 window 的 resize。这里观测编辑器元素本身,尺寸一旦可用就重测。
|
|
224
|
+
*/
|
|
225
|
+
observeSizeChange() {
|
|
226
|
+
if (typeof ResizeObserver !== "function" || !this.$refs.ace) return;
|
|
227
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
228
|
+
this.refresh();
|
|
229
|
+
});
|
|
230
|
+
this.resizeObserver.observe(this.$refs.ace);
|
|
231
|
+
},
|
|
232
|
+
disconnectObserver() {
|
|
233
|
+
if (this.resizeRaf !== null) {
|
|
234
|
+
cancelAnimationFrame(this.resizeRaf);
|
|
235
|
+
this.resizeRaf = null;
|
|
236
|
+
}
|
|
237
|
+
this.refreshPending = false;
|
|
238
|
+
if (this.resizeObserver) {
|
|
239
|
+
this.resizeObserver.disconnect();
|
|
240
|
+
this.resizeObserver = null;
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
/** 重新测量并重绘。尺寸不可用时跳过,等下一次可见再触发。 */
|
|
244
|
+
refresh() {
|
|
245
|
+
if (this.refreshPending) return;
|
|
246
|
+
this.refreshPending = true;
|
|
247
|
+
this.resizeRaf = requestAnimationFrame(() => {
|
|
248
|
+
this.refreshPending = false;
|
|
249
|
+
this.resizeRaf = null;
|
|
250
|
+
const el = this.$refs.ace;
|
|
251
|
+
if (!this.aceEditor || !el) return;
|
|
252
|
+
// 仍不可见时跳过,等真正显示后 ResizeObserver 会再次触发
|
|
253
|
+
if (!el.offsetWidth || !el.offsetHeight) return;
|
|
254
|
+
this.aceEditor.resize(true);
|
|
255
|
+
});
|
|
256
|
+
},
|
|
170
257
|
addAutoCompletion(ace) {
|
|
171
258
|
let acData = this.acData;
|
|
172
259
|
let langTools = ace.require("ace/ext/language_tools");
|
|
@@ -193,7 +280,9 @@ export default {
|
|
|
193
280
|
return this.aceEditor.getSession().getAnnotations();
|
|
194
281
|
},
|
|
195
282
|
setValue(val) {
|
|
196
|
-
this.aceEditor
|
|
283
|
+
if (!this.aceEditor) return;
|
|
284
|
+
this.aceEditor.setValue(val || "", -1);
|
|
285
|
+
this.aceEditor.clearSelection();
|
|
197
286
|
},
|
|
198
287
|
btnMouseDown(event) {
|
|
199
288
|
let rootDom = document.body.querySelector("#app");
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const modules = {};
|
|
2
|
-
import vue from "vue"
|
|
3
|
-
import errorMsg from
|
|
2
|
+
import vue from "vue";
|
|
3
|
+
import errorMsg from "./index.vue";
|
|
4
4
|
|
|
5
5
|
const MessageBoxInstance = vue.extend(errorMsg);
|
|
6
6
|
let currentMsg;
|
|
7
7
|
const initInstance = () => {
|
|
8
8
|
// 实例化vue实例
|
|
9
|
-
currentMsg = new MessageBoxInstance({i18n: window.$vueRoot._i18n});
|
|
9
|
+
currentMsg = new MessageBoxInstance({ i18n: window.$vueRoot._i18n });
|
|
10
10
|
let msgBoxEl = currentMsg.$mount().$el;
|
|
11
11
|
document.body.appendChild(msgBoxEl);
|
|
12
12
|
};
|
|
@@ -15,27 +15,28 @@ function msg(options) {
|
|
|
15
15
|
if (!currentMsg) {
|
|
16
16
|
initInstance();
|
|
17
17
|
}
|
|
18
|
-
if (typeof options ===
|
|
18
|
+
if (typeof options === "string") {
|
|
19
19
|
currentMsg.content = options;
|
|
20
|
-
} else if (typeof options ===
|
|
20
|
+
} else if (typeof options === "object") {
|
|
21
21
|
Object.assign(currentMsg, options);
|
|
22
22
|
}
|
|
23
|
-
return currentMsg
|
|
24
|
-
.
|
|
23
|
+
return currentMsg
|
|
24
|
+
.showMsgBox()
|
|
25
|
+
.then((val) => {
|
|
25
26
|
currentMsg.showWrap = false;
|
|
26
27
|
currentMsg.$destroy();
|
|
27
28
|
currentMsg.$el.remove();
|
|
28
29
|
currentMsg = null;
|
|
29
30
|
return Promise.resolve(val);
|
|
30
31
|
})
|
|
31
|
-
.catch(err => {
|
|
32
|
+
.catch((err) => {
|
|
32
33
|
currentMsg.showWrap = false;
|
|
33
34
|
currentMsg.$destroy();
|
|
34
35
|
currentMsg.$el.remove();
|
|
35
36
|
currentMsg = null;
|
|
36
37
|
return Promise.reject(err);
|
|
37
38
|
});
|
|
38
|
-
}
|
|
39
|
+
}
|
|
39
40
|
|
|
40
41
|
// 定义插件对象
|
|
41
42
|
// vue的install方法,用于定义vue插件
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**version-1.0*/
|
|
2
2
|
let tmixins = {};
|
|
3
|
-
import PopupManager from
|
|
4
|
-
import { getErrorMsg } from
|
|
3
|
+
import PopupManager from "element-ui/src/utils/popup/popup-manager.js";
|
|
4
|
+
import { getErrorMsg } from "@base/utils/index.js";
|
|
5
5
|
|
|
6
6
|
tmixins = {
|
|
7
|
-
name:
|
|
7
|
+
name: "errorMsg",
|
|
8
8
|
props: {
|
|
9
9
|
rmid: {
|
|
10
|
-
default:
|
|
10
|
+
default: "",
|
|
11
11
|
},
|
|
12
12
|
content: {
|
|
13
|
-
default:
|
|
13
|
+
default: "",
|
|
14
14
|
},
|
|
15
15
|
objx: Object,
|
|
16
|
-
_errorMsg: null
|
|
16
|
+
_errorMsg: null,
|
|
17
17
|
},
|
|
18
18
|
created() {
|
|
19
19
|
if (this.$baseEventBus.isMobile) {
|
|
@@ -23,13 +23,13 @@ tmixins = {
|
|
|
23
23
|
data() {
|
|
24
24
|
return {
|
|
25
25
|
res: {},
|
|
26
|
-
title: this.$t2(
|
|
27
|
-
text1:
|
|
28
|
-
text2:
|
|
26
|
+
title: this.$t2("提示", "components.errorMsg.title"),
|
|
27
|
+
text1: "",
|
|
28
|
+
text2: "",
|
|
29
29
|
showWrap: false,
|
|
30
30
|
showTextFlag: false,
|
|
31
|
-
zIndex: null
|
|
32
|
-
}
|
|
31
|
+
zIndex: null,
|
|
32
|
+
};
|
|
33
33
|
},
|
|
34
34
|
beforeDestroy() {
|
|
35
35
|
this.removeEnterEvent();
|
|
@@ -47,14 +47,14 @@ tmixins = {
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
addEnterEvent() {
|
|
50
|
-
window.addEventListener(
|
|
50
|
+
window.addEventListener("keydown", this.keyDown, true);
|
|
51
51
|
},
|
|
52
52
|
removeEnterEvent() {
|
|
53
|
-
window.removeEventListener(
|
|
53
|
+
window.removeEventListener("keydown", this.keyDown, true);
|
|
54
54
|
},
|
|
55
|
-
getShowText(text){
|
|
56
|
-
if(!text)return text
|
|
57
|
-
return text.replace(/(\r\n|\n|\r)/gm, "<br />")
|
|
55
|
+
getShowText(text) {
|
|
56
|
+
if (!text) return text;
|
|
57
|
+
return text.replace(/(\r\n|\n|\r)/gm, "<br />");
|
|
58
58
|
},
|
|
59
59
|
showMsgBox: function () {
|
|
60
60
|
this.removeEnterEvent();
|
|
@@ -73,11 +73,13 @@ tmixins = {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
} */
|
|
76
|
-
text = getErrorMsg(content)
|
|
77
|
-
this.text1 = this.getShowText(
|
|
78
|
-
|
|
76
|
+
text = getErrorMsg(content);
|
|
77
|
+
this.text1 = this.getShowText(
|
|
78
|
+
!!this.$t ? this.$t(text, this.objx) : text
|
|
79
|
+
);
|
|
80
|
+
if (this._errorMsg) {
|
|
79
81
|
this.text2 = this.getShowText(this._errorMsg);
|
|
80
|
-
}else{
|
|
82
|
+
} else {
|
|
81
83
|
this.text2 = this.getShowText(content);
|
|
82
84
|
}
|
|
83
85
|
}
|
|
@@ -95,7 +97,7 @@ tmixins = {
|
|
|
95
97
|
});
|
|
96
98
|
// 返回promise对象
|
|
97
99
|
return this.promise;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
+
},
|
|
101
|
+
},
|
|
100
102
|
};
|
|
101
|
-
export const mixins = tmixins
|
|
103
|
+
export const mixins = tmixins;
|
|
@@ -72,9 +72,9 @@ export default {
|
|
|
72
72
|
});
|
|
73
73
|
},
|
|
74
74
|
generateId() {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
);
|
|
75
|
+
// 自增序号保证唯一:随机数范围小,列多时会碰撞导致树勾选(node-key)错乱
|
|
76
|
+
this.idSeed = (this.idSeed || 0) + 1;
|
|
77
|
+
return "expcol_" + Date.now() + "_" + this.idSeed;
|
|
78
78
|
},
|
|
79
79
|
filterExportVisible(items) {
|
|
80
80
|
if (!Array.isArray(items)) return [];
|
|
@@ -92,6 +92,20 @@ export default {
|
|
|
92
92
|
return item;
|
|
93
93
|
});
|
|
94
94
|
},
|
|
95
|
+
filterNonDataExportColumns(items) {
|
|
96
|
+
if (!Array.isArray(items)) return [];
|
|
97
|
+
return items.reduce((result, item) => {
|
|
98
|
+
if (item.params?.exportDisabled) return result;
|
|
99
|
+
if (Array.isArray(item.children) && item.children.length) {
|
|
100
|
+
let children = this.filterNonDataExportColumns(item.children);
|
|
101
|
+
if (!children.length) return result;
|
|
102
|
+
result.push({ ...item, children });
|
|
103
|
+
} else {
|
|
104
|
+
result.push(item);
|
|
105
|
+
}
|
|
106
|
+
return result;
|
|
107
|
+
}, []);
|
|
108
|
+
},
|
|
95
109
|
init() {
|
|
96
110
|
let target = this.getGrid();
|
|
97
111
|
let { fullColumn, collectColumn: column1s } = target.getTableColumn();
|
|
@@ -143,6 +157,7 @@ export default {
|
|
|
143
157
|
} else {
|
|
144
158
|
columns = column1s;
|
|
145
159
|
}
|
|
160
|
+
columns = this.filterNonDataExportColumns(columns);
|
|
146
161
|
|
|
147
162
|
let exportItem = this.param.type === "exportItem";
|
|
148
163
|
|
|
@@ -170,7 +185,7 @@ export default {
|
|
|
170
185
|
//导出主表数据
|
|
171
186
|
|
|
172
187
|
fullColumn.forEach((column) => {
|
|
173
|
-
if (column.field) {
|
|
188
|
+
if (column.field && !column.params?.exportDisabled) {
|
|
174
189
|
if (yesFields.includes(column.field)) {
|
|
175
190
|
defaultCheckedKeys.push(column.id);
|
|
176
191
|
} else if (!noFields.includes(column.field) && column.visible) {
|
|
@@ -284,33 +299,40 @@ export default {
|
|
|
284
299
|
let collectColumn = !exportItem
|
|
285
300
|
? target.getTableColumn().collectColumn
|
|
286
301
|
: originOption.exportItemConfig?.columns;
|
|
302
|
+
// 按勾选后的实际层级算表头总行数(item.level 在导出明细列上不存在,不可依赖)
|
|
287
303
|
let maxRowspan = 1;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
304
|
+
let depthDo = (items, depth) => {
|
|
305
|
+
(items || []).forEach((item) => {
|
|
306
|
+
if (!checkIds.includes(item.id)) return;
|
|
307
|
+
if (item.children && item.children.length > 0) {
|
|
308
|
+
depthDo(item.children, depth + 1);
|
|
309
|
+
} else if (depth > maxRowspan) {
|
|
310
|
+
maxRowspan = depth;
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
};
|
|
314
|
+
depthDo(collectColumn, 1);
|
|
291
315
|
|
|
292
|
-
let loopDo = (items,
|
|
316
|
+
let loopDo = (items, depth) => {
|
|
293
317
|
let datas = [];
|
|
294
318
|
items.forEach((item) => {
|
|
295
|
-
if (checkIds.includes(item.id)) {
|
|
319
|
+
if (checkIds.includes(item.id) && !item.params?.exportDisabled) {
|
|
296
320
|
let column = this.$baseLodash.cloneDeep(item);
|
|
297
321
|
if (item.children && item.children.length > 0) {
|
|
298
|
-
let children =
|
|
322
|
+
let children = loopDo(item.children, depth + 1);
|
|
299
323
|
column.children = children;
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
} else if (!column.parentId) {
|
|
306
|
-
column.rowSpan = maxRowspan;
|
|
324
|
+
column.colSpan = children.length ? children.length : 1;
|
|
325
|
+
column.rowSpan = 1;
|
|
326
|
+
} else {
|
|
327
|
+
// 任意层级的叶子列都要跨到表头底行,否则多层分组表头导出错位
|
|
328
|
+
column.rowSpan = maxRowspan - depth + 1;
|
|
307
329
|
}
|
|
308
330
|
datas.push(column);
|
|
309
331
|
}
|
|
310
332
|
});
|
|
311
333
|
return datas;
|
|
312
334
|
};
|
|
313
|
-
let columns = loopDo(collectColumn,
|
|
335
|
+
let columns = loopDo(collectColumn, 1);
|
|
314
336
|
this.$emit("confirm", { columns, leafColumns });
|
|
315
337
|
this.addTableExportColumns();
|
|
316
338
|
this.dialogClose();
|