cnhis-design-vue 3.1.49-beta.1 → 3.1.49-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/base-search/style/index.css +1 -1
- package/es/components/expand-field/index.d.ts +1630 -0
- package/es/components/expand-field/index.js +1 -0
- package/es/components/expand-field/src/components/FormBatchOptionsModal.vue.d.ts +54 -0
- package/es/components/expand-field/src/components/FormBatchOptionsModal.vue.js +1 -0
- package/es/components/expand-field/src/components/FormBatchOptionsModal.vue2.js +1 -0
- package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +841 -0
- package/es/components/expand-field/src/components/FormItemPerson.vue.js +1 -0
- package/es/components/expand-field/src/components/FormItemPerson.vue2.js +1 -0
- package/es/components/expand-field/src/components/PersonModal.vue.d.ts +777 -0
- package/es/components/expand-field/src/components/PersonModal.vue.js +1 -0
- package/es/components/expand-field/src/components/PersonModal.vue2.js +1 -0
- package/es/components/expand-field/src/components/form.vue.d.ts +1502 -0
- package/es/components/expand-field/src/components/form.vue.js +1 -0
- package/es/components/expand-field/src/components/form.vue2.js +1 -0
- package/es/components/expand-field/src/constants/index.d.ts +3 -0
- package/es/components/expand-field/src/constants/index.js +1 -0
- package/es/components/expand-field/src/hooks/useAsyncData.d.ts +6 -0
- package/es/components/expand-field/src/hooks/useAsyncData.js +1 -0
- package/es/components/expand-field/src/index.vue.d.ts +1632 -0
- package/es/components/expand-field/src/index.vue.js +1 -0
- package/es/components/expand-field/src/index.vue2.js +1 -0
- package/es/components/expand-field/src/types/index.d.ts +1 -0
- package/es/components/expand-field/src/types/index.js +1 -0
- package/es/components/expand-field/src/utils/constant.d.ts +17 -0
- package/es/components/expand-field/src/utils/constant.js +1 -0
- package/es/components/expand-field/src/utils/index.d.ts +6 -0
- package/es/components/expand-field/src/utils/index.js +1 -0
- package/es/components/expand-field/src/utils/tool.d.ts +2 -0
- package/es/components/expand-field/src/utils/tool.js +1 -0
- package/es/components/expand-field/style/expand-field-iconfont.ttf +0 -0
- package/es/components/expand-field/style/index.css +1 -0
- package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +5 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.d.ts +2 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +1 -1
- package/es/components/field-set/index.d.ts +114 -20
- package/es/components/field-set/src/FieldSet.vue.d.ts +114 -20
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/components/Row.vue.d.ts +110 -19
- package/es/components/field-set/src/components/Row.vue2.js +1 -1
- package/es/components/field-set/src/types/index.d.ts +1 -1
- package/es/components/field-set/src/utils/index.js +1 -1
- package/es/components/form-config/index.d.ts +1 -1
- package/es/components/form-config/src/FormConfig.vue.d.ts +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +29 -29
- package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -1
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/components/renderer/complex.js +1 -1
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/inputNumber.js +1 -1
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- 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/renderer/switch.js +1 -1
- package/es/components/form-render/src/components/renderer/textarea.js +1 -1
- package/es/components/form-render/src/hooks/useAnchor.js +1 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
- package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -1
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
- package/es/components/form-render/src/hooks/usePresetScope.js +1 -1
- package/es/components/form-render/src/utils/index.d.ts +1 -0
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/filterVisibleEventPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/filterVisibleEventPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +21 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +1 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +1 -1
- package/es/components/quick-search/style/index.css +1 -1
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/select-person/style/index.css +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +40 -0
- package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -0
- package/es/shared/components/InputNumberSlash/index.d.ts +2 -0
- package/es/shared/components/InputNumberSlash/index.js +1 -0
- package/es/shared/hooks/useDateTime.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/anime.d.ts +2 -1
- package/es/shared/utils/anime.js +1 -1
- package/package.json +2 -2
package/es/components/index.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ import CTimePicker from './time-picker';
|
|
|
31
31
|
import CConfigProvider from './config-provider';
|
|
32
32
|
import CPictureClipper from './picture-clipper';
|
|
33
33
|
import CTableExportField from './table-export-field';
|
|
34
|
+
import CExpandField from './expand-field';
|
|
34
35
|
import CMultiChat from './multi-chat';
|
|
35
36
|
export * from './form-render';
|
|
36
37
|
export * from './shortcut-provider';
|
|
@@ -48,7 +49,7 @@ export * from './guide';
|
|
|
48
49
|
export * from './iho-select-label';
|
|
49
50
|
export * from './card-reader-sdk';
|
|
50
51
|
declare function install(app: App): void;
|
|
51
|
-
export { CGrid, CBigTable, CFieldSet, CButtonPrint, CSelectPerson, CSelectLabel, CLabelFormContent, CIhoSelectLabel, CScaleView, CMap, CVodChunkUpload, CRadio, CCheckbox, CSelect, CDatetime, CInfoHeader, CTimeLine, CBaseSearch, CQuickSearch, CClassification, CBpmnWorkflow, CStepsWheel, CEditor, CFormRender, CFabricChart, CShortcutProvider, CShortcutSetter, CFormConfig, CIhoTable, CKeyboard, CSearchCascader, CRecommendSearch, CDatePicker, CTimePicker, CConfigProvider, CPictureClipper, CTableExportField, CMultiChat };
|
|
52
|
+
export { CGrid, CBigTable, CFieldSet, CButtonPrint, CSelectPerson, CSelectLabel, CLabelFormContent, CIhoSelectLabel, CScaleView, CMap, CVodChunkUpload, CRadio, CCheckbox, CSelect, CDatetime, CInfoHeader, CTimeLine, CBaseSearch, CQuickSearch, CClassification, CBpmnWorkflow, CStepsWheel, CEditor, CFormRender, CFabricChart, CShortcutProvider, CShortcutSetter, CFormConfig, CIhoTable, CKeyboard, CSearchCascader, CRecommendSearch, CDatePicker, CTimePicker, CConfigProvider, CPictureClipper, CTableExportField, CExpandField, CMultiChat };
|
|
52
53
|
declare const _default: {
|
|
53
54
|
install: typeof install;
|
|
54
55
|
};
|
package/es/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./grid/index.js";export{default as CGrid}from"./grid/index.js";import r from"./big-table/index.js";export{default as CBigTable}from"./big-table/index.js";import o from"./field-set/index.js";export{default as CFieldSet}from"./field-set/index.js";import t from"./button-print/index.js";export{default as CButtonPrint}from"./button-print/index.js";import s from"./select-person/index.js";export{default as CSelectPerson}from"./select-person/index.js";import i,{CLabelFormContent as a}from"./select-label/index.js";export{CLabelFormContent,default as CSelectLabel}from"./select-label/index.js";import d from"./iho-select-label/index.js";export{CIhoLabelFormContent,default as CIhoSelectLabel}from"./iho-select-label/index.js";import n from"./map/index.js";export{default as CMap}from"./map/index.js";import m from"./vod-chunk-upload/index.js";export{default as CVodChunkUpload}from"./vod-chunk-upload/index.js";import{CScaleView as f,CRadio as
|
|
1
|
+
import e from"./grid/index.js";export{default as CGrid}from"./grid/index.js";import r from"./big-table/index.js";export{default as CBigTable}from"./big-table/index.js";import o from"./field-set/index.js";export{default as CFieldSet}from"./field-set/index.js";import t from"./button-print/index.js";export{default as CButtonPrint}from"./button-print/index.js";import s from"./select-person/index.js";export{default as CSelectPerson}from"./select-person/index.js";import i,{CLabelFormContent as a}from"./select-label/index.js";export{CLabelFormContent,default as CSelectLabel}from"./select-label/index.js";import d from"./iho-select-label/index.js";export{CIhoLabelFormContent,default as CIhoSelectLabel}from"./iho-select-label/index.js";import n from"./map/index.js";export{default as CMap}from"./map/index.js";import m from"./vod-chunk-upload/index.js";export{default as CVodChunkUpload}from"./vod-chunk-upload/index.js";import{CScaleView as f,CRadio as p,CCheckbox as l,CSelect as c,CDatetime as u}from"./scale-view/index.js";export{CCheckbox,CDatetime,CRadio,CScaleView,CSelect}from"./scale-view/index.js";import x from"./info-header/index.js";export{default as CInfoHeader}from"./info-header/index.js";import C from"./time-line/index.js";export{default as CTimeLine}from"./time-line/index.js";import j from"./base-search/index.js";export{default as CBaseSearch}from"./base-search/index.js";import h from"./quick-search/index.js";export{default as CQuickSearch}from"./quick-search/index.js";import b from"./classification/index.js";export{default as CClassification}from"./classification/index.js";import k from"./bpmn-workflow/index.js";export{default as CBpmnWorkflow}from"./bpmn-workflow/index.js";import g from"./steps-wheel/index.js";export{default as CStepsWheel}from"./steps-wheel/index.js";import S from"./editor/index.js";export{default as CEditor}from"./editor/index.js";import F from"./form-render/index.js";export{default as CFormRender}from"./form-render/index.js";import P from"./fabric-chart/index.js";export{default as CFabricChart}from"./fabric-chart/index.js";import y from"./shortcut-provider/index.js";export{default as CShortcutProvider}from"./shortcut-provider/index.js";import v from"./shortcut-setter/index.js";export{default as CShortcutSetter}from"./shortcut-setter/index.js";import I from"./form-config/index.js";export{default as CFormConfig}from"./form-config/index.js";import B from"./iho-table/index.js";export{default as CIhoTable,useIhoTablePresetPlugins}from"./iho-table/index.js";import D from"./keyboard/index.js";export{default as CKeyboard}from"./keyboard/index.js";import A from"./search-cascader/index.js";export{default as CSearchCascader}from"./search-cascader/index.js";import L from"./recommend-search/index.js";export{default as CRecommendSearch}from"./recommend-search/index.js";import T from"./date-picker/index.js";export{default as CDatePicker}from"./date-picker/index.js";import R from"./time-picker/index.js";export{default as CTimePicker}from"./time-picker/index.js";import w from"./config-provider/index.js";export{default as CConfigProvider}from"./config-provider/index.js";import E from"./picture-clipper/index.js";export{default as CPictureClipper}from"./picture-clipper/index.js";import K from"./table-export-field/index.js";export{default as CTableExportField}from"./table-export-field/index.js";import V from"./expand-field/index.js";export{default as CExpandField}from"./expand-field/index.js";import H from"./multi-chat/index.js";export{default as CMultiChat}from"./multi-chat/index.js";export{default as CInsuranceSDK}from"./card-reader-sdk/src/insuranceSDK.js";export{default as CCardReaderSDK}from"./card-reader-sdk/src/cardReaderSDK.js";export{useGuide}from"./guide/src/useGuide.js";export{useFieldListAdaptor}from"./form-render/src/hooks/useFieldListAdaptor.js";export{useFormRequest}from"./form-render/src/hooks/useFormRequest.js";export{useCommonLog}from"./form-render/src/hooks/useCommonLog.js";export{useFormField}from"./form-render/src/hooks/useFormField.js";export{useFormAsyncQueue}from"./form-render/src/hooks/useFormAsyncQueue.js";export{useFieldVisitor}from"./form-render/src/hooks/useFieldVisitor.js";export{useFieldNormalize}from"./form-render/src/hooks/useFieldNormalize.js";export{useFormValidator,validateMessageLocale}from"./form-render/src/hooks/useFormValidator.js";export{BusinessCollector,useBusinessBinding}from"./form-render/src/hooks/useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./form-render/src/hooks/useChangeContext.js";export{FormItemDepsCollector,useFormItemDeps}from"./form-render/src/hooks/useFormItemDeps.js";export{useAnchor}from"./form-render/src/hooks/useAnchor.js";export{useFormContext}from"./form-render/src/hooks/useFormContext.js";export{useCommonInjection,useSelectOptionProps}from"./form-render/src/hooks/useCommonInjection.js";export{searchContentMatcher,useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./form-render/src/hooks/useFormRenderOptions.js";export{businessDateParser,isIdCard,isMobile,parseAge2Birthday,parseAgeFromContext,parseBirthday,parseIdCard,transformDateFormat}from"./form-render/src/utils/business.js";export{findNextWidget,queryDecoratorByAddress,queryDecoratorByFieldKey,queryInput}from"./form-render/src/utils/dom.js";export{assignClearBindVisited,assignUpdateValue,assignValueBindKey,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./form-render/src/utils/schema.js";export{combineExtendKey,createInputSlot,createSlot,createUrlConfigParams,formRenderLog,injectOrProvide,isNestedFieldType,isNestedType,mergeDeepProperties,parseNumberFromMaybeString,presetRequestHandler,renderDescOption,splitExtendKey,validateMessageParser}from"./form-render/src/utils/index.js";export*from"@formily/core";export{GlobalShortcutProvider,ShortcutManager,useShortcuts}from"./shortcut-provider/src/hooks/useShortcuts.js";export{useShortcutSignature}from"./shortcut-provider/src/hooks/useShortcutSignature.js";export{defineTablePlugin,useTablePlugin}from"./iho-table/src/hooks/useTablePlugin.js";export{useColumnConfigAdaptor}from"./iho-table/src/hooks/useColumnConfigAdaptor.js";export{AbstractConfigHooks,AbstractDataHooks,AbstractDomInsertHooks,AbstractEventHooks,AbstractExposeHooks,AbstractFieldHooks,AbstractSetupHooks}from"./iho-table/src/types/pluginType.js";export{Print}from"./button-print/src/utils/print.js";export{getFileUrl,isIReport,useBrowserPrint}from"./button-print/src/utils/browserPrint.js";const M={CGrid:e,CBigTable:r,CFieldSet:o,CButtonPrint:t,CSelectPerson:s,CSelectLabel:i,CLabelFormContent:a,CIhoSelectLabel:d,CScaleView:f,CMap:n,CVodChunkUpload:m,CRadio:p,CCheckbox:l,CSelect:c,CDatetime:u,CInfoHeader:x,CTimeLine:C,CBaseSearch:j,CQuickSearch:h,CClassification:b,CBpmnWorkflow:k,CStepsWheel:g,CEditor:S,CFormRender:F,CFabricChart:P,CShortcutProvider:y,CShortcutSetter:v,CFormConfig:I,CIhoTable:B,CKeyboard:D,CSearchCascader:A,CRecommendSearch:L,CDatePicker:T,CTimePicker:R,CConfigProvider:w,CPictureClipper:E,CTableExportField:K,CExpandField:V,CMultiChat:H};var O={install:function(e){Object.values(M).forEach((r=>{r.install(e)}))},...M};export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.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}.render-widget-input-number-group{align-items:center;display:flex}.render-widget-input-number-group .divider{text-align:center;width:24px}.render-widget-date-range{align-items:center;display:flex;flex-wrap:nowrap;width:100%}.render-widget-date-range .radio-date-group{border:1px solid #d9d9d9;display:flex}.render-widget-date-range .radio-date-group .radio-date-item{border-left:1px solid #d9d9d9;cursor:pointer;height:30px;line-height:30px;padding:0 8px}.render-widget-date-range .radio-date-group .radio-date-item:first-child{border:none}.render-widget-date-range .radio-date-group .radio-date-item.radio-date-item-active{background:#3e65cf;border-color:#3e65cf;color:#fff}.render-widget-date-range .select-date-left{margin-left:16px}.render-widget-date-range .select-date-right{margin-right:16px}.render-widget-date-range .date-detail-range{display:flex;flex-wrap:nowrap}.render-widget-date-range .date-detail-range .divider{text-align:center;width:10px}.label-attr-filter-container .edit-f-label{font-size:14px;line-height:32px;padding-left:0}.label-attr-filter-container .edit-f-content.label-select-height{flex:none;height:74px;overflow:hidden}.label-attr-filter-container .edit-f-content .label-f-content{display:flex;flex-wrap:wrap}.label-attr-filter-container .edit-f-content .label-f-content .n-tag{border:1px solid #e0e0e6;height:32px;margin:0 8px 8px 0;max-width:108px;text-align:center}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content{align-items:center;display:inline-flex}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content span{display:inline-block;height:100%;line-height:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:80px}.label-attr-filter-container .label-f-unfold-btn{margin:8px 0}.label-attr-filter-container .label-f-unfold-btn .operate-btn{align-items:center;cursor:pointer;display:flex}.label-attr-filter-container .label-f-unfold-btn .operate-btn .n-icon{margin-left:6px}.select-dynamic-popover .n-base-select-menu__empty{justify-content:left;padding:0}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options{background:#fff;box-shadow:0 0 6px rgba(0,0,0,.2);display:flex;flex-direction:column;justify-content:left}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .n-empty{padding:12px 32px}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .mixins-options-active{background:#f1f1f1}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-header{display:flex}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-header .name{align-items:center;display:flex;flex:1;font-weight:700;height:34px;padding:0 12px}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content{list-style:none;margin:0;max-height:250px;outline:none;overflow:auto;padding-left:0}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li{color:rgba(0,0,0,.65);cursor:pointer;display:flex;font-size:14px;line-height:22px;text-overflow:ellipsis;transition:background .3s ease;white-space:nowrap}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li.actived{color:#5585f5}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li:hover{background:#f1f1f1}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li .content{flex:1;overflow:hidden;padding:5px 12px;text-overflow:ellipsis;white-space:nowrap}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-pagination{width:100%}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-pagination .n-button-group{display:flex}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-pagination .n-button-group .n-button{flex:1}.classify-fieldkey-popover{width:200px}.quick-search-block .quick-item{margin-bottom:10px;min-width:32px;width:20%}.quick-search-block .quick-item .quick-row{display:flex}.quick-search-block .quick-item .quick-row .quick-item-title{box-sizing:border-box;flex-basis:134px;line-height:32px;min-width:130px;overflow:hidden;padding-left:4px;padding-right:4px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.quick-search-block .quick-item .quick-row .quick-item-col{align-items:center;display:flex;padding:0 4px;width:calc(100% - 134px)}.quick-search-block .quick-item .quick-row .quick-item-title-default{width:25%}.quick-search-block .quick-item .quick-row .quick-item-col-default{width:75%}.quick-search-block.quick-search-table .quick-item{display:inline-block}.quick-search-block.quick-search-table .quick-item.quick-block{display:block;width:100%}
|
|
1
|
+
.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}.render-widget-input-number-group{align-items:center;display:flex}.render-widget-input-number-group .divider{text-align:center;width:24px}.render-widget-date-range{align-items:center;display:flex;flex-wrap:nowrap;width:100%}.render-widget-date-range .radio-date-group{border:1px solid #d9d9d9;display:flex;flex-wrap:nowrap}.render-widget-date-range .radio-date-group .radio-date-item{border-left:1px solid #d9d9d9;cursor:pointer;height:30px;line-height:30px;padding:0 8px;white-space:nowrap}.render-widget-date-range .radio-date-group .radio-date-item:first-child{border:none}.render-widget-date-range .radio-date-group .radio-date-item.radio-date-item-active{background:#3e65cf;border-color:#3e65cf;color:#fff}.render-widget-date-range .select-date-left{margin-left:16px}.render-widget-date-range .select-date-right{margin-right:16px}.render-widget-date-range .date-detail-range{display:flex;flex-wrap:nowrap}.render-widget-date-range .date-detail-range .divider{text-align:center;width:10px}.label-attr-filter-container .edit-f-label{font-size:14px;line-height:32px;padding-left:0}.label-attr-filter-container .edit-f-content.label-select-height{flex:none;height:74px;overflow:hidden}.label-attr-filter-container .edit-f-content .label-f-content{display:flex;flex-wrap:wrap}.label-attr-filter-container .edit-f-content .label-f-content .n-tag{border:1px solid #e0e0e6;height:32px;margin:0 8px 8px 0;max-width:108px;text-align:center}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content{align-items:center;display:inline-flex}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content span{display:inline-block;height:100%;line-height:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:80px}.label-attr-filter-container .label-f-unfold-btn{margin:8px 0}.label-attr-filter-container .label-f-unfold-btn .operate-btn{align-items:center;cursor:pointer;display:flex}.label-attr-filter-container .label-f-unfold-btn .operate-btn .n-icon{margin-left:6px}.select-dynamic-popover .n-base-select-menu__empty{justify-content:left;padding:0}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options{background:#fff;box-shadow:0 0 6px rgba(0,0,0,.2);display:flex;flex-direction:column;justify-content:left}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .n-empty{padding:12px 32px}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .mixins-options-active{background:#f1f1f1}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-header{display:flex}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-header .name{align-items:center;display:flex;flex:1;font-weight:700;height:34px;padding:0 12px}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content{list-style:none;margin:0;max-height:250px;outline:none;overflow:auto;padding-left:0}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li{color:rgba(0,0,0,.65);cursor:pointer;display:flex;font-size:14px;line-height:22px;text-overflow:ellipsis;transition:background .3s ease;white-space:nowrap}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li.actived{color:#5585f5}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li:hover{background:#f1f1f1}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li .content{flex:1;overflow:hidden;padding:5px 12px;text-overflow:ellipsis;white-space:nowrap}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-pagination{width:100%}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-pagination .n-button-group{display:flex}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-pagination .n-button-group .n-button{flex:1}.classify-fieldkey-popover{width:200px}.quick-search-block .quick-item{margin-bottom:10px;min-width:32px;width:20%}.quick-search-block .quick-item .quick-row{display:flex}.quick-search-block .quick-item .quick-row .quick-item-title{box-sizing:border-box;flex-basis:134px;line-height:32px;min-width:130px;overflow:hidden;padding-left:4px;padding-right:4px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.quick-search-block .quick-item .quick-row .quick-item-col{align-items:center;display:flex;padding:0 4px;width:calc(100% - 134px)}.quick-search-block .quick-item .quick-row .quick-item-title-default{width:25%}.quick-search-block .quick-item .quick-row .quick-item-col-default{width:75%}.quick-search-block.quick-search-table .quick-item{display:inline-block}.quick-search-block.quick-search-table .quick-item.quick-block{display:block;width:100%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,computed as t,watch as n,openBlock as a,createBlock as u,unref as i,withCtx as r,createVNode as c,createCommentVNode as o,withKeys as s,createTextVNode as d,toDisplayString as h,withDirectives as v,vShow as p,createElementBlock as f,Fragment as y,mergeProps as k,createElementVNode as m,renderList as g}from"vue";import{NGrid as _,NGi as b,NSpace as C,NInputGroup as w,NInput as x,NIcon as L,NButton as S,NCheckbox as j,NTree as T}from"naive-ui";import{CloseCircleSharp as N}from"@vicons/ionicons5";import{searchFilterTree as I,getExpandedKeys as F}from"./utils/index.js";import{cloneDeep as O}from"lodash-es";import{SearchTypeConfig as $}from"./types/enums.js";import D from"./SearchMultiple.vue.js";import E from"./SearchOrgAndStaff.vue.js";const K={key:0},q={class:"c-select-person__scroll",style:{height:"342px"}};var A=e({__name:"SelectPerson",props:{defaultList:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},searchPlaceholder:{type:String,default:"输入关键字搜索"},searchButtonText:{type:String,default:"搜索"},wordbook:{type:Object,default:()=>({})},wordbookChild:{type:Object,default:()=>({})},showCount:{type:Boolean,default:!0},showClear:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},searchInner:{type:Boolean,default:!1},searchFilter:{type:Object,default:()=>({})},treeSetting:{type:Object,default:()=>({})},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])}},emits:["check","checkWithLevel"],setup(e,{expose:A,emit:B}){const P=e,R={isOpen:!1,multiple:!1,customTitles:["联系人","部门"],itemHeight:250},U=l(""),H=l(!1),W=l([]),G=l([]),z=l([]),M=l([]),J=l([]),Q=l(!1),V=O(function e(l){return l.forEach((l=>{var t;if(null==(t=l.children)?void 0:t.length){const t=se(l.children,[]);l.innerItemsNum=t.length,l.innerLeafs=t,e(l.children)}})),de(l,"")}(P.data));let X=[];const Y=t((()=>!!P.queryLoadChildData)),Z=t((()=>{var e,l;return null!=(l=null==(e=null==P?void 0:P.treeSetting)?void 0:e.checkStrategy)?l:"child"})),ee=t((()=>(null==P?void 0:P.searchFilter)&&Object.keys(null==P?void 0:P.searchFilter).length>0)),le=t((()=>ee.value?{...O(R),...P.searchFilter}:O(R))),te=t((()=>{var e,l;return null!=(l=null==(e=null==P?void 0:P.wordbookChild)?void 0:e.user_expand_keys)?l:[]})),ne=t((()=>{let e=[];return W.value.forEach((l=>{for(let t=0;t<M.value.length;t++){const n=M.value[t];if(n.key==l){e.push(n);break}}})),e}));function ae(e){e.disabled||e.children||!e.key||X.push(e.key)}function ue(e){e.disabled||e.tempTitle||!e.key||X.push(e.key)}async function ie(e){if(P.queryLoadChildData){const l=await P.queryLoadChildData(e);return l.children&&(l.children=l.children.map((e=>({...e,tempTitle:l.tempTitle?`${l.title}/${l.tempTitle}`:l.title})))),l}return e}function re(e){var l;(null==(l=e.children)?void 0:l.every((e=>e.disabled)))&&(e.disabled=!0)}function ce({option:e}){var l,t;if((null==(l=e.children)?void 0:l.length)||Y.value&&!(null==e?void 0:e.isLeaf)){const l=P.wordbook.user_count_obj&&e[P.wordbook.user_count_obj]||"",t=l?`(${l})`:"";return c("span",null,[`${e.title}${t}`])}{const l=null!=(t=e.title_expand_strs)?t:"";return c("p",{class:"user_item"},[e.title,c("span",{class:"user_item_expand",title:l},[l])])}}function oe(e){return e[P.wordbookChild.user_name_obj]||e[P.wordbook.parent_name_obj]||e.orgName||e.title||""}function se(e,l){return e.forEach((e=>{var t;(null==(t=e.children)?void 0:t.length)?se(e.children,l):!e.disabled&&l.push(e)})),l}function de(e,l){return e&&0!==e.length?e.map((e=>{var t;const n=oe(e),a=l?`${n}/${l}`:n;return{...e,tempTitle:l,children:(null==(t=e.children)?void 0:t.length)?de(null==e?void 0:e.children,a):[]}})):[]}async function he(){var e,l;const t=null!=(l=null==(e=null==P?void 0:P.wordbook)?void 0:e.filter_key)?l:"keyword";if(Q.value=!!U.value.trim(),Y.value)z.value=await P.queryTreeSearch(U.value);else{const e=function(){const e={[$.SEARCH_ORG_STAFF]:ee.value,[$.SEARCH_ORG]:P.searchInner},l=Object.keys(e).find((l=>e[l]));return null!=l?l:""}();z.value=I(e,V,U.value,t)}G.value=z.value.length&&U.value?F(z.value):[]}function ve(e,l){var t,n;switch(null!=(n=null==(t=null==P?void 0:P.treeSetting)?void 0:t.checkStrategy)?n:"child"){case"child":!function(e,l){for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n.disabled&&(!n.children||n.isLeaf)&&(l&&!W.value.includes(n.key)&&W.value.push(n.key),!l)){const e=W.value.findIndex((e=>e===n.key));W.value.splice(e,1)}n.children&&ve(n.children,l)}}(e,l);break;case"parent":!function(e,l){W.value=[];for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n.disabled&&!n.tempTitle&&(l&&!W.value.includes(n.key)&&W.value.push(n.key),!l)){const e=W.value.findIndex((e=>e===n.key));W.value.splice(e,1)}}}(e,l)}}function pe(e){ve(z.value,e)}function fe(e){var l;for(let t=0,n=e.length;t<n;t++){const n=e[t],a=J.value.map((e=>e.key));W.value.includes(n.key)&&!a.includes(n.key)&&M.value.push({key:n.key,name:n.title,parentName:n.tempTitle,innerItemsNum:n.innerItemsNum,innerLeafs:n.innerLeafs}),(null==(l=n.children)?void 0:l.length)&&fe(n.children)}}function ye(e){W.value=e}function ke(){W.value=[]}function me(e){W.value=e}function ge(){U.value="",setTimeout((()=>{he()}))}return function e(l,t){var n,a,u,i;for(let r=0,c=l.length;r<c;r++){const c=l[r];let o=te.value.reduce(((e,l)=>e+(c[l]?`${c[l]},`:"")),"");switch(c.title_expand_strs=o.slice(0,-1),c.title=oe(c),c.label=oe(c),c.parentNode=t,c.key||(c.key=c[P.wordbookChild.user_id_obj]||c[P.wordbook.parent_id_obj]||Date.now()),(null==(n=c.children)?void 0:n.length)?(e(c.children,c),re(c)):0===(null==(a=c.children)?void 0:a.length)&&Reflect.deleteProperty(c,"children"),null!=(i=null==(u=null==P?void 0:P.treeSetting)?void 0:u.checkStrategy)?i:"child"){case"child":ae(c);break;case"parent":ue(c)}}}(V,null),z.value=V,P.defaultList.length>0&&(Y.value?(P.defaultList.forEach((e=>W.value.push(e.key))),M.value=O(P.defaultList),J.value=O(P.defaultList)):(P.defaultList.forEach((e=>W.value.push(e))),fe(V))),n((()=>W),(e=>{M.value=J.value.filter((l=>e.value.includes(l.key))),e.value.length&&fe(Y.value?z.value:V),H.value=X.every((e=>M.value.findIndex((l=>l.key===e))>-1));const l=M.value.filter((l=>e.value.includes(l.key)));B("check",e.value),B("checkWithLevel",l)}),{deep:!0}),n((()=>U.value),(e=>{e||ge()})),A({getCheckWithLevel:function(){const e=W.value,l=M.value.filter((l=>e.includes(l.key)));return null!=l?l:[]}}),(l,t)=>(a(),u(i(_),{cols:2,class:"c-select-person"},{default:r((()=>[c(i(b),null,{default:r((()=>[c(i(C),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:r((()=>[c(i(w),{style:{"margin-bottom":"12px"}},{default:r((()=>[o(" clearable "),c(i(x),{class:"search-input",value:U.value,"onUpdate:value":t[0]||(t[0]=e=>U.value=e),placeholder:e.searchPlaceholder,onKeyup:s(he,["enter"])},{suffix:r((()=>[U.value?(a(),u(i(L),{key:0,class:"search-clear",component:i(N),size:"16",onClick:ge},null,8,["component"])):o("v-if",!0)])),_:1},8,["value","placeholder","onKeyup"]),c(i(S),{type:"primary",onClick:he},{default:r((()=>[d(h(e.searchButtonText),1)])),_:1})])),_:1}),e.multiple&&!Q.value?v((a(),u(i(j),{key:0,checked:H.value,"onUpdate:checked":[t[1]||(t[1]=e=>H.value=e),pe]},{default:r((()=>[d(" 全选 ")])),_:1},8,["checked"])),[[p,i(X).length<1e3]]):o("v-if",!0),o(" 支持选人 "),e.searchInner&&e.multiple&&Q.value&&"parent"===i(Z)?(a(),u(D,{key:1,treeData:z.value,checkedKeys:W.value,onNotifyCheck:me},null,8,["treeData","checkedKeys"])):i(ee)&&e.multiple&&Q.value&&"parent"===i(Z)?(a(),f(y,{key:2},[o(" 同时兼容选人和选部门 "),c(E,{treeData:z.value,checkedKeys:W.value,searchFilter:i(le),onNotifyCheck:me,onNotifyClear:ge},null,8,["treeData","checkedKeys","searchFilter"])],2112)):(a(),u(i(T),k({key:3,"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":W.value,"expanded-keys":G.value,"onUpdate:expanded-keys":t[2]||(t[2]=e=>G.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":W.value,"onUpdate:selected-keys":t[3]||(t[3]=e=>W.value=e),data:z.value,"check-strategy":"child","render-label":ce},e.treeSetting,{"onUpdate:checkedKeys":ye,onLoad:ie}),null,16,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data"]))])),_:1})])),_:1}),c(i(b),null,{default:r((()=>[c(i(C),{vertical:"",style:{"padding-left":"12px"}},{default:r((()=>[c(i(C),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:r((()=>[e.showCount?(a(),f("span",K,"已选择:"+h(i(ne).length),1)):o("v-if",!0),e.showClear?(a(),f("span",{key:1,class:"c-select-person__clear-btn",onClick:ke},"清空")):o("v-if",!0)])),_:1}),m("div",q,[(a(!0),f(y,null,g(i(ne),(e=>(a(),f("span",{class:"c-select-person__tag-item",key:e.key},[d(h(e.name)+" "+h(e.parentName?`(${e.parentName})`:"")+" "+h(e.innerItemsNum?`(${e.innerItemsNum}人)`:"")+" ",1),c(i(L),{class:"tag-close",component:i(N),onClick:l=>function(e){W.value=W.value.filter((l=>l!==e.key))}(e)},null,8,["component","onClick"])])))),128))])])),_:1})])),_:1})])),_:1}))}});export{A as default};
|
|
1
|
+
import{defineComponent as e,ref as l,computed as t,watch as n,openBlock as a,createBlock as u,unref as i,withCtx as r,createVNode as c,createCommentVNode as o,withKeys as s,createTextVNode as d,toDisplayString as h,withDirectives as v,vShow as p,createElementBlock as f,Fragment as y,mergeProps as k,createElementVNode as m,renderList as g}from"vue";import{NGrid as _,NGi as b,NSpace as C,NInputGroup as w,NInput as x,NIcon as L,NButton as S,NCheckbox as j,NTree as T}from"naive-ui";import{CloseCircleSharp as N}from"@vicons/ionicons5";import{searchFilterTree as I,getExpandedKeys as F}from"./utils/index.js";import{cloneDeep as O}from"lodash-es";import{SearchTypeConfig as $}from"./types/enums.js";import D from"./SearchMultiple.vue.js";import E from"./SearchOrgAndStaff.vue.js";const K={key:0},q={class:"c-select-person__scroll",style:{height:"342px"}};var A=e({__name:"SelectPerson",props:{defaultList:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},searchPlaceholder:{type:String,default:"输入关键字搜索"},searchButtonText:{type:String,default:"搜索"},wordbook:{type:Object,default:()=>({})},wordbookChild:{type:Object,default:()=>({})},showCount:{type:Boolean,default:!0},showClear:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},searchInner:{type:Boolean,default:!1},searchFilter:{type:Object,default:()=>({})},treeSetting:{type:Object,default:()=>({})},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])}},emits:["check","checkWithLevel"],setup(e,{expose:A,emit:B}){const P=e,R={isOpen:!1,multiple:!1,customTitles:["联系人","部门"],itemHeight:250},U=l(""),H=l(!1),W=l([]),G=l([]),z=l([]),M=l([]),J=l([]),Q=l(!1),V=O(function e(l){return l.forEach((l=>{var t;if(null==(t=l.children)?void 0:t.length){const t=se(l.children,[]);l.innerItemsNum=t.length,l.innerLeafs=t,e(l.children)}})),de(l,"")}(P.data));let X=[];const Y=t((()=>!!P.queryLoadChildData)),Z=t((()=>{var e,l;return null!=(l=null==(e=null==P?void 0:P.treeSetting)?void 0:e.checkStrategy)?l:"child"})),ee=t((()=>(null==P?void 0:P.searchFilter)&&Object.keys(null==P?void 0:P.searchFilter).length>0)),le=t((()=>ee.value?{...O(R),...P.searchFilter}:O(R))),te=t((()=>{var e,l;return null!=(l=null==(e=null==P?void 0:P.wordbookChild)?void 0:e.user_expand_keys)?l:[]})),ne=t((()=>{let e=[];return W.value.forEach((l=>{for(let t=0;t<M.value.length;t++){const n=M.value[t];if(n.key==l){e.push(n);break}}})),e}));function ae(e){e.disabled||e.children||!e.key||X.push(e.key)}function ue(e){e.disabled||e.tempTitle||!e.key||X.push(e.key)}async function ie(e){if(P.queryLoadChildData){const l=await P.queryLoadChildData(e);return l.children&&(l.children=l.children.map((e=>({...e,tempTitle:l.tempTitle?`${l.title}/${l.tempTitle}`:l.title})))),l}return e}function re(e){var l;(null==(l=e.children)?void 0:l.every((e=>e.disabled)))&&(e.disabled=!0)}function ce({option:e}){var l,t;if((null==(l=e.children)?void 0:l.length)||Y.value&&!(null==e?void 0:e.isLeaf)){const l=P.wordbook.user_count_obj&&e[P.wordbook.user_count_obj]||"",t=l?`(${l})`:"";return c("span",null,[`${e.title}${t}`])}{const l=null!=(t=e.title_expand_strs)?t:"";return c("p",{class:"user_item"},[e.title,c("span",{class:"user_item_expand",title:l},[l])])}}function oe(e){return e[P.wordbookChild.user_name_obj]||e[P.wordbook.parent_name_obj]||e.orgName||e.title||""}function se(e,l){return e.forEach((e=>{var t;(null==(t=e.children)?void 0:t.length)?se(e.children,l):!e.disabled&&l.push(e)})),l}function de(e,l){return e&&0!==e.length?e.map((e=>{var t;const n=oe(e),a=l?`${n}/${l}`:n;return{...e,tempTitle:l,children:(null==(t=e.children)?void 0:t.length)?de(null==e?void 0:e.children,a):[]}})):[]}async function he(){var e,l;const t=null!=(l=null==(e=null==P?void 0:P.wordbook)?void 0:e.filter_key)?l:"keyword";if(Q.value=!!U.value.trim(),Y.value)z.value=await P.queryTreeSearch(U.value);else{const e=function(){const e={[$.SEARCH_ORG_STAFF]:ee.value,[$.SEARCH_ORG]:P.searchInner},l=Object.keys(e).find((l=>e[l]));return null!=l?l:""}();z.value=I(e,V,U.value,t)}G.value=z.value.length&&U.value?F(z.value):[]}function ve(e,l){var t,n;switch(null!=(n=null==(t=null==P?void 0:P.treeSetting)?void 0:t.checkStrategy)?n:"child"){case"child":!function(e,l){for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n.disabled&&(!n.children||n.isLeaf)&&(l&&!W.value.includes(n.key)&&W.value.push(n.key),!l)){const e=W.value.findIndex((e=>e===n.key));W.value.splice(e,1)}n.children&&ve(n.children,l)}}(e,l);break;case"parent":!function(e,l){W.value=[];for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n.disabled&&!n.tempTitle&&(l&&!W.value.includes(n.key)&&W.value.push(n.key),!l)){const e=W.value.findIndex((e=>e===n.key));W.value.splice(e,1)}}}(e,l)}}function pe(e){ve(z.value,e)}function fe(e){var l;for(let t=0,n=e.length;t<n;t++){const n=e[t],a=J.value.map((e=>e.key));W.value.includes(n.key)&&!a.includes(n.key)&&M.value.push({key:n.key,name:n.title,parentName:n.tempTitle,innerItemsNum:n.innerItemsNum,innerLeafs:n.innerLeafs,originItem:n}),(null==(l=n.children)?void 0:l.length)&&fe(n.children)}}function ye(e){W.value=e}function ke(){W.value=[]}function me(e){W.value=e}function ge(){U.value="",setTimeout((()=>{he()}))}return function e(l,t){var n,a,u,i;for(let r=0,c=l.length;r<c;r++){const c=l[r];let o=te.value.reduce(((e,l)=>e+(c[l]?`${c[l]},`:"")),"");switch(c.title_expand_strs=o.slice(0,-1),c.title=oe(c),c.label=oe(c),c.parentNode=t,c.key||(c.key=c[P.wordbookChild.user_id_obj]||c[P.wordbook.parent_id_obj]||Date.now()),(null==(n=c.children)?void 0:n.length)?(e(c.children,c),re(c)):0===(null==(a=c.children)?void 0:a.length)&&Reflect.deleteProperty(c,"children"),null!=(i=null==(u=null==P?void 0:P.treeSetting)?void 0:u.checkStrategy)?i:"child"){case"child":ae(c);break;case"parent":ue(c)}}}(V,null),z.value=V,P.defaultList.length>0&&(Y.value?(P.defaultList.forEach((e=>W.value.push(e.key))),M.value=O(P.defaultList),J.value=O(P.defaultList)):(P.defaultList.forEach((e=>W.value.push(e))),fe(V))),n((()=>W),(e=>{M.value=J.value.filter((l=>e.value.includes(l.key))),e.value.length&&fe(Y.value?z.value:V),H.value=X.every((e=>M.value.findIndex((l=>l.key===e))>-1));const l=M.value.filter((l=>e.value.includes(l.key)));B("check",e.value),B("checkWithLevel",l)}),{deep:!0}),n((()=>U.value),(e=>{e||ge()})),A({getCheckWithLevel:function(){const e=W.value,l=M.value.filter((l=>e.includes(l.key)));return null!=l?l:[]}}),(l,t)=>(a(),u(i(_),{cols:2,class:"c-select-person"},{default:r((()=>[c(i(b),null,{default:r((()=>[c(i(C),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:r((()=>[c(i(w),{style:{"margin-bottom":"12px"}},{default:r((()=>[o(" clearable "),c(i(x),{class:"search-input",value:U.value,"onUpdate:value":t[0]||(t[0]=e=>U.value=e),placeholder:e.searchPlaceholder,onKeyup:s(he,["enter"])},{suffix:r((()=>[U.value?(a(),u(i(L),{key:0,class:"search-clear",component:i(N),size:"16",onClick:ge},null,8,["component"])):o("v-if",!0)])),_:1},8,["value","placeholder","onKeyup"]),c(i(S),{type:"primary",onClick:he},{default:r((()=>[d(h(e.searchButtonText),1)])),_:1})])),_:1}),e.multiple&&!Q.value?v((a(),u(i(j),{key:0,checked:H.value,"onUpdate:checked":[t[1]||(t[1]=e=>H.value=e),pe]},{default:r((()=>[d(" 全选 ")])),_:1},8,["checked"])),[[p,i(X).length<1e3]]):o("v-if",!0),o(" 支持选人 "),e.searchInner&&e.multiple&&Q.value&&"parent"===i(Z)?(a(),u(D,{key:1,treeData:z.value,checkedKeys:W.value,onNotifyCheck:me},null,8,["treeData","checkedKeys"])):i(ee)&&e.multiple&&Q.value&&"parent"===i(Z)?(a(),f(y,{key:2},[o(" 同时兼容选人和选部门 "),c(E,{treeData:z.value,checkedKeys:W.value,searchFilter:i(le),onNotifyCheck:me,onNotifyClear:ge},null,8,["treeData","checkedKeys","searchFilter"])],2112)):(a(),u(i(T),k({key:3,"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":W.value,"expanded-keys":G.value,"onUpdate:expanded-keys":t[2]||(t[2]=e=>G.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":W.value,"onUpdate:selected-keys":t[3]||(t[3]=e=>W.value=e),data:z.value,"check-strategy":"child","render-label":ce},e.treeSetting,{"onUpdate:checkedKeys":ye,onLoad:ie}),null,16,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data"]))])),_:1})])),_:1}),c(i(b),null,{default:r((()=>[c(i(C),{vertical:"",style:{"padding-left":"12px"}},{default:r((()=>[c(i(C),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:r((()=>[e.showCount?(a(),f("span",K,"已选择:"+h(i(ne).length),1)):o("v-if",!0),e.showClear?(a(),f("span",{key:1,class:"c-select-person__clear-btn",onClick:ke},"清空")):o("v-if",!0)])),_:1}),m("div",q,[(a(!0),f(y,null,g(i(ne),(e=>(a(),f("span",{class:"c-select-person__tag-item",key:e.key},[d(h(e.name)+" "+h(e.parentName?`(${e.parentName})`:"")+" "+h(e.innerItemsNum?`(${e.innerItemsNum}人)`:"")+" ",1),c(i(L),{class:"tag-close",component:i(N),onClick:l=>function(e){W.value=W.value.filter((l=>l!==e.key))}(e)},null,8,["component","onClick"])])))),128))])])),_:1})])),_:1})])),_:1}))}});export{A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.c-select-person{padding:0 12px}.c-select-person__scroll{height:308px;overflow-y:auto}.c-select-person__clear-btn{color:#5585f5;cursor:pointer}.c-select-person__tag-item{align-items:center;background:rgba(85,133,245,.08);border:1px solid rgba(85,133,245,.5);border-radius:4px;box-sizing:border-box;color:#5585f5;display:inline-flex;font-size:14px;height:24px;line-height:24px;list-style:none;margin:0 8px 4px 0;padding:0 6px;transition:all .3s cubic-bezier(.215,.61,.355,1);white-space:nowrap}.c-select-person__tag-item .tag-close{color:#5585f5;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;margin-left:3px;transition:all .3s}.c-select-person__tag-item .tag-close:hover{color:rgba(85,133,245,.6)}.c-select-person__tag-item .tag-close:active{color:#fff}.c-select-person .n-tree-node-content{flex:1;overflow:hidden}.c-select-person .search-input .search-clear{cursor:pointer}.c-select-person .user_item{align-items:center;display:flex;font-size:14px}.c-select-person .user_item .user_item_expand{flex:1;font-size:12px;margin-left:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-select-person .search_title{border-bottom:1px solid #eee;font-size:16px;margin-top:8px;padding-bottom:5px}.c-select-person .select-person__multiple-search{display:flex;flex-direction:column}.c-select-person .select-person__multiple-search .n-checkbox{height:30px;overflow:hidden}.c-select-person .select-person__multiple-search .n-checkbox .n-checkbox__label{overflow:hidden}.c-select-person .select-person__multiple-search .search_item{align-items:flex-start;box-sizing:content-box;cursor:pointer;display:flex;flex-direction:column;height:40px;margin:2px;padding:3px}.c-select-person .select-person__multiple-search .search_item .title{align-items:center;display:flex;font-size:14px;overflow:hidden;width:100%}.c-select-person .select-person__multiple-search .search_item .desc{color:#7d88b5;font-size:12px;margin-top:5px}.c-select-person .select-person__multiple-search .search_item:hover{background:#f1f1f1}.c-select-person .select-person__multiple-search .search_disabled{color:#c2c2c2;cursor:not-allowed}.c-select-person .select-person__multiple-search .search_disabled .desc{color:#c2c2c2}.c-select-person .n-empty{margin-top:30px}
|
|
1
|
+
.c-select-person{padding:0 12px}.c-select-person__scroll{height:308px;overflow-y:auto}.c-select-person__clear-btn{color:#5585f5;cursor:pointer}.c-select-person__tag-item{align-items:center;background:rgba(85,133,245,.08);border:1px solid rgba(85,133,245,.5);border-radius:4px;box-sizing:border-box;color:#5585f5;display:inline-flex;font-size:14px;height:24px;line-height:24px;list-style:none;margin:0 8px 4px 0;padding:0 6px;transition:all .3s cubic-bezier(.215,.61,.355,1);white-space:nowrap}.c-select-person__tag-item .tag-close{color:#5585f5;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;margin-left:3px;transition:all .3s}.c-select-person__tag-item .tag-close:hover{color:rgba(85,133,245,.6)}.c-select-person__tag-item .tag-close:active{color:#fff}.c-select-person .n-tree-node-content{flex:1;overflow:hidden}.c-select-person .search-input .search-clear{cursor:pointer}.c-select-person .user_item{align-items:center;display:flex;font-size:14px;margin:0}.c-select-person .user_item .user_item_expand{flex:1;font-size:12px;margin-left:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-select-person .search_title{border-bottom:1px solid #eee;font-size:16px;margin-top:8px;padding-bottom:5px}.c-select-person .select-person__multiple-search{display:flex;flex-direction:column}.c-select-person .select-person__multiple-search .n-checkbox{height:30px;overflow:hidden}.c-select-person .select-person__multiple-search .n-checkbox .n-checkbox__label{overflow:hidden}.c-select-person .select-person__multiple-search .search_item{align-items:flex-start;box-sizing:content-box;cursor:pointer;display:flex;flex-direction:column;height:40px;margin:2px;padding:3px}.c-select-person .select-person__multiple-search .search_item .title{align-items:center;display:flex;font-size:14px;overflow:hidden;width:100%}.c-select-person .select-person__multiple-search .search_item .desc{color:#7d88b5;font-size:12px;margin-top:5px}.c-select-person .select-person__multiple-search .search_item:hover{background:#f1f1f1}.c-select-person .select-person__multiple-search .search_disabled{color:#c2c2c2;cursor:not-allowed}.c-select-person .select-person__multiple-search .search_disabled .desc{color:#c2c2c2}.c-select-person .n-empty{margin-top:30px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WidgetOptionEnums as e,WidgetTypeEnums as i,WidgetValEnums as t}from"../types/enums.js";import{isString as n}from"lodash-es";import{formatDateRangeInfo as l,presetValToTimestamp as o}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as a}from"../components/render-widget/enums.js";const u={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function r(){return{transformData:function(t,n){return t.map((t=>{var l,o,a;const{optionInfo:r={list:[],manualMapping:!0,dynamicOptionInfo:{},showWholeOption:!1},type:E,defaultValue:s,optionType:p,filterExplicit:T,rangeFilter:d}=t,c={},m={title:(f=t).title,alias:f.customTitle,isShowSearch:f.isShowSearch?1:0,filterExplicit:f.filterExplicit?1:0,explicitRequired:f.explicitRequired?1:0,advanceOptionSetting:f.optionType?u[f.optionType]:"",placeholder:f.remark,advanceColWidth:f.width};var f;let g,v,y=E;T?(g=E===i.SELECT&&p===e.MULTIPLE?null==s?void 0:s.valueList:null==(l=null==s?void 0:s.valueList)?void 0:l[0],v=null==s?void 0:s.unit,E===i.LABEL&&(y="SELECTLABEL",g=null==s?void 0:s.valueList),E===i.DATE&&(y="DATE_OUT"),E===i.DATE_TIME&&(y="DATETIME_OUT")):E===i.SELECT&&(null==r?void 0:r.list)&&(null==r?void 0:r.list.length)<10&&(y="CHECKBOX_GROUP"),d&&(E===i.INPUT_NUMBER&&(y="INPUTNUMBER_RANGE"),E===i.DATE&&(y=T?"DATE_RANGE_OUT":"DATE_RANGE_INNER"),E===i.DATE_TIME&&(y=T?"DATETIME_RANGE_OUT":"DATETIME_RANGE_INNER")),E===i.SELECT&&!1===(null==r?void 0:r.manualMapping)&&(y=i.SELECTDYNAMIC);const L={isRender:!0,widgetType:y,originType:E,valueList:null==(o=null==r?void 0:r.list)?void 0:o.map((({name:e,value:i})=>({value:i,label:e}))),defaultValue:g,defValueUnit:v,optionSetting:p,multiple:p===e.MULTIPLE||y===i.SELECTLABEL,manualMapping:null==r?void 0:r.manualMapping,showWholeOption:null==r?void 0:r.showWholeOption,dynamicOptionInfo:null==r?void 0:r.dynamicOptionInfo,classifyStr:null==s?void 0:s.classifyStr,linkageFieldKeys:null!=(a=null==s?void 0:s.linkageFieldKeys)?a:[]};return{...m,fieldType:t.dataType,columnName:t.name,settingObj:c,setting:JSON.stringify(c),widgetCfg:L,rangeFilter:d,unit:null!=v?v:"",_extendData:null!=n?n:{}}}))},getCacheDef:function(e,t){const{widgetType:n,widgetCfg:l}=e;return[i.SELECT,i.CHECKBOX_GROUP,i.SELECTDYNAMIC].includes(n)&&l.multiple?t:t[0]},transformClassifyChild:function(e,t){const n={};return e&&e.length>0&&e.forEach((e=>{const u=e.field_key;n[u]="";const r=t.find((e=>e.name===u));if(r){const t=Array.isArray(e.value)&&r.type===i.SELECT?e.value:e.value.toString();if(n[u]=t,e.unit&&e.unit!==a.CUSTOM){let t="";r.type===i.DATE&&(t=r.rangeFilter?l(e.unit,"YYYY-MM-DD",r.optionType):o(e.unit,"YYYY-MM-DD")),r.type===i.DATE_TIME&&(t=r.rangeFilter?l(e.unit,"YYYY-MM-DD HH:mm:ss",r.optionType):o(e.unit,"YYYY-MM-DD HH:mm:ss")),n[u]=t}}})),n},transformParams:function(e){const l={},o=[i.SELECT,i.SELECTDYNAMIC];return e&&e.length>0&&e.forEach((e=>{const i=e.field_key,a=o.includes(e.widgetType)||e.value&&e.value.length>1?e.value.map((e=>n(e)&&e.includes("&")?e.split("&")[1]:e)):e.value.toString();Array.isArray(a)&&a.length>0&&a.includes(t.WHOLE)||(l[i]=a)})),l}}}export{r as default};
|
|
1
|
+
import{WidgetOptionEnums as e,WidgetTypeEnums as i,WidgetValEnums as t}from"../types/enums.js";import{isString as n}from"lodash-es";import{formatDateRangeInfo as l,presetValToTimestamp as o}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as a}from"../components/render-widget/enums.js";const u={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function r(){return{transformData:function(t,n){return t.map((t=>{var l,o,a;const{optionInfo:r={list:[],manualMapping:!0,dynamicOptionInfo:{},showWholeOption:!1},type:E,defaultValue:s,optionType:p,filterExplicit:T,rangeFilter:d}=t,c={},m={title:(f=t).title,alias:f.customTitle,isShowSearch:f.isShowSearch?1:0,filterExplicit:f.filterExplicit?1:0,explicitRequired:f.explicitRequired?1:0,advanceOptionSetting:f.optionType?u[f.optionType]:"",placeholder:f.remark,advanceColWidth:f.width};var f;let g,v,y=E;T?(g=E===i.SELECT&&p===e.MULTIPLE?null==s?void 0:s.valueList:null==(l=null==s?void 0:s.valueList)?void 0:l[0],v=null==s?void 0:s.unit,E===i.LABEL&&(y="SELECTLABEL",g=null==s?void 0:s.valueList),E===i.DATE&&(y="DATE_OUT"),E===i.DATE_TIME&&(y="DATETIME_OUT")):E===i.SELECT&&(null==r?void 0:r.list)&&(null==r?void 0:r.list.length)<10&&(y="CHECKBOX_GROUP"),d&&(E===i.INPUT_NUMBER&&(y="INPUTNUMBER_RANGE"),E===i.DATE&&(y=T?"DATE_RANGE_OUT":"DATE_RANGE_INNER"),E===i.DATE_TIME&&(y=T?"DATETIME_RANGE_OUT":"DATETIME_RANGE_INNER")),E===i.SELECT&&!1===(null==r?void 0:r.manualMapping)&&(y=i.SELECTDYNAMIC);const L={isRender:!0,widgetType:y,originType:E,valueList:null==(o=null==r?void 0:r.list)?void 0:o.map((({name:e,value:i})=>({value:i,label:e}))),defaultValue:g,defValueUnit:v,optionSetting:p,multiple:p===e.MULTIPLE||y===i.SELECTLABEL,manualMapping:null==r?void 0:r.manualMapping,showWholeOption:null==r?void 0:r.showWholeOption,dynamicOptionInfo:null==r?void 0:r.dynamicOptionInfo,classifyStr:null==s?void 0:s.classifyStr,linkageFieldKeys:null!=(a=null==s?void 0:s.linkageFieldKeys)?a:[]};return{...m,fieldType:t.dataType,columnName:t.name,settingObj:c,setting:JSON.stringify(c),widgetCfg:L,rangeFilter:d,unit:null!=v?v:"",_extendData:null!=n?n:{}}}))},getCacheDef:function(e,t){const{widgetType:n,widgetCfg:l}=e;return[i.SELECT,i.CHECKBOX_GROUP,i.SELECTDYNAMIC].includes(n)&&l.multiple?t:t[0]},transformClassifyChild:function(e,t){const n={};return e&&e.length>0&&e.forEach((e=>{const u=e.field_key;n[u]="";const r=t.find((e=>e.name===u));if(r){const t=Array.isArray(e.value)&&r.type===i.SELECT?e.value:e.value.toString();if(n[u]=t,e.unit&&e.unit!==a.CUSTOM){let t="";r.type===i.DATE&&(t=r.rangeFilter?l(e.unit,"YYYY-MM-DD",r.optionType):o(e.unit,"YYYY-MM-DD")),r.type===i.DATE_TIME&&(t=r.rangeFilter?l(e.unit,"YYYY-MM-DD HH:mm:ss",r.optionType):o(e.unit,"YYYY-MM-DD HH:mm:ss")),n[u]=t}}})),n},transformParams:function(e){const l={},o=[i.SELECT,i.SELECTDYNAMIC,i.CHECKBOX_GROUP];return e&&e.length>0&&e.forEach((e=>{const i=e.field_key,a=o.includes(e.widgetType)||e.value&&e.value.length>1?e.value.map((e=>n(e)&&e.includes("&")?e.split("&")[1]:e)):e.value.toString();Array.isArray(a)&&a.length>0&&a.includes(t.WHOLE)||(l[i]=a)})),l}}}export{r as default};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Func } from '../../../../es/shared/types';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
value: {
|
|
5
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
6
|
+
};
|
|
7
|
+
onChange: {
|
|
8
|
+
type: PropType<Func<any[], any>>;
|
|
9
|
+
default: () => {};
|
|
10
|
+
};
|
|
11
|
+
prefix: {
|
|
12
|
+
type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
|
|
13
|
+
};
|
|
14
|
+
suffix: {
|
|
15
|
+
type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
|
|
16
|
+
};
|
|
17
|
+
precision: {
|
|
18
|
+
type: NumberConstructor;
|
|
19
|
+
};
|
|
20
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
value: {
|
|
22
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
23
|
+
};
|
|
24
|
+
onChange: {
|
|
25
|
+
type: PropType<Func<any[], any>>;
|
|
26
|
+
default: () => {};
|
|
27
|
+
};
|
|
28
|
+
prefix: {
|
|
29
|
+
type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
|
|
30
|
+
};
|
|
31
|
+
suffix: {
|
|
32
|
+
type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
|
|
33
|
+
};
|
|
34
|
+
precision: {
|
|
35
|
+
type: NumberConstructor;
|
|
36
|
+
};
|
|
37
|
+
}>>, {
|
|
38
|
+
onChange: Func<any[], any>;
|
|
39
|
+
}>;
|
|
40
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,ref as t,computed as n,watch as u,createVNode as l}from"vue";import{isNumber as a,isString as i}from"lodash-es";import{NInput as r}from"naive-ui";import"../../../components/form-render/index.js";import{createInputSlot as o}from"../../../components/form-render/src/utils/index.js";var s=e({props:{value:{type:[Number,String]},onChange:{type:Function,default:()=>({})},prefix:{type:[String,Function,Object]},suffix:{type:[String,Function,Object]},precision:{type:Number}},setup(e){const s=o(e),v=t(),p=n({get:()=>v.value,set(e){if(a(e))return v.value=e+"";i(e)&&(v.value=e.endsWith("/")?"/":e)}});function c(e=-1){const t=a(+e)&&e>=0?+e:null;return new RegExp(`^-?(0|[1-9][0-9]*)?${0===t?"":`(\\.[0-9]${a(t)?`{0,${t}}`:"*"})?`}$`)}u((()=>e.value),(e=>p.value=e),{immediate:!0});const f=c(),m=n((()=>c(e.precision)));function d(e){return!(null!=e&&""!==e&&"/"!==e&&i(e)&&!e.endsWith("/"))||m.value.test(e)&&"-."!==e&&!e.startsWith(".")}function g(){if(i(p.value)&&"-"!==p.value)if("/"===p.value)e.onChange(p.value);else if(f.test(p.value)){const t=p.value.endsWith(".")?p.value.slice(0,-1):p.value;e.onChange(p.value=t)}else p.value=e.value;else p.value=e.value}return()=>l(r,{value:p.value,"onUpdate:value":e=>p.value=e,"allow-input":d,onBlur:g},s)}});export{s as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"./InputNumberSlash.js";export{default}from"./InputNumberSlash.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{computed as e,unref as t}from"vue";import{useEventListener as n}from"@vueuse/core";import{isValid as l}from"date-fns";function i(e,t=""){e.value=t,e.dispatchEvent(new InputEvent("input"))}function o(e,t,n,l){const o=e.value;if(!o)return;const u=e.selectionEnd||0,s=o.length;let r=0,
|
|
1
|
+
import{computed as e,unref as t}from"vue";import{useEventListener as n}from"@vueuse/core";import{isValid as l}from"date-fns";function i(e,t=""){e.value=t,e.dispatchEvent(new InputEvent("input"))}function o(e,t,n,l){const o=e.value;if(!o)return;const u=e.selectionEnd||0,s=o.length;let r=0,a=0,c=0,d="",f=0;for(;r<s;){const e=o[r++];if(/\d/.test(e)&&(d+=e),r===u){c=d.length;const e=o.slice(r).match(/^\d+/);f=e?e[0].length:0}}const v=Array.isArray(t)?function(e){var t,n;let l=!1,i=e.parentNode||null;for(;i;){if(null==(n=null==(t=i.classList)?void 0:t.contains)?void 0:n.call(t,"n-time-picker")){l=!0;break}i=i.parentNode||null}return l}(e)?t[1]:t[0]:t;let g="",m=0,p=0;for(r=0;r<v.length&&(l||!(a>=d.length));){const e=v[r++];if(/[yMdHms]/.test(e)?g+=d[a++]||"0":g+=e,n&&a===c){c=-1,m=g.length,p=m;let e=v.slice(r).match(/^[yMdHms]+/);e?(f=Math.min(f,e[0].length),f&&(g+=d.slice(a,a+f),a+=f),r+=e[0].length):(e=v.slice(r).match(/^([^yMdHms]+)([yMdHms]*)/),e&&(m+=e[1].length,p=m+e[2].length))}}const h=g!==o;return h&&i(e,g),n&&(m=m||g.length+1,p=p||g.length+1,e.setSelectionRange(m,p)),h}function u(u,s,r,a){const c=e((()=>{var e;return null==(e=u.value)?void 0:e.$el})),d=e((()=>{const e={};return["date","time","hour","minute","second"].forEach((t=>function(e,t){const n=`is-${t}-disabled`;r[n]&&(e[n.replace(/-(\w)/g,((e,t)=>t.toUpperCase()))]=r[n])}(e,t))),e}));function f(e){o(e,t(s),!1,!0);const n=null==e?void 0:e.value,u=Reflect.get(r,"type")||"";n&&!u.includes("range")&&l(new Date(n))&&!function(e){const{isTimeDisabled:t,isDateDisabled:n,isHourDisabled:l,isMinuteDisabled:i,isSecondDisabled:o}=d.value;if(null==n?void 0:n(e.getTime()))return;const u=(null==t?void 0:t(e.getTime()).isHourDisabled)||l,s=(null==t?void 0:t(e.getTime()).isMinuteDisabled)||i,r=(null==t?void 0:t(e.getTime()).isSecondDisabled)||o;if(null==u?void 0:u(e.getHours()))return;if(null==s?void 0:s(e.getMinutes()))return;if(null==r?void 0:r(e.getSeconds()))return;return!0}(new Date(n))&&i(e)}return n(c,"input",(function(e){const n=e.target;if(!n.value||!Reflect.get(n,"_f_"))return;Reflect.set(n,"_f_",0),o(n,t(s),!0)&&(e.preventDefault(),e.stopPropagation())}),!0),n(c,"keydown",(function(e){const{key:t}=e,n=e.target;if(/\d/.test(t)&&n)Reflect.set(n,"_f_",1);else if("Enter"===t)f(n);else if("Backspace"===t&&!a){const e=null==n?void 0:n.value;1===(null==e?void 0:e.length)&&(i(n),n.blur(),n.focus())}}),!0),n(c,"mouseup",(function(e){const t=e.target;["INPUT"].includes(t.tagName)&&0===e.button&&function(e){const{selectionStart:t=0,selectionEnd:n=0,value:l}=e;if(t!==n)return;const i=/(\d+)/g;let o,u,s;for(;null!==(o=i.exec(l));)if(t&&o.index<=t&&t<=i.lastIndex){u=o.index,s=i.lastIndex;break}void 0!==u&&void 0!==s&&e.setSelectionRange(u,s)}(t)}),!0),n(c,"paste",(function(e){var t,n;const l=(null==(t=e.clipboardData)?void 0:t.getData("text"))||"",o=null==(n=l.match(/\d+/g))?void 0:n.join(",");if(!o)return;e.preventDefault(),e.stopPropagation();const u=e.target;i(u,o),f(u)}),!0),{handleConfirm:f,focus:()=>{var e,t;return null==(t=null==(e=u.value)?void 0:e.focus)?void 0:t.call(e)},blur:()=>{var e,t;return null==(t=null==(e=u.value)?void 0:e.blur)?void 0:t.call(e)}}}export{u as useDateTime};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.49-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.49-beta.11",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.49-beta.11",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
|
@@ -31,5 +31,6 @@ declare const animeType: {
|
|
|
31
31
|
easeOutBounce: typeof bounceOut;
|
|
32
32
|
easeInOutBounce: (x: number) => number;
|
|
33
33
|
};
|
|
34
|
-
export declare const doAnimation: (startValue: number, endValue: number, during: number | undefined, callback: (v: number) => void, type?: keyof typeof animeType, onAnimationEnd?: (
|
|
34
|
+
export declare const doAnimation: (startValue: number, endValue: number, during: number | undefined, callback: (v: number) => void, type?: keyof typeof animeType, onAnimationEnd?: () => void) => () => boolean;
|
|
35
|
+
export declare function doAnimationPromise(startValue: number, endValue: number, during: number | undefined, callback: (v: number) => void, type?: keyof typeof animeType): Promise<void>;
|
|
35
36
|
export {};
|
package/es/shared/utils/anime.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const n=Math.pow,
|
|
1
|
+
const n=Math.pow,e=Math.sqrt,t=Math.sin,u=Math.cos,r=Math.PI,c=1.70158,i=1.525*c,a=2*r/3,o=2*r/4.5;function s(n){const e=7.5625,t=2.75;return n<1/t?e*n*n:n<2/t?e*(n-=1.5/t)*n+.75:n<2.5/t?e*(n-=2.25/t)*n+.9375:e*(n-=2.625/t)*n+.984375}const f={easeInQuad:function(n){return n*n},easeOutQuad:function(n){return 1-(1-n)*(1-n)},easeInOutQuad:function(e){return e<.5?2*e*e:1-n(-2*e+2,2)/2},easeInCubic:function(n){return n*n*n},easeOutCubic:function(e){return 1-n(1-e,3)},easeInOutCubic:function(e){return e<.5?4*e*e*e:1-n(-2*e+2,3)/2},easeInQuart:function(n){return n*n*n*n},easeOutQuart:function(e){return 1-n(1-e,4)},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-n(-2*e+2,4)/2},easeInQuint:function(n){return n*n*n*n*n},easeOutQuint:function(e){return 1-n(1-e,5)},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1-n(-2*e+2,5)/2},easeInSine:function(n){return 1-u(n*r/2)},easeOutSine:function(n){return t(n*r/2)},easeInOutSine:function(n){return-(u(r*n)-1)/2},easeInExpo:function(e){return 0===e?0:n(2,10*e-10)},easeOutExpo:function(e){return 1===e?1:1-n(2,-10*e)},easeInOutExpo:function(e){return 0===e?0:1===e?1:e<.5?n(2,20*e-10)/2:(2-n(2,-20*e+10))/2},easeInCirc:function(t){return 1-e(1-n(t,2))},easeOutCirc:function(t){return e(1-n(t-1,2))},easeInOutCirc:function(t){return t<.5?(1-e(1-n(2*t,2)))/2:(e(1-n(-2*t+2,2))+1)/2},easeInElastic:function(e){return 0===e?0:1===e?1:-n(2,10*e-10)*t((10*e-10.75)*a)},easeOutElastic:function(e){return 0===e?0:1===e?1:n(2,-10*e)*t((10*e-.75)*a)+1},easeInOutElastic:function(e){return 0===e?0:1===e?1:e<.5?-n(2,20*e-10)*t((20*e-11.125)*o)/2:n(2,-20*e+10)*t((20*e-11.125)*o)/2+1},easeInBack:function(n){return 2.70158*n*n*n-c*n*n},easeOutBack:function(e){return 1+2.70158*n(e-1,3)+c*n(e-1,2)},easeInOutBack:function(e){return e<.5?n(2*e,2)*(7.189819*e-i)/2:(n(2*e-2,2)*((i+1)*(2*e-2)+i)+2)/2},easeInBounce:function(n){return 1-s(1-n)},easeOutBounce:s,easeInOutBounce:function(n){return n<.5?(1-s(1-2*n))/2:(1+s(2*n-1))/2}},I=(n,e,t=1e3,u,r="easeInBack",c)=>{const i=e-n,a=1e3/60,o=t/a,s=window.requestAnimationFrame||function(n){setTimeout(n,a)},I=1/o;let O=0,Q=!1;return function t(){if(Q)return;const a=n+i*f[r](O);u(a),O+=I,O<1?s(t):(s((()=>u(e))),null==c||c())}(),()=>Q=!0};function O(n,e,t=1e3,u,r="easeInBack"){return new Promise((c=>I(n,e,t,u,r,c)))}export{I as doAnimation,O as doAnimationPromise};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.49-beta.
|
|
3
|
+
"version": "3.1.49-beta.11",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"iOS 7",
|
|
64
64
|
"last 3 iOS versions"
|
|
65
65
|
],
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "b42a03e1d214d61fba1b1761e45c52f535e30166"
|
|
67
67
|
}
|