cnhis-design-vue 3.1.53-beta.1 → 3.1.53-beta.10
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/AnnotationEdit.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-separate.vue.d.ts +4 -4
- package/es/components/big-table/src/hooks/useEdit.d.ts +4 -4
- package/es/components/big-table/src/hooks/useSeparateRow.d.ts +4 -4
- package/es/components/body-select/index.d.ts +9 -4
- package/es/components/body-select/src/config/index.js +1 -1
- package/es/components/body-select/src/hooks/renderCanvas.d.ts +1 -1
- package/es/components/body-select/src/hooks/renderCanvas.js +1 -1
- package/es/components/body-select/src/index.vue.d.ts +9 -4
- package/es/components/body-select/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/button-print/index.d.ts +9 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +9 -0
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/utils/dialog.d.ts +2 -2
- package/es/components/button-print/src/utils/print.d.ts +14 -13
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +69 -6
- package/es/components/card-reader-sdk/src/cardReaderSDK.d.ts +5 -0
- package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
- package/es/components/card-reader-sdk/src/constants/index.d.ts +2 -1
- package/es/components/card-reader-sdk/src/constants/index.js +1 -1
- package/es/components/card-reader-sdk/src/types/index.d.ts +3 -3
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/form-config/index.d.ts +105 -26
- package/es/components/form-config/src/FormConfig.vue.d.ts +106 -27
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +30 -6
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +51 -12
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -1
- package/es/components/form-render/index.d.ts +30 -6
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +31 -7
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +31 -7
- package/es/components/form-render/src/components/renderer/{combination.d.ts → combination/combination.d.ts} +1 -1
- package/es/components/form-render/src/components/renderer/combination/combination.js +1 -0
- package/es/components/form-render/src/components/renderer/combination/hooks/index.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/combination/hooks/index.js +1 -0
- package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.d.ts +8 -0
- package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +1 -0
- package/es/components/form-render/src/components/renderer/combination/index.d.ts +3 -0
- package/es/components/form-render/src/components/renderer/combination/index.js +1 -0
- package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -0
- package/es/components/form-render/src/components/renderer/combination/tableCombination.d.ts +61 -0
- package/es/components/form-render/src/components/renderer/combination/tableCombination.js +1 -0
- package/es/components/form-render/src/components/renderer/index.js +1 -1
- package/es/components/form-render/src/components/renderer/inputNumber.d.ts +5 -5
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.d.ts +2 -4
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.d.ts +3 -3
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +5 -5
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/constants/index.d.ts +3 -2
- package/es/components/form-render/src/hooks/index.d.ts +0 -2
- package/es/components/form-render/src/hooks/index.js +1 -1
- package/es/components/form-render/src/hooks/useAnchor.d.ts +3 -3
- package/es/components/form-render/src/hooks/useCommonInjection.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +10 -2
- package/es/components/form-render/src/hooks/useFormContext.d.ts +3 -3
- package/es/components/form-render/src/hooks/useFormContext.js +1 -1
- package/es/components/form-render/src/hooks/useFormItemDeps.d.ts +3 -3
- package/es/components/form-render/src/hooks/useFormRenderLifeCycle.d.ts +9 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +5 -5
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +4 -2
- package/es/components/form-render/src/types/index.d.ts +7 -14
- package/es/components/form-render/src/utils/index.d.ts +1 -2
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/form-render/src/utils/schema.d.ts +2 -2
- package/es/components/form-render/src/utils/schema.js +1 -1
- package/es/components/guide/src/renderer.js +1 -1
- package/es/components/iho-table/index.d.ts +39 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +40 -0
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +4 -1
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +2 -2
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +2 -2
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.d.ts +552 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +5 -2
- 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/separateRendererPlugin/editSeparate.vue.d.ts +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +5 -2
- package/es/components/iho-table/src/types/pluginType.d.ts +3 -3
- 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.d.ts +1 -0
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +97 -29
- package/es/components/info-header/src/InfoHeader.vue.d.ts +98 -30
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +9 -5
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +10 -6
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +41 -13
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +30 -6
- package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/search-cascader/index.d.ts +23 -3
- package/es/components/search-cascader/src/SearchCascader.vue.d.ts +24 -4
- package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
- package/es/components/search-cascader/src/components/ClearIcon.vue.js +1 -0
- 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-setter/index.d.ts +34 -9
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +35 -10
- package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
- package/es/components/time-picker/src/TimePicker.vue2.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/InputNumberSlash/InputNumberSlash.d.ts +4 -4
- package/es/shared/components/SlotRender/SlotRender.d.ts +5 -5
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/hooks/index.d.ts +3 -0
- package/es/shared/hooks/index.js +1 -1
- package/es/shared/hooks/selectHooks/index.d.ts +4 -0
- package/es/shared/hooks/selectHooks/index.js +1 -0
- package/es/shared/hooks/selectHooks/useOptionFiltered.d.ts +10 -0
- package/es/shared/hooks/selectHooks/useOptionFiltered.js +1 -0
- package/es/shared/hooks/selectHooks/useSearchContent.d.ts +6 -0
- package/es/shared/hooks/selectHooks/useSearchContent.js +1 -0
- package/es/shared/hooks/selectHooks/useSelectAllowModify.d.ts +23 -0
- package/es/shared/hooks/selectHooks/useSelectAllowModify.js +1 -0
- package/es/shared/hooks/selectHooks/useSelectRenders.d.ts +21 -0
- package/es/shared/hooks/selectHooks/useSelectRenders.js +1 -0
- package/es/shared/hooks/{useAsyncQueue.d.ts → useAsyncQueue/index.d.ts} +7 -15
- package/es/shared/hooks/useAsyncQueue/index.js +1 -0
- package/es/shared/hooks/useAsyncQueue/types.d.ts +20 -0
- package/es/shared/hooks/useAsyncQueue/types.js +1 -0
- package/es/shared/hooks/useDateTime.d.ts +2 -2
- package/es/shared/hooks/useFormRequest/index.d.ts +24 -0
- package/es/shared/hooks/useFormRequest/index.js +1 -0
- package/es/shared/hooks/useFormRequest/types.d.ts +39 -0
- package/es/shared/hooks/useFormRequest/types.js +1 -0
- package/es/shared/hooks/useLevelSearchCascader.d.ts +31 -0
- package/es/shared/hooks/useLevelSearchCascader.js +1 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/index.d.ts +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
- package/es/components/form-render/src/components/renderer/combination.js +0 -1
- package/es/components/form-render/src/components/renderer/jsonCombination/index.js +0 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader/utils.d.ts +0 -23
- package/es/components/form-render/src/components/renderer/levelSearchCascader/utils.js +0 -1
- package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +0 -16
- package/es/components/form-render/src/hooks/useFormAsyncQueue.js +0 -1
- package/es/components/form-render/src/hooks/useFormRequest.d.ts +0 -26
- package/es/components/form-render/src/hooks/useFormRequest.js +0 -1
- package/es/shared/hooks/useAsyncQueue.js +0 -1
- /package/es/components/form-render/src/components/renderer/{jsonCombination → combination}/hooks/useDeepValidate.d.ts +0 -0
- /package/es/components/form-render/src/components/renderer/{jsonCombination → combination}/hooks/useDeepValidate.js +0 -0
- /package/es/components/form-render/src/components/renderer/{jsonCombination/index.d.ts → combination/jsonCombination.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnyFn } from '../../../../../../es/shared/types';
|
|
2
2
|
import { FormChangePayload, FormRenderProps } from '../../../../../../es/components/form-render';
|
|
3
3
|
import { InfoHeaderTypes } from '../../../../../../es/components/info-header/src/types';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
|
@@ -37,7 +37,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
37
37
|
labelField: string;
|
|
38
38
|
valueField: string;
|
|
39
39
|
minColumnWidth: string | number;
|
|
40
|
-
rootSlot: Record<string,
|
|
40
|
+
rootSlot: Record<string, AnyFn>;
|
|
41
41
|
formProps: Partial<FormRenderProps>;
|
|
42
42
|
};
|
|
43
43
|
themeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
@@ -265,12 +265,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
265
265
|
uuid: string;
|
|
266
266
|
lifeCycle: Partial<{
|
|
267
267
|
onSetup(): void;
|
|
268
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
269
|
+
field: import("@formily/core").GeneralField;
|
|
270
|
+
oldValue: unknown;
|
|
271
|
+
}): any;
|
|
268
272
|
beforeRequest(fieldKey: string, params?: import("../../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../../es/shared/types").UndefinedAble<import("../../../../../../es/shared/types").AnyObject>;
|
|
269
273
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): import("../../../../../../es/shared/types").AnyObject[];
|
|
270
274
|
afterOptionInit(fieldKey: string, options: import("../../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void;
|
|
271
275
|
}>;
|
|
272
276
|
businessFormatter: import("../../../../../../es/components/form-render").FormBusinessFormatter;
|
|
273
|
-
requestInstance: import("
|
|
277
|
+
requestInstance: import("../../../..").FormRequestDefine.RequestInstance;
|
|
274
278
|
enterToNextWidget: boolean | ((fieldItem: import("../../../../../../es/components/form-render").FieldItem) => boolean | void);
|
|
275
279
|
lowCodeReactions: import("../../../../../../es/shared/types").FormLowCodeReactions.Config[];
|
|
276
280
|
linebarAutoHidden: boolean;
|
|
@@ -2036,19 +2040,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2036
2040
|
}>;
|
|
2037
2041
|
SlotRender: import("vue").DefineComponent<{
|
|
2038
2042
|
renderer: {
|
|
2039
|
-
type: import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> |
|
|
2043
|
+
type: import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | AnyFn<any[], any>>;
|
|
2040
2044
|
required: true;
|
|
2041
2045
|
};
|
|
2042
2046
|
rootSlots: {
|
|
2043
|
-
type: import("vue").PropType<Record<string,
|
|
2047
|
+
type: import("vue").PropType<Record<string, AnyFn<any[], any>>>;
|
|
2044
2048
|
};
|
|
2045
2049
|
}, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2046
2050
|
renderer: {
|
|
2047
|
-
type: import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> |
|
|
2051
|
+
type: import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | AnyFn<any[], any>>;
|
|
2048
2052
|
required: true;
|
|
2049
2053
|
};
|
|
2050
2054
|
rootSlots: {
|
|
2051
|
-
type: import("vue").PropType<Record<string,
|
|
2055
|
+
type: import("vue").PropType<Record<string, AnyFn<any[], any>>>;
|
|
2052
2056
|
};
|
|
2053
2057
|
}>>, {}>;
|
|
2054
2058
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -2238,13 +2242,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2238
2242
|
lifeCycle: {
|
|
2239
2243
|
type: import("vue").PropType<Partial<{
|
|
2240
2244
|
onSetup(): void;
|
|
2245
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
2246
|
+
field: import("@formily/core").GeneralField;
|
|
2247
|
+
oldValue: unknown;
|
|
2248
|
+
}): any;
|
|
2241
2249
|
beforeRequest(fieldKey: string, params?: import("../../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../../es/shared/types").UndefinedAble<import("../../../../../../es/shared/types").AnyObject>;
|
|
2242
2250
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): import("../../../../../../es/shared/types").AnyObject[];
|
|
2243
2251
|
afterOptionInit(fieldKey: string, options: import("../../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void;
|
|
2244
2252
|
}>>;
|
|
2245
2253
|
};
|
|
2246
2254
|
requestInstance: {
|
|
2247
|
-
type: import("vue").PropType<import("
|
|
2255
|
+
type: import("vue").PropType<import("../../../..").FormRequestDefine.RequestInstance>;
|
|
2248
2256
|
};
|
|
2249
2257
|
enterToNextWidget: {
|
|
2250
2258
|
type: import("vue").PropType<boolean | ((fieldItem: import("../../../../../../es/components/form-render").FieldItem) => boolean | void)>;
|
|
@@ -2383,13 +2391,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2383
2391
|
lifeCycle: {
|
|
2384
2392
|
type: import("vue").PropType<Partial<{
|
|
2385
2393
|
onSetup(): void;
|
|
2394
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
2395
|
+
field: import("@formily/core").GeneralField;
|
|
2396
|
+
oldValue: unknown;
|
|
2397
|
+
}): any;
|
|
2386
2398
|
beforeRequest(fieldKey: string, params?: import("../../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../../es/shared/types").UndefinedAble<import("../../../../../../es/shared/types").AnyObject>;
|
|
2387
2399
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): import("../../../../../../es/shared/types").AnyObject[];
|
|
2388
2400
|
afterOptionInit(fieldKey: string, options: import("../../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void;
|
|
2389
2401
|
}>>;
|
|
2390
2402
|
};
|
|
2391
2403
|
requestInstance: {
|
|
2392
|
-
type: import("vue").PropType<import("
|
|
2404
|
+
type: import("vue").PropType<import("../../../..").FormRequestDefine.RequestInstance>;
|
|
2393
2405
|
};
|
|
2394
2406
|
enterToNextWidget: {
|
|
2395
2407
|
type: import("vue").PropType<boolean | ((fieldItem: import("../../../../../../es/components/form-render").FieldItem) => boolean | void)>;
|
|
@@ -2443,7 +2455,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2443
2455
|
changeContextCollector: import("../../../../../../es/components/form-render").ContextCollector;
|
|
2444
2456
|
formUUID: string;
|
|
2445
2457
|
anchorBarRef: import("vue").Ref<{
|
|
2446
|
-
syncBarPosition:
|
|
2458
|
+
syncBarPosition: AnyFn<any[], any>;
|
|
2447
2459
|
} | undefined>;
|
|
2448
2460
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
2449
2461
|
updateAnchorList: (field: import("@formily/core").GeneralField) => void;
|
|
@@ -2452,13 +2464,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2452
2464
|
title: string;
|
|
2453
2465
|
}[]>;
|
|
2454
2466
|
onScroll: (scrollEvent: Event) => void;
|
|
2455
|
-
callLifeCycle: <T extends "onSetup" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
|
|
2467
|
+
callLifeCycle: <T extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
|
|
2456
2468
|
onSetup(): void;
|
|
2469
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
2470
|
+
field: import("@formily/core").GeneralField;
|
|
2471
|
+
oldValue: unknown;
|
|
2472
|
+
}): any;
|
|
2457
2473
|
beforeRequest(fieldKey: string, params?: import("../../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../../es/shared/types").UndefinedAble<import("../../../../../../es/shared/types").AnyObject>;
|
|
2458
2474
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): import("../../../../../../es/shared/types").AnyObject[];
|
|
2459
2475
|
afterOptionInit(fieldKey: string, options: import("../../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void;
|
|
2460
2476
|
}>>[T]> | undefined) => import("../../../../../../es/shared/types").UndefinedAble<ReturnType<Required<Partial<{
|
|
2461
2477
|
onSetup(): void;
|
|
2478
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
2479
|
+
field: import("@formily/core").GeneralField;
|
|
2480
|
+
oldValue: unknown;
|
|
2481
|
+
}): any;
|
|
2462
2482
|
beforeRequest(fieldKey: string, params?: import("../../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../../es/shared/types").UndefinedAble<import("../../../../../../es/shared/types").AnyObject>;
|
|
2463
2483
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): import("../../../../../../es/shared/types").AnyObject[];
|
|
2464
2484
|
afterOptionInit(fieldKey: string, options: import("../../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void;
|
|
@@ -2551,12 +2571,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2551
2571
|
uuid: string;
|
|
2552
2572
|
lifeCycle: Partial<{
|
|
2553
2573
|
onSetup(): void;
|
|
2574
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
2575
|
+
field: import("@formily/core").GeneralField;
|
|
2576
|
+
oldValue: unknown;
|
|
2577
|
+
}): any;
|
|
2554
2578
|
beforeRequest(fieldKey: string, params?: import("../../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../../es/shared/types").UndefinedAble<import("../../../../../../es/shared/types").AnyObject>;
|
|
2555
2579
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): import("../../../../../../es/shared/types").AnyObject[];
|
|
2556
2580
|
afterOptionInit(fieldKey: string, options: import("../../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void;
|
|
2557
2581
|
}>;
|
|
2558
2582
|
businessFormatter: import("../../../../../../es/components/form-render").FormBusinessFormatter;
|
|
2559
|
-
requestInstance: import("
|
|
2583
|
+
requestInstance: import("../../../..").FormRequestDefine.RequestInstance;
|
|
2560
2584
|
enterToNextWidget: boolean | ((fieldItem: import("../../../../../../es/components/form-render").FieldItem) => boolean | void);
|
|
2561
2585
|
lowCodeReactions: import("../../../../../../es/shared/types").FormLowCodeReactions.Config[];
|
|
2562
2586
|
linebarAutoHidden: boolean;
|
|
@@ -2958,13 +2982,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2958
2982
|
lifeCycle: {
|
|
2959
2983
|
type: import("vue").PropType<Partial<{
|
|
2960
2984
|
onSetup(): void;
|
|
2985
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
2986
|
+
field: import("@formily/core").GeneralField;
|
|
2987
|
+
oldValue: unknown;
|
|
2988
|
+
}): any;
|
|
2961
2989
|
beforeRequest(fieldKey: string, params?: import("../../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../../es/shared/types").UndefinedAble<import("../../../../../../es/shared/types").AnyObject>;
|
|
2962
2990
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../../es/shared/types").AnyObject | undefined): import("../../../../../../es/shared/types").AnyObject[];
|
|
2963
2991
|
afterOptionInit(fieldKey: string, options: import("../../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../../es/shared/types").AnyObject | undefined): void;
|
|
2964
2992
|
}>>;
|
|
2965
2993
|
};
|
|
2966
2994
|
requestInstance: {
|
|
2967
|
-
type: import("vue").PropType<import("
|
|
2995
|
+
type: import("vue").PropType<import("../../../..").FormRequestDefine.RequestInstance>;
|
|
2968
2996
|
};
|
|
2969
2997
|
enterToNextWidget: {
|
|
2970
2998
|
type: import("vue").PropType<boolean | ((fieldItem: import("../../../../../../es/components/form-render").FieldItem) => boolean | void)>;
|
|
@@ -164,13 +164,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
164
164
|
lifeCycle: {
|
|
165
165
|
type: import("vue").PropType<Partial<{
|
|
166
166
|
onSetup(): void;
|
|
167
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
168
|
+
field: import("@formily/core").GeneralField;
|
|
169
|
+
oldValue: unknown;
|
|
170
|
+
}): any;
|
|
167
171
|
beforeRequest(fieldKey: string, params?: import("../../../..").AnyObject | undefined, payload?: import("../../../..").AnyObject | undefined): void | import("../../../..").UndefinedAble<import("../../../..").AnyObject>;
|
|
168
172
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../..").AnyObject | undefined): import("../../../..").AnyObject[];
|
|
169
173
|
afterOptionInit(fieldKey: string, options: import("../../../..").AnyObject[], payload?: import("../../../..").AnyObject | undefined): void;
|
|
170
174
|
}>>;
|
|
171
175
|
};
|
|
172
176
|
requestInstance: {
|
|
173
|
-
type: import("vue").PropType<import("
|
|
177
|
+
type: import("vue").PropType<import("../../../..").FormRequestDefine.RequestInstance>;
|
|
174
178
|
};
|
|
175
179
|
enterToNextWidget: {
|
|
176
180
|
type: import("vue").PropType<boolean | ((fieldItem: FieldItem) => boolean | void)>;
|
|
@@ -309,13 +313,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
309
313
|
lifeCycle: {
|
|
310
314
|
type: import("vue").PropType<Partial<{
|
|
311
315
|
onSetup(): void;
|
|
316
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
317
|
+
field: import("@formily/core").GeneralField;
|
|
318
|
+
oldValue: unknown;
|
|
319
|
+
}): any;
|
|
312
320
|
beforeRequest(fieldKey: string, params?: import("../../../..").AnyObject | undefined, payload?: import("../../../..").AnyObject | undefined): void | import("../../../..").UndefinedAble<import("../../../..").AnyObject>;
|
|
313
321
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../..").AnyObject | undefined): import("../../../..").AnyObject[];
|
|
314
322
|
afterOptionInit(fieldKey: string, options: import("../../../..").AnyObject[], payload?: import("../../../..").AnyObject | undefined): void;
|
|
315
323
|
}>>;
|
|
316
324
|
};
|
|
317
325
|
requestInstance: {
|
|
318
|
-
type: import("vue").PropType<import("
|
|
326
|
+
type: import("vue").PropType<import("../../../..").FormRequestDefine.RequestInstance>;
|
|
319
327
|
};
|
|
320
328
|
enterToNextWidget: {
|
|
321
329
|
type: import("vue").PropType<boolean | ((fieldItem: FieldItem) => boolean | void)>;
|
|
@@ -369,7 +377,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
369
377
|
changeContextCollector: import("../../../../../../es/components/form-render").ContextCollector;
|
|
370
378
|
formUUID: string;
|
|
371
379
|
anchorBarRef: import("vue").Ref<{
|
|
372
|
-
syncBarPosition: import("../../../..").
|
|
380
|
+
syncBarPosition: import("../../../..").AnyFn<any[], any>;
|
|
373
381
|
} | undefined>;
|
|
374
382
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
375
383
|
updateAnchorList: (field: import("@formily/core").GeneralField) => void;
|
|
@@ -378,13 +386,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
378
386
|
title: string;
|
|
379
387
|
}[]>;
|
|
380
388
|
onScroll: (scrollEvent: Event) => void;
|
|
381
|
-
callLifeCycle: <T extends "onSetup" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
|
|
389
|
+
callLifeCycle: <T extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
|
|
382
390
|
onSetup(): void;
|
|
391
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
392
|
+
field: import("@formily/core").GeneralField;
|
|
393
|
+
oldValue: unknown;
|
|
394
|
+
}): any;
|
|
383
395
|
beforeRequest(fieldKey: string, params?: import("../../../..").AnyObject | undefined, payload?: import("../../../..").AnyObject | undefined): void | import("../../../..").UndefinedAble<import("../../../..").AnyObject>;
|
|
384
396
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../..").AnyObject | undefined): import("../../../..").AnyObject[];
|
|
385
397
|
afterOptionInit(fieldKey: string, options: import("../../../..").AnyObject[], payload?: import("../../../..").AnyObject | undefined): void;
|
|
386
398
|
}>>[T]> | undefined) => import("../../../..").UndefinedAble<ReturnType<Required<Partial<{
|
|
387
399
|
onSetup(): void;
|
|
400
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
401
|
+
field: import("@formily/core").GeneralField;
|
|
402
|
+
oldValue: unknown;
|
|
403
|
+
}): any;
|
|
388
404
|
beforeRequest(fieldKey: string, params?: import("../../../..").AnyObject | undefined, payload?: import("../../../..").AnyObject | undefined): void | import("../../../..").UndefinedAble<import("../../../..").AnyObject>;
|
|
389
405
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../..").AnyObject | undefined): import("../../../..").AnyObject[];
|
|
390
406
|
afterOptionInit(fieldKey: string, options: import("../../../..").AnyObject[], payload?: import("../../../..").AnyObject | undefined): void;
|
|
@@ -477,12 +493,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
477
493
|
uuid: string;
|
|
478
494
|
lifeCycle: Partial<{
|
|
479
495
|
onSetup(): void;
|
|
496
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
497
|
+
field: import("@formily/core").GeneralField;
|
|
498
|
+
oldValue: unknown;
|
|
499
|
+
}): any;
|
|
480
500
|
beforeRequest(fieldKey: string, params?: import("../../../..").AnyObject | undefined, payload?: import("../../../..").AnyObject | undefined): void | import("../../../..").UndefinedAble<import("../../../..").AnyObject>;
|
|
481
501
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../..").AnyObject | undefined): import("../../../..").AnyObject[];
|
|
482
502
|
afterOptionInit(fieldKey: string, options: import("../../../..").AnyObject[], payload?: import("../../../..").AnyObject | undefined): void;
|
|
483
503
|
}>;
|
|
484
504
|
businessFormatter: import("../../../../../../es/components/form-render").FormBusinessFormatter;
|
|
485
|
-
requestInstance: import("
|
|
505
|
+
requestInstance: import("../../../..").FormRequestDefine.RequestInstance;
|
|
486
506
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
487
507
|
lowCodeReactions: import("../../../..").FormLowCodeReactions.Config[];
|
|
488
508
|
linebarAutoHidden: boolean;
|
|
@@ -884,13 +904,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
884
904
|
lifeCycle: {
|
|
885
905
|
type: import("vue").PropType<Partial<{
|
|
886
906
|
onSetup(): void;
|
|
907
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
908
|
+
field: import("@formily/core").GeneralField;
|
|
909
|
+
oldValue: unknown;
|
|
910
|
+
}): any;
|
|
887
911
|
beforeRequest(fieldKey: string, params?: import("../../../..").AnyObject | undefined, payload?: import("../../../..").AnyObject | undefined): void | import("../../../..").UndefinedAble<import("../../../..").AnyObject>;
|
|
888
912
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../..").AnyObject | undefined): import("../../../..").AnyObject[];
|
|
889
913
|
afterOptionInit(fieldKey: string, options: import("../../../..").AnyObject[], payload?: import("../../../..").AnyObject | undefined): void;
|
|
890
914
|
}>>;
|
|
891
915
|
};
|
|
892
916
|
requestInstance: {
|
|
893
|
-
type: import("vue").PropType<import("
|
|
917
|
+
type: import("vue").PropType<import("../../../..").FormRequestDefine.RequestInstance>;
|
|
894
918
|
};
|
|
895
919
|
enterToNextWidget: {
|
|
896
920
|
type: import("vue").PropType<boolean | ((fieldItem: FieldItem) => boolean | void)>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as
|
|
1
|
+
import{defineComponent as e,ref as t,provide as l,computed as o,unref as a,openBlock as n,createBlock as u,normalizeStyle as s,withCtx as i,createVNode as r,mergeProps as d,createElementBlock as p,normalizeClass as c,createElementVNode as f,Fragment as m,renderList as v,createCommentVNode as y,createTextVNode as h,toDisplayString as g}from"vue";import{NPopover as k,NInputNumber as w,NSpace as V,NIcon as b}from"naive-ui";import{Close as x,GitCompareOutline as O,ArrowUndoSharp as S}from"@vicons/ionicons5";import j from"./components/NumberPanel.vue.js";import{useDraggable as C}from"@vueuse/core";import{useTheme as _}from"../../../shared/hooks/useTheme.js";import"date-fns";import"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import{defaultCssVars as I}from"./constants/index.js";const D=f("span",null,"键盘",-1),N={class:"keys"},K=["onClick"];var R=e({__name:"Keyboard",props:{mode:{type:String,default:"english"},drag:{type:Boolean,default:!1},positionInitialValue:{type:Object,default:()=>({x:0,y:0})},defaultValue:{type:Number},value:{type:Number},panel:{type:Boolean,default:!0},moveOffset:{type:Object,default:()=>({x:0,y:0})}},emits:["change","keydown"],setup(e,{expose:R,emit:U}){const B=e,E="QWERTYUIOPASDFGHJKLZXCVBNM.",F=["Switch"," ","Undo","Enter"],H=E.split("").concat(F),J=E.split(".")[0].split("").sort().concat(["."],F),M=_(I,"Keyboard");let P=t(Date.now());l("toSelectInputContent",P);const Q=o((()=>"english"===B.mode)),T=o((()=>({mode:B.mode,defaultValue:B.defaultValue,value:B.value,positionInitialValue:B.positionInitialValue,moveOffset:B.moveOffset,drag:B.drag,onChange:q}))),$=o((()=>`${JSON.stringify(M.value).replace(/\{|\}|\"/g,"").replace(/,/g,";")};${(null==Y?void 0:Y.value)||""}`)),A=t(H.slice()),G=t(),L=t(),W=t(),X=t(),Y=function(){B.defaultValue&&(X.value=B.defaultValue);if(Q.value&&B.drag){const{x:e,y:t,style:l}=C(L,{initialValue:B.positionInitialValue,preventDefault:!0,handle:W,onMove:(e,t)=>{var l,o,a,n;e.x+=null!=(o=null==(l=B.moveOffset)?void 0:l.x)?o:0,e.y+=null!=(n=null==(a=B.moveOffset)?void 0:a.y)?n:0}});return l}}();function Z(e){"Switch"!==e?U("keydown",e):A.value="Q"===A.value[0]?J.slice():H.slice()}function q(e){var t;null==(t=G.value)||t.setShow(!1),X.value=e,U("change",e)}return R({select:function(){P.value=Date.now()}}),(t,l)=>a(Q)||e.panel?!a(Q)&&e.panel?(n(),u(j,d({key:1},a(T),{style:a(M)}),null,16,["style"])):(n(),p("div",{key:2,class:c(["c-keyboard-english",{isFixed:e.drag}]),ref_key:"englishKeyboardRef",ref:L,style:s(a($))},[r(a(V),{"wrap-item":!1,align:"center",justify:"space-between",ref_key:"keyboardDragRef",ref:W,style:s({cursor:e.drag?"move":"default"})},{default:i((()=>[D,r(a(b),{onClick:l[1]||(l[1]=e=>Z("close")),component:a(x)},null,8,["component"])])),_:1},8,["style"]),f("div",N,[(n(!0),p(m,null,v(A.value,((e,t)=>(n(),p("span",{key:e,class:c(["key"+t]),onClick:t=>Z(e)},["Switch"===e?(n(),u(a(b),{key:0,component:a(O)},null,8,["component"])):y("v-if",!0),"Undo"===e?(n(),u(a(b),{key:1,component:a(S)},null,8,["component"])):y("v-if",!0),h(" "+g(F.includes(e)&&"Enter"!==e?""===e?"空格":"":e),1)],10,K)))),128))])],6)):(n(),u(a(k),{key:0,ref_key:"popoverRef",ref:G,trigger:"click","show-arrow":!1,placement:"bottom-start",style:s([{padding:"0"},a(M)]),"display-directive":"show"},{trigger:i((()=>[r(a(w),{value:X.value,"onUpdate:value":l[0]||(l[0]=e=>X.value=e),"show-button":!1},null,8,["value"])])),default:i((()=>[r(j,{mode:e.mode,defaultValue:e.defaultValue,onChange:q},null,8,["mode","defaultValue"])])),_:1},8,["style"]))}});export{R 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};
|
|
@@ -28,7 +28,7 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
28
28
|
default: () => never[];
|
|
29
29
|
};
|
|
30
30
|
search: {
|
|
31
|
-
type: import("vue").PropType<import("../../../es/shared/types").
|
|
31
|
+
type: import("vue").PropType<import("../../../es/shared/types").AnyFn<any[], any>>;
|
|
32
32
|
};
|
|
33
33
|
labelKey: {
|
|
34
34
|
type: StringConstructor;
|
|
@@ -50,6 +50,12 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
50
50
|
default: number;
|
|
51
51
|
};
|
|
52
52
|
disabled: BooleanConstructor;
|
|
53
|
+
inputProps: {
|
|
54
|
+
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
55
|
+
};
|
|
56
|
+
popperProps: {
|
|
57
|
+
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
58
|
+
};
|
|
53
59
|
}, {
|
|
54
60
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
55
61
|
value: {
|
|
@@ -80,7 +86,7 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
80
86
|
default: () => never[];
|
|
81
87
|
};
|
|
82
88
|
search: {
|
|
83
|
-
type: import("vue").PropType<import("../../../es/shared/types").
|
|
89
|
+
type: import("vue").PropType<import("../../../es/shared/types").AnyFn<any[], any>>;
|
|
84
90
|
};
|
|
85
91
|
labelKey: {
|
|
86
92
|
type: StringConstructor;
|
|
@@ -102,6 +108,12 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
102
108
|
default: number;
|
|
103
109
|
};
|
|
104
110
|
disabled: BooleanConstructor;
|
|
111
|
+
inputProps: {
|
|
112
|
+
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
113
|
+
};
|
|
114
|
+
popperProps: {
|
|
115
|
+
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
116
|
+
};
|
|
105
117
|
}>> & {
|
|
106
118
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
107
119
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -110,6 +122,7 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
110
122
|
cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
111
123
|
emit: (event: "update:show" | "update:value" | "focus", ...args: any[]) => void;
|
|
112
124
|
emitValue: (value: string | import("../../../es/shared/types").AnyObject[]) => void;
|
|
125
|
+
clearableRef: import("vue").ComputedRef<number | boolean>;
|
|
113
126
|
onClear: () => void;
|
|
114
127
|
onClick: (evt: Event) => void;
|
|
115
128
|
onKeydown: (evt: KeyboardEvent) => void;
|
|
@@ -137,6 +150,7 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
137
150
|
changeCursorNode: (node: import("../../../es/shared/types").AnyObject) => void;
|
|
138
151
|
NInput: any;
|
|
139
152
|
NPopover: any;
|
|
153
|
+
ClearIcon: any;
|
|
140
154
|
SearchMenu: import("vue").DefineComponent<{
|
|
141
155
|
childKey: {
|
|
142
156
|
type: StringConstructor;
|
|
@@ -221,7 +235,7 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
221
235
|
default: () => never[];
|
|
222
236
|
};
|
|
223
237
|
search: {
|
|
224
|
-
type: import("vue").PropType<import("../../../es/shared/types").
|
|
238
|
+
type: import("vue").PropType<import("../../../es/shared/types").AnyFn<any[], any>>;
|
|
225
239
|
};
|
|
226
240
|
labelKey: {
|
|
227
241
|
type: StringConstructor;
|
|
@@ -243,6 +257,12 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
243
257
|
default: number;
|
|
244
258
|
};
|
|
245
259
|
disabled: BooleanConstructor;
|
|
260
|
+
inputProps: {
|
|
261
|
+
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
262
|
+
};
|
|
263
|
+
popperProps: {
|
|
264
|
+
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
265
|
+
};
|
|
246
266
|
}>> & {
|
|
247
267
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
248
268
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject,
|
|
1
|
+
import { AnyObject, AnyFn, Nullable } from '../../../../es/shared/types';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
3
|
declare type ValueType = string | AnyObject[];
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
|
@@ -30,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
30
|
default: () => never[];
|
|
31
31
|
};
|
|
32
32
|
search: {
|
|
33
|
-
type: PropType<
|
|
33
|
+
type: PropType<AnyFn<any[], any>>;
|
|
34
34
|
};
|
|
35
35
|
labelKey: {
|
|
36
36
|
type: StringConstructor;
|
|
@@ -52,6 +52,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
52
52
|
default: number;
|
|
53
53
|
};
|
|
54
54
|
disabled: BooleanConstructor;
|
|
55
|
+
inputProps: {
|
|
56
|
+
type: PropType<AnyObject>;
|
|
57
|
+
};
|
|
58
|
+
popperProps: {
|
|
59
|
+
type: PropType<AnyObject>;
|
|
60
|
+
};
|
|
55
61
|
}, {
|
|
56
62
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
57
63
|
value: {
|
|
@@ -82,7 +88,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
82
88
|
default: () => never[];
|
|
83
89
|
};
|
|
84
90
|
search: {
|
|
85
|
-
type: PropType<
|
|
91
|
+
type: PropType<AnyFn<any[], any>>;
|
|
86
92
|
};
|
|
87
93
|
labelKey: {
|
|
88
94
|
type: StringConstructor;
|
|
@@ -104,6 +110,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
104
110
|
default: number;
|
|
105
111
|
};
|
|
106
112
|
disabled: BooleanConstructor;
|
|
113
|
+
inputProps: {
|
|
114
|
+
type: PropType<AnyObject>;
|
|
115
|
+
};
|
|
116
|
+
popperProps: {
|
|
117
|
+
type: PropType<AnyObject>;
|
|
118
|
+
};
|
|
107
119
|
}>> & {
|
|
108
120
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
109
121
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -112,6 +124,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
112
124
|
cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
113
125
|
emit: (event: "update:show" | "update:value" | "focus", ...args: any[]) => void;
|
|
114
126
|
emitValue: (value: ValueType) => void;
|
|
127
|
+
clearableRef: import("vue").ComputedRef<number | boolean>;
|
|
115
128
|
onClear: () => void;
|
|
116
129
|
onClick: (evt: Event) => void;
|
|
117
130
|
onKeydown: (evt: KeyboardEvent) => void;
|
|
@@ -139,6 +152,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
139
152
|
changeCursorNode: (node: AnyObject) => void;
|
|
140
153
|
NInput: any;
|
|
141
154
|
NPopover: any;
|
|
155
|
+
ClearIcon: any;
|
|
142
156
|
SearchMenu: import("vue").DefineComponent<{
|
|
143
157
|
childKey: {
|
|
144
158
|
type: StringConstructor;
|
|
@@ -223,7 +237,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
223
237
|
default: () => never[];
|
|
224
238
|
};
|
|
225
239
|
search: {
|
|
226
|
-
type: PropType<
|
|
240
|
+
type: PropType<AnyFn<any[], any>>;
|
|
227
241
|
};
|
|
228
242
|
labelKey: {
|
|
229
243
|
type: StringConstructor;
|
|
@@ -245,6 +259,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
245
259
|
default: number;
|
|
246
260
|
};
|
|
247
261
|
disabled: BooleanConstructor;
|
|
262
|
+
inputProps: {
|
|
263
|
+
type: PropType<AnyObject>;
|
|
264
|
+
};
|
|
265
|
+
popperProps: {
|
|
266
|
+
type: PropType<AnyObject>;
|
|
267
|
+
};
|
|
248
268
|
}>> & {
|
|
249
269
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
250
270
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as a,provide as
|
|
1
|
+
import{defineComponent as e,computed as a,provide as t,ref as l,nextTick as o,watch as r,openBlock as u,createBlock as n,unref as s,mergeProps as i,isRef as d,withCtx as c,createElementVNode as v,createVNode as p,createCommentVNode as f,normalizeStyle as h,renderSlot as y}from"vue";import{useTheme as m}from"../../../shared/hooks/useTheme.js";import{useEventBus as b,useVModel as g,onClickOutside as k,useDebounceFn as w}from"@vueuse/core";import"date-fns";import{isArray as S,isString as C,isObject as K,isFunction as j}from"lodash-es";import{isPromise as P,NOOP as _}from"@vue/shared";import{uuidGenerator as N}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NPopover as x,NInput as A}from"naive-ui";import U from"./components/ClearIcon.vue.js";import{InjectionSearchCascaderCheckAbleLevel as W,InjectionKeyboardEventBus as B,InjectionSearchCascaderLoadingNode as F,InjectionSearchCascaderValue as I}from"./constants/index.js";import{SearchMenu as L}from"./components/SearchMenu.js";const T={style:{width:"100%"}},V=["id"];var E=e({__name:"SearchCascader",props:{value:{type:[String,Array]},show:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},childKey:{type:String,default:"children"},placeholder:{type:String,default:"请选择"},editPlaceholder:{type:String,default:"请输入关键字进行搜索"},options:{type:Array,default:()=>[]},search:{type:Function},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},checkAbleLevel:{type:[Number,String],default:"last"},beforeSetValue:{type:Function},menuWidth:{type:[Number,String],default:150},disabled:Boolean,inputProps:{type:Object},popperProps:{type:Object}},emits:["update:value","focus","update:show"],setup(e,{expose:E,emit:O}){const R=e,$=m();const H=a((()=>R.clearable&&(S(R.value)?R.value.length:!!R.value)));function M(){!function(e){if(!j(R.beforeSetValue))return O("update:value",e);const a=R.beforeSetValue(e);P(a)?a.then((e=>O("update:value",e)),_):O("update:value",a)}([])}function q(e){var a;"INPUT"===(null==(a=e.target)?void 0:a.tagName)&&ae()}const z=e=>{var a;"INPUT"!==(null==(a=e.target)?void 0:a.tagName)||"Enter"!==e.code||Q.value?G.emit(e.key,e):ae()},D=a((()=>({"--menu-width":R.menuWidth}))),G=b("cascaderKeydown"),J=N(),Q=g(R,"show",O);t(W,a((()=>R.checkAbleLevel))),t(B,G);const X=l(""),Y=a((()=>C(R.value)&&R.value?R.value:S(R.value)&&R.value.length?R.value.map((e=>K(e)?e[R.labelKey]:e)).join(" / "):R.editPlaceholder)),Z=a({get:()=>Q.value?X.value:C(R.value)?R.value:S(R.value)?R.value.reduce(((e,a,t)=>0===t?a[R.labelKey]:e+" / "+a[R.labelKey]),""):"",set(e){X.value=e,se(void 0,e)}});function ee(e){O("focus",e)}function ae(){Q.value||R.disabled||(Q.value=!0,X.value="",se())}async function te(){var e;Q.value=!1,null==(e=le.value)||e.blur()}const le=l();k(le,(e=>{var a;if(!Q.value)return;const t=e;if(!t.target)return te();!function(e){let a=!1,t=e;for(;t;){if(t.id===J){a=!0;break}t=t.parentElement}return a}(t.target)?te():null==(a=le.value)||a.focus()}));const oe=l(),re=l(),ue=l(),ne=l(null);t(F,ne),t(I,a((()=>R.value)));const se=w((async(e,a)=>{var t;const{type:l,node:r}=e||{};try{if("update"===l)return void(j(R.search)&&R.search({...r,isLeaf:!0}));ne.value=r;const e=await(j(R.search)&&R.search(r,a));re.value=K(e)||S(e)?e:r}finally{ne.value=null,await o(),null==(t=oe.value)||t.syncPosition()}}),400),ie=e=>{ue.value=e};return r((()=>R.show),(e=>{e&&(ue.value={})})),E({getWidth(){var e;if(!le.value)return 0;const a=null==(e=le.value)?void 0:e.$el;return a?a.clientWidth:void 0},setCursor(e){ue.value=e}}),(a,t)=>(u(),n(s(x),i({class:"search-cascader",trigger:"manual",show:s(Q),"onUpdate:show":t[1]||(t[1]=e=>d(Q)?Q.value=e:null),"show-arrow":!1,placement:"bottom-start",style:s(D),disabled:e.disabled,width:e.options.length?void 0:"trigger",ref_key:"popoverRef",ref:oe},e.popperProps),{trigger:c((()=>[v("div",T,[p(s(A),i({disabled:e.disabled,class:{"search-cascader__input":!e.disabled},placeholder:s(Q)?s(Y):e.placeholder,clearable:!1,value:s(Z),"onUpdate:value":t[0]||(t[0]=e=>d(Z)?Z.value=e:null),ref_key:"inputRef",ref:le,onFocus:ee,onClick:q,onKeydown:z},e.inputProps),{suffix:c((()=>[s(H)?(u(),n(U,{key:0,onClick:M})):f("v-if",!0)])),_:1},16,["disabled","class","placeholder","value"])])])),default:c((()=>[v("section",{id:s(J)},[p(s(L),{style:h(s($)),"label-key":e.labelKey,"value-key":e.valueKey,options:e.options,onNodeClick:s(se),onChangeCursor:ie,"current-node":re.value,"cursor-node":ue.value},{empty:c((()=>[y(a.$slots,"empty")])),_:3},8,["style","label-key","value-key","options","onNodeClick","current-node","cursor-node"])],8,V)])),_:3},16,["show","style","disabled","width"]))}});export{E as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{openBlock as r,createElementBlock as e,createElementVNode as o}from"vue";import L from"../../../../_virtual/_plugin-vue_export-helper.js";const l={},n={viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",style:{width:"15px",color:"var(--n-clear-color)",cursor:"pointer"}},t=[o("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[o("g",{fill:"currentColor","fill-rule":"nonzero"},[o("path",{d:"M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z"})])],-1)];var i=L(l,[["render",function(o,L){return r(),e("svg",n,t)}],["__file","ClearIcon.vue"]]);export{i 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};
|