cnhis-design-vue 3.1.42-beta.1 → 3.1.42-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.
Files changed (142) hide show
  1. package/README.md +87 -87
  2. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
  3. package/es/components/base-search/index.d.ts +0 -22
  4. package/es/components/base-search/src/index.vue.d.ts +0 -22
  5. package/es/components/base-search/src/index.vue.js +1 -1
  6. package/es/components/base-search/style/index.css +1 -1
  7. package/es/components/big-table/index.d.ts +3 -4
  8. package/es/components/big-table/src/BigTable.vue.d.ts +3 -4
  9. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  10. package/es/components/big-table/style/index.css +1 -1
  11. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  12. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  13. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  14. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  15. package/es/components/button-print/index.d.ts +4 -4
  16. package/es/components/button-print/src/ButtonPrint.vue.d.ts +4 -4
  17. package/es/components/button-print/src/components/EditFormat.vue.d.ts +4 -4
  18. package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +4 -4
  19. package/es/components/classification/src/index.vue.js +1 -1
  20. package/es/components/date-picker/index.d.ts +5 -13
  21. package/es/components/date-picker/src/DatePicker.vue.d.ts +5 -13
  22. package/es/components/date-picker/src/DatePicker.vue.js +1 -1
  23. package/es/components/fabric-chart/index.d.ts +2 -2
  24. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
  25. package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
  26. package/es/components/field-set/index.d.ts +84 -15
  27. package/es/components/field-set/src/FieldSet.vue.d.ts +80 -29
  28. package/es/components/field-set/src/types/index.d.ts +18 -0
  29. package/es/components/field-set/src/types/index.js +1 -0
  30. package/es/components/form-config/index.d.ts +24 -24
  31. package/es/components/form-config/src/FormConfig.vue.d.ts +24 -24
  32. package/es/components/form-config/src/FormConfig.vue.js +1 -1
  33. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +12 -12
  34. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +12 -12
  35. package/es/components/form-render/index.d.ts +12 -12
  36. package/es/components/form-render/index.js +1 -1
  37. package/es/components/form-render/src/FormRender.vue.d.ts +12 -12
  38. package/es/components/form-render/src/FormRender.vue.js +1 -1
  39. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +12 -12
  40. package/es/components/form-render/src/components/renderer/complex.d.ts +1 -1
  41. package/es/components/form-render/src/components/renderer/date.js +1 -1
  42. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -1
  43. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -1
  44. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +2 -2
  45. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  46. package/es/components/form-render/src/components/renderer/select.js +1 -1
  47. package/es/components/form-render/src/hooks/index.d.ts +1 -1
  48. package/es/components/form-render/src/hooks/index.js +1 -1
  49. package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +16 -0
  50. package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -0
  51. package/es/components/form-render/src/hooks/useFormContext.js +1 -1
  52. package/es/components/form-render/src/types/index.d.ts +2 -1
  53. package/es/components/iho-table/index.d.ts +1523 -0
  54. package/es/components/iho-table/src/IhoTable.vue.d.ts +1523 -0
  55. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  56. package/es/components/iho-table/src/constants/index.d.ts +2 -1
  57. package/es/components/iho-table/src/constants/index.js +1 -1
  58. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -1
  59. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
  60. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +3 -1
  61. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
  62. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
  63. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  64. package/es/components/iho-table/src/plugins/index.js +1 -1
  65. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
  66. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +5 -13
  67. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  68. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  69. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +1 -1
  70. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
  71. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +4 -10
  72. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.d.ts +1 -0
  73. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -0
  74. package/es/components/iho-table/src/types/index.d.ts +1 -0
  75. package/es/components/iho-table/src/types/pluginType.d.ts +3 -1
  76. package/es/components/iho-table/src/utils/index.d.ts +1 -0
  77. package/es/components/iho-table/src/utils/index.js +1 -1
  78. package/es/components/iho-table/style/index.css +1 -1
  79. package/es/components/index.css +1 -1
  80. package/es/components/index.d.ts +1 -0
  81. package/es/components/index.js +1 -1
  82. package/es/components/info-header/index.d.ts +28 -28
  83. package/es/components/info-header/src/InfoHeader.vue.d.ts +28 -28
  84. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +3 -3
  85. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +3 -3
  86. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.d.ts +2 -2
  87. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.d.ts +1 -1
  88. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +15 -15
  89. package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -1
  90. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +12 -12
  91. package/es/components/info-header/style/index.css +1 -1
  92. package/es/components/keyboard/index.d.ts +1 -1
  93. package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
  94. package/es/components/keyboard/src/Keyboard.vue.js +1 -1
  95. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  96. package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
  97. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  98. package/es/components/select-person/index.d.ts +1 -1
  99. package/es/components/select-person/src/SelectPerson.vue.d.ts +1 -1
  100. package/es/components/shortcut-setter/index.d.ts +12 -12
  101. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +12 -12
  102. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
  103. package/es/components/table-filter/index.d.ts +0 -1
  104. package/es/components/table-filter/index.js +1 -1
  105. package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
  106. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +1 -1
  107. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +1 -1
  108. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  109. package/es/components/table-filter/src/hooks/useMixins.js +1 -1
  110. package/es/components/table-filter/src/tool/baseOptions.d.ts +0 -10
  111. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  112. package/es/components/table-filter/src/tool/generateDefOptions.d.ts +0 -7
  113. package/es/components/table-filter/src/tool/generateDefOptions.js +1 -1
  114. package/es/components/table-filter/src/types/index.d.ts +0 -74
  115. package/es/components/time-picker/index.d.ts +4 -10
  116. package/es/components/time-picker/src/TimePicker.vue.d.ts +4 -10
  117. package/es/components/time-picker/src/TimePicker.vue.js +1 -1
  118. package/es/env.d.ts +24 -24
  119. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  120. package/es/shared/hooks/index.d.ts +3 -0
  121. package/es/shared/hooks/index.js +1 -0
  122. package/es/{components/form-render/src → shared}/hooks/useAsyncQueue.d.ts +0 -14
  123. package/es/shared/hooks/useAsyncQueue.js +1 -0
  124. package/es/shared/hooks/useDateTime.d.ts +6 -0
  125. package/es/shared/hooks/useDateTime.js +1 -0
  126. package/es/shared/utils/tapable/index.d.ts +139 -0
  127. package/package.json +2 -2
  128. package/es/components/base-search/src/directive/resize.d.ts +0 -4
  129. package/es/components/base-search/src/directive/resize.js +0 -1
  130. package/es/components/base-search/src/tool/resizeSensor.d.ts +0 -16
  131. package/es/components/base-search/src/tool/resizeSensor.js +0 -1
  132. package/es/components/form-render/src/hooks/useAsyncQueue.js +0 -1
  133. package/es/components/table-filter/src/hooks/export.d.ts +0 -1
  134. package/es/components/table-filter/src/hooks/export.js +0 -1
  135. package/es/components/table-filter/src/tool/getWidgetType.d.ts +0 -1
  136. package/es/components/table-filter/src/tool/getWidgetType.js +0 -1
  137. package/es/shared/mixins/index.d.ts +0 -1
  138. package/es/shared/mixins/index.js +0 -1
  139. package/es/shared/utils/colorLog.d.ts +0 -31
  140. package/es/shared/utils/colorLog.js +0 -1
  141. /package/es/shared/{mixins → hooks}/useTheme.d.ts +0 -0
  142. /package/es/shared/{mixins → hooks}/useTheme.js +0 -0
@@ -313,7 +313,7 @@ declare const _default: import("vue").DefineComponent<{
313
313
  onScroll?: ((...args: any[]) => any) | undefined;
314
314
  onAnnotationChange?: ((...args: any[]) => any) | undefined;
315
315
  }>>;
316
- emit: (event: "scroll" | "formChange" | "annotationChange", ...args: any[]) => void;
316
+ emit: (event: "formChange" | "scroll" | "annotationChange", ...args: any[]) => void;
317
317
  nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
318
318
  formRenderRef: import("vue").Ref<HTMLElement | undefined>;
319
319
  formHeight: import("vue").ComputedRef<string>;
