cnhis-design-vue 3.1.56 → 3.1.57-beta.1

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 (70) hide show
  1. package/README.md +87 -87
  2. package/es/components/audio-sdk/src/audioSDK.js +1 -1
  3. package/es/components/button-print/src/utils/print.d.ts +3 -0
  4. package/es/components/button-print/src/utils/print.js +1 -1
  5. package/es/components/classification/index.d.ts +19 -16
  6. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  7. package/es/components/classification/src/components/set-classification/index.vue.d.ts +0 -15
  8. package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -15
  9. package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
  10. package/es/components/classification/src/index.vue.d.ts +45 -38
  11. package/es/components/classification/src/index.vue2.js +1 -1
  12. package/es/components/classification/style/index.css +1 -1
  13. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  14. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  15. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  16. package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
  17. package/es/components/form-config/index.d.ts +9 -7
  18. package/es/components/form-config/src/FormConfig.vue.d.ts +9 -7
  19. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -3
  20. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +1 -0
  21. package/es/components/form-render/src/components/renderer/switch.d.ts +16 -2
  22. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  23. package/es/components/form-render/src/hooks/useComplexOptions.d.ts +1 -1
  24. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  25. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  26. package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
  27. package/es/components/form-render/src/types/fieldItem.d.ts +3 -8
  28. package/es/components/iho-table/src/constants/index.d.ts +1 -0
  29. package/es/components/iho-table/src/constants/index.js +1 -1
  30. package/es/components/iho-table/src/plugins/index.js +1 -1
  31. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +48 -10
  32. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -1
  33. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -1
  34. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/radioRendererPlugin.js +1 -1
  35. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/switchRendererPlugin.d.ts +1 -0
  36. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/switchRendererPlugin.js +1 -0
  37. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  38. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
  39. package/es/components/iho-table/src/types/index.d.ts +3 -0
  40. package/es/components/index.css +1 -1
  41. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  42. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  43. package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
  44. package/es/components/shortcut-setter/index.d.ts +1 -1
  45. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
  46. package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
  47. package/es/components/table-filter/src/types/index.d.ts +3 -1
  48. package/es/env.d.ts +25 -25
  49. package/es/shared/assets/img/failure.png.js +1 -1
  50. package/es/shared/assets/img/no-permission.png.js +1 -1
  51. package/es/shared/assets/img/nodata.png.js +1 -1
  52. package/es/shared/assets/img/notfound.png.js +1 -1
  53. package/es/shared/assets/img/qr.png.js +1 -1
  54. package/es/shared/assets/img/success.png.js +1 -1
  55. package/es/shared/assets/img/video.png.js +1 -1
  56. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  57. package/es/shared/assets/img/xb_big.png.js +1 -1
  58. package/es/shared/assets/img/xb_small.png.js +1 -1
  59. package/es/shared/hooks/selectHooks/useSelectRenders.d.ts +1 -1
  60. package/es/shared/hooks/selectHooks/useSelectRenders.js +1 -1
  61. package/es/shared/package.json.js +1 -1
  62. package/es/shared/types/business.d.ts +6 -0
  63. package/package.json +2 -2
  64. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  65. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  66. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  67. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  68. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  69. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  70. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -1,5 +1,6 @@
1
1
  import { PropType } from 'vue';
2
2
  import { IClassifyListType, ITreeDataType, IConditionMapType, IClassifyItemType } from '../../../components/table-filter/src/types';
