cnhis-design-vue 3.1.51-release.2 → 3.1.51-release.4
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/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/callback/src/components/render/popupMaps.d.ts +3 -1
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/fabric-chart/index.d.ts +5 -6
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +5 -6
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
- package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +0 -6
- package/es/components/fabric-chart/src/components/PopupTip.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/style/index.css +1 -1
- package/es/components/form-config/index.d.ts +6 -2
- package/es/components/form-config/src/FormConfig.vue.d.ts +6 -2
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +3 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -1
- package/es/components/form-render/index.d.ts +3 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +3 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +3 -1
- package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.d.ts +3 -1
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
- package/es/components/form-render/src/types/index.d.ts +4 -1
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.d.ts +2 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +27 -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/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separateUtils.d.ts +4 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separateUtils.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 +8 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +3 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +6 -2
- package/es/components/info-header/src/InfoHeader.vue.d.ts +6 -2
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +3 -1
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +3 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
- package/es/components/shortcut-provider/src/hooks/useShortcuts.d.ts +1 -0
- package/es/components/shortcut-provider/src/hooks/useShortcuts.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +4 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +4 -1
- package/es/components/slider-tree/index.d.ts +79 -0
- package/es/components/slider-tree/index.js +1 -0
- package/es/components/slider-tree/src/hooks/useAsyncData.d.ts +6 -0
- package/es/components/slider-tree/src/hooks/useAsyncData.js +1 -0
- package/es/components/slider-tree/src/index.vue.d.ts +77 -0
- package/es/components/slider-tree/src/index.vue.js +1 -0
- package/es/components/slider-tree/src/index.vue2.js +1 -0
- package/es/components/slider-tree/src/utils/index.d.ts +13 -0
- package/es/components/slider-tree/src/utils/index.js +1 -0
- package/es/components/slider-tree/src/utils/tool.d.ts +1 -0
- package/es/components/slider-tree/src/utils/tool.js +1 -0
- package/es/components/slider-tree/style/index.css +1 -0
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
package/es/components/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ import CTableExportField from './table-export-field';
|
|
|
33
33
|
import CExpandField from './expand-field';
|
|
34
34
|
import CMultiChat from './multi-chat';
|
|
35
35
|
import CCallback from './callback';
|
|
36
|
+
import CSliderTree from './slider-tree';
|
|
36
37
|
export * from './form-render';
|
|
37
38
|
export * from './shortcut-provider';
|
|
38
39
|
export * from './shortcut-setter';
|
|
@@ -49,8 +50,9 @@ export * from '../../es/shared/directive';
|
|
|
49
50
|
export * from './guide';
|
|
50
51
|
export * from './select-label';
|
|
51
52
|
export * from './card-reader-sdk';
|
|
53
|
+
export * from './slider-tree';
|
|
52
54
|
declare function install(app: App): void;
|
|
53
|
-
export { CGrid, CBigTable, CFieldSet, CButtonPrint, CSelectPerson, CSelectLabel, CLabelFormContent, 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, CCallback };
|
|
55
|
+
export { CGrid, CBigTable, CFieldSet, CButtonPrint, CSelectPerson, CSelectLabel, CLabelFormContent, 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, CCallback, CSliderTree };
|
|
54
56
|
declare const _default: {
|
|
55
57
|
install: typeof install;
|
|
56
58
|
};
|
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"./map/index.js";export{default as CMap}from"./map/index.js";import n from"./vod-chunk-upload/index.js";export{default as CVodChunkUpload}from"./vod-chunk-upload/index.js";import{CScaleView as m,CRadio as f,CCheckbox 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"./map/index.js";export{default as CMap}from"./map/index.js";import n from"./vod-chunk-upload/index.js";export{default as CVodChunkUpload}from"./vod-chunk-upload/index.js";import{CScaleView as m,CRadio as f,CCheckbox as l,CSelect as p,CDatetime as c}from"./scale-view/index.js";export{CCheckbox,CDatetime,CRadio,CScaleView,CSelect}from"./scale-view/index.js";import u from"./info-header/index.js";export{default as CInfoHeader}from"./info-header/index.js";import x from"./time-line/index.js";export{default as CTimeLine}from"./time-line/index.js";import C from"./base-search/index.js";export{default as CBaseSearch}from"./base-search/index.js";import j from"./quick-search/index.js";export{default as CQuickSearch}from"./quick-search/index.js";import h from"./classification/index.js";export{default as CClassification}from"./classification/index.js";import b from"./bpmn-workflow/index.js";export{default as CBpmnWorkflow}from"./bpmn-workflow/index.js";import k from"./steps-wheel/index.js";export{default as CStepsWheel}from"./steps-wheel/index.js";import g from"./editor/index.js";export{default as CEditor}from"./editor/index.js";import S from"./form-render/index.js";export{default as CFormRender}from"./form-render/index.js";import F from"./fabric-chart/index.js";export{default as CFabricChart}from"./fabric-chart/index.js";import P 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 y from"./form-config/index.js";export{default as CFormConfig}from"./form-config/index.js";import T from"./iho-table/index.js";export{default as CIhoTable,useIhoTablePresetPlugins}from"./iho-table/index.js";import B from"./keyboard/index.js";export{default as CKeyboard}from"./keyboard/index.js";import D from"./search-cascader/index.js";export{default as CSearchCascader}from"./search-cascader/index.js";import A from"./recommend-search/index.js";export{default as CRecommendSearch}from"./recommend-search/index.js";import I 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 L from"./config-provider/index.js";export{default as CConfigProvider}from"./config-provider/index.js";import w from"./picture-clipper/index.js";export{default as CPictureClipper}from"./picture-clipper/index.js";import E from"./table-export-field/index.js";export{default as CTableExportField}from"./table-export-field/index.js";import K from"./expand-field/index.js";export{default as CExpandField}from"./expand-field/index.js";import V from"./multi-chat/index.js";export{default as CMultiChat}from"./multi-chat/index.js";import H from"./callback/index.js";export{default as CCallback}from"./callback/index.js";import M from"./slider-tree/index.js";export{default as CSliderTree}from"./slider-tree/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{vFlexibleResize}from"../shared/directive/flexibleResize.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";export{transformOriginToTree}from"./slider-tree/src/utils/index.js";const O={CGrid:e,CBigTable:r,CFieldSet:o,CButtonPrint:t,CSelectPerson:s,CSelectLabel:i,CLabelFormContent:a,CScaleView:m,CMap:d,CVodChunkUpload:n,CRadio:f,CCheckbox:l,CSelect:p,CDatetime:c,CInfoHeader:u,CTimeLine:x,CBaseSearch:C,CQuickSearch:j,CClassification:h,CBpmnWorkflow:b,CStepsWheel:k,CEditor:g,CFormRender:S,CFabricChart:F,CShortcutProvider:P,CShortcutSetter:v,CFormConfig:y,CIhoTable:T,CKeyboard:B,CSearchCascader:D,CRecommendSearch:A,CDatePicker:I,CTimePicker:R,CConfigProvider:L,CPictureClipper:w,CTableExportField:E,CExpandField:K,CMultiChat:V,CCallback:H,CSliderTree:M};var q={install:function(e){Object.values(O).forEach((r=>{r.install(e)}))},...O};export{q as default};
|
|
@@ -3127,7 +3127,9 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3127
3127
|
onKeydown: (event: KeyboardEvent) => Promise<void>;
|
|
3128
3128
|
clearSpan: (uuid: string) => void;
|
|
3129
3129
|
exposeEvent: {
|
|
3130
|
-
validate(path?: string
|
|
3130
|
+
validate(path?: string, { force }?: {
|
|
3131
|
+
force?: boolean | undefined;
|
|
3132
|
+
}): Promise<void>;
|
|
3131
3133
|
getFormValues(needCombineExtendKey?: boolean): any;
|
|
3132
3134
|
setFormValues(values: import("../../../es/shared/types").AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
|
|
3133
3135
|
setFieldState(path: string, setter: (field: Partial<Pick<import("@formily/core").Field<any, any, any, any>, import("@formily/core").NonFunctionPropertyNames<{
|
|
@@ -4128,7 +4130,9 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4128
4130
|
onKeydown: (event: KeyboardEvent) => Promise<void>;
|
|
4129
4131
|
clearSpan: (uuid: string) => void;
|
|
4130
4132
|
exposeEvent: {
|
|
4131
|
-
validate(path?: string
|
|
4133
|
+
validate(path?: string, { force }?: {
|
|
4134
|
+
force?: boolean | undefined;
|
|
4135
|
+
}): Promise<void>;
|
|
4132
4136
|
getFormValues(needCombineExtendKey?: boolean): any;
|
|
4133
4137
|
setFormValues(values: import("../../../es/shared/types").AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
|
|
4134
4138
|
setFieldState(path: string, setter: (field: Partial<Pick<import("@formily/core").Field<any, any, any, any>, import("@formily/core").NonFunctionPropertyNames<{
|
|
@@ -3121,7 +3121,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3121
3121
|
onKeydown: (event: KeyboardEvent) => Promise<void>;
|
|
3122
3122
|
clearSpan: (uuid: string) => void;
|
|
3123
3123
|
exposeEvent: {
|
|
3124
|
-
validate(path?: string
|
|
3124
|
+
validate(path?: string, { force }?: {
|
|
3125
|
+
force?: boolean | undefined;
|
|
3126
|
+
}): Promise<void>;
|
|
3125
3127
|
getFormValues(needCombineExtendKey?: boolean): any;
|
|
3126
3128
|
setFormValues(values: AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
|
|
3127
3129
|
setFieldState(path: string, setter: (field: Partial<Pick<import("../../../../es/components/form-render").Field<any, any, any, any>, import("../../../../es/components/form-render").NonFunctionPropertyNames<{
|
|
@@ -4122,7 +4124,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4122
4124
|
onKeydown: (event: KeyboardEvent) => Promise<void>;
|
|
4123
4125
|
clearSpan: (uuid: string) => void;
|
|
4124
4126
|
exposeEvent: {
|
|
4125
|
-
validate(path?: string
|
|
4127
|
+
validate(path?: string, { force }?: {
|
|
4128
|
+
force?: boolean | undefined;
|
|
4129
|
+
}): Promise<void>;
|
|
4126
4130
|
getFormValues(needCombineExtendKey?: boolean): any;
|
|
4127
4131
|
setFormValues(values: AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
|
|
4128
4132
|
setFieldState(path: string, setter: (field: Partial<Pick<import("../../../../es/components/form-render").Field<any, any, any, any>, import("../../../../es/components/form-render").NonFunctionPropertyNames<{
|
|
@@ -2680,7 +2680,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2680
2680
|
onKeydown: (event: KeyboardEvent) => Promise<void>;
|
|
2681
2681
|
clearSpan: (uuid: string) => void;
|
|
2682
2682
|
exposeEvent: {
|
|
2683
|
-
validate(path?: string
|
|
2683
|
+
validate(path?: string, { force }?: {
|
|
2684
|
+
force?: boolean | undefined;
|
|
2685
|
+
}): Promise<void>;
|
|
2684
2686
|
getFormValues(needCombineExtendKey?: boolean): any;
|
|
2685
2687
|
setFormValues(values: import("../../../../../../es/shared/types").AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
|
|
2686
2688
|
setFieldState(path: string, setter: (field: Partial<Pick<import("../../../../../../es/components/form-render").Field<any, any, any, any>, import("../../../../../../es/components/form-render").NonFunctionPropertyNames<{
|
|
@@ -606,7 +606,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
606
606
|
onKeydown: (event: KeyboardEvent) => Promise<void>;
|
|
607
607
|
clearSpan: (uuid: string) => void;
|
|
608
608
|
exposeEvent: {
|
|
609
|
-
validate(path?: string
|
|
609
|
+
validate(path?: string, { force }?: {
|
|
610
|
+
force?: boolean | undefined;
|
|
611
|
+
}): Promise<void>;
|
|
610
612
|
getFormValues(needCombineExtendKey?: boolean): any;
|
|
611
613
|
setFormValues(values: import("../../../..").AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
|
|
612
614
|
setFieldState(path: string, setter: (field: Partial<Pick<import("../../../../../../es/components/form-render").Field<any, any, any, any>, import("../../../../../../es/components/form-render").NonFunctionPropertyNames<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as o,ref as t,watch as a,nextTick as n,openBlock as s,createElementBlock as i,normalizeClass as l,unref as r,createCommentVNode as m,Fragment as c,createBlock as u,mergeProps as d,createElementVNode as p,normalizeStyle as v,createVNode as f,withCtx as g,renderList as h,toDisplayString as k,createTextVNode as y,resolveDynamicComponent as w}from"vue";import S from"./hooks/use-noData.js";import{ScaleViewProps as b}from"./hooks/scaleview-props.js";import{getScaleViewState as C}from"./hooks/scaleview-state.js";import{ScaleViewComputed as D}from"./hooks/scaleview-computed.js";import{ScaleViewInit as E}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{ScaleViewMethods as _}from"./hooks/scaleview-methods.js";import{handleQueryParams as x,isCollection as P}from"./utils/judge-types.js";import{useEvent as q}from"./hooks/use-event.js";import"xe-utils";import"moment";import F from"../../../shared/utils/vexutilsExpand.js";import L from"./components/NoData.vue.js";import N from"./components/EvaluateCountdown.vue.js";import R from"./components/EvaluatePage.vue.js";import T from"./components/AnswerParse.vue.js";import A from"./components/ScaleScore.js";import M from"./components/DescribeContent.vue.js";import{NForm as O,NFormItem as I,NButton as J}from"naive-ui";const V=["innerHTML"],G={key:0,class:"required-text"},W={key:1,class:"evalute-label"},B=["onClick"],H=p("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),Q={key:1,class:"footer"};var z=e({__name:"ScaleView",props:b,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:b,emit:z}){const K=e,{ScaleViewState:U}=C(),X=o(U),Y=t(null),Z=t(null),{noDataState:$,setNoData:ee,resetNodata:oe}=S(),te=x(),{showEvatip:ae,isFormBoldOpen:ne,scaleStyle:se,handlePageClass:ie,isShowItem:le,handleShowQuestionNumber:re,hasScore:me,isPreviewScale:ce,showEvaluateEntry:ue,showEvaluateCoundownPage:de,showSaveBtn:pe,showEvaluateLabel:ve,showAnswerParse:fe,propsConfig:ge,evaluatePageProps:he,evaluateCountdownProps:ke,isEvaluetaResSituation:ye,disableEdit:we,desStart:Se,desEnd:be,desContent:Ce}=D(K,X,{query:te}),{initForm:De}=E(K,X,z,{query:te}),{submitMethod:Ee,onSubmitData:je,onSubmitForm:_e,handleScoreJson:xe}=j(K,X,z,{query:te,formRef:Z,countdownDom:Y}),{nextLogicEvent:Pe,handleDynamicDataRelation:qe}=q(K,X),{scaleChange:Fe,labelChange:Le,vodFileList:Ne,writeGuage:Re,closeEvaluateCountdown:Te,showEvaTipModal:Ae}=_(K,X,z,{nextLogicEvent:Pe,handleDynamicDataRelation:qe,isPreviewScale:ce,submitMethod:Ee,isEvaluetaResSituation:ye,handleScoreJson:xe,disableEdit:we});(()=>{let{id:e}=te;e&&(X.shareId=e)})();const Me=e=>{try{oe(),De(e)}catch(e){console.log(e,"--error"),X.spinning=!1,X.hasFrontAddress=!1,ee(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};a((()=>K.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Me(e):e.guage_id&&Me(e)}),{immediate:!0}),a((()=>K.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;X.form={},X.formArray=[];const o=JSON.parse(JSON.stringify(e));n((()=>{De(o)}))}),{immediate:!0});const Oe=F.debounce(je,300),Ie=()=>{z("onCloseSetting")};return b({getScaleData:()=>({...X}),onSubmitForm:_e,cancel:Ie}),(e,o)=>(s(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(pe)}])},[m(' <template v-if="state.spinning">\
|
|
1
|
+
import{defineComponent as e,reactive as o,ref as t,watch as a,nextTick as n,openBlock as s,createElementBlock as i,normalizeClass as l,unref as r,createCommentVNode as m,Fragment as c,createBlock as u,mergeProps as d,createElementVNode as p,normalizeStyle as v,createVNode as f,withCtx as g,renderList as h,toDisplayString as k,createTextVNode as y,resolveDynamicComponent as w}from"vue";import S from"./hooks/use-noData.js";import{ScaleViewProps as b}from"./hooks/scaleview-props.js";import{getScaleViewState as C}from"./hooks/scaleview-state.js";import{ScaleViewComputed as D}from"./hooks/scaleview-computed.js";import{ScaleViewInit as E}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{ScaleViewMethods as _}from"./hooks/scaleview-methods.js";import{handleQueryParams as x,isCollection as P}from"./utils/judge-types.js";import{useEvent as q}from"./hooks/use-event.js";import"xe-utils";import"moment";import F from"../../../shared/utils/vexutilsExpand.js";import L from"./components/NoData.vue.js";import N from"./components/EvaluateCountdown.vue.js";import R from"./components/EvaluatePage.vue.js";import T from"./components/AnswerParse.vue.js";import A from"./components/ScaleScore.js";import M from"./components/DescribeContent.vue.js";import{NForm as O,NFormItem as I,NButton as J}from"naive-ui";const V=["innerHTML"],G={key:0,class:"required-text"},W={key:1,class:"evalute-label"},B=["onClick"],H=p("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),Q={key:1,class:"footer"};var z=e({__name:"ScaleView",props:b,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:b,emit:z}){const K=e,{ScaleViewState:U}=C(),X=o(U),Y=t(null),Z=t(null),{noDataState:$,setNoData:ee,resetNodata:oe}=S(),te=x(),{showEvatip:ae,isFormBoldOpen:ne,scaleStyle:se,handlePageClass:ie,isShowItem:le,handleShowQuestionNumber:re,hasScore:me,isPreviewScale:ce,showEvaluateEntry:ue,showEvaluateCoundownPage:de,showSaveBtn:pe,showEvaluateLabel:ve,showAnswerParse:fe,propsConfig:ge,evaluatePageProps:he,evaluateCountdownProps:ke,isEvaluetaResSituation:ye,disableEdit:we,desStart:Se,desEnd:be,desContent:Ce}=D(K,X,{query:te}),{initForm:De}=E(K,X,z,{query:te}),{submitMethod:Ee,onSubmitData:je,onSubmitForm:_e,handleScoreJson:xe}=j(K,X,z,{query:te,formRef:Z,countdownDom:Y}),{nextLogicEvent:Pe,handleDynamicDataRelation:qe}=q(K,X),{scaleChange:Fe,labelChange:Le,vodFileList:Ne,writeGuage:Re,closeEvaluateCountdown:Te,showEvaTipModal:Ae}=_(K,X,z,{nextLogicEvent:Pe,handleDynamicDataRelation:qe,isPreviewScale:ce,submitMethod:Ee,isEvaluetaResSituation:ye,handleScoreJson:xe,disableEdit:we});(()=>{let{id:e}=te;e&&(X.shareId=e)})();const Me=e=>{try{oe(),De(e)}catch(e){console.log(e,"--error"),X.spinning=!1,X.hasFrontAddress=!1,ee(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};a((()=>K.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Me(e):e.guage_id&&Me(e)}),{immediate:!0}),a((()=>K.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;X.form={},X.formArray=[];const o=JSON.parse(JSON.stringify(e));n((()=>{De(o)}))}),{immediate:!0});const Oe=F.debounce(je,300),Ie=()=>{z("onCloseSetting")};return b({getScaleData:()=>({...X}),onSubmitForm:_e,cancel:Ie}),(e,o)=>(s(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(pe)}])},[m(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="加载中"></n-spin>\n </template> '),X.spinning||X.hasFrontAddress?m("v-if",!0):(s(),i(c,{key:0},[r($).noData?(s(),u(L,{key:0,noDataImg:r($).noDataImg,noDataTip:r($).noDataTip},null,8,["noDataImg","noDataTip"])):(s(),i(c,{key:1},[r(ue)?(s(),u(R,d({key:0},r(he),{onWriteGuage:r(Re)}),null,16,["onWriteGuage"])):(s(),i(c,{key:1},[r(de)?(s(),u(N,d({key:0,ref_key:"countdownDom",ref:Y},r(ke),{onCloseEvaluateCountdown:r(Te)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(ie),"scale-container-hasfooter":r(pe)}]),style:v(r(se))},[r(me)?(s(),u(r(A),{key:0,config:X.config,maxScore:X.maxScore},null,8,["config","maxScore"])):m("v-if",!0),r(Se)?(s(),u(M,{key:1,content:r(Ce)},null,8,["content"])):m("v-if",!0),f(r(O),{ref_key:"formRef",ref:Z,model:X.form,rules:X.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(s(!0),i(c,null,h(X.formArray,((e,o)=>(s(),i(c,{key:(e.id||e.seq)+o},[r(le)(e)?(s(),u(r(I),{key:0,path:e.val_key,"show-label":!r(P)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(ne)(e)}),innerHTML:r(re)(e)},null,10,V),r(ne)(e)?(s(),i("span",G,"(必填)")):m("v-if",!0),r(ve)(e)?(s(),i("span",W,k(r(ve)(e)),1)):m("v-if",!0),r(ae)(e)?(s(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Ae)(e)},[H,y(" 查看提示 ")],8,B)):m("v-if",!0)])),default:g((()=>[(s(),u(w(e.renderCom),d(r(ge)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(Fe),onOnChange:o=>r(Le)(o,e),onVodFileList:r(Ne)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(fe)(e)?(s(),u(T,{key:0,item:e},null,8,["item"])):m("v-if",!0)])),_:2},1032,["path","show-label"])):m("v-if",!0)],64)))),128))])),_:1},8,["model","rules"]),r(be)?(s(),u(M,{key:2,content:r(Ce)},null,8,["content"])):m("v-if",!0)],6),r(pe)?(s(),i("div",Q,[m(" 分享的链接 隐藏取消按钮 "),"guage"!==K.sourceType?(s(),u(r(J),{key:0,onClick:Ie},{default:g((()=>[y("取消")])),_:1})):m("v-if",!0),K.isLock?m("v-if",!0):(s(),u(r(J),{key:1,onClick:r(Oe),disabled:X.banSubmit,type:"primary"},{default:g((()=>[y(" 保存 ")])),_:1},8,["onClick","disabled"]))])):m("v-if",!0)],64))],64))],64))],2))}});export{z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as s,unref as
|
|
1
|
+
import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as s,unref as d,createCommentVNode as o,withDirectives as r,createElementVNode as c,normalizeClass as b,createVNode as u,withCtx as p,Fragment as f,renderList as h,createBlock as y,createTextVNode as v,toDisplayString as m,vShow as g,nextTick as C}from"vue";import{useMessage as L,NAnchor as I,NAnchorLink as S}from"naive-ui";import E from"./components/label-classify.vue.js";import{handleLabelColor as w}from"../../../shared/utils/vexutils.js";import x from"../../../shared/utils/vexutilsExpand.js";const A={key:0,class:"label-disable-wrap"},O=[c("p",{class:"label-disable-title"},"无可选标签",-1),c("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],K={style:{height:"100%"}},j={class:"label-wrap"},k=["id"],T={class:"edit-label-type"};var B=t({__name:"LabelFormContent",props:{item:{default:()=>({})},isEdit:{type:Boolean,default:!0},isLock:{type:Boolean,default:!1},labelSelectedList:null,isChangeWindow:{type:Boolean},getLabelList:{type:Function,default:()=>Promise.resolve({rows:[]})},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},labelOptions:null,sourceType:{default:""},explicit:{type:Boolean,default:!1}},emits:["explicitOnChange","change","updateLabelData"],setup(t,{expose:B,emit:D}){const V=t,F=L(),P=e(null),_=l({editLabelItem:{},inited:!1,labelSelectedEdit:[],labelAnchorKey:"",cacheAnchorKey:"",labelConfig:{}});let N=e(0);const W=a((()=>{if(!_.inited)return!1;let t=_.labelConfig;return!t||Object.keys(t).every((e=>!t[e].itemList))})),$=a((()=>{let t=[].concat(..._.labelSelectedEdit,...V.labelSelectedList);return J(t,"labelId")})),q=a((()=>{const t=$.value||[];return Array.isArray(t)?t.map((t=>t.labelId)):[]})),J=(t,e)=>{let l={};return t.reduce(((t,a)=>(!l[a[e]]&&(l[a[e]]=t.push(a)),t)),[])},R=()=>{if(_.labelSelectedEdit=$.value,"object"==typeof _.labelConfig){Object.keys(_.labelConfig||{}).forEach((t=>{var e;let l=(null==(e=_.labelConfig[t])?void 0:e.itemList)||[];l.length&&l.forEach((t=>{q.value.includes(t.labelId)&&(t.isSelect=!0)}))}))}},z=(t,e)=>{if(!t)return;let l=Object.keys(t)||[];if(!l.length)return;let a=t[l[0]].curKey;if(e&&"string"==typeof e){let[i]=e.split("~"),n=l.find((e=>t[e]&&t[e].curKey&&t[e].curKey.includes(i)));n&&(a=t[n].curKey)}a&&Y(a)},G=(t,e)=>{e.showAdd=!0;const l=t.target.nextElementSibling;C((()=>{var t;null==(t=null==l?void 0:l.firstChild)||t.focus()}))},H=(t,e)=>{setTimeout((()=>{e.addVal?Q(e):e.showAdd=!1}),150)},M=(t,e)=>{e.addVal="",e.showAdd=!1},Q=async t=>{var e;if(!!t.itemList.filter((t=>!(t.isPublic&&1==t.isPublic))).find((e=>e.labelName===t.addVal)))return F.error("标签名称重复!"),!1;let l="";l=(null==(e=t.itemList)?void 0:e.length)?t.itemList[0].parentColor||t.parentColor||"":(null==t?void 0:t.parentColor)||"";const a={type:t.typeId,name:t.addVal,parentColor:l},{status:i}=await V.saveLabelItem(a,t);i&&(F.success("添加成功!"),D("updateLabelData"),t.showAdd=!1)},U=(t,e,l,a)=>{var i;const n=l.itemList,s=l.multipleChoice;let d=(null==(i=_.labelSelectedEdit)?void 0:i.length)&&x.clone(_.labelSelectedEdit,!0)||[];if(t){if(d.some((t=>t.labelId==e.labelId)))return;if(2==s){const{typeId:t,labelId:l}=e;d=d.filter((e=>e.typeId!==t)),n.forEach((t=>{t.labelId!==l&&(t.isSelect=!1)}))}d.push(e)}else{const t=d.findIndex((t=>t.labelId==e.labelId));-1!=t&&d.splice(t,1)}_.labelSelectedEdit=[...d],N.value++,V.explicit&&D("explicitOnChange",[..._.labelSelectedEdit])},X=async t=>{const{status:e}=await V.deleteLabel(t,V.item);if(e){F.success("删除成功!");for(const e in _.labelConfig){const l=_.labelConfig[e].itemList.findIndex((e=>e.labelId==t.labelId));-1!=l&&_.labelConfig[e].itemList.splice(l,1)}const e=_.labelSelectedEdit||[],l=V.labelSelectedList||[];if(e&&e.length){const l=e.findIndex((e=>e.labelId==t.labelId));-1!=l&&e.splice(l,1)}if(l&&l.length){const e=l.findIndex((e=>e.labelId==t.labelId));-1!=e&&l.splice(e,1),D("change",[...l],V.item)}D("updateLabelData")}else F.warning("删除失败")},Y=t=>{t&&setTimeout((()=>{let e,l="#"+t;e=P.value.querySelector("a[href='"+l+"']"),e&&e.click(),_.labelAnchorKey=t}),32)},Z=t=>{t.preventDefault()},tt=t=>{if(!t)return;let e=t.slice(1);_.cacheAnchorKey=e},et=()=>{var t;return null==(t=P.value)?void 0:t.querySelector(".right-label-wrap")};return i((()=>V.labelOptions),(t=>{t&&(()=>{var t;if(V.isLock)return;const e=JSON.parse(JSON.stringify(V.labelOptions));for(let l in e){let a=(null==(t=e[l])?void 0:t.typeId)||"";Object.assign(e[l],{curKey:`${l}_${a}}`})}_.labelConfig=e,C((()=>{let t;R(),V.explicit&&_.inited&&(t=_.labelAnchorKey),z(_.labelConfig,t),_.inited=!0}))})()}),{immediate:!0,deep:!0}),B({resetShowAdd:()=>{let{labelObj:t}=_.editLabelItem;if(t&&Object.keys(t).length)for(let e in t){let l=t[e];Object.assign(l,{showAdd:!1})}},handleLabelForm:t=>{t([..._.labelSelectedEdit||[]])},handleResetOptions:()=>{},hanldeSetLabelItem:(t,e)=>{if("object"==typeof _.labelConfig){Object.keys(_.labelConfig||{}).forEach((l=>{var a;let i=(null==(a=_.labelConfig[l])?void 0:a.itemList)||[];i.length&&i.forEach((l=>{t==l.labelId&&(l.isSelect=e)}))}))}if(!1===e&&Array.isArray(_.labelSelectedEdit)){const e=_.labelSelectedEdit.findIndex((e=>e.labelId==t));-1!=e&&_.labelSelectedEdit.splice(e,1)}}}),(e,l)=>(n(),s("div",{class:"c-label-form-content",ref_key:"labelFormContent",ref:P},[d(W)?(n(),s("div",A,O)):o("v-if",!0),r(c("div",K,[c("div",j,[o(" 表单内嵌打开标签组件的样式 "),o(' <div v-if="explicit" class="explicit-continer">\n\t\t\t\t\t<n-tabs :value="state.labelAnchorKey" type="card" @change="labelAnchorTabsOnChange" tab-position="top">\n\t\t\t\t\t\t<template v-for="(v, i) in state.labelConfig">\n\t\t\t\t\t\t\t<n-tab-pane :name="v.curKey">\n\t\t\t\t\t\t\t\t<span slot="tab">\n\t\t\t\t\t\t\t\t\t{{ i }}\n\t\t\t\t\t\t\t\t\t<span class="edit-label-type">({{ v.multipleChoice == 2 ? \'单\' : \'多\' }}选)</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<div class="explicit-label-wrap left-label-wrap">\n\t\t\t\t\t\t\t\t\t<div class="edit-label-content">\n\t\t\t\t\t\t\t\t\t\t<labelClassify\n\t\t\t\t\t\t\t\t\t\t\t:classifyItem="v"\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelChange="handleLabelChange"\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelColor="handleLabelColor"\n\t\t\t\t\t\t\t\t\t\t\t:handleDelLabel="handleDelLabel"\n\t\t\t\t\t\t\t\t\t\t\t:hanldeBlur="hanldeBlur"\n\t\t\t\t\t\t\t\t\t\t\t:handleAddLabel="handleAddLabel"\n\t\t\t\t\t\t\t\t\t\t\t:clearaddVal="clearaddVal"\n\t\t\t\t\t\t\t\t\t\t\t:isEdit="isEdit"\n\t\t\t\t\t\t\t\t\t\t\t:sourceType="sourceType"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</n-tab-pane>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</n-tabs>\n\t\t\t\t</div> '),o("\n\t\t\t\t\t普通标签样式\n\t\t\t\t\tv-else\n\t\t\t\t\texplicit\n\t\t\t\t "),c("div",{class:b(["left-label-wrap",{"total-left-label-wrap":t.isChangeWindow}])},[u(d(I),{"offset-target":et,type:"block",onClick:Z,onChange:tt},{default:p((()=>[(n(!0),s(f,null,h(_.labelConfig,((t,e)=>(n(),y(d(S),{href:`#${t.curKey}`,title:String(e)},null,8,["href","title"])))),256))])),_:1})],2),o(' v-if="!explicit" '),c("div",{class:b(["right-label-wrap",{"total-right-label-wrap":t.isChangeWindow}])},[(n(!0),s(f,null,h(_.labelConfig,((e,l)=>(n(),s("div",{key:l,class:"edit-label-content"},[c("div",{class:"edit-label",id:e.curKey},[v(m(l)+" ",1),c("span",T,"("+m(2==e.multipleChoice?"单":"多")+"选)",1)],8,k),u(E,{classifyItem:e,handleLabelChange:U,handleLabelColor:d(w),handleDelLabel:X,hanldeBlur:H,handleAddLabel:G,clearaddVal:M,isEdit:t.isEdit,sourceType:t.sourceType},null,8,["classifyItem","handleLabelColor","isEdit","sourceType"])])))),128))],2)])],512),[[g,!d(W)]])],512))}});export{B as default};
|
|
@@ -95,12 +95,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
95
95
|
};
|
|
96
96
|
readonly 'onUpdate:value': PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
|
|
97
97
|
actionType: "check" | "uncheck";
|
|
98
|
-
/**
|
|
99
|
-
* 取消勾选树节点
|
|
100
|
-
* baseKeys:基准值
|
|
101
|
-
* currentTree:当前树节点
|
|
102
|
-
* value:树节点的key值
|
|
103
|
-
*/
|
|
104
98
|
value: string | number;
|
|
105
99
|
}) => void>>;
|
|
106
100
|
readonly onUpdateValue: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
|
|
@@ -25,6 +25,7 @@ export declare function useShortcuts(scope?: MaybeRef<string | Symbol | undefine
|
|
|
25
25
|
register: (shortcut: ShortcutOption) => {
|
|
26
26
|
stop: () => void;
|
|
27
27
|
signature: () => string;
|
|
28
|
+
start: () => void;
|
|
28
29
|
};
|
|
29
30
|
traverse: () => Omit<ShortcutItem, "callback">[];
|
|
30
31
|
clear: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{findAncestor as t}from"../../../../shared/utils/index.js";import{useEventListener as e,useDebounceFn as r}from"@vueuse/core";import{once as s,pick as a,omit as n,isFunction as u,isString as c}from"lodash-es";import{reactive as o,ref as i,unref as l,computed as h,getCurrentInstance as d,inject as p,onBeforeUnmount as g,onDeactivated as b,onActivated as v}from"vue";import{ShortcutStatus as f,InjectionShortcutManager as k}from"../constants/index.js";import{normalizeSignatureInfo as y,getKeySignature as C,getDisplaySignature as m,isInvalidSignature as S,isKeyboardEvent as w,isInvalidKeyboardEvent as E,isShortcutProvider as M}from"../utils/index.js";const K=Symbol("Glob"),j=new Map;class ${constructor(t,e=K){this.shortcutCallbackMap=o(new Map),this.shortcutCache=i({}),this.disabled=!1,this.environmentEle=t||window,j.set(e,this)}static log(t,e=!1){const r=`[ShortcutManager] ${t}`;return!e&&console.warn(r),r}get traverse(){return[...Object.values(this.shortcutCache.value)].sort(((t,e)=>(t.order||0)-(e.order||0)))}query(t){return this.shortcutCache.value[t]}async update(t,e){var r,s;const a=null==(r=this.query(t))?void 0:r.currentKeySignature;e&&u(this.shortcutCache,e);const n=this.query(t);function u(t,e){if(a!==C(e)){if(Object.values(t.value).some((t=>t.currentKeySignature===C(e))))throw`重复的快捷键=> ${m(e)}`;if(S(e))throw`非法的快捷键=>${e.key}`}}n&&(await(null==(s=n.onUpdate)?void 0:s.call(n,t,e?y(e):void 0)),u(this.shortcutCache,e),n.currentKeySignature=C(e),n.shortcutSignature=y(e),this.shortcutCallbackMap.set(n.currentKeySignature,this.shortcutCallbackMap.get(a)),this.shortcutCallbackMap.delete(a))}register(t){const e=this.query(t.key);return e?(e.status=f.ACTIVE,this.shortcutCallbackMap.set(e.currentKeySignature,t.callback),Object.assign(e,a(t,["debounce","debounceOption","label","order","key"])),r(e)):(this.shortcutCache.value[t.key]=n(t,["callback"]),this.shortcutCallbackMap.set(t.currentKeySignature,t.callback),r(this.shortcutCache.value[t.key]));function r(t){return{stop:()=>{t.status=f.INACTIVE},start:()=>{t.status=f.ACTIVE},signature:()=>t.currentKeySignature}}}start(){return this.handle?($.log(`请勿重复启动=>${this}`),this):(this.handle=async e=>{if(!w(e)||this.disabled)return;const r=t(e.target,M);if(r&&r!==l(this.environmentEle)||E(e))return;const s=C(e),a=this.shortcutCallbackMap.get(s);if(!a)return;e.preventDefault();const n=Object.values(this.shortcutCache.value).find((t=>t.currentKeySignature===s));n&&n.status===f.ACTIVE&&!n.disabled&&a(e)},e(this.environmentEle,"keyup",this.handle,{capture:!0}),this)}destroy(){var t;this.handle&&(null==(t=l(this.environmentEle))||t.removeEventListener("keyup",this.handle,{capture:!0})),this.handle=void 0,this.clear()}clear(){this.shortcutCallbackMap.clear(),this.shortcutCache.value={}}}const I=(new $).start(),O=s((()=>$.log("非setup语境下的shortcut将影响全局"))),A=s((()=>$.log("在非setup语境下使用register函数,组件销毁时可能需要手动调用stop函数使快捷键失活")));function T(t){const e=h((()=>{if(l(t)){const e=j.get(l(t));return e||$.log(`不存在的scope=>${t}, 将使用全局快捷键`),e||I}return d()?p(k,I):(O(),I)}));return{register:function(t){const{stop:s,signature:a,start:n}=l(e).register(function(t){return{...t,shortcutSignature:y(t.shortcutSignature),currentKeySignature:C(t.shortcutSignature),key:function(t){const e=t.key||t.label;if(!c(e))throw new Error($.log(`非法的key类型=>${e}`,!0));return e}(t),status:f.ACTIVE,callback:function(t){var e,s;if(!u(t.callback))throw new Error($.log(`非法的callback类型=>${t.callback}`,!0));return t.debounce?r(t.callback,null!=(s=null==(e=t.debounceOption)?void 0:e.duration)?s:300):t.callback}(t)}}(t));return d()?(g(s),b(s),v(n)):A(),{stop:s,signature:a}},traverse:function(){return l(e).traverse},clear:function(){l(e).clear()},update:function(t,r){return l(e).update(t,r)},updateManagerDisabled:function(t){l(e).disabled=!!t}}}export{K as GlobalShortcutProvider,$ as ShortcutManager,T as useShortcuts};
|
|
1
|
+
import{findAncestor as t}from"../../../../shared/utils/index.js";import{useEventListener as e,useDebounceFn as r}from"@vueuse/core";import{once as s,pick as a,omit as n,isFunction as u,isString as c}from"lodash-es";import{reactive as o,ref as i,unref as l,computed as h,getCurrentInstance as d,inject as p,onBeforeUnmount as g,onDeactivated as b,onActivated as v}from"vue";import{ShortcutStatus as f,InjectionShortcutManager as k}from"../constants/index.js";import{normalizeSignatureInfo as y,getKeySignature as C,getDisplaySignature as m,isInvalidSignature as S,isKeyboardEvent as w,isInvalidKeyboardEvent as E,isShortcutProvider as M}from"../utils/index.js";const K=Symbol("Glob"),j=new Map;class ${constructor(t,e=K){this.shortcutCallbackMap=o(new Map),this.shortcutCache=i({}),this.disabled=!1,this.environmentEle=t||window,j.set(e,this)}static log(t,e=!1){const r=`[ShortcutManager] ${t}`;return!e&&console.warn(r),r}get traverse(){return[...Object.values(this.shortcutCache.value)].sort(((t,e)=>(t.order||0)-(e.order||0)))}query(t){return this.shortcutCache.value[t]}async update(t,e){var r,s;const a=null==(r=this.query(t))?void 0:r.currentKeySignature;e&&u(this.shortcutCache,e);const n=this.query(t);function u(t,e){if(a!==C(e)){if(Object.values(t.value).some((t=>t.currentKeySignature===C(e))))throw`重复的快捷键=> ${m(e)}`;if(S(e))throw`非法的快捷键=>${e.key}`}}n&&(await(null==(s=n.onUpdate)?void 0:s.call(n,t,e?y(e):void 0)),u(this.shortcutCache,e),n.currentKeySignature=C(e),n.shortcutSignature=y(e),this.shortcutCallbackMap.set(n.currentKeySignature,this.shortcutCallbackMap.get(a)),this.shortcutCallbackMap.delete(a))}register(t){const e=this.query(t.key);return e?(e.status=f.ACTIVE,this.shortcutCallbackMap.set(e.currentKeySignature,t.callback),Object.assign(e,a(t,["debounce","debounceOption","label","order","key"])),r(e)):(this.shortcutCache.value[t.key]=n(t,["callback"]),this.shortcutCallbackMap.set(t.currentKeySignature,t.callback),r(this.shortcutCache.value[t.key]));function r(t){return{stop:()=>{t.status=f.INACTIVE},start:()=>{t.status=f.ACTIVE},signature:()=>t.currentKeySignature}}}start(){return this.handle?($.log(`请勿重复启动=>${this}`),this):(this.handle=async e=>{if(!w(e)||this.disabled)return;const r=t(e.target,M);if(r&&r!==l(this.environmentEle)||E(e))return;const s=C(e),a=this.shortcutCallbackMap.get(s);if(!a)return;e.preventDefault();const n=Object.values(this.shortcutCache.value).find((t=>t.currentKeySignature===s));n&&n.status===f.ACTIVE&&!n.disabled&&a(e)},e(this.environmentEle,"keyup",this.handle,{capture:!0}),this)}destroy(){var t;this.handle&&(null==(t=l(this.environmentEle))||t.removeEventListener("keyup",this.handle,{capture:!0})),this.handle=void 0,this.clear()}clear(){this.shortcutCallbackMap.clear(),this.shortcutCache.value={}}}const I=(new $).start(),O=s((()=>$.log("非setup语境下的shortcut将影响全局"))),A=s((()=>$.log("在非setup语境下使用register函数,组件销毁时可能需要手动调用stop函数使快捷键失活")));function T(t){const e=h((()=>{if(l(t)){const e=j.get(l(t));return e||$.log(`不存在的scope=>${t}, 将使用全局快捷键`),e||I}return d()?p(k,I):(O(),I)}));return{register:function(t){const{stop:s,signature:a,start:n}=l(e).register(function(t){return{...t,shortcutSignature:y(t.shortcutSignature),currentKeySignature:C(t.shortcutSignature),key:function(t){const e=t.key||t.label;if(!c(e))throw new Error($.log(`非法的key类型=>${e}`,!0));return e}(t),status:f.ACTIVE,callback:function(t){var e,s;if(!u(t.callback))throw new Error($.log(`非法的callback类型=>${t.callback}`,!0));return t.debounce?r(t.callback,null!=(s=null==(e=t.debounceOption)?void 0:e.duration)?s:300):t.callback}(t)}}(t));return d()?(g(s),b(s),v(n)):A(),{stop:s,signature:a,start:n}},traverse:function(){return l(e).traverse},clear:function(){l(e).clear()},update:function(t,r){return l(e).update(t,r)},updateManagerDisabled:function(t){l(e).disabled=!!t}}}export{K as GlobalShortcutProvider,$ as ShortcutManager,T as useShortcuts};
|
|
@@ -29,6 +29,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
29
29
|
register: (shortcut: import("..").ShortcutOption) => {
|
|
30
30
|
stop: () => void;
|
|
31
31
|
signature: () => string;
|
|
32
|
+
start: () => void;
|
|
32
33
|
};
|
|
33
34
|
traverse: () => Omit<import("..").ShortcutItem, "callback">[];
|
|
34
35
|
clear: () => void;
|
|
@@ -2315,7 +2316,9 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2315
2316
|
onKeydown: (event: KeyboardEvent) => Promise<void>;
|
|
2316
2317
|
clearSpan: (uuid: string) => void;
|
|
2317
2318
|
exposeEvent: {
|
|
2318
|
-
validate(path?: string
|
|
2319
|
+
validate(path?: string, { force }?: {
|
|
2320
|
+
force?: boolean | undefined;
|
|
2321
|
+
}): Promise<void>;
|
|
2319
2322
|
getFormValues(needCombineExtendKey?: boolean): any;
|
|
2320
2323
|
setFormValues(values: import("../../../es/shared/types").AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
|
|
2321
2324
|
setFieldState(path: string, setter: (field: Partial<Pick<import("@formily/core").Field<any, any, any, any>, import("@formily/core").NonFunctionPropertyNames<{
|
|
@@ -31,6 +31,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
31
|
register: (shortcut: import("../../../../es/components/shortcut-provider").ShortcutOption) => {
|
|
32
32
|
stop: () => void;
|
|
33
33
|
signature: () => string;
|
|
34
|
+
start: () => void;
|
|
34
35
|
};
|
|
35
36
|
traverse: () => Omit<import("../../../../es/components/shortcut-provider").ShortcutItem, "callback">[];
|
|
36
37
|
clear: () => void;
|
|
@@ -2317,7 +2318,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2317
2318
|
onKeydown: (event: KeyboardEvent) => Promise<void>;
|
|
2318
2319
|
clearSpan: (uuid: string) => void;
|
|
2319
2320
|
exposeEvent: {
|
|
2320
|
-
validate(path?: string
|
|
2321
|
+
validate(path?: string, { force }?: {
|
|
2322
|
+
force?: boolean | undefined;
|
|
2323
|
+
}): Promise<void>;
|
|
2321
2324
|
getFormValues(needCombineExtendKey?: boolean): any;
|
|
2322
2325
|
setFormValues(values: import("../../../../es/shared/types").AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
|
|
2323
2326
|
setFieldState(path: string, setter: (field: Partial<Pick<import("../../../../es/components/form-render").Field<any, any, any, any>, import("../../../../es/components/form-render").NonFunctionPropertyNames<{
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { SFCWithInstall } from '../../../es/shared/types';
|
|
2
|
+
export * from './src/utils';
|
|
3
|
+
declare const CSliderTree: SFCWithInstall<import("vue").DefineComponent<{
|
|
4
|
+
sliderInitialWidth: {
|
|
5
|
+
type: NumberConstructor;
|
|
6
|
+
default: number;
|
|
7
|
+
};
|
|
8
|
+
treeSearchApiConfig: {
|
|
9
|
+
type: ObjectConstructor;
|
|
10
|
+
default: () => {};
|
|
11
|
+
};
|
|
12
|
+
}, {
|
|
13
|
+
$message: import("naive-ui").MessageApi;
|
|
14
|
+
$attr: {
|
|
15
|
+
[x: string]: unknown;
|
|
16
|
+
};
|
|
17
|
+
getChildrenByOrgPartenId: (params: any, filterApiConfig: any) => Promise<any>;
|
|
18
|
+
searchEmpTreeData: (params: any, filterApiConfig: any) => Promise<any>;
|
|
19
|
+
updateDeptSort: (params: any, filterApiConfig: any) => Promise<any>;
|
|
20
|
+
getDeptList: (params: any, filterApiConfig: any) => Promise<any>;
|
|
21
|
+
isMatchFn: (node: any, keyword: string) => boolean;
|
|
22
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
sliderInitialWidth: {
|
|
24
|
+
type: NumberConstructor;
|
|
25
|
+
default: number;
|
|
26
|
+
};
|
|
27
|
+
treeSearchApiConfig: {
|
|
28
|
+
type: ObjectConstructor;
|
|
29
|
+
default: () => {};
|
|
30
|
+
};
|
|
31
|
+
}>> & {
|
|
32
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
33
|
+
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
34
|
+
}>>;
|
|
35
|
+
emit: (event: "select" | "saveWidth", ...args: any[]) => void;
|
|
36
|
+
flexWidth: import("vue").Ref<number>;
|
|
37
|
+
searchValue: import("vue").Ref<string>;
|
|
38
|
+
treeData: import("vue").Ref<any[]>;
|
|
39
|
+
expandedKeys: import("vue").Ref<string[]>;
|
|
40
|
+
selectedKeys: import("vue").Ref<string[]>;
|
|
41
|
+
selectNode: import("vue").Ref<{}>;
|
|
42
|
+
dragData: import("vue").Ref<{}>;
|
|
43
|
+
handleRenderLabel: ({ option }: any) => any;
|
|
44
|
+
init: () => Promise<void>;
|
|
45
|
+
onExpand: (expandedKeyVals: string[]) => void;
|
|
46
|
+
onNodeSelect: (selectedKeyVals: never[] | undefined, [node]: any[]) => void;
|
|
47
|
+
onSearch: () => Promise<void>;
|
|
48
|
+
reset: (flag: boolean, selectOrgId?: string | undefined) => Promise<void>;
|
|
49
|
+
onDrop: (info: any) => Promise<void>;
|
|
50
|
+
getDeptData: (orgId: string) => Promise<any>;
|
|
51
|
+
getChildrenByOrgPartenIdFn: () => Promise<void>;
|
|
52
|
+
onLoadData: (treeNode: any) => any;
|
|
53
|
+
getExpandKeys: (data: any) => never[];
|
|
54
|
+
changeWidth: ({ distance }: any) => void;
|
|
55
|
+
saveWidth: () => void;
|
|
56
|
+
NInput: any;
|
|
57
|
+
NTree: any;
|
|
58
|
+
NEmpty: any;
|
|
59
|
+
vFlexibleResize: {
|
|
60
|
+
mounted(el: any, { value }: any): void;
|
|
61
|
+
beforeUnmount(el: any): void;
|
|
62
|
+
};
|
|
63
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "saveWidth")[], "select" | "saveWidth", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
64
|
+
sliderInitialWidth: {
|
|
65
|
+
type: NumberConstructor;
|
|
66
|
+
default: number;
|
|
67
|
+
};
|
|
68
|
+
treeSearchApiConfig: {
|
|
69
|
+
type: ObjectConstructor;
|
|
70
|
+
default: () => {};
|
|
71
|
+
};
|
|
72
|
+
}>> & {
|
|
73
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
74
|
+
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
75
|
+
}, {
|
|
76
|
+
sliderInitialWidth: number;
|
|
77
|
+
treeSearchApiConfig: Record<string, any>;
|
|
78
|
+
}>>;
|
|
79
|
+
export default CSliderTree;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{COMPONENT_NAMESPACE as r}from"../../shared/global/variable.js";import{safeComponentRegister as e}from"../../shared/utils/index.js";import i from"./src/index.vue.js";export{transformOriginToTree}from"./src/utils/index.js";const o=i;o.install=function(i){e(i,o,r+"SliderTree")};export{o as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export default function useAsyncData(): {
|
|
2
|
+
getChildrenByOrgPartenId: (params: any, filterApiConfig: any) => Promise<any>;
|
|
3
|
+
searchEmpTreeData: (params: any, filterApiConfig: any) => Promise<any>;
|
|
4
|
+
updateDeptSort: (params: any, filterApiConfig: any) => Promise<any>;
|
|
5
|
+
getDeptList: (params: any, filterApiConfig: any) => Promise<any>;
|
|
6
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(){async function t(t,e,r){try{const n=r[e]||null;if("function"==typeof n){const e=await n(t);return Promise.resolve(e)}return Promise.reject(new Error(`${e} Is not a function`))}catch(t){return Promise.reject(t)}}return{getChildrenByOrgPartenId:async function(e,r){return await t(e,"getChildrenByOrgPartenId",r)},searchEmpTreeData:async function(e,r){return await t(e,"searchEmpTreeData",r)},updateDeptSort:async function(e,r){return await t(e,"updateDeptSort",r)},getDeptList:async function(e,r){return await t(e,"getDeptList",r)}}}export{t as default};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
sliderInitialWidth: {
|
|
3
|
+
type: NumberConstructor;
|
|
4
|
+
default: number;
|
|
5
|
+
};
|
|
6
|
+
treeSearchApiConfig: {
|
|
7
|
+
type: ObjectConstructor;
|
|
8
|
+
default: () => {};
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
$message: import("naive-ui").MessageApi;
|
|
12
|
+
$attr: {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
};
|
|
15
|
+
getChildrenByOrgPartenId: (params: any, filterApiConfig: any) => Promise<any>;
|
|
16
|
+
searchEmpTreeData: (params: any, filterApiConfig: any) => Promise<any>;
|
|
17
|
+
updateDeptSort: (params: any, filterApiConfig: any) => Promise<any>;
|
|
18
|
+
getDeptList: (params: any, filterApiConfig: any) => Promise<any>;
|
|
19
|
+
isMatchFn: (node: any, keyword: string) => boolean;
|
|
20
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
sliderInitialWidth: {
|
|
22
|
+
type: NumberConstructor;
|
|
23
|
+
default: number;
|
|
24
|
+
};
|
|
25
|
+
treeSearchApiConfig: {
|
|
26
|
+
type: ObjectConstructor;
|
|
27
|
+
default: () => {};
|
|
28
|
+
};
|
|
29
|
+
}>> & {
|
|
30
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
31
|
+
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
32
|
+
}>>;
|
|
33
|
+
emit: (event: "select" | "saveWidth", ...args: any[]) => void;
|
|
34
|
+
flexWidth: import("vue").Ref<number>;
|
|
35
|
+
searchValue: import("vue").Ref<string>;
|
|
36
|
+
treeData: import("vue").Ref<any[]>;
|
|
37
|
+
expandedKeys: import("vue").Ref<string[]>;
|
|
38
|
+
selectedKeys: import("vue").Ref<string[]>;
|
|
39
|
+
selectNode: import("vue").Ref<{}>;
|
|
40
|
+
dragData: import("vue").Ref<{}>;
|
|
41
|
+
handleRenderLabel: ({ option }: any) => any;
|
|
42
|
+
init: () => Promise<void>;
|
|
43
|
+
onExpand: (expandedKeyVals: string[]) => void;
|
|
44
|
+
onNodeSelect: (selectedKeyVals: never[] | undefined, [node]: any[]) => void;
|
|
45
|
+
onSearch: () => Promise<void>;
|
|
46
|
+
reset: (flag: boolean, selectOrgId?: string) => Promise<void>;
|
|
47
|
+
onDrop: (info: any) => Promise<void>;
|
|
48
|
+
getDeptData: (orgId: string) => Promise<any>;
|
|
49
|
+
getChildrenByOrgPartenIdFn: () => Promise<void>;
|
|
50
|
+
onLoadData: (treeNode: any) => any;
|
|
51
|
+
getExpandKeys: (data: any) => never[];
|
|
52
|
+
changeWidth: ({ distance }: any) => void;
|
|
53
|
+
saveWidth: () => void;
|
|
54
|
+
NInput: any;
|
|
55
|
+
NTree: any;
|
|
56
|
+
NEmpty: any;
|
|
57
|
+
vFlexibleResize: {
|
|
58
|
+
mounted(el: any, { value }: any): void;
|
|
59
|
+
beforeUnmount(el: any): void;
|
|
60
|
+
};
|
|
61
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "saveWidth")[], "select" | "saveWidth", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
|
+
sliderInitialWidth: {
|
|
63
|
+
type: NumberConstructor;
|
|
64
|
+
default: number;
|
|
65
|
+
};
|
|
66
|
+
treeSearchApiConfig: {
|
|
67
|
+
type: ObjectConstructor;
|
|
68
|
+
default: () => {};
|
|
69
|
+
};
|
|
70
|
+
}>> & {
|
|
71
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
72
|
+
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
73
|
+
}, {
|
|
74
|
+
sliderInitialWidth: number;
|
|
75
|
+
treeSearchApiConfig: Record<string, any>;
|
|
76
|
+
}>;
|
|
77
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
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 t,ref as a,onMounted as r,withDirectives as n,openBlock as o,createElementBlock as s,normalizeStyle as l,createElementVNode as i,createVNode as u,unref as c,createCommentVNode as d,renderSlot as v,createBlock as f,mergeProps as p,h as m}from"vue";import{useMessage as g,NInput as h,NTree as y,NEmpty as b}from"naive-ui";import{vFlexibleResize as w}from"../../../shared/directive/flexibleResize.js";import x from"./hooks/useAsyncData.js";import{traversalData as I}from"./utils/tool.js";const O={class:"search-groups"},C={class:"tree-wrap"},k={key:1,class:"empty-container"},S={class:"table-footer-wrap"};var L=e({__name:"index",props:{sliderInitialWidth:{type:Number,default:300},treeSearchApiConfig:{type:Object,default:()=>({})}},emits:["select","saveWidth"],setup(e,{emit:L}){const A=e,N=g(),D=t();console.log("$attr>>>>>",D);const{getChildrenByOrgPartenId:$,searchEmpTreeData:j,updateDeptSort:K,getDeptList:W}=x(),M=(e,t)=>{var a,r;t=null==t?void 0:t.toLowerCase();let{label:n="",abbrp:o="",abbrw:s="",key:l,filterSearch:i=[]}=e;const u=(null==(a=null==n?void 0:n.toLowerCase())?void 0:a.indexOf(t))>-1,c=(null==(r=null==l?void 0:l.toLowerCase())?void 0:r.indexOf(t))>-1,d=i.some((e=>e.toLowerCase().indexOf(t)>-1));return!!(u||c||d)},R=a(A.sliderInitialWidth),U=a(""),E=a([]),J=a([]),P=a([]),T=a({}),_=a({});function z({option:e}){const t=e.label;if(t.includes(U.value.trim())){const e=t.substr(0,t.indexOf(U.value.trim())),a=t.substr(t.indexOf(U.value.trim())+U.value.trim().length);return m("div",[m("span",{style:{marginRight:e?"2px":"0px"}},e),m("span",{style:{color:"#2563F4"}},U.value.trim()),m("span",{style:{marginLeft:a?"2px":"0px"}},a)])}return t}function B(e){J.value=e}function F(e=[],[t]){P.value=e,L("select",t),T.value=t}async function V(){const e=U.value.trim();if(e){const{data:t,success:a}=await j({search:e},A.treeSearchApiConfig);a&&(E.value=t,J.value=function(e){const t=[];for(const a of I(e,"children")){let e=!1;for(const t of I(a.children,"children"))M(t,U.value)&&(e=!0);e&&t.push(a.key)}return t}(t))}else q(!1)}async function q(e,t){await Q();let a=E.value[0].orgId;e&&(a=t);const r=await H(a);if(r){const e=E.value.map((e=>e.orgId===a?r:e));E.value=e}}async function G(e){const{dragNode:t,node:a}=e;if(t.isOrg)return void N.error("机构不能拖动排序");if(t.orgId!==a.orgId)return void N.error("不能跨机构移动科室");if(t.parentId!==a.parentId)return void N.error("仅允许同层级科室排序");_.value=t;const r={curNode:t,moveToNode:a,orgId:t.orgId},{success:n}=await K(r,A.treeSearchApiConfig);n&&(N.success("排序成功"),q(!0,t.orgId))}async function H(e){const{data:t,success:a}=await W({orgId:e},A.treeSearchApiConfig);if(a){const a=E.value.find((t=>t.orgId===e));return a.children=t,a}}async function Q(){const{success:e,data:t}=await $(null,A.treeSearchApiConfig);e&&(E.value=t)}function X(e){return new Promise((async t=>{e.isOrg&&!e.children&&(await H(e.orgId),t(!0)),t(!0)}))}function Y({distance:e}){const t=R.value+e;R.value=Math.min(Math.max(t,50),1e3)}function Z(){L("saveWidth",R.value)}return r((()=>{!async function(){await Q(),E.value.length>0&&(J.value=[E.value[0].key],P.value=[E.value[0].key],T.value=E.value[0],L("select",JSON.parse(JSON.stringify(E.value[0]))))}()})),(e,t)=>n((o(),s("div",{class:"left-tree-wrap",ref:"left",style:l({width:R.value+"px"})},[i("div",O,[u(c(h),{clearable:"",placeholder:"搜索关键字",value:U.value,"onUpdate:value":[t[0]||(t[0]=e=>U.value=e),V]},null,8,["value"]),d(" 按钮插槽 "),v(e.$slots,"buttons")]),d(" 标签tab插槽 "),v(e.$slots,"tabs"),i("div",C,[E.value.length>0?(o(),f(c(y),p({key:0},e.$attrs,{"virtual-scroll":"",selectable:!0,data:E.value,"expanded-keys":J.value,selectedKeys:P.value,"render-label":z,"onUpdate:expandedKeys":B,"onUpdate:selectedKeys":F,onLoad:X,onDrop:G}),null,16,["data","expanded-keys","selectedKeys"])):(o(),s("div",k,[u(c(b),{description:"暂无数据"})]))]),i("div",S,[d(" 导出数据插槽 "),v(e.$slots,"output")])],4)),[[c(w),{mode:"VR",onMove:Y,onEnd:Z}]])}});export{L as default};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param data
|
|
4
|
+
* @param param
|
|
5
|
+
* {
|
|
6
|
+
* children: 'childrenList',
|
|
7
|
+
* orgId: 'orgId',
|
|
8
|
+
* key: 'bck02',
|
|
9
|
+
label: 'bck03'
|
|
10
|
+
* }
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
export declare function transformOriginToTree(data: any, children: string, callback?: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{traversalData as o}from"./tool.js";function r(r,t,f){for(const n of o(r,t))f&&f(n);return r}export{r as transformOriginToTree};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function traversalData(data: any[], children?: string): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function*r(e,i="children"){if(e&&Array.isArray(e))for(let l=0;l<e.length;l++)yield e[l],e[l][i]&&(yield*r(e[l][i],i))}export{r as traversalData};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.left-tree-wrap{background:#fff;border-right:1px solid rgba(0,0,0,.1);box-sizing:border-box;display:flex;flex-direction:column;height:100%;padding:8px;position:relative}.left-tree-wrap .search-groups{align-items:center;display:flex}.left-tree-wrap .search-groups .ant-input-search{flex:1}.left-tree-wrap .tree-wrap{flex:1;margin-top:12px;overflow-y:auto}.left-tree-wrap .tree-wrap .n-tree .n-tree-node-content{width:100%}.left-tree-wrap .tree-wrap .empty-container{align-items:center;display:flex;height:100%;justify-content:center}.left-tree-wrap .table-footer-wrap{margin-top:8px}.left-tree-wrap .resizable{bottom:0;cursor:col-resize;height:100%;position:absolute;right:-7px;text-align:center;width:14px;z-index:1}
|
|
@@ -111,6 +111,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
111
111
|
readonly type: PropType<(string | number)[] | null>;
|
|
112
112
|
readonly default: null;
|
|
113
113
|
};
|
|
114
|
+
/**
|
|
115
|
+
* 拖拽完成
|
|
116
|
+
*/
|
|
114
117
|
readonly disabled: {
|
|
115
118
|
readonly type: PropType<boolean | undefined>;
|
|
116
119
|
readonly default: undefined;
|
package/es/env.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
2
|
-
|
|
3
|
-
interface ImportMetaEnv {
|
|
4
|
-
readonly VITE_APP_TYPE: string;
|
|
5
|
-
// 更多环境变量...
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
interface ImportMeta {
|
|
9
|
-
readonly env: ImportMetaEnv;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare module '*.vue' {
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
import type { App, defineComponent } from 'vue';
|
|
15
|
-
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
16
|
-
// // const component: DefineComponent<{}, {}, any>
|
|
17
|
-
const component: ReturnType<typeof defineComponent> & {
|
|
18
|
-
install(app: App): void;
|
|
19
|
-
};
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
export default component;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
declare module '*.js';
|
|
25
|
-
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
interface ImportMetaEnv {
|
|
4
|
+
readonly VITE_APP_TYPE: string;
|
|
5
|
+
// 更多环境变量...
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface ImportMeta {
|
|
9
|
+
readonly env: ImportMetaEnv;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module '*.vue' {
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
import type { App, defineComponent } from 'vue';
|
|
15
|
+
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
16
|
+
// // const component: DefineComponent<{}, {}, any>
|
|
17
|
+
const component: ReturnType<typeof defineComponent> & {
|
|
18
|
+
install(app: App): void;
|
|
19
|
+
};
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
export default component;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.js';
|
|
25
|
+
|