cnhis-design-vue 3.1.40-beta.12 → 3.1.40-beta.16
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/es/_virtual/plugin-vue_export-helper.js +1 -9
- package/es/components/annotation-edit/index.js +1 -10
- package/es/components/annotation-edit/src/AnnotationEdit.js +1 -164
- package/es/components/big-table/index.js +1 -15
- package/es/components/big-table/src/BigTable.vue.js +1 -6
- package/es/components/big-table/src/BigTable.vue2.js +1 -2498
- package/es/components/big-table/src/bigTableEmits.js +1 -53
- package/es/components/big-table/src/bigTableProps.js +1 -120
- package/es/components/big-table/src/bigTableState.js +1 -62
- package/es/components/big-table/src/components/NoData.vue.js +1 -74
- package/es/components/big-table/src/components/edit-form/edit-date.js +1 -214
- package/es/components/big-table/src/components/edit-form/edit-input.js +1 -95
- package/es/components/big-table/src/components/edit-form/edit-select.js +1 -139
- package/es/components/big-table/src/components/edit-form/edit-separate.vue.js +1 -103
- package/es/components/big-table/src/components/edit-form/edit-time.js +1 -122
- package/es/components/big-table/src/components/edit-form/useCommon.js +1 -23
- package/es/components/big-table/src/components/input-button.vue.js +1 -39
- package/es/components/big-table/src/components/separate.vue.js +1 -30
- package/es/components/big-table/src/constants/index.js +1 -3
- package/es/components/big-table/src/hooks/index.js +1 -9
- package/es/components/big-table/src/hooks/useAnchor.js +1 -49
- package/es/components/big-table/src/hooks/useAnnotation.js +1 -21
- package/es/components/big-table/src/hooks/useBatchEditing.js +1 -301
- package/es/components/big-table/src/hooks/useEdit.js +1 -133
- package/es/components/big-table/src/hooks/useEvent.js +1 -95
- package/es/components/big-table/src/hooks/useFormat.js +1 -507
- package/es/components/big-table/src/hooks/useNestTable.js +1 -86
- package/es/components/big-table/src/hooks/useSeparateRow.js +1 -177
- package/es/components/big-table/src/hooks/useTableParse.js +1 -142
- package/es/components/big-table/src/utils.js +1 -618
- package/es/components/bpmn-workflow/index.js +1 -10
- package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -258
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/BpmnRenderer.js +1 -1452
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomPathMap.js +1 -99
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRenderer.js +1 -114
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRules.js +1 -40
- package/es/components/bpmn-workflow/src/custom/customOtherModule/customViewerRenderer.js +1 -14
- package/es/components/bpmn-workflow/src/custom/customOtherModule/zoomScroll.js +1 -10
- package/es/components/button-print/index.js +1 -12
- package/es/components/button-print/src/ButtonPrint.vue.js +1 -6
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -528
- package/es/components/button-print/src/components/EditFormat.vue.js +1 -173
- package/es/components/button-print/src/components/IdentityVerification.vue.js +1 -182
- package/es/components/button-print/src/components/Preview.vue.js +1 -6
- package/es/components/button-print/src/components/Preview.vue2.js +1 -67
- package/es/components/button-print/src/utils/browserPrint.d.ts +2 -1
- package/es/components/button-print/src/utils/browserPrint.js +1 -43
- package/es/components/button-print/src/utils/dialog.js +1 -121
- package/es/components/button-print/src/utils/index.js +1 -2
- package/es/components/button-print/src/utils/print.d.ts +5 -1
- package/es/components/button-print/src/utils/print.js +1 -432
- package/es/components/editor/index.js +1 -10
- package/es/components/editor/src/Editor.js +1 -77
- package/es/components/fabric-chart/index.js +1 -10
- package/es/components/fabric-chart/src/FabricChart.vue.js +1 -71
- package/es/components/fabric-chart/src/components/PopupMenu.js +1 -118
- package/es/components/fabric-chart/src/components/PopupTip.vue.js +1 -34
- package/es/components/fabric-chart/src/components/useStyle.js +1 -36
- package/es/components/fabric-chart/src/hooks/constant.js +1 -78
- package/es/components/fabric-chart/src/hooks/index.js +1 -11
- package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -642
- package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -153
- package/es/components/fabric-chart/src/hooks/useBottom.js +1 -91
- package/es/components/fabric-chart/src/hooks/useCenter.js +1 -734
- package/es/components/fabric-chart/src/hooks/useCommon.js +1 -32
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -79
- package/es/components/fabric-chart/src/hooks/useDraw.js +1 -182
- package/es/components/fabric-chart/src/hooks/useEvent.js +1 -146
- package/es/components/fabric-chart/src/hooks/useGrid.js +1 -54
- package/es/components/fabric-chart/src/hooks/useLeft.js +1 -331
- package/es/components/fabric-chart/src/hooks/useOther.js +1 -95
- package/es/components/fabric-chart/src/hooks/useRight.js +1 -22
- package/es/components/fabric-chart/src/hooks/useShadow.js +1 -132
- package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +1 -341
- package/es/components/fabric-chart/src/hooks/useTop.js +1 -154
- package/es/components/fabric-chart/src/utils/index.js +1 -15624
- package/es/components/fabric-chart/src/utils/utils.js +1 -32
- package/es/components/field-set/index.js +1 -10
- package/es/components/field-set/src/FieldSet.vue.js +1 -470
- package/es/components/form-config/index.js +1 -10
- package/es/components/form-config/src/FormConfig.vue.js +1 -124
- package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -100
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -45
- package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -97
- package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -28
- package/es/components/form-config/src/components/index.js +1 -6
- package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -45
- package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -45
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -60
- package/es/components/form-config/src/components/renderer/index.js +1 -3
- package/es/components/form-config/src/constants/index.js +1 -61
- package/es/components/form-config/src/hooks/index.js +1 -3
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -90
- package/es/components/form-config/src/hooks/useDataNormalize.js +1 -35
- package/es/components/form-config/src/hooks/usePresetRenderer.js +1 -36
- package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -42
- package/es/components/form-config/src/utils/index.js +1 -26
- package/es/components/form-render/index.js +1 -30
- package/es/components/form-render/src/FormRender.vue.js +1 -239
- package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -49
- package/es/components/form-render/src/components/renderer/combination.js +1 -114
- package/es/components/form-render/src/components/renderer/complex.js +1 -37
- package/es/components/form-render/src/components/renderer/date.js +1 -171
- package/es/components/form-render/src/components/renderer/formItem.js +1 -128
- package/es/components/form-render/src/components/renderer/index.js +1 -43
- package/es/components/form-render/src/components/renderer/input.js +1 -50
- package/es/components/form-render/src/components/renderer/inputGroup.js +1 -11
- package/es/components/form-render/src/components/renderer/inputNumber.js +1 -55
- package/es/components/form-render/src/components/renderer/jsonCombination/hooks/useDeepValidate.js +1 -35
- package/es/components/form-render/src/components/renderer/jsonCombination/index.js +1 -175
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -274
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +1 -71
- package/es/components/form-render/src/components/renderer/lineBar/index.js +1 -11
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -111
- package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -139
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -244
- package/es/components/form-render/src/components/renderer/select.js +1 -176
- package/es/components/form-render/src/components/renderer/simpleComponent.js +1 -57
- package/es/components/form-render/src/components/renderer/slider.js +1 -38
- package/es/components/form-render/src/components/renderer/switch.js +1 -48
- package/es/components/form-render/src/components/renderer/textarea.js +1 -36
- package/es/components/form-render/src/components/tooltipMessage.vue.js +1 -37
- package/es/components/form-render/src/constants/index.js +1 -59
- package/es/components/form-render/src/hooks/index.js +1 -15
- package/es/components/form-render/src/hooks/useAnchor.js +1 -99
- package/es/components/form-render/src/hooks/useAsyncQueue.js +1 -153
- package/es/components/form-render/src/hooks/useAutoHidden.js +1 -43
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -119
- package/es/components/form-render/src/hooks/useChangeContext.js +1 -20
- package/es/components/form-render/src/hooks/useCommonInjection.js +1 -43
- package/es/components/form-render/src/hooks/useCommonLog.js +1 -12
- package/es/components/form-render/src/hooks/useComplexOptions.js +1 -225
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -290
- package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -65
- package/es/components/form-render/src/hooks/useFieldVisitor.js +1 -46
- package/es/components/form-render/src/hooks/useFormContext.js +1 -70
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -140
- package/es/components/form-render/src/hooks/useFormField.js +1 -13
- package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -31
- package/es/components/form-render/src/hooks/useFormRenderLifeCycle.js +1 -10
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -278
- package/es/components/form-render/src/hooks/useFormRequest.js +1 -42
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -83
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -85
- package/es/components/form-render/src/hooks/useNuiThemeOverrides.js +1 -18
- package/es/components/form-render/src/hooks/usePresetScope.js +1 -22
- package/es/components/form-render/src/types/fieldItem.js +1 -1
- package/es/components/form-render/src/types/index.js +1 -1
- package/es/components/form-render/src/utils/business.js +1 -114
- package/es/components/form-render/src/utils/dom.js +1 -38
- package/es/components/form-render/src/utils/index.js +1 -241
- package/es/components/form-render/src/utils/schema.js +1 -105
- package/es/components/grid/index.js +1 -11
- package/es/components/grid/src/Grid.js +1 -28
- package/es/components/grid/src/hooks.js +1 -168
- package/es/components/iho-table/index.js +1 -36
- package/es/components/iho-table/src/IhoTable.vue.js +1 -157
- package/es/components/iho-table/src/constants/index.js +1 -157
- package/es/components/iho-table/src/hooks/export.js +1 -2
- package/es/components/iho-table/src/hooks/index.js +1 -2
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -159
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.js +1 -67
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -26
- package/es/components/iho-table/src/hooks/tapHooks/useDomInsertHooks.js +1 -27
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.js +1 -280
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.js +1 -26
- package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.js +1 -38
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -27
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -164
- package/es/components/iho-table/src/hooks/useTableContext.js +1 -17
- package/es/components/iho-table/src/hooks/useTablePlugin.js +1 -20
- package/es/components/iho-table/src/plugins/anchorPlugin/index.js +1 -19
- package/es/components/iho-table/src/plugins/anchorPlugin/tableAnchor.js +1 -51
- package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -87
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -48
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +1 -230
- package/es/components/iho-table/src/plugins/filterPlugin/index.js +1 -240
- package/es/components/iho-table/src/plugins/index.js +1 -47
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -30
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -127
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -203
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -41
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -21
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -41
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -79
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -64
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -46
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -16
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +1 -108
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -163
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separateUtils.js +1 -42
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +1 -50
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -30
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/colorRendererPlugin.js +1 -48
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -62
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -52
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -92
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -59
- package/es/components/iho-table/src/plugins/rowClickPlugin/index.js +1 -34
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.js +1 -30
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js +1 -53
- package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -100
- package/es/components/iho-table/src/types/index.js +1 -1
- package/es/components/iho-table/src/types/pluginType.js +1 -16
- package/es/components/iho-table/src/utils/index.js +1 -169
- package/es/components/index.js +1 -119
- package/es/components/info-header/index.js +1 -10
- package/es/components/info-header/src/HiddenContent.vue.js +1 -70
- package/es/components/info-header/src/InfoEllipsis.vue.js +1 -43
- package/es/components/info-header/src/InfoHeader.vue.js +1 -313
- package/es/components/insurance-sdk/index.js +1 -1
- package/es/components/insurance-sdk/src/constants/index.js +1 -160
- package/es/components/insurance-sdk/src/utils/index.js +1 -1
- package/es/components/insurance-sdk/src/utils/insurance.js +1 -268
- package/es/components/keyboard/index.d.ts +1 -1
- package/es/components/keyboard/index.js +1 -10
- package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
- package/es/components/keyboard/src/Keyboard.vue.js +1 -164
- package/es/components/keyboard/src/components/InputNumber.vue.js +1 -86
- package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +1 -1
- package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -299
- package/es/components/keyboard/src/utils/index.js +1 -5
- package/es/components/map/index.js +1 -10
- package/es/components/map/src/Map.vue.js +1 -336
- package/es/components/recommend-search/index.js +1 -10
- package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -63
- package/es/components/recommend-search/src/components/BaseSearch.vue.js +1 -157
- package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -125
- package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -104
- package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -146
- package/es/components/recommend-search/src/constant/index.js +1 -7
- package/es/components/scale-view/index.js +1 -35
- package/es/components/scale-view/src/ScaleView.vue.js +1 -429
- package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -80
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -117
- package/es/components/scale-view/src/components/EvaluatePage.vue.js +1 -141
- package/es/components/scale-view/src/components/LoadingCom.vue.js +1 -19
- package/es/components/scale-view/src/components/NoData.vue.js +1 -74
- package/es/components/scale-view/src/components/ScaleScore.js +1 -63
- package/es/components/scale-view/src/components/composables/choose-common.js +1 -83
- package/es/components/scale-view/src/components/formitem/address.js +1 -3993
- package/es/components/scale-view/src/components/formitem/r-address.js +1 -226
- package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -133
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -281
- package/es/components/scale-view/src/components/formitem/r-collection.js +1 -111
- package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -212
- package/es/components/scale-view/src/components/formitem/r-input.js +1 -86
- package/es/components/scale-view/src/components/formitem/r-map.js +1 -106
- package/es/components/scale-view/src/components/formitem/r-radio.js +1 -240
- package/es/components/scale-view/src/components/formitem/r-select.js +1 -202
- package/es/components/scale-view/src/components/formitem/r-sign.js +1 -177
- package/es/components/scale-view/src/components/formitem/r-upload.js +1 -215
- package/es/components/scale-view/src/components/formitem/sign-com.js +1 -307
- package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -129
- package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -354
- package/es/components/scale-view/src/hooks/scaleview-init.js +1 -437
- package/es/components/scale-view/src/hooks/scaleview-props.js +1 -81
- package/es/components/scale-view/src/hooks/scaleview-state.js +1 -38
- package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -154
- package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -187
- package/es/components/scale-view/src/hooks/use-component.js +1 -86
- package/es/components/scale-view/src/hooks/use-evaluate.js +1 -150
- package/es/components/scale-view/src/hooks/use-event.js +1 -129
- package/es/components/scale-view/src/hooks/use-noData.js +1 -41
- package/es/components/scale-view/src/utils/judge-types.js +1 -36
- package/es/components/search-cascader/index.js +1 -10
- package/es/components/search-cascader/src/SearchCascader.vue.js +1 -194
- package/es/components/search-cascader/src/components/SearchMenu.js +1 -196
- package/es/components/search-cascader/src/components/index.js +1 -1
- package/es/components/search-cascader/src/constants/index.js +1 -11
- package/es/components/search-cascader/src/hooks/index.js +1 -1
- package/es/components/search-cascader/src/hooks/useCssVariable.js +1 -7
- package/es/components/search-cascader/src/utils/index.js +1 -11
- package/es/components/select-label/index.js +1 -15
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -447
- package/es/components/select-label/src/SelectLabel.vue.js +1 -6
- package/es/components/select-label/src/SelectLabel.vue2.js +1 -451
- package/es/components/select-label/src/components/label-classify.vue.js +1 -132
- package/es/components/select-person/index.js +1 -10
- package/es/components/select-person/src/SelectPerson.vue.js +1 -6
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -303
- package/es/components/select-person/src/utils/index.js +1 -58
- package/es/components/shortcut-provider/index.js +1 -12
- package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +1 -42
- package/es/components/shortcut-provider/src/constants/index.js +1 -8
- package/es/components/shortcut-provider/src/hooks/index.js +1 -2
- package/es/components/shortcut-provider/src/hooks/useShortcutSignature.js +1 -12
- package/es/components/shortcut-provider/src/hooks/useShortcuts.js +1 -188
- package/es/components/shortcut-provider/src/utils/index.js +1 -92
- package/es/components/shortcut-setter/index.js +1 -10
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.js +1 -98
- package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +1 -76
- package/es/components/steps-wheel/index.js +1 -10
- package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -376
- package/es/components/table-filter/index.js +1 -21
- package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +1 -2272
- package/es/components/table-filter/src/classification/Classification-com.vue.js +1 -1315
- package/es/components/table-filter/src/classification/search-class-name.vue.js +1 -195
- package/es/components/table-filter/src/classification/search-professional-model.vue.js +1 -594
- package/es/components/table-filter/src/components/age-com/index.vue.js +1 -185
- package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.js +1 -86
- package/es/components/table-filter/src/components/button-icon/getBtnIcon.js +1 -30
- package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.js +1 -253
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -114
- package/es/components/table-filter/src/components/classify-filter/helpers/options.js +1 -14
- package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +1 -87
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -147
- package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -304
- package/es/components/table-filter/src/components/multi-select/multi-select.vue.js +1 -153
- package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.js +1 -310
- package/es/components/table-filter/src/components/range-age/index.vue.js +1 -137
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +1 -64
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -45
- package/es/components/table-filter/src/components/render-widget/components/index.js +1 -2
- package/es/components/table-filter/src/components/render-widget/enums.js +1 -27
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +1 -70
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -107
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -152
- package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.js +1 -1520
- package/es/components/table-filter/src/components/search-condition/fieldTypeList.js +1 -171
- package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.js +1 -199
- package/es/components/table-filter/src/components/search-modal/set-classification.vue.js +1 -241
- package/es/components/table-filter/src/components/table-modal/TableModal.vue.js +1 -526
- package/es/components/table-filter/src/const/dataOptions.js +1 -107
- package/es/components/table-filter/src/const/index.js +1 -5
- package/es/components/table-filter/src/directive/flexibleResize.js +1 -157
- package/es/components/table-filter/src/directive/preventReClick.js +1 -14
- package/es/components/table-filter/src/directive/resize.js +1 -12
- package/es/components/table-filter/src/hooks/export.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -64
- package/es/components/table-filter/src/hooks/useMixins.js +1 -532
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -94
- package/es/components/table-filter/src/hooks/useTableSearchCon.js +1 -131
- package/es/components/table-filter/src/hooks/useWordBookutils.js +1 -91
- package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +1 -2038
- package/es/components/table-filter/src/tool/generateDefOptions.js +1 -65
- package/es/components/table-filter/src/tool/getWidgetType.js +1 -27
- package/es/components/table-filter/src/tool/options.js +1 -200
- package/es/components/table-filter/src/tool/resizeSensor.js +1 -123
- package/es/components/table-filter/src/tool/time-domain.js +1 -100
- package/es/components/table-filter/src/tool/transformData.js +1 -169
- package/es/components/table-filter/src/tool/utils.js +1 -29
- package/es/components/table-filter/src/types/enums.js +1 -67
- package/es/components/time-line/index.js +1 -10
- package/es/components/time-line/src/TimeLine.vue.js +1 -70
- package/es/components/vod-chunk-upload/index.js +1 -14
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.js +1 -480
- package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +1 -70
- package/es/components/vod-chunk-upload/src/hooks/upload-data.js +1 -96
- package/es/components/vod-chunk-upload/src/hooks/vod-computed.js +1 -79
- package/es/components/vod-chunk-upload/src/hooks/vod-data.js +1 -28
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/index.js +1 -2
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -332
- package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -94
- package/es/shared/assets/img/failure.png.js +1 -3
- package/es/shared/assets/img/no-permission.png.js +1 -3
- package/es/shared/assets/img/nodata.png.js +1 -3
- package/es/shared/assets/img/notfound.png.js +1 -3
- package/es/shared/assets/img/qr.png.js +1 -3
- package/es/shared/assets/img/success.png.js +1 -3
- package/es/shared/assets/img/video.png.js +1 -3
- package/es/shared/assets/img/video_default_cover.png.js +1 -3
- package/es/shared/assets/img/xb_big.png.js +1 -3
- package/es/shared/assets/img/xb_small.png.js +1 -3
- package/es/shared/components/SelectPage/SelectPage.vue.js +1 -61
- package/es/shared/components/SelectPage/index.js +1 -2
- package/es/shared/components/SlotRender/SlotRender.js +1 -35
- package/es/shared/components/SlotRender/index.js +1 -2
- package/es/shared/components/SvgIcon/SvgIcon.vue.js +1 -36
- package/es/shared/components/SvgIcon/index.js +1 -2
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -77
- package/es/shared/components/TextOverTooltip/index.js +1 -2
- package/es/shared/components/VueDraggable/index.js +1 -2
- package/es/shared/components/VueDraggable/src/core/componentBuilderHelper.js +1 -35
- package/es/shared/components/VueDraggable/src/core/componentStructure.js +1 -54
- package/es/shared/components/VueDraggable/src/core/renderHelper.js +1 -47
- package/es/shared/components/VueDraggable/src/core/sortableEvents.js +1 -14
- package/es/shared/components/VueDraggable/src/util/console.js +1 -9
- package/es/shared/components/VueDraggable/src/util/htmlHelper.js +1 -11
- package/es/shared/components/VueDraggable/src/util/string.js +1 -11
- package/es/shared/components/VueDraggable/src/util/tags.js +1 -130
- package/es/shared/components/VueDraggable/src/vuedraggable.js +1 -265
- package/es/shared/components/no-data/NoData.vue.js +1 -74
- package/es/shared/components/no-data/index.js +1 -2
- package/es/shared/components/player-vod/player.js +1 -121
- package/es/shared/components/player-vod/video-modal.js +1 -91
- package/es/shared/global/variable.js +1 -3
- package/es/shared/utils/anime.js +1 -129
- package/es/shared/utils/colorLog.js +1 -53
- package/es/shared/utils/index.js +1 -167
- package/es/shared/utils/loadViewer.js +1 -11
- package/es/shared/utils/tapable/AsyncParallelBailHook.js +1 -63
- package/es/shared/utils/tapable/AsyncParallelHook.js +1 -27
- package/es/shared/utils/tapable/AsyncSeriesBailHook.js +1 -18
- package/es/shared/utils/tapable/AsyncSeriesHook.js +1 -27
- package/es/shared/utils/tapable/AsyncSeriesLoopHook.js +1 -12
- package/es/shared/utils/tapable/AsyncSeriesWaterfallHook.js +1 -22
- package/es/shared/utils/tapable/Hook.js +1 -140
- package/es/shared/utils/tapable/HookCodeFactory.js +1 -456
- package/es/shared/utils/tapable/SyncBailHook.js +1 -19
- package/es/shared/utils/tapable/SyncHook.js +1 -34
- package/es/shared/utils/tapable/SyncLoopHook.js +1 -13
- package/es/shared/utils/tapable/SyncWaterfallHook.js +1 -47
- package/es/shared/utils/utilExpand.js +1 -781
- package/es/shared/utils/vexutils.js +1 -59
- package/package.json +2 -2
|
@@ -1,2498 +1 @@
|
|
|
1
|
-
import { defineComponent, ref, reactive, useAttrs, computed, onMounted, onUnmounted, onActivated, nextTick, createVNode, h, resolveComponent, Teleport, createTextVNode, watch, openBlock, createElementBlock, Fragment, createBlock, unref, withCtx, renderList, createCommentVNode, createElementVNode, normalizeClass, normalizeStyle, mergeProps, renderSlot, toDisplayString, withDirectives, vShow, isVNode } from 'vue';
|
|
2
|
-
import { isFunction, isArray } from 'lodash-es';
|
|
3
|
-
import bigTableState from './bigTableState.js';
|
|
4
|
-
import bigTableProps from './bigTableProps.js';
|
|
5
|
-
import bigTableEmits from './bigTableEmits.js';
|
|
6
|
-
import { useAnchor } from './hooks/useAnchor.js';
|
|
7
|
-
import { comps, useEdit } from './hooks/useEdit.js';
|
|
8
|
-
import { useFormat } from './hooks/useFormat.js';
|
|
9
|
-
import { useTableParse } from './hooks/useTableParse.js';
|
|
10
|
-
import { useBatchEditing } from './hooks/useBatchEditing.js';
|
|
11
|
-
import { useNestTable } from './hooks/useNestTable.js';
|
|
12
|
-
import { useEvent } from './hooks/useEvent.js';
|
|
13
|
-
import { useAnnotation } from './hooks/useAnnotation.js';
|
|
14
|
-
import { useSeparateRow, useSeparateMap } from './hooks/useSeparateRow.js';
|
|
15
|
-
import { SettingsSharp, FilterSharp, CreateOutline, CaretDown, CaretForward, CopyOutline, SyncOutline } from '@vicons/ionicons5';
|
|
16
|
-
import NoData from './components/NoData.vue.js';
|
|
17
|
-
import script from '../../../shared/components/SvgIcon/SvgIcon.vue.js';
|
|
18
|
-
import { useMessage, NIcon, NTooltip, NCheckbox, NCheckboxGroup, NGrid, NGi, NButton, NPopconfirm, NProgress, NDropdown, NSwitch, NPopover, NTabs, NTabPane } from 'naive-ui';
|
|
19
|
-
import Grid from '../../grid/index.js';
|
|
20
|
-
import XEUtils from 'xe-utils';
|
|
21
|
-
import 'moment';
|
|
22
|
-
import { handleTableHeight, setTableConfig, handleGroupColums, treeToList, checkMethod, setTreeGroupTitle, isFilterItem, handleName, generateEditRender, handlerInitSearchItem, getEvaluate, getMapVal, getCandidateComponents, getageShowType, isLink, showFilter, reScrollFilterWrap, hideFilterWrap, mergeConObjFn, setDefaultFormData, handleImgArr, handleImgSrc, modalDetailImage, handleQrCodeContent, getInlineEditBtn, isCopy, setVisibleCheckAllWrap, handleTableImageSize, visibleMethod, getRowStyle, getFooterGroup, flattenRow, intersectRow, removeCheckedDisabledRows } from './utils.js';
|
|
23
|
-
import InputButtonScript from './components/input-button.vue.js';
|
|
24
|
-
import Separate from './components/separate.vue.js';
|
|
25
|
-
import xb_big from '../../../shared/assets/img/xb_big.png.js';
|
|
26
|
-
import qr from '../../../shared/assets/img/qr.png.js';
|
|
27
|
-
|
|
28
|
-
const _hoisted_1 = {
|
|
29
|
-
key: 0,
|
|
30
|
-
class: "check-wrap"
|
|
31
|
-
};
|
|
32
|
-
const _hoisted_2 = /* @__PURE__ */ createElementVNode("span", null, "\u7CFB\u7EDF\u68C0\u6D4B\u5230\u6709\u6570\u636E\u66F4\u65B0,", -1);
|
|
33
|
-
const _hoisted_3 = ["innerHTML"];
|
|
34
|
-
const _hoisted_4 = ["innerHTML"];
|
|
35
|
-
const _hoisted_5 = {
|
|
36
|
-
class: "refresh-row"
|
|
37
|
-
};
|
|
38
|
-
const _hoisted_6 = {
|
|
39
|
-
key: 1,
|
|
40
|
-
class: "big-table-total"
|
|
41
|
-
};
|
|
42
|
-
const _hoisted_7 = {
|
|
43
|
-
class: "left"
|
|
44
|
-
};
|
|
45
|
-
const _hoisted_8 = {
|
|
46
|
-
class: "right"
|
|
47
|
-
};
|
|
48
|
-
function _isSlot(s) {
|
|
49
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
50
|
-
}
|
|
51
|
-
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
52
|
-
__name: "BigTable",
|
|
53
|
-
props: bigTableProps,
|
|
54
|
-
emits: bigTableEmits,
|
|
55
|
-
setup(__props, {
|
|
56
|
-
expose,
|
|
57
|
-
emit
|
|
58
|
-
}) {
|
|
59
|
-
const props = __props;
|
|
60
|
-
let _hideAllWrap = null;
|
|
61
|
-
let _beforeSearchConvert = [];
|
|
62
|
-
let addInlineEditPrimaryKey = "";
|
|
63
|
-
const GROUP_TITLE_KEY = "group-show-title";
|
|
64
|
-
const InputButton = InputButtonScript;
|
|
65
|
-
const $message = useMessage();
|
|
66
|
-
const xGrid = ref({});
|
|
67
|
-
const copyState = XEUtils.clone(bigTableState, true);
|
|
68
|
-
const state = reactive(copyState);
|
|
69
|
-
const attr = useAttrs();
|
|
70
|
-
const {
|
|
71
|
-
formatData,
|
|
72
|
-
htmlToText,
|
|
73
|
-
getBtnStyle,
|
|
74
|
-
getAttr
|
|
75
|
-
} = useFormat(state, attr);
|
|
76
|
-
const {
|
|
77
|
-
imgs2imgArr,
|
|
78
|
-
parseDurationValue,
|
|
79
|
-
parseCombinationValue,
|
|
80
|
-
formatFieldText
|
|
81
|
-
} = useTableParse(formatData);
|
|
82
|
-
const {
|
|
83
|
-
allSelectedLength,
|
|
84
|
-
checkOperateCurrentTable,
|
|
85
|
-
setRowStatus,
|
|
86
|
-
resetBatchOperationRowStatus,
|
|
87
|
-
checkListFormUnionSettingParamsList,
|
|
88
|
-
handleClickCancelBtnByInline,
|
|
89
|
-
setAllRowInlineStatus,
|
|
90
|
-
hideSelectCloumns,
|
|
91
|
-
handleEditFormLength,
|
|
92
|
-
resetOperationRowStatus,
|
|
93
|
-
recordClickBtnInfo,
|
|
94
|
-
getInlineOpreateRow
|
|
95
|
-
} = useBatchEditing(props, state, emit, xGrid);
|
|
96
|
-
const {
|
|
97
|
-
deleteRow,
|
|
98
|
-
onFormChange,
|
|
99
|
-
getDefaultValue
|
|
100
|
-
} = useEdit(props, state, emit, xGrid, loadData);
|
|
101
|
-
const {
|
|
102
|
-
isAboutNestTable,
|
|
103
|
-
isExpandTable,
|
|
104
|
-
handleRowId,
|
|
105
|
-
toggleExpandMethod,
|
|
106
|
-
loadExpandMethod,
|
|
107
|
-
nestHandleClickRow
|
|
108
|
-
} = useNestTable(props, state, emit);
|
|
109
|
-
const {
|
|
110
|
-
initAnchor,
|
|
111
|
-
updateAnchor,
|
|
112
|
-
anchorEvent
|
|
113
|
-
} = useAnchor(props, state, emit, xGrid);
|
|
114
|
-
const {
|
|
115
|
-
keyDown,
|
|
116
|
-
scroll
|
|
117
|
-
} = useEvent(props, state, emit, xGrid, anchorEvent);
|
|
118
|
-
const currentCheckedKeys = computed(() => {
|
|
119
|
-
var _a;
|
|
120
|
-
return ((_a = state.checkedRows) == null ? void 0 : _a.map((row) => row[props.primaryKey])) || [];
|
|
121
|
-
});
|
|
122
|
-
computed(() => {
|
|
123
|
-
let isCurrentPageAllCheck = state.currentPageSelectedLength === state.curAbleCheckedLen;
|
|
124
|
-
let isMaxChecked = currentCheckedKeys.value.length === props.maxCheckSize;
|
|
125
|
-
let isCheckedTotal = currentCheckedKeys.value.length === props.pageVO.total;
|
|
126
|
-
return isMaxChecked || !isCurrentPageAllCheck || isCheckedTotal;
|
|
127
|
-
});
|
|
128
|
-
const singleCheckedKey = computed(() => {
|
|
129
|
-
const checkedKeys = currentCheckedKeys.value || [];
|
|
130
|
-
return checkedKeys.length == 1 ? checkedKeys[0] : "";
|
|
131
|
-
});
|
|
132
|
-
const tableNoSetting = computed(() => {
|
|
133
|
-
var _a;
|
|
134
|
-
let {
|
|
135
|
-
noSetting
|
|
136
|
-
} = getOtherConfigInit();
|
|
137
|
-
return noSetting || ((_a = props.showSettings) == null ? void 0 : _a.hideSettingBtn);
|
|
138
|
-
});
|
|
139
|
-
const isScanMultiTable = computed(() => {
|
|
140
|
-
var _a;
|
|
141
|
-
return (_a = props.columnConfig) == null ? void 0 : _a.isScanMultiTable;
|
|
142
|
-
});
|
|
143
|
-
const configuration = computed(() => {
|
|
144
|
-
return {
|
|
145
|
-
userInfo: props.userInfo || {},
|
|
146
|
-
sysImageSize: props.sysImageSize || {}
|
|
147
|
-
};
|
|
148
|
-
});
|
|
149
|
-
const treeConfig = computed(() => {
|
|
150
|
-
let result = getAttr("tree-config");
|
|
151
|
-
let {
|
|
152
|
-
isTransform
|
|
153
|
-
} = props.tableParams;
|
|
154
|
-
let statusNumber = Number(state.isTree);
|
|
155
|
-
if ([1, 3].includes(statusNumber)) {
|
|
156
|
-
result = Object.assign({}, {
|
|
157
|
-
children: "childrenList",
|
|
158
|
-
accordion: state.openOnly > 0,
|
|
159
|
-
reserve: true
|
|
160
|
-
}, result);
|
|
161
|
-
if (isTransform) {
|
|
162
|
-
Reflect.deleteProperty(result, "children");
|
|
163
|
-
Object.assign(result, {
|
|
164
|
-
rowField: "qianduan_id",
|
|
165
|
-
parentField: "qianduan_parent_id",
|
|
166
|
-
transform: true
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
} else if (statusNumber == 2) {
|
|
170
|
-
result = Object.assign({}, {
|
|
171
|
-
lazy: true,
|
|
172
|
-
reserve: true,
|
|
173
|
-
children: "childrenList",
|
|
174
|
-
hasChild: "hasChildren",
|
|
175
|
-
loadMethod: loadChildrenMethod,
|
|
176
|
-
accordion: state.openOnly > 0
|
|
177
|
-
}, result);
|
|
178
|
-
}
|
|
179
|
-
return result;
|
|
180
|
-
});
|
|
181
|
-
const keyboardConfig = computed(() => {
|
|
182
|
-
return {
|
|
183
|
-
editMethod({
|
|
184
|
-
row,
|
|
185
|
-
column
|
|
186
|
-
}) {
|
|
187
|
-
const $table = xGrid.value;
|
|
188
|
-
$table.setEditCell(row, column);
|
|
189
|
-
},
|
|
190
|
-
...props.columnConfig.keyboardConfig || {}
|
|
191
|
-
};
|
|
192
|
-
});
|
|
193
|
-
const hideAllWrap = (e) => {
|
|
194
|
-
const path = e.path || e.composedPath && e.composedPath();
|
|
195
|
-
const noWrap = (className) => {
|
|
196
|
-
return !path.some((p) => {
|
|
197
|
-
return p.className && p.className.includes && p.className.includes(className);
|
|
198
|
-
});
|
|
199
|
-
};
|
|
200
|
-
let notFilterWrap = noWrap("big-table-filter-wrap");
|
|
201
|
-
if (notFilterWrap) {
|
|
202
|
-
hideFilterWrap(state, props);
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
const bindDocumentClick = () => {
|
|
206
|
-
_hideAllWrap = hideAllWrap.bind(this);
|
|
207
|
-
window.document.addEventListener("click", _hideAllWrap, true);
|
|
208
|
-
};
|
|
209
|
-
const unBindDocumentClick = () => {
|
|
210
|
-
window.document.removeEventListener("click", _hideAllWrap, true);
|
|
211
|
-
};
|
|
212
|
-
onMounted(() => {
|
|
213
|
-
bindDocumentClick();
|
|
214
|
-
state.tableHeight = handleTableHeight(state, props) || "auto";
|
|
215
|
-
if (!props.isNestTable)
|
|
216
|
-
return;
|
|
217
|
-
loadColumn(props.columnConfig);
|
|
218
|
-
loadData(props.data);
|
|
219
|
-
});
|
|
220
|
-
onUnmounted(() => {
|
|
221
|
-
unBindDocumentClick();
|
|
222
|
-
});
|
|
223
|
-
onActivated(() => {
|
|
224
|
-
removeInsert();
|
|
225
|
-
});
|
|
226
|
-
const removeInsert = async () => {
|
|
227
|
-
var _a;
|
|
228
|
-
if (state.isTree != 0)
|
|
229
|
-
return false;
|
|
230
|
-
const vxeTable = xGrid.value;
|
|
231
|
-
let {
|
|
232
|
-
tableData
|
|
233
|
-
} = vxeTable.getTableData();
|
|
234
|
-
if (tableData && tableData.length) {
|
|
235
|
-
tableData.forEach((row) => {
|
|
236
|
-
if (row == null ? void 0 : row.__isInsertRow) {
|
|
237
|
-
vxeTable.remove(row);
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
if (!((_a = state.originFormatList) == null ? void 0 : _a.length))
|
|
242
|
-
return;
|
|
243
|
-
await vxeTable.loadData(state.originFormatList);
|
|
244
|
-
resetBatchOperationRowStatus();
|
|
245
|
-
};
|
|
246
|
-
const loadColumn = (config) => {
|
|
247
|
-
setTableConfig(config, state);
|
|
248
|
-
let columns = formatColumns(config);
|
|
249
|
-
columns = handleGroupColums(columns, props);
|
|
250
|
-
xGrid.value && xGrid.value.reloadColumn(columns);
|
|
251
|
-
nextTick(() => {
|
|
252
|
-
initAnchor();
|
|
253
|
-
});
|
|
254
|
-
setGroupTreeExpand();
|
|
255
|
-
};
|
|
256
|
-
const {
|
|
257
|
-
separate,
|
|
258
|
-
onColumnResize,
|
|
259
|
-
separateHandle,
|
|
260
|
-
separateDataMap
|
|
261
|
-
} = useSeparateRow(() => {
|
|
262
|
-
var _a, _b;
|
|
263
|
-
return (_b = (_a = props.columnConfig) == null ? void 0 : _a.fieldList) != null ? _b : [];
|
|
264
|
-
}, colspanMethod, (columnName) => {
|
|
265
|
-
var _a, _b;
|
|
266
|
-
return (_b = (_a = props.columnConfig) == null ? void 0 : _a.fieldList) == null ? void 0 : _b.find((field) => field.columnName === columnName);
|
|
267
|
-
}, xGrid);
|
|
268
|
-
const onResizableChange = (payload) => {
|
|
269
|
-
onColumnResize(payload);
|
|
270
|
-
emit("resizableChange", payload);
|
|
271
|
-
};
|
|
272
|
-
async function loadData(data) {
|
|
273
|
-
state.isShowEmpty = !(data == null ? void 0 : data.length);
|
|
274
|
-
let formatList = data;
|
|
275
|
-
let {
|
|
276
|
-
isTransform
|
|
277
|
-
} = props.tableParams;
|
|
278
|
-
if (isTransform && [1, 3].includes(Number(state.isTree)))
|
|
279
|
-
formatList = treeToList(data);
|
|
280
|
-
let table = xGrid.value;
|
|
281
|
-
if (!table)
|
|
282
|
-
return;
|
|
283
|
-
state.checkedRows = [];
|
|
284
|
-
state.originFormatList = formatList;
|
|
285
|
-
setGroupTitleToFristColumnFieldData(formatList);
|
|
286
|
-
state.curAbleCheckedLen = formatList.filter((item) => checkMethod({
|
|
287
|
-
row: item
|
|
288
|
-
})).length;
|
|
289
|
-
if (!props.isNestTable) {
|
|
290
|
-
await handleFormTheUniqueKey();
|
|
291
|
-
}
|
|
292
|
-
await table.loadData(await separate(formatList, data));
|
|
293
|
-
setCurrentPageRowChecked();
|
|
294
|
-
setGroupTreeExpand();
|
|
295
|
-
}
|
|
296
|
-
separateHandle.clear();
|
|
297
|
-
separateHandle.add(() => loadData(props.data));
|
|
298
|
-
const setGroupTitleToFristColumnFieldData = (formatList) => {
|
|
299
|
-
var _a;
|
|
300
|
-
if (state.isTree != 3)
|
|
301
|
-
return;
|
|
302
|
-
let table = xGrid.value;
|
|
303
|
-
let obj = (_a = table.getTableColumn().tableColumn) == null ? void 0 : _a.find((column) => {
|
|
304
|
-
return !!column.property;
|
|
305
|
-
});
|
|
306
|
-
let key = (obj == null ? void 0 : obj.property) || "";
|
|
307
|
-
setTreeGroupTitle(formatList, key, GROUP_TITLE_KEY);
|
|
308
|
-
};
|
|
309
|
-
const setCurrentPageRowChecked = () => {
|
|
310
|
-
var _a;
|
|
311
|
-
let table = xGrid.value;
|
|
312
|
-
if (!table)
|
|
313
|
-
return;
|
|
314
|
-
let currentPageTableData = (_a = table.getTableData()) == null ? void 0 : _a.tableData;
|
|
315
|
-
let currentPageSelectedRows = currentPageTableData.filter((row) => {
|
|
316
|
-
if (props.primaryKey) {
|
|
317
|
-
return currentCheckedKeys.value.includes(row[props.primaryKey]);
|
|
318
|
-
}
|
|
319
|
-
return row.checked;
|
|
320
|
-
});
|
|
321
|
-
setCurrentCheckedLength();
|
|
322
|
-
if (!currentPageSelectedRows || !currentPageSelectedRows.length) {
|
|
323
|
-
table.setAllCheckboxRow(false);
|
|
324
|
-
return;
|
|
325
|
-
}
|
|
326
|
-
table.setCheckboxRow(currentPageSelectedRows, true);
|
|
327
|
-
};
|
|
328
|
-
const setCurrentCheckedLength = () => {
|
|
329
|
-
let table = xGrid.value;
|
|
330
|
-
let currentPageTableData = table.getTableData().fullData;
|
|
331
|
-
let currentPageSelectedRows = currentPageTableData.filter((row) => {
|
|
332
|
-
return currentCheckedKeys.value.includes(row[props.primaryKey]) || row.checked;
|
|
333
|
-
});
|
|
334
|
-
state.currentPageSelectedLength = currentPageSelectedRows.length;
|
|
335
|
-
};
|
|
336
|
-
const formatColumns = (map) => {
|
|
337
|
-
var _a, _b, _c;
|
|
338
|
-
let {
|
|
339
|
-
selectType
|
|
340
|
-
} = getOtherConfigInit();
|
|
341
|
-
let {
|
|
342
|
-
isBatchSelect,
|
|
343
|
-
fieldList = [],
|
|
344
|
-
showButtonTop,
|
|
345
|
-
isScanMultiTable: isScanMultiTable2,
|
|
346
|
-
isEdit = false,
|
|
347
|
-
editConfig = {},
|
|
348
|
-
rowConfig = {},
|
|
349
|
-
showSeq = true,
|
|
350
|
-
seqWidth = 34,
|
|
351
|
-
checkboxConfig = {}
|
|
352
|
-
} = map;
|
|
353
|
-
if (isEdit) {
|
|
354
|
-
Object.assign(state.editConfig, editConfig);
|
|
355
|
-
state.rowConfig.height = 48;
|
|
356
|
-
}
|
|
357
|
-
Object.assign(state.rowConfig, rowConfig);
|
|
358
|
-
state.rowConfig.keyField = handleRowId.value;
|
|
359
|
-
if (selectType) {
|
|
360
|
-
isBatchSelect = 1;
|
|
361
|
-
}
|
|
362
|
-
selectType = selectType || "checkbox";
|
|
363
|
-
let {
|
|
364
|
-
listType
|
|
365
|
-
} = props.tableOptions;
|
|
366
|
-
if (listType == "scanList") {
|
|
367
|
-
selectType = "radio";
|
|
368
|
-
}
|
|
369
|
-
state.selectType = selectType;
|
|
370
|
-
let tableHeight = ((_a = props.styleSetting) == null ? void 0 : _a.tableHeight) || "table-simple";
|
|
371
|
-
let checkMinWidth = state.checkWidth[tableHeight] || "30";
|
|
372
|
-
const checkboxSlot = {
|
|
373
|
-
default: (data) => {
|
|
374
|
-
return checkMethod(data) ? null : createVNode(NTooltip, {
|
|
375
|
-
"placement": "right",
|
|
376
|
-
"trigger": "hover"
|
|
377
|
-
}, {
|
|
378
|
-
default: () => data.row.forbiddenBatchSelectReason,
|
|
379
|
-
trigger: () => createVNode("i", {
|
|
380
|
-
"class": "disabled-checked-tips"
|
|
381
|
-
}, null)
|
|
382
|
-
});
|
|
383
|
-
}
|
|
384
|
-
};
|
|
385
|
-
let checkVisible = isBatchSelect == 1 && !props.isNestTable && !isScanMultiTable2 || false;
|
|
386
|
-
let columns = [{
|
|
387
|
-
fixed: "left",
|
|
388
|
-
align: "center",
|
|
389
|
-
visible: isScanMultiTable2 || false,
|
|
390
|
-
width: "60",
|
|
391
|
-
slots: {
|
|
392
|
-
header: () => "\u64CD\u4F5C",
|
|
393
|
-
default: scanMultiOperate
|
|
394
|
-
}
|
|
395
|
-
}, {
|
|
396
|
-
type: "seq",
|
|
397
|
-
fixed: props.isNestTable ? "" : "left",
|
|
398
|
-
align: "center",
|
|
399
|
-
visible: showSeq,
|
|
400
|
-
resizable: true,
|
|
401
|
-
width: seqWidth,
|
|
402
|
-
showOverflow: true,
|
|
403
|
-
slots: {
|
|
404
|
-
header: () => {
|
|
405
|
-
return [tableNoSetting.value ? null : createVNode(NIcon, {
|
|
406
|
-
"size": "14",
|
|
407
|
-
"color": "#777",
|
|
408
|
-
"component": SettingsSharp,
|
|
409
|
-
"onClick": () => showDrawer()
|
|
410
|
-
}, null)];
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
}, {
|
|
414
|
-
type: selectType,
|
|
415
|
-
fixed: props.isNestTable ? "" : "left",
|
|
416
|
-
align: "center",
|
|
417
|
-
visible: checkVisible,
|
|
418
|
-
resizable: false,
|
|
419
|
-
width: checkMinWidth,
|
|
420
|
-
slots: selectType === "checkbox" && !((_b = getAttr("checkbox-config")) == null ? void 0 : _b.checkMethod) ? checkboxSlot : null,
|
|
421
|
-
showOverflow: true,
|
|
422
|
-
...checkboxConfig
|
|
423
|
-
}];
|
|
424
|
-
const seqObj = columns.find((v) => v.type == "seq");
|
|
425
|
-
if ((_c = props == null ? void 0 : props.columnConfig) == null ? void 0 : _c.seqSlotFn) {
|
|
426
|
-
seqObj.slots.default = (params) => {
|
|
427
|
-
var _a2;
|
|
428
|
-
return (_a2 = props.columnConfig) == null ? void 0 : _a2.seqSlotFn(params);
|
|
429
|
-
};
|
|
430
|
-
}
|
|
431
|
-
const currentColumns = fieldList.map((item, index) => {
|
|
432
|
-
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i;
|
|
433
|
-
let filterField = false;
|
|
434
|
-
let isOtherFilter = false;
|
|
435
|
-
let filterItems = [];
|
|
436
|
-
try {
|
|
437
|
-
const fieldSetting = JSON.parse(item.fieldSetting || "{}");
|
|
438
|
-
let notParticipatingSearch = (fieldSetting == null ? void 0 : fieldSetting.notParticipatingSearch) || "";
|
|
439
|
-
filterField = notParticipatingSearch != 1 && ((_a2 = fieldSetting == null ? void 0 : fieldSetting.mapping) == null ? void 0 : _a2.type) === "manual" && item.isMerge != 1;
|
|
440
|
-
filterItems = (_c2 = (_b2 = fieldSetting == null ? void 0 : fieldSetting.mapping) == null ? void 0 : _b2.mappingFiled) == null ? void 0 : _c2.map((item2) => item2.value[0]);
|
|
441
|
-
if (isFilterItem(item)) {
|
|
442
|
-
isOtherFilter = filterField = true;
|
|
443
|
-
filterItems = (_d = item.options) == null ? void 0 : _d.map((item2) => ({
|
|
444
|
-
...item2,
|
|
445
|
-
key: item2.label
|
|
446
|
-
}));
|
|
447
|
-
}
|
|
448
|
-
} catch (e) {
|
|
449
|
-
}
|
|
450
|
-
let notParticipatingSort = ((_e = item == null ? void 0 : item.fieldSetting) == null ? void 0 : _e.notParticipatingSort) || "";
|
|
451
|
-
let fixed = isAboutNestTable.value ? "" : item.isFixed ? item.isFixed == 1 ? "left" : "right" : "";
|
|
452
|
-
let sortable = props.isNestTable ? false : !filterField && item.isSort == 1 && notParticipatingSort != 1 && item.isMerge != 1;
|
|
453
|
-
let treeNode = props.isNestTable ? false : state.isTree != 0 ? index === 0 : false;
|
|
454
|
-
let type = index === 0 && props.showNestTable ? "expand" : "";
|
|
455
|
-
const isShow = item.isShow == 1 && ((_f = item == null ? void 0 : item.settingObj) == null ? void 0 : _f.isHide) != 1;
|
|
456
|
-
if (isScanMultiTable2) {
|
|
457
|
-
fixed = "";
|
|
458
|
-
sortable = false;
|
|
459
|
-
treeNode = false;
|
|
460
|
-
type = "";
|
|
461
|
-
}
|
|
462
|
-
const col = Object.assign(item, {
|
|
463
|
-
visible: item.columnName == "operatorColumn" ? showButtonTop == 0 : isShow,
|
|
464
|
-
field: item.columnName,
|
|
465
|
-
title: handleName(item, "title"),
|
|
466
|
-
minWidth: item.colWidth,
|
|
467
|
-
fixed,
|
|
468
|
-
sortable,
|
|
469
|
-
headerClassName: "mycolumn",
|
|
470
|
-
resizable: (_g = item.resizable) != null ? _g : true,
|
|
471
|
-
showOverflow: (_h = item.showOverflow) != null ? _h : "title",
|
|
472
|
-
treeNode,
|
|
473
|
-
type,
|
|
474
|
-
className: item.bold ? "big-table__boldCell" : "",
|
|
475
|
-
slots: {
|
|
476
|
-
edit: (params) => formatterEdit(params, item),
|
|
477
|
-
default: (params) => {
|
|
478
|
-
const _isEdit = isEdit && item.isEdit;
|
|
479
|
-
return formatter(params, item, _isEdit);
|
|
480
|
-
}
|
|
481
|
-
},
|
|
482
|
-
editRender: isEdit && item.isEdit ? {} : generateEditRender(item)
|
|
483
|
-
});
|
|
484
|
-
if (filterField && !props.isNestTable && !isScanMultiTable2) {
|
|
485
|
-
state.filterFields[item.columnName] = Object.assign({}, XEUtils.clone({
|
|
486
|
-
...item,
|
|
487
|
-
setting: item.settingObj || {}
|
|
488
|
-
}, true), {
|
|
489
|
-
visible: false,
|
|
490
|
-
left: "initial",
|
|
491
|
-
right: "initial",
|
|
492
|
-
top: "initial",
|
|
493
|
-
indeterminate: false,
|
|
494
|
-
checkAll: false,
|
|
495
|
-
searchFilterText: "",
|
|
496
|
-
searchFilterCONVERT: [],
|
|
497
|
-
filterSort: "",
|
|
498
|
-
filterItems
|
|
499
|
-
});
|
|
500
|
-
let field = state.filterFields[item.columnName];
|
|
501
|
-
handlerInitSearchItem([field], isOtherFilter);
|
|
502
|
-
col.slots.header = formatterHeader(item);
|
|
503
|
-
} else {
|
|
504
|
-
col.slots.header = toolTipTitle(item);
|
|
505
|
-
}
|
|
506
|
-
if (!isScanMultiTable2 && !isFunction(attr.footerMethod) && !isFunction(attr["footer-method"])) {
|
|
507
|
-
col.slots.footer = "tooltip_footer";
|
|
508
|
-
}
|
|
509
|
-
if (props.showNestTable && state.isTree == 0 && ((_i = props.curNestColumnConfig) == null ? void 0 : _i.isTree) == 0) {
|
|
510
|
-
col.slots.content = "nest_table_content";
|
|
511
|
-
}
|
|
512
|
-
return col;
|
|
513
|
-
});
|
|
514
|
-
columns.push(...currentColumns);
|
|
515
|
-
state.columnLen = currentColumns.filter((item) => item.visible).length;
|
|
516
|
-
return columns;
|
|
517
|
-
};
|
|
518
|
-
const {
|
|
519
|
-
getRowData
|
|
520
|
-
} = useSeparateMap();
|
|
521
|
-
const formatterEdit = (params, col) => {
|
|
522
|
-
var _a, _b;
|
|
523
|
-
let {
|
|
524
|
-
row,
|
|
525
|
-
column,
|
|
526
|
-
$rowIndex,
|
|
527
|
-
rowIndex
|
|
528
|
-
} = params;
|
|
529
|
-
let formType = column.formType || col.formType || "";
|
|
530
|
-
let formatMap = column.formatMap || col.formatMap || null;
|
|
531
|
-
if (!formType)
|
|
532
|
-
return null;
|
|
533
|
-
if (formType === "custom" && col.slotFn) {
|
|
534
|
-
return col.slotFn(params);
|
|
535
|
-
}
|
|
536
|
-
const Comp = comps[formType] || "";
|
|
537
|
-
if (!Comp)
|
|
538
|
-
return null;
|
|
539
|
-
const propsData = {
|
|
540
|
-
col,
|
|
541
|
-
row,
|
|
542
|
-
index: (_b = (_a = getRowData(row)) == null ? void 0 : _a.index) != null ? _b : $rowIndex,
|
|
543
|
-
type: formType,
|
|
544
|
-
...col.componentProps || {},
|
|
545
|
-
onFormChange,
|
|
546
|
-
onClick: () => {
|
|
547
|
-
emit("formClick", {
|
|
548
|
-
value: row[col.columnName],
|
|
549
|
-
row,
|
|
550
|
-
column: col,
|
|
551
|
-
index: $rowIndex
|
|
552
|
-
});
|
|
553
|
-
},
|
|
554
|
-
editTrigger: state.editConfig.trigger
|
|
555
|
-
};
|
|
556
|
-
if (["date", "time"].includes(formType)) {
|
|
557
|
-
propsData.formattedValue = row[col.columnName] || void 0;
|
|
558
|
-
} else if (formatMap) {
|
|
559
|
-
propsData.value = row[formatMap.value];
|
|
560
|
-
} else {
|
|
561
|
-
propsData.value = row[col.columnName];
|
|
562
|
-
}
|
|
563
|
-
if (formType === "select") {
|
|
564
|
-
propsData.onSetOptions = (options) => row[`${col.columnName}_options`] = options;
|
|
565
|
-
}
|
|
566
|
-
return h(Comp, propsData);
|
|
567
|
-
};
|
|
568
|
-
const getEditBtn = (row, col, index) => {
|
|
569
|
-
var _a;
|
|
570
|
-
return (_a = col.tileBtnList) == null ? void 0 : _a.map((btn) => {
|
|
571
|
-
if (btn.settingObj[0].trigger_type === "DELETE") {
|
|
572
|
-
return createVNode(NPopconfirm, {
|
|
573
|
-
"onPositiveClick": () => deleteRow(row, col, index)
|
|
574
|
-
}, {
|
|
575
|
-
trigger() {
|
|
576
|
-
return createVNode(NButton, {
|
|
577
|
-
"color": btn.settingObj[0].color || "#999",
|
|
578
|
-
"text": true
|
|
579
|
-
}, {
|
|
580
|
-
default: () => [btn.name]
|
|
581
|
-
});
|
|
582
|
-
},
|
|
583
|
-
default() {
|
|
584
|
-
return "\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F";
|
|
585
|
-
}
|
|
586
|
-
});
|
|
587
|
-
} else {
|
|
588
|
-
return null;
|
|
589
|
-
}
|
|
590
|
-
});
|
|
591
|
-
};
|
|
592
|
-
const formatter = (params, col, _isEdit) => {
|
|
593
|
-
var _a, _b, _c;
|
|
594
|
-
let {
|
|
595
|
-
row,
|
|
596
|
-
column,
|
|
597
|
-
$rowIndex
|
|
598
|
-
} = params;
|
|
599
|
-
let attrType = (col == null ? void 0 : col.attrType) || "";
|
|
600
|
-
if (col.formType === "separate") {
|
|
601
|
-
const SeparateComponent = Separate;
|
|
602
|
-
return createVNode(SeparateComponent, {
|
|
603
|
-
"row": params.row,
|
|
604
|
-
"col": col
|
|
605
|
-
}, null);
|
|
606
|
-
}
|
|
607
|
-
if (_isEdit) {
|
|
608
|
-
if ((_a = col.checkEditStatus) == null ? void 0 : _a.call(col, params)) {
|
|
609
|
-
return formatterEdit(params, col);
|
|
610
|
-
} else {
|
|
611
|
-
return createVNode("span", null, [getDefaultValue(params, col)]);
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
let formUnionItem = showEditForm(row, column, $rowIndex);
|
|
615
|
-
if (formUnionItem) {
|
|
616
|
-
let dynamicProps = initBatchDynamicProps(formUnionItem, row, column);
|
|
617
|
-
if (dynamicProps) {
|
|
618
|
-
emit("setWaitEditKeys", column.property);
|
|
619
|
-
return null;
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
if (attrType === "custom" && col.slotFn) {
|
|
623
|
-
return col.slotFn(params);
|
|
624
|
-
}
|
|
625
|
-
if (XEUtils.has(row, GROUP_TITLE_KEY)) {
|
|
626
|
-
return row[GROUP_TITLE_KEY];
|
|
627
|
-
}
|
|
628
|
-
if (attrType == "PICTURE" || attrType == "HEADPORTRAIT") {
|
|
629
|
-
return getPicture(row, col, attrType);
|
|
630
|
-
}
|
|
631
|
-
if (attrType == "COLOR") {
|
|
632
|
-
return getColor(row, col);
|
|
633
|
-
}
|
|
634
|
-
if (attrType == "EVALUATE") {
|
|
635
|
-
return getEvaluate(row, col);
|
|
636
|
-
}
|
|
637
|
-
if (attrType == "MAP") {
|
|
638
|
-
return getMapVal(row, col);
|
|
639
|
-
}
|
|
640
|
-
if (attrType == "DATE" || attrType == "TASKDATE") {
|
|
641
|
-
return getDate(row, col);
|
|
642
|
-
}
|
|
643
|
-
if (attrType == "PERCENTAGE") {
|
|
644
|
-
return getPercentage(row, col);
|
|
645
|
-
}
|
|
646
|
-
if (attrType == "VIDEO") {
|
|
647
|
-
return getvideoList(row, col);
|
|
648
|
-
}
|
|
649
|
-
if (attrType == "CANDIDATE_COMPONENTS") {
|
|
650
|
-
return getCandidateComponents(row, col);
|
|
651
|
-
}
|
|
652
|
-
if (attrType == "AGE") {
|
|
653
|
-
return getageShowType(row, col);
|
|
654
|
-
}
|
|
655
|
-
if (attrType === "COUNTDOWN") {
|
|
656
|
-
return createVNode(NTooltip, null, {
|
|
657
|
-
trigger() {
|
|
658
|
-
return createVNode("span", {
|
|
659
|
-
"innerHTML": row[col.columnName + "_countdown"] || ""
|
|
660
|
-
}, null);
|
|
661
|
-
},
|
|
662
|
-
default() {
|
|
663
|
-
return row[col.columnName + "_countdownTip"];
|
|
664
|
-
}
|
|
665
|
-
});
|
|
666
|
-
}
|
|
667
|
-
if (attrType === "DURATION") {
|
|
668
|
-
const value = row[col.columnName];
|
|
669
|
-
const duration = (_b = col == null ? void 0 : col.fieldSetting) == null ? void 0 : _b.duration;
|
|
670
|
-
return parseDurationValue(value, duration);
|
|
671
|
-
}
|
|
672
|
-
if (attrType === "COMBINATION") {
|
|
673
|
-
const value = row[col.columnName];
|
|
674
|
-
const params2 = col.fieldSetting || {};
|
|
675
|
-
const data = parseCombinationValue(value, params2);
|
|
676
|
-
return data ? [createVNode("span", {
|
|
677
|
-
"title": data
|
|
678
|
-
}, [data])] : "";
|
|
679
|
-
}
|
|
680
|
-
if (attrType === "PASSWORD") {
|
|
681
|
-
const value = row[col.columnName];
|
|
682
|
-
return [createVNode(resolveComponent("password-com"), {
|
|
683
|
-
"value": value,
|
|
684
|
-
"styleSetting": props.styleSetting
|
|
685
|
-
}, null)];
|
|
686
|
-
}
|
|
687
|
-
if (attrType === "QR_CODE") {
|
|
688
|
-
return getOrCode(row, col);
|
|
689
|
-
}
|
|
690
|
-
if (column.property === "operatorColumn") {
|
|
691
|
-
if ((col == null ? void 0 : col.formType) === "custom" && col.slotFn && !row.initRow) {
|
|
692
|
-
return col.slotFn(row, col, $rowIndex);
|
|
693
|
-
}
|
|
694
|
-
if (props.columnConfig.isEdit && !row.initRow) {
|
|
695
|
-
return getEditBtn(row, col, $rowIndex);
|
|
696
|
-
}
|
|
697
|
-
if (state.showButtonTop != 0 || props.isBatchEditing)
|
|
698
|
-
return;
|
|
699
|
-
const inlineBtnList = generateInlineBtnList(row);
|
|
700
|
-
const tileBtnList = getTileBtnList(row, $rowIndex);
|
|
701
|
-
const foldBtnList = getFoldBtnList(row, $rowIndex);
|
|
702
|
-
return [createVNode("span", null, [tileBtnList, foldBtnList, inlineBtnList])];
|
|
703
|
-
}
|
|
704
|
-
if (isLink(props, col, row) && !isScanMultiTable.value) {
|
|
705
|
-
if (col.btnLinkSwitch) {
|
|
706
|
-
let disabled = false;
|
|
707
|
-
let curBtn = (_c = row.btnList) == null ? void 0 : _c.find((v) => v.name == col.columnName);
|
|
708
|
-
if (curBtn && "authorizedMark" in curBtn) {
|
|
709
|
-
if (!curBtn.authorizedMark) {
|
|
710
|
-
disabled = true;
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
return getBtnLinkSwitch(row, col, disabled, $rowIndex);
|
|
714
|
-
} else {
|
|
715
|
-
return getField(row, col, $rowIndex, true);
|
|
716
|
-
}
|
|
717
|
-
} else {
|
|
718
|
-
return getField(row, col, $rowIndex, false);
|
|
719
|
-
}
|
|
720
|
-
};
|
|
721
|
-
const formatterHeader = (item) => {
|
|
722
|
-
let field = state.filterFields[item.columnName];
|
|
723
|
-
console.log(field);
|
|
724
|
-
const checkboxItems = () => {
|
|
725
|
-
return field.searchFilterText ? field.filterItems.filter((item2) => {
|
|
726
|
-
if (!field.searchFilterText)
|
|
727
|
-
return item2;
|
|
728
|
-
let reg = new RegExp(field.searchFilterText);
|
|
729
|
-
return reg.test(item2.key);
|
|
730
|
-
}) : field.filterItems;
|
|
731
|
-
};
|
|
732
|
-
return () => {
|
|
733
|
-
let _slot;
|
|
734
|
-
return [createVNode("div", {
|
|
735
|
-
"class": "filter-box"
|
|
736
|
-
}, [toolTipTitle(item, "format"), createVNode(NIcon, {
|
|
737
|
-
"component": FilterSharp,
|
|
738
|
-
"color": field.visible || field.filterSort ? "#5585f5" : "#35393c",
|
|
739
|
-
"onClick": (event) => showFilter(field, item.columnName, event, props, state)
|
|
740
|
-
}, null), field.visible ? createVNode(Teleport, {
|
|
741
|
-
"to": props.filterDomPortal
|
|
742
|
-
}, {
|
|
743
|
-
default: () => [createVNode("div", {
|
|
744
|
-
"class": "big-table-filter-wrap",
|
|
745
|
-
"style": {
|
|
746
|
-
left: field.left,
|
|
747
|
-
right: field.right,
|
|
748
|
-
top: field.top,
|
|
749
|
-
width: state.filterWidth + state.distance + "px"
|
|
750
|
-
}
|
|
751
|
-
}, [createVNode("div", {
|
|
752
|
-
"class": "sort-list",
|
|
753
|
-
"style": {
|
|
754
|
-
display: field.isSort ? "block" : "none"
|
|
755
|
-
}
|
|
756
|
-
}, [createVNode("div", {
|
|
757
|
-
"class": ["sort-item", {
|
|
758
|
-
active: field.filterSort === "asc"
|
|
759
|
-
}],
|
|
760
|
-
"onClick": () => handlefilterBoxClickSort("asc", field)
|
|
761
|
-
}, [createVNode("i", {
|
|
762
|
-
"class": "sort-icon sort-icon-asc"
|
|
763
|
-
}, null), createVNode("span", {
|
|
764
|
-
"class": "sort-text"
|
|
765
|
-
}, [createTextVNode("\u5347\u5E8F A to Z")])]), createVNode("div", {
|
|
766
|
-
"class": ["sort-item", {
|
|
767
|
-
active: field.filterSort === "desc"
|
|
768
|
-
}],
|
|
769
|
-
"onClick": () => handlefilterBoxClickSort("desc", field)
|
|
770
|
-
}, [createVNode("i", {
|
|
771
|
-
"class": "sort-icon sort-icon-asc"
|
|
772
|
-
}, null), createVNode("span", {
|
|
773
|
-
"class": "sort-text"
|
|
774
|
-
}, [createTextVNode("\u964D\u5E8F Z to A")])])]), createVNode("div", {
|
|
775
|
-
"class": "filter-header"
|
|
776
|
-
}, [createVNode("i", {
|
|
777
|
-
"class": "filter-header-icon vxe-filter--btn vxe-icon--funnel"
|
|
778
|
-
}, null), createVNode("span", {
|
|
779
|
-
"class": "filter-header-text"
|
|
780
|
-
}, [createTextVNode("\u7B5B\u9009")])]), field.filterItems.length > 5 ? createVNode("div", {
|
|
781
|
-
"class": "checkbox-wrap checkbox-wrap--search"
|
|
782
|
-
}, [createVNode("div", {
|
|
783
|
-
"class": "check-search-wrap"
|
|
784
|
-
}, [createVNode(InputButton, {
|
|
785
|
-
"onTrigger": (content) => handleFilterSeach(content, field)
|
|
786
|
-
}, null)])]) : "", createVNode("div", {
|
|
787
|
-
"class": "checkbox-box"
|
|
788
|
-
}, [createVNode("div", {
|
|
789
|
-
"class": "checkbox-wrap js-checkbox-wrap",
|
|
790
|
-
"style": {
|
|
791
|
-
height: state.filterHeight + state.distance + "px"
|
|
792
|
-
}
|
|
793
|
-
}, [!field.searchFilterText ? createVNode("div", {
|
|
794
|
-
"class": "sort-item"
|
|
795
|
-
}, [createVNode(NCheckbox, {
|
|
796
|
-
"indeterminate": field.indeterminate,
|
|
797
|
-
"checked": field.checkAll,
|
|
798
|
-
"onUpdate:checked": (val) => {
|
|
799
|
-
handleFilterChangeAll(val, field);
|
|
800
|
-
}
|
|
801
|
-
}, {
|
|
802
|
-
default: () => [createTextVNode("\u5168\u9009")]
|
|
803
|
-
})]) : "", createVNode(NCheckboxGroup, {
|
|
804
|
-
"value": field.searchFilterText ? field.searchFilterCONVERT : field.CONVERT,
|
|
805
|
-
"onUpdate:value": (val) => field.searchFilterText ? handleFilterSearchChange(val, item.columnName, field) : handleFilterChange(val, item.columnName, field)
|
|
806
|
-
}, {
|
|
807
|
-
default: () => [createVNode(NGrid, {
|
|
808
|
-
"cols": 1
|
|
809
|
-
}, _isSlot(_slot = checkboxItems().map((item2) => {
|
|
810
|
-
return createVNode(NGi, {
|
|
811
|
-
"class": "sort-item"
|
|
812
|
-
}, {
|
|
813
|
-
default: () => [createVNode(NCheckbox, {
|
|
814
|
-
"value": item2.value,
|
|
815
|
-
"label": item2.key
|
|
816
|
-
}, null)]
|
|
817
|
-
});
|
|
818
|
-
})) ? _slot : {
|
|
819
|
-
default: () => [_slot]
|
|
820
|
-
})]
|
|
821
|
-
})])]), createVNode("div", {
|
|
822
|
-
"class": "checkbox-btn-wrap",
|
|
823
|
-
"style": {
|
|
824
|
-
justifyContent: field.CONVERT.length ? "space-between" : "flex-end"
|
|
825
|
-
}
|
|
826
|
-
}, [field.CONVERT.length ? createVNode("div", {
|
|
827
|
-
"class": "checkbox-btn-status"
|
|
828
|
-
}, [createVNode("span", null, [createTextVNode("\u5DF2\u9009\u62E9"), field.CONVERT.length, createTextVNode("\u9879")]), createVNode(NButton, {
|
|
829
|
-
"class": "checkbox-btn checkbox-btn-clear",
|
|
830
|
-
"text": true,
|
|
831
|
-
"onClick": () => handleFilterClearAll(item.columnName)
|
|
832
|
-
}, {
|
|
833
|
-
default: () => [createTextVNode("\u6E05\u7A7A")]
|
|
834
|
-
})]) : null, createVNode("div", null, [createVNode(NButton, {
|
|
835
|
-
"size": "small",
|
|
836
|
-
"class": "checkbox-btn",
|
|
837
|
-
"onClick": () => handleCancelFilter()
|
|
838
|
-
}, {
|
|
839
|
-
default: () => [createTextVNode("\u53D6\u6D88")]
|
|
840
|
-
}), createVNode(NButton, {
|
|
841
|
-
"size": "small",
|
|
842
|
-
"class": "checkbox-btn",
|
|
843
|
-
"type": "primary",
|
|
844
|
-
"onClick": () => handleFilter(field)
|
|
845
|
-
}, {
|
|
846
|
-
default: () => [createTextVNode("\u786E\u5B9A")]
|
|
847
|
-
})])]), createVNode("div", {
|
|
848
|
-
"class": "arrows-icon"
|
|
849
|
-
}, null)])]
|
|
850
|
-
}) : ""])];
|
|
851
|
-
};
|
|
852
|
-
};
|
|
853
|
-
const handlefilterBoxClickSort = (sort, field) => {
|
|
854
|
-
if (field.filterSort === sort) {
|
|
855
|
-
sort = null;
|
|
856
|
-
} else {
|
|
857
|
-
xGrid.value.clearSort();
|
|
858
|
-
}
|
|
859
|
-
field.filterSort = sort;
|
|
860
|
-
emit("sortChange", {
|
|
861
|
-
prop: field.columnName,
|
|
862
|
-
order: sort,
|
|
863
|
-
column: field
|
|
864
|
-
});
|
|
865
|
-
};
|
|
866
|
-
const handleFilterSeach = (val, field) => {
|
|
867
|
-
field.searchFilterText = val;
|
|
868
|
-
if (val === "") {
|
|
869
|
-
field.checkAll = field.CONVERT.length === field.filterItems.length;
|
|
870
|
-
field.indeterminate = !!field.CONVERT.length && field.CONVERT.length !== field.filterItems.length;
|
|
871
|
-
return;
|
|
872
|
-
}
|
|
873
|
-
field.searchFilterCONVERT = field.filterItems.filter((item) => {
|
|
874
|
-
return field.searchFilterText === item.key && field.CONVERT.includes(item.value);
|
|
875
|
-
}).map((item) => item.value);
|
|
876
|
-
_beforeSearchConvert = field.searchFilterCONVERT;
|
|
877
|
-
};
|
|
878
|
-
const handleFilterChangeAll = (val, field) => {
|
|
879
|
-
reScrollFilterWrap();
|
|
880
|
-
let checked = val;
|
|
881
|
-
field.indeterminate = false;
|
|
882
|
-
field.checkAll = checked;
|
|
883
|
-
state.filterFields[field.columnName].CONVERT = checked ? field.filterItems.map((item) => {
|
|
884
|
-
return item.value;
|
|
885
|
-
}) : [];
|
|
886
|
-
};
|
|
887
|
-
const handleFilterChange = (value, name, field) => {
|
|
888
|
-
reScrollFilterWrap();
|
|
889
|
-
field.CONVERT = value;
|
|
890
|
-
field.checkAll = value.length === field.filterItems.length;
|
|
891
|
-
field.indeterminate = !!value.length && value.length !== field.filterItems.length;
|
|
892
|
-
};
|
|
893
|
-
const handleFilterSearchChange = (value, columnName, field) => {
|
|
894
|
-
reScrollFilterWrap();
|
|
895
|
-
let isAdd = _beforeSearchConvert.length < value.length;
|
|
896
|
-
if (isAdd) {
|
|
897
|
-
let addItems = value.filter((item) => {
|
|
898
|
-
return !_beforeSearchConvert.includes(item);
|
|
899
|
-
});
|
|
900
|
-
state.filterFields[columnName].CONVERT.push(...addItems);
|
|
901
|
-
} else {
|
|
902
|
-
let removeItems = _beforeSearchConvert.filter((item) => {
|
|
903
|
-
return !value.includes(item);
|
|
904
|
-
});
|
|
905
|
-
state.filterFields[columnName].CONVERT = state.filterFields[columnName].CONVERT.filter((item) => {
|
|
906
|
-
return !removeItems.includes(item);
|
|
907
|
-
});
|
|
908
|
-
}
|
|
909
|
-
field.searchFilterCONVERT = value;
|
|
910
|
-
_beforeSearchConvert = XEUtils.clone(value, true);
|
|
911
|
-
};
|
|
912
|
-
const handleFilterClearAll = (columnName) => {
|
|
913
|
-
const field = state.filterFields[columnName];
|
|
914
|
-
if (!field)
|
|
915
|
-
return false;
|
|
916
|
-
field.indeterminate = false;
|
|
917
|
-
field.checkAll = false;
|
|
918
|
-
state.filterFields[field.columnName].CONVERT = [];
|
|
919
|
-
if (field.searchFilterCONVERT) {
|
|
920
|
-
state.filterFields[field.columnName].searchFilterCONVERT = [];
|
|
921
|
-
}
|
|
922
|
-
handleFilter(field);
|
|
923
|
-
};
|
|
924
|
-
const handleCancelFilter = () => {
|
|
925
|
-
hideFilterWrap(state, props);
|
|
926
|
-
};
|
|
927
|
-
function mergeQuickSearchConfig(filterFields, props2) {
|
|
928
|
-
if (!isArray(props2.quickSearchConfig))
|
|
929
|
-
return;
|
|
930
|
-
props2.quickSearchConfig.length = 0;
|
|
931
|
-
Object.entries(filterFields).forEach(([field_key, filterField]) => {
|
|
932
|
-
props2.quickSearchConfig.push({
|
|
933
|
-
field_key,
|
|
934
|
-
value: filterField.CONVERT || []
|
|
935
|
-
});
|
|
936
|
-
});
|
|
937
|
-
}
|
|
938
|
-
const handleFilter = (field) => {
|
|
939
|
-
let conObj = mergeConObjFn(state, props);
|
|
940
|
-
mergeQuickSearchConfig(state.filterFields, props);
|
|
941
|
-
emit("onSave", conObj, false, [], [], {
|
|
942
|
-
isBigTable: true
|
|
943
|
-
});
|
|
944
|
-
field.visible = false;
|
|
945
|
-
};
|
|
946
|
-
const setGroupTreeExpand = () => {
|
|
947
|
-
var _a, _b;
|
|
948
|
-
if (((_a = getAttr("tree-config")) == null ? void 0 : _a.expandAll) === false)
|
|
949
|
-
return;
|
|
950
|
-
const data = (_b = xGrid.value) == null ? void 0 : _b.getData();
|
|
951
|
-
state.total = 0;
|
|
952
|
-
computeTotal(data);
|
|
953
|
-
let isExpand = state.isTree == 1 && state.total < 1001;
|
|
954
|
-
if (state.isTree == 3 || isExpand) {
|
|
955
|
-
let table = xGrid.value;
|
|
956
|
-
nextTick(() => {
|
|
957
|
-
table.setAllTreeExpand(true);
|
|
958
|
-
state.isTree == 1 && (state.isExpand = true);
|
|
959
|
-
});
|
|
960
|
-
}
|
|
961
|
-
function computeTotal(arr) {
|
|
962
|
-
var _a2;
|
|
963
|
-
for (let i = 0, len = arr.length; i < len; i++) {
|
|
964
|
-
state.total++;
|
|
965
|
-
if (((_a2 = arr[i].childrenList) == null ? void 0 : _a2.length) > 0)
|
|
966
|
-
computeTotal(arr[i].childrenList);
|
|
967
|
-
}
|
|
968
|
-
}
|
|
969
|
-
};
|
|
970
|
-
const {
|
|
971
|
-
renderAnnotation
|
|
972
|
-
} = useAnnotation(props);
|
|
973
|
-
const toolTipTitle = (item, type) => {
|
|
974
|
-
var _a;
|
|
975
|
-
let name = item.formTitle || item.alias || item.title;
|
|
976
|
-
item.alias;
|
|
977
|
-
if (((_a = props.tableOptions) == null ? void 0 : _a.dataSourceType) == "guage") {
|
|
978
|
-
item.alias || item.title;
|
|
979
|
-
}
|
|
980
|
-
if (isFunction(item.headerSlotFn))
|
|
981
|
-
return () => item.headerSlotFn(item);
|
|
982
|
-
if (type === "format")
|
|
983
|
-
return [item.isEdit && !props.columnConfig.noEditIcon ? createVNode(NIcon, {
|
|
984
|
-
"component": CreateOutline,
|
|
985
|
-
"class": "is-edit"
|
|
986
|
-
}, null) : null, createVNode("span", {
|
|
987
|
-
"class": "header-title-span"
|
|
988
|
-
}, [name]), renderAnnotation(item)];
|
|
989
|
-
return () => {
|
|
990
|
-
return [item.treeNode && state.isTree == 1 && !props.columnConfig.noExpandIcon ? createVNode(NIcon, {
|
|
991
|
-
"component": state.isExpand && state.total < 1001 ? CaretDown : CaretForward,
|
|
992
|
-
"onClick": (e) => triggerExpand(e, state.isExpand)
|
|
993
|
-
}, null) : null, item.isEdit && !props.columnConfig.noEditIcon ? createVNode(NIcon, {
|
|
994
|
-
"component": CreateOutline,
|
|
995
|
-
"class": "is-edit"
|
|
996
|
-
}, null) : null, createVNode("span", {
|
|
997
|
-
"class": "header-title-span"
|
|
998
|
-
}, [name]), renderAnnotation(item)];
|
|
999
|
-
};
|
|
1000
|
-
};
|
|
1001
|
-
const triggerExpand = (e, isExpand) => {
|
|
1002
|
-
e.preventDefault();
|
|
1003
|
-
e.stopPropagation();
|
|
1004
|
-
let table = xGrid.value;
|
|
1005
|
-
if (state.total > 1e3) {
|
|
1006
|
-
$message.warning("\u5F53\u524D\u6570\u636E\u91CF\u8D85\u8FC71000\u6761\uFF0C\u65E0\u6CD5\u5168\u90E8\u5C55\u5F00\uFF01");
|
|
1007
|
-
} else {
|
|
1008
|
-
state.isExpand = !isExpand;
|
|
1009
|
-
if (isExpand) {
|
|
1010
|
-
table.clearTreeExpand();
|
|
1011
|
-
} else {
|
|
1012
|
-
emit("triggerSpinning", true);
|
|
1013
|
-
setTimeout(() => {
|
|
1014
|
-
table.setAllTreeExpand(true).then(() => {
|
|
1015
|
-
emit("triggerSpinning", false);
|
|
1016
|
-
});
|
|
1017
|
-
}, 100);
|
|
1018
|
-
}
|
|
1019
|
-
}
|
|
1020
|
-
};
|
|
1021
|
-
function getOtherConfigInit() {
|
|
1022
|
-
let tableOptions = (attr == null ? void 0 : attr.tableOptions) || props.tableOptions || {};
|
|
1023
|
-
return (tableOptions == null ? void 0 : tableOptions.config) || {};
|
|
1024
|
-
}
|
|
1025
|
-
const refreshTable = () => {
|
|
1026
|
-
state.hasRefresh = false;
|
|
1027
|
-
emit("refreshTable");
|
|
1028
|
-
};
|
|
1029
|
-
const getRowClassName = (params) => {
|
|
1030
|
-
const {
|
|
1031
|
-
rowClassName = null
|
|
1032
|
-
} = props.columnConfig;
|
|
1033
|
-
if (rowClassName) {
|
|
1034
|
-
return XEUtils.isFunction(rowClassName) ? rowClassName(params) : rowClassName;
|
|
1035
|
-
}
|
|
1036
|
-
const selectStyle = () => {
|
|
1037
|
-
const {
|
|
1038
|
-
row,
|
|
1039
|
-
$rowIndex,
|
|
1040
|
-
rowIndex
|
|
1041
|
-
} = params;
|
|
1042
|
-
const k = singleCheckedKey.value;
|
|
1043
|
-
return k && k === row[props.primaryKey] ? "single--checked" : "";
|
|
1044
|
-
};
|
|
1045
|
-
return state.selectType === "checkbox" ? selectStyle() : null;
|
|
1046
|
-
};
|
|
1047
|
-
const footerMethod = (payload) => {
|
|
1048
|
-
const {
|
|
1049
|
-
columns,
|
|
1050
|
-
data
|
|
1051
|
-
} = payload;
|
|
1052
|
-
if (isFunction(attr.footerMethod))
|
|
1053
|
-
return attr.spanMethod(footerMethod);
|
|
1054
|
-
if (isFunction(attr["footer-method"]))
|
|
1055
|
-
return attr["footer-method"](payload);
|
|
1056
|
-
if (!props.groupCountFields || !props.groupCountFields.length) {
|
|
1057
|
-
return [columns.map((column, index) => {
|
|
1058
|
-
if (index === 0) {
|
|
1059
|
-
return null;
|
|
1060
|
-
}
|
|
1061
|
-
return null;
|
|
1062
|
-
})];
|
|
1063
|
-
}
|
|
1064
|
-
let groupText = getFooterGroup(columns, data, props);
|
|
1065
|
-
let groupColumns = columns.map((column, index) => {
|
|
1066
|
-
if (index === 0) {
|
|
1067
|
-
return null;
|
|
1068
|
-
} else if (index === 1) {
|
|
1069
|
-
return groupText;
|
|
1070
|
-
}
|
|
1071
|
-
return null;
|
|
1072
|
-
});
|
|
1073
|
-
emit("setGroupText", groupText);
|
|
1074
|
-
state.groupText = groupText;
|
|
1075
|
-
return [groupColumns];
|
|
1076
|
-
};
|
|
1077
|
-
const loadChildrenMethod = ({
|
|
1078
|
-
row
|
|
1079
|
-
}) => {
|
|
1080
|
-
const fixCheckedStatus = (children) => {
|
|
1081
|
-
const needFix = state.selectType == "checkbox" && row.checked && children.findIndex((item) => !checkMethod({
|
|
1082
|
-
row: item
|
|
1083
|
-
})) >= 0;
|
|
1084
|
-
if (needFix) {
|
|
1085
|
-
needFix && (row.checked = false);
|
|
1086
|
-
setTimeout(() => {
|
|
1087
|
-
var _a;
|
|
1088
|
-
(_a = xGrid.value) == null ? void 0 : _a.setCheckboxRow(row, true);
|
|
1089
|
-
}, 0);
|
|
1090
|
-
}
|
|
1091
|
-
};
|
|
1092
|
-
if (state.isTree == 2) {
|
|
1093
|
-
const {
|
|
1094
|
-
tableId,
|
|
1095
|
-
page,
|
|
1096
|
-
pageSize,
|
|
1097
|
-
autograph,
|
|
1098
|
-
isTreeOrList
|
|
1099
|
-
} = props.tableParams;
|
|
1100
|
-
({
|
|
1101
|
-
levelLazyLoadPrimaryKeyValue: row[props.primaryKey],
|
|
1102
|
-
tableId,
|
|
1103
|
-
page,
|
|
1104
|
-
pageSize,
|
|
1105
|
-
autograph,
|
|
1106
|
-
isTreeOrList
|
|
1107
|
-
});
|
|
1108
|
-
return getAsyncTableData().then(({
|
|
1109
|
-
data
|
|
1110
|
-
}) => {
|
|
1111
|
-
if (data.result == "SUCCESS") {
|
|
1112
|
-
let cloneRows = JSON.parse(JSON.stringify(data.map.rows));
|
|
1113
|
-
let {
|
|
1114
|
-
fieldList,
|
|
1115
|
-
btnList,
|
|
1116
|
-
showButtonTop
|
|
1117
|
-
} = props.columnConfig;
|
|
1118
|
-
let rowNodes = formatData({
|
|
1119
|
-
tableList: data.map.rows,
|
|
1120
|
-
fieldList,
|
|
1121
|
-
btnList,
|
|
1122
|
-
showButtonTop
|
|
1123
|
-
});
|
|
1124
|
-
rowNodes = setChecklist(rowNodes);
|
|
1125
|
-
emit("refreshOldTableData", cloneRows);
|
|
1126
|
-
fixCheckedStatus(rowNodes);
|
|
1127
|
-
return rowNodes;
|
|
1128
|
-
}
|
|
1129
|
-
});
|
|
1130
|
-
} else {
|
|
1131
|
-
fixCheckedStatus(row.childrenList);
|
|
1132
|
-
return Promise.resolve(row.childrenList);
|
|
1133
|
-
}
|
|
1134
|
-
};
|
|
1135
|
-
const getAsyncTableData = (params) => {
|
|
1136
|
-
return Promise.resolve();
|
|
1137
|
-
};
|
|
1138
|
-
const setChecklist = (list) => {
|
|
1139
|
-
return list.map((i) => {
|
|
1140
|
-
i["checked"] = i.checked || false;
|
|
1141
|
-
if (state.isTree == 2) {
|
|
1142
|
-
const treeNodeKey = state.levelLazyLoadSetting.childCountKey;
|
|
1143
|
-
const {
|
|
1144
|
-
isTreeOrList = ""
|
|
1145
|
-
} = props.tableParams;
|
|
1146
|
-
if (treeNodeKey && Number(i[treeNodeKey]) > 0) {
|
|
1147
|
-
isTreeOrList != "LIST" && (i["hasChildren"] = true);
|
|
1148
|
-
}
|
|
1149
|
-
}
|
|
1150
|
-
if (i.childrenList && i.childrenList.length) {
|
|
1151
|
-
i.childrenList = setChecklist(i.childrenList);
|
|
1152
|
-
}
|
|
1153
|
-
Object.keys(i).map((item) => {
|
|
1154
|
-
if (i[item] && typeof i[item] == "string" && i[item].indexOf("<p") !== -1 && item.indexOf("_temp_" + i.id) === -1) {
|
|
1155
|
-
i[item + "_temp_" + i.id] = i[item] || "";
|
|
1156
|
-
i[item] = htmlToText(i[item]);
|
|
1157
|
-
}
|
|
1158
|
-
});
|
|
1159
|
-
i.checked && state.checkedRows.push(i);
|
|
1160
|
-
return {
|
|
1161
|
-
...i
|
|
1162
|
-
};
|
|
1163
|
-
});
|
|
1164
|
-
};
|
|
1165
|
-
function spanMethod(payload) {
|
|
1166
|
-
const {
|
|
1167
|
-
row,
|
|
1168
|
-
column,
|
|
1169
|
-
rowIndex
|
|
1170
|
-
} = payload;
|
|
1171
|
-
if (row.$__SEPARATE && separateDataMap.value.has(row)) {
|
|
1172
|
-
const {
|
|
1173
|
-
rawRow
|
|
1174
|
-
} = separateDataMap.value.get(row);
|
|
1175
|
-
const {
|
|
1176
|
-
colspans
|
|
1177
|
-
} = separateDataMap.value.get(rawRow) || {};
|
|
1178
|
-
if (colspans) {
|
|
1179
|
-
const colspan = colspans[column.field];
|
|
1180
|
-
if (colspan === 0)
|
|
1181
|
-
return {
|
|
1182
|
-
colspan: 0,
|
|
1183
|
-
rowspan: 0
|
|
1184
|
-
};
|
|
1185
|
-
if (colspan > 1)
|
|
1186
|
-
return {
|
|
1187
|
-
rowspan: 1,
|
|
1188
|
-
colspan
|
|
1189
|
-
};
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
return colspanMethod(payload);
|
|
1193
|
-
}
|
|
1194
|
-
function colspanMethod(payload) {
|
|
1195
|
-
var _a;
|
|
1196
|
-
const defaultSpan = {
|
|
1197
|
-
rowspan: 1,
|
|
1198
|
-
colspan: 1
|
|
1199
|
-
};
|
|
1200
|
-
const {
|
|
1201
|
-
row,
|
|
1202
|
-
column
|
|
1203
|
-
} = payload;
|
|
1204
|
-
if (isFunction(attr.spanMethod))
|
|
1205
|
-
return attr.spanMethod(payload);
|
|
1206
|
-
if (isFunction(attr["span-method"]))
|
|
1207
|
-
return attr["span-method"](payload);
|
|
1208
|
-
if (state.isTree != 3) {
|
|
1209
|
-
return defaultSpan;
|
|
1210
|
-
}
|
|
1211
|
-
const xTree = xGrid.value;
|
|
1212
|
-
if (!xTree)
|
|
1213
|
-
return defaultSpan;
|
|
1214
|
-
const {
|
|
1215
|
-
tableColumn = []
|
|
1216
|
-
} = (xTree == null ? void 0 : xTree.getTableColumn()) || {};
|
|
1217
|
-
const fristKeyIndex = tableColumn.findIndex((column2) => !!column2.property);
|
|
1218
|
-
const fixedRightColsSpan = tableColumn.filter((column2) => column2.fixed === "right").length;
|
|
1219
|
-
const colspan = tableColumn.length - fristKeyIndex - fixedRightColsSpan;
|
|
1220
|
-
const isOldVxeTree = row.childrenList && row.childrenList.length;
|
|
1221
|
-
const isTransformVxeTree = ((_a = props.tableParams) == null ? void 0 : _a.isTransform) && !row.qianduan_parent_id;
|
|
1222
|
-
if (isOldVxeTree || isTransformVxeTree) {
|
|
1223
|
-
if (column.treeNode) {
|
|
1224
|
-
return {
|
|
1225
|
-
rowspan: 1,
|
|
1226
|
-
colspan
|
|
1227
|
-
};
|
|
1228
|
-
} else if (!column.property || column.fixed === "right") {
|
|
1229
|
-
return defaultSpan;
|
|
1230
|
-
} else {
|
|
1231
|
-
return {
|
|
1232
|
-
rowspan: 0,
|
|
1233
|
-
colspan: 0
|
|
1234
|
-
};
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
}
|
|
1238
|
-
const footerRowspanMethod = (obj) => {
|
|
1239
|
-
if (!props.groupCountFields || !props.groupCountFields.length)
|
|
1240
|
-
return {
|
|
1241
|
-
rowspan: 1,
|
|
1242
|
-
colspan: 1
|
|
1243
|
-
};
|
|
1244
|
-
let {
|
|
1245
|
-
$rowIndex,
|
|
1246
|
-
_columnIndex
|
|
1247
|
-
} = obj;
|
|
1248
|
-
let len = state.columnLen || 99;
|
|
1249
|
-
let {
|
|
1250
|
-
isBatchSelect
|
|
1251
|
-
} = props.columnConfig;
|
|
1252
|
-
if ($rowIndex === 0) {
|
|
1253
|
-
if (isBatchSelect == 1) {
|
|
1254
|
-
if (_columnIndex === 0) {
|
|
1255
|
-
return {
|
|
1256
|
-
rowspan: 1,
|
|
1257
|
-
colspan: 2
|
|
1258
|
-
};
|
|
1259
|
-
} else if (_columnIndex === 1) {
|
|
1260
|
-
return {
|
|
1261
|
-
rowspan: 1,
|
|
1262
|
-
colspan: 0
|
|
1263
|
-
};
|
|
1264
|
-
} else if (_columnIndex === 2) {
|
|
1265
|
-
return {
|
|
1266
|
-
rowspan: 1,
|
|
1267
|
-
colspan: len
|
|
1268
|
-
};
|
|
1269
|
-
}
|
|
1270
|
-
return {
|
|
1271
|
-
rowspan: 1,
|
|
1272
|
-
colspan: 0
|
|
1273
|
-
};
|
|
1274
|
-
}
|
|
1275
|
-
if (_columnIndex === 0) {
|
|
1276
|
-
return {
|
|
1277
|
-
rowspan: 1,
|
|
1278
|
-
colspan: 1
|
|
1279
|
-
};
|
|
1280
|
-
} else if (_columnIndex === 1) {
|
|
1281
|
-
return {
|
|
1282
|
-
rowspan: 1,
|
|
1283
|
-
colspan: len
|
|
1284
|
-
};
|
|
1285
|
-
}
|
|
1286
|
-
return {
|
|
1287
|
-
rowspan: 1,
|
|
1288
|
-
colspan: 0
|
|
1289
|
-
};
|
|
1290
|
-
}
|
|
1291
|
-
};
|
|
1292
|
-
const rowdblclick = ({
|
|
1293
|
-
row,
|
|
1294
|
-
column
|
|
1295
|
-
}) => {
|
|
1296
|
-
if (isScanMultiTable.value || !!props.isInlineOperating)
|
|
1297
|
-
return false;
|
|
1298
|
-
if (XEUtils.has(row, GROUP_TITLE_KEY))
|
|
1299
|
-
return false;
|
|
1300
|
-
emit("setNestTableClick", props.isNestTable);
|
|
1301
|
-
emit("rowdblclick", row, column, true, true);
|
|
1302
|
-
};
|
|
1303
|
-
const pubCheckChange = (rows = []) => {
|
|
1304
|
-
state.treeTableLength = rows.filter((item) => {
|
|
1305
|
-
let isGroupRow = XEUtils.has(item, GROUP_TITLE_KEY);
|
|
1306
|
-
return !isGroupRow;
|
|
1307
|
-
}).length;
|
|
1308
|
-
state.visibleTreeCheck = rows.length > 1;
|
|
1309
|
-
emit("selectionChange", rows);
|
|
1310
|
-
};
|
|
1311
|
-
const updateAddCheckedRows = (rows, isTree = false) => {
|
|
1312
|
-
let obj = {
|
|
1313
|
-
isUpdate: true,
|
|
1314
|
-
updateRows: rows,
|
|
1315
|
-
isTree
|
|
1316
|
-
};
|
|
1317
|
-
if (isTree) {
|
|
1318
|
-
Object.assign(obj, {
|
|
1319
|
-
isTree,
|
|
1320
|
-
isCheckedChange: true,
|
|
1321
|
-
checkedRows: state.checkedRows
|
|
1322
|
-
});
|
|
1323
|
-
}
|
|
1324
|
-
emit("selectionChangeLocal", obj);
|
|
1325
|
-
};
|
|
1326
|
-
const removeCheckedRows = (rows, isCheckedChange) => {
|
|
1327
|
-
removeCheckedDisabledRows(state);
|
|
1328
|
-
let checkedRows = state.checkedRows;
|
|
1329
|
-
let needRemoveIndexs = [];
|
|
1330
|
-
for (let i = 0; i < rows.length; i++) {
|
|
1331
|
-
let row = rows[i];
|
|
1332
|
-
let removeIndex = currentCheckedKeys.value.findIndex((item) => {
|
|
1333
|
-
return item === row[props.primaryKey];
|
|
1334
|
-
});
|
|
1335
|
-
removeIndex >= 0 && needRemoveIndexs.push(removeIndex);
|
|
1336
|
-
}
|
|
1337
|
-
needRemoveIndexs.sort((a, b) => b - a);
|
|
1338
|
-
emit("selectionChangeLocal", {
|
|
1339
|
-
isAdd: false,
|
|
1340
|
-
isCheckedChange,
|
|
1341
|
-
needRemoveIndexs,
|
|
1342
|
-
newCheckedRows: [],
|
|
1343
|
-
checkedRows
|
|
1344
|
-
});
|
|
1345
|
-
};
|
|
1346
|
-
const setCheckedMehod = (setChecked, row) => {
|
|
1347
|
-
if (setChecked) {
|
|
1348
|
-
updateAddCheckedRows(row);
|
|
1349
|
-
return;
|
|
1350
|
-
}
|
|
1351
|
-
if (props.pageVO.pageIndex != state.lastPageIndex) {
|
|
1352
|
-
updateAddCheckedRows(row);
|
|
1353
|
-
return;
|
|
1354
|
-
}
|
|
1355
|
-
if (currentCheckedKeys.value.includes(row[props.primaryKey])) {
|
|
1356
|
-
removeCheckedRows([row]);
|
|
1357
|
-
return;
|
|
1358
|
-
}
|
|
1359
|
-
updateAddCheckedRows(row);
|
|
1360
|
-
};
|
|
1361
|
-
const handlerClickRow = (data) => {
|
|
1362
|
-
var _a, _b, _c;
|
|
1363
|
-
let {
|
|
1364
|
-
row,
|
|
1365
|
-
$event = {},
|
|
1366
|
-
$rowIndex,
|
|
1367
|
-
triggerCheckbox
|
|
1368
|
-
} = data;
|
|
1369
|
-
if (((_a = getAttr("checkbox-config")) == null ? void 0 : _a.noTriggerCellClick) && triggerCheckbox) {
|
|
1370
|
-
return false;
|
|
1371
|
-
}
|
|
1372
|
-
if (((_b = getAttr("checkbox-config")) == null ? void 0 : _b.trigger) === "default") {
|
|
1373
|
-
emit("handlerClickRow", row, $rowIndex);
|
|
1374
|
-
return false;
|
|
1375
|
-
}
|
|
1376
|
-
if (isScanMultiTable.value || props.isInlineOperating)
|
|
1377
|
-
return false;
|
|
1378
|
-
if (XEUtils.has(data == null ? void 0 : data.row, GROUP_TITLE_KEY))
|
|
1379
|
-
return false;
|
|
1380
|
-
if (state.isTriggerSelectionChange && state.isTree == 0)
|
|
1381
|
-
return false;
|
|
1382
|
-
let table = xGrid.value;
|
|
1383
|
-
isAboutNestTable.value && emit("resetNestLastClickTable", table);
|
|
1384
|
-
let {
|
|
1385
|
-
className,
|
|
1386
|
-
tagName
|
|
1387
|
-
} = $event.target || {};
|
|
1388
|
-
if (tagName == "INPUT" || tagName == "svg" || tagName == "path")
|
|
1389
|
-
return;
|
|
1390
|
-
if (className && XEUtils.isString(className)) {
|
|
1391
|
-
if (className.includes("n-input") || className.includes("n-base-selection-label"))
|
|
1392
|
-
return;
|
|
1393
|
-
if (className.includes("vxe-table--expand-btn"))
|
|
1394
|
-
return;
|
|
1395
|
-
}
|
|
1396
|
-
isAboutNestTable.value && emit("setNestLastClickTable", table, props.isNestTable, row[handleRowId.value], row);
|
|
1397
|
-
emit("setNestTableClick", false);
|
|
1398
|
-
if (props.isNestTable) {
|
|
1399
|
-
table == null ? void 0 : table.setAllCheckboxRow(false);
|
|
1400
|
-
nestHandleClickRow(table, data);
|
|
1401
|
-
return;
|
|
1402
|
-
}
|
|
1403
|
-
const batchSelect = (_c = getAttr("checkbox-config")) == null ? void 0 : _c.batchSelect;
|
|
1404
|
-
let forbiddenBatchSelect = !checkMethod(data);
|
|
1405
|
-
if (state.selectType == "checkbox" && !batchSelect && (forbiddenBatchSelect || data.row.$__SEPARATE)) {
|
|
1406
|
-
table == null ? void 0 : table.setAllCheckboxRow(false);
|
|
1407
|
-
const checked2 = getRowClassName({
|
|
1408
|
-
row
|
|
1409
|
-
}) == "single--checked";
|
|
1410
|
-
const value = !checked2 ? [] : [row];
|
|
1411
|
-
state.checkedRows = value;
|
|
1412
|
-
pubCheckChange(value);
|
|
1413
|
-
emit("handlerClickRow", row, $rowIndex);
|
|
1414
|
-
emit("checkboxChange", {
|
|
1415
|
-
checked: checked2,
|
|
1416
|
-
row,
|
|
1417
|
-
index: $rowIndex,
|
|
1418
|
-
records: [row]
|
|
1419
|
-
});
|
|
1420
|
-
return;
|
|
1421
|
-
}
|
|
1422
|
-
state.visibleCheckAllWrap = false;
|
|
1423
|
-
state.visibleCheckAllWrapMore = false;
|
|
1424
|
-
let checked = false;
|
|
1425
|
-
if (state.selectType == "radio") {
|
|
1426
|
-
checked = table.isCheckedByRadioRow(row);
|
|
1427
|
-
} else {
|
|
1428
|
-
checked = table.isCheckedByCheckboxRow(row);
|
|
1429
|
-
}
|
|
1430
|
-
if (state.isradioChange) {
|
|
1431
|
-
checked = false;
|
|
1432
|
-
state.isradioChange = false;
|
|
1433
|
-
}
|
|
1434
|
-
let checkedRow = table.getCheckboxRecords();
|
|
1435
|
-
let rowLen = state.checkedRows.filter((item) => !XEUtils.has(item, GROUP_TITLE_KEY)).length;
|
|
1436
|
-
let newRow = [];
|
|
1437
|
-
if (state.isTree != 0) {
|
|
1438
|
-
let {
|
|
1439
|
-
className: className2
|
|
1440
|
-
} = $event.target || {};
|
|
1441
|
-
if (className2 && className2.includes("vxe-tree--node-btn"))
|
|
1442
|
-
return;
|
|
1443
|
-
if (state.selectType === "checkbox") {
|
|
1444
|
-
let rowVal = {};
|
|
1445
|
-
if (!state.isTriggerSelectionChange) {
|
|
1446
|
-
table.setAllCheckboxRow(false);
|
|
1447
|
-
state.checkedRows = [row];
|
|
1448
|
-
pubCheckChange([row]);
|
|
1449
|
-
rowVal = row;
|
|
1450
|
-
} else {
|
|
1451
|
-
if (checkedRow.length > 1)
|
|
1452
|
-
return false;
|
|
1453
|
-
rowVal = checked || checkedRow.length === 1 && !checked ? checkedRow[0] : {};
|
|
1454
|
-
state.checkedRows = [rowVal];
|
|
1455
|
-
}
|
|
1456
|
-
updateAddCheckedRows(rowVal, true);
|
|
1457
|
-
emit("handlerClickRow", rowVal);
|
|
1458
|
-
return;
|
|
1459
|
-
}
|
|
1460
|
-
let newTheUniqueKeyArr = [];
|
|
1461
|
-
flattenRow(row, newRow, newTheUniqueKeyArr, handleRowId.value);
|
|
1462
|
-
let res = intersectRow(checkedRow, newTheUniqueKeyArr, handleRowId.value);
|
|
1463
|
-
if (!res) {
|
|
1464
|
-
rowLen = 1;
|
|
1465
|
-
} else {
|
|
1466
|
-
rowLen = checkedRow.filter((item) => !XEUtils.has(item, GROUP_TITLE_KEY)).length;
|
|
1467
|
-
}
|
|
1468
|
-
}
|
|
1469
|
-
!batchSelect && table.setAllCheckboxRow(false);
|
|
1470
|
-
let setChecked = checked;
|
|
1471
|
-
if (rowLen > 1) {
|
|
1472
|
-
state.selectType != "radio" && table.setCheckboxRow([row], true);
|
|
1473
|
-
state.isTree != 0 && state.selectType != "radio" && pubCheckChange(newRow);
|
|
1474
|
-
state.selectType != "radio" && emit("handlerClickRow", row, $rowIndex);
|
|
1475
|
-
} else {
|
|
1476
|
-
setChecked = !setChecked;
|
|
1477
|
-
if (!setChecked) {
|
|
1478
|
-
state.selectType == "radio" && table.clearRadioRow();
|
|
1479
|
-
state.isTree != 0 && state.selectType != "radio" && pubCheckChange([]);
|
|
1480
|
-
} else {
|
|
1481
|
-
state.selectType == "radio" && table.setRadioRow(row);
|
|
1482
|
-
state.isTree != 0 && state.selectType != "radio" && pubCheckChange(newRow);
|
|
1483
|
-
}
|
|
1484
|
-
state.selectType != "radio" && table.setCheckboxRow([row], setChecked);
|
|
1485
|
-
}
|
|
1486
|
-
if (state.isTree != 0) {
|
|
1487
|
-
emit("checkboxChange", {
|
|
1488
|
-
checked: setChecked,
|
|
1489
|
-
row,
|
|
1490
|
-
index: $rowIndex,
|
|
1491
|
-
records: checkedRow
|
|
1492
|
-
});
|
|
1493
|
-
setChecked && emit("handlerClickRow", row, $rowIndex);
|
|
1494
|
-
return;
|
|
1495
|
-
}
|
|
1496
|
-
setCheckedMehod(setChecked, row);
|
|
1497
|
-
if (setChecked || rowLen > 1 || !rowLen) {
|
|
1498
|
-
state.checkedRows = [row];
|
|
1499
|
-
}
|
|
1500
|
-
if (!setChecked && rowLen === 1) {
|
|
1501
|
-
state.checkedRows = [];
|
|
1502
|
-
}
|
|
1503
|
-
setCurrentCheckedLength();
|
|
1504
|
-
state.lastPageIndex = props.pageVO.pageIndex;
|
|
1505
|
-
emit("checkboxChange", {
|
|
1506
|
-
checked: setChecked,
|
|
1507
|
-
row,
|
|
1508
|
-
index: $rowIndex,
|
|
1509
|
-
records: table.getCheckboxRecords()
|
|
1510
|
-
});
|
|
1511
|
-
setChecked && emit("handlerClickRow", row, $rowIndex);
|
|
1512
|
-
};
|
|
1513
|
-
const addCheckedRows = (rows) => {
|
|
1514
|
-
removeCheckedDisabledRows(state);
|
|
1515
|
-
let checkedRows = state.checkedRows;
|
|
1516
|
-
let newCheckedRows = rows.filter((row) => {
|
|
1517
|
-
return !currentCheckedKeys.value.includes(row[props.primaryKey]);
|
|
1518
|
-
});
|
|
1519
|
-
checkedRows.push(...newCheckedRows);
|
|
1520
|
-
emit("selectionChangeLocal", {
|
|
1521
|
-
isAdd: true,
|
|
1522
|
-
isCheckedChange: true,
|
|
1523
|
-
newCheckedRows,
|
|
1524
|
-
checkedRows
|
|
1525
|
-
});
|
|
1526
|
-
};
|
|
1527
|
-
const treeTableSelectionChange = (records) => {
|
|
1528
|
-
if (state.isTree == 0) {
|
|
1529
|
-
emit("selectionChange", records);
|
|
1530
|
-
return false;
|
|
1531
|
-
}
|
|
1532
|
-
pubCheckChange(records);
|
|
1533
|
-
return true;
|
|
1534
|
-
};
|
|
1535
|
-
const selectionChange = ({
|
|
1536
|
-
checked,
|
|
1537
|
-
row,
|
|
1538
|
-
records,
|
|
1539
|
-
$rowIndex
|
|
1540
|
-
}) => {
|
|
1541
|
-
let table = xGrid.value;
|
|
1542
|
-
table.clearCurrentRow();
|
|
1543
|
-
state.isTriggerSelectionChange = true;
|
|
1544
|
-
setTimeout(() => {
|
|
1545
|
-
state.isTriggerSelectionChange = false;
|
|
1546
|
-
}, 0);
|
|
1547
|
-
emit("checkboxChange", {
|
|
1548
|
-
checked,
|
|
1549
|
-
row,
|
|
1550
|
-
index: $rowIndex,
|
|
1551
|
-
records
|
|
1552
|
-
});
|
|
1553
|
-
if (treeTableSelectionChange(records))
|
|
1554
|
-
return;
|
|
1555
|
-
if (checked) {
|
|
1556
|
-
addCheckedRows([row]);
|
|
1557
|
-
} else {
|
|
1558
|
-
removeCheckedRows([row], true);
|
|
1559
|
-
}
|
|
1560
|
-
setCurrentCheckedLength();
|
|
1561
|
-
};
|
|
1562
|
-
const selectionChangeAll = ({
|
|
1563
|
-
checked,
|
|
1564
|
-
records
|
|
1565
|
-
}) => {
|
|
1566
|
-
if (treeTableSelectionChange(records))
|
|
1567
|
-
return;
|
|
1568
|
-
if (checked) {
|
|
1569
|
-
addCheckedRows(records);
|
|
1570
|
-
} else {
|
|
1571
|
-
removeCheckedRows(props.data);
|
|
1572
|
-
}
|
|
1573
|
-
setCurrentCheckedLength();
|
|
1574
|
-
};
|
|
1575
|
-
const radioOnChange = (rowData = {}) => {
|
|
1576
|
-
let {
|
|
1577
|
-
row
|
|
1578
|
-
} = rowData;
|
|
1579
|
-
emit("selectionChange", [{
|
|
1580
|
-
...row
|
|
1581
|
-
}]);
|
|
1582
|
-
};
|
|
1583
|
-
const sortChange = ({
|
|
1584
|
-
property,
|
|
1585
|
-
order
|
|
1586
|
-
}) => {
|
|
1587
|
-
var _a;
|
|
1588
|
-
if (props.isInlineOperating)
|
|
1589
|
-
return false;
|
|
1590
|
-
Object.values(state.filterFields).forEach((item) => item.filterSort = null);
|
|
1591
|
-
const column = (_a = props.columnConfig.fieldList) == null ? void 0 : _a.find((item) => item.columnName === property);
|
|
1592
|
-
emit("sortChange", {
|
|
1593
|
-
prop: property,
|
|
1594
|
-
order,
|
|
1595
|
-
column
|
|
1596
|
-
});
|
|
1597
|
-
};
|
|
1598
|
-
const showDrawer = () => {
|
|
1599
|
-
const theads = xGrid.value.$el.childNodes[0].childNodes[1].childNodes[0].getElementsByClassName("mycolumn");
|
|
1600
|
-
emit("setNestTableClickSetting", props.isNestTable);
|
|
1601
|
-
emit("showDrawer", theads);
|
|
1602
|
-
};
|
|
1603
|
-
const handleCellMouseenter = ({
|
|
1604
|
-
column,
|
|
1605
|
-
$event
|
|
1606
|
-
}) => {
|
|
1607
|
-
if (column.showOverflow === "title") {
|
|
1608
|
-
const target = $event == null ? void 0 : $event.currentTarget;
|
|
1609
|
-
const cls = target == null ? void 0 : target.className;
|
|
1610
|
-
const bodyCls = " vxe-body--column ";
|
|
1611
|
-
if (cls && ` ${cls} `.includes(bodyCls) && target && target.hasAttribute("title")) {
|
|
1612
|
-
const cellElem = target.querySelector(".vxe-cell");
|
|
1613
|
-
if (cellElem && cellElem.hasAttribute("title")) {
|
|
1614
|
-
cellElem.removeAttribute("title");
|
|
1615
|
-
}
|
|
1616
|
-
if (props.isInlineOperating) {
|
|
1617
|
-
if (target && target.hasAttribute("title")) {
|
|
1618
|
-
target.removeAttribute("title");
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
1621
|
-
}
|
|
1622
|
-
}
|
|
1623
|
-
};
|
|
1624
|
-
const getFooterTooltipTitle = (column) => {
|
|
1625
|
-
let t = "";
|
|
1626
|
-
if (XEUtils.has(props.sumData, column.property)) {
|
|
1627
|
-
t += `<p class="table-footer-tooltip-label-wrap">
|
|
1628
|
-
<span class="table-footer-tooltip-label">\u6C42\u548C\uFF1A</span>
|
|
1629
|
-
${XEUtils.round(Number(props.sumData[column.property]), 4)}
|
|
1630
|
-
</p>`;
|
|
1631
|
-
}
|
|
1632
|
-
if (XEUtils.has(props.avgData, column.property)) {
|
|
1633
|
-
t += `<p class="table-footer-tooltip-label-wrap">
|
|
1634
|
-
<span class="table-footer-tooltip-label">\u5E73\u5747\u503C\uFF1A</span>
|
|
1635
|
-
${XEUtils.round(Number(props.avgData[column.property]), 4)}</p>`;
|
|
1636
|
-
}
|
|
1637
|
-
return t;
|
|
1638
|
-
};
|
|
1639
|
-
const getFooterTitle = (column) => {
|
|
1640
|
-
if (XEUtils.has(props.sumData, column.property)) {
|
|
1641
|
-
return XEUtils.round(Number(props.sumData[column.property]), 2);
|
|
1642
|
-
}
|
|
1643
|
-
if (XEUtils.has(props.avgData, column.property)) {
|
|
1644
|
-
return XEUtils.round(Number(props.avgData[column.property]), 2);
|
|
1645
|
-
}
|
|
1646
|
-
};
|
|
1647
|
-
const hanldeClickRefresh = () => {
|
|
1648
|
-
emit("pubTableRefresh");
|
|
1649
|
-
};
|
|
1650
|
-
const confirmScanMulti = (params) => {
|
|
1651
|
-
let {
|
|
1652
|
-
row,
|
|
1653
|
-
$rowIndex
|
|
1654
|
-
} = params || {};
|
|
1655
|
-
if (!row)
|
|
1656
|
-
return;
|
|
1657
|
-
emit("scanMultiRemove", $rowIndex, params);
|
|
1658
|
-
let vxeTable = xGrid.value;
|
|
1659
|
-
vxeTable.remove(row);
|
|
1660
|
-
};
|
|
1661
|
-
const scanMultiOperate = (params) => {
|
|
1662
|
-
return createVNode(NPopconfirm, {
|
|
1663
|
-
"onPositiveClick": () => confirmScanMulti(params)
|
|
1664
|
-
}, {
|
|
1665
|
-
trigger() {
|
|
1666
|
-
return createVNode(script, {
|
|
1667
|
-
"class": "scan-multi-delete",
|
|
1668
|
-
"iconClass": "shanchu"
|
|
1669
|
-
}, null);
|
|
1670
|
-
},
|
|
1671
|
-
default() {
|
|
1672
|
-
return "\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F";
|
|
1673
|
-
}
|
|
1674
|
-
});
|
|
1675
|
-
};
|
|
1676
|
-
const showEditForm = (row, column, $rowIndex) => {
|
|
1677
|
-
if (!props.isMatchComponent || props.isNestTable || isScanMultiTable.value)
|
|
1678
|
-
return false;
|
|
1679
|
-
if (props.isBatchEditing || props.isInlineEditing || props.isInlineAdding) {
|
|
1680
|
-
let matchObj = state.editColumnMap[column.property];
|
|
1681
|
-
if (!matchObj || !matchObj.matchItem || !matchObj.fieldItem)
|
|
1682
|
-
return false;
|
|
1683
|
-
if (props.isBatchEditing && !props.isEditAllRow) {
|
|
1684
|
-
let matchIndex = state.checkedRows.findIndex((v) => v[props.primaryKey] == row[props.primaryKey]);
|
|
1685
|
-
if (matchIndex < 0)
|
|
1686
|
-
return false;
|
|
1687
|
-
}
|
|
1688
|
-
if (props.isInlineEditing || props.isInlineAdding) {
|
|
1689
|
-
if ($rowIndex !== 0)
|
|
1690
|
-
return false;
|
|
1691
|
-
}
|
|
1692
|
-
return matchObj.matchItem;
|
|
1693
|
-
}
|
|
1694
|
-
return false;
|
|
1695
|
-
};
|
|
1696
|
-
const initBatchDynamicProps = (unionItem, row, column, $rowIndex) => {
|
|
1697
|
-
let id = row[props.primaryKey];
|
|
1698
|
-
let dynamicPropsCache = props.batchDynamicPropsCache[id];
|
|
1699
|
-
if (dynamicPropsCache && dynamicPropsCache[unionItem.tableField]) {
|
|
1700
|
-
return dynamicPropsCache[unionItem.tableField];
|
|
1701
|
-
}
|
|
1702
|
-
let matchObj = state.editColumnMap[column.property];
|
|
1703
|
-
let {
|
|
1704
|
-
fieldItem = {}
|
|
1705
|
-
} = matchObj || {};
|
|
1706
|
-
let defaultCombinationForm = {};
|
|
1707
|
-
if (!props.isInlineAdding) {
|
|
1708
|
-
let originalRow = props.pageIndexOldtableData.find((item) => item[props.primaryKey] == row[props.primaryKey]);
|
|
1709
|
-
defaultCombinationForm = setDefaultFormData(column.property, fieldItem, originalRow);
|
|
1710
|
-
}
|
|
1711
|
-
let tempFieldItem = JSON.parse(JSON.stringify(fieldItem));
|
|
1712
|
-
let defaultForm = {
|
|
1713
|
-
fieldList: [tempFieldItem],
|
|
1714
|
-
defaultCombinationForm
|
|
1715
|
-
};
|
|
1716
|
-
let dynamicProps = {
|
|
1717
|
-
props: {
|
|
1718
|
-
formPrimaryKey: id,
|
|
1719
|
-
defaultForm,
|
|
1720
|
-
banRequest: true,
|
|
1721
|
-
propsFormBtn: true,
|
|
1722
|
-
propsDelSetting: true,
|
|
1723
|
-
parentConfig: {
|
|
1724
|
-
is_edit: "1"
|
|
1725
|
-
},
|
|
1726
|
-
configuration: configuration.value,
|
|
1727
|
-
isPure: true,
|
|
1728
|
-
isOpenShortcut: false,
|
|
1729
|
-
cacheUniqueKey: state.cacheUniqueKey,
|
|
1730
|
-
styleSetting: {}
|
|
1731
|
-
},
|
|
1732
|
-
on: {
|
|
1733
|
-
handleSubmit: handleSubmitEditForm,
|
|
1734
|
-
banSubmit
|
|
1735
|
-
}
|
|
1736
|
-
};
|
|
1737
|
-
emit("setBatchDynamicPropsCache", {
|
|
1738
|
-
primaryKey: row[props.primaryKey],
|
|
1739
|
-
tableField: unionItem.tableField,
|
|
1740
|
-
dynamicProps
|
|
1741
|
-
});
|
|
1742
|
-
return dynamicProps;
|
|
1743
|
-
};
|
|
1744
|
-
const handleSubmitEditForm = (obj = {}) => {
|
|
1745
|
-
if (props.isInlineEditing || props.isInlineAdding) {
|
|
1746
|
-
emit("submitEditFormSuccess", obj);
|
|
1747
|
-
return;
|
|
1748
|
-
}
|
|
1749
|
-
if (props.isBatchEditing) {
|
|
1750
|
-
emit("submitEditFormSuccessBatch", obj);
|
|
1751
|
-
return;
|
|
1752
|
-
}
|
|
1753
|
-
};
|
|
1754
|
-
const banSubmit = (obj) => {
|
|
1755
|
-
if (props.isInlineEditing || props.isInlineAdding) {
|
|
1756
|
-
emit("submitEditFormError");
|
|
1757
|
-
return;
|
|
1758
|
-
}
|
|
1759
|
-
if (props.isBatchEditing) {
|
|
1760
|
-
emit("submitEditFormErrorBatch", obj);
|
|
1761
|
-
return;
|
|
1762
|
-
}
|
|
1763
|
-
};
|
|
1764
|
-
const handleFormTheUniqueKey = async () => {
|
|
1765
|
-
var _a;
|
|
1766
|
-
emit("initInlineEditFormConfig", {
|
|
1767
|
-
listFormUnionSetting: props.listFormUnionSetting,
|
|
1768
|
-
inlineEditFormConfig: props.inlineEditFormConfig
|
|
1769
|
-
});
|
|
1770
|
-
let hasEditRow = (_a = props.btnList) == null ? void 0 : _a.find((item) => {
|
|
1771
|
-
var _a2;
|
|
1772
|
-
let trigger_type = item.settingObj && ((_a2 = item.settingObj[0]) == null ? void 0 : _a2.trigger_type);
|
|
1773
|
-
if (item.isShow == 1 && trigger_type == "EDIT_ROW")
|
|
1774
|
-
return true;
|
|
1775
|
-
return false;
|
|
1776
|
-
});
|
|
1777
|
-
if (!hasEditRow)
|
|
1778
|
-
return;
|
|
1779
|
-
};
|
|
1780
|
-
const handlePreView = (data, i, e) => {
|
|
1781
|
-
e.preventDefault();
|
|
1782
|
-
e.stopPropagation();
|
|
1783
|
-
if (!data)
|
|
1784
|
-
data = xb_big;
|
|
1785
|
-
emit("handlePreView", data, i);
|
|
1786
|
-
};
|
|
1787
|
-
const getPicture = (row, item, type) => {
|
|
1788
|
-
return [createVNode("div", {
|
|
1789
|
-
"class": ["img-wrap", type === "HEADPORTRAIT" ? "img-circle" : ""]
|
|
1790
|
-
}, [handleImgArr(row[item.columnName], type, imgs2imgArr).map((v, i) => createVNode("img", {
|
|
1791
|
-
"key": i,
|
|
1792
|
-
"src": handleImgSrc(v, props.sysImageSize, "LIST_FIELD_SMALL"),
|
|
1793
|
-
"style": modalDetailImage(props.sysImageSize, "LIST_FIELD_SMALL", "36px"),
|
|
1794
|
-
"onClick": (e) => handlePreView(row[item.columnName], i, e)
|
|
1795
|
-
}, null))])];
|
|
1796
|
-
};
|
|
1797
|
-
const getColor = (row, item) => {
|
|
1798
|
-
let color = row[item.columnName];
|
|
1799
|
-
if (color == null ? void 0 : color.includes("-")) {
|
|
1800
|
-
let colorName = color.split("-")[1];
|
|
1801
|
-
color = XEUtils.oldColorMap(colorName);
|
|
1802
|
-
}
|
|
1803
|
-
return [createVNode("div", {
|
|
1804
|
-
"class": "color-wrap",
|
|
1805
|
-
"style": "height: 100%; padding: 4px;"
|
|
1806
|
-
}, [createVNode("div", {
|
|
1807
|
-
"style": {
|
|
1808
|
-
background: color,
|
|
1809
|
-
height: "24px"
|
|
1810
|
-
}
|
|
1811
|
-
}, null)])];
|
|
1812
|
-
};
|
|
1813
|
-
const getDate = (row, item) => {
|
|
1814
|
-
let obj = row[item.columnName] || "";
|
|
1815
|
-
if (!XEUtils.isEmpty(obj)) {
|
|
1816
|
-
if (XEUtils.isObject(obj) && "tooltip" in obj) {
|
|
1817
|
-
return [createVNode(resolveComponent("n-tooltip"), null, {
|
|
1818
|
-
default: () => [{
|
|
1819
|
-
trigger: () => createVNode("span", null, [obj.value])
|
|
1820
|
-
}, createVNode("span", {
|
|
1821
|
-
"innerHTML": obj.tooltip
|
|
1822
|
-
}, null)]
|
|
1823
|
-
})];
|
|
1824
|
-
}
|
|
1825
|
-
}
|
|
1826
|
-
return [createVNode("span", {
|
|
1827
|
-
"innerHTML": obj
|
|
1828
|
-
}, null)];
|
|
1829
|
-
};
|
|
1830
|
-
const getPercentage = (row, item) => {
|
|
1831
|
-
let value = row[item.columnName];
|
|
1832
|
-
if (!value && value !== 0)
|
|
1833
|
-
return;
|
|
1834
|
-
let percentValue = value;
|
|
1835
|
-
let SPANTAG_REGEXP = /<\/?span.*?>/g;
|
|
1836
|
-
if (SPANTAG_REGEXP.test(value)) {
|
|
1837
|
-
let d = document.createElement("span");
|
|
1838
|
-
d.innerHTML = value;
|
|
1839
|
-
value = d.textContent;
|
|
1840
|
-
percentValue = value;
|
|
1841
|
-
}
|
|
1842
|
-
if (value && XEUtils.isString(value) && value.includes("%")) {
|
|
1843
|
-
percentValue = Number(value.replace("%", ""));
|
|
1844
|
-
}
|
|
1845
|
-
let strokeColor = "#52c41a";
|
|
1846
|
-
if (percentValue < 15) {
|
|
1847
|
-
strokeColor = "#ff5500";
|
|
1848
|
-
} else if (percentValue < 50) {
|
|
1849
|
-
strokeColor = "#ff8b01";
|
|
1850
|
-
} else if (percentValue < 90) {
|
|
1851
|
-
strokeColor = "#1890ff";
|
|
1852
|
-
}
|
|
1853
|
-
if (percentValue > 100) {
|
|
1854
|
-
percentValue = 100;
|
|
1855
|
-
} else if (percentValue < 0) {
|
|
1856
|
-
percentValue = 0;
|
|
1857
|
-
}
|
|
1858
|
-
return [createVNode("div", {
|
|
1859
|
-
"class": "percent-wrap"
|
|
1860
|
-
}, [createVNode("span", {
|
|
1861
|
-
"class": "percent-value"
|
|
1862
|
-
}, [percentValue, createTextVNode("%")]), createVNode(NProgress, {
|
|
1863
|
-
"percentage": percentValue,
|
|
1864
|
-
"showIndicator": false,
|
|
1865
|
-
"color": strokeColor
|
|
1866
|
-
}, null)])];
|
|
1867
|
-
};
|
|
1868
|
-
const getvideoList = (row, item) => {
|
|
1869
|
-
let res = row[item.columnName];
|
|
1870
|
-
if (Array.isArray(res)) {
|
|
1871
|
-
res = JSON.stringify(res);
|
|
1872
|
-
}
|
|
1873
|
-
return null;
|
|
1874
|
-
};
|
|
1875
|
-
const getOrCode = (row, item, type) => {
|
|
1876
|
-
let src = qr;
|
|
1877
|
-
return [createVNode("span", {
|
|
1878
|
-
"class": "bigTable-qr-span",
|
|
1879
|
-
"onClick": (e) => qrCodeEvent(e, row, item)
|
|
1880
|
-
}, [createVNode("img", {
|
|
1881
|
-
"class": "bigTable-qr-img",
|
|
1882
|
-
"src": src
|
|
1883
|
-
}, null), createVNode("span", null, [createVNode(script, {
|
|
1884
|
-
"iconClass": "fangda"
|
|
1885
|
-
}, null)])])];
|
|
1886
|
-
};
|
|
1887
|
-
const qrCodeEvent = (e, row, item) => {
|
|
1888
|
-
e.preventDefault();
|
|
1889
|
-
e.stopPropagation();
|
|
1890
|
-
let data = handleQrCodeContent(row, item);
|
|
1891
|
-
emit("qrCodeEvent", data);
|
|
1892
|
-
};
|
|
1893
|
-
const generateInlineBtnList = (row, index) => {
|
|
1894
|
-
if (props.isNestTable)
|
|
1895
|
-
return;
|
|
1896
|
-
let inlineEditBtnList = [];
|
|
1897
|
-
inlineEditBtnList.push(...getInlineEditBtn(row, "tileBtnList"));
|
|
1898
|
-
inlineEditBtnList.push(...getInlineEditBtn(row, "foldBtnList"));
|
|
1899
|
-
if (!(inlineEditBtnList == null ? void 0 : inlineEditBtnList.length))
|
|
1900
|
-
return;
|
|
1901
|
-
return [createVNode("span", null, [createVNode(NButton, {
|
|
1902
|
-
"style": {
|
|
1903
|
-
display: row.__isInlineEditing ? "inline-block" : "none"
|
|
1904
|
-
},
|
|
1905
|
-
"onClick": (e) => {
|
|
1906
|
-
e.stopPropagation();
|
|
1907
|
-
emit("SET_SAVE_ROW_STATUS", true);
|
|
1908
|
-
},
|
|
1909
|
-
"class": "btn-custom-class row-btn",
|
|
1910
|
-
"size": "small",
|
|
1911
|
-
"text": true
|
|
1912
|
-
}, {
|
|
1913
|
-
default: () => "\u4FDD\u5B58"
|
|
1914
|
-
}), createVNode(NButton, {
|
|
1915
|
-
"style": {
|
|
1916
|
-
display: row.__isInlineEditing ? "inline-block" : "none"
|
|
1917
|
-
},
|
|
1918
|
-
"onClick": (e) => {
|
|
1919
|
-
e.stopPropagation();
|
|
1920
|
-
emit("SET_CANCEL_ROW_STATUS", true);
|
|
1921
|
-
},
|
|
1922
|
-
"class": "btn-custom-class row-btn",
|
|
1923
|
-
"size": "small",
|
|
1924
|
-
"text": true
|
|
1925
|
-
}, {
|
|
1926
|
-
default: () => "\u53D6\u6D88"
|
|
1927
|
-
})])];
|
|
1928
|
-
};
|
|
1929
|
-
const getTileBtnList = (row, index) => {
|
|
1930
|
-
var _a;
|
|
1931
|
-
return [((_a = row.tileBtnList) == null ? void 0 : _a.length) && row.tileBtnList.map((btn, j) => {
|
|
1932
|
-
return btn.isShow == "1" && btn.type != "LINK" && createVNode(NButton, {
|
|
1933
|
-
"key": btn.sid,
|
|
1934
|
-
"onClick": (e) => clickBtn(row, btn, index, e),
|
|
1935
|
-
"class": "btn-custom-class row-btn",
|
|
1936
|
-
"style": {
|
|
1937
|
-
...getBtnStyle(btn),
|
|
1938
|
-
...{
|
|
1939
|
-
display: !row.__isInlineEditing ? "inline-block" : "none"
|
|
1940
|
-
}
|
|
1941
|
-
},
|
|
1942
|
-
"disabled": row.__isDisableInlineEdit,
|
|
1943
|
-
"ghost": btn.showStyle == "white_bg",
|
|
1944
|
-
"size": "small"
|
|
1945
|
-
}, {
|
|
1946
|
-
default: () => [getBtnIcon(btn), btn.showStyle === "only_icon" ? "" : handleName(btn)]
|
|
1947
|
-
});
|
|
1948
|
-
}) || ""];
|
|
1949
|
-
};
|
|
1950
|
-
const clickBtn = (row, btn, index, e, j) => {
|
|
1951
|
-
e.preventDefault();
|
|
1952
|
-
e.stopPropagation();
|
|
1953
|
-
recordClickBtnInfo(row, index);
|
|
1954
|
-
emit("setNestTableClick", props.isNestTable);
|
|
1955
|
-
emit("setCurRowIndex", index);
|
|
1956
|
-
emit("clickBtn", row, btn, row[handleRowId.value], index);
|
|
1957
|
-
};
|
|
1958
|
-
const getBtnIcon = (btn, mr = "8px") => {
|
|
1959
|
-
let icon;
|
|
1960
|
-
if (btn.icon) {
|
|
1961
|
-
if (state.btnIcons[btn.icon]) {
|
|
1962
|
-
icon = createVNode(resolveComponent("a-icon"), {
|
|
1963
|
-
"type": state.btnIcons[btn.icon]
|
|
1964
|
-
}, null);
|
|
1965
|
-
} else {
|
|
1966
|
-
icon = createVNode(NTooltip, null, {
|
|
1967
|
-
trigger: () => createVNode(script, {
|
|
1968
|
-
"iconClass": btn.icon,
|
|
1969
|
-
"style": {
|
|
1970
|
-
marginRight: mr
|
|
1971
|
-
}
|
|
1972
|
-
}, null),
|
|
1973
|
-
default: () => handleName(btn)
|
|
1974
|
-
});
|
|
1975
|
-
}
|
|
1976
|
-
} else if (btn.iconSetting) {
|
|
1977
|
-
icon = createVNode(script, {
|
|
1978
|
-
"iconClass": JSON.parse(btn.iconSetting).icon,
|
|
1979
|
-
"style": {
|
|
1980
|
-
marginRight: mr
|
|
1981
|
-
}
|
|
1982
|
-
}, null);
|
|
1983
|
-
}
|
|
1984
|
-
return [icon];
|
|
1985
|
-
};
|
|
1986
|
-
const getFoldBtnList = (row, index) => {
|
|
1987
|
-
var _a;
|
|
1988
|
-
const getOptions = () => {
|
|
1989
|
-
return row.foldBtnList.map((b, j) => {
|
|
1990
|
-
return {
|
|
1991
|
-
label: `${handleName(b)}${getBtnIcon(b, "0")}`,
|
|
1992
|
-
key: b.sid,
|
|
1993
|
-
props: {
|
|
1994
|
-
onClick: (e) => {
|
|
1995
|
-
clickBtn(row, b, index, e.domEvent);
|
|
1996
|
-
}
|
|
1997
|
-
}
|
|
1998
|
-
};
|
|
1999
|
-
});
|
|
2000
|
-
};
|
|
2001
|
-
return [((_a = row.foldBtnList) == null ? void 0 : _a.length) && createVNode(NDropdown, {
|
|
2002
|
-
"style": {
|
|
2003
|
-
display: !row.__isInlineEditing ? "inline-block" : "none"
|
|
2004
|
-
},
|
|
2005
|
-
"disabled": props.isInlineOperating,
|
|
2006
|
-
"options": getOptions()
|
|
2007
|
-
}, {
|
|
2008
|
-
default: () => [createVNode(NButton, {
|
|
2009
|
-
"size": "small",
|
|
2010
|
-
"style": "margin-left: 8px"
|
|
2011
|
-
}, {
|
|
2012
|
-
default: () => "\u66F4\u591A ..."
|
|
2013
|
-
})]
|
|
2014
|
-
}) || ""];
|
|
2015
|
-
};
|
|
2016
|
-
const switchBtnOnChange = (e, r, i, index) => {
|
|
2017
|
-
emit("switchBtnOnChange", e, r, i, index);
|
|
2018
|
-
};
|
|
2019
|
-
const getBtnLinkSwitch = (row, item, disabled, index) => {
|
|
2020
|
-
let cur = state.isTree !== 0 ? row : props.oldtableData[index];
|
|
2021
|
-
let key = cur[item.columnName];
|
|
2022
|
-
if (typeof key === "string") {
|
|
2023
|
-
if (key && key.startsWith("###{")) {
|
|
2024
|
-
let temp = JSON.parse(key.replace("###", ""));
|
|
2025
|
-
key = temp.tooltip || temp.value;
|
|
2026
|
-
}
|
|
2027
|
-
}
|
|
2028
|
-
return [createVNode(NSwitch, {
|
|
2029
|
-
"value": key == item.btnLinkSwitchDefVal,
|
|
2030
|
-
"disabled": disabled,
|
|
2031
|
-
"onUpdateValue": (e) => switchBtnOnChange(e, row, item, index)
|
|
2032
|
-
}, null)];
|
|
2033
|
-
};
|
|
2034
|
-
const getField = (row, item, index, isLink2) => {
|
|
2035
|
-
const html = formatFieldText(row, item, props.columnConfig.fieldList, props.fieldListOriginal);
|
|
2036
|
-
const content = [isLink2 && html ? createVNode("a", {
|
|
2037
|
-
"onClick": (e) => linkDetail(row, item, index, e),
|
|
2038
|
-
"innerHTML": html
|
|
2039
|
-
}, null) : createVNode("span", {
|
|
2040
|
-
"class": "domPropsInnerHTML-span",
|
|
2041
|
-
"innerHTML": html
|
|
2042
|
-
}, null)];
|
|
2043
|
-
if (isCopy(item, row)) {
|
|
2044
|
-
return [createVNode(NPopover, {
|
|
2045
|
-
"placement": "right",
|
|
2046
|
-
"trigger": "hover",
|
|
2047
|
-
"arrowPointToCenter": true
|
|
2048
|
-
}, {
|
|
2049
|
-
default: () => [{
|
|
2050
|
-
trigger: () => content
|
|
2051
|
-
}, createVNode(NIcon, {
|
|
2052
|
-
"component": CopyOutline,
|
|
2053
|
-
"onClick": (e) => hanldeCopyContent(e, row[item.columnName])
|
|
2054
|
-
}, null)]
|
|
2055
|
-
})];
|
|
2056
|
-
} else {
|
|
2057
|
-
return [content];
|
|
2058
|
-
}
|
|
2059
|
-
};
|
|
2060
|
-
const linkDetail = (row, col, index, e) => {
|
|
2061
|
-
if (props.isInlineOperating)
|
|
2062
|
-
return false;
|
|
2063
|
-
let vxeTable = xGrid.value;
|
|
2064
|
-
e.preventDefault();
|
|
2065
|
-
let isCheckedByCheckboxRow = vxeTable.isCheckedByCheckboxRow(row);
|
|
2066
|
-
if (isCheckedByCheckboxRow) {
|
|
2067
|
-
e.stopPropagation();
|
|
2068
|
-
}
|
|
2069
|
-
vxeTable.setCurrentRow(row);
|
|
2070
|
-
emit("setNestTableClick", props.isNestTable);
|
|
2071
|
-
emit("setCurRowIndex", index);
|
|
2072
|
-
emit("linkDetail", row, col, row[handleRowId.value], null, false, index);
|
|
2073
|
-
};
|
|
2074
|
-
const hanldeCopyContent = (e, value) => {
|
|
2075
|
-
e.preventDefault();
|
|
2076
|
-
e.stopPropagation();
|
|
2077
|
-
emit("hanldeCopyContent", e, value);
|
|
2078
|
-
};
|
|
2079
|
-
const setAllCheckedRows = (rows) => {
|
|
2080
|
-
if (props.isNestTable)
|
|
2081
|
-
return;
|
|
2082
|
-
if (rows && rows.length) {
|
|
2083
|
-
const copy = XEUtils.handleBigArrayCopy(rows);
|
|
2084
|
-
state.checkedRows = Object.freeze(copy);
|
|
2085
|
-
let table = xGrid.value;
|
|
2086
|
-
table.setAllCheckboxRow(true);
|
|
2087
|
-
}
|
|
2088
|
-
};
|
|
2089
|
-
const setTalbeScrollTo = () => {
|
|
2090
|
-
let table = xGrid.value;
|
|
2091
|
-
if (!table)
|
|
2092
|
-
return;
|
|
2093
|
-
table.scrollTo(table.getScroll().scrollLeft, 0);
|
|
2094
|
-
};
|
|
2095
|
-
const submitInlineForm = () => {
|
|
2096
|
-
let error = props.inlineError;
|
|
2097
|
-
if (error) {
|
|
2098
|
-
props.resetEditRowStatus();
|
|
2099
|
-
emit("triggerSpinning", false);
|
|
2100
|
-
return false;
|
|
2101
|
-
}
|
|
2102
|
-
let {
|
|
2103
|
-
formId
|
|
2104
|
-
} = props.listFormUnionSetting;
|
|
2105
|
-
let {
|
|
2106
|
-
id
|
|
2107
|
-
} = props.inlineOriginalTableRow;
|
|
2108
|
-
if (!formId) {
|
|
2109
|
-
console.log("\u7F3A\u5C11formId");
|
|
2110
|
-
emit("triggerSpinning", false);
|
|
2111
|
-
return;
|
|
2112
|
-
}
|
|
2113
|
-
if (state.isSaveForm)
|
|
2114
|
-
return false;
|
|
2115
|
-
state.isSaveForm = true;
|
|
2116
|
-
let params = Object.assign({}, props.inlineFormData, {
|
|
2117
|
-
formId,
|
|
2118
|
-
id,
|
|
2119
|
-
editMode: "row"
|
|
2120
|
-
});
|
|
2121
|
-
params = JSON.parse(JSON.stringify(params));
|
|
2122
|
-
let noChangePrimaryKey = params[handleRowId.value] === addInlineEditPrimaryKey;
|
|
2123
|
-
if (props.isInlineAdding && noChangePrimaryKey) {
|
|
2124
|
-
delete params[handleRowId.value];
|
|
2125
|
-
}
|
|
2126
|
-
props.submitForm(params).then(async ({
|
|
2127
|
-
data
|
|
2128
|
-
}) => {
|
|
2129
|
-
emit("triggerSpinning", false);
|
|
2130
|
-
if (data.result !== "SUCCESS") {
|
|
2131
|
-
state.isSaveForm = false;
|
|
2132
|
-
$message.error(data.resultMsg);
|
|
2133
|
-
props.resetEditRowStatus();
|
|
2134
|
-
return false;
|
|
2135
|
-
}
|
|
2136
|
-
await props.resetInlineEdit();
|
|
2137
|
-
resetOperationRowStatus();
|
|
2138
|
-
emit("pubTableReload");
|
|
2139
|
-
}).finally(() => {
|
|
2140
|
-
state.isSaveForm = false;
|
|
2141
|
-
emit("triggerSpinning", false);
|
|
2142
|
-
props.resetEditRowStatus();
|
|
2143
|
-
});
|
|
2144
|
-
};
|
|
2145
|
-
const handleClickAddBtnByInline = async () => {
|
|
2146
|
-
if (!checkListFormUnionSettingParamsList()) {
|
|
2147
|
-
handleClickCancelBtnByInline();
|
|
2148
|
-
return false;
|
|
2149
|
-
}
|
|
2150
|
-
await props.resetInlineEdit();
|
|
2151
|
-
emit("handleClickBtnByInline", {
|
|
2152
|
-
type: "ADD",
|
|
2153
|
-
listFormUnionSetting: props.listFormUnionSetting,
|
|
2154
|
-
inlineEditFormConfig: props.inlineEditFormConfig
|
|
2155
|
-
});
|
|
2156
|
-
addInlineEditPrimaryKey = Date.now();
|
|
2157
|
-
let formData = {
|
|
2158
|
-
[handleRowId.value]: addInlineEditPrimaryKey,
|
|
2159
|
-
__isInsertRow: true
|
|
2160
|
-
};
|
|
2161
|
-
let {
|
|
2162
|
-
paramsList
|
|
2163
|
-
} = props.listFormUnionSetting;
|
|
2164
|
-
paramsList.forEach((item) => {
|
|
2165
|
-
formData[item.tableField] = void 0;
|
|
2166
|
-
});
|
|
2167
|
-
let vxeTable = xGrid.value;
|
|
2168
|
-
await vxeTable.insert(formData);
|
|
2169
|
-
await vxeTable.loadData([formData]);
|
|
2170
|
-
setAllRowInlineStatus(true);
|
|
2171
|
-
setRowStatus(vxeTable.$el, 0, "66");
|
|
2172
|
-
};
|
|
2173
|
-
const handleClickSaveBtnByInline = () => {
|
|
2174
|
-
if (props.spinning)
|
|
2175
|
-
return false;
|
|
2176
|
-
emit("handleClickBtnByInline", {
|
|
2177
|
-
type: "SAVE"
|
|
2178
|
-
});
|
|
2179
|
-
let formDom = document.querySelectorAll(".js-inlineEditForm");
|
|
2180
|
-
let sliceLen = handleEditFormLength();
|
|
2181
|
-
formDom = [...formDom].slice(0, sliceLen);
|
|
2182
|
-
formDom.forEach((item) => {
|
|
2183
|
-
item.__vue__.handleSubmitForm();
|
|
2184
|
-
});
|
|
2185
|
-
};
|
|
2186
|
-
const removeInlineAddRow = () => {
|
|
2187
|
-
if (!props.isInlineAdding)
|
|
2188
|
-
return false;
|
|
2189
|
-
const vxeTable = xGrid.value;
|
|
2190
|
-
let {
|
|
2191
|
-
tableData
|
|
2192
|
-
} = vxeTable.getTableData();
|
|
2193
|
-
vxeTable.remove(tableData[0]);
|
|
2194
|
-
};
|
|
2195
|
-
watch(() => props.columnConfig, (config) => {
|
|
2196
|
-
nextTick(() => {
|
|
2197
|
-
if (!config || !Object.keys(config).length)
|
|
2198
|
-
return;
|
|
2199
|
-
loadColumn(config);
|
|
2200
|
-
});
|
|
2201
|
-
}, {
|
|
2202
|
-
immediate: true
|
|
2203
|
-
});
|
|
2204
|
-
watch([() => props.data, () => {
|
|
2205
|
-
var _a;
|
|
2206
|
-
return (_a = props.data) == null ? void 0 : _a.length;
|
|
2207
|
-
}], async ([value]) => {
|
|
2208
|
-
await nextTick();
|
|
2209
|
-
loadData(value);
|
|
2210
|
-
}, {
|
|
2211
|
-
immediate: true
|
|
2212
|
-
});
|
|
2213
|
-
watch(() => currentCheckedKeys, (val) => {
|
|
2214
|
-
setVisibleCheckAllWrap(state, props, currentCheckedKeys.value);
|
|
2215
|
-
});
|
|
2216
|
-
watch(() => props.tableDataCache, (val) => {
|
|
2217
|
-
setAllCheckedRows(val);
|
|
2218
|
-
}, {
|
|
2219
|
-
deep: true
|
|
2220
|
-
});
|
|
2221
|
-
watch(() => props.pageVO.pageSize, (val) => {
|
|
2222
|
-
if (props.isNestTable)
|
|
2223
|
-
return;
|
|
2224
|
-
setVisibleCheckAllWrap(state, props, currentCheckedKeys.value);
|
|
2225
|
-
});
|
|
2226
|
-
watch(() => props.pageVO.pageIndex, (val) => {
|
|
2227
|
-
if (props.isNestTable)
|
|
2228
|
-
return;
|
|
2229
|
-
setTalbeScrollTo();
|
|
2230
|
-
});
|
|
2231
|
-
watch(() => props.styleSetting.tableHeight, (val) => {
|
|
2232
|
-
if (props.isNestTable)
|
|
2233
|
-
return;
|
|
2234
|
-
if (Object.keys(props.columnConfig).length > 0) {
|
|
2235
|
-
loadColumn(props.columnConfig);
|
|
2236
|
-
loadData(props.data);
|
|
2237
|
-
setTalbeScrollTo();
|
|
2238
|
-
}
|
|
2239
|
-
});
|
|
2240
|
-
watch(() => props.sysImageSize, (val) => {
|
|
2241
|
-
var _a;
|
|
2242
|
-
const v = ((_a = props.styleSetting) == null ? void 0 : _a.tableHeight) === "table-simple" ? "26" : "22";
|
|
2243
|
-
nextTick(() => {
|
|
2244
|
-
handleTableImageSize(val, "LIST_FIELD_SMALL", v + "px");
|
|
2245
|
-
});
|
|
2246
|
-
}, {
|
|
2247
|
-
deep: true,
|
|
2248
|
-
immediate: true
|
|
2249
|
-
});
|
|
2250
|
-
watch(() => props.inlineEditFormSubmitDone, (val) => {
|
|
2251
|
-
if (!val || props.isNestTable)
|
|
2252
|
-
return;
|
|
2253
|
-
if (state.isTree != 0 || !props.isMatchComponent)
|
|
2254
|
-
return false;
|
|
2255
|
-
if (!checkOperateCurrentTable())
|
|
2256
|
-
return false;
|
|
2257
|
-
submitInlineForm();
|
|
2258
|
-
});
|
|
2259
|
-
watch(() => props.isInlineEditing, (val) => {
|
|
2260
|
-
if (!val || props.isNestTable)
|
|
2261
|
-
return;
|
|
2262
|
-
if (state.isTree != 0 || !props.isMatchComponent)
|
|
2263
|
-
return false;
|
|
2264
|
-
if (!checkOperateCurrentTable())
|
|
2265
|
-
return false;
|
|
2266
|
-
submitInlineForm();
|
|
2267
|
-
});
|
|
2268
|
-
watch(() => props.isInlineAdding, (val) => {
|
|
2269
|
-
if (!val || props.isNestTable)
|
|
2270
|
-
return false;
|
|
2271
|
-
if (state.isTree != 0 || !props.isMatchComponent)
|
|
2272
|
-
return false;
|
|
2273
|
-
if (!checkOperateCurrentTable()) {
|
|
2274
|
-
resetOperationRowStatus();
|
|
2275
|
-
return false;
|
|
2276
|
-
}
|
|
2277
|
-
hideSelectCloumns();
|
|
2278
|
-
handleClickAddBtnByInline();
|
|
2279
|
-
});
|
|
2280
|
-
watch(() => props.isInlineSave, (val) => {
|
|
2281
|
-
if (!val || props.isNestTable)
|
|
2282
|
-
return false;
|
|
2283
|
-
if (state.isTree != 0 || !props.isMatchComponent)
|
|
2284
|
-
return false;
|
|
2285
|
-
if (!checkOperateCurrentTable())
|
|
2286
|
-
return false;
|
|
2287
|
-
handleClickSaveBtnByInline();
|
|
2288
|
-
});
|
|
2289
|
-
watch(() => props.isInlineCancel, (val) => {
|
|
2290
|
-
if (!val || props.isNestTable)
|
|
2291
|
-
return false;
|
|
2292
|
-
if (state.isTree != 0 || !props.isMatchComponent)
|
|
2293
|
-
return false;
|
|
2294
|
-
if (!checkOperateCurrentTable())
|
|
2295
|
-
return false;
|
|
2296
|
-
removeInlineAddRow();
|
|
2297
|
-
handleClickCancelBtnByInline();
|
|
2298
|
-
});
|
|
2299
|
-
watch(() => props.tableRefreshCache, (val, oldVal) => {
|
|
2300
|
-
var _a, _b;
|
|
2301
|
-
if (props.isNestTable)
|
|
2302
|
-
return;
|
|
2303
|
-
const {
|
|
2304
|
-
orgId
|
|
2305
|
-
} = ((_b = (_a = props == null ? void 0 : props.userInfo) == null ? void 0 : _a.map) == null ? void 0 : _b.sysParams) || {};
|
|
2306
|
-
if (val != oldVal && props.tableParams && val[props.tableParams.tableId] && orgId == val[props.tableParams.tableId]) {
|
|
2307
|
-
state.hasRefresh = true;
|
|
2308
|
-
}
|
|
2309
|
-
}, {
|
|
2310
|
-
immediate: true,
|
|
2311
|
-
deep: true
|
|
2312
|
-
});
|
|
2313
|
-
watch(() => props.tableParams.tableId, (val) => {
|
|
2314
|
-
nextTick(() => {
|
|
2315
|
-
if (val && props.tableRefreshCache[val]) {
|
|
2316
|
-
state.hasRefresh = true;
|
|
2317
|
-
}
|
|
2318
|
-
});
|
|
2319
|
-
});
|
|
2320
|
-
const handleMenuClickEvent = (payload) => emit("menuClick", payload);
|
|
2321
|
-
expose({
|
|
2322
|
-
formatData,
|
|
2323
|
-
xGrid,
|
|
2324
|
-
loadColumn,
|
|
2325
|
-
loadData,
|
|
2326
|
-
handleFilterClearAll
|
|
2327
|
-
});
|
|
2328
|
-
return (_ctx, _cache) => {
|
|
2329
|
-
var _a, _b;
|
|
2330
|
-
return openBlock(), createElementBlock(Fragment, null, [state.anchorList.length ? (openBlock(), createBlock(unref(NTabs), {
|
|
2331
|
-
key: 0,
|
|
2332
|
-
type: "line",
|
|
2333
|
-
animated: "",
|
|
2334
|
-
"pane-style": "padding: 0",
|
|
2335
|
-
value: state.anchorValue,
|
|
2336
|
-
"onUpdate:value": [_cache[0] || (_cache[0] = ($event) => state.anchorValue = $event), unref(updateAnchor)]
|
|
2337
|
-
}, {
|
|
2338
|
-
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(props.anchor, (item) => {
|
|
2339
|
-
return openBlock(), createBlock(unref(NTabPane), {
|
|
2340
|
-
name: item.field,
|
|
2341
|
-
tab: item.title,
|
|
2342
|
-
key: item.field
|
|
2343
|
-
}, null, 8, ["name", "tab"]);
|
|
2344
|
-
}), 128))]),
|
|
2345
|
-
_: 1
|
|
2346
|
-
}, 8, ["value", "onUpdate:value"])) : createCommentVNode("v-if", true), createElementVNode("div", {
|
|
2347
|
-
class: normalizeClass(["big-table custom-big-table", {
|
|
2348
|
-
mt: state.hasRefresh,
|
|
2349
|
-
"expand-padding": !props.isNestTable
|
|
2350
|
-
}]),
|
|
2351
|
-
style: normalizeStyle({
|
|
2352
|
-
height: state.tableHeight
|
|
2353
|
-
})
|
|
2354
|
-
}, [state.hasRefresh && !props.isNestTable ? (openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("p", {
|
|
2355
|
-
class: "check-wrap-title"
|
|
2356
|
-
}, [_hoisted_2, createElementVNode("span", {
|
|
2357
|
-
class: "check-wrap-btn",
|
|
2358
|
-
onClick: refreshTable
|
|
2359
|
-
}, "\u70B9\u51FB\u67E5\u770B")])])) : createCommentVNode("v-if", true), createVNode(unref(Grid), mergeProps({
|
|
2360
|
-
ref_key: "xGrid",
|
|
2361
|
-
ref: xGrid,
|
|
2362
|
-
border: "",
|
|
2363
|
-
"show-overflow": "",
|
|
2364
|
-
"show-header-overflow": "",
|
|
2365
|
-
"show-footer-overflow": "title",
|
|
2366
|
-
"keep-source": "",
|
|
2367
|
-
"auto-resize": "",
|
|
2368
|
-
height: props.height ? "auto" : void 0,
|
|
2369
|
-
"cell-style": state.cellStyle
|
|
2370
|
-
}, _ctx.$attrs, {
|
|
2371
|
-
"mouse-config": {
|
|
2372
|
-
selected: ((_a = _ctx.columnConfig.keyboardConfig) == null ? void 0 : _a.isEdit) ? true : false
|
|
2373
|
-
},
|
|
2374
|
-
"tree-config": unref(treeConfig),
|
|
2375
|
-
"row-class-name": getRowClassName,
|
|
2376
|
-
"row-config": {
|
|
2377
|
-
...state.rowConfig,
|
|
2378
|
-
...unref(getAttr)("row-config")
|
|
2379
|
-
},
|
|
2380
|
-
"show-footer": _ctx.showFooter && !props.isInlineOperating,
|
|
2381
|
-
"footer-method": footerMethod,
|
|
2382
|
-
"sort-config": {
|
|
2383
|
-
trigger: "cell",
|
|
2384
|
-
remote: true,
|
|
2385
|
-
...unref(getAttr)("sort-config")
|
|
2386
|
-
},
|
|
2387
|
-
"span-method": spanMethod,
|
|
2388
|
-
"footer-span-method": footerRowspanMethod,
|
|
2389
|
-
"tooltip-config": {
|
|
2390
|
-
enterable: false,
|
|
2391
|
-
...unref(getAttr)("tooltip-config")
|
|
2392
|
-
},
|
|
2393
|
-
"checkbox-config": {
|
|
2394
|
-
checkField: "checked",
|
|
2395
|
-
labelField: "checked",
|
|
2396
|
-
checkMethod: unref(checkMethod),
|
|
2397
|
-
visibleMethod: unref(visibleMethod),
|
|
2398
|
-
trigger: "cell",
|
|
2399
|
-
reserve: true,
|
|
2400
|
-
highlight: true,
|
|
2401
|
-
...unref(getAttr)("checkbox-config")
|
|
2402
|
-
},
|
|
2403
|
-
"radio-config": {
|
|
2404
|
-
checkField: "checked",
|
|
2405
|
-
trigger: "cell",
|
|
2406
|
-
reserve: true,
|
|
2407
|
-
highlight: true,
|
|
2408
|
-
...unref(getAttr)("radio-config")
|
|
2409
|
-
},
|
|
2410
|
-
"scroll-y": {
|
|
2411
|
-
gt: 50,
|
|
2412
|
-
...unref(getAttr)("scroll-y")
|
|
2413
|
-
},
|
|
2414
|
-
"row-style": unref(getRowStyle),
|
|
2415
|
-
"edit-config": state.editConfig,
|
|
2416
|
-
"expand-config": {
|
|
2417
|
-
lazy: true,
|
|
2418
|
-
accordion: _ctx.columnConfig && _ctx.columnConfig.accordion,
|
|
2419
|
-
loadMethod: unref(loadExpandMethod),
|
|
2420
|
-
toggleMethod: unref(toggleExpandMethod),
|
|
2421
|
-
iconOpen: "iconfont icon-a-xitongtubiaozhediejian",
|
|
2422
|
-
iconClose: "iconfont icon-a-xitongtubiaotianjia",
|
|
2423
|
-
...unref(getAttr)("expand-config")
|
|
2424
|
-
},
|
|
2425
|
-
"keyboard-config": unref(keyboardConfig),
|
|
2426
|
-
"edit-rules": _ctx.columnConfig.editRules || {},
|
|
2427
|
-
"menu-config": _ctx.menuConfig,
|
|
2428
|
-
onCellDblclick: rowdblclick,
|
|
2429
|
-
onCellClick: handlerClickRow,
|
|
2430
|
-
onCheckboxChange: selectionChange,
|
|
2431
|
-
onCheckboxAll: selectionChangeAll,
|
|
2432
|
-
onRadioChange: radioOnChange,
|
|
2433
|
-
onSortChange: sortChange,
|
|
2434
|
-
onScroll: unref(scroll),
|
|
2435
|
-
onCellMouseenter: handleCellMouseenter,
|
|
2436
|
-
onKeydown: unref(keyDown),
|
|
2437
|
-
onMenuClick: handleMenuClickEvent,
|
|
2438
|
-
onResizableChange
|
|
2439
|
-
}), {
|
|
2440
|
-
empty: withCtx(() => [state.isShowEmpty ? renderSlot(_ctx.$slots, "empty", {
|
|
2441
|
-
key: 0
|
|
2442
|
-
}, () => [createVNode(NoData, {
|
|
2443
|
-
"no-data-img": props.emptyItems.noDataImg,
|
|
2444
|
-
"no-data-tip": props.emptyItems.noDataTip,
|
|
2445
|
-
"show-img": !props.isNestTable
|
|
2446
|
-
}, null, 8, ["no-data-img", "no-data-tip", "show-img"])]) : createCommentVNode("v-if", true)]),
|
|
2447
|
-
tooltip_footer: withCtx(({
|
|
2448
|
-
column
|
|
2449
|
-
}) => [createCommentVNode(" \u5206\u7EC4\u7EDF\u8BA1 "), _ctx.groupCountFields && _ctx.groupCountFields.length ? (openBlock(), createElementBlock("span", {
|
|
2450
|
-
key: 0,
|
|
2451
|
-
innerHTML: state.groupText
|
|
2452
|
-
}, null, 8, _hoisted_3)) : (openBlock(), createElementBlock(Fragment, {
|
|
2453
|
-
key: 1
|
|
2454
|
-
}, [createCommentVNode(" \u4E00\u822C\u7EDF\u8BA1 "), createVNode(unref(NTooltip), {
|
|
2455
|
-
trigger: "hover"
|
|
2456
|
-
}, {
|
|
2457
|
-
trigger: withCtx(() => [createTextVNode(toDisplayString(getFooterTitle(column)), 1)]),
|
|
2458
|
-
default: withCtx(() => [createElementVNode("div", {
|
|
2459
|
-
innerHTML: getFooterTooltipTitle(column)
|
|
2460
|
-
}, null, 8, _hoisted_4)]),
|
|
2461
|
-
_: 2
|
|
2462
|
-
}, 1024)], 2112))]),
|
|
2463
|
-
nest_table_content: withCtx(({
|
|
2464
|
-
row,
|
|
2465
|
-
rowIndex,
|
|
2466
|
-
$rowIndex,
|
|
2467
|
-
column
|
|
2468
|
-
}) => [renderSlot(_ctx.$slots, "content", {
|
|
2469
|
-
data: {
|
|
2470
|
-
row,
|
|
2471
|
-
rowIndex,
|
|
2472
|
-
$rowIndex,
|
|
2473
|
-
column
|
|
2474
|
-
}
|
|
2475
|
-
})]),
|
|
2476
|
-
_: 3
|
|
2477
|
-
}, 16, ["height", "cell-style", "mouse-config", "tree-config", "row-config", "show-footer", "sort-config", "tooltip-config", "checkbox-config", "radio-config", "scroll-y", "row-style", "edit-config", "expand-config", "keyboard-config", "edit-rules", "menu-config", "onScroll", "onKeydown"]), createCommentVNode(" `${refreshRow}\u6761\u66F4\u65B0` "), withDirectives(createElementVNode("div", {
|
|
2478
|
-
class: "refresh",
|
|
2479
|
-
onClick: hanldeClickRefresh
|
|
2480
|
-
}, [createVNode(unref(NIcon), {
|
|
2481
|
-
size: "14",
|
|
2482
|
-
component: unref(SyncOutline)
|
|
2483
|
-
}, null, 8, ["component"]), createElementVNode("p", _hoisted_5, toDisplayString(_ctx.refreshRow) + "\u6761\u66F4\u65B0", 1)], 512), [[vShow, props.refreshRow > 0 && !props.isNestTable]])], 6), ((_b = props.totalList) == null ? void 0 : _b.length) ? (openBlock(), createElementBlock("div", _hoisted_6, [(openBlock(true), createElementBlock(Fragment, null, renderList(props.totalList, (item, index) => {
|
|
2484
|
-
return openBlock(), createElementBlock("div", {
|
|
2485
|
-
class: "big-table-total-item",
|
|
2486
|
-
key: index
|
|
2487
|
-
}, [createElementVNode("span", _hoisted_7, toDisplayString(item.title) + ":", 1), createElementVNode("div", _hoisted_8, [(openBlock(true), createElementBlock(Fragment, null, renderList(item.data, (price, i) => {
|
|
2488
|
-
return openBlock(), createElementBlock("div", {
|
|
2489
|
-
class: "right-item",
|
|
2490
|
-
key: i
|
|
2491
|
-
}, [createTextVNode(toDisplayString(price.name) + ": ", 1), createElementVNode("span", null, toDisplayString(price.value), 1)]);
|
|
2492
|
-
}), 128))])]);
|
|
2493
|
-
}), 128))])) : createCommentVNode("v-if", true)], 64);
|
|
2494
|
-
};
|
|
2495
|
-
}
|
|
2496
|
-
});
|
|
2497
|
-
|
|
2498
|
-
export { _sfc_main as default };
|
|
1
|
+
import{defineComponent as e,ref as t,reactive as l,useAttrs as i,computed as n,onMounted as o,onUnmounted as r,onActivated as a,nextTick as s,createVNode as c,h as d,resolveComponent as u,Teleport as h,createTextVNode as p,watch as g,openBlock as m,createElementBlock as f,Fragment as b,createBlock as v,unref as C,withCtx as w,renderList as T,createCommentVNode as y,createElementVNode as k,normalizeClass as x,normalizeStyle as S,mergeProps as N,renderSlot as E,toDisplayString as R,withDirectives as I,vShow as O,isVNode as F}from"vue";import{isFunction as L,isArray as A}from"lodash-es";import D from"./bigTableState.js";import _ from"./bigTableProps.js";import M from"./bigTableEmits.js";import{useAnchor as P}from"./hooks/useAnchor.js";import{comps as j,useEdit as B}from"./hooks/useEdit.js";import{useFormat as V}from"./hooks/useFormat.js";import{useTableParse as z}from"./hooks/useTableParse.js";import{useBatchEditing as K}from"./hooks/useBatchEditing.js";import{useNestTable as $}from"./hooks/useNestTable.js";import{useEvent as U}from"./hooks/useEvent.js";import{useAnnotation as H}from"./hooks/useAnnotation.js";import{useSeparateRow as q,useSeparateMap as W}from"./hooks/useSeparateRow.js";import{SettingsSharp as J,FilterSharp as G,CreateOutline as Z,CaretDown as Q,CaretForward as X,CopyOutline as Y,SyncOutline as ee}from"@vicons/ionicons5";import te from"./components/NoData.vue.js";import le from"../../../shared/components/SvgIcon/SvgIcon.vue.js";import{useMessage as ie,NIcon as ne,NTooltip as oe,NCheckbox as re,NCheckboxGroup as ae,NGrid as se,NGi as ce,NButton as de,NPopconfirm as ue,NProgress as he,NDropdown as pe,NSwitch as ge,NPopover as me,NTabs as fe,NTabPane as be}from"naive-ui";import ve from"../../grid/index.js";import Ce from"xe-utils";import"moment";import{handleTableHeight as we,setTableConfig as Te,handleGroupColums as ye,treeToList as ke,checkMethod as xe,setTreeGroupTitle as Se,isFilterItem as Ne,handleName as Ee,generateEditRender as Re,handlerInitSearchItem as Ie,getEvaluate as Oe,getMapVal as Fe,getCandidateComponents as Le,getageShowType as Ae,isLink as De,showFilter as _e,reScrollFilterWrap as Me,hideFilterWrap as Pe,mergeConObjFn as je,setDefaultFormData as Be,handleImgArr as Ve,handleImgSrc as ze,modalDetailImage as Ke,handleQrCodeContent as $e,getInlineEditBtn as Ue,isCopy as He,setVisibleCheckAllWrap as qe,handleTableImageSize as We,visibleMethod as Je,getRowStyle as Ge,getFooterGroup as Ze,flattenRow as Qe,intersectRow as Xe,removeCheckedDisabledRows as Ye}from"./utils.js";import et from"./components/input-button.vue.js";import tt from"./components/separate.vue.js";import lt from"../../../shared/assets/img/xb_big.png.js";import it from"../../../shared/assets/img/qr.png.js";const nt={key:0,class:"check-wrap"},ot=k("span",null,"系统检测到有数据更新,",-1),rt=["innerHTML"],at=["innerHTML"],st={class:"refresh-row"},ct={key:1,class:"big-table-total"},dt={class:"left"},ut={class:"right"};var ht=e({__name:"BigTable",props:_,emits:M,setup(e,{expose:_,emit:M}){const ht=e;let pt=null,gt=[],mt="";const ft="group-show-title",bt=et,vt=ie(),Ct=t({}),wt=Ce.clone(D,!0),Tt=l(wt),yt=i(),{formatData:kt,htmlToText:xt,getBtnStyle:St,getAttr:Nt}=V(Tt,yt),{imgs2imgArr:Et,parseDurationValue:Rt,parseCombinationValue:It,formatFieldText:Ot}=z(kt),{allSelectedLength:Ft,checkOperateCurrentTable:Lt,setRowStatus:At,resetBatchOperationRowStatus:Dt,checkListFormUnionSettingParamsList:_t,handleClickCancelBtnByInline:Mt,setAllRowInlineStatus:Pt,hideSelectCloumns:jt,handleEditFormLength:Bt,resetOperationRowStatus:Vt,recordClickBtnInfo:zt,getInlineOpreateRow:Kt}=K(ht,Tt,M,Ct),{deleteRow:$t,onFormChange:Ut,getDefaultValue:Ht}=B(ht,Tt,M,Ct,Cl),{isAboutNestTable:qt,isExpandTable:Wt,handleRowId:Jt,toggleExpandMethod:Gt,loadExpandMethod:Zt,nestHandleClickRow:Qt}=$(ht,Tt,M),{initAnchor:Xt,updateAnchor:Yt,anchorEvent:el}=P(ht,Tt,M,Ct),{keyDown:tl,scroll:ll}=U(ht,Tt,M,Ct,el),il=n((()=>{var e;return(null==(e=Tt.checkedRows)?void 0:e.map((e=>e[ht.primaryKey])))||[]}));n((()=>{let e=Tt.currentPageSelectedLength===Tt.curAbleCheckedLen,t=il.value.length===ht.maxCheckSize,l=il.value.length===ht.pageVO.total;return t||!e||l}));const nl=n((()=>{const e=il.value||[];return 1==e.length?e[0]:""})),ol=n((()=>{var e;let{noSetting:t}=Vl();return t||(null==(e=ht.showSettings)?void 0:e.hideSettingBtn)})),rl=n((()=>{var e;return null==(e=ht.columnConfig)?void 0:e.isScanMultiTable})),al=n((()=>({userInfo:ht.userInfo||{},sysImageSize:ht.sysImageSize||{}}))),sl=n((()=>{let e=Nt("tree-config"),{isTransform:t}=ht.tableParams,l=Number(Tt.isTree);return[1,3].includes(l)?(e=Object.assign({},{children:"childrenList",accordion:Tt.openOnly>0,reserve:!0},e),t&&(Reflect.deleteProperty(e,"children"),Object.assign(e,{rowField:"qianduan_id",parentField:"qianduan_parent_id",transform:!0}))):2==l&&(e=Object.assign({},{lazy:!0,reserve:!0,children:"childrenList",hasChild:"hasChildren",loadMethod:Ul,accordion:Tt.openOnly>0},e)),e})),cl=n((()=>({editMethod({row:e,column:t}){Ct.value.setEditCell(e,t)},...ht.columnConfig.keyboardConfig||{}}))),dl=e=>{const t=e.path||e.composedPath&&e.composedPath();var l;(l="big-table-filter-wrap",!t.some((e=>e.className&&e.className.includes&&e.className.includes(l))))&&Pe(Tt,ht)},ul=()=>{pt=dl.bind(this),window.document.addEventListener("click",pt,!0)};o((()=>{ul(),Tt.tableHeight=we(Tt,ht)||"auto",ht.isNestTable&&(pl(ht.columnConfig),Cl(ht.data))})),r((()=>{window.document.removeEventListener("click",pt,!0)})),a((()=>{hl()}));const hl=async()=>{var e;if(0!=Tt.isTree)return!1;const t=Ct.value;let{tableData:l}=t.getTableData();l&&l.length&&l.forEach((e=>{(null==e?void 0:e.__isInsertRow)&&t.remove(e)})),(null==(e=Tt.originFormatList)?void 0:e.length)&&(await t.loadData(Tt.originFormatList),Dt())},pl=e=>{Te(e,Tt);let t=kl(e);t=ye(t,ht),Ct.value&&Ct.value.reloadColumn(t),s((()=>{Xt()})),Ml()},{separate:gl,onColumnResize:ml,separateHandle:fl,separateDataMap:bl}=q((()=>{var e,t;return null!=(t=null==(e=ht.columnConfig)?void 0:e.fieldList)?t:[]}),Jl,(e=>{var t,l;return null==(l=null==(t=ht.columnConfig)?void 0:t.fieldList)?void 0:l.find((t=>t.columnName===e))}),Ct),vl=e=>{ml(e),M("resizableChange",e)};async function Cl(e){Tt.isShowEmpty=!(null==e?void 0:e.length);let t=e,{isTransform:l}=ht.tableParams;l&&[1,3].includes(Number(Tt.isTree))&&(t=ke(e));let i=Ct.value;i&&(Tt.checkedRows=[],Tt.originFormatList=t,wl(t),Tt.curAbleCheckedLen=t.filter((e=>xe({row:e}))).length,ht.isNestTable||await bi(),await i.loadData(await gl(t,e)),Tl(),Ml())}fl.clear(),fl.add((()=>Cl(ht.data)));const wl=e=>{var t;if(3!=Tt.isTree)return;let l=null==(t=Ct.value.getTableColumn().tableColumn)?void 0:t.find((e=>!!e.property)),i=(null==l?void 0:l.property)||"";Se(e,i,ft)},Tl=()=>{var e;let t=Ct.value;if(!t)return;let l=(null==(e=t.getTableData())?void 0:e.tableData).filter((e=>ht.primaryKey?il.value.includes(e[ht.primaryKey]):e.checked));yl(),l&&l.length?t.setCheckboxRow(l,!0):t.setAllCheckboxRow(!1)},yl=()=>{let e=Ct.value.getTableData().fullData.filter((e=>il.value.includes(e[ht.primaryKey])||e.checked));Tt.currentPageSelectedLength=e.length},kl=e=>{var t,l,i;let{selectType:n}=Vl(),{isBatchSelect:o,fieldList:r=[],showButtonTop:a,isScanMultiTable:s,isEdit:d=!1,editConfig:u={},rowConfig:h={},showSeq:p=!0,seqWidth:g=34,checkboxConfig:m={}}=e;d&&(Object.assign(Tt.editConfig,u),Tt.rowConfig.height=48),Object.assign(Tt.rowConfig,h),Tt.rowConfig.keyField=Jt.value,n&&(o=1),n=n||"checkbox";let{listType:f}=ht.tableOptions;"scanList"==f&&(n="radio"),Tt.selectType=n;let b=(null==(t=ht.styleSetting)?void 0:t.tableHeight)||"table-simple",v=Tt.checkWidth[b]||"30";const C={default:e=>xe(e)?null:c(oe,{placement:"right",trigger:"hover"},{default:()=>e.row.forbiddenBatchSelectReason,trigger:()=>c("i",{class:"disabled-checked-tips"},null)})};let w=1==o&&!ht.isNestTable&&!s||!1,T=[{fixed:"left",align:"center",visible:s||!1,width:"60",slots:{header:()=>"操作",default:hi}},{type:"seq",fixed:ht.isNestTable?"":"left",align:"center",visible:p,resizable:!0,width:g,showOverflow:!0,slots:{header:()=>[ol.value?null:c(ne,{size:"14",color:"#777",component:J,onClick:()=>ai()},null)]}},{type:n,fixed:ht.isNestTable?"":"left",align:"center",visible:w,resizable:!1,width:v,slots:"checkbox"!==n||(null==(l=Nt("checkbox-config"))?void 0:l.checkMethod)?null:C,showOverflow:!0,...m}];const y=T.find((e=>"seq"==e.type));(null==(i=null==ht?void 0:ht.columnConfig)?void 0:i.seqSlotFn)&&(y.slots.default=e=>{var t;return null==(t=ht.columnConfig)?void 0:t.seqSlotFn(e)});const k=r.map(((e,t)=>{var l,i,n,o,r,c,u,h,p;let g=!1,m=!1,f=[];try{const t=JSON.parse(e.fieldSetting||"{}");g=1!=((null==t?void 0:t.notParticipatingSearch)||"")&&"manual"===(null==(l=null==t?void 0:t.mapping)?void 0:l.type)&&1!=e.isMerge,f=null==(n=null==(i=null==t?void 0:t.mapping)?void 0:i.mappingFiled)?void 0:n.map((e=>e.value[0])),Ne(e)&&(m=g=!0,f=null==(o=e.options)?void 0:o.map((e=>({...e,key:e.label}))))}catch(e){}let b=(null==(r=null==e?void 0:e.fieldSetting)?void 0:r.notParticipatingSort)||"",v=qt.value?"":e.isFixed?1==e.isFixed?"left":"right":"",C=!ht.isNestTable&&(!g&&1==e.isSort&&1!=b&&1!=e.isMerge),w=!ht.isNestTable&&(0!=Tt.isTree&&0===t),T=0===t&&ht.showNestTable?"expand":"";const y=1==e.isShow&&1!=(null==(c=null==e?void 0:e.settingObj)?void 0:c.isHide);s&&(v="",C=!1,w=!1,T="");const k=Object.assign(e,{visible:"operatorColumn"==e.columnName?0==a:y,field:e.columnName,title:Ee(e,"title"),minWidth:e.colWidth,fixed:v,sortable:C,headerClassName:"mycolumn",resizable:null==(u=e.resizable)||u,showOverflow:null!=(h=e.showOverflow)?h:"title",treeNode:w,type:T,className:e.bold?"big-table__boldCell":"",slots:{edit:t=>Sl(t,e),default:t=>{const l=d&&e.isEdit;return Nl(t,e,l)}},editRender:d&&e.isEdit?{}:Re(e)});if(!g||ht.isNestTable||s)k.slots.header=jl(e);else{Tt.filterFields[e.columnName]=Object.assign({},Ce.clone({...e,setting:e.settingObj||{}},!0),{visible:!1,left:"initial",right:"initial",top:"initial",indeterminate:!1,checkAll:!1,searchFilterText:"",searchFilterCONVERT:[],filterSort:"",filterItems:f});let t=Tt.filterFields[e.columnName];Ie([t],m),k.slots.header=El(e)}return s||L(yt.footerMethod)||L(yt["footer-method"])||(k.slots.footer="tooltip_footer"),ht.showNestTable&&0==Tt.isTree&&0==(null==(p=ht.curNestColumnConfig)?void 0:p.isTree)&&(k.slots.content="nest_table_content"),k}));return T.push(...k),Tt.columnLen=k.filter((e=>e.visible)).length,T},{getRowData:xl}=W(),Sl=(e,t)=>{var l,i;let{row:n,column:o,$rowIndex:r,rowIndex:a}=e,s=o.formType||t.formType||"",c=o.formatMap||t.formatMap||null;if(!s)return null;if("custom"===s&&t.slotFn)return t.slotFn(e);const u=j[s]||"";if(!u)return null;const h={col:t,row:n,index:null!=(i=null==(l=xl(n))?void 0:l.index)?i:r,type:s,...t.componentProps||{},onFormChange:Ut,onClick:()=>{M("formClick",{value:n[t.columnName],row:n,column:t,index:r})},editTrigger:Tt.editConfig.trigger};return["date","time"].includes(s)?h.formattedValue=n[t.columnName]||void 0:h.value=c?n[c.value]:n[t.columnName],"select"===s&&(h.onSetOptions=e=>n[`${t.columnName}_options`]=e),d(u,h)},Nl=(e,t,l)=>{var i,n,o;let{row:r,column:a,$rowIndex:s}=e,d=(null==t?void 0:t.attrType)||"";if("separate"===t.formType){return c(tt,{row:e.row,col:t},null)}if(l)return(null==(i=t.checkEditStatus)?void 0:i.call(t,e))?Sl(e,t):c("span",null,[Ht(e,t)]);let h=pi(r,a,s);if(h){if(gi(h,r,a))return M("setWaitEditKeys",a.property),null}if("custom"===d&&t.slotFn)return t.slotFn(e);if(Ce.has(r,ft))return r[ft];if("PICTURE"==d||"HEADPORTRAIT"==d)return vi(r,t,d);if("COLOR"==d)return Ci(r,t);if("EVALUATE"==d)return Oe(r,t);if("MAP"==d)return Fe(r,t);if("DATE"==d||"TASKDATE"==d)return wi(r,t);if("PERCENTAGE"==d)return Ti(r,t);if("VIDEO"==d)return yi(r,t);if("CANDIDATE_COMPONENTS"==d)return Le(r,t);if("AGE"==d)return Ae(r,t);if("COUNTDOWN"===d)return c(oe,null,{trigger:()=>c("span",{innerHTML:r[t.columnName+"_countdown"]||""},null),default:()=>r[t.columnName+"_countdownTip"]});if("DURATION"===d){const e=r[t.columnName],l=null==(n=null==t?void 0:t.fieldSetting)?void 0:n.duration;return Rt(e,l)}if("COMBINATION"===d){const e=r[t.columnName],l=t.fieldSetting||{},i=It(e,l);return i?[c("span",{title:i},[i])]:""}if("PASSWORD"===d){const e=r[t.columnName];return[c(u("password-com"),{value:e,styleSetting:ht.styleSetting},null)]}if("QR_CODE"===d)return ki(r,t);if("operatorColumn"===a.property){if("custom"===(null==t?void 0:t.formType)&&t.slotFn&&!r.initRow)return t.slotFn(r,t,s);if(ht.columnConfig.isEdit&&!r.initRow)return((e,t,l)=>{var i;return null==(i=t.tileBtnList)?void 0:i.map((i=>"DELETE"===i.settingObj[0].trigger_type?c(ue,{onPositiveClick:()=>$t(e,t,l)},{trigger:()=>c(de,{color:i.settingObj[0].color||"#999",text:!0},{default:()=>[i.name]}),default:()=>"是否确认删除?"}):null))})(r,t,s);if(0!=Tt.showButtonTop||ht.isBatchEditing)return;const e=Si(r),l=Ni(r,s),i=Ii(r,s);return[c("span",null,[l,i,e])]}if(De(ht,t,r)&&!rl.value){if(t.btnLinkSwitch){let e=!1,l=null==(o=r.btnList)?void 0:o.find((e=>e.name==t.columnName));return l&&"authorizedMark"in l&&(l.authorizedMark||(e=!0)),Oi(r,t,e,s)}return Fi(r,t,s,!0)}return Fi(r,t,s,!1)},El=e=>{let t=Tt.filterFields[e.columnName];console.log(t);return()=>{let l;return[c("div",{class:"filter-box"},[jl(e,"format"),c(ne,{component:G,color:t.visible||t.filterSort?"#5585f5":"#35393c",onClick:l=>_e(t,e.columnName,l,ht,Tt)},null),t.visible?c(h,{to:ht.filterDomPortal},{default:()=>[c("div",{class:"big-table-filter-wrap",style:{left:t.left,right:t.right,top:t.top,width:Tt.filterWidth+Tt.distance+"px"}},[c("div",{class:"sort-list",style:{display:t.isSort?"block":"none"}},[c("div",{class:["sort-item",{active:"asc"===t.filterSort}],onClick:()=>Rl("asc",t)},[c("i",{class:"sort-icon sort-icon-asc"},null),c("span",{class:"sort-text"},[p("升序 A to Z")])]),c("div",{class:["sort-item",{active:"desc"===t.filterSort}],onClick:()=>Rl("desc",t)},[c("i",{class:"sort-icon sort-icon-asc"},null),c("span",{class:"sort-text"},[p("降序 Z to A")])])]),c("div",{class:"filter-header"},[c("i",{class:"filter-header-icon vxe-filter--btn vxe-icon--funnel"},null),c("span",{class:"filter-header-text"},[p("筛选")])]),t.filterItems.length>5?c("div",{class:"checkbox-wrap checkbox-wrap--search"},[c("div",{class:"check-search-wrap"},[c(bt,{onTrigger:e=>Il(e,t)},null)])]):"",c("div",{class:"checkbox-box"},[c("div",{class:"checkbox-wrap js-checkbox-wrap",style:{height:Tt.filterHeight+Tt.distance+"px"}},[t.searchFilterText?"":c("div",{class:"sort-item"},[c(re,{indeterminate:t.indeterminate,checked:t.checkAll,"onUpdate:checked":e=>{Ol(e,t)}},{default:()=>[p("全选")]})]),c(ae,{value:t.searchFilterText?t.searchFilterCONVERT:t.CONVERT,"onUpdate:value":l=>t.searchFilterText?Ll(l,e.columnName,t):Fl(l,e.columnName,t)},{default:()=>{return[c(se,{cols:1},(e=l=(t.searchFilterText?t.filterItems.filter((e=>t.searchFilterText?new RegExp(t.searchFilterText).test(e.key):e)):t.filterItems).map((e=>c(ce,{class:"sort-item"},{default:()=>[c(re,{value:e.value,label:e.key},null)]}))),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!F(e)?l:{default:()=>[l]}))];var e}})])]),c("div",{class:"checkbox-btn-wrap",style:{justifyContent:t.CONVERT.length?"space-between":"flex-end"}},[t.CONVERT.length?c("div",{class:"checkbox-btn-status"},[c("span",null,[p("已选择"),t.CONVERT.length,p("项")]),c(de,{class:"checkbox-btn checkbox-btn-clear",text:!0,onClick:()=>Al(e.columnName)},{default:()=>[p("清空")]})]):null,c("div",null,[c(de,{size:"small",class:"checkbox-btn",onClick:()=>Dl()},{default:()=>[p("取消")]}),c(de,{size:"small",class:"checkbox-btn",type:"primary",onClick:()=>_l(t)},{default:()=>[p("确定")]})])]),c("div",{class:"arrows-icon"},null)])]}):""])]}},Rl=(e,t)=>{t.filterSort===e?e=null:Ct.value.clearSort(),t.filterSort=e,M("sortChange",{prop:t.columnName,order:e,column:t})},Il=(e,t)=>{if(t.searchFilterText=e,""===e)return t.checkAll=t.CONVERT.length===t.filterItems.length,void(t.indeterminate=!!t.CONVERT.length&&t.CONVERT.length!==t.filterItems.length);t.searchFilterCONVERT=t.filterItems.filter((e=>t.searchFilterText===e.key&&t.CONVERT.includes(e.value))).map((e=>e.value)),gt=t.searchFilterCONVERT},Ol=(e,t)=>{Me();let l=e;t.indeterminate=!1,t.checkAll=l,Tt.filterFields[t.columnName].CONVERT=l?t.filterItems.map((e=>e.value)):[]},Fl=(e,t,l)=>{Me(),l.CONVERT=e,l.checkAll=e.length===l.filterItems.length,l.indeterminate=!!e.length&&e.length!==l.filterItems.length},Ll=(e,t,l)=>{if(Me(),gt.length<e.length){let l=e.filter((e=>!gt.includes(e)));Tt.filterFields[t].CONVERT.push(...l)}else{let l=gt.filter((t=>!e.includes(t)));Tt.filterFields[t].CONVERT=Tt.filterFields[t].CONVERT.filter((e=>!l.includes(e)))}l.searchFilterCONVERT=e,gt=Ce.clone(e,!0)},Al=e=>{const t=Tt.filterFields[e];if(!t)return!1;t.indeterminate=!1,t.checkAll=!1,Tt.filterFields[t.columnName].CONVERT=[],t.searchFilterCONVERT&&(Tt.filterFields[t.columnName].searchFilterCONVERT=[]),_l(t)},Dl=()=>{Pe(Tt,ht)};const _l=e=>{let t=je(Tt,ht);var l,i;l=Tt.filterFields,A((i=ht).quickSearchConfig)&&(i.quickSearchConfig.length=0,Object.entries(l).forEach((([e,t])=>{i.quickSearchConfig.push({field_key:e,value:t.CONVERT||[]})}))),M("onSave",t,!1,[],[],{isBigTable:!0}),e.visible=!1},Ml=()=>{var e,t;if(!1===(null==(e=Nt("tree-config"))?void 0:e.expandAll))return;const l=null==(t=Ct.value)?void 0:t.getData();Tt.total=0,function e(t){var l;for(let i=0,n=t.length;i<n;i++)Tt.total++,(null==(l=t[i].childrenList)?void 0:l.length)>0&&e(t[i].childrenList)}(l);let i=1==Tt.isTree&&Tt.total<1001;if(3==Tt.isTree||i){let e=Ct.value;s((()=>{e.setAllTreeExpand(!0),1==Tt.isTree&&(Tt.isExpand=!0)}))}},{renderAnnotation:Pl}=H(ht),jl=(e,t)=>{var l;let i=e.formTitle||e.alias||e.title;return e.alias,"guage"==(null==(l=ht.tableOptions)?void 0:l.dataSourceType)&&(e.alias||e.title),L(e.headerSlotFn)?()=>e.headerSlotFn(e):"format"===t?[e.isEdit&&!ht.columnConfig.noEditIcon?c(ne,{component:Z,class:"is-edit"},null):null,c("span",{class:"header-title-span"},[i]),Pl(e)]:()=>[e.treeNode&&1==Tt.isTree&&!ht.columnConfig.noExpandIcon?c(ne,{component:Tt.isExpand&&Tt.total<1001?Q:X,onClick:e=>Bl(e,Tt.isExpand)},null):null,e.isEdit&&!ht.columnConfig.noEditIcon?c(ne,{component:Z,class:"is-edit"},null):null,c("span",{class:"header-title-span"},[i]),Pl(e)]},Bl=(e,t)=>{e.preventDefault(),e.stopPropagation();let l=Ct.value;Tt.total>1e3?vt.warning("当前数据量超过1000条,无法全部展开!"):(Tt.isExpand=!t,t?l.clearTreeExpand():(M("triggerSpinning",!0),setTimeout((()=>{l.setAllTreeExpand(!0).then((()=>{M("triggerSpinning",!1)}))}),100)))};function Vl(){let e=(null==yt?void 0:yt.tableOptions)||ht.tableOptions||{};return(null==e?void 0:e.config)||{}}const zl=()=>{Tt.hasRefresh=!1,M("refreshTable")},Kl=e=>{const{rowClassName:t=null}=ht.columnConfig;if(t)return Ce.isFunction(t)?t(e):t;return"checkbox"===Tt.selectType?(()=>{const{row:t,$rowIndex:l,rowIndex:i}=e,n=nl.value;return n&&n===t[ht.primaryKey]?"single--checked":""})():null},$l=e=>{const{columns:t,data:l}=e;if(L(yt.footerMethod))return yt.spanMethod($l);if(L(yt["footer-method"]))return yt["footer-method"](e);if(!ht.groupCountFields||!ht.groupCountFields.length)return[t.map(((e,t)=>null))];let i=Ze(t,l,ht),n=t.map(((e,t)=>0===t?null:1===t?i:null));return M("setGroupText",i),Tt.groupText=i,[n]},Ul=({row:e})=>{const t=t=>{const l="checkbox"==Tt.selectType&&e.checked&&t.findIndex((e=>!xe({row:e})))>=0;l&&(l&&(e.checked=!1),setTimeout((()=>{var t;null==(t=Ct.value)||t.setCheckboxRow(e,!0)}),0))};if(2==Tt.isTree){const{tableId:l,page:i,pageSize:n,autograph:o,isTreeOrList:r}=ht.tableParams;return e[ht.primaryKey],Hl().then((({data:e})=>{if("SUCCESS"==e.result){let l=JSON.parse(JSON.stringify(e.map.rows)),{fieldList:i,btnList:n,showButtonTop:o}=ht.columnConfig,r=kt({tableList:e.map.rows,fieldList:i,btnList:n,showButtonTop:o});return r=ql(r),M("refreshOldTableData",l),t(r),r}}))}return t(e.childrenList),Promise.resolve(e.childrenList)},Hl=e=>Promise.resolve(),ql=e=>e.map((e=>{if(e.checked=e.checked||!1,2==Tt.isTree){const t=Tt.levelLazyLoadSetting.childCountKey,{isTreeOrList:l=""}=ht.tableParams;t&&Number(e[t])>0&&"LIST"!=l&&(e.hasChildren=!0)}return e.childrenList&&e.childrenList.length&&(e.childrenList=ql(e.childrenList)),Object.keys(e).map((t=>{e[t]&&"string"==typeof e[t]&&-1!==e[t].indexOf("<p")&&-1===t.indexOf("_temp_"+e.id)&&(e[t+"_temp_"+e.id]=e[t]||"",e[t]=xt(e[t]))})),e.checked&&Tt.checkedRows.push(e),{...e}}));function Wl(e){const{row:t,column:l,rowIndex:i}=e;if(t.$__SEPARATE&&bl.value.has(t)){const{rawRow:e}=bl.value.get(t),{colspans:i}=bl.value.get(e)||{};if(i){const e=i[l.field];if(0===e)return{colspan:0,rowspan:0};if(e>1)return{rowspan:1,colspan:e}}}return Jl(e)}function Jl(e){var t;const l={rowspan:1,colspan:1},{row:i,column:n}=e;if(L(yt.spanMethod))return yt.spanMethod(e);if(L(yt["span-method"]))return yt["span-method"](e);if(3!=Tt.isTree)return l;const o=Ct.value;if(!o)return l;const{tableColumn:r=[]}=(null==o?void 0:o.getTableColumn())||{},a=r.findIndex((e=>!!e.property)),s=r.filter((e=>"right"===e.fixed)).length,c=r.length-a-s,d=i.childrenList&&i.childrenList.length,u=(null==(t=ht.tableParams)?void 0:t.isTransform)&&!i.qianduan_parent_id;return d||u?n.treeNode?{rowspan:1,colspan:c}:n.property&&"right"!==n.fixed?{rowspan:0,colspan:0}:l:void 0}const Gl=e=>{if(!ht.groupCountFields||!ht.groupCountFields.length)return{rowspan:1,colspan:1};let{$rowIndex:t,_columnIndex:l}=e,i=Tt.columnLen||99,{isBatchSelect:n}=ht.columnConfig;return 0===t?1==n?0===l?{rowspan:1,colspan:2}:1===l?{rowspan:1,colspan:0}:2===l?{rowspan:1,colspan:i}:{rowspan:1,colspan:0}:0===l?{rowspan:1,colspan:1}:1===l?{rowspan:1,colspan:i}:{rowspan:1,colspan:0}:void 0},Zl=({row:e,column:t})=>!rl.value&&!ht.isInlineOperating&&(!Ce.has(e,ft)&&(M("setNestTableClick",ht.isNestTable),void M("rowdblclick",e,t,!0,!0))),Ql=(e=[])=>{Tt.treeTableLength=e.filter((e=>!Ce.has(e,ft))).length,Tt.visibleTreeCheck=e.length>1,M("selectionChange",e)},Xl=(e,t=!1)=>{let l={isUpdate:!0,updateRows:e,isTree:t};t&&Object.assign(l,{isTree:t,isCheckedChange:!0,checkedRows:Tt.checkedRows}),M("selectionChangeLocal",l)},Yl=(e,t)=>{Ye(Tt);let l=Tt.checkedRows,i=[];for(let t=0;t<e.length;t++){let l=e[t],n=il.value.findIndex((e=>e===l[ht.primaryKey]));n>=0&&i.push(n)}i.sort(((e,t)=>t-e)),M("selectionChangeLocal",{isAdd:!1,isCheckedChange:t,needRemoveIndexs:i,newCheckedRows:[],checkedRows:l})},ei=e=>{var t,l,i;let{row:n,$event:o={},$rowIndex:r,triggerCheckbox:a}=e;if((null==(t=Nt("checkbox-config"))?void 0:t.noTriggerCellClick)&&a)return!1;if("default"===(null==(l=Nt("checkbox-config"))?void 0:l.trigger))return M("handlerClickRow",n,r),!1;if(rl.value||ht.isInlineOperating)return!1;if(Ce.has(null==e?void 0:e.row,ft))return!1;if(Tt.isTriggerSelectionChange&&0==Tt.isTree)return!1;let s=Ct.value;qt.value&&M("resetNestLastClickTable",s);let{className:c,tagName:d}=o.target||{};if("INPUT"==d||"svg"==d||"path"==d)return;if(c&&Ce.isString(c)){if(c.includes("n-input")||c.includes("n-base-selection-label"))return;if(c.includes("vxe-table--expand-btn"))return}if(qt.value&&M("setNestLastClickTable",s,ht.isNestTable,n[Jt.value],n),M("setNestTableClick",!1),ht.isNestTable)return null==s||s.setAllCheckboxRow(!1),void Qt(s,e);const u=null==(i=Nt("checkbox-config"))?void 0:i.batchSelect;let h=!xe(e);if("checkbox"==Tt.selectType&&!u&&(h||e.row.$__SEPARATE)){null==s||s.setAllCheckboxRow(!1);const e="single--checked"==Kl({row:n}),t=e?[n]:[];return Tt.checkedRows=t,Ql(t),M("handlerClickRow",n,r),void M("checkboxChange",{checked:e,row:n,index:r,records:[n]})}Tt.visibleCheckAllWrap=!1,Tt.visibleCheckAllWrapMore=!1;let p=!1;p="radio"==Tt.selectType?s.isCheckedByRadioRow(n):s.isCheckedByCheckboxRow(n),Tt.isradioChange&&(p=!1,Tt.isradioChange=!1);let g=s.getCheckboxRecords(),m=Tt.checkedRows.filter((e=>!Ce.has(e,ft))).length,f=[];if(0!=Tt.isTree){let{className:e}=o.target||{};if(e&&e.includes("vxe-tree--node-btn"))return;if("checkbox"===Tt.selectType){let e={};if(Tt.isTriggerSelectionChange){if(g.length>1)return!1;e=p||1===g.length&&!p?g[0]:{},Tt.checkedRows=[e]}else s.setAllCheckboxRow(!1),Tt.checkedRows=[n],Ql([n]),e=n;return Xl(e,!0),void M("handlerClickRow",e)}let t=[];Qe(n,f,t,Jt.value),m=Xe(g,t,Jt.value)?g.filter((e=>!Ce.has(e,ft))).length:1}!u&&s.setAllCheckboxRow(!1);let b=p;if(m>1?("radio"!=Tt.selectType&&s.setCheckboxRow([n],!0),0!=Tt.isTree&&"radio"!=Tt.selectType&&Ql(f),"radio"!=Tt.selectType&&M("handlerClickRow",n,r)):(b=!b,b?("radio"==Tt.selectType&&s.setRadioRow(n),0!=Tt.isTree&&"radio"!=Tt.selectType&&Ql(f)):("radio"==Tt.selectType&&s.clearRadioRow(),0!=Tt.isTree&&"radio"!=Tt.selectType&&Ql([])),"radio"!=Tt.selectType&&s.setCheckboxRow([n],b)),0!=Tt.isTree)return M("checkboxChange",{checked:b,row:n,index:r,records:g}),void(b&&M("handlerClickRow",n,r));((e,t)=>{e?Xl(t):ht.pageVO.pageIndex==Tt.lastPageIndex&&il.value.includes(t[ht.primaryKey])?Yl([t]):Xl(t)})(b,n),(b||m>1||!m)&&(Tt.checkedRows=[n]),b||1!==m||(Tt.checkedRows=[]),yl(),Tt.lastPageIndex=ht.pageVO.pageIndex,M("checkboxChange",{checked:b,row:n,index:r,records:s.getCheckboxRecords()}),b&&M("handlerClickRow",n,r)},ti=e=>{Ye(Tt);let t=Tt.checkedRows,l=e.filter((e=>!il.value.includes(e[ht.primaryKey])));t.push(...l),M("selectionChangeLocal",{isAdd:!0,isCheckedChange:!0,newCheckedRows:l,checkedRows:t})},li=e=>0==Tt.isTree?(M("selectionChange",e),!1):(Ql(e),!0),ii=({checked:e,row:t,records:l,$rowIndex:i})=>{Ct.value.clearCurrentRow(),Tt.isTriggerSelectionChange=!0,setTimeout((()=>{Tt.isTriggerSelectionChange=!1}),0),M("checkboxChange",{checked:e,row:t,index:i,records:l}),li(l)||(e?ti([t]):Yl([t],!0),yl())},ni=({checked:e,records:t})=>{li(t)||(e?ti(t):Yl(ht.data),yl())},oi=(e={})=>{let{row:t}=e;M("selectionChange",[{...t}])},ri=({property:e,order:t})=>{var l;if(ht.isInlineOperating)return!1;Object.values(Tt.filterFields).forEach((e=>e.filterSort=null));const i=null==(l=ht.columnConfig.fieldList)?void 0:l.find((t=>t.columnName===e));M("sortChange",{prop:e,order:t,column:i})},ai=()=>{const e=Ct.value.$el.childNodes[0].childNodes[1].childNodes[0].getElementsByClassName("mycolumn");M("setNestTableClickSetting",ht.isNestTable),M("showDrawer",e)},si=({column:e,$event:t})=>{if("title"===e.showOverflow){const e=null==t?void 0:t.currentTarget,l=null==e?void 0:e.className,i=" vxe-body--column ";if(l&&` ${l} `.includes(i)&&e&&e.hasAttribute("title")){const t=e.querySelector(".vxe-cell");t&&t.hasAttribute("title")&&t.removeAttribute("title"),ht.isInlineOperating&&e&&e.hasAttribute("title")&&e.removeAttribute("title")}}},ci=e=>{let t="";return Ce.has(ht.sumData,e.property)&&(t+=`<p class="table-footer-tooltip-label-wrap">\n <span class="table-footer-tooltip-label">求和:</span>\n ${Ce.round(Number(ht.sumData[e.property]),4)}\n </p>`),Ce.has(ht.avgData,e.property)&&(t+=`<p class="table-footer-tooltip-label-wrap">\n <span class="table-footer-tooltip-label">平均值:</span>\n ${Ce.round(Number(ht.avgData[e.property]),4)}</p>`),t},di=e=>Ce.has(ht.sumData,e.property)?Ce.round(Number(ht.sumData[e.property]),2):Ce.has(ht.avgData,e.property)?Ce.round(Number(ht.avgData[e.property]),2):void 0,ui=()=>{M("pubTableRefresh")},hi=e=>c(ue,{onPositiveClick:()=>(e=>{let{row:t,$rowIndex:l}=e||{};t&&(M("scanMultiRemove",l,e),Ct.value.remove(t))})(e)},{trigger:()=>c(le,{class:"scan-multi-delete",iconClass:"shanchu"},null),default:()=>"是否确认删除?"}),pi=(e,t,l)=>{if(!ht.isMatchComponent||ht.isNestTable||rl.value)return!1;if(ht.isBatchEditing||ht.isInlineEditing||ht.isInlineAdding){let i=Tt.editColumnMap[t.property];if(!i||!i.matchItem||!i.fieldItem)return!1;if(ht.isBatchEditing&&!ht.isEditAllRow){if(Tt.checkedRows.findIndex((t=>t[ht.primaryKey]==e[ht.primaryKey]))<0)return!1}return(!ht.isInlineEditing&&!ht.isInlineAdding||0===l)&&i.matchItem}return!1},gi=(e,t,l,i)=>{let n=t[ht.primaryKey],o=ht.batchDynamicPropsCache[n];if(o&&o[e.tableField])return o[e.tableField];let r=Tt.editColumnMap[l.property],{fieldItem:a={}}=r||{},s={};if(!ht.isInlineAdding){let e=ht.pageIndexOldtableData.find((e=>e[ht.primaryKey]==t[ht.primaryKey]));s=Be(l.property,a,e)}let c={props:{formPrimaryKey:n,defaultForm:{fieldList:[JSON.parse(JSON.stringify(a))],defaultCombinationForm:s},banRequest:!0,propsFormBtn:!0,propsDelSetting:!0,parentConfig:{is_edit:"1"},configuration:al.value,isPure:!0,isOpenShortcut:!1,cacheUniqueKey:Tt.cacheUniqueKey,styleSetting:{}},on:{handleSubmit:mi,banSubmit:fi}};return M("setBatchDynamicPropsCache",{primaryKey:t[ht.primaryKey],tableField:e.tableField,dynamicProps:c}),c},mi=(e={})=>{ht.isInlineEditing||ht.isInlineAdding?M("submitEditFormSuccess",e):ht.isBatchEditing&&M("submitEditFormSuccessBatch",e)},fi=e=>{ht.isInlineEditing||ht.isInlineAdding?M("submitEditFormError"):ht.isBatchEditing&&M("submitEditFormErrorBatch",e)},bi=async()=>{var e;M("initInlineEditFormConfig",{listFormUnionSetting:ht.listFormUnionSetting,inlineEditFormConfig:ht.inlineEditFormConfig});null==(e=ht.btnList)||e.find((e=>{var t;let l=e.settingObj&&(null==(t=e.settingObj[0])?void 0:t.trigger_type);return 1==e.isShow&&"EDIT_ROW"==l}))},vi=(e,t,l)=>[c("div",{class:["img-wrap","HEADPORTRAIT"===l?"img-circle":""]},[Ve(e[t.columnName],l,Et).map(((l,i)=>c("img",{key:i,src:ze(l,ht.sysImageSize,"LIST_FIELD_SMALL"),style:Ke(ht.sysImageSize,"LIST_FIELD_SMALL","36px"),onClick:l=>((e,t,l)=>{l.preventDefault(),l.stopPropagation(),e||(e=lt),M("handlePreView",e,t)})(e[t.columnName],i,l)},null)))])],Ci=(e,t)=>{let l=e[t.columnName];if(null==l?void 0:l.includes("-")){let e=l.split("-")[1];l=Ce.oldColorMap(e)}return[c("div",{class:"color-wrap",style:"height: 100%; padding: 4px;"},[c("div",{style:{background:l,height:"24px"}},null)])]},wi=(e,t)=>{let l=e[t.columnName]||"";return!Ce.isEmpty(l)&&Ce.isObject(l)&&"tooltip"in l?[c(u("n-tooltip"),null,{default:()=>[{trigger:()=>c("span",null,[l.value])},c("span",{innerHTML:l.tooltip},null)]})]:[c("span",{innerHTML:l},null)]},Ti=(e,t)=>{let l=e[t.columnName];if(!l&&0!==l)return;let i=l;if(/<\/?span.*?>/g.test(l)){let e=document.createElement("span");e.innerHTML=l,l=e.textContent,i=l}l&&Ce.isString(l)&&l.includes("%")&&(i=Number(l.replace("%","")));let n="#52c41a";return i<15?n="#ff5500":i<50?n="#ff8b01":i<90&&(n="#1890ff"),i>100?i=100:i<0&&(i=0),[c("div",{class:"percent-wrap"},[c("span",{class:"percent-value"},[i,p("%")]),c(he,{percentage:i,showIndicator:!1,color:n},null)])]},yi=(e,t)=>{let l=e[t.columnName];return Array.isArray(l)&&(l=JSON.stringify(l)),null},ki=(e,t,l)=>[c("span",{class:"bigTable-qr-span",onClick:l=>xi(l,e,t)},[c("img",{class:"bigTable-qr-img",src:it},null),c("span",null,[c(le,{iconClass:"fangda"},null)])])],xi=(e,t,l)=>{e.preventDefault(),e.stopPropagation();let i=$e(t,l);M("qrCodeEvent",i)},Si=(e,t)=>{if(ht.isNestTable)return;let l=[];return l.push(...Ue(e,"tileBtnList")),l.push(...Ue(e,"foldBtnList")),(null==l?void 0:l.length)?[c("span",null,[c(de,{style:{display:e.__isInlineEditing?"inline-block":"none"},onClick:e=>{e.stopPropagation(),M("SET_SAVE_ROW_STATUS",!0)},class:"btn-custom-class row-btn",size:"small",text:!0},{default:()=>"保存"}),c(de,{style:{display:e.__isInlineEditing?"inline-block":"none"},onClick:e=>{e.stopPropagation(),M("SET_CANCEL_ROW_STATUS",!0)},class:"btn-custom-class row-btn",size:"small",text:!0},{default:()=>"取消"})])]:void 0},Ni=(e,t)=>{var l;return[(null==(l=e.tileBtnList)?void 0:l.length)&&e.tileBtnList.map(((l,i)=>"1"==l.isShow&&"LINK"!=l.type&&c(de,{key:l.sid,onClick:i=>Ei(e,l,t,i),class:"btn-custom-class row-btn",style:{...St(l),display:e.__isInlineEditing?"none":"inline-block"},disabled:e.__isDisableInlineEdit,ghost:"white_bg"==l.showStyle,size:"small"},{default:()=>[Ri(l),"only_icon"===l.showStyle?"":Ee(l)]})))||""]},Ei=(e,t,l,i,n)=>{i.preventDefault(),i.stopPropagation(),zt(e,l),M("setNestTableClick",ht.isNestTable),M("setCurRowIndex",l),M("clickBtn",e,t,e[Jt.value],l)},Ri=(e,t="8px")=>{let l;return e.icon?l=Tt.btnIcons[e.icon]?c(u("a-icon"),{type:Tt.btnIcons[e.icon]},null):c(oe,null,{trigger:()=>c(le,{iconClass:e.icon,style:{marginRight:t}},null),default:()=>Ee(e)}):e.iconSetting&&(l=c(le,{iconClass:JSON.parse(e.iconSetting).icon,style:{marginRight:t}},null)),[l]},Ii=(e,t)=>{var l;return[(null==(l=e.foldBtnList)?void 0:l.length)&&c(pe,{style:{display:e.__isInlineEditing?"none":"inline-block"},disabled:ht.isInlineOperating,options:e.foldBtnList.map(((l,i)=>({label:`${Ee(l)}${Ri(l,"0")}`,key:l.sid,props:{onClick:i=>{Ei(e,l,t,i.domEvent)}}})))},{default:()=>[c(de,{size:"small",style:"margin-left: 8px"},{default:()=>"更多 ..."})]})||""]},Oi=(e,t,l,i)=>{let n=(0!==Tt.isTree?e:ht.oldtableData[i])[t.columnName];if("string"==typeof n&&n&&n.startsWith("###{")){let e=JSON.parse(n.replace("###",""));n=e.tooltip||e.value}return[c(ge,{value:n==t.btnLinkSwitchDefVal,disabled:l,onUpdateValue:l=>((e,t,l,i)=>{M("switchBtnOnChange",e,t,l,i)})(l,e,t,i)},null)]},Fi=(e,t,l,i)=>{const n=Ot(e,t,ht.columnConfig.fieldList,ht.fieldListOriginal),o=[i&&n?c("a",{onClick:i=>Li(e,t,l,i),innerHTML:n},null):c("span",{class:"domPropsInnerHTML-span",innerHTML:n},null)];return He(t,e)?[c(me,{placement:"right",trigger:"hover",arrowPointToCenter:!0},{default:()=>[{trigger:()=>o},c(ne,{component:Y,onClick:l=>Ai(l,e[t.columnName])},null)]})]:[o]},Li=(e,t,l,i)=>{if(ht.isInlineOperating)return!1;let n=Ct.value;i.preventDefault(),n.isCheckedByCheckboxRow(e)&&i.stopPropagation(),n.setCurrentRow(e),M("setNestTableClick",ht.isNestTable),M("setCurRowIndex",l),M("linkDetail",e,t,e[Jt.value],null,!1,l)},Ai=(e,t)=>{e.preventDefault(),e.stopPropagation(),M("hanldeCopyContent",e,t)},Di=()=>{let e=Ct.value;e&&e.scrollTo(e.getScroll().scrollLeft,0)},_i=()=>{if(ht.inlineError)return ht.resetEditRowStatus(),M("triggerSpinning",!1),!1;let{formId:e}=ht.listFormUnionSetting,{id:t}=ht.inlineOriginalTableRow;if(!e)return console.log("缺少formId"),void M("triggerSpinning",!1);if(Tt.isSaveForm)return!1;Tt.isSaveForm=!0;let l=Object.assign({},ht.inlineFormData,{formId:e,id:t,editMode:"row"});l=JSON.parse(JSON.stringify(l));let i=l[Jt.value]===mt;ht.isInlineAdding&&i&&delete l[Jt.value],ht.submitForm(l).then((async({data:e})=>{if(M("triggerSpinning",!1),"SUCCESS"!==e.result)return Tt.isSaveForm=!1,vt.error(e.resultMsg),ht.resetEditRowStatus(),!1;await ht.resetInlineEdit(),Vt(),M("pubTableReload")})).finally((()=>{Tt.isSaveForm=!1,M("triggerSpinning",!1),ht.resetEditRowStatus()}))};g((()=>ht.columnConfig),(e=>{s((()=>{e&&Object.keys(e).length&&pl(e)}))}),{immediate:!0}),g([()=>ht.data,()=>{var e;return null==(e=ht.data)?void 0:e.length}],(async([e])=>{await s(),Cl(e)}),{immediate:!0}),g((()=>il),(e=>{qe(Tt,ht,il.value)})),g((()=>ht.tableDataCache),(e=>{(e=>{if(!ht.isNestTable&&e&&e.length){const t=Ce.handleBigArrayCopy(e);Tt.checkedRows=Object.freeze(t),Ct.value.setAllCheckboxRow(!0)}})(e)}),{deep:!0}),g((()=>ht.pageVO.pageSize),(e=>{ht.isNestTable||qe(Tt,ht,il.value)})),g((()=>ht.pageVO.pageIndex),(e=>{ht.isNestTable||Di()})),g((()=>ht.styleSetting.tableHeight),(e=>{ht.isNestTable||Object.keys(ht.columnConfig).length>0&&(pl(ht.columnConfig),Cl(ht.data),Di())})),g((()=>ht.sysImageSize),(e=>{var t;const l="table-simple"===(null==(t=ht.styleSetting)?void 0:t.tableHeight)?"26":"22";s((()=>{We(e,"LIST_FIELD_SMALL",l+"px")}))}),{deep:!0,immediate:!0}),g((()=>ht.inlineEditFormSubmitDone),(e=>{if(e&&!ht.isNestTable)return!(0!=Tt.isTree||!ht.isMatchComponent)&&(!!Lt()&&void _i())})),g((()=>ht.isInlineEditing),(e=>{if(e&&!ht.isNestTable)return!(0!=Tt.isTree||!ht.isMatchComponent)&&(!!Lt()&&void _i())})),g((()=>ht.isInlineAdding),(e=>!(!e||ht.isNestTable)&&(!(0!=Tt.isTree||!ht.isMatchComponent)&&(Lt()?(jt(),void(async()=>{if(!_t())return Mt(),!1;await ht.resetInlineEdit(),M("handleClickBtnByInline",{type:"ADD",listFormUnionSetting:ht.listFormUnionSetting,inlineEditFormConfig:ht.inlineEditFormConfig}),mt=Date.now();let e={[Jt.value]:mt,__isInsertRow:!0},{paramsList:t}=ht.listFormUnionSetting;t.forEach((t=>{e[t.tableField]=void 0}));let l=Ct.value;await l.insert(e),await l.loadData([e]),Pt(!0),At(l.$el,0,"66")})()):(Vt(),!1))))),g((()=>ht.isInlineSave),(e=>!(!e||ht.isNestTable)&&(!(0!=Tt.isTree||!ht.isMatchComponent)&&(!!Lt()&&void(()=>{if(ht.spinning)return!1;M("handleClickBtnByInline",{type:"SAVE"});let e=document.querySelectorAll(".js-inlineEditForm"),t=Bt();e=[...e].slice(0,t),e.forEach((e=>{e.__vue__.handleSubmitForm()}))})())))),g((()=>ht.isInlineCancel),(e=>!(!e||ht.isNestTable)&&(!(0!=Tt.isTree||!ht.isMatchComponent)&&(!!Lt()&&((()=>{if(!ht.isInlineAdding)return!1;const e=Ct.value;let{tableData:t}=e.getTableData();e.remove(t[0])})(),void Mt()))))),g((()=>ht.tableRefreshCache),((e,t)=>{var l,i;if(ht.isNestTable)return;const{orgId:n}=(null==(i=null==(l=null==ht?void 0:ht.userInfo)?void 0:l.map)?void 0:i.sysParams)||{};e!=t&&ht.tableParams&&e[ht.tableParams.tableId]&&n==e[ht.tableParams.tableId]&&(Tt.hasRefresh=!0)}),{immediate:!0,deep:!0}),g((()=>ht.tableParams.tableId),(e=>{s((()=>{e&&ht.tableRefreshCache[e]&&(Tt.hasRefresh=!0)}))}));const Mi=e=>M("menuClick",e);return _({formatData:kt,xGrid:Ct,loadColumn:pl,loadData:Cl,handleFilterClearAll:Al}),(e,t)=>{var l,i;return m(),f(b,null,[Tt.anchorList.length?(m(),v(C(fe),{key:0,type:"line",animated:"","pane-style":"padding: 0",value:Tt.anchorValue,"onUpdate:value":[t[0]||(t[0]=e=>Tt.anchorValue=e),C(Yt)]},{default:w((()=>[(m(!0),f(b,null,T(ht.anchor,(e=>(m(),v(C(be),{name:e.field,tab:e.title,key:e.field},null,8,["name","tab"])))),128))])),_:1},8,["value","onUpdate:value"])):y("v-if",!0),k("div",{class:x(["big-table custom-big-table",{mt:Tt.hasRefresh,"expand-padding":!ht.isNestTable}]),style:S({height:Tt.tableHeight})},[Tt.hasRefresh&&!ht.isNestTable?(m(),f("div",nt,[k("p",{class:"check-wrap-title"},[ot,k("span",{class:"check-wrap-btn",onClick:zl},"点击查看")])])):y("v-if",!0),c(C(ve),N({ref_key:"xGrid",ref:Ct,border:"","show-overflow":"","show-header-overflow":"","show-footer-overflow":"title","keep-source":"","auto-resize":"",height:ht.height?"auto":void 0,"cell-style":Tt.cellStyle},e.$attrs,{"mouse-config":{selected:!!(null==(l=e.columnConfig.keyboardConfig)?void 0:l.isEdit)},"tree-config":C(sl),"row-class-name":Kl,"row-config":{...Tt.rowConfig,...C(Nt)("row-config")},"show-footer":e.showFooter&&!ht.isInlineOperating,"footer-method":$l,"sort-config":{trigger:"cell",remote:!0,...C(Nt)("sort-config")},"span-method":Wl,"footer-span-method":Gl,"tooltip-config":{enterable:!1,...C(Nt)("tooltip-config")},"checkbox-config":{checkField:"checked",labelField:"checked",checkMethod:C(xe),visibleMethod:C(Je),trigger:"cell",reserve:!0,highlight:!0,...C(Nt)("checkbox-config")},"radio-config":{checkField:"checked",trigger:"cell",reserve:!0,highlight:!0,...C(Nt)("radio-config")},"scroll-y":{gt:50,...C(Nt)("scroll-y")},"row-style":C(Ge),"edit-config":Tt.editConfig,"expand-config":{lazy:!0,accordion:e.columnConfig&&e.columnConfig.accordion,loadMethod:C(Zt),toggleMethod:C(Gt),iconOpen:"iconfont icon-a-xitongtubiaozhediejian",iconClose:"iconfont icon-a-xitongtubiaotianjia",...C(Nt)("expand-config")},"keyboard-config":C(cl),"edit-rules":e.columnConfig.editRules||{},"menu-config":e.menuConfig,onCellDblclick:Zl,onCellClick:ei,onCheckboxChange:ii,onCheckboxAll:ni,onRadioChange:oi,onSortChange:ri,onScroll:C(ll),onCellMouseenter:si,onKeydown:C(tl),onMenuClick:Mi,onResizableChange:vl}),{empty:w((()=>[Tt.isShowEmpty?E(e.$slots,"empty",{key:0},(()=>[c(te,{"no-data-img":ht.emptyItems.noDataImg,"no-data-tip":ht.emptyItems.noDataTip,"show-img":!ht.isNestTable},null,8,["no-data-img","no-data-tip","show-img"])])):y("v-if",!0)])),tooltip_footer:w((({column:t})=>[y(" 分组统计 "),e.groupCountFields&&e.groupCountFields.length?(m(),f("span",{key:0,innerHTML:Tt.groupText},null,8,rt)):(m(),f(b,{key:1},[y(" 一般统计 "),c(C(oe),{trigger:"hover"},{trigger:w((()=>[p(R(di(t)),1)])),default:w((()=>[k("div",{innerHTML:ci(t)},null,8,at)])),_:2},1024)],2112))])),nest_table_content:w((({row:t,rowIndex:l,$rowIndex:i,column:n})=>[E(e.$slots,"content",{data:{row:t,rowIndex:l,$rowIndex:i,column:n}})])),_:3},16,["height","cell-style","mouse-config","tree-config","row-config","show-footer","sort-config","tooltip-config","checkbox-config","radio-config","scroll-y","row-style","edit-config","expand-config","keyboard-config","edit-rules","menu-config","onScroll","onKeydown"]),y(" `${refreshRow}条更新` "),I(k("div",{class:"refresh",onClick:ui},[c(C(ne),{size:"14",component:C(ee)},null,8,["component"]),k("p",st,R(e.refreshRow)+"条更新",1)],512),[[O,ht.refreshRow>0&&!ht.isNestTable]])],6),(null==(i=ht.totalList)?void 0:i.length)?(m(),f("div",ct,[(m(!0),f(b,null,T(ht.totalList,((e,t)=>(m(),f("div",{class:"big-table-total-item",key:t},[k("span",dt,R(e.title)+":",1),k("div",ut,[(m(!0),f(b,null,T(e.data,((e,t)=>(m(),f("div",{class:"right-item",key:t},[p(R(e.name)+": ",1),k("span",null,R(e.value),1)])))),128))])])))),128))])):y("v-if",!0)],64)}}});export{ht as default};
|