cnhis-design-vue 3.1.49-beta.1 → 3.1.49-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/es/components/base-search/style/index.css +1 -1
  2. package/es/components/expand-field/index.d.ts +1630 -0
  3. package/es/components/expand-field/index.js +1 -0
  4. package/es/components/expand-field/src/components/FormBatchOptionsModal.vue.d.ts +54 -0
  5. package/es/components/expand-field/src/components/FormBatchOptionsModal.vue.js +1 -0
  6. package/es/components/expand-field/src/components/FormBatchOptionsModal.vue2.js +1 -0
  7. package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +841 -0
  8. package/es/components/expand-field/src/components/FormItemPerson.vue.js +1 -0
  9. package/es/components/expand-field/src/components/FormItemPerson.vue2.js +1 -0
  10. package/es/components/expand-field/src/components/PersonModal.vue.d.ts +777 -0
  11. package/es/components/expand-field/src/components/PersonModal.vue.js +1 -0
  12. package/es/components/expand-field/src/components/PersonModal.vue2.js +1 -0
  13. package/es/components/expand-field/src/components/form.vue.d.ts +1502 -0
  14. package/es/components/expand-field/src/components/form.vue.js +1 -0
  15. package/es/components/expand-field/src/components/form.vue2.js +1 -0
  16. package/es/components/expand-field/src/constants/index.d.ts +3 -0
  17. package/es/components/expand-field/src/constants/index.js +1 -0
  18. package/es/components/expand-field/src/hooks/useAsyncData.d.ts +6 -0
  19. package/es/components/expand-field/src/hooks/useAsyncData.js +1 -0
  20. package/es/components/expand-field/src/index.vue.d.ts +1632 -0
  21. package/es/components/expand-field/src/index.vue.js +1 -0
  22. package/es/components/expand-field/src/index.vue2.js +1 -0
  23. package/es/components/expand-field/src/types/index.d.ts +1 -0
  24. package/es/components/expand-field/src/types/index.js +1 -0
  25. package/es/components/expand-field/src/utils/constant.d.ts +17 -0
  26. package/es/components/expand-field/src/utils/constant.js +1 -0
  27. package/es/components/expand-field/src/utils/index.d.ts +6 -0
  28. package/es/components/expand-field/src/utils/index.js +1 -0
  29. package/es/components/expand-field/src/utils/tool.d.ts +2 -0
  30. package/es/components/expand-field/src/utils/tool.js +1 -0
  31. package/es/components/expand-field/style/expand-field-iconfont.ttf +0 -0
  32. package/es/components/expand-field/style/index.css +1 -0
  33. package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
  34. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +5 -1
  35. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  36. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.d.ts +2 -1
  37. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  38. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  39. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  40. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  41. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  42. package/es/components/fabric-chart/src/interface.d.ts +1 -1
  43. package/es/components/field-set/index.d.ts +114 -20
  44. package/es/components/field-set/src/FieldSet.vue.d.ts +114 -20
  45. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  46. package/es/components/field-set/src/components/Row.vue.d.ts +110 -19
  47. package/es/components/field-set/src/components/Row.vue2.js +1 -1
  48. package/es/components/field-set/src/types/index.d.ts +1 -1
  49. package/es/components/field-set/src/utils/index.js +1 -1
  50. package/es/components/form-config/index.d.ts +1 -1
  51. package/es/components/form-config/src/FormConfig.vue.d.ts +1 -1
  52. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +29 -29
  53. package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -1
  54. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  55. package/es/components/form-render/index.js +1 -1
  56. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  57. package/es/components/form-render/src/components/renderer/complex.js +1 -1
  58. package/es/components/form-render/src/components/renderer/date.js +1 -1
  59. package/es/components/form-render/src/components/renderer/inputNumber.js +1 -1
  60. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  61. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
  62. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  63. package/es/components/form-render/src/components/renderer/select.js +1 -1
  64. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  65. package/es/components/form-render/src/components/renderer/textarea.js +1 -1
  66. package/es/components/form-render/src/hooks/useAnchor.js +1 -1
  67. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
  68. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  69. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  70. package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -1
  71. package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
  72. package/es/components/form-render/src/hooks/usePresetScope.js +1 -1
  73. package/es/components/form-render/src/utils/index.d.ts +1 -0
  74. package/es/components/form-render/src/utils/index.js +1 -1
  75. package/es/components/form-render/style/index.css +1 -1
  76. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  77. package/es/components/iho-table/src/plugins/filterVisibleEventPlugin.d.ts +1 -0
  78. package/es/components/iho-table/src/plugins/filterVisibleEventPlugin.js +1 -0
  79. package/es/components/iho-table/src/plugins/index.js +1 -1
  80. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
  81. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +21 -0
  82. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  83. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
  84. package/es/components/iho-table/src/types/index.d.ts +1 -0
  85. package/es/components/iho-table/style/index.css +1 -1
  86. package/es/components/index.css +1 -1
  87. package/es/components/index.d.ts +2 -1
  88. package/es/components/index.js +1 -1
  89. package/es/components/quick-search/style/index.css +1 -1
  90. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  91. package/es/components/select-person/style/index.css +1 -1
  92. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  93. package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +40 -0
  94. package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -0
  95. package/es/shared/components/InputNumberSlash/index.d.ts +2 -0
  96. package/es/shared/components/InputNumberSlash/index.js +1 -0
  97. package/es/shared/hooks/useDateTime.js +1 -1
  98. package/es/shared/package.json.js +1 -1
  99. package/es/shared/utils/anime.d.ts +2 -1
  100. package/es/shared/utils/anime.js +1 -1
  101. package/package.json +2 -2
@@ -1,3 +1,4 @@
1
+ /// <reference types="lodash" />
1
2
  import { PropType } from 'vue';
2
3
  import { setStyle, isDisable } from './utils';
3
4
  import { FieldSetColumnName, FieldSetColumnItem } from '../../../../es/components/field-set/src/types';