3
+ import { AnyObject } from '../../../shared/types';
3
4
  declare const _default: import("vue").DefineComponent<{
4
5
  tableId: {
5
6
  type: StringConstructor;
@@ -44,6 +45,10 @@ declare const _default: import("vue").DefineComponent<{
44
45
  type: ObjectConstructor;
45
46
  default: () => {};
46
47
  };
48
+ condiTionDigital: {
49
+ type: ObjectConstructor;
50
+ default: () => {};
51
+ };
47
52
  filterType: {
48
53
  type: StringConstructor;
49
54
  default: string;
@@ -97,6 +102,10 @@ declare const _default: import("vue").DefineComponent<{
97
102
  type: ObjectConstructor;
98
103
  default: () => {};
99
104
  };
105
+ condiTionDigital: {
106
+ type: ObjectConstructor;
107
+ default: () => {};
108
+ };
100
109
  filterType: {
101
110
  type: StringConstructor;
102
111
  default: string;
@@ -111,9 +120,11 @@ declare const _default: import("vue").DefineComponent<{
111
120
  classificationWidth: import("vue").Ref<number>;
112
121
  selectShow: import("vue").Ref<boolean>;
113
122
  treeData: import("vue").Ref<{
123
+ [x: string]: any;
114
124
  name: string;
115
- sid?: string | undefined;
125
+ sid: string;
116
126
  children: {
127
+ [x: string]: any;
117
128
  displayCategory: string;
118
129
  isDefault: boolean;
119
130
  isEdit: boolean;
@@ -137,6 +148,7 @@ declare const _default: import("vue").DefineComponent<{
137
148
  selected?: boolean | undefined;
138
149
  }[]>;
139
150
  conditionLists: import("vue").Ref<{
151
+ [x: string]: any;
140
152
  displayCategory: string;
141
153
  isDefault: boolean;
142
154
  isEdit: boolean;
@@ -156,6 +168,7 @@ declare const _default: import("vue").DefineComponent<{
156
168
  from?: string | undefined;
157
169
  }[]>;
158
170
  originConditionList: import("vue").Ref<{
171
+ [x: string]: any;
159
172
  displayCategory: string;
160
173
  isDefault: boolean;
161
174
  isEdit: boolean;
@@ -212,6 +225,7 @@ declare const _default: import("vue").DefineComponent<{
212
225
  handleGetTableCondiTionList: (first?: boolean, conditionMapVal?: {}) => Promise<unknown>;
213
226
  getTableCondiTionListNew: (tableIdVal: any) => Promise<any>;
214
227
  fmtChildName: (name: string, isPublic?: string) => string;
228
+ mergeDigitalMapToTreeData: (list: any[], digitalObj: AnyObject) => void;
215
229
  NIcon: any;
216
230
  NTooltip: any;
217
231
  SettingsOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
@@ -264,7 +278,7 @@ declare const _default: import("vue").DefineComponent<{
264
278
  newSearchFieldList: any;
265
279
  saveLoading: import("vue").Ref<boolean>;
266
280
  searchFilter: any;
267
- filterApiConfig: import("../..").AnyObject;
281
+ filterApiConfig: AnyObject;
268
282
  attrs: {
269
283
  [x: string]: unknown;
270
284
  };
@@ -318,12 +332,6 @@ declare const _default: import("vue").DefineComponent<{
318
332
  default: () => HTMLElement;
319
333
  };
320
334
  }, {
321
- instance: import("axios").AxiosInstance;
322
- attrs: {
323
- [x: string]: unknown;
324
- };
325
- $message: import("naive-ui").MessageApi;
326
- $dialog: import("naive-ui").DialogApi;
327
335
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
328
336
  visibleIn: {
329
337
  type: BooleanConstructor;
@@ -368,7 +376,6 @@ declare const _default: import("vue").DefineComponent<{
368
376
  onFinishSubmit?: ((...args: any[]) => any) | undefined;
369
377
  }>>;
370
378
  emits: (event: "close" | "handleOk" | "resetPopconfirm" | "finishSubmit", ...args: any[]) => void;
371
- isAdmin: import("vue").ComputedRef<unknown>;
372
379
  homeList: any;
373
380
  visible: import("vue").Ref<boolean>;
374
381
  isChangeWindow: import("vue").Ref<boolean>;
@@ -376,23 +383,15 @@ declare const _default: import("vue").DefineComponent<{
376
383
  modalHeight: import("vue").Ref<string>;
377
384
  isShowResetButton: boolean;
378
385
  handleOk: () => void;
379
- rinkTo: () => void;
380
386
  close: () => void;
381
387
  resetChangeWindow: () => void;
382
388
  clickli: (item: IClassifyListType) => void;
383
389
  clickChecked: (item: IClassifyListType) => void;
384
390
  changeSwitch: (item: IClassifyListType) => void;
385
- changecommonSwitch: (item: IClassifyListType) => void;
386
391
  formatParams: (type: string) => {
387
392
  id: string;
388
393
  tableId: string;
389
394
  setting: string;
390
- type?: undefined;
391
- } | {
392
- type: string;
393
- tableId: string;
394
- setting: string;
395
- id?: undefined;
396
395
  } | undefined;
397
396
  changeModalWindow: () => void;
398
397
  popconfirm: (e: any) => void;
@@ -700,6 +699,9 @@ declare const _default: import("vue").DefineComponent<{
700
699
  handleInitConditions: () => Promise<void>;
701
700
  validate: () => Promise<unknown>;
702
701
  saveAdd: () => void;
702
+ /**
703
+ * 改变展示方式
704
+ */
703
705
  cancelSaveAdd: () => void;
704
706
  checkActionList: () => boolean;
705
707
  NSpin: any;
@@ -808,7 +810,7 @@ declare const _default: import("vue").DefineComponent<{
808
810
  isMinuteDisabled(minute: number, hour: number | null): boolean | undefined;
809
811
  isSecondDisabled(second: number, minute: number | null, hour: number | null): boolean | undefined;
810
812
  };
811
- CDatePicker: import("../..").SFCWithInstall<import("vue").DefineComponent<{
813
+ CDatePicker: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
812
814
  updateUnchangedValue: {
813
815
  type: BooleanConstructor;
814
816
  };
@@ -848,7 +850,7 @@ declare const _default: import("vue").DefineComponent<{
848
850
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
849
851
  }>>;
850
852
  emit: (event: "update:formatted-value", ...args: any[]) => void;
851
- datePickerRef: import("vue").Ref<import("../..").AnyObject | null>;
853
+ datePickerRef: import("vue").Ref<AnyObject | null>;
852
854
  panelInstRef: import("vue").Ref<null>;
853
855
  placeholderRef: import("vue").Ref<any>;
854
856
  currentFormattedValue: import("vue").WritableComputedRef<(string | [string, string]) | null | undefined>;
@@ -1114,8 +1116,8 @@ declare const _default: import("vue").DefineComponent<{
1114
1116
  getDynamicSelectData: (params: any, filterApiConfig: any) => Promise<any>;
1115
1117
  emit: (event: "update:modelValue", ...args: any[]) => void;
1116
1118
  isLoading: import("vue").Ref<boolean>;
1117
- filterApiConfig: import("../..").AnyObject;
1118
- classifyFilterList: import("vue").Ref<import("../..").AnyObject[]>;
1119
+ filterApiConfig: AnyObject;
1120
+ classifyFilterList: import("vue").Ref<AnyObject[]>;
1119
1121
  totalPage: import("vue").Ref<number>;
1120
1122
  menuProps: {
1121
1123
  class: string;
@@ -1147,15 +1149,15 @@ declare const _default: import("vue").DefineComponent<{
1147
1149
  NSelect: any;
1148
1150
  SelectDynamicOption: import("vue").DefineComponent<{
1149
1151
  dynamicOptionInfo: {
1150
- type: PropType<import("../..").AnyObject>;
1152
+ type: PropType<AnyObject>;
1151
1153
  default: () => {};
1152
1154
  };
1153
1155
  fieldTitleList: {
1154
- type: PropType<import("../..").AnyObject[]>;
1156
+ type: PropType<AnyObject[]>;
1155
1157
  default: () => never[];
1156
1158
  };
1157
1159
  optionList: {
1158
- type: PropType<import("../..").AnyObject[]>;
1160
+ type: PropType<AnyObject[]>;
1159
1161
  default: () => never[];
1160
1162
  };
1161
1163
  isMultiple: {
@@ -1182,15 +1184,15 @@ declare const _default: import("vue").DefineComponent<{
1182
1184
  selectMinWidth: number;
1183
1185
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1184
1186
  dynamicOptionInfo: {
1185
- type: PropType<import("../..").AnyObject>;
1187
+ type: PropType<AnyObject>;
1186
1188
  default: () => {};
1187
1189
  };
1188
1190
  fieldTitleList: {
1189
- type: PropType<import("../..").AnyObject[]>;
1191
+ type: PropType<AnyObject[]>;
1190
1192
  default: () => never[];
1191
1193
  };
1192
1194
  optionList: {
1193
- type: PropType<import("../..").AnyObject[]>;
1195
+ type: PropType<AnyObject[]>;
1194
1196
  default: () => never[];
1195
1197
  };
1196
1198
  isMultiple: {
@@ -1270,15 +1272,15 @@ declare const _default: import("vue").DefineComponent<{
1270
1272
  ArrowForward: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1271
1273
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("updateSelect" | "updatePage")[], "updateSelect" | "updatePage", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1272
1274
  dynamicOptionInfo: {
1273
- type: PropType<import("../..").AnyObject>;
1275
+ type: PropType<AnyObject>;
1274
1276
  default: () => {};
1275
1277
  };
1276
1278
  fieldTitleList: {
1277
- type: PropType<import("../..").AnyObject[]>;
1279
+ type: PropType<AnyObject[]>;
1278
1280
  default: () => never[];
1279
1281
  };
1280
1282
  optionList: {
1281
- type: PropType<import("../..").AnyObject[]>;
1283
+ type: PropType<AnyObject[]>;
1282
1284
  default: () => never[];
1283
1285
  };
1284
1286
  isMultiple: {
@@ -1306,9 +1308,9 @@ declare const _default: import("vue").DefineComponent<{
1306
1308
  onUpdatePage?: ((...args: any[]) => any) | undefined;
1307
1309
  }, {
1308
1310
  loading: boolean;
1309
- dynamicOptionInfo: import("../..").AnyObject;
1310
- fieldTitleList: import("../..").AnyObject[];
1311
- optionList: import("../..").AnyObject[];
1311
+ dynamicOptionInfo: AnyObject;
1312
+ fieldTitleList: AnyObject[];
1313
+ optionList: AnyObject[];
1312
1314
  isMultiple: boolean;
1313
1315
  curPage: number;
1314
1316
  isLastPage: boolean;
@@ -1449,7 +1451,7 @@ declare const _default: import("vue").DefineComponent<{
1449
1451
  };
1450
1452
  NSelect: any;
1451
1453
  NPopover: any;
1452
- CDatePicker: import("../..").SFCWithInstall<import("vue").DefineComponent<{
1454
+ CDatePicker: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
1453
1455
  updateUnchangedValue: {
1454
1456
  type: BooleanConstructor;
1455
1457
  };
@@ -1489,7 +1491,7 @@ declare const _default: import("vue").DefineComponent<{
1489
1491
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1490
1492
  }>>;
1491
1493
  emit: (event: "update:formatted-value", ...args: any[]) => void;
1492
- datePickerRef: import("vue").Ref<import("../..").AnyObject | null>;
1494
+ datePickerRef: import("vue").Ref<AnyObject | null>;
1493
1495
  panelInstRef: import("vue").Ref<null>;
1494
1496
  placeholderRef: import("vue").Ref<any>;
1495
1497
  currentFormattedValue: import("vue").WritableComputedRef<(string | [string, string]) | null | undefined>;
@@ -1602,7 +1604,7 @@ declare const _default: import("vue").DefineComponent<{
1602
1604
  }>>;
1603
1605
  emit: (event: "update:modelValue", ...args: any[]) => void;
1604
1606
  tagList: import("vue").Ref<never[]>;
1605
- filterApiConfig: import("../..").AnyObject;
1607
+ filterApiConfig: AnyObject;
1606
1608
  valueCp: import("vue").WritableComputedRef<string[]>;
1607
1609
  optionList: import("vue").ComputedRef<import("naive-ui").SelectOption[]>;
1608
1610
  initTagList: () => Promise<void>;
@@ -1896,7 +1898,7 @@ declare const _default: import("vue").DefineComponent<{
1896
1898
  dateType: any;
1897
1899
  valueFormat: import("vue").ComputedRef<string>;
1898
1900
  compType: import("vue").ComputedRef<any>;
1899
- CDatePicker: import("../..").SFCWithInstall<import("vue").DefineComponent<{
1901
+ CDatePicker: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
1900
1902
  updateUnchangedValue: {
1901
1903
  type: BooleanConstructor;
1902
1904
  };
@@ -1936,7 +1938,7 @@ declare const _default: import("vue").DefineComponent<{
1936
1938
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1937
1939
  }>>;
1938
1940
  emit: (event: "update:formatted-value", ...args: any[]) => void;
1939
- datePickerRef: import("vue").Ref<import("../..").AnyObject | null>;
1941
+ datePickerRef: import("vue").Ref<AnyObject | null>;
1940
1942
  panelInstRef: import("vue").Ref<null>;
1941
1943
  placeholderRef: import("vue").Ref<any>;
1942
1944
  currentFormattedValue: import("vue").WritableComputedRef<(string | [string, string]) | null | undefined>;
@@ -2277,6 +2279,10 @@ declare const _default: import("vue").DefineComponent<{
2277
2279
  type: ObjectConstructor;
2278
2280
  default: () => {};
2279
2281
  };
2282
+ condiTionDigital: {
2283
+ type: ObjectConstructor;
2284
+ default: () => {};
2285
+ };
2280
2286
  filterType: {
2281
2287
  type: StringConstructor;
2282
2288
  default: string;
@@ -2296,6 +2302,7 @@ declare const _default: import("vue").DefineComponent<{
2296
2302
  hideConditionChangeSetting: number;
2297
2303
  hideClearConditionChange: number;
2298
2304
  isShowResetButton: boolean;
2305
+ condiTionDigital: Record<string, any>;
2299
2306
  filterType: string;
2300
2307
  }>;
2301
2308
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as i,ref as n,provide as l,computed as t,onMounted as a,nextTick as s,watch as o,openBlock as d,createElementBlock as c,normalizeClass as r,unref as h,normalizeStyle as u,withDirectives as f,createVNode as p,createTextVNode as m,toDisplayString as g,createCommentVNode as v,createElementVNode as y,Fragment as C,renderList as k,createBlock as S,withCtx as b}from"vue";import{useMessage as x,NIcon as O,NTooltip as _}from"naive-ui";import{Repeat as I,SettingsOutline as w,ChevronDown as L,ChevronForward as N,Checkmark as z,Close as j,ChevronUp as B}from"@vicons/ionicons5";import P from"./components/set-classification/index.vue.js";import{vFlexibleResize as J}from"../../../shared/directive/flexibleResize.js";import{InjectionFilterApiConfig as M,InjectionClassifyfilterType as A}from"../../table-filter/src/constants/index.js";import{root_isShowResetButton as T}from"./const/index.js";import E from"../../table-filter/src/hooks/useMixins.js";import F from"../../table-filter/src/hooks/useAdvanced.js";const R={key:0,class:"header"},W={class:"tree"},q=["onClick"],G=["onClick"],Q=["onClick"],$={class:"child-item-name"},D={key:1,class:"tree-type-footer"},V={class:"selected-num"},H=y("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),K={key:0,class:"tile-type classify-1"},U={key:0,class:"header"},X={class:"right-setting"},Y=["onClick"],Z={class:"parent ellips"},ee={class:"children"},ie=["onClick"],ne={key:1,class:"selected-list"},le={class:"selected-num"},te=y("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),ae={class:"name"},se={class:"name"},oe={key:0,class:"main-wrapper"},de=["onClick"],ce={class:"tree-footer"},re=["onClick"],he=["onClick"],ue={key:0,class:"select-type-footer"},fe={class:"selected-num"},pe=y("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1);var me=e({__name:"index",props:{tableId:{type:String,default:""},searchFieldList:{type:Array,default:()=>[]},conditionMap:{type:Object,default:()=>({})},conditionSid:{type:Array,default:()=>["all_data"]},curClassificationIndex:{type:Number,default:0},curClassificationWidth:{type:Number},hideConditionChangeBtn:{type:Number,default:0},hideConditionChangeSetting:{type:Number,default:0},hideClearConditionChange:{type:Number,default:1},isShowResetButton:{type:Boolean,default:!0},filterApiConfig:{type:Object,default:()=>({})},filterType:{type:String,default:"1"}},emits:["changeSearch","setClassificationIndex","getQuickSearchListObj"],setup(e,{emit:me}){const ge=e,{handleGetConfigApi:ve}=E(),{transformClassifyChild:ye}=F(),Ce=i(),ke=x(),Se=n(null);let be=n(150),xe=n(!1),Oe=n([]),_e=n([]),Ie=n([]),we=n(2),Le=n({name:"全部数据",sid:"all_data"}),Ne=n([]),ze=n(""),je=n(!1),Be=n("全部数据");l(T,ge.isShowResetButton),l(M,ge.filterApiConfig),l(A,ge.filterType);let Pe=t((()=>0===we.value?{marginRight:"8px"}:2===we.value?{display:"inline-block"}:{})),Je=t((()=>{let e=_e.value.filter((e=>-1!==ge.conditionSid.indexOf(e.sid)));if(-1!==ge.conditionSid.indexOf("all_data"))return"全部数据";{let i=[];return e.map((e=>{i.push(e.name)})),i.join(",")}})),Me=t((()=>function(e){let i=0===e.digital?"(0)":e.digital?`(${e.digital})`:"";const{name:n,isPublic:l}=e;return Xe(n,l)+i}));function Ae(e){e.open?e.open=!1:e.open=!0}function Te(e,i,n){Be.value=e.name;let l=function(e){let i=[];return Oe.value.forEach((n=>{n.children?n.children.forEach((n=>{-1!==e.indexOf(n.sid)?(n.selected=!0,i.push(n)):n.selected=!1})):-1!==e.indexOf(n.sid)?(n.selected=!0,i.push(n)):n.selected=!1})),i}(function(e,i,n){let l=JSON.parse(JSON.stringify(i));l="all_data"===e||-1!==l.indexOf(e)?["all_data"]:[e];return l}(e.sid,ge.conditionSid));qe(!1);const t=ye(null==e?void 0:e.conObj,ge.searchFieldList);me("changeSearch",Boolean("all_data"===e.sid),e,t,n,l)}function Ee(){let e="";if(2===we.value)e=0;else{let i=we.value;e=++i}be.value=150,Fe(e)}async function Fe(e,i){let n={tableId:ge.tableId,setting:JSON.stringify({classificationIndex:e,classificationWidth:i})};try{await ve(n,"requestSaveListPersonaSetting",{},ge.filterApiConfig)&&me("setClassificationIndex",e)}catch(e){console.log(e)}}function Re(){je.value=!0,qe(!1)}function We(e){je.value=e}function qe(e){xe.value=void 0===e?!xe.value:e}function Ge(){if(!ge.tableId)return ke.warning("请传入tableId");Oe.value=[];let{displayCategoryList:e=[],conditionList:i=[],settingId:n=""}=ge.conditionMap;Ne.value=JSON.parse(JSON.stringify(e))||[],Ie.value=JSON.parse(JSON.stringify(i)),_e.value=JSON.parse(JSON.stringify([{name:"全部数据",sid:"all_data"},...i])),ze.value=n;let l=[];var t;0===Ne.value.length&&(Ne.value=["未分类"]),Ne.value.forEach((e=>{let i={name:e,children:[]};_e.value.forEach((n=>{if(n.displayCategory===e||!n.displayCategory&&"未分类"===e&&"all_data"!==n.sid){if(-1!==ge.conditionSid.indexOf(n.sid)){n.selected=!0,i.open=!0;const e=ye(null==n?void 0:n.conObj,ge.searchFieldList);me("changeSearch",!1,n,e)}n.isShow&&i.children.push(n)}})),i.children.length>0&&l.push(i)})),l.unshift({name:"全部数据",sid:"all_data"}),Oe.value=l,0===we.value&&(t=!0,Oe.value.forEach((e=>{e.children&&e.children.length&&(e.open=t)})))}function Qe({distance:e}){const i=be.value+e;be.value=Math.min(Math.max(i,50),650)}function $e(){Fe(we.value,be.value)}async function De(){await Ue(ge.tableId),He()}async function Ve(e){await Ue(ge.tableId),Ke()}function He(e){Ke(e).then((e=>({})))}function Ke(e,i={}){if(!ge.tableId)return new Promise((e=>e(!1)));let n=Object.keys(i).length>0?i:JSON.parse(JSON.stringify(ge.conditionMap));return new Promise(((i,l)=>{var t,a,s,o,d,c,r;if(Object.keys(n).length>0){Ie.value=n.conditionList||[],Ne.value=n.displayCategoryList||[];let l={conditionList:Ie.value,displayCategoryList:Ne.value};me("getQuickSearchListObj",l),ze.value=null!=(t=n.settingId)?t:"";const h=Ie.value.find((e=>e.isDefault))||{name:"全部数据",sid:"all_data"};(null==(s=null==(a=Ce.tableOptions)?void 0:a.filterCondition)?void 0:s.displayCategory)&&e&&i({name:null==(d=null==(o=Ce.tableOptions)?void 0:o.filterCondition)?void 0:d.name,sid:null==(r=null==(c=Ce.tableOptions)?void 0:c.filterCondition)?void 0:r.displayCategory}),i(h)}else i({})}))}async function Ue(e){try{if(!e)return new Promise((e=>e(!1)));let i={tableId:e},n=await ve(i,"requestTableCondiTionList",{},ge.filterApiConfig);return Promise.resolve(n)}catch(e){return Promise.resolve(!1)}}function Xe(e,i){return i&&e&&"1"===i?e.replace(/\(公共\)$/,""):e}return a((()=>{document.addEventListener("click",(e=>{s((()=>{let i=e.composedPath&&e.composedPath();Se.value&&i.includes(Se.value)||qe(!1)}))}))})),o((()=>ge.tableId),(e=>{e&&He(!0)}),{immediate:!0}),o((()=>ge.curClassificationIndex),(e=>{void 0!==e&&(we.value=e,Ge())}),{immediate:!0}),o((()=>ge.curClassificationWidth),(e=>{e&&(be.value=Number(e)||150)}),{immediate:!0}),o((()=>ge.conditionMap),(e=>{!async function(){try{await Ge()}catch(e){console.log(e)}}()}),{immediate:!0,deep:!0}),(i,n)=>(d(),c("div",{class:r(["classification-block","classificationIndex-"+h(we)]),style:u(h(Pe))},[0===h(we)?f((d(),c("div",{key:0,class:"tree-type classify-0",style:u({width:h(be)+"px",paddingBottom:1!=e.hideClearConditionChange?"80px":0,position:"relative"})},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",R,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"header-1",onClick:Ee},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"header-1",onClick:Re},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),m(" "+g("设置"))])):v("v-if",!0)])):v("v-if",!0),y("ul",W,[(d(!0),c(C,null,k(h(Oe),((i,n)=>(d(),c(C,null,[0===n||!i.children||0===i.children.length||i.children&&0!==i.children.filter((e=>e.isShow)).length?(d(),c("li",{key:n,class:r(["tree-item",{"tree-header":0===n||!i.children||0===i.children.length}])},[0!==n&&i.children&&0!==i.children.length?(d(),c(C,{key:1},[y("span",{class:r(["parent",{open:i.open}]),onClick:e=>Ae(i)},[y("span",null,g(i.name),1),p(h(O),{component:i.open?h(L):h(N)},null,8,["component"])],10,G),i.open?(d(!0),c(C,{key:0},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{key:n,class:"children",onClick:n=>Te(e,0,i)},[e.isShow?(d(),S(h(_),{key:0,trigger:"hover",placement:"right"},{trigger:b((()=>[y("span",{class:r(["child-item",{selected:e.selected}])},[y("span",$,g(Xe(e.name,null==e?void 0:e.isPublic)),1),e.selected?(d(),S(h(O),{key:0,component:h(z),size:"20"},null,8,["component"])):v("v-if",!0)],2)])),default:b((()=>[y("span",null,g(h(Me)(e)),1)])),_:2},1024)):v("v-if",!0)],8,Q)))),128)):v("v-if",!0)],64)):(d(),c("span",{key:0,class:r(["child-item header-item",{selected:i.selected||-1!==e.conditionSid.indexOf("all_data")}]),onClick:e=>Te(i)},g(i.name),11,q))],2)):v("v-if",!0)],64)))),256))]),1!=e.hideClearConditionChange?(d(),c("div",D,[y("div",V,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),y("div",{class:"selected-item-del",onClick:n[0]||(n[0]=e=>Te({sid:"all_data",name:"全部数据",digital:h(Le).digital}))},[H,m(" 清空筛选 ")])])):v("v-if",!0)],4)),[[h(J),{mode:"VR",onMove:Qe,onEnd:$e}]]):v("v-if",!0),1===h(we)?(d(),c(C,{key:1},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting||1!=e.hideConditionChangeSetting||h(Ie).filter((e=>e.isShow)).length>0?(d(),c("div",K,[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",U,[y("span",{class:r(["all-data",{selected:-1!==e.conditionSid.indexOf("all_data")}]),onClick:n[1]||(n[1]=e=>Te({sid:"all_data",name:"全部数据",digital:h(Le).digital}))},[m(" 全部数据 "),h(Le).digital||0===h(Le).digital?(d(),c(C,{key:0},[m(" ("+g(h(Le).digital||0)+") ",1)],64)):v("v-if",!0)],2),y("div",X,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"setting-1",onClick:Ee,style:{"margin-right":"30px"}},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"setting-1",onClick:Re},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),m(" "+g("设置"))])):v("v-if",!0)])])):v("v-if",!0),y("ul",{class:"tile",style:u({borderBottom:1!=e.hideClearConditionChange?"1px solid #d5d5d5":0})},[(d(!0),c(C,null,k(h(Oe).slice(1),((e,i)=>(d(),c(C,null,[e.children&&e.children.length>0?(d(),c("li",{class:"tile-item",key:i},[e.children&&0!==e.children.length?(d(),c(C,{key:1},[y("span",Z,g(e.name),1),y("div",ee,[(d(!0),c(C,null,k(e.children,((i,n)=>(d(),c(C,null,[i.isShow?(d(),c("span",{key:n,class:r(["child-item",{selected:i.selected}]),onClick:n=>Te(i,0,e)},g(Xe(i.name,null==i?void 0:i.isPublic)),11,ie)):v("v-if",!0)],64)))),256))])],64)):(d(),c("span",{key:0,class:r(["child-item",{selected:e.selected}]),style:{"padding-left":"17px"},onClick:i=>Te(e)},g(e.name)+" "+g(e.digital),11,Y))])):v("v-if",!0)],64)))),256))],4),1!=e.hideClearConditionChange?(d(),c("div",ne,[y("div",le,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),(d(!0),c(C,null,k(h(Oe).slice(1),(e=>(d(),c(C,null,[e.children&&0!==e.children.length?(d(!0),c(C,{key:1},k(e.children,((i,n)=>(d(),c(C,null,[i.selected?(d(),c("div",{class:"selected-item",key:i.sid},[m(g(i.name)+" ",1),p(h(O),{component:h(j),onClick:n=>Te(i,0,e)},null,8,["component","onClick"])])):v("v-if",!0)],64)))),256)):(d(),c("div",{class:"selected-item",key:e.sid},[m(g(e.name)+" ",1),p(h(O),{component:h(j),onClick:i=>Te(e)},null,8,["component","onClick"])]))],64)))),256)),y("div",{class:"selected-item-del",onClick:n[2]||(n[2]=e=>Te({sid:"all_data",name:"全部数据",digital:h(Le).digital}))},[te,m(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],64)):v("v-if",!0),2===h(we)?(d(),c("div",{key:2,class:"select-type classify-2",ref_key:"selectType",ref:Se},[y("span",{class:"title",onClick:n[3]||(n[3]=()=>qe())},[p(h(_),{trigger:"hover",placement:"top"},{trigger:b((()=>[y("span",ae,g(h(Je)),1)])),default:b((()=>[y("span",se,g(h(Je)),1)])),_:1}),p(h(O),{component:h(xe)?h(B):h(L)},null,8,["component"])]),h(xe)?(d(),c("div",oe,[y("ul",{class:"tree",style:u({padding:1!=e.hideClearConditionChange?"40px 0":"40px 0 0"})},[(d(!0),c(C,null,k(h(Oe),((i,n)=>(d(),c(C,null,[0===n||!i.children||0===i.children.length||i.children&&0!==i.children.filter((e=>e.isShow)).length?(d(),c("li",{key:n,class:r(["tree-item",{"tree-header":0===n||!i.children||0===i.children.length}])},[0!==n&&i.children&&0!==i.children.length?(d(),c(C,{key:1},[0!==i.children.filter((e=>e.isShow)).length?(d(),c("span",{key:0,class:r(["parent",{open:i.open}]),onClick:e=>Ae(i)},[m(g(i.name)+g(i.digital||0===i.digital?"("+i.digital+")":"")+" ",1),p(h(O),{component:i.open?h(L):h(N)},null,8,["component"])],10,re)):v("v-if",!0),i.open?(d(!0),c(C,{key:1},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{key:n,class:"children",onClick:n=>Te(e,0,i)},[e.isShow?(d(),S(h(_),{key:0,placement:"right",trigger:"hover","z-index":1e4},{trigger:b((()=>[y("span",{class:r(["child-item",{selected:e.selected}])},[y("span",null,g(Xe(e.name,null==e?void 0:e.isPublic)),1),e.selected?(d(),S(h(O),{key:0,component:h(z),size:"20"},null,8,["component"])):v("v-if",!0)],2)])),default:b((()=>[y("span",null,g(h(Me)(e)),1)])),_:2},1024)):v("v-if",!0)],8,he)))),128)):v("v-if",!0)],64)):(d(),c(C,{key:0},[y("span",{class:r(["child-item child-header header-item",{selected:i.selected||-1!==e.conditionSid.indexOf("all_data")}]),onClick:e=>Te(i)},g(i.name),11,de),y("div",ce,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"tree-footer-icon",onClick:Ee},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"tree-footer-icon",onClick:Re},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),m(" "+g("设置"))])):v("v-if",!0)])],64))],2)):v("v-if",!0)],64)))),256))],4),1!=e.hideClearConditionChange?(d(),c("div",ue,[y("div",fe,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),y("div",{class:"selected-item-del",onClick:n[4]||(n[4]=e=>Te({sid:"all_data",name:"全部数据",digital:h(Le).digital}))},[pe,m(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],512)):v("v-if",!0),v(" 弹出弹窗 "),p(P,{ref:"search",searchFieldList:e.searchFieldList,conditionList:h(Ie),displayCategoryList:h(Ne),settingId:h(ze),tableId:e.tableId,classifyModal:h(je),onSaveGetTableCondiTionList:Ve,onCondiTionListInit:De,onSetClassifyModal:We},null,8,["searchFieldList","conditionList","displayCategoryList","settingId","tableId","classifyModal"])],6))}});export{me as default};
1
+ import{defineComponent as e,useAttrs as i,ref as n,provide as l,computed as t,onMounted as a,nextTick as s,watch as o,openBlock as d,createElementBlock as c,normalizeClass as r,unref as u,normalizeStyle as h,withDirectives as f,createVNode as p,createTextVNode as m,toDisplayString as v,createCommentVNode as g,createElementVNode as y,Fragment as C,renderList as k,createBlock as b,withCtx as S}from"vue";import{useMessage as N,NIcon as O,NTooltip as x}from"naive-ui";import{Repeat as L,SettingsOutline as _,ChevronDown as I,ChevronForward as w,Checkmark as j,Close as z,ChevronUp as B}from"@vicons/ionicons5";import T from"./components/set-classification/index.vue.js";import{vFlexibleResize as P}from"../../../shared/directive/flexibleResize.js";import{InjectionFilterApiConfig as A,InjectionClassifyfilterType as J}from"../../table-filter/src/constants/index.js";import{root_isShowResetButton as M}from"./const/index.js";import E from"../../table-filter/src/hooks/useMixins.js";import D from"../../table-filter/src/hooks/useAdvanced.js";const F={key:0,class:"header"},R={class:"tree"},W=["onClick"],q={class:"number"},G={key:0,class:"item-count"},Q=["onClick"],$=["onClick"],V={class:"child-item-name"},H={class:"number"},K={key:0,class:"item-count"},U={key:1,class:"tree-type-footer"},X={class:"selected-num"},Y=y("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),Z={key:0,class:"tile-type classify-1"},ee={key:0,class:"header"},ie={key:0,class:"item-count"},ne={class:"right-setting"},le=["onClick"],te={class:"parent ellips"},ae={class:"children"},se=["onClick"],oe={class:"number"},de={key:0,class:"item-count"},ce={key:1,class:"selected-list"},re={class:"selected-num"},ue=y("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),he={class:"name"},fe={class:"name"},pe={key:0,class:"main-wrapper"},me=["onClick"],ve={class:"number"},ge={key:0,class:"item-count"},ye={class:"tree-footer"},Ce=["onClick"],ke=["onClick"],be={class:"child-item-name"},Se={class:"number"},Ne={key:0,class:"item-count"},Oe={key:0,class:"select-type-footer"},xe={class:"selected-num"},Le=y("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1);var _e=e({__name:"index",props:{tableId:{type:String,default:""},searchFieldList:{type:Array,default:()=>[]},conditionMap:{type:Object,default:()=>({})},conditionSid:{type:Array,default:()=>["all_data"]},curClassificationIndex:{type:Number,default:0},curClassificationWidth:{type:Number},hideConditionChangeBtn:{type:Number,default:0},hideConditionChangeSetting:{type:Number,default:0},hideClearConditionChange:{type:Number,default:1},isShowResetButton:{type:Boolean,default:!0},filterApiConfig:{type:Object,default:()=>({})},condiTionDigital:{type:Object,default:()=>({})},filterType:{type:String,default:"1"}},emits:["changeSearch","setClassificationIndex","getQuickSearchListObj"],setup(e,{emit:_e}){const Ie=e,{handleGetConfigApi:we}=E(),{transformClassifyChild:je}=D(),ze=i(),Be=N(),Te=n(null);let Pe=n(150),Ae=n(!1),Je=n([]),Me=n([]),Ee=n([]),De=n(2),Fe=n({name:"全部数据",sid:"all_data"}),Re=n([]),We=n(""),qe=n(!1),Ge=n("全部数据");l(M,Ie.isShowResetButton),l(A,Ie.filterApiConfig),l(J,Ie.filterType);let Qe=t((()=>0===De.value?{marginRight:"8px"}:2===De.value?{display:"inline-block"}:{})),$e=t((()=>{let e=Me.value.filter((e=>-1!==Ie.conditionSid.indexOf(e.sid)));if(-1!==Ie.conditionSid.indexOf("all_data"))return"全部数据";{let i=[];return e.map((e=>{i.push(e.name)})),i.join(",")}})),Ve=t((()=>function(e){let i=0===e.digital?"(0)":e.digital?`(${e.digital})`:"";const{name:n,isPublic:l}=e;return ci(n,l)+i}));function He(e){e.open?e.open=!1:e.open=!0}function Ke(e,i,n){Ge.value=e.name;let l=function(e){let i=[];return Je.value.forEach((n=>{n.children?n.children.forEach((n=>{-1!==e.indexOf(n.sid)?(n.selected=!0,i.push(n)):n.selected=!1})):-1!==e.indexOf(n.sid)?(n.selected=!0,i.push(n)):n.selected=!1})),i}(function(e,i,n){let l=JSON.parse(JSON.stringify(i));l="all_data"===e||-1!==l.indexOf(e)?["all_data"]:[e];return l}(e.sid,Ie.conditionSid));ei(!1);const t=je(null==e?void 0:e.conObj,Ie.searchFieldList);_e("changeSearch",Boolean("all_data"===e.sid),e,t,n,l)}function Ue(){let e="";if(2===De.value)e=0;else{let i=De.value;e=++i}Pe.value=150,Xe(e)}async function Xe(e,i){let n={tableId:Ie.tableId,setting:JSON.stringify({classificationIndex:e,classificationWidth:i})};try{await we(n,"requestSaveListPersonaSetting",{},Ie.filterApiConfig)&&_e("setClassificationIndex",e)}catch(e){console.log(e)}}function Ye(){qe.value=!0,ei(!1)}function Ze(e){qe.value=e}function ei(e){Ae.value=void 0===e?!Ae.value:e}function ii(){if(!Ie.tableId)return Be.warning("请传入tableId");Je.value=[];let{displayCategoryList:e=[],conditionList:i=[],settingId:n=""}=Ie.conditionMap;Re.value=JSON.parse(JSON.stringify(e))||[],Ee.value=JSON.parse(JSON.stringify(i)),Me.value=JSON.parse(JSON.stringify([{name:"全部数据",sid:"all_data"},...i])),We.value=n;let l=[];var t;0===Re.value.length&&(Re.value=["未分类"]),Re.value.forEach((e=>{let i={name:e,children:[]};Me.value.forEach((n=>{if(n.displayCategory===e||!n.displayCategory&&"未分类"===e&&"all_data"!==n.sid){if(-1!==Ie.conditionSid.indexOf(n.sid)){n.selected=!0,i.open=!0;const e=je(null==n?void 0:n.conObj,Ie.searchFieldList);_e("changeSearch",!1,n,e)}n.isShow&&i.children.push(n)}})),i.children.length>0&&l.push(i)})),l.unshift({name:"全部数据",sid:"all_data"}),Je.value=l,0===De.value&&(t=!0,Je.value.forEach((e=>{e.children&&e.children.length&&(e.open=t)}))),ri(Je.value,Ie.condiTionDigital)}function ni({distance:e}){const i=Pe.value+e;Pe.value=Math.min(Math.max(i,50),650)}function li(){Xe(De.value,Pe.value)}async function ti(){await di(Ie.tableId),si()}async function ai(e){await di(Ie.tableId),oi()}function si(e){oi(e).then((e=>({})))}function oi(e,i={}){if(!Ie.tableId)return new Promise((e=>e(!1)));let n=Object.keys(i).length>0?i:JSON.parse(JSON.stringify(Ie.conditionMap));return new Promise(((i,l)=>{var t,a,s,o,d,c,r;if(Object.keys(n).length>0){Ee.value=n.conditionList||[],Re.value=n.displayCategoryList||[];let l={conditionList:Ee.value,displayCategoryList:Re.value};_e("getQuickSearchListObj",l),We.value=null!=(t=n.settingId)?t:"";const u=Ee.value.find((e=>e.isDefault))||{name:"全部数据",sid:"all_data"};(null==(s=null==(a=ze.tableOptions)?void 0:a.filterCondition)?void 0:s.displayCategory)&&e&&i({name:null==(d=null==(o=ze.tableOptions)?void 0:o.filterCondition)?void 0:d.name,sid:null==(r=null==(c=ze.tableOptions)?void 0:c.filterCondition)?void 0:r.displayCategory}),i(u)}else i({})}))}async function di(e){try{if(!e)return new Promise((e=>e(!1)));let i={tableId:e},n=await we(i,"requestTableCondiTionList",{},Ie.filterApiConfig);return Promise.resolve(n)}catch(e){return Promise.resolve(!1)}}function ci(e,i){return i&&e&&"1"===i?e.replace(/\(公共\)$/,""):e}function ri(e,i){const n=Object.keys(i);e.forEach((e=>{var l;e.resultNumber=void 0,"all_data"===e.sid&&(e.resultNumber=i.ALL),n.includes(null==e?void 0:e.sid)&&(e.resultNumber=i[e.sid]),(null==(l=null==e?void 0:e.children)?void 0:l.length)>0&&ri(null==e?void 0:e.children,i)}))}return a((()=>{document.addEventListener("click",(e=>{s((()=>{let i=e.composedPath&&e.composedPath();Te.value&&i.includes(Te.value)||ei(!1)}))}))})),o((()=>Ie.tableId),(e=>{e&&si(!0)}),{immediate:!0}),o((()=>Ie.curClassificationIndex),(e=>{void 0!==e&&(De.value=e,ii())}),{immediate:!0}),o((()=>Ie.curClassificationWidth),(e=>{e&&(Pe.value=Number(e)||150)}),{immediate:!0}),o((()=>Ie.conditionMap),(e=>{!async function(){try{await ii()}catch(e){console.log(e)}}()}),{immediate:!0,deep:!0}),o((()=>Ie.condiTionDigital),(e=>{ri(Je.value,e)}),{immediate:!0,deep:!0}),(i,n)=>{var l,t;return d(),c("div",{class:r(["classification-block","classificationIndex-"+u(De)]),style:h(u(Qe))},[0===u(De)?f((d(),c("div",{key:0,class:"tree-type classify-0",style:h({width:u(Pe)+"px",paddingBottom:1!=e.hideClearConditionChange?"80px":0,position:"relative"})},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",F,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"header-1",onClick:Ue},[p(u(O),{component:u(L),size:"16"},null,8,["component"]),m(" "+v("切换"))])):g("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"header-1",onClick:Ye},[p(u(O),{component:u(_),size:"16"},null,8,["component"]),m(" "+v("设置"))])):g("v-if",!0)])):g("v-if",!0),y("ul",R,[(d(!0),c(C,null,k(u(Je),((i,n)=>(d(),c(C,null,[0===n||!i.children||0===i.children.length||i.children&&0!==i.children.filter((e=>e.isShow)).length?(d(),c("li",{key:n,class:r(["tree-item",{"tree-header":0===n||!i.children||0===i.children.length}])},[0!==n&&i.children&&0!==i.children.length?(d(),c(C,{key:1},[y("span",{class:r(["parent",{open:i.open}]),onClick:e=>He(i)},[y("span",null,v(i.name),1),p(u(O),{component:i.open?u(I):u(w)},null,8,["component"])],10,Q),i.open?(d(!0),c(C,{key:0},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{key:n,class:"children",onClick:n=>Ke(e,0,i)},[e.isShow?(d(),b(u(x),{key:0,trigger:"hover",placement:"right"},{trigger:S((()=>[y("span",{class:r(["child-item",{selected:e.selected}])},[y("span",V,[y("span",H,v(ci(e.name,null==e?void 0:e.isPublic)),1),null!=e.resultNumber?(d(),c("label",K,[m("("),y("span",null,v(e.resultNumber),1),m(")")])):g("v-if",!0)]),e.selected?(d(),b(u(O),{key:0,component:u(j),size:"20"},null,8,["component"])):g("v-if",!0)],2)])),default:S((()=>[y("span",null,[m(v(u(Ve)(e))+" ",1),null!=e.resultNumber?(d(),c(C,{key:0},[m("("+v(e.resultNumber)+")",1)],64)):g("v-if",!0)])])),_:2},1024)):g("v-if",!0)],8,$)))),128)):g("v-if",!0)],64)):(d(),c("span",{key:0,class:r(["child-item header-item",{selected:i.selected||-1!==e.conditionSid.indexOf("all_data")}]),onClick:e=>Ke(i)},[g("全部数据 "),y("span",q,v(i.name),1),null!=i.resultNumber?(d(),c("label",G,[m("("),y("span",null,v(i.resultNumber),1),m(")")])):g("v-if",!0)],10,W))],2)):g("v-if",!0)],64)))),256))]),1!=e.hideClearConditionChange?(d(),c("div",U,[y("div",X,"已选择"+v(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),y("div",{class:"selected-item-del",onClick:n[0]||(n[0]=e=>Ke({sid:"all_data",name:"全部数据",digital:u(Fe).digital}))},[Y,m(" 清空筛选 ")])])):g("v-if",!0)],4)),[[u(P),{mode:"VR",onMove:ni,onEnd:li}]]):g("v-if",!0),1===u(De)?(d(),c(C,{key:1},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting||1!=e.hideConditionChangeSetting||u(Ee).filter((e=>e.isShow)).length>0?(d(),c("div",Z,[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",ee,[y("span",{class:r(["all-data",{selected:-1!==e.conditionSid.indexOf("all_data")}]),onClick:n[1]||(n[1]=e=>Ke({sid:"all_data",name:"全部数据",digital:u(Fe).digital}))},[m(" 全部数据 "),null!=(null==(l=e.condiTionDigital)?void 0:l.ALL)?(d(),c("label",ie,[m("("),y("span",null,v((null==(t=e.condiTionDigital)?void 0:t.ALL)||0),1),m(")")])):g("v-if",!0),u(Fe).digital||0===u(Fe).digital?(d(),c(C,{key:1},[m(" ("+v(u(Fe).digital||0)+") ",1)],64)):g("v-if",!0)],2),y("div",ne,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"setting-1",onClick:Ue,style:{"margin-right":"30px"}},[p(u(O),{component:u(L),size:"16"},null,8,["component"]),m(" "+v("切换"))])):g("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"setting-1",onClick:Ye},[p(u(O),{component:u(_),size:"16"},null,8,["component"]),m(" "+v("设置"))])):g("v-if",!0)])])):g("v-if",!0),y("ul",{class:"tile",style:h({borderBottom:1!=e.hideClearConditionChange?"1px solid #d5d5d5":0})},[(d(!0),c(C,null,k(u(Je).slice(1),((e,i)=>(d(),c(C,null,[e.children&&e.children.length>0?(d(),c("li",{class:"tile-item",key:i},[e.children&&0!==e.children.length?(d(),c(C,{key:1},[y("span",te,v(e.name),1),y("div",ae,[(d(!0),c(C,null,k(e.children,((i,n)=>(d(),c(C,null,[i.isShow?(d(),c("span",{key:n,class:r(["child-item",{selected:i.selected}]),onClick:n=>Ke(i,0,e)},[y("span",oe,v(ci(i.name,null==i?void 0:i.isPublic)),1),null!=i.resultNumber?(d(),c("label",de,[m("("),y("span",null,v(i.resultNumber),1),m(")")])):g("v-if",!0)],10,se)):g("v-if",!0)],64)))),256))])],64)):(d(),c("span",{key:0,class:r(["child-item",{selected:e.selected}]),style:{"padding-left":"17px"},onClick:i=>Ke(e)},v(e.name)+" "+v(e.digital),11,le))])):g("v-if",!0)],64)))),256))],4),1!=e.hideClearConditionChange?(d(),c("div",ce,[y("div",re,"已选择"+v(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),(d(!0),c(C,null,k(u(Je).slice(1),(e=>(d(),c(C,null,[e.children&&0!==e.children.length?(d(!0),c(C,{key:1},k(e.children,((i,n)=>(d(),c(C,null,[i.selected?(d(),c("div",{class:"selected-item",key:i.sid},[m(v(i.name)+" ",1),p(u(O),{component:u(z),onClick:n=>Ke(i,0,e)},null,8,["component","onClick"])])):g("v-if",!0)],64)))),256)):(d(),c("div",{class:"selected-item",key:e.sid},[m(v(e.name)+" ",1),p(u(O),{component:u(z),onClick:i=>Ke(e)},null,8,["component","onClick"])]))],64)))),256)),y("div",{class:"selected-item-del",onClick:n[2]||(n[2]=e=>Ke({sid:"all_data",name:"全部数据",digital:u(Fe).digital}))},[ue,m(" 清空筛选 ")])])):g("v-if",!0)])):g("v-if",!0)],64)):g("v-if",!0),2===u(De)?(d(),c("div",{key:2,class:"select-type classify-2",ref_key:"selectType",ref:Te},[y("span",{class:"title",onClick:n[3]||(n[3]=()=>ei())},[p(u(x),{trigger:"hover",placement:"top"},{trigger:S((()=>[y("span",he,v(u($e)),1)])),default:S((()=>[y("span",fe,v(u($e)),1)])),_:1}),p(u(O),{component:u(Ae)?u(B):u(I)},null,8,["component"])]),u(Ae)?(d(),c("div",pe,[y("ul",{class:"tree",style:h({padding:1!=e.hideClearConditionChange?"40px 0":"40px 0 0"})},[(d(!0),c(C,null,k(u(Je),((i,n)=>(d(),c(C,null,[0===n||!i.children||0===i.children.length||i.children&&0!==i.children.filter((e=>e.isShow)).length?(d(),c("li",{key:n,class:r(["tree-item",{"tree-header":0===n||!i.children||0===i.children.length}])},[0!==n&&i.children&&0!==i.children.length?(d(),c(C,{key:1},[0!==i.children.filter((e=>e.isShow)).length?(d(),c("span",{key:0,class:r(["parent",{open:i.open}]),onClick:e=>He(i)},[m(v(i.name)+v(i.digital||0===i.digital?"("+i.digital+")":"")+" ",1),p(u(O),{component:i.open?u(I):u(w)},null,8,["component"])],10,Ce)):g("v-if",!0),i.open?(d(!0),c(C,{key:1},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{key:n,class:"children",onClick:n=>Ke(e,0,i)},[e.isShow?(d(),b(u(x),{key:0,placement:"right",trigger:"hover","z-index":1e4},{trigger:S((()=>[y("span",{class:r(["child-item",{selected:e.selected}])},[y("span",be,[y("span",Se,v(ci(e.name,null==e?void 0:e.isPublic)),1),null!=e.resultNumber?(d(),c("label",Ne,[m("("),y("span",null,v(e.resultNumber),1),m(")")])):g("v-if",!0)]),e.selected?(d(),b(u(O),{key:0,component:u(j),size:"20"},null,8,["component"])):g("v-if",!0)],2)])),default:S((()=>[y("span",null,[m(v(u(Ve)(e)),1),null!=e.resultNumber?(d(),c(C,{key:0},[m("("+v(e.resultNumber)+")",1)],64)):g("v-if",!0)])])),_:2},1024)):g("v-if",!0)],8,ke)))),128)):g("v-if",!0)],64)):(d(),c(C,{key:0},[y("span",{class:r(["child-item child-header header-item",{selected:i.selected||-1!==e.conditionSid.indexOf("all_data")}]),onClick:e=>Ke(i)},[y("span",ve,v(i.name),1),null!=i.resultNumber?(d(),c("label",ge,[m("("),y("span",null,v(i.resultNumber),1),m(")")])):g("v-if",!0)],10,me),y("div",ye,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"tree-footer-icon",onClick:Ue},[p(u(O),{component:u(L),size:"16"},null,8,["component"]),m(" "+v("切换"))])):g("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"tree-footer-icon",onClick:Ye},[p(u(O),{component:u(_),size:"16"},null,8,["component"]),m(" "+v("设置"))])):g("v-if",!0)])],64))],2)):g("v-if",!0)],64)))),256))],4),1!=e.hideClearConditionChange?(d(),c("div",Oe,[y("div",xe,"已选择"+v(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),y("div",{class:"selected-item-del",onClick:n[4]||(n[4]=e=>Ke({sid:"all_data",name:"全部数据",digital:u(Fe).digital}))},[Le,m(" 清空筛选 ")])])):g("v-if",!0)])):g("v-if",!0)],512)):g("v-if",!0),g(" 弹出弹窗 "),p(T,{ref:"search",searchFieldList:e.searchFieldList,conditionList:u(Ee),displayCategoryList:u(Re),settingId:u(We),tableId:e.tableId,classifyModal:u(qe),onSaveGetTableCondiTionList:ai,onCondiTionListInit:ti,onSetClassifyModal:Ze},null,8,["searchFieldList","conditionList","displayCategoryList","settingId","tableId","classifyModal"])],6)}}});export{_e as default};
@@ -1 +1 @@
1
- @font-face{font-family:classification-iconfont;src:url(classification-iconfont.ttf) format("truetype")}.iconfont-table-filter{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:classification-iconfont!important;font-size:14px;font-style:normal}.icon-table-filter-menzhenyishengzhananniuqingchu:before{content:"\e74e"}.icon-table-filter-menzhenyishengzhananniushanchu2:before{content:"\e757"}.icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi:before{content:"\e76e"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2:before{content:"\e778"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua:before{content:"\e779"}.icon-table-filter-reset:before{content:"\e611"}.icon-table-filter-shaixuan:before{content:"\e64b"}.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter{cursor:pointer;font-size:18px}.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter:last-child{margin-left:16px}.classification-modal-block .n-card-header .svg-wrap .n-icon{cursor:pointer}.classification-modal-block .n-card__content{overflow-y:auto}.classification-modal-block .n-card__content .table-modal-list .list-title{background-color:#f2f2f4;border:1px solid #e1dfdf;display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-title .list-title-item{font-weight:700;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content{padding:0}.classification-modal-block .n-card__content .table-modal-list .list-content li{display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item{align-items:center;display:flex;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item .n-icon{cursor:pointer;margin-right:8px}.classification-modal-block .n-card__content .table-modal-list .list-content li.checked,.classification-modal-block .n-card__content .table-modal-list .list-content li.checked .text{background-color:#f2f2f2}.classification-modal-block .n-card__content .table-modal-list .list-content li .text{background-color:#fff;display:inline-block;padding:0 10px;position:relative}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line{position:relative;text-align:center;width:75%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line:before{border:1px solid #e8e8e8;content:"";left:0;margin-top:20px;position:absolute;width:100%}.classification-modal-block .n-card__content .table-modal-list .list-title-item{margin-left:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item{border-bottom:1px solid #e1dfdf;margin-left:-1px;margin-top:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch{height:16px;min-width:28px;width:28px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch:after{height:12px;width:12px}.classification-modal-block .n-card__content .table-modal-list .list-content-radio,.classification-modal-block .n-card__content .table-modal-list .list-content-switch{text-align:center}.classification-modal-block .n-card__content .table-modal-list .anticon+.anticon{margin-left:8px}.classification-modal-block .n-card__content .class-filter-content .item-name{display:flex;height:32px;line-height:32px;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .item-name .label{text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .item-name .addAction{align-items:center;cursor:pointer;display:flex}.classification-modal-block .n-card__content .class-filter-content .item-name .blue{color:#2d7aff;margin-right:8px}.classification-modal-block .n-card__content .class-filter-content .n-form-item-label{width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content{align-items:center;display:flex;flex-wrap:wrap;line-height:32px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .label{display:inline-block;height:32px;line-height:32px;margin-bottom:10px;text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn-dashed{border-color:#a6a6a6;color:#a6a6a6}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .parent-name{align-items:center;display:flex}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .parent-input{margin-bottom:10px;margin-right:10px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag{align-items:center;background-color:rgba(45,122,255,.1);border:1px solid #2d7aff;border-radius:3px;box-sizing:border-box;color:#2d7aff;display:flex;justify-content:center;margin-bottom:10px;margin-right:10px;max-width:120px;padding:0 10px;position:relative}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .anticon-close{color:#2d7aff;cursor:pointer;display:flex;justify-content:center;line-height:1;width:18px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select,.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .ant-input-disabled{background-color:#2d7aff;color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .anticon-close{color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn{margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list{border-top:1px solid #e6e6e6;margin-bottom:6px;margin-top:16px;padding:12px 0 0}.classification-modal-block .n-card__content .class-filter-content .select-item-list li{align-items:center;display:flex;list-style:none;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .index-span{display:inline-block;width:30px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item{margin-right:10px;width:120px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item.n-date-picker{width:auto}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper{display:flex}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper .form-item{margin-right:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .delete-item-icon{color:red;cursor:pointer;font-size:18px;margin-left:8px}.classification-modal-block .n-card__content .class-filter-content .filter-expression{display:flex;flex-direction:column}.classification-modal-block .n-card__content .class-filter-content .filter-expression .textarea{margin-top:6px}.classification-modal-block .n-card__footer{padding-top:10px}.classification-modal-block .n-card__footer .flex_between{display:flex;justify-content:space-between}.classification-modal-block .n-card__footer .flex_right{display:flex;justify-content:right}.classification-modal-block .n-card__footer .n-button{margin-left:8px}.classification-block .tree-type{border:1px solid #d5d5d5;border-radius:4px;height:100%;line-height:32px;margin-top:0;padding-bottom:80px;width:150px}.classification-block .tree-type .header{border-bottom:1px solid #e6eaef;display:flex;font-size:14px;justify-content:space-between;padding:0 10px}.classification-block .tree-type .header .header-1{align-items:center;cursor:pointer;display:flex}.classification-block .tree-type .tree{height:calc(100% - 32px);line-height:32px;margin:0;overflow:auto;padding-left:0}.classification-block .tree-type .tree::-webkit-scrollbar{width:5px}.classification-block .tree-type .tree .tree-item{border-bottom:1px solid #d5d5d5;cursor:pointer}.classification-block .tree-type .tree .tree-item.tree-header{box-sizing:border-box;padding:0 10px}.classification-block .tree-type .tree .tree-item .parent{align-items:center;display:flex;font-weight:600;justify-content:space-between;padding:0 10px}.classification-block .tree-type .tree .tree-item .parent.open{background-color:#f2f2f2;border-bottom:1px solid #d5d5d5}.classification-block .tree-type .tree .tree-item .header-item{box-sizing:border-box;line-height:1.4}.classification-block .tree-type .tree .tree-item .header-item.selected,.classification-block .tree-type .tree .tree-item .header-item:hover{color:#2d7aff}.classification-block .tree-type .tree .tree-item .header-item:active{border-color:transparent;color:#000}.classification-block .tree-type .tree .tree-item .children{align-items:center;display:flex;height:32px;padding-left:23px;padding-right:10px}.classification-block .tree-type .tree .tree-item .children .child-item{align-items:center;border-bottom:1px solid transparent;color:#7c7c7c;display:flex;line-height:1.5;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-block .tree-type .tree .tree-item .children .child-item:hover{color:#2d7aff}.classification-block .tree-type .tree .tree-item .children .child-item.selected{align-items:center;color:#2d7aff;display:flex;justify-content:space-between;width:100%}.classification-block .tree-type .tree .tree-item .children .child-item:active{border-color:transparent;color:#000}.classification-block .tree-type .tree .tree-item .children .child-item.disabled{color:rgba(0,0,0,.2)}.classification-block .tree-type .tree .tree-item .children .child-item .child-item-content{align-items:center;display:flex}.classification-block .tree-type .tree .tree-item .children .child-item .child-item-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-block .tree-type .tree .tree-item .children .child-item .digital-span{flex:1;margin-left:5px;text-align:left}.classification-block .tree-type .tree .tree-item:last-child{border-bottom:none}.classification-block .tree-type .tree-type-footer{border-top:1px solid #d5d5d5;bottom:0;height:80px;line-height:20px;padding-left:16px;position:absolute;width:100%}.classification-block .tree-type .tree-type-footer .selected-num{margin:10px}.classification-block .tree-type .tree-type-footer .selected-item-del{align-items:center;color:#2474ff;cursor:pointer;display:flex;justify-content:center;margin-left:0}.classification-block .tile-type{border:1px solid #d5d5d5;border-radius:4px;margin-bottom:8px;padding:0 17px}.classification-block .tile-type .header{align-items:center;border-bottom:1px solid #d5d5d5;display:inline-flex;justify-content:space-between;line-height:44px;width:100%}.classification-block .tile-type .header .all-data{border-bottom:1px solid transparent;font-family:PingFangSC-Medium,PingFang SC;font-size:14px;font-weight:500;line-height:1.4;margin-right:auto}.classification-block .tile-type .header .all-data:hover{color:#2d7aff}.classification-block .tile-type .header .all-data:active{border-color:transparent;color:#000}.classification-block .tile-type .header .selected{color:#2d7aff}.classification-block .tile-type .header .right-setting{display:flex}.classification-block .tile-type .header .right-setting .setting-1{align-items:center;cursor:pointer;display:flex}.classification-block .tile-type .header .right-setting .setting-1 .n-icon{margin-right:6px}.classification-block .tile-type .header .right-setting .upack-up-btn{color:#2d7aff}.classification-block .tile-type .tile{border-bottom:1px solid #d5d5d5;margin:0;padding:9px 0}.classification-block .tile-type .tile .tile-item{cursor:pointer;display:flex;line-height:38px}.classification-block .tile-type .tile .tile-item .parent{box-sizing:border-box;font-family:PingFangSC-Medium,PingFang SC;font-size:14px;font-weight:600;max-width:135px;padding-right:16px;width:135px}.classification-block .tile-type .tile .tile-item .children{flex:1}.classification-block .tile-type .tile .tile-item .children .child-item{border-bottom:1px solid transparent;border-radius:4px;color:#7c7c7c;display:inline-block;font-size:14px;line-height:1.5;margin:0 5px;padding:1px 6px}.classification-block .tile-type .tile .tile-item .children .child-item.selected,.classification-block .tile-type .tile .tile-item .children .child-item:hover{background-color:rgba(45,122,255,.1);color:#2d7aff}.classification-block .tile-type .tile .tile-item .children .child-item:active{border-color:transparent;color:#000}.classification-block .tile-type .tile .tile-item .children .child-item.disabled{color:rgba(0,0,0,.2)}.classification-block .tile-type .tile .tile-item .child-item.selected{color:#2d7aff}.classification-block .tile-type .selected-list{align-items:center;display:flex;padding:12px 6px}.classification-block .tile-type .selected-list .selected-num{font-size:14px;line-height:20px;margin-right:8px}.classification-block .tile-type .selected-list .selected-item{align-items:center;background-color:rgba(45,122,255,.1);border-radius:4px;color:#2d7aff;cursor:pointer;display:flex;margin-left:8px;padding:1px 8px}.classification-block .tile-type .selected-list .selected-item-del{align-items:center;color:#2474ff;cursor:pointer;display:flex;font-size:14px;line-height:20px;margin-left:22px}.classification-block .select-type{height:32px;line-height:32px;margin-bottom:8px;margin-right:8px;position:relative;width:100px}.classification-block .select-type .title{align-items:center;border:1px solid #d5d5d5;border-radius:4px;box-sizing:border-box;color:#969696;cursor:pointer;display:flex;font-size:12px;height:100%;justify-content:space-between;padding:0 8px;width:100%}.classification-block .select-type .title>.name{color:#212121;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-block .select-type .main-wrapper{background-color:#fff;border:1px solid #d5d5d5;border-radius:4px;min-width:270px;position:absolute;top:39px;width:100%;z-index:3000}.classification-block .select-type .main-wrapper::-webkit-scrollbar{width:5px}.classification-block .select-type .tree{margin:0;max-height:300px;overflow:auto;padding:32px 0}.classification-block .select-type .tree .tree-item{border-bottom:1px solid #d5d5d5;cursor:pointer;line-height:32px}.classification-block .select-type .tree .tree-item.tree-header{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;height:40px;padding:0 10px;position:absolute;top:0;width:100%;z-index:1}.classification-block .select-type .tree .tree-item .tree-footer{align-items:center;color:rgba(0,0,0,.6);display:flex}.classification-block .select-type .tree .tree-item .tree-footer .tree-footer-icon{align-items:center;cursor:pointer;display:flex}.classification-block .select-type .tree .tree-item .tree-footer .tree-footer-icon .n-icon{margin-right:6px}.classification-block .select-type .tree .tree-item .tree-footer .tree-footer-icon:first-child{margin-right:16px}.classification-block .select-type .tree .tree-item .parent{align-items:center;display:flex;font-weight:600;justify-content:space-between;padding:0 10px}.classification-block .select-type .tree .tree-item .parent.open{background-color:#f2f2f2;border-bottom:1px solid #d5d5d5}.classification-block .select-type .tree .tree-item .header-item{border-bottom:1px solid transparent;color:rgba(0,0,0,.6);flex:1}.classification-block .select-type .tree .tree-item .header-item.selected,.classification-block .select-type .tree .tree-item .header-item:hover{color:#2d7aff}.classification-block .select-type .tree .tree-item .header-item:active{border-color:transparent;color:#000}.classification-block .select-type .tree .tree-item .children{align-items:center;display:flex;height:32px;line-height:32px;padding-left:23px;padding-right:10px}.classification-block .select-type .tree .tree-item .children .child-item{border-bottom:1px solid transparent;color:#7c7c7c;display:inline-block;line-height:1.5;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-block .select-type .tree .tree-item .children .child-item.child-header{padding:0 10px}.classification-block .select-type .tree .tree-item .children .child-item.header-item{border-bottom:1px solid transparent;color:rgba(0,0,0,.6)}.classification-block .select-type .tree .tree-item .children .child-item.header-item.selected,.classification-block .select-type .tree .tree-item .children .child-item.header-item:hover{color:#2d7aff}.classification-block .select-type .tree .tree-item .children .child-item.header-item:active{border-color:transparent;color:#000}.classification-block .select-type .tree .tree-item .children .child-item:hover{color:#2d7aff}.classification-block .select-type .tree .tree-item .children .child-item.selected{align-items:center;color:#2d7aff;display:flex;justify-content:space-between;width:100%}.classification-block .select-type .tree .tree-item .children .child-item:active{border-color:transparent;color:#000}.classification-block .select-type .tree .tree-item .children .child-item.disabled{color:rgba(0,0,0,.2)}.classification-block .select-type .tree .tree-item:last-child{border-bottom:0}.classification-block .select-type .select-type-footer{align-items:center;background-color:#fff;border-top:1px solid #d5d5d5;bottom:0;display:flex;height:40px;justify-content:space-between;padding:0 12px;position:absolute;width:100%}.classification-block .select-type .select-type-footer .selected-num{color:rgba(0,0,0,.6)}.classification-block .select-type .select-type-footer .selected-item-del{color:#2474ff;cursor:pointer}
1
+ @font-face{font-family:classification-iconfont;src:url(classification-iconfont.ttf) format("truetype")}.iconfont-table-filter{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:classification-iconfont!important;font-size:14px;font-style:normal}.icon-table-filter-menzhenyishengzhananniuqingchu:before{content:"\e74e"}.icon-table-filter-menzhenyishengzhananniushanchu2:before{content:"\e757"}.icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi:before{content:"\e76e"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2:before{content:"\e778"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua:before{content:"\e779"}.icon-table-filter-reset:before{content:"\e611"}.icon-table-filter-shaixuan:before{content:"\e64b"}.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter{cursor:pointer;font-size:18px}.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter:last-child{margin-left:16px}.classification-modal-block .n-card-header .svg-wrap .n-icon{cursor:pointer}.classification-modal-block .n-card__content{overflow-y:auto}.classification-modal-block .n-card__content .table-modal-list .list-title{background-color:#f2f2f4;border:1px solid #e1dfdf;display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-title .list-title-item{font-weight:700;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content{padding:0}.classification-modal-block .n-card__content .table-modal-list .list-content li{display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item{align-items:center;display:flex;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item .n-icon{cursor:pointer;margin-right:8px}.classification-modal-block .n-card__content .table-modal-list .list-content li.checked,.classification-modal-block .n-card__content .table-modal-list .list-content li.checked .text{background-color:#f2f2f2}.classification-modal-block .n-card__content .table-modal-list .list-content li .text{background-color:#fff;display:inline-block;padding:0 10px;position:relative}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line{position:relative;text-align:center;width:75%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line:before{border:1px solid #e8e8e8;content:"";left:0;margin-top:20px;position:absolute;width:100%}.classification-modal-block .n-card__content .table-modal-list .list-title-item{margin-left:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item{border-bottom:1px solid #e1dfdf;margin-left:-1px;margin-top:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch{height:16px;min-width:28px;width:28px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch:after{height:12px;width:12px}.classification-modal-block .n-card__content .table-modal-list .list-content-radio,.classification-modal-block .n-card__content .table-modal-list .list-content-switch{text-align:center}.classification-modal-block .n-card__content .table-modal-list .anticon+.anticon{margin-left:8px}.classification-modal-block .n-card__content .class-filter-content .item-name{display:flex;height:32px;line-height:32px;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .item-name .label{text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .item-name .addAction{align-items:center;cursor:pointer;display:flex}.classification-modal-block .n-card__content .class-filter-content .item-name .blue{color:#2d7aff;margin-right:8px}.classification-modal-block .n-card__content .class-filter-content .n-form-item-label{width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content{align-items:center;display:flex;flex-wrap:wrap;line-height:32px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .label{display:inline-block;height:32px;line-height:32px;margin-bottom:10px;text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn-dashed{border-color:#a6a6a6;color:#a6a6a6}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .parent-name{align-items:center;display:flex}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .parent-input{margin-bottom:10px;margin-right:10px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag{align-items:center;background-color:rgba(45,122,255,.1);border:1px solid #2d7aff;border-radius:3px;box-sizing:border-box;color:#2d7aff;display:flex;justify-content:center;margin-bottom:10px;margin-right:10px;max-width:120px;padding:0 10px;position:relative}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .anticon-close{color:#2d7aff;cursor:pointer;display:flex;justify-content:center;line-height:1;width:18px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select,.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .ant-input-disabled{background-color:#2d7aff;color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .anticon-close{color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn{margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list{border-top:1px solid #e6e6e6;margin-bottom:6px;margin-top:16px;padding:12px 0 0}.classification-modal-block .n-card__content .class-filter-content .select-item-list li{align-items:center;display:flex;list-style:none;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .index-span{display:inline-block;width:30px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item{margin-right:10px;width:120px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item.n-date-picker{width:auto}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper{display:flex}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper .form-item{margin-right:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .delete-item-icon{color:red;cursor:pointer;font-size:18px;margin-left:8px}.classification-modal-block .n-card__content .class-filter-content .filter-expression{display:flex;flex-direction:column}.classification-modal-block .n-card__content .class-filter-content .filter-expression .textarea{margin-top:6px}.classification-modal-block .n-card__footer{padding-top:10px}.classification-modal-block .n-card__footer .flex_between{display:flex;justify-content:space-between}.classification-modal-block .n-card__footer .flex_right{display:flex;justify-content:right}.classification-modal-block .n-card__footer .n-button{margin-left:8px}.classification-block .tree-type{border:1px solid #d5d5d5;border-radius:4px;height:100%;line-height:32px;margin-top:0;padding-bottom:80px;width:150px}.classification-block .tree-type .header{border-bottom:1px solid #e6eaef;display:flex;font-size:14px;justify-content:space-between;padding:0 10px}.classification-block .tree-type .header .header-1{align-items:center;cursor:pointer;display:flex}.classification-block .tree-type .tree{height:calc(100% - 32px);line-height:32px;margin:0;overflow:auto;padding-left:0}.classification-block .tree-type .tree::-webkit-scrollbar{width:5px}.classification-block .tree-type .tree .tree-item{border-bottom:1px solid #d5d5d5;cursor:pointer}.classification-block .tree-type .tree .tree-item.tree-header{box-sizing:border-box;padding:0 10px}.classification-block .tree-type .tree .tree-item .parent{align-items:center;display:flex;font-weight:600;justify-content:space-between;padding:0 10px}.classification-block .tree-type .tree .tree-item .parent.open{background-color:#f2f2f2;border-bottom:1px solid #d5d5d5}.classification-block .tree-type .tree .tree-item .header-item{box-sizing:border-box;line-height:1.4}.classification-block .tree-type .tree .tree-item .header-item.selected,.classification-block .tree-type .tree .tree-item .header-item:hover{color:#2d7aff}.classification-block .tree-type .tree .tree-item .header-item:active{border-color:transparent;color:#000}.classification-block .tree-type .tree .tree-item .children{align-items:center;display:flex;height:32px;padding-left:23px;padding-right:10px}.classification-block .tree-type .tree .tree-item .children .child-item{align-items:center;border-bottom:1px solid transparent;color:#7c7c7c;display:flex;line-height:1.5;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-block .tree-type .tree .tree-item .children .child-item:hover{color:#2d7aff}.classification-block .tree-type .tree .tree-item .children .child-item.selected{align-items:center;color:#2d7aff;display:flex;justify-content:space-between;width:100%}.classification-block .tree-type .tree .tree-item .children .child-item:active{border-color:transparent;color:#000}.classification-block .tree-type .tree .tree-item .children .child-item.disabled{color:rgba(0,0,0,.2)}.classification-block .tree-type .tree .tree-item .children .child-item .child-item-content{align-items:center;display:flex}.classification-block .tree-type .tree .tree-item .children .child-item .child-item-name{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-block .tree-type .tree .tree-item .children .child-item .child-item-name .number{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-block .tree-type .tree .tree-item .children .child-item .digital-span{flex:1;margin-left:5px;text-align:left}.classification-block .tree-type .tree .tree-item:last-child{border-bottom:none}.classification-block .tree-type .tree-type-footer{border-top:1px solid #d5d5d5;bottom:0;height:80px;line-height:20px;padding-left:16px;position:absolute;width:100%}.classification-block .tree-type .tree-type-footer .selected-num{margin:10px}.classification-block .tree-type .tree-type-footer .selected-item-del{align-items:center;color:#2474ff;cursor:pointer;display:flex;justify-content:center;margin-left:0}.classification-block .tile-type{border:1px solid #d5d5d5;border-radius:4px;margin-bottom:8px;padding:0 17px}.classification-block .tile-type .header{align-items:center;border-bottom:1px solid #d5d5d5;display:inline-flex;justify-content:space-between;line-height:44px;width:100%}.classification-block .tile-type .header .all-data{border-bottom:1px solid transparent;font-family:PingFangSC-Medium,PingFang SC;font-size:14px;font-weight:500;line-height:1.4;margin-right:auto}.classification-block .tile-type .header .all-data:hover{color:#2d7aff}.classification-block .tile-type .header .all-data:active{border-color:transparent;color:#000}.classification-block .tile-type .header .selected{color:#2d7aff}.classification-block .tile-type .header .right-setting{display:flex}.classification-block .tile-type .header .right-setting .setting-1{align-items:center;cursor:pointer;display:flex}.classification-block .tile-type .header .right-setting .setting-1 .n-icon{margin-right:6px}.classification-block .tile-type .header .right-setting .upack-up-btn{color:#2d7aff}.classification-block .tile-type .tile{border-bottom:1px solid #d5d5d5;margin:0;padding:9px 0}.classification-block .tile-type .tile .tile-item{cursor:pointer;display:flex;line-height:38px}.classification-block .tile-type .tile .tile-item .parent{box-sizing:border-box;font-family:PingFangSC-Medium,PingFang SC;font-size:14px;font-weight:600;max-width:135px;padding-right:16px;width:135px}.classification-block .tile-type .tile .tile-item .children{flex:1}.classification-block .tile-type .tile .tile-item .children .child-item{border-bottom:1px solid transparent;border-radius:4px;color:#7c7c7c;display:inline-block;font-size:14px;line-height:1.5;margin:0 5px;padding:1px 6px}.classification-block .tile-type .tile .tile-item .children .child-item.selected,.classification-block .tile-type .tile .tile-item .children .child-item:hover{background-color:rgba(45,122,255,.1);color:#2d7aff}.classification-block .tile-type .tile .tile-item .children .child-item:active{border-color:transparent;color:#000}.classification-block .tile-type .tile .tile-item .children .child-item.disabled{color:rgba(0,0,0,.2)}.classification-block .tile-type .tile .tile-item .child-item.selected{color:#2d7aff}.classification-block .tile-type .selected-list{align-items:center;display:flex;padding:12px 6px}.classification-block .tile-type .selected-list .selected-num{font-size:14px;line-height:20px;margin-right:8px}.classification-block .tile-type .selected-list .selected-item{align-items:center;background-color:rgba(45,122,255,.1);border-radius:4px;color:#2d7aff;cursor:pointer;display:flex;margin-left:8px;padding:1px 8px}.classification-block .tile-type .selected-list .selected-item-del{align-items:center;color:#2474ff;cursor:pointer;display:flex;font-size:14px;line-height:20px;margin-left:22px}.classification-block .select-type{height:32px;line-height:32px;margin-bottom:8px;margin-right:8px;position:relative;width:100px}.classification-block .select-type .title{align-items:center;border:1px solid #d5d5d5;border-radius:4px;box-sizing:border-box;color:#969696;cursor:pointer;display:flex;font-size:12px;height:100%;justify-content:space-between;padding:0 8px;width:100%}.classification-block .select-type .title>.name{color:#212121;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-block .select-type .main-wrapper{background-color:#fff;border:1px solid #d5d5d5;border-radius:4px;min-width:270px;position:absolute;top:39px;width:100%;z-index:3000}.classification-block .select-type .main-wrapper::-webkit-scrollbar{width:5px}.classification-block .select-type .tree{margin:0;max-height:300px;overflow:auto;padding:32px 0}.classification-block .select-type .tree .tree-item{border-bottom:1px solid #d5d5d5;cursor:pointer;line-height:32px}.classification-block .select-type .tree .tree-item.tree-header{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;height:40px;padding:0 10px;position:absolute;top:0;width:100%;z-index:1}.classification-block .select-type .tree .tree-item .tree-footer{align-items:center;color:rgba(0,0,0,.6);display:flex}.classification-block .select-type .tree .tree-item .tree-footer .tree-footer-icon{align-items:center;cursor:pointer;display:flex}.classification-block .select-type .tree .tree-item .tree-footer .tree-footer-icon .n-icon{margin-right:6px}.classification-block .select-type .tree .tree-item .tree-footer .tree-footer-icon:first-child{margin-right:16px}.classification-block .select-type .tree .tree-item .parent{align-items:center;display:flex;font-weight:600;justify-content:space-between;padding:0 10px}.classification-block .select-type .tree .tree-item .parent.open{background-color:#f2f2f2;border-bottom:1px solid #d5d5d5}.classification-block .select-type .tree .tree-item .header-item{border-bottom:1px solid transparent;color:rgba(0,0,0,.6);flex:1}.classification-block .select-type .tree .tree-item .header-item.selected,.classification-block .select-type .tree .tree-item .header-item:hover{color:#2d7aff}.classification-block .select-type .tree .tree-item .header-item:active{border-color:transparent;color:#000}.classification-block .select-type .tree .tree-item .children{align-items:center;display:flex;height:32px;line-height:32px;padding-left:23px;padding-right:10px}.classification-block .select-type .tree .tree-item .children .child-item{border-bottom:1px solid transparent;color:#7c7c7c;display:inline-block;line-height:1.5;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-block .select-type .tree .tree-item .children .child-item .child-item-name{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-block .select-type .tree .tree-item .children .child-item .child-item-name .number{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-block .select-type .tree .tree-item .children .child-item.child-header{padding:0 10px}.classification-block .select-type .tree .tree-item .children .child-item.header-item{border-bottom:1px solid transparent;color:rgba(0,0,0,.6)}.classification-block .select-type .tree .tree-item .children .child-item.header-item.selected,.classification-block .select-type .tree .tree-item .children .child-item.header-item:hover{color:#2d7aff}.classification-block .select-type .tree .tree-item .children .child-item.header-item:active{border-color:transparent;color:#000}.classification-block .select-type .tree .tree-item .children .child-item:hover{color:#2d7aff}.classification-block .select-type .tree .tree-item .children .child-item.selected{align-items:center;color:#2d7aff;display:flex;justify-content:space-between;width:100%}.classification-block .select-type .tree .tree-item .children .child-item:active{border-color:transparent;color:#000}.classification-block .select-type .tree .tree-item .children .child-item.disabled{color:rgba(0,0,0,.2)}.classification-block .select-type .tree .tree-item:last-child{border-bottom:0}.classification-block .select-type .select-type-footer{align-items:center;background-color:#fff;border-top:1px solid #d5d5d5;bottom:0;display:flex;height:40px;justify-content:space-between;padding:0 12px;position:absolute;width:100%}.classification-block .select-type .select-type-footer .selected-num{color:rgba(0,0,0,.6)}.classification-block .select-type .select-type-footer .selected-item-del{color:#2474ff;cursor:pointer}.classification-block .item-count span{color:#db0a0a}
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,inject as a,computed as t,watch as u,openBlock as n,createBlock as i,unref as o,normalizeClass as v,isRef as d,withCtx as r,createVNode as s,normalizeStyle as p,createElementVNode as f,createTextVNode as m,createCommentVNode as c,createElementBlock as y,Fragment as h,renderList as _,withDirectives as g,withKeys as b,withModifiers as x,vShow as k,toDisplayString as M}from"vue";import{useMessage as w,NModal as H,NCard as C,NButton as U,NForm as S,NFormItem as j,NInput as O,NTooltip as I,NSelect as z,NGrid as T,NGridItem as N,NIcon as Y,NInputNumber as $,NPopover as L,NDatePicker as V,NTimePicker as B,NSwitch as D}from"naive-ui";import{isMulti as F,isShowOptions as P,isNumber as q,isDate as A,isCandidate as E,isTextarea as J}from"../utils/index.js";import K from"moment";import{InjectionExpandFieldApiConfig as R}from"../constants/index.js";import W from"../hooks/useAsyncData.js";import{HtmlTypeList as X}from"../utils/constant.js";import{isJSON as G,isValidDate as Q}from"../utils/tool.js";import Z from"./FormBatchOptionsModal.vue.js";import ee from"./FormItemPerson.vue.js";const le={class:"svg-wrap"},ae={class:"flex_right"},te={class:"options-title"},ue=f("span",null,"字段键名",-1),ne=f("i",{class:"iconfont-expand-field icon-expand-field-help"},null,-1),ie={class:"options-title"},oe=f("span",null,"字段问号提示",-1),ve=f("i",{class:"iconfont-expand-field icon-expand-field-help"},null,-1),de={class:"options-title"},re=f("span",null,"选项值",-1),se=f("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[f("path",{d:"M12 12h2v12h-2z",fill:"currentColor"}),f("path",{d:"M18 12h2v12h-2z",fill:"currentColor"}),f("path",{d:"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z",fill:"currentColor"}),f("path",{d:"M12 2h8v2h-8z",fill:"currentColor"})],-1),pe={class:"options-title"},fe=f("span",null,"默认值",-1),me=f("i",{class:"iconfont-expand-field icon-expand-field-help"},null,-1),ce={style:{display:"flex","align-items":"center"}},ye=f("span",null,"选择",-1),he={style:{width:"100%"}},_e={key:0,class:"validate_tip"};var ge=e({__name:"form",props:{visible:{type:Boolean,default:!1},formOntype:{type:String,default:"add"},formItemData:{type:Object,default:()=>({})},id:{type:String,default:""},orgId:{type:String,default:""},conditionList:{type:Array,default:()=>[]},searchFieldList:{type:Array,default:()=>[]}},emits:["cancelModal"],setup(e,{emit:ge}){const be=e,xe=w(),ke="请输入默认值",Me={name:[{required:!0,message:"请输入字段标题",trigger:["input","blur"]}],html_type:[{required:!0,message:"请选择字段类型",trigger:["input","blur"]}]},we=[{value:"yyyy-MM-dd HH:mm:ss",label:"年-月-日 时:分:秒"},{value:"yyyy-MM-dd HH:mm",label:"年-月-日 时:分"},{value:"yyyy-MM-dd",label:"年-月-日"},{value:"yyyy-MM",label:"年-月"},{value:"MM-dd HH:mm",label:"月-日 时:分"},{value:"MM-dd",label:"月-日"},{value:"HH:mm:ss",label:"时:分:秒"},{value:"HH:mm",label:"时:分"}],He=[{value:"12",label:"整行"},{value:"6",label:"半行"},{value:"4",label:"1/3行"},{value:"8",label:"2/3行"},{value:"3",label:"1/4行"},{value:"9",label:"3/4行"},{value:"2",label:"1/6行"},{value:"10",label:"5/6行"},{value:"1.5",label:"1/8行"},{value:"10.5",label:"7/8行"}],Ce=l(!1),Ue=l("860px");let Se=l({maxHeight:"496px",height:"496px"});const{saveOrUpdateExtendField:je}=W(),Oe=a(R),Ie=l(null),ze=l({name:void 0,remark:void 0,is_edit:"1",is_null:"1",is_show:"1",key:"",val_key:void 0,validate:{},html_type:"INPUT",name_i18n:void 0,elem_width:"12",default_val:void 0,label_type:void 0,isMultiSelect:"0",decimal_length:void 0,date_format:""}),Te=l([{text:void 0,value:void 0}]),Ne=l({format:"yyyy-MM-dd HH:mm:ss",dateType:"date",mode:"date",value:null,showTime:!0,open:!1,componentType:"datetime"}),Ye=l({obj_type:"",vali_obj:"",event_obj:"",max_length:"",min_length:"",min_value:"",max_value:""}),$e=l({value_key:"",levelSetting:[],search_key:[],level_num:void 0,render_key:[],name:"",level_key:"",id:"",type:"",primary_key:"",sqlExpression:"",conObj:"",add_btn:"",setting:{cascading:[]}}),Le=l(!1),Ve=l(!1),Be=l(void 0),De=l(!1),Fe=l(!1);l(!1);const Pe=l(!1),qe=l(""),Ae=t((()=>"edit"===be.formOntype)),Ee=t((()=>ze.value.html_type||""));t((()=>"TEXTAREA"===Ee.value?1e3:255));const Je=t((()=>Te.value.filter((e=>e.value&&e.text)))),Ke=t((()=>F(Ee.value))),Re=t((()=>"date"===Ne.value.dateType));function We(e){Pe.value=e}function Xe(e){let l=e;"string"!=typeof e&&(l=JSON.stringify(e)),ze.value.default_val=l}function Ge(e){Ne.value.value=null,ze.value.default_val=void 0,il(e)}function Qe(){Ce.value=!Ce.value;let e=document.body.clientHeight;"860px"===Ue.value?(Ue.value="100%",Se.value.maxHeight=`${e}px`,Se.value.height=`${e}px`):(Ue.value="860px",Se.value.maxHeight="496px",Se.value.height="")}function Ze(e){return["HH:mm:ss","HH:mm"].includes(e)}function el(e,l){switch(e){case"isNull":Le.value=l,ze.value.is_null=l?"0":"1";break;case"isMultiSelect":Ve.value=l,ze.value.isMultiSelect=l?"1":"0"}}function ll(){if("add"===be.formOntype)return;let e=Object.assign({},be.formItemData),l=e.setting;l&&G(l)&&(l=JSON.parse(l),delete e.setting,Object.assign(e,{...l})),e.key=e.code,delete e.code,A(e.html_type)&&function(e){il(e.date_format);let l=e.default_val;l&&!l.startsWith("${")&&(Ze(e.date_format)&&(l=`${K().format("YYYY-MM-dd")} ${l}`),Q(new Date(l))&&(Ne.value.value=K(l)))}(e),F(e.html_type)&&(e.default_val=function(e){let l=e.default_val;return l?l.split(",").filter(Boolean):[]}(e)),Le.value="0"==e.is_null,Ve.value="1"==e.isMultiSelect,Ye.value=Object.assign(Ye.value,e.validate||{}),$e.value=Object.assign($e.value,e.wordbook||{}),ze.value=Object.assign(ze.value,e||{}),P(e.html_type)&&function(e){let l=(null==e?void 0:e.optionValue)||[];l.length||l.push({text:void 0,value:void 0}),Te.value=[...l],delete e.optionValue}(e)}function al(e){ze.value.html_type=e,Te.value=[{text:void 0,value:void 0}];let l=function(){if(F(Ee.value))return[]}();ze.value.default_val=l,A(e)?ze.value.date_format="yyyy-MM-dd HH:mm:ss":ze.value.date_format=""}function tl(){Te.value.push({value:"",text:""})}function ul(e){let l=e;(e<0||0===e)&&(l=0),e>5&&(l=5),Be.value=0===l?l:l||void 0}function nl(e){Te.value=e}function il(e){let l=e||"yyyy-MM-dd HH:mm:ss",a=Ze(l)?"time":"date",t="yyyy-MM"===l?"month":"date";let u=function(e){return["yyyy-MM-dd HH:mm:ss","yyyy-MM-dd HH:mm","MM-dd HH:mm"].includes(e)}(l),n="";["yyyy-MM-dd HH:mm:ss","yyyy-MM-dd HH:mm","MM-dd HH:mm"].includes(e)&&(n="datetime"),["yyyy-MM-dd","MM-dd"].includes(e)&&(n="date"),Object.assign(Ne.value,{format:l,dateType:a,mode:t,showTime:u,componentType:n})}function ol(e,l){if(e)return l&&(l.includes("yyyy")&&(l=l.replace("yyyy","YYYY")),l.includes("dd")&&(l=l.replace("dd","DD"))),K(e).format(l)}function vl(){Ne.value.open=!Ne.value.open}function dl(e){let l=ol(e,Ne.value.format);ze.value.default_val=l}function rl(e){let l=ol(e,Ne.value.format);ze.value.default_val=l,Ne.value.format.includes("HH:mm")||vl()}function sl(e){let l=ol(e,Ne.value.format);ze.value.default_val=l}function pl(){ge("cancelModal"),Ue.value="860px",Se.value={height:"496px",maxHeight:"496px"},Ce.value=!1,ze.value={name:void 0,remark:void 0,is_edit:"1",is_null:"1",is_show:"1",key:"",val_key:void 0,validate:{},html_type:"INPUT",name_i18n:void 0,elem_width:"12",default_val:void 0,label_type:void 0,isMultiSelect:"0",decimal_length:void 0,date_format:""}}function fl(){var e;null==(e=Ie.value)||e.validate((async e=>{if(e)return;let l=Object.assign({},ze.value);if(l.validate={...Ye.value},l.extendId=be.id,P(Ee.value)){let e=function(){let e={validate:!1,message:"请完善选项配置"};if(!Te.value||!Te.value.length)return e;let l,a,t,u=0,n=Te.value.length,i=!1;for(;u<n;u++){if(l=Te.value[u],a=l.value?l.value.trim():l.value,t=l.text?l.text.trim():l.text,!a||!t){i=!0;break}l.value=a,l.text=t}return[...new Set(Te.value.map((e=>e.value)))].length!==Te.value.length?(e.message="选项值不能重复",e):(!i&&(e.validate=!0),e)}();if(!e.validate)return De.value=!0,void xe.warning(e.message);De.value=!1,l.option=[...Te.value]}if(q(Ee.value)?l.default_val=function(e){let l=e.default_val;if(void 0===Be.value)return l;if(!l)return l;let a=String(l).split(".")[1];return a&&a.length!==Be.value?Number(l.toFixed(Be.value)):l}(l):F(Ee.value)&&(l.default_val=l.default_val.join(",")),!E(Ee.value)||function(e){let{default_val:l}=e;qe.value="",l&&G(l)&&(l=JSON.parse(l));let a=function(e,l){if(!e)return;if("string"!=typeof e)return;if(!(e=e.trim()))return!0;if(!e.startsWith("${"))return ml(l,"请输入有效系统变量"),"error";let a=/\${sys.(.*?)\}/g.exec(e);if(!a||!a[1])return ml(l,"请输入有效系统变量"),"error";return!0}(l,e);if(a)return"error"!==a;if(console.log("saveOjb.isMultiSelect>>>",e.isMultiSelect),console.log("default_val?.length>>>",null==l?void 0:l.length),"0"===e.isMultiSelect&&(null==l?void 0:l.length)>1)return console.log("进入到判断里面了>>>>>"),ml(e,"选人组件为单选"),!1;return!0}(l)){for(let e in l){let a=l[e];"string"==typeof a&&(l[e]=null==a?void 0:a.trim())}console.log("saveOjb>>>",l),await async function(e={}){Fe.value=!0;try{const l=await je(e,Oe);if(Fe.value=!1,"SUCCESS"!==(null==l?void 0:l.result))return void xe.error((null==l?void 0:l.resultMsg)||"保存失败");pl()}catch(e){Fe.value=!1}}(l)}}))}function ml(e,l){qe.value=l}return u((()=>be.visible),(e=>{e&&ll()})),(l,a)=>(n(),i(o(H),{class:v(["expand-field-modal-block",{"modal-screen":Ce.value}]),show:e.visible,"onUpdate:show":a[22]||(a[22]=e=>d(visible)?visible.value=e:null),maskClosable:!1,width:Ue.value,bodyStyle:o(Se),closable:!1,centered:"",onPositiveClick:fl,onNegativeClick:pl},{default:r((()=>[s(o(C),{style:p({width:Ue.value,...o(Se)}),title:"add"===be.formOntype?"新增拓展字段":"编辑拓展字段",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":r((()=>[f("div",le,[f("i",{onClick:Qe,class:v(["iconfont-expand-field",Ce.value?"icon-expand-field-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-expand-field-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),f("i",{onClick:pl,class:"iconfont-expand-field icon-expand-field-menzhenyishengzhanxitongtubiaoguanbi"})])])),footer:r((()=>[f("div",ae,[s(o(U),{onClick:pl},{default:r((()=>[m("取消")])),_:1}),s(o(U),{type:"info",onClick:fl},{default:r((()=>[m("保存")])),_:1})])])),default:r((()=>[s(o(S),{ref_key:"formRef",ref:Ie,model:ze.value,rules:Me},{default:r((()=>[s(o(j),{path:"name",label:"字段标题","require-mark-placement":"left"},{default:r((()=>[s(o(O),{value:ze.value.name,"onUpdate:value":a[0]||(a[0]=e=>ze.value.name=e),maxlength:100,clearable:"",placeholder:"请输入"},null,8,["value"])])),_:1}),s(o(j),{path:"key"},{label:r((()=>[f("div",te,[ue,s(o(I),{duration:0},{trigger:r((()=>[ne])),default:r((()=>[m(" 数据库字段键名,不填写时由系统生成,填写则以填写为准 ")])),_:1})])])),default:r((()=>[s(o(O),{value:ze.value.key,"onUpdate:value":a[1]||(a[1]=e=>ze.value.key=e),maxlength:32,disabled:o(Ae),clearable:"",placeholder:"数据库字段键名,不填写时由系统生成,填写则以填写为准"},null,8,["value","disabled"])])),_:1}),s(o(j),{path:"html_type",label:"字段类型","require-mark-placement":"left"},{default:r((()=>[s(o(z),{value:ze.value.html_type,"onUpdate:value":[a[2]||(a[2]=e=>ze.value.html_type=e),al],placeholder:"请选择字段类型",clearable:"",filterable:"",options:o(X)},null,8,["value","options"])])),_:1}),s(o(j),{path:"remark",label:"字段问号提示"},{label:r((()=>[f("div",ie,[oe,s(o(I),{duration:0},{trigger:r((()=>[ve])),default:r((()=>[m(" 设置后该字段旁会有问号图标,鼠标悬浮展示“问号提示”内容,常用于告诉用户该字段的含义 ")])),_:1})])])),default:r((()=>[s(o(O),{value:ze.value.remark,"onUpdate:value":a[3]||(a[3]=e=>ze.value.remark=e),placeholder:"请输入",type:"textarea",clearable:"",maxlength:255,rows:3},null,8,["value"])])),_:1}),c(" 选项值>>>>>类型对应关系 "),o(P)(o(Ee))?(n(),i(o(j),{key:0},{label:r((()=>[f("div",de,[re,f("span",{class:"batch-span",onClick:tl},"添加选项"),f("span",{class:"batch-span",onClick:a[4]||(a[4]=()=>We(!0))},"批量编辑")])])),default:r((()=>[f("div",{class:v(["options-item",{"options-item-err":De.value}])},[(n(!0),y(h,null,_(Te.value,((e,l)=>(n(),i(o(T),{class:"mgb-10",key:l,cols:24,"x-gap":8,"y-gap":8},{default:r((()=>[s(o(N),{span:11},{default:r((()=>[s(o(O),{value:e.value,"onUpdate:value":l=>e.value=l,maxLength:100,allowClear:"",placeholder:"选项值"},null,8,["value","onUpdate:value"])])),_:2},1024),s(o(N),{span:11},{default:r((()=>[s(o(O),{value:e.text,"onUpdate:value":l=>e.text=l,maxLength:100,allowClear:"",placeholder:"选项文本"},null,8,["value","onUpdate:value"])])),_:2},1024),s(o(N),{span:2,class:"flex-center"},{default:r((()=>[Te.value.length>1?(n(),i(o(Y),{key:0,onClick:a=>function(e,l){Te.value.splice(l,1);let a=ze.value.default_val;if(F(Ee.value)){if(!a||!a.length)return;let l=a.findIndex((l=>l===e.value));l||a.splice(l,1)}else{if(!a)return;a===e.value&&(a=void 0)}ze.value.default_val=a}(e,l)},{default:r((()=>[se])),_:2},1032,["onClick"])):c("v-if",!0)])),_:2},1024)])),_:2},1024)))),128))],2)])),_:1})):c("v-if",!0),o(q)(o(Ee))?(n(),i(o(j),{key:1,path:"decimal_length",label:"小数位"},{default:r((()=>[s(o($),{style:{width:"100%"},min:0,max:5,placeholder:"请输入",precision:0,clearable:"",value:ze.value.decimal_length,"onUpdate:value":[a[5]||(a[5]=e=>ze.value.decimal_length=e),ul]},null,8,["value"])])),_:1})):c("v-if",!0),o(A)(o(Ee))?(n(),i(o(j),{key:2,path:"date_format",label:"日期格式"},{default:r((()=>[s(o(z),{style:{width:"100%"},value:ze.value.date_format,"onUpdate:value":[a[6]||(a[6]=e=>ze.value.date_format=e),Ge],placeholder:"请选择",options:we},null,8,["value"])])),_:1})):c("v-if",!0),c(" 默认值>>>>>类型对应关系 "),s(o(j),{path:"default_val",label:"默认值"},{label:r((()=>[f("div",pe,[fe,o(E)(o(Ee))?(n(),i(o(I),{key:0,duration:0},{trigger:r((()=>[me])),default:r((()=>[m(" 支持输入系统变量当前操作人${sys.userId},也支持选择一个人 ")])),_:1})):c("v-if",!0)])])),default:r((()=>[o(J)(o(Ee))?(n(),i(o(O),{key:0,value:ze.value.default_val,"onUpdate:value":a[7]||(a[7]=e=>ze.value.default_val=e),placeholder:ke,type:"textarea",clearable:"",maxlength:1e3,rows:3},null,8,["value"])):o(q)(o(Ee))?(n(),y(h,{key:1},[c(" 数字框 "),s(o($),{style:{width:"100%"},clearable:"",placeholder:ke,precision:Be.value,value:ze.value.default_val,"onUpdate:value":a[8]||(a[8]=e=>ze.value.default_val=e)},null,8,["precision","value"])],2112)):o(P)(o(Ee))?(n(),y(h,{key:2},[c(" 下拉框、横向单选、纵向单选、横向多选、纵向多选、下拉多选框 "),s(o(z),{style:{width:"100%"},multiple:o(Ke),clearable:"",value:ze.value.default_val,"onUpdate:value":a[9]||(a[9]=e=>ze.value.default_val=e),"label-field":"text",placeholder:ke,options:o(Je)},null,8,["multiple","value","options"])],2112)):o(A)(o(Ee))?(n(),y(h,{key:3},[c(" 日期 "),f("div",ce,[s(o(O),{clearable:"",maxLength:255,value:ze.value.default_val,"onUpdate:value":a[10]||(a[10]=e=>ze.value.default_val=e),placeholder:ke},null,8,["value"]),o(Re)?(n(),y(h,{key:0},["month"===Ne.value.mode?(n(),i(o(L),{key:0,trigger:"click",show:Ne.value.open},{trigger:r((()=>[s(o(U),{type:"info",onClick:vl},{default:r((()=>[m("选择")])),_:1})])),default:r((()=>[s(o(V),{panel:"",value:Ne.value.value,"onUpdate:value":[a[11]||(a[11]=e=>Ne.value.value=e),dl],type:"month","input-readonly":"",clearable:"",onConfirm:vl},null,8,["value"])])),_:1},8,["show"])):(n(),i(o(L),{key:1,trigger:"click",show:Ne.value.open},{trigger:r((()=>[s(o(U),{type:"info",onClick:vl},{default:r((()=>[m("选择")])),_:1})])),default:r((()=>[s(o(V),{panel:"",value:Ne.value.value,"onUpdate:value":[a[12]||(a[12]=e=>Ne.value.value=e),rl],format:Ne.value.format,type:Ne.value.componentType,"input-readonly":"",clearable:"",onConfirm:vl},null,8,["value","format","type"])])),_:1},8,["show"]))],64)):(n(),y(h,{key:1},[c(' <n-input\n allowClear\n :maxLength="255"\n v-model:value="dateInfo.value"\n @keydown.enter.prevent\n :placeholder="defaultPlaceholder"\n /> '),s(o(U),{type:"info",class:"date-time-button"},{default:r((()=>[ye,s(o(B),{value:Ne.value.value,"onUpdate:value":[a[13]||(a[13]=e=>Ne.value.value=e),sl],format:Ne.value.format,"input-readonly":"",clearable:""},null,8,["value","format"])])),_:1}),c(' <n-popover trigger="click">\n <template #trigger>\n <n-button type="info">选择</n-button>\n </template>\n <n-time-picker\n panel\n v-model:value="dateInfo.value"\n :format="dateInfo.format"\n input-readonly\n clearable\n @update:value="timeChange"\n >\n <template v-slot:icon>111</template>\n\n </n-time-picker>\n </n-popover> ')],64))])],2112)):o(E)(o(Ee))?(n(),y(h,{key:4},[c(" 选人组件(增加一个选人组件) "),f("div",he,[g(s(o(O),{allowClear:"",maxLength:255,value:ze.value.default_val,"onUpdate:value":a[14]||(a[14]=e=>ze.value.default_val=e),onKeydown:a[15]||(a[15]=b(x((()=>{}),["prevent"]),["enter"])),placeholder:ke},null,8,["value"]),[[k,!1]]),c(' 点击弹出选人组件弹窗 :mainForm="this" '),s(ee,{orgId:e.orgId,defaultValue:ze.value.default_val,onCheckPerson:Xe},null,8,["orgId","defaultValue"]),qe.value?(n(),y("span",_e,M(qe.value),1)):c("v-if",!0),c(' <n-button type="info">选择</n-button> ')])],2112)):(n(),y(h,{key:5},[c(" 其他 "),s(o(O),{value:ze.value.default_val,"onUpdate:value":a[16]||(a[16]=e=>ze.value.default_val=e),onKeydown:a[17]||(a[17]=b(x((()=>{}),["prevent"]),["enter"])),placeholder:"请输入默认值"},null,8,["value"])],2112))])),_:1}),s(o(j),{path:"elem_width",label:"宽度"},{default:r((()=>[s(o(z),{value:ze.value.elem_width,"onUpdate:value":a[18]||(a[18]=e=>ze.value.elem_width=e),placeholder:"请选择宽度",options:He},null,8,["value"])])),_:1}),s(o(j),{path:"isNull",label:"是否必填","label-placement":"left"},{default:r((()=>[s(o(D),{value:Le.value,"onUpdate:value":[a[19]||(a[19]=e=>Le.value=e),a[20]||(a[20]=e=>el("isNull",e))]},null,8,["value"])])),_:1}),o(E)(o(Ee))?(n(),i(o(j),{key:3,"label-placement":"left",path:"isMultiSelect",label:"是否多选"},{default:r((()=>[s(o(D),{value:Ve.value,"onUpdate:value":a[21]||(a[21]=e=>el("isMultiSelect",e))},null,8,["value"])])),_:1})):c("v-if",!0)])),_:1},8,["model"]),s(Z,{visible:Pe.value,options:Te.value,onHandleSaveBatch:nl,onTriggerBatch:We},null,8,["visible","options"])])),_:1},8,["style","title"])])),_:1},8,["class","show","width","bodyStyle"]))}});export{ge as default};
1
+ import{defineComponent as e,ref as l,inject as a,computed as t,watch as u,openBlock as n,createBlock as i,unref as o,normalizeClass as v,isRef as d,withCtx as r,createVNode as s,normalizeStyle as p,createElementVNode as f,createTextVNode as m,createCommentVNode as c,createElementBlock as y,Fragment as h,renderList as _,withDirectives as g,withKeys as b,withModifiers as x,vShow as k,toDisplayString as M}from"vue";import{useMessage as w,NModal as H,NCard as C,NButton as U,NForm as S,NFormItem as j,NInput as O,NTooltip as I,NSelect as z,NGrid as T,NGridItem as N,NIcon as Y,NInputNumber as $,NPopover as L,NDatePicker as V,NTimePicker as B,NSwitch as D}from"naive-ui";import{isMulti as F,isShowOptions as P,isNumber as q,isDate as A,isCandidate as E,isTextarea as J}from"../utils/index.js";import K from"moment";import{InjectionExpandFieldApiConfig as R}from"../constants/index.js";import W from"../hooks/useAsyncData.js";import{HtmlTypeList as X}from"../utils/constant.js";import{isJSON as G,isValidDate as Q}from"../utils/tool.js";import Z from"./FormBatchOptionsModal.vue.js";import ee from"./FormItemPerson.vue.js";const le={class:"svg-wrap"},ae={class:"flex_right"},te={class:"options-title"},ue=f("span",null,"字段键名",-1),ne=f("i",{class:"iconfont-expand-field icon-expand-field-help"},null,-1),ie={class:"options-title"},oe=f("span",null,"字段问号提示",-1),ve=f("i",{class:"iconfont-expand-field icon-expand-field-help"},null,-1),de={class:"options-title"},re=f("span",null,"选项值",-1),se=f("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[f("path",{d:"M12 12h2v12h-2z",fill:"currentColor"}),f("path",{d:"M18 12h2v12h-2z",fill:"currentColor"}),f("path",{d:"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z",fill:"currentColor"}),f("path",{d:"M12 2h8v2h-8z",fill:"currentColor"})],-1),pe={class:"options-title"},fe=f("span",null,"默认值",-1),me=f("i",{class:"iconfont-expand-field icon-expand-field-help"},null,-1),ce={style:{display:"flex","align-items":"center"}},ye=f("span",null,"选择",-1),he={style:{width:"100%"}},_e={key:0,class:"validate_tip"};var ge=e({__name:"form",props:{visible:{type:Boolean,default:!1},formOntype:{type:String,default:"add"},formItemData:{type:Object,default:()=>({})},id:{type:String,default:""},orgId:{type:String,default:""},conditionList:{type:Array,default:()=>[]},searchFieldList:{type:Array,default:()=>[]}},emits:["cancelModal"],setup(e,{emit:ge}){const be=e,xe=w(),ke="请输入默认值",Me={name:[{required:!0,message:"请输入字段标题",trigger:["input","blur"]}],html_type:[{required:!0,message:"请选择字段类型",trigger:["input","blur"]}]},we=[{value:"yyyy-MM-dd HH:mm:ss",label:"年-月-日 时:分:秒"},{value:"yyyy-MM-dd HH:mm",label:"年-月-日 时:分"},{value:"yyyy-MM-dd",label:"年-月-日"},{value:"yyyy-MM",label:"年-月"},{value:"MM-dd HH:mm",label:"月-日 时:分"},{value:"MM-dd",label:"月-日"},{value:"HH:mm:ss",label:"时:分:秒"},{value:"HH:mm",label:"时:分"}],He=[{value:"12",label:"整行"},{value:"6",label:"半行"},{value:"4",label:"1/3行"},{value:"8",label:"2/3行"},{value:"3",label:"1/4行"},{value:"9",label:"3/4行"},{value:"2",label:"1/6行"},{value:"10",label:"5/6行"},{value:"1.5",label:"1/8行"},{value:"10.5",label:"7/8行"}],Ce=l(!1),Ue=l("860px");let Se=l({maxHeight:"496px",height:"496px"});const{saveOrUpdateExtendField:je}=W(),Oe=a(R),Ie=l(null),ze=l({name:void 0,remark:void 0,is_edit:"1",is_null:"1",is_show:"1",key:"",val_key:void 0,validate:{},html_type:"INPUT",name_i18n:void 0,elem_width:"12",default_val:void 0,label_type:void 0,isMultiSelect:"0",decimal_length:void 0,date_format:""}),Te=l([{text:void 0,value:void 0}]),Ne=l({format:"yyyy-MM-dd HH:mm:ss",dateType:"date",mode:"date",value:null,showTime:!0,open:!1,componentType:"datetime"}),Ye=l({obj_type:"",vali_obj:"",event_obj:"",max_length:"",min_length:"",min_value:"",max_value:""}),$e=l({value_key:"",levelSetting:[],search_key:[],level_num:void 0,render_key:[],name:"",level_key:"",id:"",type:"",primary_key:"",sqlExpression:"",conObj:"",add_btn:"",setting:{cascading:[]}}),Le=l(!1),Ve=l(!1),Be=l(void 0),De=l(!1),Fe=l(!1);l(!1);const Pe=l(!1),qe=l(""),Ae=t((()=>"edit"===be.formOntype)),Ee=t((()=>ze.value.html_type||""));t((()=>"TEXTAREA"===Ee.value?1e3:255));const Je=t((()=>Te.value.filter((e=>e.value&&e.text)))),Ke=t((()=>F(Ee.value))),Re=t((()=>"date"===Ne.value.dateType));function We(e){Pe.value=e}function Xe(e){let l=e;"string"!=typeof e&&(l=JSON.stringify(e)),ze.value.default_val=l}function Ge(e){Ne.value.value=null,ze.value.default_val=void 0,il(e)}function Qe(){Ce.value=!Ce.value;let e=document.body.clientHeight;"860px"===Ue.value?(Ue.value="100%",Se.value.maxHeight=`${e}px`,Se.value.height=`${e}px`):(Ue.value="860px",Se.value.maxHeight="496px",Se.value.height="")}function Ze(e){return["HH:mm:ss","HH:mm"].includes(e)}function el(e,l){switch(e){case"isNull":Le.value=l,ze.value.is_null=l?"0":"1";break;case"isMultiSelect":Ve.value=l,ze.value.isMultiSelect=l?"1":"0"}}function ll(){if("add"===be.formOntype)return;let e=Object.assign({},be.formItemData),l=e.setting;l&&G(l)&&(l=JSON.parse(l),delete e.setting,Object.assign(e,{...l})),e.key=e.code,delete e.code,A(e.html_type)&&function(e){il(e.date_format);let l=e.default_val;l&&!l.startsWith("${")&&(Ze(e.date_format)&&(l=`${K().format("YYYY-MM-dd")} ${l}`),Q(new Date(l))&&(Ne.value.value=K(l)))}(e),F(e.html_type)&&(e.default_val=function(e){let l=e.default_val;return l?l.split(",").filter(Boolean):[]}(e)),Le.value="0"==e.is_null,Ve.value="1"==e.isMultiSelect,Ye.value=Object.assign(Ye.value,e.validate||{}),$e.value=Object.assign($e.value,e.wordbook||{}),ze.value=Object.assign(ze.value,e||{}),P(e.html_type)&&function(e){let l=(null==e?void 0:e.optionValue)||[];l.length||l.push({text:void 0,value:void 0}),Te.value=[...l],delete e.optionValue}(e)}function al(e){ze.value.html_type=e,Te.value=[{text:void 0,value:void 0}];let l=function(){if(F(Ee.value))return[]}();ze.value.default_val=l,A(e)?ze.value.date_format="yyyy-MM-dd HH:mm:ss":ze.value.date_format=""}function tl(){Te.value.push({value:"",text:""})}function ul(e){let l=e;(e<0||0===e)&&(l=0),e>5&&(l=5),Be.value=0===l?l:l||void 0}function nl(e){Te.value=e}function il(e){let l=e||"yyyy-MM-dd HH:mm:ss",a=Ze(l)?"time":"date",t="yyyy-MM"===l?"month":"date";let u=function(e){return["yyyy-MM-dd HH:mm:ss","yyyy-MM-dd HH:mm","MM-dd HH:mm"].includes(e)}(l),n="";["yyyy-MM-dd HH:mm:ss","yyyy-MM-dd HH:mm","MM-dd HH:mm"].includes(e)&&(n="datetime"),["yyyy-MM-dd","MM-dd"].includes(e)&&(n="date"),Object.assign(Ne.value,{format:l,dateType:a,mode:t,showTime:u,componentType:n})}function ol(e,l){if(e)return l&&(l.includes("yyyy")&&(l=l.replace("yyyy","YYYY")),l.includes("dd")&&(l=l.replace("dd","DD"))),K(e).format(l)}function vl(){Ne.value.open=!Ne.value.open}function dl(e){let l=ol(e,Ne.value.format);ze.value.default_val=l}function rl(e){let l=ol(e,Ne.value.format);ze.value.default_val=l,Ne.value.format.includes("HH:mm")||vl()}function sl(e){let l=ol(e,Ne.value.format);ze.value.default_val=l}function pl(){ge("cancelModal"),Ue.value="860px",Se.value={height:"496px",maxHeight:"496px"},Ce.value=!1,ze.value={name:void 0,remark:void 0,is_edit:"1",is_null:"1",is_show:"1",key:"",val_key:void 0,validate:{},html_type:"INPUT",name_i18n:void 0,elem_width:"12",default_val:void 0,label_type:void 0,isMultiSelect:"0",decimal_length:void 0,date_format:""}}function fl(){var e;null==(e=Ie.value)||e.validate((async e=>{if(e)return;let l=Object.assign({},ze.value);if(l.validate={...Ye.value},l.extendId=be.id,P(Ee.value)){let e=function(){let e={validate:!1,message:"请完善选项配置"};if(!Te.value||!Te.value.length)return e;let l,a,t,u=0,n=Te.value.length,i=!1;for(;u<n;u++){if(l=Te.value[u],a=l.value?l.value.trim():l.value,t=l.text?l.text.trim():l.text,!a||!t){i=!0;break}l.value=a,l.text=t}return[...new Set(Te.value.map((e=>e.value)))].length!==Te.value.length?(e.message="选项值不能重复",e):(!i&&(e.validate=!0),e)}();if(!e.validate)return De.value=!0,void xe.warning(e.message);De.value=!1,l.option=[...Te.value]}if(q(Ee.value)?l.default_val=function(e){let l=e.default_val;if(void 0===Be.value)return l;if(!l)return l;let a=String(l).split(".")[1];return a&&a.length!==Be.value?Number(l.toFixed(Be.value)):l}(l):F(Ee.value)&&(l.default_val=l.default_val.join(",")),!E(Ee.value)||function(e){let{default_val:l}=e;qe.value="",l&&G(l)&&(l=JSON.parse(l));let a=function(e,l){if(!e)return;if("string"!=typeof e)return;if(!(e=e.trim()))return!0;if(!e.startsWith("${"))return ml(l,"请输入有效系统变量"),"error";let a=/\${sys.(.*?)\}/g.exec(e);if(!a||!a[1])return ml(l,"请输入有效系统变量"),"error";return!0}(l,e);if(a)return"error"!==a;if(console.log("saveOjb.isMultiSelect>>>",e.isMultiSelect),console.log("default_val?.length>>>",null==l?void 0:l.length),"0"===e.isMultiSelect&&(null==l?void 0:l.length)>1)return console.log("进入到判断里面了>>>>>"),ml(e,"选人组件为单选"),!1;return!0}(l)){for(let e in l){let a=l[e];"string"==typeof a&&(l[e]=null==a?void 0:a.trim())}console.log("saveOjb>>>",l),await async function(e={}){Fe.value=!0;try{const l=await je(e,Oe);if(Fe.value=!1,"SUCCESS"!==(null==l?void 0:l.result))return void xe.error((null==l?void 0:l.resultMsg)||"保存失败");pl()}catch(e){Fe.value=!1}}(l)}}))}function ml(e,l){qe.value=l}return u((()=>be.visible),(e=>{e&&ll()})),(l,a)=>(n(),i(o(H),{class:v(["expand-field-modal-block",{"modal-screen":Ce.value}]),show:e.visible,"onUpdate:show":a[22]||(a[22]=e=>d(visible)?visible.value=e:null),maskClosable:!1,width:Ue.value,bodyStyle:o(Se),closable:!1,centered:"",onPositiveClick:fl,onNegativeClick:pl},{default:r((()=>[s(o(C),{style:p({width:Ue.value,...o(Se)}),title:"add"===be.formOntype?"新增拓展字段":"编辑拓展字段",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":r((()=>[f("div",le,[f("i",{onClick:Qe,class:v(["iconfont-expand-field",Ce.value?"icon-expand-field-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-expand-field-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),f("i",{onClick:pl,class:"iconfont-expand-field icon-expand-field-menzhenyishengzhanxitongtubiaoguanbi"})])])),footer:r((()=>[f("div",ae,[s(o(U),{onClick:pl},{default:r((()=>[m("取消")])),_:1}),s(o(U),{type:"info",onClick:fl},{default:r((()=>[m("保存")])),_:1})])])),default:r((()=>[s(o(S),{ref_key:"formRef",ref:Ie,model:ze.value,rules:Me},{default:r((()=>[s(o(j),{path:"name",label:"字段标题","require-mark-placement":"left"},{default:r((()=>[s(o(O),{value:ze.value.name,"onUpdate:value":a[0]||(a[0]=e=>ze.value.name=e),maxlength:100,clearable:"",placeholder:"请输入"},null,8,["value"])])),_:1}),s(o(j),{path:"key"},{label:r((()=>[f("div",te,[ue,s(o(I),{duration:0},{trigger:r((()=>[ne])),default:r((()=>[m(" 数据库字段键名,不填写时由系统生成,填写则以填写为准 ")])),_:1})])])),default:r((()=>[s(o(O),{value:ze.value.key,"onUpdate:value":a[1]||(a[1]=e=>ze.value.key=e),maxlength:32,disabled:o(Ae),clearable:"",placeholder:"数据库字段键名,不填写时由系统生成,填写则以填写为准"},null,8,["value","disabled"])])),_:1}),s(o(j),{path:"html_type",label:"字段类型","require-mark-placement":"left"},{default:r((()=>[s(o(z),{value:ze.value.html_type,"onUpdate:value":[a[2]||(a[2]=e=>ze.value.html_type=e),al],placeholder:"请选择字段类型",clearable:"",filterable:"",options:o(X)},null,8,["value","options"])])),_:1}),s(o(j),{path:"remark",label:"字段问号提示"},{label:r((()=>[f("div",ie,[oe,s(o(I),{duration:0},{trigger:r((()=>[ve])),default:r((()=>[m(" 设置后该字段旁会有问号图标,鼠标悬浮展示“问号提示”内容,常用于告诉用户该字段的含义 ")])),_:1})])])),default:r((()=>[s(o(O),{value:ze.value.remark,"onUpdate:value":a[3]||(a[3]=e=>ze.value.remark=e),placeholder:"请输入",type:"textarea",clearable:"",maxlength:255,rows:3},null,8,["value"])])),_:1}),c(" 选项值>>>>>类型对应关系 "),o(P)(o(Ee))?(n(),i(o(j),{key:0},{label:r((()=>[f("div",de,[re,f("span",{class:"batch-span",onClick:tl},"添加选项"),f("span",{class:"batch-span",onClick:a[4]||(a[4]=()=>We(!0))},"批量编辑")])])),default:r((()=>[f("div",{class:v(["options-item",{"options-item-err":De.value}])},[(n(!0),y(h,null,_(Te.value,((e,l)=>(n(),i(o(T),{class:"mgb-10",key:l,cols:24,"x-gap":8,"y-gap":8},{default:r((()=>[s(o(N),{span:11},{default:r((()=>[s(o(O),{value:e.value,"onUpdate:value":l=>e.value=l,maxLength:100,allowClear:"",placeholder:"选项值"},null,8,["value","onUpdate:value"])])),_:2},1024),s(o(N),{span:11},{default:r((()=>[s(o(O),{value:e.text,"onUpdate:value":l=>e.text=l,maxLength:100,allowClear:"",placeholder:"选项文本"},null,8,["value","onUpdate:value"])])),_:2},1024),s(o(N),{span:2,class:"flex-center"},{default:r((()=>[Te.value.length>1?(n(),i(o(Y),{key:0,onClick:a=>function(e,l){Te.value.splice(l,1);let a=ze.value.default_val;if(F(Ee.value)){if(!a||!a.length)return;let l=a.findIndex((l=>l===e.value));l||a.splice(l,1)}else{if(!a)return;a===e.value&&(a=void 0)}ze.value.default_val=a}(e,l)},{default:r((()=>[se])),_:2},1032,["onClick"])):c("v-if",!0)])),_:2},1024)])),_:2},1024)))),128))],2)])),_:1})):c("v-if",!0),o(q)(o(Ee))?(n(),i(o(j),{key:1,path:"decimal_length",label:"小数位"},{default:r((()=>[s(o($),{style:{width:"100%"},min:0,max:5,placeholder:"请输入",precision:0,clearable:"",value:ze.value.decimal_length,"onUpdate:value":[a[5]||(a[5]=e=>ze.value.decimal_length=e),ul]},null,8,["value"])])),_:1})):c("v-if",!0),o(A)(o(Ee))?(n(),i(o(j),{key:2,path:"date_format",label:"日期格式"},{default:r((()=>[s(o(z),{style:{width:"100%"},value:ze.value.date_format,"onUpdate:value":[a[6]||(a[6]=e=>ze.value.date_format=e),Ge],placeholder:"请选择",options:we},null,8,["value"])])),_:1})):c("v-if",!0),c(" 默认值>>>>>类型对应关系 "),s(o(j),{path:"default_val",label:"默认值"},{label:r((()=>[f("div",pe,[fe,o(E)(o(Ee))?(n(),i(o(I),{key:0,duration:0},{trigger:r((()=>[me])),default:r((()=>[m(" 支持输入系统变量当前操作人${sys.userId},也支持选择一个人 ")])),_:1})):c("v-if",!0)])])),default:r((()=>[o(J)(o(Ee))?(n(),i(o(O),{key:0,value:ze.value.default_val,"onUpdate:value":a[7]||(a[7]=e=>ze.value.default_val=e),placeholder:ke,type:"textarea",clearable:"",maxlength:1e3,rows:3},null,8,["value"])):o(q)(o(Ee))?(n(),y(h,{key:1},[c(" 数字框 "),s(o($),{style:{width:"100%"},clearable:"",placeholder:ke,precision:Be.value,value:ze.value.default_val,"onUpdate:value":a[8]||(a[8]=e=>ze.value.default_val=e)},null,8,["precision","value"])],2112)):o(P)(o(Ee))?(n(),y(h,{key:2},[c(" 下拉框、横向单选、纵向单选、横向多选、纵向多选、下拉多选框 "),s(o(z),{style:{width:"100%"},multiple:o(Ke),clearable:"",value:ze.value.default_val,"onUpdate:value":a[9]||(a[9]=e=>ze.value.default_val=e),"label-field":"text",placeholder:ke,options:o(Je)},null,8,["multiple","value","options"])],2112)):o(A)(o(Ee))?(n(),y(h,{key:3},[c(" 日期 "),f("div",ce,[s(o(O),{clearable:"",maxLength:255,value:ze.value.default_val,"onUpdate:value":a[10]||(a[10]=e=>ze.value.default_val=e),placeholder:ke},null,8,["value"]),o(Re)?(n(),y(h,{key:0},["month"===Ne.value.mode?(n(),i(o(L),{key:0,trigger:"click",show:Ne.value.open},{trigger:r((()=>[s(o(U),{type:"info",onClick:vl},{default:r((()=>[m("选择")])),_:1})])),default:r((()=>[s(o(V),{panel:"",value:Ne.value.value,"onUpdate:value":[a[11]||(a[11]=e=>Ne.value.value=e),dl],type:"month","input-readonly":"",clearable:"",onConfirm:vl},null,8,["value"])])),_:1},8,["show"])):(n(),i(o(L),{key:1,trigger:"click",show:Ne.value.open},{trigger:r((()=>[s(o(U),{type:"info",onClick:vl},{default:r((()=>[m("选择")])),_:1})])),default:r((()=>[s(o(V),{panel:"",value:Ne.value.value,"onUpdate:value":[a[12]||(a[12]=e=>Ne.value.value=e),rl],format:Ne.value.format,type:Ne.value.componentType,"input-readonly":"",clearable:"",onConfirm:vl},null,8,["value","format","type"])])),_:1},8,["show"]))],64)):(n(),y(h,{key:1},[c(' <n-input\r\n allowClear\r\n :maxLength="255"\r\n v-model:value="dateInfo.value"\r\n @keydown.enter.prevent\r\n :placeholder="defaultPlaceholder"\r\n /> '),s(o(U),{type:"info",class:"date-time-button"},{default:r((()=>[ye,s(o(B),{value:Ne.value.value,"onUpdate:value":[a[13]||(a[13]=e=>Ne.value.value=e),sl],format:Ne.value.format,"input-readonly":"",clearable:""},null,8,["value","format"])])),_:1}),c(' <n-popover trigger="click">\r\n <template #trigger>\r\n <n-button type="info">选择</n-button>\r\n </template>\r\n <n-time-picker\r\n panel\r\n v-model:value="dateInfo.value"\r\n :format="dateInfo.format"\r\n input-readonly\r\n clearable\r\n @update:value="timeChange"\r\n >\r\n <template v-slot:icon>111</template>\r\n\r\n </n-time-picker>\r\n </n-popover> ')],64))])],2112)):o(E)(o(Ee))?(n(),y(h,{key:4},[c(" 选人组件(增加一个选人组件) "),f("div",he,[g(s(o(O),{allowClear:"",maxLength:255,value:ze.value.default_val,"onUpdate:value":a[14]||(a[14]=e=>ze.value.default_val=e),onKeydown:a[15]||(a[15]=b(x((()=>{}),["prevent"]),["enter"])),placeholder:ke},null,8,["value"]),[[k,!1]]),c(' 点击弹出选人组件弹窗 :mainForm="this" '),s(ee,{orgId:e.orgId,defaultValue:ze.value.default_val,onCheckPerson:Xe},null,8,["orgId","defaultValue"]),qe.value?(n(),y("span",_e,M(qe.value),1)):c("v-if",!0),c(' <n-button type="info">选择</n-button> ')])],2112)):(n(),y(h,{key:5},[c(" 其他 "),s(o(O),{value:ze.value.default_val,"onUpdate:value":a[16]||(a[16]=e=>ze.value.default_val=e),onKeydown:a[17]||(a[17]=b(x((()=>{}),["prevent"]),["enter"])),placeholder:"请输入默认值"},null,8,["value"])],2112))])),_:1}),s(o(j),{path:"elem_width",label:"宽度"},{default:r((()=>[s(o(z),{value:ze.value.elem_width,"onUpdate:value":a[18]||(a[18]=e=>ze.value.elem_width=e),placeholder:"请选择宽度",options:He},null,8,["value"])])),_:1}),s(o(j),{path:"isNull",label:"是否必填","label-placement":"left"},{default:r((()=>[s(o(D),{value:Le.value,"onUpdate:value":[a[19]||(a[19]=e=>Le.value=e),a[20]||(a[20]=e=>el("isNull",e))]},null,8,["value"])])),_:1}),o(E)(o(Ee))?(n(),i(o(j),{key:3,"label-placement":"left",path:"isMultiSelect",label:"是否多选"},{default:r((()=>[s(o(D),{value:Ve.value,"onUpdate:value":a[21]||(a[21]=e=>el("isMultiSelect",e))},null,8,["value"])])),_:1})):c("v-if",!0)])),_:1},8,["model"]),s(Z,{visible:Pe.value,options:Te.value,onHandleSaveBatch:nl,onTriggerBatch:We},null,8,["visible","options"])])),_:1},8,["style","title"])])),_:1},8,["class","show","width","bodyStyle"]))}});export{ge as default};
@@ -1 +1 @@
1
- import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useThrottleFn as t}from"@vueuse/core";import{range as r}from"lodash-es";import{useDetailEvent as o}from"./hooks/useDetailEvent.js";import{defaultTextStyle as i,drawLine as n}from"../useDraw.js";import{useGrid as s}from"../useGrid.js";import{useElectrocardiogramCumputedPoint as a}from"../useCumputedPoint.js";import"../useEvent.js";import"vue";import"date-fns";import"../temperature/useShadow.js";import{ECG as l}from"../../constants/index.js";import"naive-ui";function d(d,u,m){const{computedX:c,computedY:h}=a(u),{borderStyle:f,originX:g,originY:p,xCellWidth:L,yCellHeight:E,canvasWidth:M,canvasHeight:v,dataList:N,columnNumber:C,gridYNumber:x,gridXNumber:b,rowNumber:S}=u,w=new Set,j=new Set;function R(t=0){N.forEach(((r,o)=>{if(o===N.length-1&&arguments.length)return;const{x:n,y:s,rowIdx:a}=r.origin,d=~~(r.data.length/C),f=r.data.reduce(((e,r,i)=>{const n=o<l.MAXLINENUMBER-1&&i>=t&&i<=t+d||o===l.MAXLINENUMBER-1?[{x:c(e.length+1),y:h(-+r)}]:[];return e.concat(n)}),[]),g=new e.Polyline(f,{fill:"transparent",stroke:"red",strokeWidth:1,left:n,top:s,hasControls:!1,hasBorders:!1,hoverCursor:"default",lockMovementX:!0,lockMovementY:!0,objectCaching:!0});if(A(g,{...u.config,...u,lineStartIndex:t,points:r.data,scale:4,showScaleText:!0,showNumberText:!0,detailRadius:370,beforeEvent:()=>m.value&&Promise.reject()}),g.startIdx=t,o<N.length-1?w.add(g):j.add(g),arguments.length)return;const p=new e.Text(String(r.title),{...i,left:n+L,top:s,originX:"left",originY:"top"});j.add(p)}));const r=arguments.length?[...w]:[...w,...j];d.value.add(...r)}function A(e,t){o(e,t)}s(d,{...u,gridXNumber:b*l.SMALLCELLNUMBER,gridYNumber:x*l.SMALLCELLNUMBER,xCellWidth:L/l.SMALLCELLNUMBER,yCellHeight:E/l.SMALLCELLNUMBER,grid:{...u.grid,subXCell:l.SMALLCELLNUMBER,subYCell:l.SMALLCELLNUMBER}}),function(){const{strokeWidth:t}=f,r=new e.Rect({...f,width:M-t,height:v-t,left:g,top:p,fill:"transparent"});d.value.add(r)}(),function(){const e=M/C,t=[];r(C).forEach((r=>{if(r+1>=C)return;const o=(r+1)*e,i=n([o,0,o,v],{stroke:"#000"});t.push(i)})),d.value.add(...t)}(),R();return{updatePolyline:t((t=>{if(1===C)return;const r=N[N.length-1].data.length,o=~~(r/C),i=t/100*r-o/2,n=i+o>r?r-o:Math.max(0,i);e.util.requestAnimFrame((()=>{if(w.size){const[e]=[...w];if(e.startIdx===n)return;[...w].forEach((e=>d.value.remove(e))),w.clear()}R(n)}))}),150)}}export{d as useElectrocardiogram};
1
+ import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useThrottleFn as t}from"@vueuse/core";import{range as r}from"lodash-es";import{useDetailEvent as o}from"./hooks/useDetailEvent.js";import{drawLine as i}from"../useDraw.js";import{useGrid as n}from"../useGrid.js";import{useElectrocardiogramCumputedPoint as s}from"../useCumputedPoint.js";import"../useEvent.js";import"vue";import"date-fns";import"../temperature/useShadow.js";import{ECG as a}from"../../constants/index.js";import"naive-ui";function l(l,d,u){const{computedX:c,computedY:m}=s(d),{borderStyle:f,originX:h,originY:g,xCellWidth:L,yCellHeight:p,canvasWidth:E,canvasHeight:M,dataList:v,columnNumber:N,gridYNumber:C,gridXNumber:x,rowNumber:S,lineStyle:b,titleStyle:w}=d,j=new Set,R=new Set;function y(t=0){v.forEach(((r,o)=>{if(o===v.length-1&&arguments.length)return;const{x:i,y:n,offsetY:s,rowIdx:l}=r.origin,f=~~(r.data.length/N),h=r.data.reduce(((e,r,i)=>{const n=o<a.MAXLINENUMBER-1&&i>=t&&i<=t+f||o===a.MAXLINENUMBER-1?[{x:c(e.length+1),y:m(-+r)+s}]:[];return e.concat(n)}),[]),g=new e.Polyline(h,{...b,fill:"transparent",strokeWidth:1,left:i,hasControls:!1,hasBorders:!1,hoverCursor:"default",lockMovementX:!0,lockMovementY:!0,objectCaching:!0,evented:!0,selectable:!0});if(A(g,{...d.config,...d,lineStartIndex:t,points:r.data,scale:4,showScaleText:!0,showNumberText:!0,detailRadius:370,beforeEvent:()=>u.value&&Promise.reject()}),g.startIdx=t,o<v.length-1?j.add(g):R.add(g),arguments.length)return;const p=new e.Text(String(r.title),{...w,left:i+L,top:n,originX:"left",originY:"top"});R.add(p)}));const r=arguments.length?[...j]:[...j,...R];l.value.add(...r)}function A(e,t){o(e,t)}n(l,{...d,gridXNumber:x*a.SMALLCELLNUMBER,gridYNumber:C*a.SMALLCELLNUMBER,xCellWidth:L/a.SMALLCELLNUMBER,yCellHeight:p/a.SMALLCELLNUMBER,grid:{...d.grid,subXCell:a.SMALLCELLNUMBER,subYCell:a.SMALLCELLNUMBER}}),function(){const{strokeWidth:t}=f,r=new e.Rect({...f,width:E-t,height:M-t,left:h,top:g,fill:"transparent"});l.value.add(r)}(),function(){const e=E/N,t=[];r(N).forEach((r=>{if(r+1>=N)return;const o=(r+1)*e,n=i([o,0,o,M],{stroke:"#000"});t.push(n)})),l.value.add(...t)}(),y();return{updatePolyline:t((t=>{if(1===N)return;const r=v[v.length-1].data.length,o=~~(r/N),i=t/100*r-o/2,n=i+o>r?r-o:Math.max(0,i);e.util.requestAnimFrame((()=>{if(j.size){const[e]=[...j];if(e.startIdx===n)return;[...j].forEach((e=>l.value.remove(e))),j.clear()}y(n)}))}),150)}}export{l as useElectrocardiogram};