@@ -469,32 +469,32 @@ declare const _default: import("vue").DefineComponent<{
469
469
  data: any;
470
470
  loading: boolean;
471
471
  required: boolean;
472
- hidden: boolean;
473
- visible: boolean;
474
- content: any;
475
- reset: (options?: import("../../../../../../es/components/form-render").IFieldResetOptions | undefined) => Promise<void>;
476
- active: boolean;
477
- disabled: boolean;
478
- display: import("../../../../../../es/components/form-render").FieldDisplayTypes;
479
472
  value: string;
480
473
  readonly index: string | number;
474
+ disabled: boolean;
481
475
  onFocus: (...args: any[]) => Promise<void>;
482
476
  onBlur: (...args: any[]) => Promise<void>;
483
477
  onInput: (...args: any[]) => Promise<void>;
478
+ reset: (options?: import("../../../../../../es/components/form-render").IFieldResetOptions | undefined) => Promise<void>;
479
+ visible: boolean;
484
480
  submit: <T>(onSubmit?: ((values: any) => void | Promise<T>) | undefined) => Promise<T>;
485
481
  validator: import("../../../../../../es/components/form-render").FieldValidator;
486
482
  pattern: import("../../../../../../es/components/form-render").FieldPatternTypes;
487
483
  title: string;
488
484
  form: import("../../../../../../es/components/form-render").Form<any>;
485
+ content: any;
489
486
  componentProps: Record<string, any>;
490
487
  decoratorProps: Record<string, any>;
488
+ display: import("../../../../../../es/components/form-render").FieldDisplayTypes;
491
489
  description: string;
492
490
  readOnly: boolean;
493
491
  editable: boolean;
492
+ hidden: boolean;
494
493
  component: import("../../../../../../es/components/form-render").FieldComponent<any, any>;
495
494
  decorator: import("../../../../../../es/components/form-render").FieldDecorator<any, any>;
496
495
  validating: boolean;
497
496
  submitting: boolean;
497
+ active: boolean;
498
498
  visited: boolean;
499
499
  selfModified: boolean;
500
500
  modified: boolean;
@@ -581,7 +581,7 @@ declare const _default: import("vue").DefineComponent<{
581
581
  };
582
582
  readonly disabled: BooleanConstructor;
583
583
  readonly displayDirective: {
584
- readonly type: import("vue").PropType<"show" | "if" | "show:lazy">;
584
+ readonly type: import("vue").PropType<"if" | "show" | "show:lazy">;
585
585
  readonly default: "if";
586
586
  };
587
587
  readonly closable: {
@@ -606,7 +606,7 @@ declare const _default: import("vue").DefineComponent<{
606
606
  };
607
607
  readonly disabled: BooleanConstructor;
608
608
  readonly displayDirective: {
609
- readonly type: import("vue").PropType<"show" | "if" | "show:lazy">;
609
+ readonly type: import("vue").PropType<"if" | "show" | "show:lazy">;
610
610
  readonly default: "if";
611
611
  };
612
612
  readonly closable: {
@@ -620,10 +620,10 @@ declare const _default: import("vue").DefineComponent<{
620
620
  }>>, {
621
621
  readonly disabled: boolean;
622
622
  readonly closable: boolean | undefined;
623
- readonly displayDirective: "show" | "if" | "show:lazy";
623
+ readonly displayDirective: "if" | "show" | "show:lazy";
624
624
  }>;
625
625
  NTabs: any;
626
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
626
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "scroll" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
627
627
  fieldList: {
628
628
  type: import("vue").PropType<FieldItem[]>;
629
629
  };
@@ -1 +1 @@
1
- .c-info-header{align-items:center;background:#fff;box-shadow:0 2px 4px 0 hsla(0,0%,69%,.46);display:flex;gap:18px;height:calc((var(--row-height)*var(--row-num) + var(--padding-tb)*2)*1px);justify-content:space-between;padding:calc(var(--padding-tb)*1px) 16px}@font-face{font-family:iconfont;src:url(iconfont.ttf) format("truetype")}.c-info-header .iconfont{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:iconfont!important;font-size:16px;font-style:normal}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia:before{content:"\c1003"}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantoushang:before{content:"\c1004"}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaoshezhi:before{content:"\c1005"}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaobianji:before{content:"\c1006"}.c-info-header .info-header--icon-guanbi-yanjing:before{content:"\c1001"}.c-info-header .info-header--icon-faxian-yanjing:before{content:"\c1002"}.c-info-header__divider{align-self:stretch;background:#d5d5d566;width:1px}.c-info-header__patient{align-items:center;display:flex;flex-wrap:nowrap;gap:12px;margin-right:34px}.c-info-header__patientHeader,.c-info-header__patientHeaderWrapper{align-items:center;display:flex;gap:6px}.c-info-header__patientHeaderWrapper{border-bottom:1px solid transparent}.c-info-header__patientHeaderWrapper.in-edit{border-bottom:1px solid rgba(0,0,0,.6)}.c-info-header__patientHeader--name{font-size:20px;font-weight:700;margin-right:6px}.c-info-header__patientHeader .n-tag{border-radius:2px;height:20px}.c-info-header__patientHeader .n-tag .n-tag__content{font-size:12px}.c-info-header__info{display:flex;flex:1;flex-wrap:wrap;font-size:14px;justify-content:flex-start;width:100%}.c-info-header__infoWrapper{box-sizing:border-box;height:calc((var(--row-height)*var(--row-num))*1px);max-height:calc((var(--row-height)*var(--row-num))*1px)}.c-info-header__info td{text-align:left}.c-info-header__info .n-descriptions-table-content{height:calc(var(--row-height)*1px);max-width:calc(var(--column-width)*1px);overflow-y:hidden;padding:0!important;vertical-align:middle!important}.c-info-header__info .n-descriptions-table-content__label{color:rgba(0,0,0,.6);display:inline-block}.c-info-header__setting{align-self:flex-start;display:flex;gap:8px}.c-info-header__settingIcon{align-items:center;cursor:pointer;display:inline-flex}.c-info-header__setting .iconfont{color:#000;display:inline-block;font-size:20px;transition:all .2s ease-in-out}.c-info-header.is-compact [compact-hidden]{display:none!important}.c-info-header.is-compact .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia{transform:rotate(0deg)}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia{transform:rotate(180deg)}.c-info-header__hidden{align-items:center;display:inline-flex;font-size:14px;gap:8px;vertical-align:middle}.c-info-header__hidden--icon{color:inherit!important;cursor:pointer;font-size:14px;text-decoration:none!important}.c-info-header .n-form-item-blank>.n-input .n-input-wrapper{border-bottom:1px solid var(--n-text-color)}.c-info-header .n-base-selection,.c-info-header .n-base-selection-label,.c-info-header .n-date-picker,.c-info-header .n-input,.c-info-header .n-input-wrapper{max-height:18px;min-height:18px;vertical-align:top}.c-info-header .n-base-selection input,.c-info-header .n-base-selection-label input,.c-info-header .n-date-picker input,.c-info-header .n-input input,.c-info-header .n-input-wrapper input{max-height:18px;min-height:18px}.c-info-header .n-select{line-height:1}
1
+ .c-info-header{align-items:center;background:#fff;box-shadow:0 2px 4px 0 hsla(0,0%,69%,.46);display:flex;gap:18px;height:calc((var(--row-height)*var(--row-num) + var(--padding-tb)*2)*1px);justify-content:space-between;padding:calc(var(--padding-tb)*1px) 16px}@font-face{font-family:iconfont;src:url(iconfont.ttf) format("truetype")}.c-info-header .iconfont{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:iconfont!important;font-size:16px;font-style:normal}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia:before{content:"\c1003"}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantoushang:before{content:"\c1004"}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaoshezhi:before{content:"\c1005"}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaobianji:before{content:"\c1006"}.c-info-header .info-header--icon-guanbi-yanjing:before{content:"\c1001"}.c-info-header .info-header--icon-faxian-yanjing:before{content:"\c1002"}.c-info-header__divider{align-self:stretch;background:#d5d5d566;width:1px}.c-info-header__patient{align-items:center;display:flex;flex-wrap:nowrap;gap:12px;margin-right:34px}.c-info-header__patientHeader,.c-info-header__patientHeaderWrapper{align-items:center;display:flex;gap:6px}.c-info-header__patientHeaderWrapper{border-bottom:1px solid transparent}.c-info-header__patientHeaderWrapper.in-edit{border-bottom:1px solid rgba(0,0,0,.6)}.c-info-header__patientHeader--name{font-size:20px;font-weight:700;margin-right:6px}.c-info-header__patientHeader .n-tag{border-radius:2px;height:20px}.c-info-header__patientHeader .n-tag .n-tag__content{font-size:12px}.c-info-header__info{display:flex;flex:1;flex-wrap:wrap;font-size:14px;justify-content:flex-start;width:100%}.c-info-header__infoWrapper{box-sizing:border-box;height:calc((var(--row-height)*var(--row-num))*1px);max-height:calc((var(--row-height)*var(--row-num))*1px)}.c-info-header__info td{text-align:left}.c-info-header__info .n-descriptions-table-content{height:calc(var(--row-height)*1px);max-width:calc(var(--column-width)*1px);overflow-y:hidden;padding:0!important;vertical-align:middle!important}.c-info-header__info .n-descriptions-table-content__label{color:rgba(0,0,0,.6);display:inline-block}.c-info-header__setting{align-self:flex-start;display:flex;gap:8px}.c-info-header__settingIcon{align-items:center;cursor:pointer;display:inline-flex}.c-info-header__setting .iconfont{color:#000;display:inline-block;font-size:20px;transition:all .2s ease-in-out}.c-info-header.is-compact [compact-hidden]{display:none!important}.c-info-header.is-compact .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia{transform:rotate(0deg)}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia{transform:rotate(180deg)}.c-info-header__hidden{align-items:center;display:inline-flex;font-size:14px;gap:8px;vertical-align:middle}.c-info-header__hidden--icon{color:inherit!important;cursor:pointer;font-size:14px;text-decoration:none!important}.c-info-header__formRender .n-form-item-blank>.n-input .n-input-wrapper{border-bottom:1px solid var(--n-text-color)}.c-info-header__formRender .n-base-selection,.c-info-header__formRender .n-base-selection-label,.c-info-header__formRender .n-date-picker,.c-info-header__formRender .n-input,.c-info-header__formRender .n-input-wrapper{max-height:18px;min-height:18px;vertical-align:top}.c-info-header__formRender .n-base-selection input,.c-info-header__formRender .n-base-selection-label input,.c-info-header__formRender .n-date-picker input,.c-info-header__formRender .n-input input,.c-info-header__formRender .n-input-wrapper input{max-height:18px;min-height:18px}.c-info-header__formRender .n-select{line-height:1}
@@ -332,8 +332,8 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
332
332
  onChange?: ((...args: any[]) => any) | undefined;
333
333
  onKeydown?: ((...args: any[]) => any) | undefined;
334
334
  }, {
335
- drag: boolean;
336
335
  mode: "number" | "day" | "dose" | "english";
336
+ drag: boolean;
337
337
  positionInitialValue: import("@vueuse/core").Position;
338
338
  panel: boolean;
339
339
  moveOffset: import("@vueuse/core").Position;
@@ -333,8 +333,8 @@ declare const _default: import("vue").DefineComponent<{
333
333
  onChange?: ((...args: any[]) => any) | undefined;
334
334
  onKeydown?: ((...args: any[]) => any) | undefined;
335
335
  }, {
336
- drag: boolean;
337
336
  mode: "number" | "day" | "dose" | "english";
337
+ drag: boolean;
338
338
  positionInitialValue: Position;
339
339
  panel: boolean;
340
340
  moveOffset: Position;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,provide as t,computed as o,unref as n,openBlock as a,createBlock as u,normalizeStyle as i,withCtx as r,createVNode as s,mergeProps as d,createElementBlock as f,normalizeClass as c,createElementVNode as p,Fragment as m,renderList as v,createCommentVNode as y,createTextVNode as g,toDisplayString as h}from"vue";import{NPopover as k,NInputNumber as b,NSpace as w,NIcon as V}from"naive-ui";import{Close as x,GitCompareOutline as _,ArrowUndoSharp as O}from"@vicons/ionicons5";import S from"./components/NumberPanel.vue.js";import{useDraggable as j}from"@vueuse/core";import{useTheme as C}from"../../../shared/mixins/useTheme.js";import{defaultCssVars as I}from"./constants/index.js";import D from"../../../_virtual/plugin-vue_export-helper.js";const K=p("span",null,"键盘",-1),N={class:"keys"},R=["onClick"];var U=D(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:D,emit:U}){const B=e,E="QWERTYUIOPASDFGHJKLZXCVBNM.",F=["Switch"," ","Undo","Enter"],J=E.split("").concat(F),M=E.split(".")[0].split("").sort().concat(["."],F),P=C(I,"Keyboard");let Q=l(Date.now());t("toSelectInputContent",Q);const T=o((()=>"english"===B.mode)),$=o((()=>({mode:B.mode,defaultValue:B.defaultValue,value:B.value,positionInitialValue:B.positionInitialValue,moveOffset:B.moveOffset,drag:B.drag,onChange:q}))),A=o((()=>`${JSON.stringify(P.value).replace(/\{|\}|\"/g,"").replace(/,/g,";")};${(null==Y?void 0:Y.value)||""}`)),G=l(J.slice()),H=l(null),L=l(null),W=l(null),X=l(),Y=function(){B.defaultValue&&(X.value=B.defaultValue);if(T.value&&B.drag){const{x:e,y:l,style:t}=j(L,{initialValue:B.positionInitialValue,preventDefault:!0,handle:W,onMove:(e,l)=>{var t,o,n,a;e.x+=null!=(o=null==(t=B.moveOffset)?void 0:t.x)?o:0,e.y+=null!=(a=null==(n=B.moveOffset)?void 0:n.y)?a:0}});return t}}();function Z(e){"Switch"!==e?U("keydown",e):G.value="Q"===G.value[0]?M.slice():J.slice()}function q(e){var l,t;null==(t=null==(l=H.value)?void 0:l.setShow)||t.call(l,!1),X.value=e,U("change",e)}return D({select:function(){Q.value=Date.now()}}),(l,t)=>n(T)||e.panel?!n(T)&&e.panel?(a(),u(S,d({key:1},n($),{style:n(P)}),null,16,["style"])):(a(),f("div",{key:2,class:c(["c-keyboard-english",{isFixed:e.drag}]),ref_key:"englishKeyboardRef",ref:L,style:i(n(A))},[s(n(w),{"wrap-item":!1,align:"center",justify:"space-between",ref_key:"keyboardDragRef",ref:W,style:i({cursor:e.drag?"move":"default"})},{default:r((()=>[K,s(n(V),{onClick:t[1]||(t[1]=e=>Z("close")),component:n(x)},null,8,["component"])])),_:1},8,["style"]),p("div",N,[(a(!0),f(m,null,v(G.value,((e,l)=>(a(),f("span",{key:e,class:c(["key"+l]),onClick:l=>Z(e)},["Switch"===e?(a(),u(n(V),{key:0,component:n(_)},null,8,["component"])):y("v-if",!0),"Undo"===e?(a(),u(n(V),{key:1,component:n(O)},null,8,["component"])):y("v-if",!0),g(" "+h(F.includes(e)&&"Enter"!==e?""===e?"空格":"":e),1)],10,R)))),128))])],6)):(a(),u(n(k),{key:0,ref_key:"popoverRef",ref:H,trigger:"click","show-arrow":!1,placement:"bottom-start",style:i([{padding:"0"},n(P)]),"display-directive":"show"},{trigger:r((()=>[s(n(b),{value:X.value,"onUpdate:value":t[0]||(t[0]=e=>X.value=e),"show-button":!1},null,8,["value"])])),default:r((()=>[s(S,{mode:e.mode,defaultValue:e.defaultValue,onChange:q},null,8,["mode","defaultValue"])])),_:1},8,["style"]))}}),[["__file","Keyboard.vue"]]);export{U as default};
1
+ import{defineComponent as e,ref as l,provide as t,computed as o,unref as n,openBlock as a,createBlock as u,normalizeStyle as i,withCtx as s,createVNode as r,mergeProps as d,createElementBlock as f,normalizeClass as p,createElementVNode as c,Fragment as m,renderList as v,createCommentVNode as y,createTextVNode as g,toDisplayString as h}from"vue";import{NPopover as k,NInputNumber as b,NSpace as w,NIcon as V}from"naive-ui";import{Close as _,GitCompareOutline as x,ArrowUndoSharp as O}from"@vicons/ionicons5";import S from"./components/NumberPanel.vue.js";import{useDraggable as j}from"@vueuse/core";import{useTheme as C}from"../../../shared/hooks/useTheme.js";import"lodash-es";import{defaultCssVars as I}from"./constants/index.js";import D from"../../../_virtual/plugin-vue_export-helper.js";const K=c("span",null,"键盘",-1),N={class:"keys"},R=["onClick"];var U=D(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:D,emit:U}){const B=e,E="QWERTYUIOPASDFGHJKLZXCVBNM.",F=["Switch"," ","Undo","Enter"],J=E.split("").concat(F),M=E.split(".")[0].split("").sort().concat(["."],F),P=C(I,"Keyboard");let Q=l(Date.now());t("toSelectInputContent",Q);const T=o((()=>"english"===B.mode)),$=o((()=>({mode:B.mode,defaultValue:B.defaultValue,value:B.value,positionInitialValue:B.positionInitialValue,moveOffset:B.moveOffset,drag:B.drag,onChange:q}))),A=o((()=>`${JSON.stringify(P.value).replace(/\{|\}|\"/g,"").replace(/,/g,";")};${(null==Y?void 0:Y.value)||""}`)),G=l(J.slice()),H=l(null),L=l(null),W=l(null),X=l(),Y=function(){B.defaultValue&&(X.value=B.defaultValue);if(T.value&&B.drag){const{x:e,y:l,style:t}=j(L,{initialValue:B.positionInitialValue,preventDefault:!0,handle:W,onMove:(e,l)=>{var t,o,n,a;e.x+=null!=(o=null==(t=B.moveOffset)?void 0:t.x)?o:0,e.y+=null!=(a=null==(n=B.moveOffset)?void 0:n.y)?a:0}});return t}}();function Z(e){"Switch"!==e?U("keydown",e):G.value="Q"===G.value[0]?M.slice():J.slice()}function q(e){var l,t;null==(t=null==(l=H.value)?void 0:l.setShow)||t.call(l,!1),X.value=e,U("change",e)}return D({select:function(){Q.value=Date.now()}}),(l,t)=>n(T)||e.panel?!n(T)&&e.panel?(a(),u(S,d({key:1},n($),{style:n(P)}),null,16,["style"])):(a(),f("div",{key:2,class:p(["c-keyboard-english",{isFixed:e.drag}]),ref_key:"englishKeyboardRef",ref:L,style:i(n(A))},[r(n(w),{"wrap-item":!1,align:"center",justify:"space-between",ref_key:"keyboardDragRef",ref:W,style:i({cursor:e.drag?"move":"default"})},{default:s((()=>[K,r(n(V),{onClick:t[1]||(t[1]=e=>Z("close")),component:n(_)},null,8,["component"])])),_:1},8,["style"]),c("div",N,[(a(!0),f(m,null,v(G.value,((e,l)=>(a(),f("span",{key:e,class:p(["key"+l]),onClick:l=>Z(e)},["Switch"===e?(a(),u(n(V),{key:0,component:n(x)},null,8,["component"])):y("v-if",!0),"Undo"===e?(a(),u(n(V),{key:1,component:n(O)},null,8,["component"])):y("v-if",!0),g(" "+h(F.includes(e)&&"Enter"!==e?""===e?"空格":"":e),1)],10,R)))),128))])],6)):(a(),u(n(k),{key:0,ref_key:"popoverRef",ref:H,trigger:"click","show-arrow":!1,placement:"bottom-start",style:i([{padding:"0"},n(P)]),"display-directive":"show"},{trigger:s((()=>[r(n(b),{value:X.value,"onUpdate:value":t[0]||(t[0]=e=>X.value=e),"show-button":!1},null,8,["value"])])),default:s((()=>[r(S,{mode:e.mode,defaultValue:e.defaultValue,onChange:q},null,8,["mode","defaultValue"])])),_:1},8,["style"]))}}),[["__file","Keyboard.vue"]]);export{U as default};
@@ -1 +1 @@
1
- import{defineComponent as e,reactive as o,ref as a,watch as t,nextTick as i,openBlock as n,createElementBlock as s,normalizeClass as l,unref as r,createCommentVNode as u,Fragment as c,createBlock as m,mergeProps as v,createElementVNode as p,normalizeStyle as d,createVNode as f,withCtx as g,renderList as y,toDisplayString as k,createTextVNode as h,resolveDynamicComponent as C,h as w}from"vue";import b from"./hooks/use-noData.js";import{getScaleViewState as S}from"./hooks/scaleview-state.js";import E from"./hooks/scaleview-props.js";import{ScaleViewComputed as _}from"./hooks/scaleview-computed.js";import{ScaleViewInit as A}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{handleQueryParams as T,isCollection as D,isEvaluation as O}from"./utils/judge-types.js";import{useEvent as L}from"./hooks/use-event.js";import x from"./components/NoData.vue.js";import I from"../../../shared/components/SvgIcon/SvgIcon.vue.js";import P from"./components/EvaluateCountdown.vue.js";import N from"./components/EvaluatePage.vue.js";import q from"./components/AnswerParse.vue.js";import M from"./components/ScaleScore.js";import{useDialog as B,useMessage as R,NForm as V,NFormItem as F,NButton as K}from"naive-ui";import H from"../../../_virtual/plugin-vue_export-helper.js";const W=["innerHTML"],U={key:0,class:"required-text"},J={key:1,class:"evalute-label"},X=["onClick"],G={key:1,class:"footer"};var Q=H(e({__name:"ScaleView",props:E,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:E,emit:H}){const Q=e,{ScaleViewState:$}=S(),z=o($),Y=B(),Z=R(),ee=a(null),oe=a(null),{noDataState:ae,setNoData:te,resetNodata:ie}=b(),ne=T(),{showEvatip:se,isFormBoldOpen:le,scaleStyle:re,handlePageClass:ue,isShowItem:ce,handleShowQuestionNumber:me,hasScore:ve,isPreviewScale:pe,showEvaluateEntry:de,showEvaluateCoundownPage:fe,showSaveBtn:ge,showEvaluateLabel:ye,showAnswerParse:ke,propsConfig:he,evaluatePageProps:Ce,evaluateCountdownProps:we,skipCover:be,scaleEdit:Se}=_(Q,z,{query:ne}),{initForm:Ee}=A(Q,z,H,{query:ne}),{submitMethod:_e}=j(Q,z,H,{query:ne}),{nextLogicEvent:Ae,handleDynamicDataRelation:je}=L(Q,z);(()=>{let{id:e}=ne;e&&(z.shareId=e)})();const Te=e=>{try{ie(),Ee(e)}catch(e){console.log(e,"--error"),z.spinning=!1,z.hasFrontAddress=!1,te(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};t((()=>Q.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Te(e):e.guage_id&&Te(e)}),{immediate:!0}),t((()=>Q.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;z.form={},z.formArray=[];const o=JSON.parse(JSON.stringify(e));i((()=>{Ee(o)}))}),{immediate:!0});const De=e=>{z.showEvaluateSettingWrap=!1,z.showEvaluateCountdown=!!e,H("startWriteScale")},Oe=()=>{console.log("----closeEvaluateCountdown"),z.showEvaluateCountdown=!1,pe.value||(z.banSubmit=!0,_e(),Y.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:"确定",onPositiveClick:()=>{}}))},Le=e=>{Y.warning({title:"提示",content:()=>w("div",{class:"evatip-container"},[w("span","答案解析:"),w("p",e)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})},xe=(e,o,a)=>{console.log(e,"--val");let{choiceObj:t,isSetObj:i}=a||{};switch(o.type.includes("SELECT")||(z.form[o.val_key]=e),o.type){case"SELECT":case"EVALUATE_SELECT":let{value:a,list:n=[]}=e;z.form[o.val_key]=a,Ae(e,o,z.formArray),je(n,o,z.formArray);break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":i&&(z.choiceComObj[o.val_key]=t),Ae(e,o,z.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":Ae(e,o,z.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":z.submitForm[o.val_key]=e}},Ie=(e,o)=>{console.log(o),z.form[o.val_key]=e},Pe=e=>{if(!e||!e.length)return{labelStr:"",labels:[]};const o=e||[],a=[],t=[];return o.forEach((e=>{t.push(e),a.push(e.labelName)})),z.labelSelectedList=o,{labelStr:a.join(","),labels:t}},Ne=()=>{var e;if(!z.formArray.find((e=>O(e.type))))return void qe("确认要提交吗?");let{evaluateResultSetting:o}=z.config;if(!o||!Object.keys(o).length&&!de.value||Se.value)return void qe("确认要结束测评吗?");if("formIframe"==Q.openType&&de.value)return void H("submitNoRequest");let a="确定要提前结束测评吗?";if(fe.value&&(null==(e=ee.value)?void 0:e.getCountdownObj)){const e=ee.value.getCountdownObj(),{setAnswered:o,totalLen:t}=e;o<t?a="存在未作答的题目,确定要提前结束测评吗?":!(null==z?void 0:z.showEvaluateCountdown)&&(a="确认要结束测评吗?")}qe(a)},qe=e=>{Y.warning({title:"温馨提示",content:()=>w("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:()=>{Me()},onNegativeClick(){}})},Me=()=>{var e;null==(e=oe.value)||e.validate((e=>{var o;if(e){console.log(e);let a=(null==(o=e[0])?void 0:o[0])||{},t=a.field,i=a.message,n=z.formArray.find((e=>e.databaseTitle===t));return n&&(t=n.title),Z.error(t+i),!1}_e()}))},Be=()=>{H("onCloseSetting")};return E({getScaleData:()=>({...z}),onSubmit:Ne,cancel:Be}),(e,o)=>(n(),s("div",{class:l(["c-scale",{"c-scale-nobtn":r(ge)}])},[u(' <template v-if="state.spinning">\r\n <n-spin :show="state.spinning" description="加载中"></n-spin>\r\n </template> '),z.spinning||z.hasFrontAddress?u("v-if",!0):(n(),s(c,{key:0},[r(ae).noData?(n(),m(x,{key:0,noDataImg:r(ae).noDataImg,noDataTip:r(ae).noDataTip},null,8,["noDataImg","noDataTip"])):(n(),s(c,{key:1},[r(de)&&!r(be)?(n(),m(N,v({key:0},r(Ce),{onWriteGuage:De}),null,16)):(n(),s(c,{key:1},[r(fe)?(n(),m(P,v({key:0,ref_key:"countdownDom",ref:ee},r(we),{onCloseEvaluateCountdown:Oe}),null,16)):u("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(ue),"scale-container-hasfooter":r(ge)}]),style:d(r(re))},[r(ve)?(n(),m(r(M),{key:0,config:z.config,maxScore:z.maxScore},null,8,["config","maxScore"])):u("v-if",!0),f(r(V),{ref_key:"formRef",ref:oe,model:z.form,rules:z.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(n(!0),s(c,null,y(z.formArray,((e,o)=>(n(),s(c,{key:(e.id||e.seq)+o},[r(ce)(e)?(n(),m(r(F),{key:0,path:e.val_key,"show-label":!r(D)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(le)(e)}),innerHTML:r(me)(e)},null,10,W),r(le)(e)?(n(),s("span",U,"(必填)")):u("v-if",!0),r(ye)(e)?(n(),s("span",J,k(r(ye)(e)),1)):u("v-if",!0),r(se)(e)?(n(),s("span",{key:2,class:"evalute-tip",onClick:o=>(async e=>{var o;if(z.evatipMap[e.id])return void Le(z.evatipMap[e.id]);let a="getSubjectAnswer";const t=(null==(o=Q.scaleApiConfig)?void 0:o[a])||null;if(!t||"function"!=typeof t)return void Z.error(`${a} Is not a function`);let i=await t(e.id);i&&(z.evatipMap[e.id]||(z.evatipMap[e.id]=i,Le(i)))})(e)},[f(r(I),{"icon-class":"a-xitongtubiaotishi"}),h(" 查看提示 ")],8,X)):u("v-if",!0)])),default:g((()=>[(n(),m(C(e.renderCom),v(r(he)(e,o),{key:(e.id||e.seq)+o,onScaleChange:xe,onOnChange:o=>((e,o)=>{z.form[o.val_key]=Pe(e)})(o,e),onVodFileList:Ie}),null,16,["onOnChange"])),r(ke)(e)?(n(),m(q,{key:0,item:e},null,8,["item"])):u("v-if",!0)])),_:2},1032,["path","show-label"])):u("v-if",!0)],64)))),128))])),_:1},8,["model","rules"])],6),r(ge)?(n(),s("div",G,[u(" 分享的链接 隐藏取消按钮 "),"guage"!==Q.sourceType?(n(),m(r(K),{key:0,onClick:Be},{default:g((()=>[h("取消")])),_:1})):u("v-if",!0),Q.isLock?u("v-if",!0):(n(),m(r(K),{key:1,onClick:Ne,disabled:z.banSubmit,type:"primary"},{default:g((()=>[h("保存")])),_:1},8,["disabled"]))])):u("v-if",!0)],64))],64))],64))],2))}}),[["__file","ScaleView.vue"]]);export{Q as default};
1
+ import{defineComponent as e,reactive as o,ref as a,watch as t,nextTick as i,openBlock as n,createElementBlock as s,normalizeClass as l,unref as r,createCommentVNode as u,Fragment as c,createBlock as m,mergeProps as v,createElementVNode as p,normalizeStyle as d,createVNode as f,withCtx as g,renderList as y,toDisplayString as k,createTextVNode as h,resolveDynamicComponent as C,h as w}from"vue";import b from"./hooks/use-noData.js";import{getScaleViewState as S}from"./hooks/scaleview-state.js";import E from"./hooks/scaleview-props.js";import{ScaleViewComputed as _}from"./hooks/scaleview-computed.js";import{ScaleViewInit as A}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{handleQueryParams as T,isCollection as D,isEvaluation as O}from"./utils/judge-types.js";import{useEvent as L}from"./hooks/use-event.js";import x from"./components/NoData.vue.js";import I from"../../../shared/components/SvgIcon/SvgIcon.vue.js";import P from"./components/EvaluateCountdown.vue.js";import N from"./components/EvaluatePage.vue.js";import q from"./components/AnswerParse.vue.js";import M from"./components/ScaleScore.js";import{useDialog as B,useMessage as R,NForm as V,NFormItem as F,NButton as K}from"naive-ui";import H from"../../../_virtual/plugin-vue_export-helper.js";const W=["innerHTML"],U={key:0,class:"required-text"},J={key:1,class:"evalute-label"},X=["onClick"],G={key:1,class:"footer"};var Q=H(e({__name:"ScaleView",props:E,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:E,emit:H}){const Q=e,{ScaleViewState:$}=S(),z=o($),Y=B(),Z=R(),ee=a(null),oe=a(null),{noDataState:ae,setNoData:te,resetNodata:ie}=b(),ne=T(),{showEvatip:se,isFormBoldOpen:le,scaleStyle:re,handlePageClass:ue,isShowItem:ce,handleShowQuestionNumber:me,hasScore:ve,isPreviewScale:pe,showEvaluateEntry:de,showEvaluateCoundownPage:fe,showSaveBtn:ge,showEvaluateLabel:ye,showAnswerParse:ke,propsConfig:he,evaluatePageProps:Ce,evaluateCountdownProps:we,skipCover:be,scaleEdit:Se}=_(Q,z,{query:ne}),{initForm:Ee}=A(Q,z,H,{query:ne}),{submitMethod:_e}=j(Q,z,H,{query:ne}),{nextLogicEvent:Ae,handleDynamicDataRelation:je}=L(Q,z);(()=>{let{id:e}=ne;e&&(z.shareId=e)})();const Te=e=>{try{ie(),Ee(e)}catch(e){console.log(e,"--error"),z.spinning=!1,z.hasFrontAddress=!1,te(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};t((()=>Q.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Te(e):e.guage_id&&Te(e)}),{immediate:!0}),t((()=>Q.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;z.form={},z.formArray=[];const o=JSON.parse(JSON.stringify(e));i((()=>{Ee(o)}))}),{immediate:!0});const De=e=>{z.showEvaluateSettingWrap=!1,z.showEvaluateCountdown=!!e,H("startWriteScale")},Oe=()=>{console.log("----closeEvaluateCountdown"),z.showEvaluateCountdown=!1,pe.value||(z.banSubmit=!0,_e(),Y.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:"确定",onPositiveClick:()=>{}}))},Le=e=>{Y.warning({title:"提示",content:()=>w("div",{class:"evatip-container"},[w("span","答案解析:"),w("p",e)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})},xe=(e,o,a)=>{console.log(e,"--val");let{choiceObj:t,isSetObj:i}=a||{};switch(o.type.includes("SELECT")||(z.form[o.val_key]=e),o.type){case"SELECT":case"EVALUATE_SELECT":let{value:a,list:n=[]}=e;z.form[o.val_key]=a,Ae(e,o,z.formArray),je(n,o,z.formArray);break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":i&&(z.choiceComObj[o.val_key]=t),Ae(e,o,z.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":Ae(e,o,z.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":z.submitForm[o.val_key]=e}},Ie=(e,o)=>{console.log(o),z.form[o.val_key]=e},Pe=e=>{if(!e||!e.length)return{labelStr:"",labels:[]};const o=e||[],a=[],t=[];return o.forEach((e=>{t.push(e),a.push(e.labelName)})),z.labelSelectedList=o,{labelStr:a.join(","),labels:t}},Ne=()=>{var e;if(!z.formArray.find((e=>O(e.type))))return void qe("确认要提交吗?");let{evaluateResultSetting:o}=z.config;if(!o||!Object.keys(o).length&&!de.value||Se.value)return void qe("确认要结束测评吗?");if("formIframe"==Q.openType&&de.value)return void H("submitNoRequest");let a="确定要提前结束测评吗?";if(fe.value&&(null==(e=ee.value)?void 0:e.getCountdownObj)){const e=ee.value.getCountdownObj(),{setAnswered:o,totalLen:t}=e;o<t?a="存在未作答的题目,确定要提前结束测评吗?":!(null==z?void 0:z.showEvaluateCountdown)&&(a="确认要结束测评吗?")}qe(a)},qe=e=>{Y.warning({title:"温馨提示",content:()=>w("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:()=>{Me()},onNegativeClick(){}})},Me=()=>{var e;null==(e=oe.value)||e.validate((e=>{var o;if(e){console.log(e);let a=(null==(o=e[0])?void 0:o[0])||{},t=a.field,i=a.message,n=z.formArray.find((e=>e.databaseTitle===t));return n&&(t=n.title),Z.error(t+i),!1}_e()}))},Be=()=>{H("onCloseSetting")};return E({getScaleData:()=>({...z}),onSubmit:Ne,cancel:Be}),(e,o)=>(n(),s("div",{class:l(["c-scale",{"c-scale-nobtn":r(ge)}])},[u(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="加载中"></n-spin>\n </template> '),z.spinning||z.hasFrontAddress?u("v-if",!0):(n(),s(c,{key:0},[r(ae).noData?(n(),m(x,{key:0,noDataImg:r(ae).noDataImg,noDataTip:r(ae).noDataTip},null,8,["noDataImg","noDataTip"])):(n(),s(c,{key:1},[r(de)&&!r(be)?(n(),m(N,v({key:0},r(Ce),{onWriteGuage:De}),null,16)):(n(),s(c,{key:1},[r(fe)?(n(),m(P,v({key:0,ref_key:"countdownDom",ref:ee},r(we),{onCloseEvaluateCountdown:Oe}),null,16)):u("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(ue),"scale-container-hasfooter":r(ge)}]),style:d(r(re))},[r(ve)?(n(),m(r(M),{key:0,config:z.config,maxScore:z.maxScore},null,8,["config","maxScore"])):u("v-if",!0),f(r(V),{ref_key:"formRef",ref:oe,model:z.form,rules:z.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(n(!0),s(c,null,y(z.formArray,((e,o)=>(n(),s(c,{key:(e.id||e.seq)+o},[r(ce)(e)?(n(),m(r(F),{key:0,path:e.val_key,"show-label":!r(D)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(le)(e)}),innerHTML:r(me)(e)},null,10,W),r(le)(e)?(n(),s("span",U,"(必填)")):u("v-if",!0),r(ye)(e)?(n(),s("span",J,k(r(ye)(e)),1)):u("v-if",!0),r(se)(e)?(n(),s("span",{key:2,class:"evalute-tip",onClick:o=>(async e=>{var o;if(z.evatipMap[e.id])return void Le(z.evatipMap[e.id]);let a="getSubjectAnswer";const t=(null==(o=Q.scaleApiConfig)?void 0:o[a])||null;if(!t||"function"!=typeof t)return void Z.error(`${a} Is not a function`);let i=await t(e.id);i&&(z.evatipMap[e.id]||(z.evatipMap[e.id]=i,Le(i)))})(e)},[f(r(I),{"icon-class":"a-xitongtubiaotishi"}),h(" 查看提示 ")],8,X)):u("v-if",!0)])),default:g((()=>[(n(),m(C(e.renderCom),v(r(he)(e,o),{key:(e.id||e.seq)+o,onScaleChange:xe,onOnChange:o=>((e,o)=>{z.form[o.val_key]=Pe(e)})(o,e),onVodFileList:Ie}),null,16,["onOnChange"])),r(ke)(e)?(n(),m(q,{key:0,item:e},null,8,["item"])):u("v-if",!0)])),_:2},1032,["path","show-label"])):u("v-if",!0)],64)))),128))])),_:1},8,["model","rules"])],6),r(ge)?(n(),s("div",G,[u(" 分享的链接 隐藏取消按钮 "),"guage"!==Q.sourceType?(n(),m(r(K),{key:0,onClick:Be},{default:g((()=>[h("取消")])),_:1})):u("v-if",!0),Q.isLock?u("v-if",!0):(n(),m(r(K),{key:1,onClick:Ne,disabled:z.banSubmit,type:"primary"},{default:g((()=>[h("保存")])),_:1},8,["disabled"]))])):u("v-if",!0)],64))],64))],64))],2))}}),[["__file","ScaleView.vue"]]);export{Q as default};
@@ -68,8 +68,8 @@ declare const _default: import("vue").DefineComponent<{
68
68
  onOnClose?: ((...args: any[]) => any) | undefined;
69
69
  "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
70
70
  }, {
71
- visible: boolean;
72
71
  closable: boolean;
72
+ visible: boolean;
73
73
  modalWidth: string;
74
74
  modalHeight: string;
75
75
  title: string | Function;
@@ -1 +1 @@
1
- import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as r,unref as s,createCommentVNode as d,withDirectives as o,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"../../../_virtual/plugin-vue_export-helper.js";import A from"xe-utils";const O={key:0,class:"label-disable-wrap"},K=[c("p",{class:"label-disable-title"},"无可选标签",-1),c("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],j={style:{height:"100%"}},k={class:"label-wrap"},T=["id"],_={class:"edit-label-type"};var B=x(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:x,emit:B}){const D=t,F=L(),V=e(null),P=l({editLabelItem:{},inited:!1,labelSelectedEdit:[],labelAnchorKey:"",cacheAnchorKey:"",labelConfig:{}});let N=e(0);const W=a((()=>{if(!P.inited)return!1;let t=P.labelConfig;return!t||Object.keys(t).every((e=>!t[e].itemList))})),$=a((()=>{let t=[].concat(...P.labelSelectedEdit,...D.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(P.labelSelectedEdit=$.value,"object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((t=>{var e;let l=(null==(e=P.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 D.saveLabelItem(a,t);i&&(F.success("添加成功!"),B("updateLabelData"),t.showAdd=!1)},U=(t,e,l,a)=>{var i;const n=l.itemList,r=l.multipleChoice;let s=(null==(i=P.labelSelectedEdit)?void 0:i.length)&&A.clone(P.labelSelectedEdit,!0)||[];if(t){if(s.some((t=>t.labelId==e.labelId)))return;if(2==r){const{typeId:t,labelId:l}=e;s=s.filter((e=>e.typeId!==t)),n.forEach((t=>{t.labelId!==l&&(t.isSelect=!1)}))}s.push(e)}else{const t=s.findIndex((t=>t.labelId==e.labelId));-1!=t&&s.splice(t,1)}P.labelSelectedEdit=[...s],N.value++,D.explicit&&B("explicitOnChange",[...P.labelSelectedEdit])},X=async t=>{const{status:e}=await D.deleteLabel(t,D.item);if(e){F.success("删除成功!");for(const e in P.labelConfig){const l=P.labelConfig[e].itemList.findIndex((e=>e.labelId==t.labelId));-1!=l&&P.labelConfig[e].itemList.splice(l,1)}const e=P.labelSelectedEdit||[],l=D.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),B("change",[...l],D.item)}B("updateLabelData")}else F.warning("删除失败")},Y=t=>{t&&setTimeout((()=>{let e,l="#"+t;e=V.value.querySelector("a[href='"+l+"']"),e&&e.click(),P.labelAnchorKey=t}),32)},Z=t=>{t.preventDefault()},tt=t=>{if(!t)return;let e=t.slice(1);P.cacheAnchorKey=e},et=()=>{var t;return null==(t=V.value)?void 0:t.querySelector(".right-label-wrap")};return i((()=>D.labelOptions),(t=>{t&&(()=>{var t;if(D.isLock)return;const e=JSON.parse(JSON.stringify(D.labelOptions));for(let l in e){let a=(null==(t=e[l])?void 0:t.typeId)||"";Object.assign(e[l],{curKey:`${l}_${a}}`})}P.labelConfig=e,C((()=>{let t;R(),D.explicit&&P.inited&&(t=P.labelAnchorKey),z(P.labelConfig,t),P.inited=!0}))})()}),{immediate:!0,deep:!0}),x({resetShowAdd:()=>{let{labelObj:t}=P.editLabelItem;if(t&&Object.keys(t).length)for(let e in t){let l=t[e];Object.assign(l,{showAdd:!1})}},handleLabelForm:t=>{t([...P.labelSelectedEdit||[]])},handleResetOptions:()=>{},hanldeSetLabelItem:(t,e)=>{if("object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((l=>{var a;let i=(null==(a=P.labelConfig[l])?void 0:a.itemList)||[];i.length&&i.forEach((l=>{t==l.labelId&&(l.isSelect=e)}))}))}if(!1===e&&Array.isArray(P.labelSelectedEdit)){const e=P.labelSelectedEdit.findIndex((e=>e.labelId==t));-1!=e&&P.labelSelectedEdit.splice(e,1)}}}),(e,l)=>(n(),r("div",{class:"c-label-form-content",ref_key:"labelFormContent",ref:V},[s(W)?(n(),r("div",O,K)):d("v-if",!0),o(c("div",j,[c("div",k,[d(" 表单内嵌打开标签组件的样式 "),d(' <div v-if="explicit" class="explicit-continer">\r\n\t\t\t\t\t<n-tabs :value="state.labelAnchorKey" type="card" @change="labelAnchorTabsOnChange" tab-position="top">\r\n\t\t\t\t\t\t<template v-for="(v, i) in state.labelConfig">\r\n\t\t\t\t\t\t\t<n-tab-pane :name="v.curKey">\r\n\t\t\t\t\t\t\t\t<span slot="tab">\r\n\t\t\t\t\t\t\t\t\t{{ i }}\r\n\t\t\t\t\t\t\t\t\t<span class="edit-label-type">({{ v.multipleChoice == 2 ? \'单\' : \'多\' }}选)</span>\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t<div class="explicit-label-wrap left-label-wrap">\r\n\t\t\t\t\t\t\t\t\t<div class="edit-label-content">\r\n\t\t\t\t\t\t\t\t\t\t<labelClassify\r\n\t\t\t\t\t\t\t\t\t\t\t:classifyItem="v"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelChange="handleLabelChange"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelColor="handleLabelColor"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleDelLabel="handleDelLabel"\r\n\t\t\t\t\t\t\t\t\t\t\t:hanldeBlur="hanldeBlur"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleAddLabel="handleAddLabel"\r\n\t\t\t\t\t\t\t\t\t\t\t:clearaddVal="clearaddVal"\r\n\t\t\t\t\t\t\t\t\t\t\t:isEdit="isEdit"\r\n\t\t\t\t\t\t\t\t\t\t\t:sourceType="sourceType"\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</n-tab-pane>\r\n\t\t\t\t\t\t</template>\r\n\t\t\t\t\t</n-tabs>\r\n\t\t\t\t</div> '),d("\r\n\t\t\t\t\t普通标签样式\r\n\t\t\t\t\tv-else\r\n\t\t\t\t\texplicit\r\n\t\t\t\t "),c("div",{class:b(["left-label-wrap",{"total-left-label-wrap":t.isChangeWindow}])},[u(s(I),{"offset-target":et,type:"block",onClick:Z,onChange:tt},{default:p((()=>[(n(!0),r(f,null,h(P.labelConfig,((t,e)=>(n(),y(s(S),{href:`#${t.curKey}`,title:String(e)},null,8,["href","title"])))),256))])),_:1})],2),d(' v-if="!explicit" '),c("div",{class:b(["right-label-wrap",{"total-right-label-wrap":t.isChangeWindow}])},[(n(!0),r(f,null,h(P.labelConfig,((e,l)=>(n(),r("div",{key:l,class:"edit-label-content"},[c("div",{class:"edit-label",id:e.curKey},[v(m(l)+" ",1),c("span",_,"("+m(2==e.multipleChoice?"单":"多")+"选)",1)],8,T),u(E,{classifyItem:e,handleLabelChange:U,handleLabelColor:s(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,!s(W)]])],512))}}),[["__file","LabelFormContent.vue"]]);export{B as default};
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"../../../_virtual/plugin-vue_export-helper.js";import A from"xe-utils";const O={key:0,class:"label-disable-wrap"},K=[c("p",{class:"label-disable-title"},"无可选标签",-1),c("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],j={style:{height:"100%"}},k={class:"label-wrap"},T=["id"],_={class:"edit-label-type"};var B=x(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:x,emit:B}){const D=t,F=L(),V=e(null),P=l({editLabelItem:{},inited:!1,labelSelectedEdit:[],labelAnchorKey:"",cacheAnchorKey:"",labelConfig:{}});let N=e(0);const W=a((()=>{if(!P.inited)return!1;let t=P.labelConfig;return!t||Object.keys(t).every((e=>!t[e].itemList))})),$=a((()=>{let t=[].concat(...P.labelSelectedEdit,...D.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(P.labelSelectedEdit=$.value,"object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((t=>{var e;let l=(null==(e=P.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 D.saveLabelItem(a,t);i&&(F.success("添加成功!"),B("updateLabelData"),t.showAdd=!1)},U=(t,e,l,a)=>{var i;const n=l.itemList,s=l.multipleChoice;let d=(null==(i=P.labelSelectedEdit)?void 0:i.length)&&A.clone(P.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)}P.labelSelectedEdit=[...d],N.value++,D.explicit&&B("explicitOnChange",[...P.labelSelectedEdit])},X=async t=>{const{status:e}=await D.deleteLabel(t,D.item);if(e){F.success("删除成功!");for(const e in P.labelConfig){const l=P.labelConfig[e].itemList.findIndex((e=>e.labelId==t.labelId));-1!=l&&P.labelConfig[e].itemList.splice(l,1)}const e=P.labelSelectedEdit||[],l=D.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),B("change",[...l],D.item)}B("updateLabelData")}else F.warning("删除失败")},Y=t=>{t&&setTimeout((()=>{let e,l="#"+t;e=V.value.querySelector("a[href='"+l+"']"),e&&e.click(),P.labelAnchorKey=t}),32)},Z=t=>{t.preventDefault()},tt=t=>{if(!t)return;let e=t.slice(1);P.cacheAnchorKey=e},et=()=>{var t;return null==(t=V.value)?void 0:t.querySelector(".right-label-wrap")};return i((()=>D.labelOptions),(t=>{t&&(()=>{var t;if(D.isLock)return;const e=JSON.parse(JSON.stringify(D.labelOptions));for(let l in e){let a=(null==(t=e[l])?void 0:t.typeId)||"";Object.assign(e[l],{curKey:`${l}_${a}}`})}P.labelConfig=e,C((()=>{let t;R(),D.explicit&&P.inited&&(t=P.labelAnchorKey),z(P.labelConfig,t),P.inited=!0}))})()}),{immediate:!0,deep:!0}),x({resetShowAdd:()=>{let{labelObj:t}=P.editLabelItem;if(t&&Object.keys(t).length)for(let e in t){let l=t[e];Object.assign(l,{showAdd:!1})}},handleLabelForm:t=>{t([...P.labelSelectedEdit||[]])},handleResetOptions:()=>{},hanldeSetLabelItem:(t,e)=>{if("object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((l=>{var a;let i=(null==(a=P.labelConfig[l])?void 0:a.itemList)||[];i.length&&i.forEach((l=>{t==l.labelId&&(l.isSelect=e)}))}))}if(!1===e&&Array.isArray(P.labelSelectedEdit)){const e=P.labelSelectedEdit.findIndex((e=>e.labelId==t));-1!=e&&P.labelSelectedEdit.splice(e,1)}}}),(e,l)=>(n(),s("div",{class:"c-label-form-content",ref_key:"labelFormContent",ref:V},[d(W)?(n(),s("div",O,K)):o("v-if",!0),r(c("div",j,[c("div",k,[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(P.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(P.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",_,"("+m(2==e.multipleChoice?"单":"多")+"选)",1)],8,T),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))}}),[["__file","LabelFormContent.vue"]]);export{B as default};
@@ -299,7 +299,6 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
299
299
  data: (import("naive-ui/es/tree/src/interface").TreeOptionBase & {
300
300
  [k: string]: unknown;
301
301
  } & import("../../../es/shared/types").AnyObject)[];
302
- multiple: boolean;
303
302
  defaultList: ((string | number) | {
304
303
  key: string | number;
305
304
  name: string;
@@ -317,6 +316,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
317
316
  };
318
317
  showCount: boolean;
319
318
  showClear: boolean;
319
+ multiple: boolean;
320
320
  queryLoadChildData: (node: import("naive-ui").TreeOption) => Promise<void>;
321
321
  queryTreeSearch: (keyWork: string) => Promise<import("../../../es/shared/types").AnyObject[]>;
322
322
  }>>;
@@ -267,7 +267,6 @@ declare const _default: import("vue").DefineComponent<{
267
267
  onCheck?: ((...args: any[]) => any) | undefined;
268
268
  }, {
269
269
  data: ITreeOption[];
270
- multiple: boolean;
271
270
  defaultList: (IKey | ITag)[];
272
271
  searchPlaceholder: string;
273
272
  searchButtonText: string;
@@ -275,6 +274,7 @@ declare const _default: import("vue").DefineComponent<{
275
274
  wordbookChild: IWordBookChild<ITreeOption>;
276
275
  showCount: boolean;
277
276
  showClear: boolean;
277
+ multiple: boolean;
278
278
  queryLoadChildData: (node: TreeOption) => Promise<void>;
279
279
  queryTreeSearch: (keyWork: string) => Promise<Array<AnyObject>>;
280
280
  }>;
@@ -1984,7 +1984,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
1984
1984
  onScroll?: ((...args: any[]) => any) | undefined;
1985
1985
  onAnnotationChange?: ((...args: any[]) => any) | undefined;
1986
1986
  }>>;
1987
- emit: (event: "scroll" | "formChange" | "annotationChange", ...args: any[]) => void;
1987
+ emit: (event: "formChange" | "scroll" | "annotationChange", ...args: any[]) => void;
1988
1988
  nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
1989
1989
  formRenderRef: import("vue").Ref<HTMLElement | undefined>;
1990
1990
  formHeight: import("vue").ComputedRef<string>;
@@ -2140,32 +2140,32 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
2140
2140
  data: any;
2141
2141
  loading: boolean;
2142
2142
  required: boolean;
2143
- hidden: boolean;
2144
- visible: boolean;
2145
- content: any;
2146
- reset: (options?: import("@formily/core").IFieldResetOptions | undefined) => Promise<void>;
2147
- active: boolean;
2148
- disabled: boolean;
2149
- display: import("@formily/core").FieldDisplayTypes;
2150
2143
  value: string;
2151
2144
  readonly index: string | number;
2145
+ disabled: boolean;
2152
2146
  onFocus: (...args: any[]) => Promise<void>;
2153
2147
  onBlur: (...args: any[]) => Promise<void>;
2154
2148
  onInput: (...args: any[]) => Promise<void>;
2149
+ reset: (options?: import("@formily/core").IFieldResetOptions | undefined) => Promise<void>;
2150
+ visible: boolean;
2155
2151
  submit: <T>(onSubmit?: ((values: any) => void | Promise<T>) | undefined) => Promise<T>;
2156
2152
  validator: import("@formily/core").FieldValidator;
2157
2153
  pattern: import("@formily/core").FieldPatternTypes;
2158
2154
  title: string;
2159
2155
  form: import("@formily/core").Form<any>;
2156
+ content: any;
2160
2157
  componentProps: Record<string, any>;
2161
2158
  decoratorProps: Record<string, any>;
2159
+ display: import("@formily/core").FieldDisplayTypes;
2162
2160
  description: string;
2163
2161
  readOnly: boolean;
2164
2162
  editable: boolean;
2163
+ hidden: boolean;
2165
2164
  component: import("@formily/core").FieldComponent<any, any>;
2166
2165
  decorator: import("@formily/core").FieldDecorator<any, any>;
2167
2166
  validating: boolean;
2168
2167
  submitting: boolean;
2168
+ active: boolean;
2169
2169
  visited: boolean;
2170
2170
  selfModified: boolean;
2171
2171
  modified: boolean;
@@ -2252,7 +2252,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
2252
2252
  };
2253
2253
  readonly disabled: BooleanConstructor;
2254
2254
  readonly displayDirective: {
2255
- readonly type: import("vue").PropType<"show" | "if" | "show:lazy">;
2255
+ readonly type: import("vue").PropType<"if" | "show" | "show:lazy">;
2256
2256
  readonly default: "if";
2257
2257
  };
2258
2258
  readonly closable: {
@@ -2277,7 +2277,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
2277
2277
  };
2278
2278
  readonly disabled: BooleanConstructor;
2279
2279
  readonly displayDirective: {
2280
- readonly type: import("vue").PropType<"show" | "if" | "show:lazy">;
2280
+ readonly type: import("vue").PropType<"if" | "show" | "show:lazy">;
2281
2281
  readonly default: "if";
2282
2282
  };
2283
2283
  readonly closable: {
@@ -2291,10 +2291,10 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
2291
2291
  }>>, {
2292
2292
  readonly disabled: boolean;
2293
2293
  readonly closable: boolean | undefined;
2294
- readonly displayDirective: "show" | "if" | "show:lazy";
2294
+ readonly displayDirective: "if" | "show" | "show:lazy";
2295
2295
  }>;
2296
2296
  NTabs: any;
2297
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2297
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "scroll" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2298
2298
  fieldList: {
2299
2299
  type: import("vue").PropType<import("..").FieldItem[]>;
2300
2300
  };
@@ -1986,7 +1986,7 @@ declare const _default: import("vue").DefineComponent<{
1986
1986
  onScroll?: ((...args: any[]) => any) | undefined;
1987
1987
  onAnnotationChange?: ((...args: any[]) => any) | undefined;
1988
1988
  }>>;
1989
- emit: (event: "scroll" | "formChange" | "annotationChange", ...args: any[]) => void;
1989
+ emit: (event: "formChange" | "scroll" | "annotationChange", ...args: any[]) => void;
1990
1990
  nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
1991
1991
  formRenderRef: import("vue").Ref<HTMLElement | undefined>;
1992
1992
  formHeight: import("vue").ComputedRef<string>;
@@ -2142,32 +2142,32 @@ declare const _default: import("vue").DefineComponent<{
2142
2142
  data: any;
2143
2143
  loading: boolean;
2144
2144
  required: boolean;
2145
- hidden: boolean;
2146
- visible: boolean;
2147
- content: any;
2148
- reset: (options?: import("../../../../es/components/form-render").IFieldResetOptions | undefined) => Promise<void>;
2149
- active: boolean;
2150
- disabled: boolean;
2151
- display: import("../../../../es/components/form-render").FieldDisplayTypes;
2152
2145
  value: string;
2153
2146
  readonly index: string | number;
2147
+ disabled: boolean;
2154
2148
  onFocus: (...args: any[]) => Promise<void>;
2155
2149
  onBlur: (...args: any[]) => Promise<void>;
2156
2150
  onInput: (...args: any[]) => Promise<void>;
2151
+ reset: (options?: import("../../../../es/components/form-render").IFieldResetOptions | undefined) => Promise<void>;
2152
+ visible: boolean;
2157
2153
  submit: <T>(onSubmit?: ((values: any) => void | Promise<T>) | undefined) => Promise<T>;
2158
2154
  validator: import("../../../../es/components/form-render").FieldValidator;
2159
2155
  pattern: import("../../../../es/components/form-render").FieldPatternTypes;
2160
2156
  title: string;
2161
2157
  form: import("../../../../es/components/form-render").Form<any>;
2158
+ content: any;
2162
2159
  componentProps: Record<string, any>;
2163
2160
  decoratorProps: Record<string, any>;
2161
+ display: import("../../../../es/components/form-render").FieldDisplayTypes;
2164
2162
  description: string;
2165
2163
  readOnly: boolean;
2166
2164
  editable: boolean;
2165
+ hidden: boolean;
2167
2166
  component: import("../../../../es/components/form-render").FieldComponent<any, any>;
2168
2167
  decorator: import("../../../../es/components/form-render").FieldDecorator<any, any>;
2169
2168
  validating: boolean;
2170
2169
  submitting: boolean;
2170
+ active: boolean;
2171
2171
  visited: boolean;
2172
2172
  selfModified: boolean;
2173
2173
  modified: boolean;
@@ -2254,7 +2254,7 @@ declare const _default: import("vue").DefineComponent<{
2254
2254
  };
2255
2255
  readonly disabled: BooleanConstructor;
2256
2256
  readonly displayDirective: {
2257
- readonly type: import("vue").PropType<"show" | "if" | "show:lazy">;
2257
+ readonly type: import("vue").PropType<"if" | "show" | "show:lazy">;
2258
2258
  readonly default: "if";
2259
2259
  };
2260
2260
  readonly closable: {
@@ -2279,7 +2279,7 @@ declare const _default: import("vue").DefineComponent<{
2279
2279
  };
2280
2280
  readonly disabled: BooleanConstructor;
2281
2281
  readonly displayDirective: {
2282
- readonly type: import("vue").PropType<"show" | "if" | "show:lazy">;
2282
+ readonly type: import("vue").PropType<"if" | "show" | "show:lazy">;
2283
2283
  readonly default: "if";
2284
2284
  };
2285
2285
  readonly closable: {
@@ -2293,10 +2293,10 @@ declare const _default: import("vue").DefineComponent<{
2293
2293
  }>>, {
2294
2294
  readonly disabled: boolean;
2295
2295
  readonly closable: boolean | undefined;
2296
- readonly displayDirective: "show" | "if" | "show:lazy";
2296
+ readonly displayDirective: "if" | "show" | "show:lazy";
2297
2297
  }>;
2298
2298
  NTabs: any;
2299
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2299
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "scroll" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2300
2300
  fieldList: {
2301
2301
  type: import("vue").PropType<FieldItem[]>;
2302
2302
  };
@@ -1 +1 @@
1
- import{defineComponent as e,computed as t,toRefs as l,ref as n,watch as s,openBlock as o,createElementBlock as i,normalizeStyle as p,unref as r,normalizeClass as a,createElementVNode as d,Fragment as u,renderList as c,createCommentVNode as m,withDirectives as f,renderSlot as h,toDisplayString as v,vShow as g,createBlock as I,withCtx as x,createVNode as y,createTextVNode as B}from"vue";import{NTooltip as w,NEmpty as T}from"naive-ui";import{useTheme as S}from"../../../shared/mixins/useTheme.js";import{defaultCssVars as _}from"./constants/index.js";import b from"../../../_virtual/plugin-vue_export-helper.js";const k={class:"stepBox"},C=["title"],$=d("ul",{class:"nodeTipContent"},[d("li",null,[d("p",null,[d("span",{style:{"margin-right":"10px"}},"(1)"),B(" 2022-07-30 14:15:12 ")]),d("p",null,"周老师"),d("p",null,"步骤条提示"),d("p",null,"咱这是测试案例,请使用插槽:#nodeTipBox 自定义")]),d("li",null,[d("p",null,[d("span",{style:{"margin-right":"10px"}},"(2)"),B(" 2022-07-30 14:15:12 ")]),d("p",null,"周老师"),d("p",null,"步骤条提示"),d("p",null,"咱这是个测试案例,请使用插槽:#nodeTipBox 自定义")])],-1),L=["title"],R=["title"],j=["title"],M={key:0,style:{height:"48px"}},N={key:1},D={key:1};var W=b(e({__name:"StepsWheel",props:{stepInfo:{type:Object,default:()=>({list:[],cols:6})},currentStep:{type:Number,default:1},toolTipShow:{type:Boolean,default:!0},lastNodeRender:{type:Boolean,default:!1},noDataMsg:{type:String,default:"暂无节点数据"},placement:{type:String,default:"center"}},setup(e){const B=e,b=S(_,"StepsWheel"),W=t((()=>Math.ceil(P.value.length/B.stepInfo.cols))),A=t((()=>B.lastNodeRender)),{noDataMsg:E}=l(B),O=n(null),F=t((()=>{var e;let t=72;if(null==(e=null==O?void 0:O.value)?void 0:e.length){let e=O.value[0],l=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle;t=isNaN(parseInt(l["min-width"]))?72:parseInt(l["min-width"])}return`${20+B.stepInfo.cols*t}px`})),P=n([]),q=n([]),z=e=>{if(q.value.length){if(e.rowIndex===q.value.length)return!0;if(e.rowIndex<q.value.length)return q.value[e.rowIndex].some((e=>null==e?void 0:e.title))}return!1},G=e=>{const{list:t=[]}=B.stepInfo;return e.rowIndex%2==0&&"frist"==e.nodeType&&e.nodeIndex!==t.length},H=e=>{const{list:t=[]}=B.stepInfo;return e.rowIndex%2!=0&&"last"==e.nodeType&&e.nodeIndex!==t.length},J=(e,t)=>e.rowIndex%2==0?B.currentStep>=t+(B.stepInfo.cols-2*e.sort):B.currentStep>=t+2,K=(e,t)=>{let l=e.length,n=l%t==0?l/t:Math.floor(l/t+1),s=[];for(let l=0;l<n;l++){let n=e.slice(l*t,l*t+t);s.push(n)}return s},Q=e=>{const{cols:t}=B.stepInfo;let l=K(P.value,t),n=l[l.length-1].filter((e=>e));return W.value%2==0?e!=n[n.length-1].nodeIndex-(t-2*n[n.length-1].sort):e!=n[n.length-1].nodeIndex-1},U=e=>{const{cols:t}=B.stepInfo;let l=K(P.value,t),n=l[l.length-1].filter((e=>e));return W.value%2==0?A.value&&e==n[0].nodeIndex-(t-2*n[0].sort):A.value&&e==n[n.length-1].nodeIndex-1},V=(e,t)=>{const{cols:l}=B.stepInfo;let n=K(P.value,l),s=n[n.length-1].filter((e=>e));return W.value%2==0?"circle"===t?A.value&&e==s[0].nodeIndex-(l-2*s[0].sort)-l:A.value&&e==s[0].nodeIndex-(l-2*s[0].sort):"circle"===t?A.value&&e==s[s.length-1].nodeIndex-1-l:A.value&&e==s[s.length-1].nodeIndex-2};return s((()=>B.stepInfo),(e=>{var t;(null==(t=null==e?void 0:e.list)?void 0:t.length)&&((e,t)=>{let l=e.length+1,n=Math.ceil(e.length/t),s=!0,o=[];for(var i=0;i<n;i++)o[i]=new Array(t),o[i].fill(null);let p=0,r=0;for(let n=1;n<l;n++)o[p][r]=Object.assign(e[n-1],{nodeIndex:n,rowIndex:p+1}),s?n%t!=0?r++:(s=!s,p++):n%t!=0?r--:(s=!s,p++);let a=[];o.map((e=>{e.map(((e,t)=>e&&(e.sort=t))),e[0]&&(e[0].nodeType="frist"),e[e.length-1]&&(e[e.length-1].nodeType="last"),a=[...a,...e]})),P.value=a,q.value=o})(e.list,e.cols)}),{immediate:!0,deep:!0}),(t,l)=>(o(),i("div",{class:"step-wheel-box",style:p({minWidth:r(F),...r(b)})},[P.value.length?(o(),i("div",{key:0,class:a(["stepOut",{placementLeft:"left"===e.placement,placementRight:"right"===e.placement}])},[d("ul",k,[(o(!0),i(u,null,c(P.value,((l,n)=>(o(),i("li",{ref_for:!0,ref_key:"stepItemRef",ref:O,key:(null==l?void 0:l.stepId)||n,class:a(["stepItem",{[`stepItem_${n+1}`]:!0,[`${null==l?void 0:l.stepId}`]:!!(null==l?void 0:l.stepId)}])},[l?(o(),i(u,{key:0},[m(" 步骤头部信息 "),f(d("div",{class:a(["stepTopBox",{finished:U(n),stepTopBox_right:"right"===e.placement,stepTopBox_left:"left"===e.placement}])},[h(t.$slots,"stepTopBox",{stepItem:l},(()=>[d("span",{title:l.title},v(l.title),9,C)]))],2),[[g,l.title]]),m(" 步骤条的节点,此处为圆圈 "),e.toolTipShow?(o(),I(r(w),{key:0,placement:"top","show-arrow":!0,trigger:"hover",style:p({opacity:"0.88"})},{trigger:x((()=>[d("div",{class:a(["icon",{active:e.currentStep>=l.nodeIndex,finished:U(n)}])},null,2)])),default:x((()=>[h(t.$slots,"nodeTipBox",{stepItem:l,stepId:l.stepId},(()=>[$]))])),_:2},1032,["style"])):(o(),i("div",{key:1,class:a(["icon",{active:e.currentStep>=l.nodeIndex,finished:U(n)}])},null,2)),m(" 步骤条连接线,动态显示 "),"last"!==l.nodeType?f((o(),i("div",{key:2,class:a(["line",{lineActive:J(l,n),finished:V(n)}])},null,2)),[[g,Q(n)]]):m("v-if",!0),m(" 步骤条弯曲连线,动态渲染 "),G(l)||H(l)?(o(),i("div",{key:3,class:a({lineCircleActive:e.currentStep>l.nodeIndex,lineCircleFinished:V(n,"circle"),lineCircleRight:H(l),lineCircleLeft:G(l),lineCirclePlacementRight:H(l)&&"right"===e.placement,lineCirclePlacementLeft:G(l)&&"left"===e.placement})},null,2)):m("v-if",!0),m(" 步骤底部信息 "),d("div",{class:a(["stepBottomBox",{stepBottomBox_right:"right"===e.placement,stepBottomBox_left:"left"===e.placement}])},[h(t.$slots,"stepBottomBox",{stepItem:l},(()=>[m(" 步骤名称 "),f(d("p",{class:a(["stepLabel",{labelFinsh:U(n),stepLabel_right:"right"===e.placement,stepLabel_left:"left"===e.placement}]),title:l.label},v(l.label),11,L),[[g,l.label]]),d("div",{class:a({stepBottomCustomBox:!0,alignItemsEnd:"left"===e.placement,alignItemsStart:"right"===e.placement})},[h(t.$slots,"stepBottomCustomBox",{stepItem:l},(()=>[d("div",{class:a({stepBottomDefaultBox:!0,alignItemsEnd:"left"===e.placement,alignItemsStart:"right"===e.placement}),style:{width:"100%",display:"flex",flexDirection:"column"}},[f(d("p",{class:"stepExtra",title:l.person},v(l.person),9,R),[[g,l.person]]),m(" 步骤时间 "),f(d("p",{class:"statusTime",title:l.statusTime},v(l.statusTime),9,j),[[g,l.statusTime]])],2)]))],2)])),z(l)?(o(),i("div",M)):m("v-if",!0)],2)],64)):(o(),i("div",N,[m("null元素占位")]))],2)))),128))])],2)):(o(),i("div",D,[y(r(T),{description:r(E)},null,8,["description"])]))],4))}}),[["__file","StepsWheel.vue"]]);export{W as default};
1
+ import{defineComponent as e,computed as t,toRefs as l,ref as n,watch as s,openBlock as o,createElementBlock as i,normalizeStyle as p,unref as r,normalizeClass as a,createElementVNode as d,Fragment as u,renderList as c,createCommentVNode as m,withDirectives as h,renderSlot as f,toDisplayString as v,vShow as g,createBlock as I,withCtx as x,createVNode as y,createTextVNode as B}from"vue";import{NTooltip as w,NEmpty as T}from"naive-ui";import{useTheme as S}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"lodash-es";import{defaultCssVars as _}from"./constants/index.js";import k from"../../../_virtual/plugin-vue_export-helper.js";const b={class:"stepBox"},C=["title"],$=d("ul",{class:"nodeTipContent"},[d("li",null,[d("p",null,[d("span",{style:{"margin-right":"10px"}},"(1)"),B(" 2022-07-30 14:15:12 ")]),d("p",null,"周老师"),d("p",null,"步骤条提示"),d("p",null,"咱这是测试案例,请使用插槽:#nodeTipBox 自定义")]),d("li",null,[d("p",null,[d("span",{style:{"margin-right":"10px"}},"(2)"),B(" 2022-07-30 14:15:12 ")]),d("p",null,"周老师"),d("p",null,"步骤条提示"),d("p",null,"咱这是个测试案例,请使用插槽:#nodeTipBox 自定义")])],-1),L=["title"],R=["title"],j=["title"],M={key:0,style:{height:"48px"}},N={key:1},D={key:1};var W=k(e({__name:"StepsWheel",props:{stepInfo:{type:Object,default:()=>({list:[],cols:6})},currentStep:{type:Number,default:1},toolTipShow:{type:Boolean,default:!0},lastNodeRender:{type:Boolean,default:!1},noDataMsg:{type:String,default:"暂无节点数据"},placement:{type:String,default:"center"}},setup(e){const B=e,k=S(_,"StepsWheel"),W=t((()=>Math.ceil(P.value.length/B.stepInfo.cols))),A=t((()=>B.lastNodeRender)),{noDataMsg:E}=l(B),O=n(null),F=t((()=>{var e;let t=72;if(null==(e=null==O?void 0:O.value)?void 0:e.length){let e=O.value[0],l=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle;t=isNaN(parseInt(l["min-width"]))?72:parseInt(l["min-width"])}return`${20+B.stepInfo.cols*t}px`})),P=n([]),q=n([]),z=e=>{if(q.value.length){if(e.rowIndex===q.value.length)return!0;if(e.rowIndex<q.value.length)return q.value[e.rowIndex].some((e=>null==e?void 0:e.title))}return!1},G=e=>{const{list:t=[]}=B.stepInfo;return e.rowIndex%2==0&&"frist"==e.nodeType&&e.nodeIndex!==t.length},H=e=>{const{list:t=[]}=B.stepInfo;return e.rowIndex%2!=0&&"last"==e.nodeType&&e.nodeIndex!==t.length},J=(e,t)=>e.rowIndex%2==0?B.currentStep>=t+(B.stepInfo.cols-2*e.sort):B.currentStep>=t+2,K=(e,t)=>{let l=e.length,n=l%t==0?l/t:Math.floor(l/t+1),s=[];for(let l=0;l<n;l++){let n=e.slice(l*t,l*t+t);s.push(n)}return s},Q=e=>{const{cols:t}=B.stepInfo;let l=K(P.value,t),n=l[l.length-1].filter((e=>e));return W.value%2==0?e!=n[n.length-1].nodeIndex-(t-2*n[n.length-1].sort):e!=n[n.length-1].nodeIndex-1},U=e=>{const{cols:t}=B.stepInfo;let l=K(P.value,t),n=l[l.length-1].filter((e=>e));return W.value%2==0?A.value&&e==n[0].nodeIndex-(t-2*n[0].sort):A.value&&e==n[n.length-1].nodeIndex-1},V=(e,t)=>{const{cols:l}=B.stepInfo;let n=K(P.value,l),s=n[n.length-1].filter((e=>e));return W.value%2==0?"circle"===t?A.value&&e==s[0].nodeIndex-(l-2*s[0].sort)-l:A.value&&e==s[0].nodeIndex-(l-2*s[0].sort):"circle"===t?A.value&&e==s[s.length-1].nodeIndex-1-l:A.value&&e==s[s.length-1].nodeIndex-2};return s((()=>B.stepInfo),(e=>{var t;(null==(t=null==e?void 0:e.list)?void 0:t.length)&&((e,t)=>{let l=e.length+1,n=Math.ceil(e.length/t),s=!0,o=[];for(var i=0;i<n;i++)o[i]=new Array(t),o[i].fill(null);let p=0,r=0;for(let n=1;n<l;n++)o[p][r]=Object.assign(e[n-1],{nodeIndex:n,rowIndex:p+1}),s?n%t!=0?r++:(s=!s,p++):n%t!=0?r--:(s=!s,p++);let a=[];o.map((e=>{e.map(((e,t)=>e&&(e.sort=t))),e[0]&&(e[0].nodeType="frist"),e[e.length-1]&&(e[e.length-1].nodeType="last"),a=[...a,...e]})),P.value=a,q.value=o})(e.list,e.cols)}),{immediate:!0,deep:!0}),(t,l)=>(o(),i("div",{class:"step-wheel-box",style:p({minWidth:r(F),...r(k)})},[P.value.length?(o(),i("div",{key:0,class:a(["stepOut",{placementLeft:"left"===e.placement,placementRight:"right"===e.placement}])},[d("ul",b,[(o(!0),i(u,null,c(P.value,((l,n)=>(o(),i("li",{ref_for:!0,ref_key:"stepItemRef",ref:O,key:(null==l?void 0:l.stepId)||n,class:a(["stepItem",{[`stepItem_${n+1}`]:!0,[`${null==l?void 0:l.stepId}`]:!!(null==l?void 0:l.stepId)}])},[l?(o(),i(u,{key:0},[m(" 步骤头部信息 "),h(d("div",{class:a(["stepTopBox",{finished:U(n),stepTopBox_right:"right"===e.placement,stepTopBox_left:"left"===e.placement}])},[f(t.$slots,"stepTopBox",{stepItem:l},(()=>[d("span",{title:l.title},v(l.title),9,C)]))],2),[[g,l.title]]),m(" 步骤条的节点,此处为圆圈 "),e.toolTipShow?(o(),I(r(w),{key:0,placement:"top","show-arrow":!0,trigger:"hover",style:p({opacity:"0.88"})},{trigger:x((()=>[d("div",{class:a(["icon",{active:e.currentStep>=l.nodeIndex,finished:U(n)}])},null,2)])),default:x((()=>[f(t.$slots,"nodeTipBox",{stepItem:l,stepId:l.stepId},(()=>[$]))])),_:2},1032,["style"])):(o(),i("div",{key:1,class:a(["icon",{active:e.currentStep>=l.nodeIndex,finished:U(n)}])},null,2)),m(" 步骤条连接线,动态显示 "),"last"!==l.nodeType?h((o(),i("div",{key:2,class:a(["line",{lineActive:J(l,n),finished:V(n)}])},null,2)),[[g,Q(n)]]):m("v-if",!0),m(" 步骤条弯曲连线,动态渲染 "),G(l)||H(l)?(o(),i("div",{key:3,class:a({lineCircleActive:e.currentStep>l.nodeIndex,lineCircleFinished:V(n,"circle"),lineCircleRight:H(l),lineCircleLeft:G(l),lineCirclePlacementRight:H(l)&&"right"===e.placement,lineCirclePlacementLeft:G(l)&&"left"===e.placement})},null,2)):m("v-if",!0),m(" 步骤底部信息 "),d("div",{class:a(["stepBottomBox",{stepBottomBox_right:"right"===e.placement,stepBottomBox_left:"left"===e.placement}])},[f(t.$slots,"stepBottomBox",{stepItem:l},(()=>[m(" 步骤名称 "),h(d("p",{class:a(["stepLabel",{labelFinsh:U(n),stepLabel_right:"right"===e.placement,stepLabel_left:"left"===e.placement}]),title:l.label},v(l.label),11,L),[[g,l.label]]),d("div",{class:a({stepBottomCustomBox:!0,alignItemsEnd:"left"===e.placement,alignItemsStart:"right"===e.placement})},[f(t.$slots,"stepBottomCustomBox",{stepItem:l},(()=>[d("div",{class:a({stepBottomDefaultBox:!0,alignItemsEnd:"left"===e.placement,alignItemsStart:"right"===e.placement}),style:{width:"100%",display:"flex",flexDirection:"column"}},[h(d("p",{class:"stepExtra",title:l.person},v(l.person),9,R),[[g,l.person]]),m(" 步骤时间 "),h(d("p",{class:"statusTime",title:l.statusTime},v(l.statusTime),9,j),[[g,l.statusTime]])],2)]))],2)])),z(l)?(o(),i("div",M)):m("v-if",!0)],2)],64)):(o(),i("div",N,[m("null元素占位")]))],2)))),128))])],2)):(o(),i("div",D,[y(r(T),{description:r(E)},null,8,["description"])]))],4))}}),[["__file","StepsWheel.vue"]]);export{W as default};
@@ -1,2 +1 @@
1
1
  export * from './src/types';
2
- export * from './src/hooks/export';
@@ -1 +1 @@
1
- import"./src/hooks/useAdvanced.js";
1
+
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as a,reactive as t,ref as l,toRef as i,openBlock as o,createElementBlock as n,createVNode as s,unref as d,withCtx as r,createElementVNode as p,createCommentVNode as c,Fragment as u,renderList as y,normalizeClass as m,toDisplayString as v,createBlock as f,withDirectives as g,createTextVNode as C,vShow as h}from"vue";import{useMessage as k,NSpin as b,NInput as A,NIcon as L,NButton as _,NSelect as w,NTooltip as U}from"naive-ui";import{CloseOutline as N,AddOutline as x,AddCircleSharp as V}from"@vicons/ionicons5";import D from"./ValueCfg.vue.js";import{DataTypeEnums as B,ConditionEnums as I}from"../../types/enums.js";import{useDisplayCategory as j}from"./hooks/useDisplayCategory.js";import{useFilterConditions as S}from"./hooks/useFilterConditions.js";import{conditionOptions as F}from"./helpers/options.js";import z from"../../../../../_virtual/plugin-vue_export-helper.js";const O={class:"searchConditionByApi_wrapper"},P={class:"class-filter-content"},q={key:0,class:"item-name"},E=p("span",{class:"label"},"筛选分类名称:",-1),R={key:1,class:"quickSearch-content"},J=p("span",{class:"label"},"父类名称:",-1),K=["onDblclick","onClick"],M={key:0,class:"s-content"},Q={key:2,class:"item-name"},G=p("span",{class:"label"}," 过滤条件: ",-1),H=p("span",null,"添加",-1),T={class:"select-item-list"},W={class:"index-span"},X=["onClick"];var Y=z(e({__name:"index",props:{actionList_prop:{type:Object,default:()=>({})},conditionList:{type:Array,default:()=>[]},tableId:{type:String,default:""},searchFieldList:{type:Array,default:()=>[]},showItemName:{type:Boolean,default:!0},hideAddBtn:{type:Boolean,default:!1}},emits:["saveAdd","cancelSaveAdd"],setup(e,{expose:z,emit:Y}){const Z=e,$=k(),ee=a(),ae=t({className:"",displayCategory:"",filterConditions:[]}),te=l(!1),{State:le,isEnableAddDisplayCategory:ie,editDisplayCategory:oe,handleDisplayCategorySelect:ne,handleDisplayCategoryRemove:se,handleDisplayCategoryAdd:de,handlerBlur:re,initDisplayCategories:pe}=j(i(ae,"displayCategory"),{conditionList:Z.conditionList},$),{State:ce,paramOptions:ue,addFilterCondition:ye,delFilterCondition:me,updateKey:ve,updateCondition:fe,getParamCfg:ge,initFilterConditions:Ce,getRawFilterConditions:he}=S(i(ae,"filterConditions"),Z.searchFieldList,B.API);function ke(){ae.className="",ae.displayCategory="",ae.filterConditions=[]}async function be(){var e;try{if(ke(),te.value=!0,pe(ee.displayCategoryList,Z.actionList_prop.displayCategory||"custom"),Z.actionList_prop){ae.className=Z.actionList_prop.name,await Ce(Z.tableId,null!=(e=Z.actionList_prop.conObj)?e:[]);ae.filterConditions.length<1&&ue.value&&ue.value.length>0&&ye()}}finally{te.value=!1}}return be(),z({handleInitConditions:be,saveAdd:function(){new Promise((e=>{ae.className||!Z.showItemName?0!==ae.filterConditions.length?ae.filterConditions.some((({key:e,condition:a,value:t,presetVal:l})=>!e||!a||a===I.EQUAL&&!t&&!l))?$.warning("请补充完整条件内容"):e(!0):$.warning("请至少添加一个条件"):$.warning("请输入分类名称")})).then((()=>{let e;var a;"edit"===Z.actionList_prop.from&&(a=Z.actionList_prop.displayCategory,e=null==Z?void 0:Z.conditionList.find((e=>e.displayCategory===a)));const t={displayCategory:ae.displayCategory,name:ae.className||"",conObj:he()},l={id:e?e.sid:"",tableId:Z.tableId,setting:JSON.stringify(t)};Y("saveAdd",l,!1)}))},cancelSaveAdd:function(){ke(),Y("cancelSaveAdd")},addAction:ye,checkActionList:function(){return ae.filterConditions.every((e=>!e.field_key))}}),(a,t)=>(o(),n("div",O,[s(d(b),{show:te.value},{default:r((()=>[p("div",P,[e.showItemName?(o(),n("div",q,[E,s(d(A),{value:ae.className,"onUpdate:value":t[0]||(t[0]=e=>ae.className=e),placeholder:"请输入分类名称",style:{width:"250px"},maxlength:"10"},null,8,["value"])])):c("v-if",!0),e.showItemName?(o(),n("div",R,[J,(o(!0),n(u,null,y(d(le).displayCategories,((e,a)=>(o(),n("div",{class:m(["edit-tag",{"edit-tag-select":e.value===ae.displayCategory&&e.disabled}]),key:a,onDblclick:a=>d(oe)(a,e),onClick:a=>function(e){ne(e)}(e)},[e.disabled?(o(),n("div",M,[p("span",null,v(e.value),1)])):(o(),f(d(A),{key:1,style:{width:"100px"},disabled:e.disabled,onBlur:()=>e.disabled=!0,value:e.value,"onUpdate:value":a=>e.value=a,maxlength:10},null,8,["disabled","onBlur","value","onUpdate:value"])),s(d(L),{component:d(N),class:"anticon-close",size:"20",onClick:t=>d(se)(a,e)},null,8,["component","onClick"])],42,K)))),128)),d(ie)?(o(),n(u,{key:0},[g(s(d(_),{class:"ant-btn",icon:"plus",dashed:"",onClick:d(de)},{default:r((()=>[s(d(L),{component:d(x),size:"20"},null,8,["component"]),C(" "+v("添加父类"))])),_:1},8,["onClick"]),[[h,!d(le).showAdd]]),g(s(d(A),{class:"edit-tag",value:d(le).addDisplayCategory,"onUpdate:value":t[1]||(t[1]=e=>d(le).addDisplayCategory=e),valueModifiers:{trim:!0},style:{width:"100px"},onBlur:d(re),maxLength:10},null,8,["value","onBlur"]),[[h,d(le).showAdd]])],64)):c("v-if",!0)])):c("v-if",!0),e.hideAddBtn?c("v-if",!0):(o(),n("div",Q,[G,p("span",{class:"addAction",onClick:t[2]||(t[2]=(...e)=>d(ye)&&d(ye)(...e)),style:{cursor:"pointer"}},[s(d(L),{component:d(V),class:"blue",size:"18"},null,8,["component"]),H])])),p("ul",T,[(o(!0),n(u,null,y(ae.filterConditions,((e,a)=>(o(),n("li",{key:a},[p("span",W,v(a+1)+"   ",1),c(" 选择 field_key "),s(d(w),{class:"form-item",placeholder:"请选择",value:e.key,to:"body",filterable:"",options:d(ue),"onUpdate:value":e=>d(ve)(a,e)},null,8,["value","options","onUpdate:value"]),c(" 选择 关系 "),e.key?(o(),f(d(w),{key:0,class:"form-item",placeholder:"请选择",value:e.condition,to:"body",filterable:"",options:d(F),"onUpdate:value":e=>d(fe)(a,e)},null,8,["value","options","onUpdate:value"])):c("v-if",!0),c(" 自定义 "),e.key&&e.condition&&e.condition!==d(I).NULL?(o(),f(D,{key:1,modelValue:e.value,"onUpdate:modelValue":a=>e.value=a,presetVal:e.presetVal,"onUpdate:presetVal":a=>e.presetVal=a,"param-cfg":d(ge)(e.key)},null,8,["modelValue","onUpdate:modelValue","presetVal","onUpdate:presetVal","param-cfg"])):c("v-if",!0),s(d(U),{title:"删除",trigger:"hover"},{trigger:r((()=>[p("i",{onClick:e=>d(me)(a),class:"iconfont-table-filter delete-item-icon icon-table-filter-menzhenyishengzhananniuqingchu"},null,8,X)])),default:r((()=>[C(" 删除 ")])),_:2},1024)])))),128))])])])),_:1},8,["show"])]))}}),[["__file","index.vue"]]);export{Y as default};
1
+ import{defineComponent as e,useAttrs as a,reactive as l,ref as t,toRef as i,openBlock as o,createElementBlock as n,createVNode as s,unref as d,withCtx as r,createElementVNode as p,createCommentVNode as c,Fragment as u,renderList as y,normalizeClass as m,toDisplayString as v,createBlock as f,withDirectives as g,createTextVNode as C,vShow as h}from"vue";import{useMessage as k,NSpin as b,NInput as A,NIcon as L,NButton as _,NSelect as w,NTooltip as U}from"naive-ui";import{CloseOutline as N,AddOutline as x,AddCircleSharp as V}from"@vicons/ionicons5";import D from"./ValueCfg.vue.js";import{DataTypeEnums as B,ConditionEnums as I}from"../../types/enums.js";import{useDisplayCategory as j}from"./hooks/useDisplayCategory.js";import{useFilterConditions as S}from"./hooks/useFilterConditions.js";import{conditionOptions as F}from"./helpers/options.js";import z from"../../../../../_virtual/plugin-vue_export-helper.js";const O={class:"searchConditionByApi_wrapper"},P={class:"class-filter-content"},q={key:0,class:"item-name"},E=p("span",{class:"label"},"筛选分类名称:",-1),R={key:1,class:"quickSearch-content"},J=p("span",{class:"label"},"父类名称:",-1),K=["onDblclick","onClick"],M={key:0,class:"s-content"},Q={key:2,class:"item-name"},G=p("span",{class:"label"}," 过滤条件: ",-1),H=p("span",null,"添加",-1),T={class:"select-item-list"},W={class:"index-span"},X=["onClick"];var Y=z(e({__name:"index",props:{actionList_prop:{type:Object,default:()=>({})},conditionList:{type:Array,default:()=>[]},tableId:{type:String,default:""},searchFieldList:{type:Array,default:()=>[]},showItemName:{type:Boolean,default:!0},hideAddBtn:{type:Boolean,default:!1}},emits:["saveAdd","cancelSaveAdd"],setup(e,{expose:z,emit:Y}){const Z=e,$=k(),ee=a(),ae=l({className:"",displayCategory:"",filterConditions:[]}),le=t(!1),{State:te,isEnableAddDisplayCategory:ie,editDisplayCategory:oe,handleDisplayCategorySelect:ne,handleDisplayCategoryRemove:se,handleDisplayCategoryAdd:de,handlerBlur:re,initDisplayCategories:pe}=j(i(ae,"displayCategory"),{conditionList:Z.conditionList},$),{State:ce,paramOptions:ue,addFilterCondition:ye,delFilterCondition:me,updateKey:ve,updateCondition:fe,getParamCfg:ge,initFilterConditions:Ce,getRawFilterConditions:he}=S(i(ae,"filterConditions"),Z.searchFieldList,B.API);function ke(){ae.className="",ae.displayCategory="",ae.filterConditions=[]}async function be(){var e;try{if(ke(),le.value=!0,pe(ee.displayCategoryList,Z.actionList_prop.displayCategory||void 0),Z.actionList_prop){ae.className=Z.actionList_prop.name,await Ce(Z.tableId,null!=(e=Z.actionList_prop.conObj)?e:[]);ae.filterConditions.length<1&&ue.value&&ue.value.length>0&&ye()}}finally{le.value=!1}}return be(),z({handleInitConditions:be,saveAdd:function(){new Promise((e=>{ae.className||!Z.showItemName?0!==ae.filterConditions.length?ae.filterConditions.some((({key:e,condition:a,value:l,presetVal:t})=>!e||!a||a===I.EQUAL&&!l&&!t))?$.warning("请补充完整条件内容"):e(!0):$.warning("请至少添加一个条件"):$.warning("请输入分类名称")})).then((()=>{let e;var a;"edit"===Z.actionList_prop.from&&(a=Z.actionList_prop.displayCategory,e=null==Z?void 0:Z.conditionList.find((e=>e.displayCategory===a)));const l={displayCategory:ae.displayCategory,name:ae.className||"",conObj:he()},t={id:e?e.sid:"",tableId:Z.tableId,setting:JSON.stringify(l)};Y("saveAdd",t,!1)}))},cancelSaveAdd:function(){ke(),Y("cancelSaveAdd")},addAction:ye,checkActionList:function(){return ae.filterConditions.every((e=>!e.field_key))}}),(a,l)=>(o(),n("div",O,[s(d(b),{show:le.value},{default:r((()=>[p("div",P,[e.showItemName?(o(),n("div",q,[E,s(d(A),{value:ae.className,"onUpdate:value":l[0]||(l[0]=e=>ae.className=e),placeholder:"请输入分类名称",style:{width:"250px"},maxlength:"10"},null,8,["value"])])):c("v-if",!0),e.showItemName?(o(),n("div",R,[J,(o(!0),n(u,null,y(d(te).displayCategories,((e,a)=>(o(),n("div",{class:m(["edit-tag",{"edit-tag-select":e.value===ae.displayCategory&&e.disabled}]),key:a,onDblclick:a=>d(oe)(a,e),onClick:a=>function(e){ne(e)}(e)},[e.disabled?(o(),n("div",M,[p("span",null,v(e.value),1)])):(o(),f(d(A),{key:1,style:{width:"100px"},disabled:e.disabled,onBlur:()=>e.disabled=!0,value:e.value,"onUpdate:value":a=>e.value=a,maxlength:10},null,8,["disabled","onBlur","value","onUpdate:value"])),s(d(L),{component:d(N),class:"anticon-close",size:"20",onClick:l=>d(se)(a,e)},null,8,["component","onClick"])],42,K)))),128)),d(ie)?(o(),n(u,{key:0},[g(s(d(_),{class:"ant-btn",icon:"plus",dashed:"",onClick:d(de)},{default:r((()=>[s(d(L),{component:d(x),size:"20"},null,8,["component"]),C(" "+v("添加父类"))])),_:1},8,["onClick"]),[[h,!d(te).showAdd]]),g(s(d(A),{class:"edit-tag",value:d(te).addDisplayCategory,"onUpdate:value":l[1]||(l[1]=e=>d(te).addDisplayCategory=e),valueModifiers:{trim:!0},style:{width:"100px"},onBlur:d(re),maxLength:10},null,8,["value","onBlur"]),[[h,d(te).showAdd]])],64)):c("v-if",!0)])):c("v-if",!0),e.hideAddBtn?c("v-if",!0):(o(),n("div",Q,[G,p("span",{class:"addAction",onClick:l[2]||(l[2]=(...e)=>d(ye)&&d(ye)(...e)),style:{cursor:"pointer"}},[s(d(L),{component:d(V),class:"blue",size:"18"},null,8,["component"]),H])])),p("ul",T,[(o(!0),n(u,null,y(ae.filterConditions,((e,a)=>(o(),n("li",{key:a},[p("span",W,v(a+1)+"   ",1),c(" 选择 field_key "),s(d(w),{class:"form-item",placeholder:"请选择",value:e.key,to:"body",filterable:"",options:d(ue),"onUpdate:value":e=>d(ve)(a,e)},null,8,["value","options","onUpdate:value"]),c(" 选择 关系 "),e.key?(o(),f(d(w),{key:0,class:"form-item",placeholder:"请选择",value:e.condition,to:"body",filterable:"",options:d(F),"onUpdate:value":e=>d(fe)(a,e)},null,8,["value","options","onUpdate:value"])):c("v-if",!0),c(" 自定义 "),e.key&&e.condition&&e.condition!==d(I).NULL?(o(),f(D,{key:1,modelValue:e.value,"onUpdate:modelValue":a=>e.value=a,presetVal:e.presetVal,"onUpdate:presetVal":a=>e.presetVal=a,"param-cfg":d(ge)(e.key)},null,8,["modelValue","onUpdate:modelValue","presetVal","onUpdate:presetVal","param-cfg"])):c("v-if",!0),s(d(U),{title:"删除",trigger:"hover"},{trigger:r((()=>[p("i",{onClick:e=>d(me)(a),class:"iconfont-table-filter delete-item-icon icon-table-filter-menzhenyishengzhananniuqingchu"},null,8,X)])),default:r((()=>[C(" 删除 ")])),_:2},1024)])))),128))])])])),_:1},8,["show"])]))}}),[["__file","index.vue"]]);export{Y as default};
@@ -98,7 +98,7 @@ declare const _default: import("vue").DefineComponent<{
98
98
  }>> & {
99
99
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
100
100
  }, {
101
- multiple: boolean;
102
101
  value: string | number | unknown[];
102
+ multiple: boolean;
103
103
  }>;
104
104
  export default _default;
@@ -178,8 +178,8 @@ export declare const WidgetCfgMaps: Map<string, {
178
178
  }>> & {
179
179
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
180
180
  }, {
181
- multiple: boolean;
182
181
  value: string | number | unknown[];
182
+ multiple: boolean;
183
183
  }>;
184
184
  props: {
185
185
  clearable?: undefined;
@@ -1 +1 @@
1
- import{WidgetTypeEnums as e}from"../../types/enums.js";import{DatePresetValEnums as l}from"./enums.js";import{NInputNumber as t,NInput as a,NDatePicker as o}from"naive-ui";import r from"./components/CheckboxGroup.vue.js";import p from"./components/Select.vue.js";import s from"moment";import{presetValToTimestamp as n}from"./helpers/presetValToTimestamp.js";const m=e=>null==e?null:e,u=new Map([[e.INPUT_NUMBER,{component:t,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&(console.log("点击keyup>>>>>",l),l())}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`输入${l}`}),setDefaultValue:m}],[e.INPUT,{component:a,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`搜索${l}`}),setDefaultValue:m}],[e.SELECT,{component:p,props:{clearable:!0,options:[],filterable:!0,multiple:!1},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:a}=t;a&&l()}}],handlerProps(e,{valueList:l,multiple:t,title:a}={}){const o={...e,placeholder:`请选择${a}`};return Array.isArray(l)&&(o.options=l.map((({value:e,label:l})=>({value:e,label:l})))),t&&(o.multiple=!0),o},setDefaultValue:m}],[e.DATE,{component:o,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps:(e,{title:l}={})=>({...e,placeholder:`请选择${l}`}),setDefaultValue:(e,t)=>t&&t!==l.CUSTOM?n(t,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATE_TIME,{component:o,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps:(e,{title:l}={})=>({...e,placeholder:`请选择${l}`}),setDefaultValue:(e,t)=>t&&t!==l.CUSTOM?n(t,"YYYY-MM-DD HH:mm:ss"):e}],[e.CHECKBOX_GROUP,{component:r,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:l,multiple:t}={}){const a={...e,multiple:t};return Array.isArray(l)&&(a.options=l.map((({value:e,label:l})=>({value:e,label:l})))),a},setDefaultValue:m}]]),i=(l,t)=>!l||t!==e.DATE&&t!==e.DATE_TIME?l:s(l).format("YYYY-MM-DD HH:mm:ss");export{u as WidgetCfgMaps,i as formatItemData};
1
+ import{WidgetTypeEnums as e}from"../../types/enums.js";import{DatePresetValEnums as l}from"./enums.js";import{NInputNumber as t,NInput as a,NDatePicker as r}from"naive-ui";import o from"./components/CheckboxGroup.vue.js";import p from"./components/Select.vue.js";import s from"moment";import{presetValToTimestamp as n}from"./helpers/presetValToTimestamp.js";const m=e=>null==e?null:e,u=new Map([[e.INPUT_NUMBER,{component:t,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`输入${l}`}),setDefaultValue:m}],[e.INPUT,{component:a,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`搜索${l}`}),setDefaultValue:m}],[e.SELECT,{component:p,props:{clearable:!0,options:[],filterable:!0,multiple:!1},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:a}=t;a&&l()}}],handlerProps(e,{valueList:l,multiple:t,title:a}={}){const r={...e,placeholder:`请选择${a}`};return Array.isArray(l)&&(r.options=l.map((({value:e,label:l})=>({value:e,label:l})))),t&&(r.multiple=!0),r},setDefaultValue:m}],[e.DATE,{component:r,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps:(e,{title:l}={})=>({...e,placeholder:`请选择${l}`}),setDefaultValue:(e,t)=>t&&t!==l.CUSTOM?n(t,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATE_TIME,{component:r,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps:(e,{title:l}={})=>({...e,placeholder:`请选择${l}`}),setDefaultValue:(e,t)=>t&&t!==l.CUSTOM?n(t,"YYYY-MM-DD HH:mm:ss"):e}],[e.CHECKBOX_GROUP,{component:o,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:l,multiple:t}={}){const a={...e,multiple:t};return Array.isArray(l)&&(a.options=l.map((({value:e,label:l})=>({value:e,label:l})))),a},setDefaultValue:m}]]),i=(l,t)=>!l||t!==e.DATE&&t!==e.DATE_TIME?l:s(l).format("YYYY-MM-DD HH:mm:ss");export{u as WidgetCfgMaps,i as formatItemData};
@@ -1 +1 @@
1
- import{ref as e}from"vue";import r from"./useRenderWidget.js";const{initRenderWidgetCfg:t,getRenderSearchConObj:n}=r();function o(){const r=e({});return{filterApiConfig:r,handleGetConfigApi:async function(e,t,n={},o){try{o&&(r.value=o);const i=r.value[t]||null;if("function"==typeof i){const r=await i(e,n);return Promise.resolve(r)}return Promise.reject(new Error(`${t} Is not a function`))}catch(e){return Promise.reject(e)}},outQuickSearchFn:{handlerInitSearchItem(e){Array.isArray(e)&&e.forEach((e=>{t(e)}))}}}}export{o as default};
1
+ import{ref as e}from"vue";import r from"./useRenderWidget.js";const{initRenderWidgetCfg:t}=r();function n(){const r=e({});return{filterApiConfig:r,handleGetConfigApi:async function(e,t,n={},o){try{o&&(r.value=o);const i=r.value[t]||null;if("function"==typeof i){const r=await i(e,n);return Promise.resolve(r)}return Promise.reject(new Error(`${t} Is not a function`))}catch(e){return Promise.reject(e)}},outQuickSearchFn:{handlerInitSearchItem(e){Array.isArray(e)&&e.forEach((e=>{t(e)}))}}}}export{n as default};
@@ -1,13 +1,3 @@
1
- export declare const widgetTypeOptions: {
2
- label: string;
3
- value: string;
4
- }[];
5
- export declare const widgetCfgOptions: {
6
- [x: string]: {
7
- label: string;
8
- value: string;
9
- }[];
10
- };
11
1
  export declare const widgetValOptions: {
12
2
  [x: string]: {
13
3
  [x: string]: {