cnhis-design-vue 3.1.51-beta.3 → 3.1.51-beta.31
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/annotation-edit/src/type.d.ts +1 -1
- package/es/components/base-search/index.d.ts +3 -0
- package/es/components/base-search/src/index.vue.d.ts +3 -0
- package/es/components/base-search/src/index.vue2.js +1 -1
- 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 +6 -4
- package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
- package/es/components/classification/src/index.vue2.js +1 -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/field-set/index.d.ts +33 -0
- package/es/components/field-set/src/FieldSet.vue.d.ts +33 -0
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/components/Row.vue.d.ts +2 -1
- package/es/components/field-set/src/components/Row.vue2.js +1 -1
- package/es/components/field-set/src/types/index.d.ts +1 -0
- 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/levelSearchCascader.js +1 -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 +5 -1
- package/es/components/iho-table/index.d.ts +3 -3
- package/es/components/iho-table/src/IhoTable.vue.d.ts +4 -3
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +7 -6
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
- package/es/components/iho-table/src/plugins/defaultValuePlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/defaultValuePlugin.js +1 -0
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/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/rendererPlugins/editableWidgets/timeRendererPlugin/index.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 +23 -1
- package/es/components/iho-table/src/utils/index.d.ts +1 -1
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +4 -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/quick-search/index.d.ts +3 -0
- package/es/components/quick-search/src/index.vue.d.ts +3 -0
- package/es/components/quick-search/src/index.vue2.js +1 -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 +86 -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 +84 -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/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- 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/directive/flexibleResize.d.ts +4 -0
- package/es/{components/classification/src → shared}/directive/flexibleResize.js +1 -1
- package/es/shared/directive/index.d.ts +1 -0
- package/es/shared/directive/index.js +1 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +7 -0
- 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/classification/src/directive/flexibleResize.d.ts +0 -28
- package/es/components/table-filter/src/types/tool.d.ts +0 -7
- package/es/components/table-filter/src/types/tool.js +0 -1
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';
|
|
@@ -45,11 +46,13 @@ export * from './config-provider';
|
|
|
45
46
|
export * from './field-set';
|
|
46
47
|
export * from './scale-view';
|
|
47
48
|
export * from '../../es/shared/types';
|
|
49
|
+
export * from '../../es/shared/directive';
|
|
48
50
|
export * from './guide';
|
|
49
51
|
export * from './select-label';
|
|
50
52
|
export * from './card-reader-sdk';
|
|
53
|
+
export * from './slider-tree';
|
|
51
54
|
declare function install(app: App): void;
|
|
52
|
-
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 };
|
|
53
56
|
declare const _default: {
|
|
54
57
|
install: typeof install;
|
|
55
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<{
|
|
@@ -135,6 +135,7 @@ declare const CQuickSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
135
135
|
}[]>;
|
|
136
136
|
showAdd: import("vue").Ref<boolean>;
|
|
137
137
|
addVal: import("vue").Ref<string>;
|
|
138
|
+
filterChangeFnList: import("vue").Ref<any[]>;
|
|
138
139
|
parentNamesHasAdd: import("vue").ComputedRef<boolean>;
|
|
139
140
|
handleName: import("vue").ComputedRef<(item: import("..").ISearchType, key?: string) => any>;
|
|
140
141
|
init: () => void;
|
|
@@ -186,6 +187,8 @@ declare const CQuickSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
186
187
|
setDefaultCon: (widgetArr: import("..").ISearchParamsType[]) => void;
|
|
187
188
|
getFilterParams: () => {};
|
|
188
189
|
setFilterParams: (params?: any) => void;
|
|
190
|
+
getOriginalConfig: () => import("..").IApiServerType[];
|
|
191
|
+
onFilterChange: (fn: any) => void;
|
|
189
192
|
NForm: any;
|
|
190
193
|
NFormItem: import("vue").DefineComponent<{
|
|
191
194
|
readonly label: StringConstructor;
|
|
@@ -137,6 +137,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
137
137
|
}[]>;
|
|
138
138
|
showAdd: import("vue").Ref<boolean>;
|
|
139
139
|
addVal: import("vue").Ref<string>;
|
|
140
|
+
filterChangeFnList: import("vue").Ref<any[]>;
|
|
140
141
|
parentNamesHasAdd: import("vue").ComputedRef<boolean>;
|
|
141
142
|
handleName: import("vue").ComputedRef<(item: ISearchType, key?: string) => any>;
|
|
142
143
|
init: () => void;
|
|
@@ -188,6 +189,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
188
189
|
setDefaultCon: (widgetArr: ISearchParamsType[]) => void;
|
|
189
190
|
getFilterParams: () => {};
|
|
190
191
|
setFilterParams: (params?: any) => void;
|
|
192
|
+
getOriginalConfig: () => IApiServerType[];
|
|
193
|
+
onFilterChange: (fn: any) => void;
|
|
191
194
|
NForm: any;
|
|
192
195
|
NFormItem: import("vue").DefineComponent<{
|
|
193
196
|
readonly label: StringConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,provide as t,computed as a,watch as i,onMounted as n,openBlock as o,createElementBlock as r,createElementVNode as s,Fragment as u,renderList as c,unref as d,normalizeClass as f,createCommentVNode as v,createVNode as m,withCtx as p,createTextVNode as h,toDisplayString as g,createBlock as k,withDirectives as b,vShow as y,isRef as C}from"vue";import{useMessage as S,NPopover as x,NModal as A,NCard as _,NIcon as
|
|
1
|
+
import{defineComponent as e,ref as l,provide as t,computed as a,watch as i,onMounted as n,openBlock as o,createElementBlock as r,createElementVNode as s,Fragment as u,renderList as c,unref as d,normalizeClass as f,createCommentVNode as v,createVNode as m,withCtx as p,createTextVNode as h,toDisplayString as g,createBlock as k,withDirectives as b,vShow as y,isRef as C}from"vue";import{useMessage as S,NPopover as x,NModal as A,NCard as _,NIcon as F,NButton as q,NForm as w,NFormItem as j,NInput as E}from"naive-ui";import{CloseOutline as U,AddOutline as I}from"@vicons/ionicons5";import L from"../../table-filter/src/hooks/useMixins.js";import N from"../../table-filter/src/hooks/useRenderWidget.js";import O from"../../table-filter/src/hooks/useAdvanced.js";import P from"../../table-filter/src/components/render-widget/index.vue.js";import"moment/locale/zh-cn";import{cloneDeep as R}from"lodash-es";import{InjectionFilterApiConfig as V,InjectionFilterSearchConfig as z}from"../../table-filter/src/constants/index.js";const D={class:"quick-search-block quick-search-table"},T={class:"quick-row"},B={class:"quick-item-title"},Q={class:"quick-item-col"},M={class:"svg-wrap"},W={class:"flex_right"},G={class:"class-filter-content"},J={class:"quickSearch-content"},H=s("span",{class:"label"},"父类名称:",-1),K=["onDblclick","onClick"],X={key:0,class:"s-content"};var Y=e({__name:"index",props:{searchFieldList:{type:Array,default:()=>[]},quickSearchConfig:{type:Array,default:()=>[]},tableId:{type:String,default:""},filterApiConfig:{type:Object}},emits:["getFilterParam","onFilterSearch","clearQuickSearchConfig"],setup(e,{expose:Y,emit:Z}){const $=e,ee={classname:{required:!0,message:"请输入分类名称",trigger:["input","blur"]}},le=S(),{handleGetConfigApi:te,outQuickSearchFn:ae}=L(),{getRenderSearchConObj:ie,resetRenderWidgetValue:ne,isRender:oe}=N(),{transformData:re,getCacheDef:se,transformParams:ue}=O(),ce=l(null),de=l({classname:""});let fe=l(!1),ve=l([]),me=l([]),pe=l(!1),he=l("");const ge=l([]);t(V,$.filterApiConfig),t(z,ve);let ke=a((()=>!!me.value.length&&me.value.some((e=>e.isAdd)))),be=a((()=>(e,l="name")=>e.alias||e[l]));function ye(){return function(e){if(!Array.isArray(e))return[];let l=[];for(let t=0;t<e.length;t++){let a=e[t];const i=ie(a);!l.find((e=>e.field_key===i.field_key))&&i&&l.push(i)}return l.filter((e=>e.value))}(ve.value)||[]}function Ce(){var e;null==(e=ce.value)||e.validate((e=>{var l;if(e)return;let t=ye();t.length||(t=[]);let a=null==(l=me.value.filter((e=>e.selected))[0])?void 0:l.value;!async function(e){var l;try{if(!await te(e,"requestSaveTableCondiTion",{},$.filterApiConfig))return;fe.value=!1,null==(l=ce.value)||l.restoreValidation(),de.value.classname="",me.value=[],Fe()}catch(e){console.log(e)}}({tableId:$.tableId||"",setting:JSON.stringify({displayCategory:a,name:de.value.classname,conObj:t}),conditionList:"[]"})}))}function Se(e){var l;const t=null==(l=null==e?void 0:e.target)?void 0:l.nextElementSibling;setTimeout((()=>{t&&t.focus()})),pe.value=!0}function xe(){pe.value=!1,he.value&&(me.value.forEach((e=>e.selected=!1)),me.value.push({disabled:!0,value:he.value,selected:!0,isAdd:!0}),he.value="")}function Ae(e){!function(e){me.value.splice(e,1)}(e)}function _e(){fe.value=!1}function Fe(){qe(ve.value),Z("clearQuickSearchConfig")}function qe(e){Array.isArray(e)&&(e.forEach((e=>{ne(e)})),ae.handlerInitSearchItem(ve.value))}return i((()=>$.searchFieldList),(e=>{e&&e.length>0&&function(){let e=R(re($.searchFieldList,{_filterApiConfig:$.filterApiConfig})).filter((e=>1==e.isShowSearch&&1!=e.filterExplicit))||[];ve.value=e||[],ae.handlerInitSearchItem(ve.value)}()}),{immediate:!0,deep:!0}),i((()=>ve),(()=>{const e=ye()||[],l=ue(e);Z("getFilterParam",e,l),ge.value.forEach((e=>e(l)))}),{deep:!0}),n((()=>{const e=$.quickSearchConfig;if(e&&e.length>0)return l=e,void ve.value.forEach((e=>{var t,a;if(oe(e)){const i=l.find((l=>l.field_key===e.columnName));i&&(null==(t=i.value)?void 0:t.length)>0&&(e.value=se(e,i.value),e.unit=null!=(a=i.unit)?a:"")}}));var l;qe(ve.value)})),Y({openSaveToCalss:function(){let e=ye();e&&(e.length>0?fe.value=!0:le.warning("请设置搜索条件"))},clearData:Fe,onFilterSearch:function(){let e=ye()||[];const l=ue(e);return Z("onFilterSearch",e,l,!1),ve.value},getFilterParams:function(){const e=ye()||[];return ue(e)},setFilterParams:function(e){const l=e?Object.keys(e):[];l.length>0&&ve.value.forEach((t=>{var a;if(oe(t)&&l.includes(t.columnName)){const l=e[t.columnName];t.value=Array.isArray(l)&&!1===(null==(a=t.widgetCfg)?void 0:a.multiple)?l[0]:l}}))},getOriginalConfig:function(){return $.searchFieldList},onFilterChange:function(e){ge.value.push(e)}}),(e,l)=>(o(),r("div",null,[s("div",D,[(o(!0),r(u,null,c(d(ve),(e=>(o(),r("div",{class:f(["quick-item",{"quick-block":e._isBlock}]),key:e.sid||e.columnName},[s("div",T,[v(" title "),s("div",B,[m(d(x),{trigger:"hover"},{trigger:p((()=>[h(g(d(be)(e,"title")),1)])),default:p((()=>[s("span",null,g(d(be)(e,"title")),1)])),_:2},1024)]),v(" content "),s("div",Q,[v(" 直接渲染组件 "),e.isRender?(o(),k(P,{key:0,cfg:e,modelValue:e.value,"onUpdate:modelValue":l=>e.value=l,unit:e.unit,"onUpdate:unit":l=>e.unit=l},null,8,["cfg","modelValue","onUpdate:modelValue","unit","onUpdate:unit"])):v("v-if",!0)])])],2)))),128))]),v(" 保存到分类的弹窗 "),m(d(A),{show:d(fe),maskClosable:!1,"positive-text":"确认","negative-text":"取消",onPositiveClick:Ce,onNegativeClick:_e,class:"classification-modal-block"},{default:p((()=>[m(d(_),{title:"设置筛选分类",style:{width:"520px"},bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":p((()=>[s("div",M,[m(d(F),{component:d(U),size:"24",onClick:_e},null,8,["component"])])])),footer:p((()=>[s("div",W,[m(d(q),{onClick:_e},{default:p((()=>[h("取消")])),_:1}),m(d(q),{type:"info",onClick:Ce},{default:p((()=>[h("确认")])),_:1})])])),default:p((()=>[s("div",G,[m(d(w),{ref_key:"formRef",ref:ce,"label-placement":"left",rules:ee,model:de.value},{default:p((()=>[m(d(j),{label:"筛选集名称",path:"classname"},{default:p((()=>[m(d(E),{value:de.value.classname,"onUpdate:value":l[0]||(l[0]=e=>de.value.classname=e),placeholder:"请输入分类名称",clearable:""},null,8,["value"])])),_:1})])),_:1},8,["model"]),s("div",J,[H,(o(!0),r(u,null,c(d(me),((e,l)=>(o(),r("div",{class:f(["edit-tag",{"edit-tag-select":e.selected&&e.disabled}]),key:l,onDblclick:l=>function(e,l){l.disabled=!1,setTimeout((()=>{var l;null==(l=e.target)||l.focus()}),0)}(l,e),onClick:t=>function(e,l){e.disabled&&(me.value.forEach(((e,t)=>{t!==l&&(e.selected=!1)})),e.selected=!e.selected)}(e,l)},[e.disabled?(o(),r("div",X,[s("span",null,g(e.value),1)])):(o(),k(d(E),{key:1,style:{width:"100px"},value:e.value,"onUpdate:value":l=>e.value=l,disabled:e.disabled,onBlur:()=>e.disabled=!0,maxLength:10},null,8,["value","onUpdate:value","disabled","onBlur"])),m(d(F),{component:d(U),class:"anticon-close",size:"20",onClick:e=>Ae(l)},null,8,["component","onClick"])],42,K)))),128)),d(ke)?v("v-if",!0):(o(),r(u,{key:0},[b(m(d(q),{dashed:"",icon:"plus",class:"ant-btn",onClick:Se},{default:p((()=>[m(d(F),{component:d(I),size:"20"},null,8,["component"]),h("添加分类 ")])),_:1},512),[[y,!d(pe)]]),b(m(d(E),{style:{width:"100px"},class:"edit-tag",value:d(he),"onUpdate:value":l[1]||(l[1]=e=>C(he)?he.value=e:he=e),valueModifiers:{trim:!0},onBlur:xe,maxLength:10},null,8,["value"]),[[y,d(pe)]])],64))])])])),_:1})])),_:1},8,["show"])]))}});export{Y as default};
|
|
@@ -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,86 @@
|
|
|
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
|
+
$attr: {
|
|
14
|
+
[x: string]: unknown;
|
|
15
|
+
};
|
|
16
|
+
getChildrenByOrgPartenId: (params: any, filterApiConfig: any) => Promise<any>;
|
|
17
|
+
searchEmpTreeData: (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
|
+
onSelectNode?: ((...args: any[]) => any) | undefined;
|
|
31
|
+
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
32
|
+
}>>;
|
|
33
|
+
emit: (event: "selectNode" | "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
|
+
treeProperty: import("vue").ComputedRef<{
|
|
41
|
+
virtualScroll: boolean;
|
|
42
|
+
selectable: boolean;
|
|
43
|
+
data: any[];
|
|
44
|
+
expandedKeys: string[];
|
|
45
|
+
selectedKeys: string[];
|
|
46
|
+
renderLabel: ({ option }: any) => any;
|
|
47
|
+
onUpdateExpandedKeys: (expandedKeyVals: string[]) => void;
|
|
48
|
+
onUpdateSelectedKeys: (selectedKeyVals: never[] | undefined, [node]: any[]) => void;
|
|
49
|
+
onLoad: (treeNode: any) => any;
|
|
50
|
+
}>;
|
|
51
|
+
handleRenderLabel: ({ option }: any) => any;
|
|
52
|
+
init: () => Promise<void>;
|
|
53
|
+
onExpand: (expandedKeyVals: string[]) => void;
|
|
54
|
+
onNodeSelect: (selectedKeyVals: never[] | undefined, [node]: any[]) => void;
|
|
55
|
+
onSearch: () => Promise<void>;
|
|
56
|
+
refreshNode: (selectOrgId?: string | undefined) => Promise<void>;
|
|
57
|
+
getDeptData: (orgId: string) => Promise<any>;
|
|
58
|
+
getChildrenByOrgPartenIdFn: () => Promise<void>;
|
|
59
|
+
onLoadData: (treeNode: any) => any;
|
|
60
|
+
getExpandKeys: (data: any) => never[];
|
|
61
|
+
changeWidth: ({ distance }: any) => void;
|
|
62
|
+
saveWidth: () => void;
|
|
63
|
+
NInput: any;
|
|
64
|
+
NTree: any;
|
|
65
|
+
NEmpty: any;
|
|
66
|
+
vFlexibleResize: {
|
|
67
|
+
mounted(el: any, { value }: any): void;
|
|
68
|
+
beforeUnmount(el: any): void;
|
|
69
|
+
};
|
|
70
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("selectNode" | "saveWidth")[], "selectNode" | "saveWidth", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
71
|
+
sliderInitialWidth: {
|
|
72
|
+
type: NumberConstructor;
|
|
73
|
+
default: number;
|
|
74
|
+
};
|
|
75
|
+
treeSearchApiConfig: {
|
|
76
|
+
type: ObjectConstructor;
|
|
77
|
+
default: () => {};
|
|
78
|
+
};
|
|
79
|
+
}>> & {
|
|
80
|
+
onSelectNode?: ((...args: any[]) => any) | undefined;
|
|
81
|
+
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
82
|
+
}, {
|
|
83
|
+
sliderInitialWidth: number;
|
|
84
|
+
treeSearchApiConfig: Record<string, any>;
|
|
85
|
+
}>>;
|
|
86
|
+
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,84 @@
|
|
|
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
|
+
$attr: {
|
|
12
|
+
[x: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
getChildrenByOrgPartenId: (params: any, filterApiConfig: any) => Promise<any>;
|
|
15
|
+
searchEmpTreeData: (params: any, filterApiConfig: any) => Promise<any>;
|
|
16
|
+
getDeptList: (params: any, filterApiConfig: any) => Promise<any>;
|
|
17
|
+
isMatchFn: (node: any, keyword: string) => boolean;
|
|
18
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
sliderInitialWidth: {
|
|
20
|
+
type: NumberConstructor;
|
|
21
|
+
default: number;
|
|
22
|
+
};
|
|
23
|
+
treeSearchApiConfig: {
|
|
24
|
+
type: ObjectConstructor;
|
|
25
|
+
default: () => {};
|
|
26
|
+
};
|
|
27
|
+
}>> & {
|
|
28
|
+
onSelectNode?: ((...args: any[]) => any) | undefined;
|
|
29
|
+
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
30
|
+
}>>;
|
|
31
|
+
emit: (event: "selectNode" | "saveWidth", ...args: any[]) => void;
|
|
32
|
+
flexWidth: import("vue").Ref<number>;
|
|
33
|
+
searchValue: import("vue").Ref<string>;
|
|
34
|
+
treeData: import("vue").Ref<any[]>;
|
|
35
|
+
expandedKeys: import("vue").Ref<string[]>;
|
|
36
|
+
selectedKeys: import("vue").Ref<string[]>;
|
|
37
|
+
selectNode: import("vue").Ref<{}>;
|
|
38
|
+
treeProperty: import("vue").ComputedRef<{
|
|
39
|
+
virtualScroll: boolean;
|
|
40
|
+
selectable: boolean;
|
|
41
|
+
data: any[];
|
|
42
|
+
expandedKeys: string[];
|
|
43
|
+
selectedKeys: string[];
|
|
44
|
+
renderLabel: ({ option }: any) => any;
|
|
45
|
+
onUpdateExpandedKeys: (expandedKeyVals: string[]) => void;
|
|
46
|
+
onUpdateSelectedKeys: (selectedKeyVals: never[] | undefined, [node]: any[]) => void;
|
|
47
|
+
onLoad: (treeNode: any) => any;
|
|
48
|
+
}>;
|
|
49
|
+
handleRenderLabel: ({ option }: any) => any;
|
|
50
|
+
init: () => Promise<void>;
|
|
51
|
+
onExpand: (expandedKeyVals: string[]) => void;
|
|
52
|
+
onNodeSelect: (selectedKeyVals: never[] | undefined, [node]: any[]) => void;
|
|
53
|
+
onSearch: () => Promise<void>;
|
|
54
|
+
refreshNode: (selectOrgId?: string) => Promise<void>;
|
|
55
|
+
getDeptData: (orgId: string) => Promise<any>;
|
|
56
|
+
getChildrenByOrgPartenIdFn: () => Promise<void>;
|
|
57
|
+
onLoadData: (treeNode: any) => any;
|
|
58
|
+
getExpandKeys: (data: any) => never[];
|
|
59
|
+
changeWidth: ({ distance }: any) => void;
|
|
60
|
+
saveWidth: () => void;
|
|
61
|
+
NInput: any;
|
|
62
|
+
NTree: any;
|
|
63
|
+
NEmpty: any;
|
|
64
|
+
vFlexibleResize: {
|
|
65
|
+
mounted(el: any, { value }: any): void;
|
|
66
|
+
beforeUnmount(el: any): void;
|
|
67
|
+
};
|
|
68
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("selectNode" | "saveWidth")[], "selectNode" | "saveWidth", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
69
|
+
sliderInitialWidth: {
|
|
70
|
+
type: NumberConstructor;
|
|
71
|
+
default: number;
|
|
72
|
+
};
|
|
73
|
+
treeSearchApiConfig: {
|
|
74
|
+
type: ObjectConstructor;
|
|
75
|
+
default: () => {};
|
|
76
|
+
};
|
|
77
|
+
}>> & {
|
|
78
|
+
onSelectNode?: ((...args: any[]) => any) | undefined;
|
|
79
|
+
onSaveWidth?: ((...args: any[]) => any) | undefined;
|
|
80
|
+
}, {
|
|
81
|
+
sliderInitialWidth: number;
|
|
82
|
+
treeSearchApiConfig: Record<string, any>;
|
|
83
|
+
}>;
|
|
84
|
+
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,computed as l,onMounted as n,h as s,withDirectives as o,openBlock as r,createElementBlock as i,normalizeStyle as u,createElementVNode as c,createVNode as d,unref as v,createCommentVNode as f,renderSlot as p,createBlock as m,normalizeProps as h,mergeProps as y}from"vue";import{NInput as g,NTree as b,NEmpty as w}from"naive-ui";import{vFlexibleResize as x}from"../../../shared/directive/flexibleResize.js";import O from"./hooks/useAsyncData.js";import{traversalData as C}from"./utils/tool.js";import{useDebounceFn as S}from"@vueuse/core";const I={class:"search-groups"},L={class:"tree-wrap"},k={key:1,class:"empty-container"},N={class:"table-footer-wrap"};var A=e({__name:"index",props:{sliderInitialWidth:{type:Number,default:300},treeSearchApiConfig:{type:Object,default:()=>({})}},emits:["selectNode","saveWidth"],setup(e,{expose:A,emit:j}){const K=e,U=t(),{getChildrenByOrgPartenId:W,searchEmpTreeData:D,getDeptList:E}=O(),M=(e,t)=>{var a,l;t=null==t?void 0:t.toLowerCase();let{label:n="",abbrp:s="",abbrw:o="",key:r,filterSearch:i=[]}=e;const u=(null==(a=null==n?void 0:n.toLowerCase())?void 0:a.indexOf(t))>-1,c=(null==(l=null==r?void 0:r.toLowerCase())?void 0:l.indexOf(t))>-1,d=i.some((e=>e.toLowerCase().indexOf(t)>-1));return!!(u||c||d)},R=a(K.sliderInitialWidth),$=a(""),J=a([]),P=a([]),_=a([]),z=a({}),B=l((()=>{let e={};for(let t in U)e[t]=U[t];return{virtualScroll:!0,selectable:!0,data:J.value,expandedKeys:P.value,selectedKeys:_.value,renderLabel:F,onUpdateExpandedKeys:T,onUpdateSelectedKeys:V,onLoad:X,...e}}));function F({option:e}){const t=e.label;if(t.includes($.value.trim())){const e=t.substr(0,t.indexOf($.value.trim())),a=t.substr(t.indexOf($.value.trim())+$.value.trim().length);return s("div",[s("span",{style:{marginRight:e?"2px":"0px"}},e),s("span",{style:{color:"#2563F4"}},$.value.trim()),s("span",{style:{marginLeft:a?"2px":"0px"}},a)])}return t}function T(e){P.value=e}function V(e=[],[t]){_.value=e,j("selectNode",t),z.value=t}n((()=>{!async function(){await Q(),J.value.length>0&&(P.value=[J.value[0].key],_.value=[J.value[0].key],z.value=J.value[0],j("selectNode",JSON.parse(JSON.stringify(J.value[0]))))}()}));const q=S((async()=>{const e=$.value.trim();if(e){const{data:t,success:a}=await D({search:e},K.treeSearchApiConfig);a&&(J.value=t,P.value=function(e){const t=[];for(const a of C(e,"children")){let e=!1;for(const t of C(a.children,"children"))M(t,$.value)&&(e=!0);e&&t.push(a.key)}return t}(t))}else G()}),800);async function G(e){await Q();let t=J.value[0].orgId;e&&(t=e);const a=await H(t);if(a){const e=J.value.map((e=>e.orgId===t?a:e));J.value=e}}async function H(e){const{data:t,success:a}=await E({orgId:e},K.treeSearchApiConfig);if(a){const a=J.value.find((t=>t.orgId===e));return a.children=t,a}}async function Q(){const{success:e,data:t}=await W(null,K.treeSearchApiConfig);e&&(J.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(){j("saveWidth",R.value)}return A({refreshNode:G}),(e,t)=>o((r(),i("div",{class:"left-tree-wrap",ref:"left",style:u({width:R.value+"px"})},[c("div",I,[d(v(g),{clearable:"",placeholder:"搜索关键字",value:$.value,"onUpdate:value":[t[0]||(t[0]=e=>$.value=e),v(q)]},null,8,["value","onUpdate:value"]),f(" 按钮插槽 "),p(e.$slots,"buttons")]),f(" 标签tab插槽 "),p(e.$slots,"tabs"),c("div",L,[J.value.length>0?(r(),m(v(b),h(y({key:0},v(B))),null,16)):(r(),i("div",k,[d(v(w),{description:"暂无数据"})]))]),c("div",N,[f(" 导出数据插槽 "),p(e.$slots,"output")])],4)),[[v(x),{mode:"VR",onMove:Y,onEnd:Z}]])}});export{A 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;
|