cnhis-design-vue 3.1.44-beta.11 → 3.1.44-beta.13
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/README.md +87 -87
- package/es/components/base-search/index.d.ts +0 -6
- package/es/components/base-search/src/index.vue.d.ts +0 -6
- package/es/components/base-search/src/index.vue.js +1 -1
- package/es/components/base-search/src/index.vue2.js +1 -0
- package/es/components/big-table/src/BigTable.vue.js +1 -1
- package/es/components/big-table/src/components/NoData.vue.js +1 -1
- package/es/components/big-table/src/components/NoData.vue2.js +1 -0
- package/es/components/big-table/src/components/edit-form/edit-separate.vue.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-separate.vue2.js +1 -0
- package/es/components/big-table/src/components/input-button.vue.js +1 -1
- package/es/components/big-table/src/components/input-button.vue2.js +1 -0
- package/es/components/big-table/src/components/separate.vue.js +1 -1
- package/es/components/big-table/src/components/separate.vue2.js +1 -0
- package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -1
- package/es/components/bpmn-workflow/src/BpmnWorkflow.vue2.js +1 -0
- package/es/components/button-print/src/ButtonPrint.vue.js +1 -1
- package/es/components/button-print/src/components/EditFormat.vue.js +1 -1
- package/es/components/button-print/src/components/EditFormat.vue2.js +1 -0
- package/es/components/button-print/src/components/IdentityVerification.vue.js +1 -1
- package/es/components/button-print/src/components/IdentityVerification.vue2.js +1 -0
- package/es/components/button-print/src/components/Preview.vue.js +1 -1
- package/es/components/classification/index.d.ts +553 -75
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +551 -61
- package/es/components/classification/src/components/search-filter/index.vue.js +1 -1
- package/es/components/classification/src/components/search-filter/index.vue2.js +1 -0
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +553 -75
- package/es/components/classification/src/components/set-classification/index.vue.js +1 -1
- package/es/components/classification/src/components/set-classification/index.vue2.js +1 -0
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +1 -1
- package/es/components/classification/src/components/table-modal/index.vue.js +1 -1
- package/es/components/classification/src/components/table-modal/index.vue2.js +1 -0
- package/es/components/classification/src/const/index.d.ts +2 -2
- package/es/components/classification/src/index.vue.d.ts +553 -75
- package/es/components/classification/src/index.vue.js +1 -1
- package/es/components/classification/src/index.vue2.js +1 -0
- package/es/components/classification/style/index.css +1 -1
- package/es/components/date-picker/src/DatePicker.vue.js +1 -1
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -0
- package/es/components/fabric-chart/src/FabricChart.vue.js +1 -1
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -0
- package/es/components/fabric-chart/src/components/PopupTip.vue.js +1 -1
- package/es/components/fabric-chart/src/components/PopupTip.vue2.js +1 -0
- package/es/components/fabric-chart/src/utils/utils.js +1 -1
- package/es/components/field-set/src/FieldSet.vue.js +1 -1
- package/es/components/field-set/src/FieldSet.vue2.js +1 -0
- package/es/components/form-config/index.d.ts +0 -2
- package/es/components/form-config/src/FormConfig.vue.d.ts +0 -2
- package/es/components/form-config/src/FormConfig.vue.js +1 -1
- package/es/components/form-config/src/FormConfig.vue2.js +1 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +0 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -0
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue2.js +1 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +0 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -0
- package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -1
- package/es/components/form-config/src/components/renderer/CloseButton.vue2.js +1 -0
- package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -1
- package/es/components/form-config/src/components/renderer/ComplexNode.vue2.js +1 -0
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
- package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +1 -0
- package/es/components/form-render/index.d.ts +0 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +0 -1
- package/es/components/form-render/src/FormRender.vue.js +1 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -0
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +0 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue2.js +1 -0
- package/es/components/form-render/src/components/renderer/combination.js +1 -1
- package/es/components/form-render/src/components/renderer/formItem.js +1 -1
- package/es/components/form-render/src/components/renderer/input.d.ts +4 -4
- package/es/components/form-render/src/components/renderer/input.js +1 -1
- package/es/components/form-render/src/components/renderer/inputNumber.d.ts +4 -4
- package/es/components/form-render/src/components/renderer/inputNumber.js +1 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue2.js +1 -0
- package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/components/tooltipMessage.vue.js +1 -1
- package/es/components/form-render/src/components/tooltipMessage.vue2.js +1 -0
- package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
- package/es/components/form-render/src/types/index.d.ts +2 -0
- package/es/components/guide/src/renderer.js +1 -1
- package/es/components/iho-select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/iho-select-label/src/LabelFormContent.vue2.js +1 -0
- package/es/components/iho-select-label/src/SelectLabel.vue.js +1 -1
- package/es/components/iho-select-label/src/SelectLabel.vue2.js +1 -0
- package/es/components/iho-select-label/src/components/label-classify.vue.js +1 -1
- package/es/components/iho-select-label/src/components/label-classify.vue2.js +1 -0
- package/es/components/iho-table/index.d.ts +2 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +2 -0
- package/es/components/iho-table/src/IhoTable.vue.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -0
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +1 -0
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.js +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +1 -0
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +8 -2
- package/es/components/info-header/src/InfoHeader.vue.d.ts +8 -2
- package/es/components/info-header/src/InfoHeader.vue.js +1 -1
- package/es/components/info-header/src/InfoHeader.vue2.js +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue2.js +1 -0
- package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/HiddenContent.vue2.js +1 -0
- package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue2.js +1 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +0 -1
- package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/index.vue2.js +1 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +0 -1
- package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
- package/es/components/info-header/src/components/patientInfo/index.vue2.js +1 -0
- package/es/components/keyboard/src/Keyboard.vue.js +1 -1
- package/es/components/keyboard/src/Keyboard.vue2.js +1 -0
- package/es/components/keyboard/src/components/InputNumber.vue.js +1 -1
- package/es/components/keyboard/src/components/InputNumber.vue2.js +1 -0
- package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -1
- package/es/components/keyboard/src/components/NumberPanel.vue2.js +1 -0
- package/es/components/map/src/Map.vue.js +1 -1
- package/es/components/map/src/Map.vue2.js +1 -0
- package/es/components/quick-search/index.d.ts +0 -6
- package/es/components/quick-search/src/index.vue.d.ts +0 -6
- package/es/components/quick-search/src/index.vue.js +1 -1
- package/es/components/quick-search/src/index.vue2.js +1 -0
- package/es/components/quick-search/style/index.css +1 -1
- package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -1
- package/es/components/recommend-search/src/RecommendSearch.vue2.js +1 -0
- package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -1
- package/es/components/recommend-search/src/components/RecommendInput.vue2.js +1 -0
- package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -1
- package/es/components/recommend-search/src/components/RecommendMenu.vue2.js +1 -0
- package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -1
- package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +1 -0
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -0
- package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -1
- package/es/components/scale-view/src/components/AnswerParse.vue2.js +1 -0
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -1
- package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +1 -0
- package/es/components/scale-view/src/components/EvaluatePage.vue.js +1 -1
- package/es/components/scale-view/src/components/EvaluatePage.vue2.js +1 -0
- package/es/components/scale-view/src/components/LoadingCom.vue.js +1 -1
- package/es/components/scale-view/src/components/NoData.vue.js +1 -1
- package/es/components/scale-view/src/components/NoData.vue2.js +1 -0
- package/es/components/search-cascader/src/SearchCascader.vue.js +1 -1
- package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -0
- package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -0
- package/es/components/select-label/src/SelectLabel.vue.js +1 -1
- package/es/components/select-label/src/components/label-classify.vue.js +1 -1
- package/es/components/select-label/src/components/label-classify.vue2.js +1 -0
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
- package/es/components/select-person/src/SearchMultiple.vue.js +1 -1
- package/es/components/select-person/src/SelectPerson.vue.js +1 -1
- package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +1 -1
- package/es/components/shortcut-provider/src/ShortcutProvider.vue2.js +1 -0
- package/es/components/shortcut-setter/index.d.ts +0 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +0 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.js +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue2.js +1 -0
- package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetterItem.vue2.js +1 -0
- package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
- package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +551 -48
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +134 -0
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +140 -0
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue.d.ts +28 -0
- package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue.d.ts +28 -0
- package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue.d.ts +54 -0
- package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.d.ts +61 -0
- package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.d.ts +68 -0
- package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.d.ts +47 -0
- package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +551 -0
- package/es/components/table-filter/src/components/classify-filter/components/index.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +551 -48
- package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/Date.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/{Label.vue.d.ts → LabelInner.vue.d.ts} +1 -9
- package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/{SelectLabel.vue.d.ts → LabelOut.vue.d.ts} +1 -9
- package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +1 -9
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/Select.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +713 -8
- package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +0 -6
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +3 -27
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/constants/index.d.ts +3 -0
- package/es/components/table-filter/src/constants/index.js +1 -0
- package/es/components/table-filter/src/directive/resize.js +1 -1
- package/es/components/table-filter/src/tool/baseOptions.d.ts +4 -0
- package/es/components/table-filter/src/tool/baseOptions.js +1 -1
- package/es/components/table-filter/src/tool/transformData.d.ts +1 -0
- package/es/components/table-filter/src/tool/transformData.js +1 -1
- package/es/components/table-filter/src/types/enums.d.ts +1 -0
- package/es/components/table-filter/src/types/enums.js +1 -1
- package/es/components/time-line/src/TimeLine.vue.js +1 -1
- package/es/components/time-line/src/TimeLine.vue2.js +1 -0
- package/es/components/time-picker/src/TimePicker.vue.js +1 -1
- package/es/components/time-picker/src/TimePicker.vue2.js +1 -0
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.js +1 -1
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +1 -0
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +1 -0
- package/es/env.d.ts +25 -25
- package/es/shared/components/SelectPage/SelectPage.vue.js +1 -1
- package/es/shared/components/SelectPage/SelectPage.vue2.js +1 -0
- package/es/shared/components/SvgIcon/SvgIcon.vue.js +1 -1
- package/es/shared/components/SvgIcon/SvgIcon.vue2.js +1 -0
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -1
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue2.js +1 -0
- package/es/shared/components/no-data/NoData.vue.js +1 -1
- package/es/shared/components/no-data/NoData.vue2.js +1 -0
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
- package/es/components/table-filter/src/components/render-widget/components/Label.vue.js +0 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectLabel.vue.js +0 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/tapable/index.d.ts +0 -139
- /package/es/_virtual/{plugin-vue_export-helper.js → _plugin-vue_export-helper.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as i,ref as n,provide as l,computed as t,onMounted as a,nextTick as o,watch as s,openBlock as d,createElementBlock as c,normalizeClass as r,unref as h,normalizeStyle as u,withDirectives as f,createVNode as p,createTextVNode as g,toDisplayString as m,createCommentVNode as v,createElementVNode as C,Fragment as y,renderList as k,createBlock as S,withCtx as b}from"vue";import{useMessage as x,NIcon as O,NTooltip as _}from"naive-ui";import{Repeat as w,SettingsOutline as I,ChevronDown as L,ChevronForward as N,Checkmark as z,Close as j,ChevronUp as B}from"@vicons/ionicons5";import P from"./components/set-classification/index.vue.js";import J from"./directive/flexibleResize.js";import{root_isShowResetButton as M}from"./const/index.js";import A from"../../table-filter/src/hooks/useMixins.js";import E from"../../table-filter/src/hooks/useAdvanced.js";import T from"../../../_virtual/plugin-vue_export-helper.js";const R={key:0,class:"header"},F={class:"tree"},W=["onClick"],q=["onClick"],G=["onClick"],Q={class:"child-item-name"},$={key:1,class:"tree-type-footer"},D={class:"selected-num"},V=C("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),H={key:0,class:"tile-type classify-1"},K={key:0,class:"header"},U={class:"right-setting"},X=["onClick"],Y={class:"parent ellips"},Z={class:"children"},ee=["onClick"],ie={key:1,class:"selected-list"},ne={class:"selected-num"},le=C("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),te={class:"name"},ae={class:"name"},oe={key:0,class:"main-wrapper"},se=["onClick"],de={class:"tree-footer"},ce=["onClick"],re=["onClick"],he={key:0,class:"select-type-footer"},ue={class:"selected-num"},fe=C("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1);var pe=T(e({__name:"index",props:{tableId:{type:String,default:""},searchFieldList:{type:Array,default:()=>[]},conditionMap:{type:Object,default:()=>({})},conditionSid:{type:Array,default:()=>["all_data"]},curClassificationIndex:{type:Number,default:0},curClassificationWidth:{type:Number},hideConditionChangeBtn:{type:Number,default:0},hideConditionChangeSetting:{type:Number,default:0},hideClearConditionChange:{type:Number,default:1},isShowResetButton:{type:Boolean,default:!0},filterApiConfig:{type:Object,default:()=>({})}},emits:["changeSearch","setClassificationIndex","getQuickSearchListObj"],setup(e,{emit:T}){const pe=e,{handleGetConfigApi:ge}=A(),{transformClassifyChild:me}=E(),ve=i(),Ce=x(),ye=n(null);let ke=n(150),Se=n(!1),be=n([]),xe=n([]),Oe=n([]),_e=n(2),we=n({name:"全部数据",sid:"all_data"}),Ie=n([]),Le=n(""),Ne=n(!1),ze=n("全部数据");l(M,n(pe.isShowResetButton));let je=t((()=>0===_e.value?{marginRight:"8px"}:2===_e.value?{display:"inline-block"}:{})),Be=t((()=>{let e=xe.value.filter((e=>-1!==pe.conditionSid.indexOf(e.sid)));if(-1!==pe.conditionSid.indexOf("all_data"))return"全部数据";{let i=[];return e.map((e=>{i.push(e.name)})),i.join(",")}})),Pe=t((()=>function(e){let i=0===e.digital?"(0)":e.digital?`(${e.digital})`:"";const{name:n,isPublic:l}=e;return Ke(n,l)+i}));function Je(e){e.open?e.open=!1:e.open=!0}function Me(e,i,n){ze.value=e.name;let l=function(e){let i=[];return be.value.forEach((n=>{n.children?n.children.forEach((n=>{-1!==e.indexOf(n.sid)?(n.selected=!0,i.push(n)):n.selected=!1})):-1!==e.indexOf(n.sid)?(n.selected=!0,i.push(n)):n.selected=!1})),i}(function(e,i,n){let l=JSON.parse(JSON.stringify(i));l="all_data"===e||-1!==l.indexOf(e)?["all_data"]:[e];return l}(e.sid,pe.conditionSid));Fe(!1);const t=me(null==e?void 0:e.conObj);T("changeSearch",Boolean("all_data"===e.sid),e,t,n,l)}function Ae(){let e="";if(2===_e.value)e=0;else{let i=_e.value;e=++i}ke.value=150,Ee(e)}async function Ee(e,i){let n={tableId:pe.tableId,setting:JSON.stringify({classificationIndex:e,classificationWidth:i})};try{await ge(n,"requestSaveListPersonaSetting",{},pe.filterApiConfig)&&T("setClassificationIndex",e)}catch(e){console.log(e)}}function Te(){Ne.value=!0,Fe(!1)}function Re(e){Ne.value=e}function Fe(e){Se.value=void 0===e?!Se.value:e}function We(){if(!pe.tableId)return Ce.warning("请传入tableId");be.value=[];let{displayCategoryList:e=[],conditionList:i=[]}=pe.conditionMap;Ie.value=JSON.parse(JSON.stringify(e))||[],Oe.value=JSON.parse(JSON.stringify(i)),xe.value=JSON.parse(JSON.stringify([{name:"全部数据",sid:"all_data"},...i]));let n=[];var l;0===Ie.value.length&&(Ie.value=["未分类"]),Ie.value.forEach((e=>{let i={name:e,children:[]};xe.value.forEach((n=>{if(n.displayCategory===e||!n.displayCategory&&"未分类"===e&&"all_data"!==n.sid){if(-1!==pe.conditionSid.indexOf(n.sid)){n.selected=!0,i.open=!0;const e=me(null==n?void 0:n.conObj);T("changeSearch",!1,n,e)}n.isShow&&i.children.push(n)}})),i.children.length>0&&n.push(i)})),n.unshift({name:"全部数据",sid:"all_data"}),be.value=n,0===_e.value&&(l=!0,be.value.forEach((e=>{e.children&&e.children.length&&(e.open=l)})))}function qe({distance:e}){const i=ke.value+e;ke.value=Math.min(Math.max(i,50),650)}function Ge(){Ee(_e.value,ke.value)}async function Qe(){await He(pe.tableId),De()}async function $e(e){await He(pe.tableId),Ve()}function De(e){Ve(e).then((e=>({})))}function Ve(e,i={}){if(!pe.tableId)return new Promise((e=>e(!1)));let n=Object.keys(i).length>0?i:JSON.parse(JSON.stringify(pe.conditionMap));return new Promise(((i,l)=>{var t,a,o,s,d,c;if(Object.keys(n).length>0){Oe.value=n.conditionList||[],Ie.value=n.displayCategoryList||[];let l={conditionList:Oe.value,displayCategoryList:Ie.value};T("getQuickSearchListObj",l),Le.value=n.settingId;const r=Oe.value.find((e=>e.isDefault))||{name:"全部数据",sid:"all_data"};(null==(a=null==(t=ve.tableOptions)?void 0:t.filterCondition)?void 0:a.displayCategory)&&e&&i({name:null==(s=null==(o=ve.tableOptions)?void 0:o.filterCondition)?void 0:s.name,sid:null==(c=null==(d=ve.tableOptions)?void 0:d.filterCondition)?void 0:c.displayCategory}),i(r)}else i({})}))}async function He(e){try{if(!e)return new Promise((e=>e(!1)));let i={tableId:e},n=await ge(i,"requestTableCondiTionList",{},pe.filterApiConfig);return Promise.resolve(n)}catch(e){return Promise.resolve(!1)}}function Ke(e,i){return i&&e&&"1"===i?e.replace(/\(公共\)$/,""):e}return a((()=>{document.addEventListener("click",(e=>{o((()=>{let i=e.composedPath&&e.composedPath();ye.value&&i.includes(ye.value)||Fe(!1)}))}))})),s((()=>pe.tableId),(e=>{e&&De(!0)}),{immediate:!0,deep:!0}),s((()=>pe.curClassificationIndex),(e=>{void 0!==e&&(_e.value=e)}),{immediate:!0,deep:!0}),s((()=>pe.curClassificationWidth),(e=>{e&&(ke.value=Number(e)||150)}),{immediate:!0}),s((()=>pe.conditionMap),(e=>{!async function(){try{await We()}catch(e){console.log(e)}}()}),{immediate:!0,deep:!0}),(i,n)=>(d(),c("div",{class:r(["classification-block","classificationIndex-"+h(_e)]),style:u(h(je))},[0===h(_e)?f((d(),c("div",{key:0,class:"tree-type classify-0",style:u({width:h(ke)+"px",paddingBottom:1!=e.hideClearConditionChange?"80px":0,position:"relative"})},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",R,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"header-1",onClick:Ae},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),g(" "+m("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"header-1",onClick:Te},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),g(" "+m("设置"))])):v("v-if",!0)])):v("v-if",!0),C("ul",F,[(d(!0),c(y,null,k(h(be),((i,n)=>(d(),c(y,null,[0===n||!i.children||0===i.children.length||i.children&&0!==i.children.filter((e=>e.isShow)).length?(d(),c("li",{key:n,class:r(["tree-item",{"tree-header":0===n||!i.children||0===i.children.length}])},[0!==n&&i.children&&0!==i.children.length?(d(),c(y,{key:1},[C("span",{class:r(["parent",{open:i.open}]),onClick:e=>Je(i)},[C("span",null,m(i.name),1),p(h(O),{component:i.open?h(L):h(N)},null,8,["component"])],10,q),i.open?(d(!0),c(y,{key:0},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{class:"children",key:n},[e.isShow?(d(),S(h(_),{key:0,trigger:"hover",placement:"right"},{trigger:b((()=>[C("span",{class:r(["child-item",{selected:e.selected}]),onClick:n=>Me(e,0,i)},[C("span",Q,m(Ke(e.name,null==e?void 0:e.isPublic)),1),e.selected?(d(),S(h(O),{key:0,component:h(z),size:"20"},null,8,["component"])):v("v-if",!0)],10,G)])),default:b((()=>[C("span",null,m(h(Pe)(e)),1)])),_:2},1024)):v("v-if",!0)])))),128)):v("v-if",!0)],64)):(d(),c("span",{key:0,class:r(["child-item header-item",{selected:i.selected||-1!==e.conditionSid.indexOf("all_data")}]),onClick:e=>Me(i)},m(i.name),11,W))],2)):v("v-if",!0)],64)))),256))]),1!=e.hideClearConditionChange?(d(),c("div",$,[C("div",D,"已选择"+m(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),C("div",{class:"selected-item-del",onClick:n[0]||(n[0]=e=>Me({sid:"all_data",name:"全部数据",digital:h(we).digital}))},[V,g(" 清空筛选 ")])])):v("v-if",!0)],4)),[[h(J),{mode:"VR",onMove:qe,onEnd:Ge}]]):v("v-if",!0),1===h(_e)?(d(),c(y,{key:1},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting||1!=e.hideConditionChangeSetting||h(Oe).filter((e=>e.isShow)).length>0?(d(),c("div",H,[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",K,[C("span",{class:r(["all-data",{selected:-1!==e.conditionSid.indexOf("all_data")}]),onClick:n[1]||(n[1]=e=>Me({sid:"all_data",name:"全部数据",digital:h(we).digital}))},[g(" 全部数据 "),h(we).digital||0===h(we).digital?(d(),c(y,{key:0},[g(" ("+m(h(we).digital||0)+") ",1)],64)):v("v-if",!0)],2),C("div",U,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"setting-1",onClick:Ae,style:{"margin-right":"30px"}},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),g(" "+m("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"setting-1",onClick:Te},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),g(" "+m("设置"))])):v("v-if",!0)])])):v("v-if",!0),C("ul",{class:"tile",style:u({borderBottom:1!=e.hideClearConditionChange?"1px solid #d5d5d5":0})},[(d(!0),c(y,null,k(h(be).slice(1),((e,i)=>(d(),c(y,null,[e.children&&e.children.length>0?(d(),c("li",{class:"tile-item",key:i},[e.children&&0!==e.children.length?(d(),c(y,{key:1},[C("span",Y,m(e.name),1),C("div",Z,[(d(!0),c(y,null,k(e.children,((i,n)=>(d(),c(y,null,[i.isShow?(d(),c("span",{key:n,class:r(["child-item",{selected:i.selected}]),onClick:n=>Me(i,0,e)},m(Ke(i.name,null==i?void 0:i.isPublic)),11,ee)):v("v-if",!0)],64)))),256))])],64)):(d(),c("span",{key:0,class:r(["child-item",{selected:e.selected}]),style:{"padding-left":"17px"},onClick:i=>Me(e)},m(e.name)+" "+m(e.digital),11,X))])):v("v-if",!0)],64)))),256))],4),1!=e.hideClearConditionChange?(d(),c("div",ie,[C("div",ne,"已选择"+m(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),(d(!0),c(y,null,k(h(be).slice(1),(e=>(d(),c(y,null,[e.children&&0!==e.children.length?(d(!0),c(y,{key:1},k(e.children,((i,n)=>(d(),c(y,null,[i.selected?(d(),c("div",{class:"selected-item",key:i.sid},[g(m(i.name)+" ",1),p(h(O),{component:h(j),onClick:n=>Me(i,0,e)},null,8,["component","onClick"])])):v("v-if",!0)],64)))),256)):(d(),c("div",{class:"selected-item",key:e.sid},[g(m(e.name)+" ",1),p(h(O),{component:h(j),onClick:i=>Me(e)},null,8,["component","onClick"])]))],64)))),256)),C("div",{class:"selected-item-del",onClick:n[2]||(n[2]=e=>Me({sid:"all_data",name:"全部数据",digital:h(we).digital}))},[le,g(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],64)):v("v-if",!0),2===h(_e)?(d(),c("div",{key:2,class:"select-type classify-2",ref_key:"selectType",ref:ye},[C("span",{class:"title",onClick:n[3]||(n[3]=()=>Fe())},[p(h(_),{trigger:"hover",placement:"top"},{trigger:b((()=>[C("span",te,m(h(Be)),1)])),default:b((()=>[C("span",ae,m(h(Be)),1)])),_:1}),p(h(O),{component:h(Se)?h(B):h(L)},null,8,["component"])]),h(Se)?(d(),c("div",oe,[C("ul",{class:"tree",style:u({padding:1!=e.hideClearConditionChange?"40px 0":"40px 0 0"})},[(d(!0),c(y,null,k(h(be),((i,n)=>(d(),c(y,null,[0===n||!i.children||0===i.children.length||i.children&&0!==i.children.filter((e=>e.isShow)).length?(d(),c("li",{key:n,class:r(["tree-item",{"tree-header":0===n||!i.children||0===i.children.length}])},[0!==n&&i.children&&0!==i.children.length?(d(),c(y,{key:1},[0!==i.children.filter((e=>e.isShow)).length?(d(),c("span",{key:0,class:r(["parent",{open:i.open}]),onClick:e=>Je(i)},[g(m(i.name)+m(i.digital||0===i.digital?"("+i.digital+")":"")+" ",1),p(h(O),{component:i.open?h(L):h(N)},null,8,["component"])],10,ce)):v("v-if",!0),i.open?(d(!0),c(y,{key:1},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{class:"children",key:n},[e.isShow?(d(),S(h(_),{key:0,placement:"right",trigger:"hover","z-index":1e4},{trigger:b((()=>[C("span",{class:r(["child-item",{selected:e.selected}]),onClick:n=>Me(e,0,i)},[C("span",null,m(Ke(e.name,null==e?void 0:e.isPublic)),1),e.selected?(d(),S(h(O),{key:0,component:h(z),size:"20"},null,8,["component"])):v("v-if",!0)],10,re)])),default:b((()=>[C("span",null,m(h(Pe)(e)),1)])),_:2},1024)):v("v-if",!0)])))),128)):v("v-if",!0)],64)):(d(),c(y,{key:0},[C("span",{class:r(["child-item child-header header-item",{selected:i.selected||-1!==e.conditionSid.indexOf("all_data")}]),onClick:e=>Me(i)},m(i.name),11,se),C("div",de,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"tree-footer-icon",onClick:Ae},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),g(" "+m("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"tree-footer-icon",onClick:Te},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),g(" "+m("设置"))])):v("v-if",!0)])],64))],2)):v("v-if",!0)],64)))),256))],4),1!=e.hideClearConditionChange?(d(),c("div",he,[C("div",ue,"已选择"+m(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),C("div",{class:"selected-item-del",onClick:n[4]||(n[4]=e=>Me({sid:"all_data",name:"全部数据",digital:h(we).digital}))},[fe,g(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],512)):v("v-if",!0),v(" 弹出弹窗 "),p(P,{ref:"search",searchFieldList:e.searchFieldList,conditionList:h(Oe),displayCategoryList:h(Ie),settingId:h(Le),tableId:e.tableId,classifyModal:h(Ne),filterApiConfig:e.filterApiConfig,onSaveGetTableCondiTionList:$e,onCondiTionListInit:Qe,onSetClassifyModal:Re},null,8,["searchFieldList","conditionList","displayCategoryList","settingId","tableId","classifyModal","filterApiConfig"])],6))}}),[["__file","index.vue"]]);export{pe as default};
|
|
1
|
+
import e from"./index.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var i=r(e,[["__file","index.vue"]]);export{i as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,useAttrs as i,ref as n,provide as l,computed as t,onMounted as a,nextTick as s,watch as o,openBlock as d,createElementBlock as c,normalizeClass as r,unref as h,normalizeStyle as u,withDirectives as f,createVNode as p,createTextVNode as m,toDisplayString as g,createCommentVNode as v,createElementVNode as C,Fragment as y,renderList as k,createBlock as S,withCtx as b}from"vue";import{useMessage as x,NIcon as O,NTooltip as _}from"naive-ui";import{Repeat as w,SettingsOutline as I,ChevronDown as L,ChevronForward as N,Checkmark as z,Close as j,ChevronUp as B}from"@vicons/ionicons5";import P from"./components/set-classification/index.vue.js";import J from"./directive/flexibleResize.js";import{InjectionFilterApiConfig as M}from"../../table-filter/src/constants/index.js";import{root_isShowResetButton as A}from"./const/index.js";import E from"../../table-filter/src/hooks/useMixins.js";import T from"../../table-filter/src/hooks/useAdvanced.js";const R={key:0,class:"header"},F={class:"tree"},W=["onClick"],q=["onClick"],G=["onClick"],Q={class:"child-item-name"},$={key:1,class:"tree-type-footer"},D={class:"selected-num"},V=C("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),H={key:0,class:"tile-type classify-1"},K={key:0,class:"header"},U={class:"right-setting"},X=["onClick"],Y={class:"parent ellips"},Z={class:"children"},ee=["onClick"],ie={key:1,class:"selected-list"},ne={class:"selected-num"},le=C("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),te={class:"name"},ae={class:"name"},se={key:0,class:"main-wrapper"},oe=["onClick"],de={class:"tree-footer"},ce=["onClick"],re=["onClick"],he={key:0,class:"select-type-footer"},ue={class:"selected-num"},fe=C("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1);var pe=e({__name:"index",props:{tableId:{type:String,default:""},searchFieldList:{type:Array,default:()=>[]},conditionMap:{type:Object,default:()=>({})},conditionSid:{type:Array,default:()=>["all_data"]},curClassificationIndex:{type:Number,default:0},curClassificationWidth:{type:Number},hideConditionChangeBtn:{type:Number,default:0},hideConditionChangeSetting:{type:Number,default:0},hideClearConditionChange:{type:Number,default:1},isShowResetButton:{type:Boolean,default:!0},filterApiConfig:{type:Object,default:()=>({})}},emits:["changeSearch","setClassificationIndex","getQuickSearchListObj"],setup(e,{emit:pe}){const me=e,{handleGetConfigApi:ge}=E(),{transformClassifyChild:ve}=T(),Ce=i(),ye=x(),ke=n(null);let Se=n(150),be=n(!1),xe=n([]),Oe=n([]),_e=n([]),we=n(2),Ie=n({name:"全部数据",sid:"all_data"}),Le=n([]),Ne=n(""),ze=n(!1),je=n("全部数据");l(A,me.isShowResetButton),l(M,me.filterApiConfig);let Be=t((()=>0===we.value?{marginRight:"8px"}:2===we.value?{display:"inline-block"}:{})),Pe=t((()=>{let e=Oe.value.filter((e=>-1!==me.conditionSid.indexOf(e.sid)));if(-1!==me.conditionSid.indexOf("all_data"))return"全部数据";{let i=[];return e.map((e=>{i.push(e.name)})),i.join(",")}})),Je=t((()=>function(e){let i=0===e.digital?"(0)":e.digital?`(${e.digital})`:"";const{name:n,isPublic:l}=e;return Ue(n,l)+i}));function Me(e){e.open?e.open=!1:e.open=!0}function Ae(e,i,n){je.value=e.name;let l=function(e){let i=[];return xe.value.forEach((n=>{n.children?n.children.forEach((n=>{-1!==e.indexOf(n.sid)?(n.selected=!0,i.push(n)):n.selected=!1})):-1!==e.indexOf(n.sid)?(n.selected=!0,i.push(n)):n.selected=!1})),i}(function(e,i,n){let l=JSON.parse(JSON.stringify(i));l="all_data"===e||-1!==l.indexOf(e)?["all_data"]:[e];return l}(e.sid,me.conditionSid));We(!1);const t=ve(null==e?void 0:e.conObj);pe("changeSearch",Boolean("all_data"===e.sid),e,t,n,l)}function Ee(){let e="";if(2===we.value)e=0;else{let i=we.value;e=++i}Se.value=150,Te(e)}async function Te(e,i){let n={tableId:me.tableId,setting:JSON.stringify({classificationIndex:e,classificationWidth:i})};try{await ge(n,"requestSaveListPersonaSetting",{},me.filterApiConfig)&&pe("setClassificationIndex",e)}catch(e){console.log(e)}}function Re(){ze.value=!0,We(!1)}function Fe(e){ze.value=e}function We(e){be.value=void 0===e?!be.value:e}function qe(){if(!me.tableId)return ye.warning("请传入tableId");xe.value=[];let{displayCategoryList:e=[],conditionList:i=[]}=me.conditionMap;Le.value=JSON.parse(JSON.stringify(e))||[],_e.value=JSON.parse(JSON.stringify(i)),Oe.value=JSON.parse(JSON.stringify([{name:"全部数据",sid:"all_data"},...i]));let n=[];var l;0===Le.value.length&&(Le.value=["未分类"]),Le.value.forEach((e=>{let i={name:e,children:[]};Oe.value.forEach((n=>{if(n.displayCategory===e||!n.displayCategory&&"未分类"===e&&"all_data"!==n.sid){if(-1!==me.conditionSid.indexOf(n.sid)){n.selected=!0,i.open=!0;const e=ve(null==n?void 0:n.conObj);pe("changeSearch",!1,n,e)}n.isShow&&i.children.push(n)}})),i.children.length>0&&n.push(i)})),n.unshift({name:"全部数据",sid:"all_data"}),xe.value=n,0===we.value&&(l=!0,xe.value.forEach((e=>{e.children&&e.children.length&&(e.open=l)})))}function Ge({distance:e}){const i=Se.value+e;Se.value=Math.min(Math.max(i,50),650)}function Qe(){Te(we.value,Se.value)}async function $e(){await Ke(me.tableId),Ve()}async function De(e){await Ke(me.tableId),He()}function Ve(e){He(e).then((e=>({})))}function He(e,i={}){if(!me.tableId)return new Promise((e=>e(!1)));let n=Object.keys(i).length>0?i:JSON.parse(JSON.stringify(me.conditionMap));return new Promise(((i,l)=>{var t,a,s,o,d,c;if(Object.keys(n).length>0){_e.value=n.conditionList||[],Le.value=n.displayCategoryList||[];let l={conditionList:_e.value,displayCategoryList:Le.value};pe("getQuickSearchListObj",l),Ne.value=n.settingId;const r=_e.value.find((e=>e.isDefault))||{name:"全部数据",sid:"all_data"};(null==(a=null==(t=Ce.tableOptions)?void 0:t.filterCondition)?void 0:a.displayCategory)&&e&&i({name:null==(o=null==(s=Ce.tableOptions)?void 0:s.filterCondition)?void 0:o.name,sid:null==(c=null==(d=Ce.tableOptions)?void 0:d.filterCondition)?void 0:c.displayCategory}),i(r)}else i({})}))}async function Ke(e){try{if(!e)return new Promise((e=>e(!1)));let i={tableId:e},n=await ge(i,"requestTableCondiTionList",{},me.filterApiConfig);return Promise.resolve(n)}catch(e){return Promise.resolve(!1)}}function Ue(e,i){return i&&e&&"1"===i?e.replace(/\(公共\)$/,""):e}return a((()=>{document.addEventListener("click",(e=>{s((()=>{let i=e.composedPath&&e.composedPath();ke.value&&i.includes(ke.value)||We(!1)}))}))})),o((()=>me.tableId),(e=>{e&&Ve(!0)}),{immediate:!0,deep:!0}),o((()=>me.curClassificationIndex),(e=>{void 0!==e&&(we.value=e)}),{immediate:!0,deep:!0}),o((()=>me.curClassificationWidth),(e=>{e&&(Se.value=Number(e)||150)}),{immediate:!0}),o((()=>me.conditionMap),(e=>{!async function(){try{await qe()}catch(e){console.log(e)}}()}),{immediate:!0,deep:!0}),(i,n)=>(d(),c("div",{class:r(["classification-block","classificationIndex-"+h(we)]),style:u(h(Be))},[0===h(we)?f((d(),c("div",{key:0,class:"tree-type classify-0",style:u({width:h(Se)+"px",paddingBottom:1!=e.hideClearConditionChange?"80px":0,position:"relative"})},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",R,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"header-1",onClick:Ee},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),m(" "+g("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"header-1",onClick:Re},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("设置"))])):v("v-if",!0)])):v("v-if",!0),C("ul",F,[(d(!0),c(y,null,k(h(xe),((i,n)=>(d(),c(y,null,[0===n||!i.children||0===i.children.length||i.children&&0!==i.children.filter((e=>e.isShow)).length?(d(),c("li",{key:n,class:r(["tree-item",{"tree-header":0===n||!i.children||0===i.children.length}])},[0!==n&&i.children&&0!==i.children.length?(d(),c(y,{key:1},[C("span",{class:r(["parent",{open:i.open}]),onClick:e=>Me(i)},[C("span",null,g(i.name),1),p(h(O),{component:i.open?h(L):h(N)},null,8,["component"])],10,q),i.open?(d(!0),c(y,{key:0},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{key:n,class:"children",onClick:n=>Ae(e,0,i)},[e.isShow?(d(),S(h(_),{key:0,trigger:"hover",placement:"right"},{trigger:b((()=>[C("span",{class:r(["child-item",{selected:e.selected}])},[C("span",Q,g(Ue(e.name,null==e?void 0:e.isPublic)),1),e.selected?(d(),S(h(O),{key:0,component:h(z),size:"20"},null,8,["component"])):v("v-if",!0)],2)])),default:b((()=>[C("span",null,g(h(Je)(e)),1)])),_:2},1024)):v("v-if",!0)],8,G)))),128)):v("v-if",!0)],64)):(d(),c("span",{key:0,class:r(["child-item header-item",{selected:i.selected||-1!==e.conditionSid.indexOf("all_data")}]),onClick:e=>Ae(i)},g(i.name),11,W))],2)):v("v-if",!0)],64)))),256))]),1!=e.hideClearConditionChange?(d(),c("div",$,[C("div",D,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),C("div",{class:"selected-item-del",onClick:n[0]||(n[0]=e=>Ae({sid:"all_data",name:"全部数据",digital:h(Ie).digital}))},[V,m(" 清空筛选 ")])])):v("v-if",!0)],4)),[[h(J),{mode:"VR",onMove:Ge,onEnd:Qe}]]):v("v-if",!0),1===h(we)?(d(),c(y,{key:1},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting||1!=e.hideConditionChangeSetting||h(_e).filter((e=>e.isShow)).length>0?(d(),c("div",H,[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",K,[C("span",{class:r(["all-data",{selected:-1!==e.conditionSid.indexOf("all_data")}]),onClick:n[1]||(n[1]=e=>Ae({sid:"all_data",name:"全部数据",digital:h(Ie).digital}))},[m(" 全部数据 "),h(Ie).digital||0===h(Ie).digital?(d(),c(y,{key:0},[m(" ("+g(h(Ie).digital||0)+") ",1)],64)):v("v-if",!0)],2),C("div",U,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"setting-1",onClick:Ee,style:{"margin-right":"30px"}},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),m(" "+g("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"setting-1",onClick:Re},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("设置"))])):v("v-if",!0)])])):v("v-if",!0),C("ul",{class:"tile",style:u({borderBottom:1!=e.hideClearConditionChange?"1px solid #d5d5d5":0})},[(d(!0),c(y,null,k(h(xe).slice(1),((e,i)=>(d(),c(y,null,[e.children&&e.children.length>0?(d(),c("li",{class:"tile-item",key:i},[e.children&&0!==e.children.length?(d(),c(y,{key:1},[C("span",Y,g(e.name),1),C("div",Z,[(d(!0),c(y,null,k(e.children,((i,n)=>(d(),c(y,null,[i.isShow?(d(),c("span",{key:n,class:r(["child-item",{selected:i.selected}]),onClick:n=>Ae(i,0,e)},g(Ue(i.name,null==i?void 0:i.isPublic)),11,ee)):v("v-if",!0)],64)))),256))])],64)):(d(),c("span",{key:0,class:r(["child-item",{selected:e.selected}]),style:{"padding-left":"17px"},onClick:i=>Ae(e)},g(e.name)+" "+g(e.digital),11,X))])):v("v-if",!0)],64)))),256))],4),1!=e.hideClearConditionChange?(d(),c("div",ie,[C("div",ne,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),(d(!0),c(y,null,k(h(xe).slice(1),(e=>(d(),c(y,null,[e.children&&0!==e.children.length?(d(!0),c(y,{key:1},k(e.children,((i,n)=>(d(),c(y,null,[i.selected?(d(),c("div",{class:"selected-item",key:i.sid},[m(g(i.name)+" ",1),p(h(O),{component:h(j),onClick:n=>Ae(i,0,e)},null,8,["component","onClick"])])):v("v-if",!0)],64)))),256)):(d(),c("div",{class:"selected-item",key:e.sid},[m(g(e.name)+" ",1),p(h(O),{component:h(j),onClick:i=>Ae(e)},null,8,["component","onClick"])]))],64)))),256)),C("div",{class:"selected-item-del",onClick:n[2]||(n[2]=e=>Ae({sid:"all_data",name:"全部数据",digital:h(Ie).digital}))},[le,m(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],64)):v("v-if",!0),2===h(we)?(d(),c("div",{key:2,class:"select-type classify-2",ref_key:"selectType",ref:ke},[C("span",{class:"title",onClick:n[3]||(n[3]=()=>We())},[p(h(_),{trigger:"hover",placement:"top"},{trigger:b((()=>[C("span",te,g(h(Pe)),1)])),default:b((()=>[C("span",ae,g(h(Pe)),1)])),_:1}),p(h(O),{component:h(be)?h(B):h(L)},null,8,["component"])]),h(be)?(d(),c("div",se,[C("ul",{class:"tree",style:u({padding:1!=e.hideClearConditionChange?"40px 0":"40px 0 0"})},[(d(!0),c(y,null,k(h(xe),((i,n)=>(d(),c(y,null,[0===n||!i.children||0===i.children.length||i.children&&0!==i.children.filter((e=>e.isShow)).length?(d(),c("li",{key:n,class:r(["tree-item",{"tree-header":0===n||!i.children||0===i.children.length}])},[0!==n&&i.children&&0!==i.children.length?(d(),c(y,{key:1},[0!==i.children.filter((e=>e.isShow)).length?(d(),c("span",{key:0,class:r(["parent",{open:i.open}]),onClick:e=>Me(i)},[m(g(i.name)+g(i.digital||0===i.digital?"("+i.digital+")":"")+" ",1),p(h(O),{component:i.open?h(L):h(N)},null,8,["component"])],10,ce)):v("v-if",!0),i.open?(d(!0),c(y,{key:1},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{key:n,class:"children",onClick:n=>Ae(e,0,i)},[e.isShow?(d(),S(h(_),{key:0,placement:"right",trigger:"hover","z-index":1e4},{trigger:b((()=>[C("span",{class:r(["child-item",{selected:e.selected}])},[C("span",null,g(Ue(e.name,null==e?void 0:e.isPublic)),1),e.selected?(d(),S(h(O),{key:0,component:h(z),size:"20"},null,8,["component"])):v("v-if",!0)],2)])),default:b((()=>[C("span",null,g(h(Je)(e)),1)])),_:2},1024)):v("v-if",!0)],8,re)))),128)):v("v-if",!0)],64)):(d(),c(y,{key:0},[C("span",{class:r(["child-item child-header header-item",{selected:i.selected||-1!==e.conditionSid.indexOf("all_data")}]),onClick:e=>Ae(i)},g(i.name),11,oe),C("div",de,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"tree-footer-icon",onClick:Ee},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),m(" "+g("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"tree-footer-icon",onClick:Re},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("设置"))])):v("v-if",!0)])],64))],2)):v("v-if",!0)],64)))),256))],4),1!=e.hideClearConditionChange?(d(),c("div",he,[C("div",ue,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),C("div",{class:"selected-item-del",onClick:n[4]||(n[4]=e=>Ae({sid:"all_data",name:"全部数据",digital:h(Ie).digital}))},[fe,m(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],512)):v("v-if",!0),v(" 弹出弹窗 "),p(P,{ref:"search",searchFieldList:e.searchFieldList,conditionList:h(_e),displayCategoryList:h(Le),settingId:h(Ne),tableId:e.tableId,classifyModal:h(ze),onSaveGetTableCondiTionList:De,onCondiTionListInit:$e,onSetClassifyModal:Fe},null,8,["searchFieldList","conditionList","displayCategoryList","settingId","tableId","classifyModal"])],6))}});export{pe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@font-face{font-family:classification-iconfont;src:url(classification-iconfont.ttf) format("truetype")}.iconfont-table-filter{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:classification-iconfont!important;font-size:14px;font-style:normal}.icon-table-filter-menzhenyishengzhananniuqingchu:before{content:"\e74e"}.icon-table-filter-menzhenyishengzhananniushanchu2:before{content:"\e757"}.icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi:before{content:"\e76e"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2:before{content:"\e778"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua:before{content:"\e779"}.icon-table-filter-reset:before{content:"\e611"}.icon-table-filter-shaixuan:before{content:"\e64b"}.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter{cursor:pointer;font-size:18px}.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter:last-child{margin-left:16px}.classification-modal-block .n-card-header .svg-wrap .n-icon{cursor:pointer}.classification-modal-block .n-card__content{overflow-y:auto}.classification-modal-block .n-card__content .table-modal-list .list-title{background-color:#f2f2f4;border:1px solid #e1dfdf;display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-title .list-title-item{font-weight:700;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content{padding:0}.classification-modal-block .n-card__content .table-modal-list .list-content li{display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item{align-items:center;display:flex;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item .n-icon{cursor:pointer;margin-right:8px}.classification-modal-block .n-card__content .table-modal-list .list-content li.checked,.classification-modal-block .n-card__content .table-modal-list .list-content li.checked .text{background-color:#f2f2f2}.classification-modal-block .n-card__content .table-modal-list .list-content li .text{background-color:#fff;display:inline-block;padding:0 10px;position:relative}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line{position:relative;text-align:center;width:75%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line:before{border:1px solid #e8e8e8;content:"";left:0;margin-top:20px;position:absolute;width:100%}.classification-modal-block .n-card__content .table-modal-list .list-title-item{margin-left:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item{border-bottom:1px solid #e1dfdf;margin-left:-1px;margin-top:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch{height:16px;min-width:28px;width:28px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch:after{height:12px;width:12px}.classification-modal-block .n-card__content .table-modal-list .list-content-radio,.classification-modal-block .n-card__content .table-modal-list .list-content-switch{text-align:center}.classification-modal-block .n-card__content .table-modal-list .anticon+.anticon{margin-left:8px}.classification-modal-block .n-card__content .class-filter-content .item-name{display:flex;height:32px;line-height:32px;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .item-name .label{text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .item-name .addAction{align-items:center;cursor:pointer;display:flex}.classification-modal-block .n-card__content .class-filter-content .item-name .blue{color:#2d7aff;margin-right:8px}.classification-modal-block .n-card__content .class-filter-content .n-form-item-label{width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content{align-items:center;display:flex;flex-wrap:wrap;line-height:32px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .label{display:inline-block;height:32px;line-height:32px;margin-bottom:10px;text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn-dashed{border-color:#a6a6a6;color:#a6a6a6}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag{margin-bottom:10px;margin-right:10px;position:relative}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .anticon-close{color:#2d7aff;cursor:pointer;line-height:36px;position:absolute;right:5px;top:2px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content{align-items:center;background-color:rgba(45,122,255,.1);border:1px solid #2d7aff;border-radius:3px;box-sizing:border-box;color:#2d7aff;cursor:pointer;display:flex;justify-content:center;opacity:1;padding:0 10px;width:100px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .ant-input-disabled,.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .s-content{background-color:#2d7aff;color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .anticon-close{color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn{margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list{border-top:1px solid #e6e6e6;margin-bottom:6px;margin-top:16px;padding-top:12px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li{align-items:center;display:flex;list-style:none;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .index-span{display:inline-block;width:30px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item{margin-right:10px;width:120px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item.n-date-picker{width:auto}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper{display:flex;flex-wrap:wrap}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper .form-item{margin-right:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .delete-item-icon{color:red;cursor:pointer;font-size:18px}.classification-modal-block .n-card__footer{padding-top:10px}.classification-modal-block .n-card__footer .flex_between{display:flex;justify-content:space-between}.classification-modal-block .n-card__footer .flex_right{display:flex;justify-content:right}.classification-modal-block .n-card__footer .n-button{margin-left:8px}.classification-block .tree-type{border:1px solid #d5d5d5;border-radius:4px;height:100%;line-height:32px;margin-top:0;padding-bottom:80px;width:150px}.classification-block .tree-type .header{border-bottom:1px solid #e6eaef;display:flex;font-size:14px;justify-content:space-between;padding:0 10px}.classification-block .tree-type .header .header-1{align-items:center;cursor:pointer;display:flex}.classification-block .tree-type .tree{height:calc(100% - 32px);line-height:32px;margin:0;overflow:auto;padding-left:0}.classification-block .tree-type .tree::-webkit-scrollbar{width:5px}.classification-block .tree-type .tree .tree-item{border-bottom:1px solid #d5d5d5;cursor:pointer}.classification-block .tree-type .tree .tree-item.tree-header{box-sizing:border-box;padding:0 10px}.classification-block .tree-type .tree .tree-item .parent{align-items:center;display:flex;font-weight:600;justify-content:space-between;padding:0 10px}.classification-block .tree-type .tree .tree-item .parent.open{background-color:#f2f2f2;border-bottom:1px solid #d5d5d5}.classification-block .tree-type .tree .tree-item .header-item{box-sizing:border-box;line-height:1.4}.classification-block .tree-type .tree .tree-item .header-item.selected,.classification-block .tree-type .tree .tree-item .header-item:hover{color:#2d7aff}.classification-block .tree-type .tree .tree-item .header-item:active{border-color:transparent;color:#000}.classification-block .tree-type .tree .tree-item .children{align-items:center;display:flex;height:32px;padding-left:23px;padding-right:10px}.classification-block .tree-type .tree .tree-item .children .child-item{align-items:center;border-bottom:1px solid transparent;color:#7c7c7c;display:flex;line-height:1.5;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-block .tree-type .tree .tree-item .children .child-item:hover{color:#2d7aff}.classification-block .tree-type .tree .tree-item .children .child-item.selected{align-items:center;color:#2d7aff;display:flex;justify-content:space-between;width:100%}.classification-block .tree-type .tree .tree-item .children .child-item:active{border-color:transparent;color:#000}.classification-block .tree-type .tree .tree-item .children .child-item.disabled{color:rgba(0,0,0,.2)}.classification-block .tree-type .tree .tree-item .children .child-item .child-item-content{align-items:center;display:flex}.classification-block .tree-type .tree .tree-item .children .child-item .child-item-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-block .tree-type .tree .tree-item .children .child-item .digital-span{flex:1;margin-left:5px;text-align:left}.classification-block .tree-type .tree .tree-item:last-child{border-bottom:none}.classification-block .tree-type .tree-type-footer{border-top:1px solid #d5d5d5;bottom:0;height:80px;line-height:20px;padding-left:16px;position:absolute;width:100%}.classification-block .tree-type .tree-type-footer .selected-num{margin:10px}.classification-block .tree-type .tree-type-footer .selected-item-del{align-items:center;color:#2474ff;cursor:pointer;display:flex;justify-content:center;margin-left:0}.classification-block .tile-type{border:1px solid #d5d5d5;border-radius:4px;margin-bottom:8px;padding:0 17px}.classification-block .tile-type .header{align-items:center;border-bottom:1px solid #d5d5d5;display:inline-flex;justify-content:space-between;line-height:44px;width:100%}.classification-block .tile-type .header .all-data{border-bottom:1px solid transparent;font-family:PingFangSC-Medium,PingFang SC;font-size:14px;font-weight:500;line-height:1.4;margin-right:auto}.classification-block .tile-type .header .all-data:hover{color:#2d7aff}.classification-block .tile-type .header .all-data:active{border-color:transparent;color:#000}.classification-block .tile-type .header .selected{color:#2d7aff}.classification-block .tile-type .header .right-setting{display:flex}.classification-block .tile-type .header .right-setting .setting-1{align-items:center;cursor:pointer;display:flex}.classification-block .tile-type .header .right-setting .setting-1 .n-icon{margin-right:6px}.classification-block .tile-type .header .right-setting .upack-up-btn{color:#2d7aff}.classification-block .tile-type .tile{border-bottom:1px solid #d5d5d5;margin:0;padding:9px 0}.classification-block .tile-type .tile .tile-item{cursor:pointer;display:flex;line-height:38px}.classification-block .tile-type .tile .tile-item .parent{box-sizing:border-box;font-family:PingFangSC-Medium,PingFang SC;font-size:14px;font-weight:600;max-width:135px;padding-right:16px;width:135px}.classification-block .tile-type .tile .tile-item .children{flex:1}.classification-block .tile-type .tile .tile-item .children .child-item{border-bottom:1px solid transparent;border-radius:4px;color:#7c7c7c;display:inline-block;font-size:14px;line-height:1.5;margin:0 5px;padding:1px 6px}.classification-block .tile-type .tile .tile-item .children .child-item.selected,.classification-block .tile-type .tile .tile-item .children .child-item:hover{background-color:rgba(45,122,255,.1);color:#2d7aff}.classification-block .tile-type .tile .tile-item .children .child-item:active{border-color:transparent;color:#000}.classification-block .tile-type .tile .tile-item .children .child-item.disabled{color:rgba(0,0,0,.2)}.classification-block .tile-type .tile .tile-item .child-item.selected{color:#2d7aff}.classification-block .tile-type .selected-list{align-items:center;display:flex;padding:12px 6px}.classification-block .tile-type .selected-list .selected-num{font-size:14px;line-height:20px;margin-right:8px}.classification-block .tile-type .selected-list .selected-item{align-items:center;background-color:rgba(45,122,255,.1);border-radius:4px;color:#2d7aff;cursor:pointer;display:flex;margin-left:8px;padding:1px 8px}.classification-block .tile-type .selected-list .selected-item-del{align-items:center;color:#2474ff;cursor:pointer;display:flex;font-size:14px;line-height:20px;margin-left:22px}.classification-block .select-type{height:32px;line-height:32px;margin-bottom:8px;margin-right:8px;position:relative;width:100px}.classification-block .select-type .title{align-items:center;border:1px solid #d5d5d5;border-radius:4px;box-sizing:border-box;color:#969696;cursor:pointer;display:flex;font-size:12px;height:100%;justify-content:space-between;padding:0 8px;width:100%}.classification-block .select-type .title>.name{color:#212121;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-block .select-type .main-wrapper{background-color:#fff;border:1px solid #d5d5d5;border-radius:4px;min-width:270px;position:absolute;top:39px;width:100%;z-index:3000}.classification-block .select-type .main-wrapper::-webkit-scrollbar{width:5px}.classification-block .select-type .tree{margin:0;max-height:300px;overflow:auto;padding:32px 0}.classification-block .select-type .tree .tree-item{border-bottom:1px solid #d5d5d5;cursor:pointer;line-height:32px}.classification-block .select-type .tree .tree-item.tree-header{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;height:40px;padding:0 10px;position:absolute;top:0;width:100%;z-index:1}.classification-block .select-type .tree .tree-item .tree-footer{align-items:center;color:rgba(0,0,0,.6);display:flex}.classification-block .select-type .tree .tree-item .tree-footer .tree-footer-icon{align-items:center;cursor:pointer;display:flex}.classification-block .select-type .tree .tree-item .tree-footer .tree-footer-icon .n-icon{margin-right:6px}.classification-block .select-type .tree .tree-item .tree-footer .tree-footer-icon:first-child{margin-right:16px}.classification-block .select-type .tree .tree-item .parent{align-items:center;display:flex;font-weight:600;justify-content:space-between;padding:0 10px}.classification-block .select-type .tree .tree-item .parent.open{background-color:#f2f2f2;border-bottom:1px solid #d5d5d5}.classification-block .select-type .tree .tree-item .header-item{border-bottom:1px solid transparent;color:rgba(0,0,0,.6);flex:1}.classification-block .select-type .tree .tree-item .header-item.selected,.classification-block .select-type .tree .tree-item .header-item:hover{color:#2d7aff}.classification-block .select-type .tree .tree-item .header-item:active{border-color:transparent;color:#000}.classification-block .select-type .tree .tree-item .children{align-items:center;display:flex;height:32px;line-height:32px;padding-left:23px;padding-right:10px}.classification-block .select-type .tree .tree-item .children .child-item{border-bottom:1px solid transparent;color:#7c7c7c;display:inline-block;line-height:1.5;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-block .select-type .tree .tree-item .children .child-item.child-header{padding:0 10px}.classification-block .select-type .tree .tree-item .children .child-item.header-item{border-bottom:1px solid transparent;color:rgba(0,0,0,.6)}.classification-block .select-type .tree .tree-item .children .child-item.header-item.selected,.classification-block .select-type .tree .tree-item .children .child-item.header-item:hover{color:#2d7aff}.classification-block .select-type .tree .tree-item .children .child-item.header-item:active{border-color:transparent;color:#000}.classification-block .select-type .tree .tree-item .children .child-item:hover{color:#2d7aff}.classification-block .select-type .tree .tree-item .children .child-item.selected{align-items:center;color:#2d7aff;display:flex;justify-content:space-between;width:100%}.classification-block .select-type .tree .tree-item .children .child-item:active{border-color:transparent;color:#000}.classification-block .select-type .tree .tree-item .children .child-item.disabled{color:rgba(0,0,0,.2)}.classification-block .select-type .tree .tree-item:last-child{border-bottom:0}.classification-block .select-type .select-type-footer{align-items:center;background-color:#fff;border-top:1px solid #d5d5d5;bottom:0;display:flex;height:40px;justify-content:space-between;padding:0 12px;position:absolute;width:100%}.classification-block .select-type .select-type-footer .selected-num{color:rgba(0,0,0,.6)}.classification-block .select-type .select-type-footer .selected-item-del{color:#2474ff;cursor:pointer}
|
|
1
|
+
@font-face{font-family:classification-iconfont;src:url(classification-iconfont.ttf) format("truetype")}.iconfont-table-filter{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:classification-iconfont!important;font-size:14px;font-style:normal}.icon-table-filter-menzhenyishengzhananniuqingchu:before{content:"\e74e"}.icon-table-filter-menzhenyishengzhananniushanchu2:before{content:"\e757"}.icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi:before{content:"\e76e"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2:before{content:"\e778"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua:before{content:"\e779"}.icon-table-filter-reset:before{content:"\e611"}.icon-table-filter-shaixuan:before{content:"\e64b"}.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter{cursor:pointer;font-size:18px}.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter:last-child{margin-left:16px}.classification-modal-block .n-card-header .svg-wrap .n-icon{cursor:pointer}.classification-modal-block .n-card__content{overflow-y:auto}.classification-modal-block .n-card__content .table-modal-list .list-title{background-color:#f2f2f4;border:1px solid #e1dfdf;display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-title .list-title-item{font-weight:700;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content{padding:0}.classification-modal-block .n-card__content .table-modal-list .list-content li{display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item{align-items:center;display:flex;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item .n-icon{cursor:pointer;margin-right:8px}.classification-modal-block .n-card__content .table-modal-list .list-content li.checked,.classification-modal-block .n-card__content .table-modal-list .list-content li.checked .text{background-color:#f2f2f2}.classification-modal-block .n-card__content .table-modal-list .list-content li .text{background-color:#fff;display:inline-block;padding:0 10px;position:relative}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line{position:relative;text-align:center;width:75%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line:before{border:1px solid #e8e8e8;content:"";left:0;margin-top:20px;position:absolute;width:100%}.classification-modal-block .n-card__content .table-modal-list .list-title-item{margin-left:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item{border-bottom:1px solid #e1dfdf;margin-left:-1px;margin-top:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch{height:16px;min-width:28px;width:28px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch:after{height:12px;width:12px}.classification-modal-block .n-card__content .table-modal-list .list-content-radio,.classification-modal-block .n-card__content .table-modal-list .list-content-switch{text-align:center}.classification-modal-block .n-card__content .table-modal-list .anticon+.anticon{margin-left:8px}.classification-modal-block .n-card__content .class-filter-content .item-name{display:flex;height:32px;line-height:32px;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .item-name .label{text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .item-name .addAction{align-items:center;cursor:pointer;display:flex}.classification-modal-block .n-card__content .class-filter-content .item-name .blue{color:#2d7aff;margin-right:8px}.classification-modal-block .n-card__content .class-filter-content .n-form-item-label{width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content{align-items:center;display:flex;flex-wrap:wrap;line-height:32px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .label{display:inline-block;height:32px;line-height:32px;margin-bottom:10px;text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn-dashed{border-color:#a6a6a6;color:#a6a6a6}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag{margin-bottom:10px;margin-right:10px;position:relative}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .anticon-close{color:#2d7aff;cursor:pointer;line-height:36px;position:absolute;right:5px;top:2px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content{align-items:center;background-color:rgba(45,122,255,.1);border:1px solid #2d7aff;border-radius:3px;box-sizing:border-box;color:#2d7aff;cursor:pointer;display:flex;justify-content:center;opacity:1;padding:0 10px;width:100px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .ant-input-disabled,.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .s-content{background-color:#2d7aff;color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .anticon-close{color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn{margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list{border-top:1px solid #e6e6e6;margin-bottom:6px;margin-top:16px;padding-top:12px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li{align-items:center;display:flex;list-style:none;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .index-span{display:inline-block;width:30px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item{margin-right:10px;width:120px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item.n-date-picker{width:auto}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper{display:flex}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper .form-item{margin-right:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .delete-item-icon{color:red;cursor:pointer;font-size:18px;margin-left:8px}.classification-modal-block .n-card__footer{padding-top:10px}.classification-modal-block .n-card__footer .flex_between{display:flex;justify-content:space-between}.classification-modal-block .n-card__footer .flex_right{display:flex;justify-content:right}.classification-modal-block .n-card__footer .n-button{margin-left:8px}.classification-block .tree-type{border:1px solid #d5d5d5;border-radius:4px;height:100%;line-height:32px;margin-top:0;padding-bottom:80px;width:150px}.classification-block .tree-type .header{border-bottom:1px solid #e6eaef;display:flex;font-size:14px;justify-content:space-between;padding:0 10px}.classification-block .tree-type .header .header-1{align-items:center;cursor:pointer;display:flex}.classification-block .tree-type .tree{height:calc(100% - 32px);line-height:32px;margin:0;overflow:auto;padding-left:0}.classification-block .tree-type .tree::-webkit-scrollbar{width:5px}.classification-block .tree-type .tree .tree-item{border-bottom:1px solid #d5d5d5;cursor:pointer}.classification-block .tree-type .tree .tree-item.tree-header{box-sizing:border-box;padding:0 10px}.classification-block .tree-type .tree .tree-item .parent{align-items:center;display:flex;font-weight:600;justify-content:space-between;padding:0 10px}.classification-block .tree-type .tree .tree-item .parent.open{background-color:#f2f2f2;border-bottom:1px solid #d5d5d5}.classification-block .tree-type .tree .tree-item .header-item{box-sizing:border-box;line-height:1.4}.classification-block .tree-type .tree .tree-item .header-item.selected,.classification-block .tree-type .tree .tree-item .header-item:hover{color:#2d7aff}.classification-block .tree-type .tree .tree-item .header-item:active{border-color:transparent;color:#000}.classification-block .tree-type .tree .tree-item .children{align-items:center;display:flex;height:32px;padding-left:23px;padding-right:10px}.classification-block .tree-type .tree .tree-item .children .child-item{align-items:center;border-bottom:1px solid transparent;color:#7c7c7c;display:flex;line-height:1.5;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-block .tree-type .tree .tree-item .children .child-item:hover{color:#2d7aff}.classification-block .tree-type .tree .tree-item .children .child-item.selected{align-items:center;color:#2d7aff;display:flex;justify-content:space-between;width:100%}.classification-block .tree-type .tree .tree-item .children .child-item:active{border-color:transparent;color:#000}.classification-block .tree-type .tree .tree-item .children .child-item.disabled{color:rgba(0,0,0,.2)}.classification-block .tree-type .tree .tree-item .children .child-item .child-item-content{align-items:center;display:flex}.classification-block .tree-type .tree .tree-item .children .child-item .child-item-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-block .tree-type .tree .tree-item .children .child-item .digital-span{flex:1;margin-left:5px;text-align:left}.classification-block .tree-type .tree .tree-item:last-child{border-bottom:none}.classification-block .tree-type .tree-type-footer{border-top:1px solid #d5d5d5;bottom:0;height:80px;line-height:20px;padding-left:16px;position:absolute;width:100%}.classification-block .tree-type .tree-type-footer .selected-num{margin:10px}.classification-block .tree-type .tree-type-footer .selected-item-del{align-items:center;color:#2474ff;cursor:pointer;display:flex;justify-content:center;margin-left:0}.classification-block .tile-type{border:1px solid #d5d5d5;border-radius:4px;margin-bottom:8px;padding:0 17px}.classification-block .tile-type .header{align-items:center;border-bottom:1px solid #d5d5d5;display:inline-flex;justify-content:space-between;line-height:44px;width:100%}.classification-block .tile-type .header .all-data{border-bottom:1px solid transparent;font-family:PingFangSC-Medium,PingFang SC;font-size:14px;font-weight:500;line-height:1.4;margin-right:auto}.classification-block .tile-type .header .all-data:hover{color:#2d7aff}.classification-block .tile-type .header .all-data:active{border-color:transparent;color:#000}.classification-block .tile-type .header .selected{color:#2d7aff}.classification-block .tile-type .header .right-setting{display:flex}.classification-block .tile-type .header .right-setting .setting-1{align-items:center;cursor:pointer;display:flex}.classification-block .tile-type .header .right-setting .setting-1 .n-icon{margin-right:6px}.classification-block .tile-type .header .right-setting .upack-up-btn{color:#2d7aff}.classification-block .tile-type .tile{border-bottom:1px solid #d5d5d5;margin:0;padding:9px 0}.classification-block .tile-type .tile .tile-item{cursor:pointer;display:flex;line-height:38px}.classification-block .tile-type .tile .tile-item .parent{box-sizing:border-box;font-family:PingFangSC-Medium,PingFang SC;font-size:14px;font-weight:600;max-width:135px;padding-right:16px;width:135px}.classification-block .tile-type .tile .tile-item .children{flex:1}.classification-block .tile-type .tile .tile-item .children .child-item{border-bottom:1px solid transparent;border-radius:4px;color:#7c7c7c;display:inline-block;font-size:14px;line-height:1.5;margin:0 5px;padding:1px 6px}.classification-block .tile-type .tile .tile-item .children .child-item.selected,.classification-block .tile-type .tile .tile-item .children .child-item:hover{background-color:rgba(45,122,255,.1);color:#2d7aff}.classification-block .tile-type .tile .tile-item .children .child-item:active{border-color:transparent;color:#000}.classification-block .tile-type .tile .tile-item .children .child-item.disabled{color:rgba(0,0,0,.2)}.classification-block .tile-type .tile .tile-item .child-item.selected{color:#2d7aff}.classification-block .tile-type .selected-list{align-items:center;display:flex;padding:12px 6px}.classification-block .tile-type .selected-list .selected-num{font-size:14px;line-height:20px;margin-right:8px}.classification-block .tile-type .selected-list .selected-item{align-items:center;background-color:rgba(45,122,255,.1);border-radius:4px;color:#2d7aff;cursor:pointer;display:flex;margin-left:8px;padding:1px 8px}.classification-block .tile-type .selected-list .selected-item-del{align-items:center;color:#2474ff;cursor:pointer;display:flex;font-size:14px;line-height:20px;margin-left:22px}.classification-block .select-type{height:32px;line-height:32px;margin-bottom:8px;margin-right:8px;position:relative;width:100px}.classification-block .select-type .title{align-items:center;border:1px solid #d5d5d5;border-radius:4px;box-sizing:border-box;color:#969696;cursor:pointer;display:flex;font-size:12px;height:100%;justify-content:space-between;padding:0 8px;width:100%}.classification-block .select-type .title>.name{color:#212121;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-block .select-type .main-wrapper{background-color:#fff;border:1px solid #d5d5d5;border-radius:4px;min-width:270px;position:absolute;top:39px;width:100%;z-index:3000}.classification-block .select-type .main-wrapper::-webkit-scrollbar{width:5px}.classification-block .select-type .tree{margin:0;max-height:300px;overflow:auto;padding:32px 0}.classification-block .select-type .tree .tree-item{border-bottom:1px solid #d5d5d5;cursor:pointer;line-height:32px}.classification-block .select-type .tree .tree-item.tree-header{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;height:40px;padding:0 10px;position:absolute;top:0;width:100%;z-index:1}.classification-block .select-type .tree .tree-item .tree-footer{align-items:center;color:rgba(0,0,0,.6);display:flex}.classification-block .select-type .tree .tree-item .tree-footer .tree-footer-icon{align-items:center;cursor:pointer;display:flex}.classification-block .select-type .tree .tree-item .tree-footer .tree-footer-icon .n-icon{margin-right:6px}.classification-block .select-type .tree .tree-item .tree-footer .tree-footer-icon:first-child{margin-right:16px}.classification-block .select-type .tree .tree-item .parent{align-items:center;display:flex;font-weight:600;justify-content:space-between;padding:0 10px}.classification-block .select-type .tree .tree-item .parent.open{background-color:#f2f2f2;border-bottom:1px solid #d5d5d5}.classification-block .select-type .tree .tree-item .header-item{border-bottom:1px solid transparent;color:rgba(0,0,0,.6);flex:1}.classification-block .select-type .tree .tree-item .header-item.selected,.classification-block .select-type .tree .tree-item .header-item:hover{color:#2d7aff}.classification-block .select-type .tree .tree-item .header-item:active{border-color:transparent;color:#000}.classification-block .select-type .tree .tree-item .children{align-items:center;display:flex;height:32px;line-height:32px;padding-left:23px;padding-right:10px}.classification-block .select-type .tree .tree-item .children .child-item{border-bottom:1px solid transparent;color:#7c7c7c;display:inline-block;line-height:1.5;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-block .select-type .tree .tree-item .children .child-item.child-header{padding:0 10px}.classification-block .select-type .tree .tree-item .children .child-item.header-item{border-bottom:1px solid transparent;color:rgba(0,0,0,.6)}.classification-block .select-type .tree .tree-item .children .child-item.header-item.selected,.classification-block .select-type .tree .tree-item .children .child-item.header-item:hover{color:#2d7aff}.classification-block .select-type .tree .tree-item .children .child-item.header-item:active{border-color:transparent;color:#000}.classification-block .select-type .tree .tree-item .children .child-item:hover{color:#2d7aff}.classification-block .select-type .tree .tree-item .children .child-item.selected{align-items:center;color:#2d7aff;display:flex;justify-content:space-between;width:100%}.classification-block .select-type .tree .tree-item .children .child-item:active{border-color:transparent;color:#000}.classification-block .select-type .tree .tree-item .children .child-item.disabled{color:rgba(0,0,0,.2)}.classification-block .select-type .tree .tree-item:last-child{border-bottom:0}.classification-block .select-type .select-type-footer{align-items:center;background-color:#fff;border-top:1px solid #d5d5d5;bottom:0;display:flex;height:40px;justify-content:space-between;padding:0 12px;position:absolute;width:100%}.classification-block .select-type .select-type-footer .selected-num{color:rgba(0,0,0,.6)}.classification-block .select-type .select-type-footer .selected-item-del{color:#2474ff;cursor:pointer}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"./DatePicker.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var t=r(e,[["__file","DatePicker.vue"]]);export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,useAttrs as t,ref as n,computed as l,openBlock as u,createBlock as a,unref as o,mergeProps as r,createSlots as i,renderList as s,withCtx as d,renderSlot as p,nextTick as v}from"vue";import{NDatePicker as f}from"naive-ui";import"../../../shared/utils/index.js";import"lodash-es";import{useDateTime as c}from"../../../shared/hooks/useDateTime.js";import{format as y}from"date-fns";var m=e({__name:"DatePicker",props:{updateUnchangedValue:{type:Boolean},onConfirm:{type:Function}},setup(e,{expose:m}){const h=e,g=t(),M=n(null),R=n(null),k=l((()=>{const e=Reflect.get(g,"type")||"";return["datetime","datetimerange"].includes(e)})),$=l((()=>{if(Reflect.get(g,"format"))return g.format;const e=g.type||"";return k.value?"yyyy-MM-dd HH:mm:ss":"month"===e?"yyyy-MM":"year"===e?"yyyy":"yyyy-MM-dd"})),w=l((()=>k.value?$.value.split(" "):"")),{focus:E,blur:I}=c(M,$,g);function _(e){e&&k.value&&v((()=>{var e;R.value=null==(e=M.value)?void 0:e.panelInstRef,c(R,w,g)}))}function x(...e){var t,n,l,u,a;null==(t=h.onConfirm)||t.call(h,...e);const o=Reflect.get(g,"type")||"",r=null==(a=null==(u=null==(l=null==(n=M.value)?void 0:n.inputInstRef)?void 0:l.$el)?void 0:u.querySelector)?void 0:a.call(u,"input");if(!(null==r?void 0:r.value)||!h.updateUnchangedValue||o.includes("range"))return;const i=r.value;r.value=y(new Date,$.value),r.dispatchEvent(new InputEvent("input")),r.value=i,r.dispatchEvent(new InputEvent("input"))}return m({$datePicker:M,focus:E,blur:I}),(e,t)=>(u(),a(o(f),r({ref_key:"datePickerRef",ref:M},e.$attrs,{"onUpdate:show":_,onConfirm:x}),i({_:2},[s(e.$slots,((t,n)=>({name:n,fn:d((()=>[p(e.$slots,n)]))})))]),1040))}});export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from"./FabricChart.vue2.js";import e from"../../../_virtual/_plugin-vue_export-helper.js";var a=e(r,[["__file","FabricChart.vue"]]);export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,computed as t,ref as r,onMounted as o,onBeforeUnmount as s,openBlock as a,createElementBlock as n,Fragment as p,createElementVNode as i,createBlock as u,mergeProps as l,unref as c,createCommentVNode as m}from"vue";import{fabric as f}from"./utils/index.js";import v from"./components/PopupTip.vue.js";import h from"./components/PopupMenu.js";import d from"./hooks/useTemperatureChart.js";import k from"./hooks/useBirthProcessChart.js";var w=e({__name:"FabricChart",props:{type:{type:String,default:"temperature"},data:{type:Object,required:!0},addRenderItem:{type:Function}},emits:["change","add","remove","select","add:prevent"],setup(e,{expose:w,emit:C}){const y=e,P=t((()=>"temperature"===y.type)),g=r(null),j=r(),{propItems:I,redrawPoints:M,select:b,pointTipProps:x,pointMenuProps:R,clickMenu:T}=function(){const e=[j,y,C,g];return P.value?d(...e):k(...e)}();return o((()=>{j.value=new f.Canvas(g.value,{width:I.canvasWidth,height:I.canvasHeight,backgroundColor:"#fff",selection:!1,containerClass:"c-fabric-chart",fireRightClick:!0})})),s((()=>{j.value.off(),j.value.clear()})),w({redrawPoints:M,select:b,canvas:j}),(e,t)=>(a(),n(p,null,[i("canvas",{ref_key:"canvasRef",ref:g},null,512),j.value?(a(),u(v,l({key:0,propItems:c(I)},c(x)),null,16,["propItems"])):m("v-if",!0),j.value?(a(),u(c(h),l({key:1,propItems:c(I)},c(R),{show:c(R).show,"onUpdate:show":t[0]||(t[0]=e=>c(R).show=e),onClickMenu:c(T)}),null,16,["propItems","show","onClickMenu"])):m("v-if",!0)],64))}});export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import p from"./PopupTip.vue2.js";import e from"../../../../_virtual/_plugin-vue_export-helper.js";var r=e(p,[["__file","PopupTip.vue"]]);export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as t,openBlock as l,createBlock as p,Teleport as o,withDirectives as e,createElementVNode as r,normalizeStyle as s,unref as u,createElementBlock as a,Fragment as i,renderList as c,toDisplayString as n,vShow as f}from"vue";import m from"./useStyle.js";var h=t({__name:"PopupTip",props:{show:{type:Boolean,default:!1},point:null,list:{default:()=>[]},propItems:null},setup(t){const h=m(t);return(m,y)=>(l(),p(o,{to:".c-fabric-chart"},[e(r("ul",{class:"c-fabric-chart-popup-tip",style:s(u(h))},[(l(!0),a(i,null,c(t.list,(t=>(l(),a("li",{key:t},n(t),1)))),128))],4),[[f,t.show]])]))}});export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isNull as n}from"lodash-es";function t(n){return(null==n?void 0:n.time)&&((null==n?void 0:n.value)||0===(null==n?void 0:n.value))}function e(n,t){const e={};for(const u in n)t.map((n=>n.type)).includes(u)||(e[u]=n[u]);return e}function u(n,t){const e=t.findIndex((t=>new Date(t.time).getTime()>new Date(n).getTime()));return~e?e:t.length}function r(n){return["temperature","pulse"].includes(n)}function o(n,t){return n.includes("心率")?"pulse_other":t}function i(n){return n.includes("_other")?n.split("_")[0]:n}function l(t){return!Number.isNaN(+t)&&!n(t)}function c(n,t){return f(n.left,1)===f(t.left,1)&&f(n.top,1)
|
|
1
|
+
import{isNull as n}from"lodash-es";function t(n){return(null==n?void 0:n.time)&&((null==n?void 0:n.value)||0===(null==n?void 0:n.value))}function e(n,t){const e={};for(const u in n)t.map((n=>n.type)).includes(u)||(e[u]=n[u]);return e}function u(n,t){const e=t.findIndex((t=>new Date(t.time).getTime()>new Date(n).getTime()));return~e?e:t.length}function r(n){return["temperature","pulse"].includes(n)}function o(n,t){return n.includes("心率")?"pulse_other":t}function i(n){return n.includes("_other")?n.split("_")[0]:n}function l(t){return!Number.isNaN(+t)&&!n(t)}function c(n,t){return f(n.left,1)===f(t.left,1)&&Math.abs(f(n.top,1)-f(t.top,1))<=2}function f(n,t=100){return Math.floor(n*t)/t}export{e as deleteProperty,f as getFloorNumber,u as getIndex,i as getType,t as isEffectiveNode,r as isOneLine,c as isOverlapPoint,l as isValidValue,o as setOtherType};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"./FieldSet.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var t=r(e,[["__file","FieldSet.vue"]]);export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,ref as l,watch as t,openBlock as i,createElementBlock as d,createElementVNode as a,Fragment as o,renderList as c,normalizeStyle as s,createBlock as n,unref as r,withCtx as f,createTextVNode as u,toDisplayString as p,createCommentVNode as h,createVNode as b,withDirectives as v,vShow as y,renderSlot as k}from"vue";import{NCheckbox as x,NTooltip as m,NIcon as g,NSelect as A,NInput as _,NInputNumber as E,NPopconfirm as S,NButton as w}from"naive-ui";import W from"../../../shared/components/VueDraggable/src/vuedraggable.js";import{ReorderTwoOutline as N}from"@vicons/ionicons5";const U={class:"c-field-set"},F={class:"c-field-set__table-header"},O={class:"c-field-set__table-body"},R=["tabindex"],q=["title"],D=a("span",null,"拖拽调整顺序",-1),C={key:0,class:"c-field-set__table-footer"};var T=e({__name:"FieldSet",props:{fields:{type:Array,default:function(){return[]}},footerFlag:{type:Boolean,default:!0},type:{type:String,default:"old"},isEdit:{type:Boolean,default:!1}},emits:["save","close","reset"],setup(e,{expose:T,emit:j}){const P=e,B={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"},G=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],H=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}],I=l([]),J=l([{title:"所有字段",type:"text",field:"title"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"show"},{title:"编辑",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"editable"},{title:"必填",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"required"},{title:"排序",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"sort"},{title:"加粗",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"bold"},{title:"默认排序",type:"select",field:"sortDirection"},{title:"固定",type:"select",field:"fixedWay"},{title:"自定义标题",type:"input",field:"alias"},{title:"列宽",type:"inputNumber",field:"columnWidth"}]),L=()=>{j("save",{tableFields:Q()})},$=()=>{j("close")};function V(){I.value=M(),Y(),j("reset")}function z(e){return"fixedWay"===e.field?G:H}function K(e){const l={flex:"1 1 90px"};switch(e.type){case"text":Object.assign(l,{flex:"0 0 120px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"});break;case"checkbox":l.flex="1 1 60px";break;case"select":l.flex="1 1 80px";break;case"input":l.flex="1 1 100px"}return l}function M(){const e=JSON.parse(JSON.stringify(P.fields||[]));return Object.keys(B).forEach((l=>{e.forEach((e=>{"old"==P.type&&Reflect.has(e,l)&&("isFixed"==l?e.fixedWay=1==e[l]?"LEFT":2==e[l]?"RIGHT":"NONE":["isShow","isSort"].includes(l)&&"boolean"!=typeof l?e[B[l]]=1==e[l]:e[B[l]]=e[l],Reflect.deleteProperty(e,l)),e.columnWidth=+e.columnWidth||null,Reflect.has(e,"alias")||(e.alias=""),Reflect.has(e,"bold")||(e.bold=!1)}))})),e}const Q=()=>{if("old"==P.type){const e=[];return I.value.length>0&&I.value.forEach(((l,t)=>{e.push({id:l.id,field:l.name,visible:l.show,sequence:t,sortable:l.sort,title:l.alias,fixed:l.fixedWay,minWidth:l.columnWidth,bold:l.bold,sortDirection:l.sortDirection,...P.isEdit?{required:l.required,editable:l.editable}:{}})})),e}return I.value};function X(e,l){return["editable","required"].includes(l)&&e[`${l}Disable`]||["sort"].includes(l)&&1==e.notParticipatingSort}function Y(){J.value.forEach((e=>{if(function(e){const l=["editable","required"].includes(e.field);return l&&P.isEdit||!l}(e)&&(e.isShow=!0),"checkbox"===e.type){const l=I.value.every((l=>!Reflect.has(l,e.field)));e.checkedAll=!Z(e.field)&&!l}}))}function Z(e){return I.value.some((l=>!X(l,e)&&!l[e]&&"0001"!=l.id))}return t((()=>P.fields),(e=>{(null==e?void 0:e.length)>0&&(I.value=M(),Y())}),{immediate:!0,deep:!0}),T({getTableFields:Q}),(l,t)=>(i(),d("div",U,[a("div",F,[(i(!0),d(o,null,c(J.value,((e,l)=>(i(),d(o,{key:l},[e.isShow?(i(),d("span",{key:0,class:"table-cell",style:s(K(e))},["checkbox"===e.type?(i(),n(r(x),{key:0,checked:e.checkedAll,"onUpdate:checked":[l=>e.checkedAll=l,l=>{return t=l,i=e.field,void I.value.forEach((e=>{X(e,i)||(e[i]=t)}));var t,i}],disabled:e.disabledAll},{default:f((()=>[u(p(e.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])):h("v-if",!0),u(" "+p("checkbox"!==e.type?e.title:""),1)],4)):h("v-if",!0)],64)))),128))]),a("div",O,[b(r(W),{list:I.value,animation:"150","item-key":"id",tag:"ul"},{item:f((({element:e,index:l})=>[e.hide?h("v-if",!0):(i(),d("li",{key:0,tabindex:l},[(i(!0),d(o,null,c(J.value,((l,t)=>(i(),d(o,{key:t},[l.isShow?(i(),d("span",{key:0,class:"table-cell",title:e[l.field],style:s(K(l))},["text"===l.type?(i(),d(o,{key:0},[b(r(m),{trigger:"hover"},{trigger:f((()=>[b(r(g),{style:{"margin-right":"5px",top:"2px"},component:r(N)},null,8,["component"])])),default:f((()=>[D])),_:1}),u(" "+p(e[l.field]),1)],64)):h("v-if",!0),"checkbox"===l.type?v((i(),n(r(x),{key:1,disabled:X(e,l.field),checked:e[l.field],"onUpdate:checked":[t=>e[l.field]=t,e=>function(e,l){const t=!e||Z(l.field);l.checkedAll=!t}(e,l)]},null,8,["disabled","checked","onUpdate:checked"])),[[y,"0001"!=e.id]]):h("v-if",!0),"select"===l.type?v((i(),n(r(A),{key:2,value:e[l.field],"onUpdate:value":t=>e[l.field]=t,options:z(l)},null,8,["value","onUpdate:value","options"])),[[y,"fixedWay"===l.field||"0001"!=e.id]]):h("v-if",!0),"input"===l.type?v((i(),n(r(_),{key:3,value:e[l.field],"onUpdate:value":t=>e[l.field]=t,clearable:""},null,8,["value","onUpdate:value"])),[[y,"0001"!=e.id]]):h("v-if",!0),"inputNumber"===l.type?(i(),n(r(E),{key:4,value:e[l.field],"onUpdate:value":t=>e[l.field]=t},null,8,["value","onUpdate:value"])):h("v-if",!0)],12,q)):h("v-if",!0)],64)))),128))],8,R))])),_:1},8,["list"])]),e.footerFlag?(i(),d("div",C,[h(" 底部按钮插槽 "),k(l.$slots,"footer",{},(()=>[b(r(S),{onPositiveClick:V},{trigger:f((()=>[b(r(w),{style:{"margin-right":"8px"}},{default:f((()=>[u("恢复默认设置")])),_:1})])),default:f((()=>[u(" 确认要恢复系统默认设置吗? ")])),_:1}),b(r(w),{style:{"margin-right":"8px"},onClick:$},{default:f((()=>[u("取消")])),_:1}),b(r(w),{type:"primary",onClick:L},{default:f((()=>[u("保存")])),_:1})]))])):h("v-if",!0)]))}});export{T as default};
|
|
@@ -3848,7 +3848,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3848
3848
|
syncBarPosition: import("../../../es/shared/types").Func<any[], any>;
|
|
3849
3849
|
} | undefined>;
|
|
3850
3850
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
3851
|
-
generateAnchorList: (formModel: import("@formily/core").Form<any>) => Promise<void>;
|
|
3852
3851
|
updateAnchorList: (field: import("@formily/core").GeneralField) => void;
|
|
3853
3852
|
anchorIdList: import("vue").Ref<{
|
|
3854
3853
|
name: string;
|
|
@@ -9836,7 +9835,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
9836
9835
|
syncBarPosition: import("../../../es/shared/types").Func<any[], any>;
|
|
9837
9836
|
} | undefined>;
|
|
9838
9837
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
9839
|
-
generateAnchorList: (formModel: import("@formily/core").Form<any>) => Promise<void>;
|
|
9840
9838
|
updateAnchorList: (field: import("@formily/core").GeneralField) => void;
|
|
9841
9839
|
anchorIdList: import("vue").Ref<{
|
|
9842
9840
|
name: string;
|
|
@@ -3850,7 +3850,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3850
3850
|
syncBarPosition: Func<any[], any>;
|
|
3851
3851
|
} | undefined>;
|
|
3852
3852
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
3853
|
-
generateAnchorList: (formModel: import("../../../../es/components/form-render").Form<any>) => Promise<void>;
|
|
3854
3853
|
updateAnchorList: (field: import("../../../../es/components/form-render").GeneralField) => void;
|
|
3855
3854
|
anchorIdList: import("vue").Ref<{
|
|
3856
3855
|
name: string;
|
|
@@ -9838,7 +9837,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9838
9837
|
syncBarPosition: Func<any[], any>;
|
|
9839
9838
|
} | undefined>;
|
|
9840
9839
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
9841
|
-
generateAnchorList: (formModel: import("../../../../es/components/form-render").Form<any>) => Promise<void>;
|
|
9842
9840
|
updateAnchorList: (field: import("../../../../es/components/form-render").GeneralField) => void;
|
|
9843
9841
|
anchorIdList: import("vue").Ref<{
|
|
9844
9842
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from"./FormConfig.vue2.js";import o from"../../../_virtual/_plugin-vue_export-helper.js";var e=o(r,[["__file","FormConfig.vue"]]);export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,ref as o,provide as r,toRaw as t,openBlock as i,createElementBlock as a,normalizeStyle as n,unref as s,createElementVNode as m,createVNode as l,mergeProps as f,withCtx as c,createTextVNode as u}from"vue";import{useTheme as d}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{cloneDeep as p,isArray as g,isFunction as h}from"lodash-es";import{uuidGenerator as v}from"../../../shared/utils/index.js";import _ from"../../../shared/components/VueDraggable/src/vuedraggable.js";import C from"./components/FormConfigCreator.vue.js";import j from"./components/FormConfigDragDisplay.vue.js";import y from"./components/FormConfigEdit.vue.js";import x from"./components/FormConfigMaterialItem.js";import{useDataNormalize as F}from"./hooks/useDataNormalize.js";import{InjectionFieldList as V,InjectionMaterialList as b,InjectionActiveFieldItem as k,FORM_CONFIG_GROUP as D}from"./constants/index.js";import"@vicons/ionicons5";import"naive-ui";import"./utils/index.js";import{useSortableConfig as R}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const E=["id"],H={class:"form-config__material"},I=m("header",{class:"form-config__materialHeader"},"物料区",-1),L={class:"form-config__displayWrapper"},N={class:"form-config__displayHeader"},O={class:"form-config__config"},S=m("header",{class:"form-config__configHeader"},"配置区",-1),T={class:"form-config__configContent"};var A=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object}},setup(e,{expose:A}){const B=e,M=v(),U=d(),{getCommonConfig:w}=R(),z=o([]);r(V,z);const W=o([]);function q(e){z.value.some((o=>o.key===e.key))||z.value.push(e)}r(b,W);const G=(e,o)=>h(B.textFormatter)?B.textFormatter(e,o):o,J=o();r(k,J);const K=o(),{transform:P,inverseTransform:Q}=F(B);return A({loadData({fieldList:e}){let o=[],r=[];e.forEach((e=>function(e){"LINE_BAR"===e.type&&(e.children=[]);!1===e.show?r.push(e):o.push(e),"COMBINATION"===e.type&&g(e.children)&&e.children.length&&e.children.forEach((e=>{e.__isCombinationChild=!0}))}(p(t(e))))),z.value=P(o),W.value=r,J.value=void 0},validate(){var e;return null==(e=K.value)?void 0:e.validate()},getData:()=>({fieldList:Q(p(t(z.value))),materialList:Q(p(t(W.value)))})}),(o,r)=>(i(),a("section",{class:"form-config",style:n({"--max-height":e.maxHeight,...s(U)}),id:s(M)},[m("section",H,[I,l(s(_),f(s(w)(),{class:"form-config__materialContent",modelValue:W.value,"onUpdate:modelValue":r[0]||(r[0]=e=>W.value=e)}),{item:c((({element:e})=>[l(s(x),{"form-config-item":e,"text-formatter":G},null,8,["form-config-item"])])),_:1},16,["modelValue"])]),m("section",L,[m("header",N,[u(" 布局区 "),l(C,{onSubmit:q})]),l(j,{class:"form-config__displayContent",group:s(D),"text-formatter":G,modelValue:z.value,"onUpdate:modelValue":r[1]||(r[1]=e=>z.value=e)},null,8,["group","modelValue"])]),m("section",O,[S,m("section",T,[l(y,{ref_key:"formConfigEditRef",ref:K,uuid:s(M),"form-render-ref":e.formRenderRef},null,8,["uuid","form-render-ref"])])])],12,E))}});export{A as default};
|
|
@@ -303,7 +303,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
303
303
|
syncBarPosition: import("../../..").Func<any[], any>;
|
|
304
304
|
} | undefined>;
|
|
305
305
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
306
|
-
generateAnchorList: (formModel: import("../../../../../es/components/form-render").Form<any>) => Promise<void>;
|
|
307
306
|
updateAnchorList: (field: import("../../../../../es/components/form-render").GeneralField) => void;
|
|
308
307
|
anchorIdList: import("vue").Ref<{
|
|
309
308
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from"./FormConfigCreator.vue2.js";import o from"../../../../_virtual/_plugin-vue_export-helper.js";var e=o(r,[["__file","FormConfigCreator.vue"]]);export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,ref as i,openBlock as t,createBlock as l,unref as a,withCtx as o,createVNode as r,createTextVNode as n}from"vue";import{pick as s}from"lodash-es";import{NButtonGroup as m,NPopconfirm as u,NButton as d}from"naive-ui";import{EditAbleField as f}from"../constants/index.js";import{useConfigurationField as _}from"../hooks/useConfigurationField.js";import"../../../index.js";import L from"../../../form-render/index.js";var p=e({__name:"FormConfigCreator",emits:{submit:e=>e},setup(e,{emit:p}){const c=_().generateFieldListByKeys([f.NAME,f.LAYOUT_WIDTH_ENUM,f.NOTES,f.DEFAULT_EXPAND,f.FOLD]),E=i(),h=i(),w={defaultExpand:!0,fold:!0,layoutWidthEnum:"ALL_LINE"};async function y(e,i){if(!i)return;await i.validate();const t=i.getFormValues();p("submit",{layoutWidthEnum:"ALL_LINE",...t,type:e,key:t.name,__new:!0})}return(e,i)=>(t(),l(a(m),{size:"small"},{default:o((()=>[r(a(u),{width:"200px","show-icon":!1,"show-arrow":!1,onPositiveClick:i[0]||(i[0]=e=>y("NEWLINE",h.value))},{trigger:o((()=>[r(a(d),null,{default:o((()=>[n("新建分行符")])),_:1})])),default:o((()=>[r(a(L),{column:12,ref_key:"lineBreakFormRef",ref:h,"initial-data":a(s)(w,["layoutWidthEnum"]),size:"small","label-width":"auto","label-placement":"left",fieldList:a(c).slice(0,2)},null,8,["initial-data","fieldList"])])),_:1}),r(a(u),{width:"300px","show-icon":!1,"show-arrow":!1,onPositiveClick:i[1]||(i[1]=e=>y("LINE_BAR",E.value))},{trigger:o((()=>[r(a(d),null,{default:o((()=>[n("新建分线栏")])),_:1})])),default:o((()=>[r(a(L),{column:12,ref_key:"linebarFormRef",ref:E,"initial-data":w,size:"small","label-width":"auto","label-placement":"left",fieldList:a(c)},null,8,["fieldList"])])),_:1})])),_:1}))}});export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from"./FormConfigDragDisplay.vue2.js";import o from"../../../../_virtual/_plugin-vue_export-helper.js";var e=o(r,[["__file","FormConfigDragDisplay.vue"]]);export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,openBlock as t,createBlock as o,unref as r,mergeProps as m,withCtx as i,createElementVNode as n,normalizeStyle as a,resolveDynamicComponent as s}from"vue";import f from"../../../../shared/components/VueDraggable/src/vuedraggable.js";import{usePresetRenderer as u}from"../hooks/usePresetRenderer.js";import{useSortableConfig as d}from"../hooks/useSortalbeConfig.js";import"../hooks/useConfigurationField.js";import{layoutWidthEnum2Column as p}from"../utils/index.js";const g=["data-type","data-required"];var l=e({__name:"FormConfigDragDisplay",props:{formConfigItem:{type:Object},textFormatter:{type:Function,required:!0}},setup(e){function l(e){return{"--item-column":e?p(e.layoutWidthEnum):24}}const{getRenderer:c}=u(),{getCommonConfig:y}=d();return(u,d)=>(t(),o(r(f),m(r(y)(e.formConfigItem),{style:l(e.formConfigItem)}),{item:i((({element:m})=>[n("div",{class:"form-config__displayContentItem","data-type":m.type,"data-required":m.required,style:a(l(m))},[(t(),o(s(r(c)(m)),{"form-config-item":m,textFormatter:e.textFormatter},null,8,["form-config-item","textFormatter"]))],12,g)])),_:1},16,["style"]))}});export{l as default};
|
|
@@ -5432,7 +5432,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5432
5432
|
syncBarPosition: import("../../../../../es/shared/types").Func<any[], any>;
|
|
5433
5433
|
} | undefined>;
|
|
5434
5434
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
5435
|
-
generateAnchorList: (formModel: import("../../../../../es/components/form-render").Form<any>) => Promise<void>;
|
|
5436
5435
|
updateAnchorList: (field: import("../../../../../es/components/form-render").GeneralField) => void;
|
|
5437
5436
|
anchorIdList: import("vue").Ref<{
|
|
5438
5437
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from"./FormConfigEdit.vue2.js";import o from"../../../../_virtual/_plugin-vue_export-helper.js";var e=o(r,[["__file","FormConfigEdit.vue"]]);export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,computed as o,ref as i,inject as l,watch as t,toRaw as a,openBlock as r,createElementBlock as n,Fragment as s,createVNode as u,unref as d,nextTick as m}from"vue";import{cloneDeep as v}from"lodash-es";import{InjectionActiveFieldItem as f}from"../constants/index.js";import"../../../../shared/components/VueDraggable/src/vuedraggable.js";import{findFieldItemByKey as p}from"../utils/index.js";import"@vicons/ionicons5";import{NModal as c}from"naive-ui";import"../../../../shared/utils/index.js";import{useConfigurationField as g}from"../hooks/useConfigurationField.js";import"../../../index.js";import h from"../../../form-render/index.js";var y=e({__name:"FormConfigEdit",props:{uuid:{type:String,required:!0},formRenderRef:{type:Object}},setup(e,{expose:y}){const j=e,x=o((()=>`#${j.uuid} .form-config__config`)),b=i(),w=l(f),F=i([]),R=i({}),{generateFieldListByFormConfigItem:k}=g(),C=i(!1);async function _(){var e;w.value=P,await m(),null==(e=b.value)||e.validate()}let P=null;function L({fieldKey:e,value:o}){w.value&&(w.value[e]=o)}return t(w,(async(e,o)=>{var i,l,t;if(!e)return F.value=[];if(o&&e!==P)try{await(null==(i=b.value)?void 0:i.validate())}catch(e){return C.value=!0}P=e,R.value={editable:!0,show:!0,...v(a(e))};const r=null==(l=j.formRenderRef)?void 0:l.getFieldList();F.value=k(e,p(r,e.key)).map((e=>({...e,componentProps:{...e.componentProps,to:x.value}}))),null==(t=b.value)||t.reload()}),{immediate:!0}),y({validate(){var e;return null==(e=b.value)?void 0:e.validate()}}),(e,o)=>(r(),n(s,null,[u(d(h),{column:12,ref_key:"formRenderRef",ref:b,size:"small",onFormChange:L,"field-list":F.value,"initial-data":R.value},null,8,["field-list","initial-data"]),u(d(c),{show:C.value,"onUpdate:show":o[0]||(o[0]=e=>C.value=e),preset:"dialog",to:d(x),"close-on-esc":!1,"mask-closable":!1,closable:!1,title:"存在填写错误的字段","positive-text":"继续编辑",onPositiveClick:_},null,8,["show","to"])],64))}});export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"./CloseButton.vue2.js";import o from"../../../../../_virtual/_plugin-vue_export-helper.js";var t=o(e,[["__file","CloseButton.vue"]]);export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as o,inject as e,openBlock as n,createBlock as t,unref as r,withModifiers as i,withCtx as m,createVNode as s}from"vue";import{CloseCircle as c}from"@vicons/ionicons5";import{isArray as p}from"lodash-es";import{NButton as l,NIcon as u}from"naive-ui";import{InjectionFieldList as a,InjectionMaterialList as f}from"../../constants/index.js";var _=o({__name:"CloseButton",props:{formConfigItem:{type:Object,required:!0}},setup(o){const _=o,d=e(a),v=e(f),C=()=>{!function o(e){return p(e)&&e.some(((e,n,t)=>e!==_.formConfigItem?o(e.children):(!e.__new&&v.value.push(e),t.splice(n,1))))}(d.value)};return(o,e)=>(n(),t(r(l),{text:"",class:"form-config__renderer--closeButton","text-color":"#a5a5a5",onClick:i(C,["stop"])},{icon:m((()=>[s(r(u),{component:r(c)},null,8,["component"])])),_:1},8,["onClick"]))}});export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"./ComplexNode.vue2.js";import o from"../../../../../_virtual/_plugin-vue_export-helper.js";var r=o(e,[["__file","ComplexNode.vue"]]);export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,inject as o,computed as r,openBlock as m,createElementBlock as n,createElementVNode as t,mergeProps as i,unref as f,withModifiers as l,createTextVNode as c,toDisplayString as s,createVNode as a}from"vue";import p from"../FormConfigDragDisplay.vue.js";import d from"./CloseButton.vue.js";import{InjectionActiveFieldItem as u}from"../../constants/index.js";import{bindHover as g}from"../../utils/index.js";const C={class:"form-config__renderer--complex form-config__renderer"},_=["onClick"];var x=e({__name:"ComplexNode",props:{formConfigItem:{type:Object,required:!0},textFormatter:{type:Function,required:!0}},setup(e){const x=e,I=o(u);function v(){I.value=x.formConfigItem}const j=r((()=>[{"is-active":I.value===x.formConfigItem},"form-config__renderer--complexHeader"]));return(o,r)=>(m(),n("section",C,[t("header",i(f(g)(e.formConfigItem),{class:f(j),onClick:l(v,["stop"])}),[c(s(x.formConfigItem.name)+" ",1),a(d,{"form-config-item":e.formConfigItem},null,8,["form-config-item"])],16,_),a(p,i(o.$props,{modelValue:e.formConfigItem.children,"onUpdate:modelValue":r[0]||(r[0]=o=>e.formConfigItem.children=o),class:"form-config__renderer--complex--grid"}),null,16,["modelValue"])]))}});export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"./DefaultNode.vue2.js";import r from"../../../../../_virtual/_plugin-vue_export-helper.js";var o=r(e,[["__file","DefaultNode.vue"]]);export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,inject as o,computed as t,openBlock as r,createElementBlock as i,mergeProps as f,unref as m,withModifiers as n,createVNode as a,normalizeClass as l,withCtx as s,createTextVNode as u,toDisplayString as d,createBlock as C,createCommentVNode as c}from"vue";import{NEllipsis as p}from"naive-ui";import g from"./CloseButton.vue.js";import{InjectionActiveFieldItem as I,WidgetTextMap as _}from"../../constants/index.js";import{bindHover as v}from"../../utils/index.js";const y=["onClick","data-type"];var k=e({__name:"DefaultNode",props:{formConfigItem:{type:Object,required:!0},textFormatter:{type:Function,required:!0},showCloseButton:{type:Boolean,default:!0},allowClick:{type:Boolean,default:!0}},setup(e){const k=e,q=o(I);function x(){k.allowClick&&(q.value=k.formConfigItem)}const B=t((()=>["form-config__renderer--default",{"is-required":k.formConfigItem.required}])),b=t((()=>[{"is-active":q.value===k.formConfigItem,"is-disabled":j.value},"form-config__renderer","form-config__renderer--defaultWrapper"])),j=t((()=>!1===k.formConfigItem.editable)),w=t((()=>{const e=_.get(k.formConfigItem.type);return k.textFormatter(k.formConfigItem,`${k.formConfigItem.name}${e?`(${e})`:""}`)}));return(o,t)=>(r(),i("div",f(m(v)(e.formConfigItem),{onClick:n(x,["stop"]),class:m(b),"data-type":e.formConfigItem.type}),[a(m(p),{class:l(m(B))},{default:s((()=>[u(d(m(w)),1)])),_:1},8,["class"]),!e.showCloseButton||e.formConfigItem.required||e.formConfigItem.__isCombinationChild?c("v-if",!0):(r(),C(g,{key:0,"form-config-item":e.formConfigItem},null,8,["form-config-item"]))],16,y))}});export{k as default};
|
|
@@ -290,7 +290,6 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
290
290
|
syncBarPosition: import("../../../es/shared/types").Func<any[], any>;
|
|
291
291
|
} | undefined>;
|
|
292
292
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
293
|
-
generateAnchorList: (formModel: import("@formily/core/esm/models/Form").Form<any>) => Promise<void>;
|
|
294
293
|
updateAnchorList: (field: import("@formily/core/esm/types").GeneralField) => void;
|
|
295
294
|
anchorIdList: import("vue").Ref<{
|
|
296
295
|
name: string;
|
|
@@ -284,7 +284,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
284
284
|
syncBarPosition: import("../../../../es/shared/types").Func<any[], any>;
|
|
285
285
|
} | undefined>;
|
|
286
286
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
287
|
-
generateAnchorList: (formModel: import("@formily/core").Form<any>) => Promise<void>;
|
|
288
287
|
updateAnchorList: (field: import("@formily/core").GeneralField) => void;
|
|
289
288
|
anchorIdList: import("vue").Ref<{
|
|
290
289
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"./FormRender.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var o=r(e,[["__file","FormRender.vue"]]);export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,ref as o,computed as t,provide as r,onMounted as s,onUnmounted as a,nextTick as i,openBlock as l,createBlock as n,unref as m,normalizeClass as d,normalizeStyle as p,withCtx as u,createElementBlock as c,createVNode as f,isRef as h,Fragment as y,renderList as j,createCommentVNode as g,createElementVNode as b,withKeys as k,withModifiers as v,toDisplayString as F,renderSlot as C}from"vue";import{useTheme as S}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isNumber as H,cloneDeep as x}from"lodash-es";import{createForm as A,onFieldValueChange as L,onFieldMount as R,onFieldUnmount as O,onFieldReact as w,onFormMount as _}from"@formily/core";import{FormProvider as B,FormConsumer as V}from"@formily/vue";import{NForm as I,NTabs as N,NTabPane as D,NConfigProvider as q}from"naive-ui";import{InjectionFormGraph as T}from"./constants/index.js";import{useAutoHidden as U}from"./hooks/useAutoHidden.js";import{useComplexOptionsSpan as W}from"./hooks/useComplexOptions.js";import{useFormDomEvent as E,useFormExposeEvent as G}from"./hooks/useFormEvent.js";import{useFormGraph as K}from"./hooks/useFormGraph.js";import{useFormRenderLifeCycle as M}from"./hooks/useFormRenderLifeCycle.js";import{useLowCodeEvent as P}from"./hooks/useLowCodeEvent.js";import{useLowCodeReactions as J}from"./hooks/useLowCodeReactions.js";import{useNuiThemeOverrides as $}from"./hooks/useNuiThemeOverrides.js";import"./utils/index.js";import{useFieldListAdaptor as z}from"./hooks/useFieldListAdaptor.js";import"../../../shared/utils/index.js";import"../index.js";import{useFieldVisitor as Q}from"./hooks/useFieldVisitor.js";import"../../../shared/utils/tapable/SyncHook.js";import"../../../shared/utils/tapable/SyncBailHook.js";import"../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../shared/utils/tapable/SyncLoopHook.js";import"../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{validateMessageLocale as X}from"./hooks/useFormValidator.js";import{useAnchor as Y}from"./hooks/useAnchor.js";import{useFormContext as Z}from"./hooks/useFormContext.js";import"./hooks/useFormRenderOptions.js";import{createObjSchema as ee}from"./utils/schema.js";const oe={key:0,style:{height:"54px"}},te={style:{"white-space":"pre"}};var re=e({__name:"FormRender",props:{fieldList:{type:Array},initialData:{type:Object,default:()=>({})},fieldVisitor:{type:Object},column:{type:Number,default:24},maxHeight:{type:[Number,String],default:""},anchor:{type:Boolean,default:!1},parallelism:{type:Number,default:3},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},lowCodeReactions:{type:Array},linebarAutoHidden:{type:Boolean},bordered:{type:[Boolean,String],default:!0}},emits:["formChange","annotationChange","scroll"],setup(e,{expose:re,emit:se}){const ae=e,ie=S(),{nuiThemeOverrides:le}=$();X();const ne=o(),me=t((()=>H(ae.maxHeight)?ae.maxHeight+"px":ae.maxHeight)),{SchemaField:de,businessCollector:pe,formItemDepsCollector:ue,changeContextCollector:ce,formUUID:fe}=Z(ae,se),{anchorBarRef:he,currentAnchor:ye,updateAnchorList:je,anchorIdList:ge,onScroll:be}=Y(ae,se,ne,ue);M(ae).callLifeCycle("onSetup");const{trigger:ke}=U(),{observeFormGraph:ve,setGraph:Fe,removeGraph:Ce}=K();r(T,ve);const{lowCodeEventTrigger:Se}=P(),He=A({initialValues:ae.initialData,effects(e){L("*",(o=>{const t=o.props.name.toString();pe.trigger(e,t),ue.trigger(t),se("formChange",{fieldInstance:o,fieldKey:t,fieldName:o.title,value:o.value,context:ce.getContext(t,o.value)}),Se(o),xe(t,o.value)})),R("*",Fe),O("*",Ce),ae.linebarAutoHidden&&(w("*",ke),_((e=>e.query("*").forEach(ke)))),ae.anchor&&w("*",je)}}),{lowCodeReactionsHandler:xe,triggerAllReactionsHandler:Ae}=J(t((()=>ae.lowCodeReactions)),He);s(Ae);const{schemaAdaptor:Le}=z(pe);let Re=ae.fieldList||[];const Oe=t((()=>ae.schema?ae.schema:ae.fieldList?(Re=Q().traverse(x(ae.fieldList),ae.fieldVisitor),ee(Le(Re))):ee({}))),{onKeydown:we}=E({formModel:He,formRenderRef:ne,props:ae}),{clearSpan:_e}=W();a((()=>_e(fe)));const Be=G({formModel:He,formRenderRef:ne,formItemDepsCollector:ue,getFieldList:()=>Re,formUUID:fe});return re({formModel:He,validate:(e="*")=>Be.validate(e),getFormValues:(e=!0)=>Be.getFormValues(e),async setFormValues(e,o=!0,t=!1,r=!0){t&&(pe.triggerLock=!0),Be.setFormValues(e,o,r),await i(),pe.triggerLock=!1},setFieldState(e,o){Be.setFieldState(e,o)},resetFields(e="*"){Be.resetFields(e)},queryWidget:async e=>Be.queryWidget(e),getFieldList:()=>Re,async reload(){console.error("reload function is abstract,it should be overwrite!")}}),(o,t)=>(l(),n(m(I),{class:d(["form-render",{"form-render--no-border":!e.bordered,"form-render--underline":"underline"===e.bordered}]),"require-mark-placement":"left",style:p(m(ie))},{default:u((()=>[e.anchor?(l(),c("section",oe,[f(m(N),{value:m(ye),"onUpdate:value":t[0]||(t[0]=e=>h(ye)?ye.value=e:null),type:"line",ref_key:"anchorBarRef",ref:he},{default:u((()=>[(l(!0),c(y,null,j(m(ge),(e=>(l(),n(m(D),{name:e.name,tab:e.title,key:e.name},null,8,["name","tab"])))),128))])),_:1},8,["value"])])):g("v-if",!0),f(m(q),{"theme-overrides":m(le)},{default:u((()=>[b("section",{class:"form-render__wrapper",style:p({"--column":e.column,"--form-height":m(me)}),ref_key:"formRenderRef",ref:ne,onScroll:t[1]||(t[1]=(...e)=>m(be)&&m(be)(...e)),onKeydownCapture:t[2]||(t[2]=k(v(((...e)=>m(we)&&m(we)(...e)),["prevent"]),["enter"]))},[f(m(B),{form:m(He)},{default:u((()=>[f(m(de),{schema:m(Oe)},null,8,["schema"]),e.consumer?(l(),n(m(V),{key:0},{default:u((({form:e})=>[b("div",te,F(JSON.stringify(e.values,null,2)),1)])),_:1})):g("v-if",!0),C(o.$slots,"default")])),_:3},8,["form"])],36)])),_:3},8,["theme-overrides"])])),_:3},8,["class","style"]))}});export{re as default};
|
|
@@ -288,7 +288,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
288
288
|
syncBarPosition: Func<any[], any>;
|
|
289
289
|
} | undefined>;
|
|
290
290
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
291
|
-
generateAnchorList: (formModel: import("../../../../es/components/form-render").Form<any>) => Promise<void>;
|
|
292
291
|
updateAnchorList: (field: import("../../../../es/components/form-render").GeneralField) => void;
|
|
293
292
|
anchorIdList: import("vue").Ref<{
|
|
294
293
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from"./FormRenderWrapper.vue2.js";import e from"../../../_virtual/_plugin-vue_export-helper.js";var p=e(r,[["__file","FormRenderWrapper.vue"]]);export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,ref as r,computed as t,openBlock as a,createBlock as l,withCtx as o,renderSlot as u,nextTick as d}from"vue";import s from"./FormRender.vue.js";var n=e({__name:"FormRenderWrapper",setup(e,{expose:n}){const f=r(),i=r(0);return n({...["validate","getFormValues","setFormValues","setFieldState","resetFields","queryWidget","getFieldList"].reduce(((e,r)=>(e[r]=(...e)=>{var t;return(null==(t=f.value)?void 0:t[r]).call(t,...e)},e)),{}),formModel:t((()=>{var e;return null==(e=f.value)?void 0:e.formModel})),reload:async function(){i.value++,await d()}}),(e,r)=>(a(),l(s,{key:i.value,ref_key:"formRenderRef",ref:f},{default:o((()=>[u(e.$slots,"default")])),_:3}))}});export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as o,computed as t,watch as a,inject as i,onBeforeUnmount as r,createVNode as n}from"vue";import{isObjectField as m}from"@formily/core";import{autorun as l}from"@formily/reactive";import{
|
|
1
|
+
import{defineComponent as e,ref as o,computed as t,watch as a,inject as i,onBeforeUnmount as r,createVNode as n}from"vue";import{isObjectField as m}from"@formily/core";import{autorun as l}from"@formily/reactive";import{connect as u,RecursionField as s}from"@formily/vue";import{AddCircleOutline as c,RemoveCircle as p}from"@vicons/ionicons5";import{isNumber as d,isArray as f,isFunction as v,range as b}from"lodash-es";import{NButton as y,NIcon as x}from"naive-ui";import"../../../index.js";import{InjectionBusinessCollector as h}from"../../constants/index.js";import"../../utils/index.js";import{useFormField as _}from"../../hooks/useFormField.js";import{useFieldListAdaptor as j}from"../../hooks/useFieldListAdaptor.js";import{createObjSchema as C}from"../../utils/schema.js";const F=u(e({name:"FormCombination",props:{title:{type:String,default:""},value:{type:Array},maxGroupNum:{type:Number},disabled:{type:Boolean},getProperties:{type:Function,default:()=>[]},combinationItemDeletable:{type:[Boolean,Function],default:!0},onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e){const{field:u,fieldKey:F}=_(),g=o(1),k=t((()=>d(e.maxGroupNum)?e.maxGroupNum<1?0:~~e.maxGroupNum:1/0));function I(){g.value++}a((()=>e.value),(e=>{f(e)&&(g.value=Math.min(Math.max(e.length,1),k.value))}),{immediate:!0});const N=i(h),{schemaAdaptor:D}=j(N),G=o([]);return r(l((()=>{f(u.value.value)&&(G.value=u.value.value.map(((o,t)=>v(e.combinationItemDeletable)?e.combinationItemDeletable(o||{},t):e.combinationItemDeletable)))}))),()=>n("section",{class:"form-render__combination"},[n("header",{class:"form-render__combinationHeader"},[n("div",{class:"form-render__combinationHeaderText"},[e.title]),n(y,{onClick:I,text:!0,style:{"--n-text-color":"var(--c-primary-color)"},disabled:g.value>=k.value||e.disabled},{icon:()=>n(x,{component:c},null),default:()=>"新增"})]),b(g.value).map(((o,t)=>n("section",{class:"form-render__combinationContent"},[n(s,{schema:C(D(e.getProperties())),name:t},null),n(y,{text:!0,disabled:!G.value[t],type:"error",class:"form-render__combinationClose",onClick:()=>async function(e){if(g.value>1)g.value--,await u.value.remove(e);else{const o=u.value.query(`${F.value}.${e}`).take();if(!o||!m(o))return;await o.reset()}}(t)},{icon:()=>n(x,{component:p},null)})])))])}}));export{F as COMBINATION};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as r,computed as o,ref as l,onUnmounted as t,createVNode as i,mergeProps as a}from"vue";import{arrayed as s,widthAppend as n}from"../../../../../shared/utils/index.js";import{isVoidField as m}from"@formily/core";import{observe as u,autorun as d}from"@formily/reactive";import{connect as f,mapProps as p}from"@formily/vue";import{useDebounceFn as v}from"@vueuse/core";import{
|
|
1
|
+
import{defineComponent as e,inject as r,computed as o,ref as l,onUnmounted as t,createVNode as i,mergeProps as a}from"vue";import{arrayed as s,widthAppend as n}from"../../../../../shared/utils/index.js";import{isVoidField as m}from"@formily/core";import{observe as u,autorun as d}from"@formily/reactive";import{connect as f,mapProps as p}from"@formily/vue";import{useDebounceFn as v}from"@vueuse/core";import{isString as c,isArray as y,isFunction as _}from"lodash-es";import{NFormItem as b}from"naive-ui";import g from"../../../../annotation-edit/index.js";import"../../../index.js";import x from"../tooltipMessage.vue.js";import{InjectionFormUUID as j,InjectionFormGraph as I,InjectionAnnotation as k}from"../../constants/index.js";import{useComplexOptionsSpan as F}from"../../hooks/useComplexOptions.js";import{dotEscape as h}from"../../utils/schema.js";import{validateMessageParser as R}from"../../utils/index.js";import{useFormField as L}from"../../hooks/useFormField.js";const q=f(e({name:"FormRenderItem",props:{label:String,propertyKey:String,remark:String,span:{type:Number,default:6},suffixFields:{type:Array},labelRender:Function,annotation:{},fieldItem:{}},setup(e,{slots:s}){const{field:f,fieldKey:p,fieldAddress:c}=L(),R=r(j),q=o((()=>h(`${R}-${c.value}`))),K=l(!1);if(m(f.value)&&y(e.suffixFields)){const o=r(I);t(u(o,v((()=>{m(f.value)&&y(e.suffixFields)&&(K.value=e.suffixFields.some((e=>{const r=f.value.form.query(e).take();return r&&Reflect.get(r,"required")})))}),100)))}else t(d((()=>{K.value=Reflect.get(f.value,"required")})));const S=r(k),A=o({get(){var r,o;return null!=(o=null==(r=S.value)?void 0:r[e.propertyKey])?o:""},set(r){S.value={property:e.propertyKey,value:r}}});const E=o((()=>S.value&&!1!==e.annotation)),V=o((()=>e.label&&" "!==e.label)),$=o((()=>{let r=0;return E.value&&(r+=18),e.remark&&(r+=18),r}));function w(){return V.value?i("section",{class:"form-render__formItemLabel"},[i("span",{class:"form-render__formItemLabel--text",style:{marginRight:n($.value)}},[_(e.labelRender)?e.labelRender(e.label):e.label]),$.value?i("section",{class:"form-render__formItemLabel--operation"},[e.remark?i("div",{class:"form-render__formItemLabel--tooltip"},[i(x,{message:e.remark},null)]):null,E.value?i(g,{class:"form-render__formItemLabel--annotation",modelValue:A.value,"onUpdate:modelValue":e=>A.value=e},null):null]):null]):null}const{getSpan:C}=F();return()=>i(b,a({class:"form-render__formItem",style:{"--form-item-column":C(R,f.value.address,!1)+e.span}},{id:q.value,uuid:R,"widget-type":f.value.componentType,"field-key":h(p.value),"field-address":h(c.value),required:K.value}),{...s,label:w})}}),p({title:"label"},((e,r)=>{const o=m(r)?void 0:s(r.selfErrors).length?function(e,r){if(!c(r.defined_error_msg)||!r.defined_error_msg)return e.map((e=>R(e,r))).join(",");return R(r.defined_error_msg,r)}(s(r.selfErrors),e.fieldItem):void 0;return{...e,fieldItem:void 0,feedback:o,"validation-status":o?"error":void 0}})));export{q as FORM_ITEM};
|