@@ -122,7 +123,7 @@ declare const _default: import("vue").DefineComponent<{
122
123
  isShowColumn: (column: AnyObject) => boolean;
123
124
  initFields: () => AnyObject[];
124
125
  handleGroup: (fields: AnyObject[]) => AnyObject[];
125
- getTableFields: () => AnyObject[];
126
+ getTableFields: () => import("lodash").Omit<never, "uuid">[];
126
127
  handleAllCheck: (checked: boolean, field: string) => void;
127
128
  handleCheck: ({ checked, column }: {
128
129
  checked: boolean;
@@ -133,6 +134,8 @@ declare const _default: import("vue").DefineComponent<{
133
134
  NButton: any;
134
135
  NCheckbox: any;
135
136
  NPopconfirm: any;
137
+ NIcon: any;
138
+ NTooltip: any;
136
139
  Draggable: import("vue").DefineComponent<{
137
140
  list: {
138
141
  type: ArrayConstructor;
@@ -208,10 +211,6 @@ declare const _default: import("vue").DefineComponent<{
208
211
  }>;
209
212
  Row: import("vue").DefineComponent<{
210
213
  element: {
211
- type: PropType<AnyObject>;
212
- default: () => {};
213
- };
214
- columns: {
215
214
  type: PropType<Partial<{
216
215
  [key: string]: any;
217
216
  id: string;
@@ -229,13 +228,38 @@ declare const _default: import("vue").DefineComponent<{
229
228
  required: boolean;
230
229
  requiredDisable: boolean;
231
230
  hide: boolean;
232
- }>[]>;
231
+ }>>;
232
+ default: () => {};
233
+ };
234
+ columns: {
235
+ type: PropType<FieldSetColumnItem[]>;
233
236
  default: () => never[];
234
237
  };
235
238
  idx: {
236
239
  type: NumberConstructor;
237
240
  default: number;
238
241
  };
242
+ fieldList: {
243
+ type: PropType<Partial<{
244
+ [key: string]: any;
245
+ id: string;
246
+ name: string;
247
+ show: boolean;
248
+ sort: boolean;
249
+ sortDirection: "NONE" | "ASC" | "DESC";
250
+ title: string;
251
+ alias: string;
252
+ fixedShow: boolean;
253
+ fixedWay: "NONE" | "LEFT" | "RIGHT";
254
+ columnWidth: number | null;
255
+ editable: boolean;
256
+ editableDisable: boolean;
257
+ required: boolean;
258
+ requiredDisable: boolean;
259
+ hide: boolean;
260
+ }>[]>;
261
+ default: () => never[];
262
+ };
239
263
  }, {
240
264
  fixedWayOptions: {
241
265
  label: string;
@@ -247,10 +271,6 @@ declare const _default: import("vue").DefineComponent<{
247
271
  }[];
248
272
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
249
273
  element: {
250
- type: PropType<AnyObject>;
251
- default: () => {};
252
- };
253
- columns: {
254
274
  type: PropType<Partial<{
255
275
  [key: string]: any;
256
276
  id: string;
@@ -268,22 +288,56 @@ declare const _default: import("vue").DefineComponent<{
268
288
  required: boolean;
269
289
  requiredDisable: boolean;
270
290
  hide: boolean;
271
- }>[]>;
291
+ }>>;
292
+ default: () => {};
293
+ };
294
+ columns: {
295
+ type: PropType<FieldSetColumnItem[]>;
272
296
  default: () => never[];
273
297
  };
274
298
  idx: {
275
299
  type: NumberConstructor;
276
300
  default: number;
277
301
  };
302
+ fieldList: {
303
+ type: PropType<Partial<{
304
+ [key: string]: any;
305
+ id: string;
306
+ name: string;
307
+ show: boolean;
308
+ sort: boolean;
309
+ sortDirection: "NONE" | "ASC" | "DESC";
310
+ title: string;
311
+ alias: string;
312
+ fixedShow: boolean;
313
+ fixedWay: "NONE" | "LEFT" | "RIGHT";
314
+ columnWidth: number | null;
315
+ editable: boolean;
316
+ editableDisable: boolean;
317
+ required: boolean;
318
+ requiredDisable: boolean;
319
+ hide: boolean;
320
+ }>[]>;
321
+ default: () => never[];
322
+ };
278
323
  }>> & {
279
324
  onUpdateChecked?: ((...args: any[]) => any) | undefined;
280
325
  }>>;
281
326
  emit: (event: "updateChecked", ...args: any[]) => void;
282
- setOptions: (column: AnyObject) => {
327
+ getSortPriorityOptions: () => {
328
+ label: string;
329
+ value: number;
330
+ }[];
331
+ getOptions: (column: AnyObject) => {
283
332
  label: string;
284
333
  value: string;
334
+ }[] | {
335
+ label: string;
336
+ value: number;
285
337
  }[];
338
+ setDisabled: (column: AnyObject) => boolean;
286
339
  onUpdateChecked: (checked: boolean, column: AnyObject) => void;
340
+ handleUpdateSelect: (value: string, column: AnyObject) => void;
287
341
  NCheckbox: any;
288
342
  NSelect: any;
289
343
  NInput: any;
@@ -295,10 +349,6 @@ declare const _default: import("vue").DefineComponent<{
295
349
  ReorderTwoOutline: 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<{}>>, {}>;
296
350
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "updateChecked"[], "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
297
351
  element: {
298
- type: PropType<AnyObject>;
299
- default: () => {};
300
- };
301
- columns: {
302
352
  type: PropType<Partial<{
303
353
  [key: string]: any;
304
354
  id: string;
@@ -316,17 +366,43 @@ declare const _default: import("vue").DefineComponent<{
316
366
  required: boolean;
317
367
  requiredDisable: boolean;
318
368
  hide: boolean;
319
- }>[]>;
369
+ }>>;
370
+ default: () => {};
371
+ };
372
+ columns: {
373
+ type: PropType<FieldSetColumnItem[]>;
320
374
  default: () => never[];
321
375
  };
322
376
  idx: {
323
377
  type: NumberConstructor;
324
378
  default: number;
325
379
  };
380
+ fieldList: {
381
+ type: PropType<Partial<{
382
+ [key: string]: any;
383
+ id: string;
384
+ name: string;
385
+ show: boolean;
386
+ sort: boolean;
387
+ sortDirection: "NONE" | "ASC" | "DESC";
388
+ title: string;
389
+ alias: string;
390
+ fixedShow: boolean;
391
+ fixedWay: "NONE" | "LEFT" | "RIGHT";
392
+ columnWidth: number | null;
393
+ editable: boolean;
394
+ editableDisable: boolean;
395
+ required: boolean;
396
+ requiredDisable: boolean;
397
+ hide: boolean;
398
+ }>[]>;
399
+ default: () => never[];
400
+ };
326
401
  }>> & {
327
402
  onUpdateChecked?: ((...args: any[]) => any) | undefined;
328
403
  }, {
329
- columns: Partial<{
404
+ columns: FieldSetColumnItem[];
405
+ element: Partial<{
330
406
  [key: string]: any;
331
407
  id: string;
332
408
  name: string;
@@ -343,15 +419,33 @@ declare const _default: import("vue").DefineComponent<{
343
419
  required: boolean;
344
420
  requiredDisable: boolean;
345
421
  hide: boolean;
346
- }>[];
347
- element: AnyObject;
422
+ }>;
348
423
  idx: number;
424
+ fieldList: Partial<{
425
+ [key: string]: any;
426
+ id: string;
427
+ name: string;
428
+ show: boolean;
429
+ sort: boolean;
430
+ sortDirection: "NONE" | "ASC" | "DESC";
431
+ title: string;
432
+ alias: string;
433
+ fixedShow: boolean;
434
+ fixedWay: "NONE" | "LEFT" | "RIGHT";
435
+ columnWidth: number | null;
436
+ editable: boolean;
437
+ editableDisable: boolean;
438
+ required: boolean;
439
+ requiredDisable: boolean;
440
+ hide: boolean;
441
+ }>[];
349
442
  }>;
350
443
  isArray: {
351
444
  (value?: any): value is any[];
352
445
  <T>(value?: any): value is any[];
353
446
  };
354
447
  setStyle: typeof setStyle;
448
+ HelpCircleSharp: 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<{}>>, {}>;
355
449
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "save" | "reset")[], "close" | "save" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
356
450
  fields: {
357
451
  type: PropType<Partial<{
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,computed as t,watch as i,openBlock as d,createElementBlock as o,createElementVNode as a,Fragment as s,renderList as c,normalizeStyle as n,unref as u,createBlock as r,withCtx as f,createTextVNode as m,toDisplayString as h,createCommentVNode as p,createVNode as y,renderSlot as v}from"vue";import{NCheckbox as b,NPopconfirm as k,NButton as x}from"naive-ui";import g from"../../../shared/components/VueDraggable/src/vuedraggable.js";import A from"./components/Row.vue.js";import{isArray as w,cloneDeep as _}from"lodash-es";import{setStyle as S,getGroupTree as C,isDisable as W}from"./utils/index.js";import{isString as E}from"xe-utils";const q={class:"c-field-set"},F={class:"c-field-set__table-header"},N={class:"c-field-set__table-body"},R=["tabindex"],j={key:0,class:"c-field-set__table-footer"};var U=e({__name:"FieldSet",props:{fields:{type:Array,default:()=>[]},footerFlag:{type:Boolean,default:!0},type:{type:String,default:"old"},isEdit:{type:Boolean,default:!1},showColumnNames:{type:Array},groupSetting:{type:Object},customColumns:{type:Array,default:()=>[]},showSeq:{type:Boolean,default:!1}},emits:["save","close","reset"],setup(e,{expose:U,emit:D}){const V=e,B={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"},O=l([]),T=l([{title:"所有字段",type:"text",field:"title"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"show"},{title:"编辑",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"editable"},{title:"必填",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"required"},{title:"排序",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"sort"},{title:"加粗",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"bold"},{title:"默认排序",type:"select",field:"sortDirection"},{title:"固定",type:"select",field:"fixedWay"},{title:"自定义标题",type:"input",field:"alias"},{title:"列宽",type:"inputNumber",field:"columnWidth"}]),P=t((()=>O.value.flat())),G=()=>{D("save",{tableFields:$()})},H=()=>{D("close")};function I(){O.value=L(),J(),D("reset")}function L(){const e=_(V.fields);return Object.keys(B).forEach((l=>{e.forEach((e=>{"old"==V.type&&Reflect.has(e,l)&&("isFixed"==l?e.fixedWay=1==e[l]?"LEFT":2==e[l]?"RIGHT":"NONE":["isShow","isSort"].includes(l)&&"boolean"!=typeof l?e[B[l]]=1==e[l]:e[B[l]]=e[l],Reflect.deleteProperty(e,l)),e.columnWidth=+e.columnWidth||null,Reflect.has(e,"alias")||(e.alias=""),Reflect.has(e,"bold")||(e.bold=!1)}))})),function(e){if(V.groupSetting){return C(V.groupSetting,e).reduce(((t,i)=>{const d=E(i)?e.find((e=>e.name===i)):l(i.children);return d&&t.push(d),t}),[])}return e;function l(t){const i=[];return t.forEach((t=>{if(t.children)i.push(...l(t.children));else{const l=e.find((e=>e.name===t));l&&i.push(l)}})),i}}(e)}const $=()=>"old"==V.type?P.value.map(((e,l)=>({id:e.id,field:e.name,visible:e.show,sequence:l,sortable:e.sort,title:e.alias,fixed:e.fixedWay,minWidth:e.columnWidth,bold:e.bold,sortDirection:e.sortDirection,...V.isEdit?{required:e.required,editable:e.editable}:{}}))):P.value;function z({checked:e,column:l}){const t=!e||K(l.field);l.checkedAll=!t}function J(){var e,l;(null==(e=V.showColumnNames)?void 0:e.length)&&(T.value=T.value.filter((e=>{var l,t;return"title"===e.field||(null==(t=null==(l=V.showColumnNames)?void 0:l.includes)?void 0:t.call(l,e.field))}))),(null==(l=V.customColumns)?void 0:l.length)&&T.value.push(...V.customColumns),V.showSeq&&T.value.splice(1,0,{title:"排序",type:"text",field:"seq"}),T.value.forEach((e=>{if(function(e){const l=["editable","required"].includes(e.field);return l&&V.isEdit||!l}(e)&&(e.isShow=!0),"checkbox"===e.type){const l=O.value.flat().every((l=>!Reflect.has(l,e.field)));e.checkedAll=!K(e.field)&&!l}}))}function K(e){return O.value.flat().some((l=>!W(l,e)&&!l[e]&&"0001"!=l.id))}return i([()=>V.fields,()=>{var e;return null==(e=V.showColumnNames)?void 0:e.length}],(([e,l])=>{e.length>0&&(O.value=L(),J())}),{immediate:!0,deep:!0}),U({getTableFields:$}),(l,t)=>(d(),o("div",q,[a("div",F,[(d(!0),o(s,null,c(T.value,((e,l)=>(d(),o(s,{key:l},[e.isShow?(d(),o("span",{key:0,class:"table-cell",style:n(u(S)(e))},["checkbox"===e.type?(d(),r(u(b),{key:0,checked:e.checkedAll,"onUpdate:checked":[l=>e.checkedAll=l,l=>{return t=l,i=e.field,void P.value.forEach((e=>{W(e,i)||(e[i]=t)}));var t,i}],disabled:e.disabledAll},{default:f((()=>[m(h(e.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])):p("v-if",!0),m(" "+h("checkbox"!==e.type?e.title:""),1)],4)):p("v-if",!0)],64)))),128))]),a("div",N,[y(u(g),{modelValue:O.value,"onUpdate:modelValue":t[0]||(t[0]=e=>O.value=e),animation:"150","item-key":"id",draggable:".item"},{item:f((({element:e,index:l})=>[e.hide?p("v-if",!0):(d(),o("div",{key:0,class:"item",tabindex:l},[u(w)(e)?(d(!0),o(s,{key:0},c(e,((e,t)=>(d(),r(A,{key:t,element:e,columns:T.value,idx:l+1,onUpdateChecked:z},null,8,["element","columns","idx"])))),128)):(d(),r(A,{key:1,element:e,columns:T.value,idx:l+1,onUpdateChecked:z},null,8,["element","columns","idx"]))],8,R))])),_:1},8,["modelValue"])]),e.footerFlag?(d(),o("div",j,[p(" 底部按钮插槽 "),v(l.$slots,"footer",{},(()=>[y(u(k),{onPositiveClick:I},{trigger:f((()=>[y(u(x),{style:{"margin-right":"8px"}},{default:f((()=>[m("恢复默认设置")])),_:1})])),default:f((()=>[m(" 确认要恢复系统默认设置吗? ")])),_:1}),y(u(x),{style:{"margin-right":"8px"},onClick:H},{default:f((()=>[m("取消")])),_:1}),y(u(x),{type:"primary",onClick:G},{default:f((()=>[m("保存")])),_:1})]))])):p("v-if",!0)]))}});export{U as default};
1
+ import{defineComponent as e,ref as l,computed as t,watch as i,openBlock as d,createElementBlock as o,createElementVNode as s,Fragment as a,renderList as n,normalizeStyle as c,unref as r,createBlock as u,withCtx as f,createTextVNode as m,toDisplayString as h,createCommentVNode as p,createVNode as y,renderSlot as v}from"vue";import{NCheckbox as b,NTooltip as k,NIcon as x,NPopconfirm as g,NButton as A}from"naive-ui";import _ from"../../../shared/components/VueDraggable/src/vuedraggable.js";import w from"./components/Row.vue.js";import{isArray as S,cloneDeep as C,isString as W,omit as E}from"lodash-es";import{setStyle as q,getGroupTree as F,isDisable as N}from"./utils/index.js";import{uuidGenerator as R}from"../../../shared/utils/index.js";import{HelpCircleSharp as j}from"@vicons/ionicons5";const L={class:"c-field-set"},U={class:"c-field-set__table-header"},D=s("span",null,"数值越小,优先级越高",-1),P={class:"c-field-set__table-body"},V=["tabindex"],B={key:0,class:"c-field-set__table-footer"};var O=e({__name:"FieldSet",props:{fields:{type:Array,default:()=>[]},footerFlag:{type:Boolean,default:!0},type:{type:String,default:"old"},isEdit:{type:Boolean,default:!1},showColumnNames:{type:Array},groupSetting:{type:Object},customColumns:{type:Array,default:()=>[]},showSeq:{type:Boolean,default:!1}},emits:["save","close","reset"],setup(e,{expose:O,emit:T}){const G=e,H={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"},I=l([]),$=l([{title:"所有字段",type:"text",field:"title"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"show"},{title:"编辑",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"editable"},{title:"必填",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"required"},{title:"排序",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"sort"},{title:"加粗",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"bold"},{title:"默认排序",type:"select",field:"sortDirection"},{title:"排序优先级",type:"select",field:"sortPriority"},{title:"固定",type:"select",field:"fixedWay"},{title:"自定义标题",type:"input",field:"alias"},{title:"列宽",type:"inputNumber",field:"columnWidth"}]),z=t((()=>I.value.flat())),J=()=>{T("save",{tableFields:X()})},K=()=>{T("close")};function M(){I.value=Q(),Z(),T("reset")}function Q(){const e=C(G.fields).map((e=>({...e,uuid:R()})));return Object.keys(H).forEach((l=>{e.forEach((e=>{"old"==G.type&&Reflect.has(e,l)&&("isFixed"==l?e.fixedWay=1==e[l]?"LEFT":2==e[l]?"RIGHT":"NONE":["isShow","isSort"].includes(l)&&"boolean"!=typeof l?e[H[l]]=1==e[l]:e[H[l]]=e[l],Reflect.deleteProperty(e,l)),e.columnWidth=+e.columnWidth||null,Reflect.has(e,"alias")||(e.alias=""),Reflect.has(e,"bold")||(e.bold=!1)}))})),function(e){if(G.groupSetting){return F(G.groupSetting,e).reduce(((t,i)=>{const d=W(i)?e.find((e=>e.name===i)):l(i.children);return d&&t.push(d),t}),[])}return e;function l(t){const i=[];return t.forEach((t=>{if(t.children)i.push(...l(t.children));else{const l=e.find((e=>e.name===t));l&&i.push(l)}})),i}}(e)}const X=()=>{let e=[];return e="old"==G.type?z.value.map(((e,l)=>({id:e.id,field:e.name,visible:e.show,sequence:l,sortable:e.sort,title:e.alias,fixed:e.fixedWay,minWidth:e.columnWidth,bold:e.bold,sortDirection:e.sortDirection,...G.isEdit?{required:e.required,editable:e.editable}:{}}))):z.value,e.map((e=>E(e,["uuid"])))};function Y({checked:e,column:l}){const t=!e||ee(l.field);l.checkedAll=!t}function Z(){var e,l;(null==(e=G.showColumnNames)?void 0:e.length)&&($.value=$.value.filter((e=>{var l,t;return"title"===e.field||(null==(t=null==(l=G.showColumnNames)?void 0:l.includes)?void 0:t.call(l,e.field))}))),(null==(l=G.customColumns)?void 0:l.length)&&$.value.push(...G.customColumns),G.showSeq&&$.value.splice(1,0,{title:"排序",type:"text",field:"seq"}),$.value.forEach((e=>{if(function(e){const l=["editable","required"].includes(e.field);return l&&G.isEdit||!l}(e)&&(e.isShow=!0),"checkbox"===e.type){const l=I.value.flat().every((l=>!Reflect.has(l,e.field)));e.checkedAll=!ee(e.field)&&!l}}))}function ee(e){return I.value.flat().some((l=>!N(l,e)&&!l[e]&&"0001"!=l.id))}return i([()=>G.fields,()=>{var e;return null==(e=G.showColumnNames)?void 0:e.length}],(([e,l])=>{e.length>0&&(I.value=Q(),Z())}),{immediate:!0,deep:!0}),O({getTableFields:X}),(l,t)=>(d(),o("div",L,[s("div",U,[(d(!0),o(a,null,n($.value,((e,l)=>(d(),o(a,{key:l},[e.isShow?(d(),o("span",{key:0,class:"table-cell",style:c(r(q)(e))},["checkbox"===e.type?(d(),u(r(b),{key:0,checked:e.checkedAll,"onUpdate:checked":[l=>e.checkedAll=l,l=>{return t=l,i=e.field,void z.value.forEach((e=>{N(e,i)||(e[i]=t)}));var t,i}],disabled:e.disabledAll},{default:f((()=>[m(h(e.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])):p("v-if",!0),m(" "+h("checkbox"!==e.type?e.title:"")+" ",1),"sortPriority"===e.field?(d(),u(r(k),{key:1,trigger:"hover"},{trigger:f((()=>[y(r(x),{component:r(j),style:{top:"2px"}},null,8,["component"])])),default:f((()=>[D])),_:1})):p("v-if",!0)],4)):p("v-if",!0)],64)))),128))]),s("div",P,[y(r(_),{modelValue:I.value,"onUpdate:modelValue":t[0]||(t[0]=e=>I.value=e),animation:"150","item-key":"id",draggable:".item"},{item:f((({element:e,index:l})=>[e.hide?p("v-if",!0):(d(),o("div",{key:0,class:"item",tabindex:l},[r(S)(e)?(d(!0),o(a,{key:0},n(e,((e,t)=>(d(),u(w,{key:t,element:e,columns:$.value,idx:l+1,fieldList:r(z),onUpdateChecked:Y},null,8,["element","columns","idx","fieldList"])))),128)):(d(),u(w,{key:1,element:e,columns:$.value,idx:l+1,fieldList:r(z),onUpdateChecked:Y},null,8,["element","columns","idx","fieldList"]))],8,V))])),_:1},8,["modelValue"])]),e.footerFlag?(d(),o("div",B,[p(" 底部按钮插槽 "),v(l.$slots,"footer",{},(()=>[y(r(g),{onPositiveClick:M},{trigger:f((()=>[y(r(A),{style:{"margin-right":"8px"}},{default:f((()=>[m("恢复默认设置")])),_:1})])),default:f((()=>[m(" 确认要恢复系统默认设置吗? ")])),_:1}),y(r(A),{style:{"margin-right":"8px"},onClick:K},{default:f((()=>[m("取消")])),_:1}),y(r(A),{type:"primary",onClick:J},{default:f((()=>[m("保存")])),_:1})]))])):p("v-if",!0)]))}});export{O as default};
@@ -1,12 +1,9 @@
1
1
  import { PropType } from 'vue';
2
2
  import { AnyObject } from '../../../../../es/shared/types';
3
+ import { FieldSetColumnItem } from '../../../../../es/components/field-set';
3
4
  import { setStyle, isDisable } from '../utils';
4
5
  declare const _default: import("vue").DefineComponent<{
5
6
  element: {
6
- type: PropType<AnyObject>;
7
- default: () => {};
8
- };
9
- columns: {
10
7
  type: PropType<Partial<{
11
8
  [key: string]: any;
12
9
  id: string;
@@ -24,13 +21,38 @@ declare const _default: import("vue").DefineComponent<{
24
21
  required: boolean;
25
22
  requiredDisable: boolean;
26
23
  hide: boolean;
27
- }>[]>;
24
+ }>>;
25
+ default: () => {};
26
+ };
27
+ columns: {
28
+ type: PropType<FieldSetColumnItem[]>;
28
29
  default: () => never[];
29
30
  };
30
31
  idx: {
31
32
  type: NumberConstructor;
32
33
  default: number;
33
34
  };
35
+ fieldList: {
36
+ type: PropType<Partial<{
37
+ [key: string]: any;
38
+ id: string;
39
+ name: string;
40
+ show: boolean;
41
+ sort: boolean;
42
+ sortDirection: "NONE" | "ASC" | "DESC";
43
+ title: string;
44
+ alias: string;
45
+ fixedShow: boolean;
46
+ fixedWay: "NONE" | "LEFT" | "RIGHT";
47
+ columnWidth: number | null;
48
+ editable: boolean;
49
+ editableDisable: boolean;
50
+ required: boolean;
51
+ requiredDisable: boolean;
52
+ hide: boolean;
53
+ }>[]>;
54
+ default: () => never[];
55
+ };
34
56
  }, {
35
57
  fixedWayOptions: {
36
58
  label: string;
@@ -42,10 +64,6 @@ declare const _default: import("vue").DefineComponent<{
42
64
  }[];
43
65
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
44
66
  element: {
45
- type: PropType<AnyObject>;
46
- default: () => {};
47
- };
48
- columns: {
49
67
  type: PropType<Partial<{
50
68
  [key: string]: any;
51
69
  id: string;
@@ -63,22 +81,56 @@ declare const _default: import("vue").DefineComponent<{
63
81
  required: boolean;
64
82
  requiredDisable: boolean;
65
83
  hide: boolean;
66
- }>[]>;
84
+ }>>;
85
+ default: () => {};
86
+ };
87
+ columns: {
88
+ type: PropType<FieldSetColumnItem[]>;
67
89
  default: () => never[];
68
90
  };
69
91
  idx: {
70
92
  type: NumberConstructor;
71
93
  default: number;
72
94
  };
95
+ fieldList: {
96
+ type: PropType<Partial<{
97
+ [key: string]: any;
98
+ id: string;
99
+ name: string;
100
+ show: boolean;
101
+ sort: boolean;
102
+ sortDirection: "NONE" | "ASC" | "DESC";
103
+ title: string;
104
+ alias: string;
105
+ fixedShow: boolean;
106
+ fixedWay: "NONE" | "LEFT" | "RIGHT";
107
+ columnWidth: number | null;
108
+ editable: boolean;
109
+ editableDisable: boolean;
110
+ required: boolean;
111
+ requiredDisable: boolean;
112
+ hide: boolean;
113
+ }>[]>;
114
+ default: () => never[];
115
+ };
73
116
  }>> & {
74
117
  onUpdateChecked?: ((...args: any[]) => any) | undefined;
75
118
  }>>;
76
119
  emit: (event: "updateChecked", ...args: any[]) => void;
77
- setOptions: (column: AnyObject) => {
120
+ getSortPriorityOptions: () => {
121
+ label: string;
122
+ value: number;
123
+ }[];
124
+ getOptions: (column: AnyObject) => {
78
125
  label: string;
79
126
  value: string;
127
+ }[] | {
128
+ label: string;
129
+ value: number;
80
130
  }[];
131
+ setDisabled: (column: AnyObject) => boolean;
81
132
  onUpdateChecked: (checked: boolean, column: AnyObject) => void;
133
+ handleUpdateSelect: (value: string, column: AnyObject) => void;
82
134
  NCheckbox: any;
83
135
  NSelect: any;
84
136
  NInput: any;
@@ -90,10 +142,6 @@ declare const _default: import("vue").DefineComponent<{
90
142
  ReorderTwoOutline: 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<{}>>, {}>;
91
143
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "updateChecked"[], "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
92
144
  element: {
93
- type: PropType<AnyObject>;
94
- default: () => {};
95
- };
96
- columns: {
97
145
  type: PropType<Partial<{
98
146
  [key: string]: any;
99
147
  id: string;
@@ -111,17 +159,43 @@ declare const _default: import("vue").DefineComponent<{
111
159
  required: boolean;
112
160
  requiredDisable: boolean;
113
161
  hide: boolean;
114
- }>[]>;
162
+ }>>;
163
+ default: () => {};
164
+ };
165
+ columns: {
166
+ type: PropType<FieldSetColumnItem[]>;
115
167
  default: () => never[];
116
168
  };
117
169
  idx: {
118
170
  type: NumberConstructor;
119
171
  default: number;
120
172
  };
173
+ fieldList: {
174
+ type: PropType<Partial<{
175
+ [key: string]: any;
176
+ id: string;
177
+ name: string;
178
+ show: boolean;
179
+ sort: boolean;
180
+ sortDirection: "NONE" | "ASC" | "DESC";
181
+ title: string;
182
+ alias: string;
183
+ fixedShow: boolean;
184
+ fixedWay: "NONE" | "LEFT" | "RIGHT";
185
+ columnWidth: number | null;
186
+ editable: boolean;
187
+ editableDisable: boolean;
188
+ required: boolean;
189
+ requiredDisable: boolean;
190
+ hide: boolean;
191
+ }>[]>;
192
+ default: () => never[];
193
+ };
121
194
  }>> & {
122
195
  onUpdateChecked?: ((...args: any[]) => any) | undefined;
123
196
  }, {
124
- columns: Partial<{
197
+ columns: FieldSetColumnItem[];
198
+ element: Partial<{
125
199
  [key: string]: any;
126
200
  id: string;
127
201
  name: string;
@@ -138,8 +212,25 @@ declare const _default: import("vue").DefineComponent<{
138
212
  required: boolean;
139
213
  requiredDisable: boolean;
140
214
  hide: boolean;
141
- }>[];
142
- element: AnyObject;
215
+ }>;
143
216
  idx: number;
217
+ fieldList: Partial<{
218
+ [key: string]: any;
219
+ id: string;
220
+ name: string;
221
+ show: boolean;
222
+ sort: boolean;
223
+ sortDirection: "NONE" | "ASC" | "DESC";
224
+ title: string;
225
+ alias: string;
226
+ fixedShow: boolean;
227
+ fixedWay: "NONE" | "LEFT" | "RIGHT";
228
+ columnWidth: number | null;
229
+ editable: boolean;
230
+ editableDisable: boolean;
231
+ required: boolean;
232
+ requiredDisable: boolean;
233
+ hide: boolean;
234
+ }>[];
144
235
  }>;
145
236
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,openBlock as l,createElementBlock as t,Fragment as n,renderList as i,normalizeStyle as a,unref as d,createBlock as u,withCtx as o,createVNode as p,createCommentVNode as f,createTextVNode as m,toDisplayString as c,withDirectives as v,vShow as r,createElementVNode as s}from"vue";import{NTooltip as y,NIcon as k,NCheckbox as b,NSelect as h,NInput as x,NInputNumber as U}from"naive-ui";import{setStyle as g,isDisable as N}from"../utils/index.js";import{ReorderTwoOutline as C}from"@vicons/ionicons5";const E={class:"row"},w=["title"],O=s("span",null,"拖拽调整顺序",-1);var S=e({__name:"Row",props:{element:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]},idx:{type:Number,default:1}},emits:["updateChecked"],setup(e,{emit:s}){const S=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],_=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}];function j(e){return"fixedWay"===e.field?S:_}return(S,_)=>(l(),t("div",E,[(l(!0),t(n,null,i(e.columns,((i,E)=>(l(),t(n,{key:E},[i.isShow?(l(),t("span",{key:0,class:"table-cell",title:e.element[i.field],style:a(d(g)(i))},["text"===i.type?(l(),t(n,{key:0},[0===E?(l(),u(d(y),{key:0,trigger:"hover"},{trigger:o((()=>[p(d(k),{style:{"margin-right":"5px",top:"2px"},component:d(C)},null,8,["component"])])),default:o((()=>[O])),_:1})):f("v-if",!0),m(" "+c("seq"===i.field?e.idx:e.element[i.field]),1)],64)):f("v-if",!0),"checkbox"===i.type?v((l(),u(d(b),{key:1,disabled:d(N)(e.element,i.field),checked:e.element[i.field],"onUpdate:checked":[l=>e.element[i.field]=l,e=>function(e,l){s("updateChecked",{checked:e,column:l})}(e,i)]},null,8,["disabled","checked","onUpdate:checked"])),[[r,"0001"!=e.element.id]]):f("v-if",!0),"select"===i.type?v((l(),u(d(h),{key:2,value:e.element[i.field],"onUpdate:value":l=>e.element[i.field]=l,options:j(i)},null,8,["value","onUpdate:value","options"])),[[r,"fixedWay"===i.field||"0001"!=e.element.id]]):f("v-if",!0),"input"===i.type?v((l(),u(d(x),{key:3,value:e.element[i.field],"onUpdate:value":l=>e.element[i.field]=l,clearable:""},null,8,["value","onUpdate:value"])),[[r,"0001"!=e.element.id]]):f("v-if",!0),"inputNumber"===i.type?(l(),u(d(U),{key:4,value:e.element[i.field],"onUpdate:value":l=>e.element[i.field]=l},null,8,["value","onUpdate:value"])):f("v-if",!0)],12,w)):f("v-if",!0)],64)))),128))]))}});export{S as default};
1
+ import{defineComponent as e,openBlock as l,createElementBlock as t,Fragment as i,renderList as n,normalizeStyle as a,unref as r,createBlock as o,withCtx as u,createVNode as d,createCommentVNode as s,createTextVNode as f,toDisplayString as c,withDirectives as m,vShow as p,createElementVNode as v}from"vue";import{NTooltip as y,NIcon as b,NCheckbox as k,NSelect as h,NInput as x,NInputNumber as N}from"naive-ui";import{setStyle as g,isDisable as U}from"../utils/index.js";import{ReorderTwoOutline as E}from"@vicons/ionicons5";import{range as O}from"lodash-es";const P={class:"row"},w=["title"],C=v("span",null,"拖拽调整顺序",-1);var D=e({__name:"Row",props:{element:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]},idx:{type:Number,default:1},fieldList:{type:Array,default:()=>[]}},emits:["updateChecked"],setup(e,{emit:v}){const D=e,L=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],S=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}];function A(e){switch(e.field){case"fixedWay":return L;case"sortDirection":return S;case"sortPriority":return function(){const e=O(1,D.fieldList.length+1).map((e=>({label:e.toString(),value:e}))),l=D.fieldList.filter((e=>!!e.sortPriority&&e.uuid!==D.element.uuid)).map((e=>e.sortPriority));return e.filter((e=>!l.includes(e.value)))}();default:return[]}}function _(e){if("sortPriority"!==e.field)return!1;const{sortDirection:l}=D.element;return!l||"NONE"===l}return(O,L)=>(l(),t("div",P,[(l(!0),t(i,null,n(e.columns,((n,O)=>(l(),t(i,{key:O},[n.isShow?(l(),t("span",{key:0,class:"table-cell",title:e.element[n.field],style:a(r(g)(n))},["text"===n.type?(l(),t(i,{key:0},[0===O?(l(),o(r(y),{key:0,trigger:"hover"},{trigger:u((()=>[d(r(b),{style:{"margin-right":"5px",top:"2px"},component:r(E)},null,8,["component"])])),default:u((()=>[C])),_:1})):s("v-if",!0),f(" "+c("seq"===n.field?e.idx:e.element[n.field]),1)],64)):s("v-if",!0),"checkbox"===n.type?m((l(),o(r(k),{key:1,disabled:r(U)(e.element,n.field),checked:e.element[n.field],"onUpdate:checked":[l=>e.element[n.field]=l,e=>function(e,l){v("updateChecked",{checked:e,column:l})}(e,n)]},null,8,["disabled","checked","onUpdate:checked"])),[[p,"0001"!=e.element.id]]):s("v-if",!0),"select"===n.type?m((l(),o(r(h),{key:2,clearable:"",disabled:_(n),value:e.element[n.field],"onUpdate:value":[l=>e.element[n.field]=l,e=>function(e,l){"sortDirection"===l.field&&"NONE"===e&&(D.element.sortPriority=null)}(e,n)],options:A(n)},null,8,["disabled","value","onUpdate:value","options"])),[[p,"fixedWay"===n.field||"0001"!=e.element.id]]):s("v-if",!0),"input"===n.type?m((l(),o(r(x),{key:3,value:e.element[n.field],"onUpdate:value":l=>e.element[n.field]=l,clearable:""},null,8,["value","onUpdate:value"])),[[p,"0001"!=e.element.id]]):s("v-if",!0),"inputNumber"===n.type?(l(),o(r(N),{key:4,value:e.element[n.field],"onUpdate:value":l=>e.element[n.field]=l},null,8,["value","onUpdate:value"])):s("v-if",!0)],12,w)):s("v-if",!0)],64)))),128))]))}});export{D as default};
@@ -16,7 +16,7 @@ export declare type FieldSetItem = Partial<{
16
16
  hide: boolean;
17
17
  [key: string]: any;
18
18
  }>;
19
- export declare type FieldSetColumnName = 'show' | 'editable' | 'required' | 'sort' | 'bold' | 'sortDirection' | 'fixedWay' | 'alias' | 'columnWidth';
19
+ export declare type FieldSetColumnName = 'show' | 'editable' | 'required' | 'sort' | 'bold' | 'sortDirection' | 'sortPriority' | 'fixedWay' | 'alias' | 'columnWidth';
20
20
  export declare type FieldSetColumnItem = {
21
21
  title: string;
22
22
  type: 'text' | 'checkbox' | 'select' | 'input' | 'inputNumber';
@@ -1 +1 @@
1
- import{isArray as e,isObject as t}from"lodash-es";import{IhoTableRowGroupSequence as i}from"../../../iho-table/src/constants/index.js";function n(e){const t={flex:"1 1 90px"};switch(e.type){case"text":"title"===e.field&&Object.assign(t,{flex:"0 0 120px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"});break;case"checkbox":t.flex="1 1 60px";break;case"select":t.flex="1 1 80px";break;case"input":t.flex="1 1 100px"}return t}function s(e,t){return["editable","required"].includes(t)&&e[`${t}Disable`]||["sort"].includes(t)&&1==e.notParticipatingSort}function r(n,s,r=(e=>e.name)){const l=s.map((e=>r(e)));return i.some((i=>{const s=n[i];if(!e(s))return!0;s.forEach((i=>{if(!e(i.list)||!i.list.length)return;const n=[];let s=null;i.list.forEach(((e,r)=>{const c=function(e,i,n){return i.findIndex((i=>i!==n&&(t(i)?i.fieldName:i)===e))}(e,l,s);~c&&(n.push(l[c]),0===r?l.splice(c,1,s={fieldName:i.title,children:n}):l.splice(c,1))}))}))})),l}export{r as getGroupTree,s as isDisable,n as setStyle};
1
+ import{isArray as e,isObject as t}from"lodash-es";import{IhoTableRowGroupSequence as i}from"../../../iho-table/src/constants/index.js";function n(e){const t={flex:"1 1 90px"};switch(e.type){case"text":"title"===e.field&&Object.assign(t,{flex:"0 0 120px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}),"seq"===e.field&&(t.flex="1 1 40px");break;case"checkbox":t.flex="1 1 60px";break;case"select":t.flex="1 1 80px";break;case"input":t.flex="1 1 100px"}return t}function s(e,t){return["editable","required"].includes(t)&&e[`${t}Disable`]||["sort"].includes(t)&&1==e.notParticipatingSort}function l(n,s,l=(e=>e.name)){const r=s.map((e=>l(e)));return i.some((i=>{const s=n[i];if(!e(s))return!0;s.forEach((i=>{if(!e(i.list)||!i.list.length)return;const n=[];let s=null;i.list.forEach(((e,l)=>{const c=function(e,i,n){return i.findIndex((i=>i!==n&&(t(i)?i.fieldName:i)===e))}(e,r,s);~c&&(n.push(r[c]),0===l?r.splice(c,1,s={fieldName:i.title,children:n}):r.splice(c,1))}))}))})),r}export{l as getGroupTree,s as isDisable,n as setStyle};
@@ -7052,7 +7052,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
7052
7052
  lineBreakFormRef: import("vue").Ref<import("..").FormRenderExpose | undefined>;
7053
7053
  initialData: Partial<import("./src/types").FormConfigItem>;
7054
7054
  emit: (event: "submit", payload: import("./src/types").FormConfigItem) => void;
7055
- submit: (type: string, formRef?: import("..").FormRenderExpose | undefined) => Promise<void>;
7055
+ submit: (type: string, props?: import("../../../es/shared/types").AnyObject | undefined, formRef?: import("..").FormRenderExpose | undefined) => Promise<void>;
7056
7056
  pick: {
7057
7057
  <T extends object, U extends keyof T>(object: T, ...props: import("lodash").Many<U>[]): Pick<T, U>;
7058
7058
  <T_1>(object: T_1 | null | undefined, ...props: import("lodash").Many<import("lodash").PropertyPath>[]): Partial<T_1>;
@@ -7054,7 +7054,7 @@ declare const _default: import("vue").DefineComponent<{
7054
7054
  lineBreakFormRef: import("vue").Ref<FormRenderExpose | undefined>;
7055
7055
  initialData: Partial<FormConfigItem>;
7056
7056
  emit: (event: "submit", payload: FormConfigItem) => void;
7057
- submit: (type: string, formRef?: FormRenderExpose | undefined) => Promise<void>;
7057
+ submit: (type: string, props?: import("../../../../es/shared/types").AnyObject | undefined, formRef?: FormRenderExpose | undefined) => Promise<void>;
7058
7058
  pick: {
7059
7059
  <T extends object, U extends keyof T>(object: T, ...props: import("lodash").Many<U>[]): Pick<T, U>;
7060
7060
  <T_1>(object: T_1 | null | undefined, ...props: import("lodash").Many<import("lodash").PropertyPath>[]): Partial<T_1>;