cnhis-design-vue 3.1.50-release.3 → 3.1.51-beta.0

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 (71) hide show
  1. package/es/components/base-search/index.d.ts +14 -8
  2. package/es/components/base-search/src/index.vue.d.ts +14 -8
  3. package/es/components/base-search/src/index.vue2.js +1 -1
  4. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  5. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  6. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  7. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  8. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  9. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  10. package/es/components/fabric-chart/src/hooks/useCommon.d.ts +1 -0
  11. package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
  12. package/es/components/field-set/index.d.ts +1 -1
  13. package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
  14. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  15. package/es/components/form-config/index.d.ts +174 -25
  16. package/es/components/form-config/src/FormConfig.vue.d.ts +175 -26
  17. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  18. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +4 -4
  19. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +13 -10
  20. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +121 -0
  21. package/es/components/form-config/src/components/FormConfigEventSetting.vue.js +1 -0
  22. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -0
  23. package/es/components/form-config/src/constants/index.d.ts +19 -1
  24. package/es/components/form-config/src/constants/index.js +1 -1
  25. package/es/components/form-config/src/hooks/useDataNormalize.d.ts +1 -1
  26. package/es/components/form-config/src/hooks/useDataNormalize.js +1 -1
  27. package/es/components/form-config/src/types/index.d.ts +7 -3
  28. package/es/components/form-config/style/index.css +1 -1
  29. package/es/components/form-render/index.d.ts +4 -4
  30. package/es/components/form-render/src/FormRender.vue.d.ts +2 -2
  31. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +4 -4
  32. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  33. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -2
  34. package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
  35. package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +1 -1
  36. package/es/components/form-render/src/types/fieldItem.d.ts +2 -1
  37. package/es/components/form-render/src/types/index.d.ts +1 -19
  38. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
  39. package/es/components/iho-table/src/types/index.d.ts +2 -1
  40. package/es/components/index.css +1 -1
  41. package/es/components/info-header/index.d.ts +13 -13
  42. package/es/components/info-header/src/InfoHeader.vue.d.ts +13 -13
  43. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -1
  44. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -1
  45. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +5 -5
  46. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +4 -4
  47. package/es/components/quick-search/index.d.ts +13 -8
  48. package/es/components/quick-search/src/index.vue.d.ts +13 -8
  49. package/es/components/quick-search/src/index.vue2.js +1 -1
  50. package/es/components/shortcut-setter/index.d.ts +6 -5
  51. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +6 -5
  52. package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue.d.ts +58 -0
  53. package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue.js +1 -0
  54. package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue2.js +1 -0
  55. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +56 -1
  56. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
  57. package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +4 -1
  58. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  59. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +55 -1
  60. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  61. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +2 -0
  62. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  63. package/es/components/table-filter/src/hooks/useRenderWidget.d.ts +1 -7
  64. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
  65. package/es/components/table-filter/src/types/index.d.ts +6 -0
  66. package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +19 -1
  67. package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
  68. package/es/shared/package.json.js +1 -1
  69. package/es/shared/types/business.d.ts +20 -0
  70. package/es/shared/utils/business.d.ts +1 -2
  71. package/package.json +2 -2
@@ -174,9 +174,10 @@ declare const _default: import("vue").DefineComponent<{
174
174
  allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
175
175
  prefix?: string | import("../../../../es/shared/types").AnyObject | (() => any) | undefined;
176
176
  suffix?: string | import("../../../../es/shared/types").AnyObject | (() => any) | undefined;
177
- allowSlash?: boolean | undefined;
177
+ allowSlash?: string | boolean | undefined;
178
178
  allowModify?: "0" | "1" | undefined;
179
179
  show_key?: string | undefined;
180
+ whiteList?: string[] | undefined;
180
181
  bordered?: string | boolean | undefined;
181
182
  fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
182
183
  content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
@@ -1887,7 +1888,7 @@ declare const _default: import("vue").DefineComponent<{
1887
1888
  default: boolean;
1888
1889
  };
1889
1890
  lowCodeReactions: {
1890
- type: import("vue").PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
1891
+ type: import("vue").PropType<import("../../../../es/shared/types").FormLowCodeReactions.Config[]>;
1891
1892
  };
1892
1893
  operationalForm: {
1893
1894
  type: import("vue").PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
@@ -2032,7 +2033,7 @@ declare const _default: import("vue").DefineComponent<{
2032
2033
  default: boolean;
2033
2034
  };
2034
2035
  lowCodeReactions: {
2035
- type: import("vue").PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
2036
+ type: import("vue").PropType<import("../../../../es/shared/types").FormLowCodeReactions.Config[]>;
2036
2037
  };
2037
2038
  operationalForm: {
2038
2039
  type: import("vue").PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
@@ -2191,7 +2192,7 @@ declare const _default: import("vue").DefineComponent<{
2191
2192
  businessFormatter: import("../../../../es/components/form-render").FormBusinessFormatter;
2192
2193
  requestInstance: import("../../../../es/components/form-render").RequestInstance;
2193
2194
  enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
2194
- lowCodeReactions: import("../../../../es/components/form-render").FormLowCodeReactions.Config[];
2195
+ lowCodeReactions: import("../../../../es/shared/types").FormLowCodeReactions.Config[];
2195
2196
  linebarAutoHidden: boolean;
2196
2197
  bordered: string | boolean;
2197
2198
  uniqueCacheData: boolean;
@@ -2602,7 +2603,7 @@ declare const _default: import("vue").DefineComponent<{
2602
2603
  default: boolean;
2603
2604
  };
2604
2605
  lowCodeReactions: {
2605
- type: import("vue").PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
2606
+ type: import("vue").PropType<import("../../../../es/shared/types").FormLowCodeReactions.Config[]>;
2606
2607
  };
2607
2608
  operationalForm: {
2608
2609
  type: import("vue").PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
@@ -0,0 +1,58 @@
1
+ import { PropType } from 'vue';
2
+ import { AnyObject } from '../../../../../../../es/shared/types';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ componentCfg: {
5
+ type: PropType<AnyObject>;
6
+ };
7
+ value: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ isAccurateSearchVal: {
12
+ type: BooleanConstructor;
13
+ default: boolean;
14
+ };
15
+ }, {
16
+ $attrs: any;
17
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
18
+ componentCfg: {
19
+ type: PropType<AnyObject>;
20
+ };
21
+ value: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ };
25
+ isAccurateSearchVal: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ }>> & {
30
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
31
+ "onUpdate:isAccurate"?: ((...args: any[]) => any) | undefined;
32
+ }>>;
33
+ emit: (event: "update:isAccurate" | "update:value", ...args: any[]) => void;
34
+ valueCp: import("vue").WritableComputedRef<string>;
35
+ isAccurateSearchValCp: import("vue").WritableComputedRef<boolean>;
36
+ isShowSearch: import("vue").ComputedRef<any>;
37
+ NCheckbox: any;
38
+ NInput: any;
39
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:isAccurate" | "update:value")[], "update:isAccurate" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
40
+ componentCfg: {
41
+ type: PropType<AnyObject>;
42
+ };
43
+ value: {
44
+ type: StringConstructor;
45
+ default: string;
46
+ };
47
+ isAccurateSearchVal: {
48
+ type: BooleanConstructor;
49
+ default: boolean;
50
+ };
51
+ }>> & {
52
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
53
+ "onUpdate:isAccurate"?: ((...args: any[]) => any) | undefined;
54
+ }, {
55
+ value: string;
56
+ isAccurateSearchVal: boolean;
57
+ }>;
58
+ export default _default;
@@ -0,0 +1 @@
1
+ import t from"./InputCustom.vue2.js";import u from"../../../../../../_virtual/_plugin-vue_export-helper.js";var e=u(t,[["__file","InputCustom.vue"]]);export{e as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,useAttrs as t,computed as a,openBlock as u,createBlock as l,unref as c,mergeProps as r,isRef as p,createSlots as i,withCtx as n,createVNode as o,createTextVNode as d}from"vue";import{NInput as v,NCheckbox as s}from"naive-ui";var f=e({__name:"InputCustom",props:{componentCfg:{type:Object},value:{type:String,default:""},isAccurateSearchVal:{type:Boolean,default:!1}},emits:["update:value","update:isAccurate"],setup(e,{emit:f}){const m=e,h=t(),y=a({set(e){f("update:value",e)},get:()=>m.value}),g=a({set(e){f("update:isAccurate",e)},get:()=>m.isAccurateSearchVal}),k=a((()=>{var e;return(null==(e=h.accurateSearch)?void 0:e.switchEnable)&&1===h.filterExplicit}));return(e,t)=>(u(),l(c(v),r(c(h),{value:c(y),"onUpdate:value":t[1]||(t[1]=e=>p(y)?y.value=e:null),type:"text"}),i({_:2},[c(k)?{name:"prefix",fn:n((()=>[o(c(s),{checked:c(g),"onUpdate:checked":t[0]||(t[0]=e=>p(g)?g.value=e:null)},{default:n((()=>[d("精确查询")])),_:1},8,["checked"])])),key:"0"}:void 0]),1040,["value"]))}});export{f as default};
@@ -1292,4 +1292,59 @@ declare const SelectDynamic: import("vue").DefineComponent<{
1292
1292
  }>> & {
1293
1293
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
1294
1294
  }, {}>;
1295
- export { CheckboxGroup, InputNumberGroup, DateInner, DateOut, DateRangeInner, DateRangeOut, LabelInner, LabelOut, Select, SelectDynamic };
1295
+ declare const InputCustom: import("vue").DefineComponent<{
1296
+ componentCfg: {
1297
+ type: import("vue").PropType<import("../../../../..").AnyObject>;
1298
+ };
1299
+ value: {
1300
+ type: StringConstructor;
1301
+ default: string;
1302
+ };
1303
+ isAccurateSearchVal: {
1304
+ type: BooleanConstructor;
1305
+ default: boolean;
1306
+ };
1307
+ }, {
1308
+ $attrs: any;
1309
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1310
+ componentCfg: {
1311
+ type: import("vue").PropType<import("../../../../..").AnyObject>;
1312
+ };
1313
+ value: {
1314
+ type: StringConstructor;
1315
+ default: string;
1316
+ };
1317
+ isAccurateSearchVal: {
1318
+ type: BooleanConstructor;
1319
+ default: boolean;
1320
+ };
1321
+ }>> & {
1322
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
1323
+ "onUpdate:isAccurate"?: ((...args: any[]) => any) | undefined;
1324
+ }>>;
1325
+ emit: (event: "update:isAccurate" | "update:value", ...args: any[]) => void;
1326
+ valueCp: import("vue").WritableComputedRef<string>;
1327
+ isAccurateSearchValCp: import("vue").WritableComputedRef<boolean>;
1328
+ isShowSearch: import("vue").ComputedRef<any>;
1329
+ NCheckbox: any;
1330
+ NInput: any;
1331
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:isAccurate" | "update:value")[], "update:isAccurate" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1332
+ componentCfg: {
1333
+ type: import("vue").PropType<import("../../../../..").AnyObject>;
1334
+ };
1335
+ value: {
1336
+ type: StringConstructor;
1337
+ default: string;
1338
+ };
1339
+ isAccurateSearchVal: {
1340
+ type: BooleanConstructor;
1341
+ default: boolean;
1342
+ };
1343
+ }>> & {
1344
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
1345
+ "onUpdate:isAccurate"?: ((...args: any[]) => any) | undefined;
1346
+ }, {
1347
+ value: string;
1348
+ isAccurateSearchVal: boolean;
1349
+ }>;
1350
+ export { CheckboxGroup, InputNumberGroup, DateInner, DateOut, DateRangeInner, DateRangeOut, LabelInner, LabelOut, Select, SelectDynamic, InputCustom };
@@ -1 +1 @@
1
- import{defineAsyncComponent as e}from"vue";const t=e((()=>import("./CheckboxGroup.vue.js"))),r=e((()=>import("./InputNumberGroup.vue.js"))),u=e((()=>import("./DateInner.vue.js"))),o=e((()=>import("./DateOut.vue.js"))),p=e((()=>import("./DateRangeInner.vue.js"))),m=e((()=>import("./DateRangeOut.vue.js"))),i=e((()=>import("./LabelInner.vue.js"))),n=e((()=>import("./LabelOut.vue.js"))),s=e((()=>import("./Select.vue.js"))),v=e((()=>import("./SelectDynamic.vue.js")));export{t as CheckboxGroup,u as DateInner,o as DateOut,p as DateRangeInner,m as DateRangeOut,r as InputNumberGroup,i as LabelInner,n as LabelOut,s as Select,v as SelectDynamic};
1
+ import{defineAsyncComponent as e}from"vue";const t=e((()=>import("./CheckboxGroup.vue.js"))),u=e((()=>import("./InputNumberGroup.vue.js"))),r=e((()=>import("./DateInner.vue.js"))),o=e((()=>import("./DateOut.vue.js"))),p=e((()=>import("./DateRangeInner.vue.js"))),m=e((()=>import("./DateRangeOut.vue.js"))),i=e((()=>import("./LabelInner.vue.js"))),s=e((()=>import("./LabelOut.vue.js"))),n=e((()=>import("./Select.vue.js"))),v=e((()=>import("./SelectDynamic.vue.js"))),j=e((()=>import("./InputCustom.vue.js")));export{t as CheckboxGroup,r as DateInner,o as DateOut,p as DateRangeInner,m as DateRangeOut,j as InputCustom,u as InputNumberGroup,i as LabelInner,s as LabelOut,n as Select,v as SelectDynamic};
@@ -11,6 +11,7 @@ declare const _default: import("vue").DefineComponent<{
11
11
  }, {
12
12
  valueCp(): any;
13
13
  unit(): any;
14
+ isAccurateSearchVal(): any;
14
15
  }, {
15
16
  search(): void;
16
17
  getEleWidth(cfg: any): {
@@ -22,7 +23,8 @@ declare const _default: import("vue").DefineComponent<{
22
23
  }> | null;
23
24
  handleUpdate(val: any): void;
24
25
  handleUpdateUnit(val: any): void;
25
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:unit" | "outFilterChange")[], "update:modelValue" | "update:unit" | "outFilterChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
26
+ handleUpdateAccurateSearch(val: any): void;
27
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:unit" | "update:isAccurate" | "outFilterChange")[], "update:modelValue" | "update:unit" | "update:isAccurate" | "outFilterChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
26
28
  cfg: {
27
29
  type: ObjectConstructor;
28
30
  required: true;
@@ -33,6 +35,7 @@ declare const _default: import("vue").DefineComponent<{
33
35
  }>> & {
34
36
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
35
37
  "onUpdate:unit"?: ((...args: any[]) => any) | undefined;
38
+ "onUpdate:isAccurate"?: ((...args: any[]) => any) | undefined;
36
39
  onOutFilterChange?: ((...args: any[]) => any) | undefined;
37
40
  }, {}>;
38
41
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as n}from"./widgetCfgMaps.js";import r from"../../../../../_virtual/_plugin-vue_export-helper.js";const a=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var l=r(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]}},emits:["update:modelValue","update:unit","outFilterChange"],computed:{valueCp(){return this.cfg.value},unit(){return this.cfg.unit}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t,widgetCfg:n,filterExplicit:r}=e;if(a.includes(t))return;const l=i.SELECT!==t&&i.SELECTLABEL!==t&&i.SELECTDYNAMIC!==t||!n.multiple?"100%":"200px";return{width:0===r?"100%":e.advanceColWidth?`${e.advanceColWidth}px`:l}},initComponentProps(e){const{widgetType:t,alias:i,title:r,placeholder:a,widgetCfg:l}=e,{props:s,handlerProps:p}=n.get(t);let u={...s};p&&(u=p(u,{...l,title:i||r})),a&&(u.placeholder=a),this.initialProps=u,u.value&&(this.valueCp=u.value)},generateWidget(e){const{widgetType:i}=e;if(!n.has(i))return null;const{value:r}=e,{component:a,style:l,eventsBySearch:s=[]}=n.get(i),p={...this.initialProps,value:r,componentCfg:e},u=s.reduce(((e,t)=>{const{name:i,handler:n}=t;let r=this.search;return n&&(r=e=>{n(e,this.search,p)}),{...e,[`on${i}`]:r}}),{});return t(a,{...l,...p,style:this.getEleWidth(e),value:this.valueCp,unit:this.unit,"onUpdate:value":e=>this.handleUpdate(e),"onUpdate:unit":e=>this.handleUpdateUnit(e),...u})},handleUpdate(e){this.$emit("update:modelValue",e)},handleUpdateUnit(e){this.$emit("update:unit",e)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{l as default};
1
+ import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as a}from"./widgetCfgMaps.js";import r from"../../../../../_virtual/_plugin-vue_export-helper.js";const l=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var s=r(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]}},emits:["update:modelValue","update:unit","update:isAccurate","outFilterChange"],computed:{valueCp(){return this.cfg.widgetType==i.INPUT_NUMBER&&this.cfg.value?Number(this.cfg.value):this.cfg.value},unit(){return this.cfg.unit},isAccurateSearchVal(){return this.cfg.isAccurateSearchVal}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t,widgetCfg:a,filterExplicit:r}=e;if(l.includes(t))return;const s=i.SELECT!==t&&i.SELECTLABEL!==t&&i.SELECTDYNAMIC!==t||!a.multiple?"100%":"200px";return{width:0===r?"100%":e.advanceColWidth?`${e.advanceColWidth}px`:s}},initComponentProps(e){const{widgetType:t,alias:i,title:r,placeholder:l,widgetCfg:s,accurateSearch:n,filterExplicit:u}=e,{props:c,handlerProps:h}=a.get(t);let p={...c,accurateSearch:n,filterExplicit:u};h&&(p=h(p,{...s,title:i||r})),l&&(p.placeholder=l),this.initialProps=p,p.value&&(this.valueCp=p.value)},generateWidget(e){const{widgetType:i}=e;if(!a.has(i))return null;const{value:r}=e,{component:l,style:s,eventsBySearch:n=[]}=a.get(i),u={...this.initialProps,value:r,componentCfg:e},c=n.reduce(((e,t)=>{const{name:i,handler:a}=t;let r=this.search;return a&&(r=e=>{a(e,this.search,u)}),{...e,[`on${i}`]:r}}),{});return t(l,{...s,...u,style:this.getEleWidth(e),value:this.valueCp,unit:this.unit,isAccurateSearchVal:this.isAccurateSearchVal,"onUpdate:value":e=>this.handleUpdate(e),"onUpdate:unit":e=>this.handleUpdateUnit(e),"onUpdate:isAccurate":e=>this.handleUpdateAccurateSearch(e),...c})},handleUpdate(e){this.$emit("update:modelValue",e)},handleUpdateUnit(e){this.$emit("update:unit",e)},handleUpdateAccurateSearch(e){this.$emit("update:isAccurate",e)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{s as default};
@@ -18,7 +18,61 @@ export declare const WidgetCfgMaps: Map<string, {
18
18
  setDefaultValue: (defaultValue: any) => any;
19
19
  style?: undefined;
20
20
  } | {
21
- component: any;
21
+ component: import("vue").DefineComponent<{
22
+ componentCfg: {
23
+ type: import("vue").PropType<import("../../../..").AnyObject>;
24
+ };
25
+ value: {
26
+ type: StringConstructor;
27
+ default: string;
28
+ };
29
+ isAccurateSearchVal: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ }, {
34
+ $attrs: any;
35
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
36
+ componentCfg: {
37
+ type: import("vue").PropType<import("../../../..").AnyObject>;
38
+ };
39
+ value: {
40
+ type: StringConstructor;
41
+ default: string;
42
+ };
43
+ isAccurateSearchVal: {
44
+ type: BooleanConstructor;
45
+ default: boolean;
46
+ };
47
+ }>> & {
48
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
49
+ "onUpdate:isAccurate"?: ((...args: any[]) => any) | undefined;
50
+ }>>;
51
+ emit: (event: "update:isAccurate" | "update:value", ...args: any[]) => void;
52
+ valueCp: import("vue").WritableComputedRef<string>;
53
+ isAccurateSearchValCp: import("vue").WritableComputedRef<boolean>;
54
+ isShowSearch: import("vue").ComputedRef<any>;
55
+ NCheckbox: any;
56
+ NInput: any;
57
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:isAccurate" | "update:value")[], "update:isAccurate" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
58
+ componentCfg: {
59
+ type: import("vue").PropType<import("../../../..").AnyObject>;
60
+ };
61
+ value: {
62
+ type: StringConstructor;
63
+ default: string;
64
+ };
65
+ isAccurateSearchVal: {
66
+ type: BooleanConstructor;
67
+ default: boolean;
68
+ };
69
+ }>> & {
70
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
71
+ "onUpdate:isAccurate"?: ((...args: any[]) => any) | undefined;
72
+ }, {
73
+ value: string;
74
+ isAccurateSearchVal: boolean;
75
+ }>;
22
76
  props: {
23
77
  clearable: boolean;
24
78
  allowInput: (value: string) => boolean;
@@ -1 +1 @@
1
- import{WidgetTypeEnums as e,WidgetValEnums as l}from"../../types/enums.js";import{DatePresetValEnums as t,DateRangeOutDefEnums as r}from"./enums.js";import{NInputNumber as a,NInput as o}from"naive-ui";import{InputNumberGroup as n,Select as p,SelectDynamic as s,DateInner as i,DateOut as u,DateRangeInner as c,DateRangeOut as m,CheckboxGroup as d,LabelInner as y,LabelOut as h}from"./components/index.js";import{presetValToTimestamp as E,formatDateRangeInfo as f}from"./helpers/presetValToTimestamp.js";import{setSelectDynamicValue as M}from"./helpers/setDefaultValue.js";const D=e=>null==e?null:e,T=new Map([[e.INPUT_NUMBER,{component:a,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`输入${l}`}),setDefaultValue:D}],[e.INPUTNUMBER_RANGE,{component:n,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l,filterExplicit:t}={})=>({...e,startPlaceholder:1===t?`起始${l}`:"最小值",endPlaceholder:1===t?`截止${l}`:"最大值"}),setDefaultValue:D}],[e.INPUT,{component:o,props:{clearable:!0,allowInput:e=>!e.startsWith(" ")&&!e.endsWith(" ")},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`搜索${l}`}),setDefaultValue:D}],[e.SELECT,{component:p,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:r}=t;r&&l()}}],handlerProps(e,{multiple:l,title:t}={}){const r={...e,placeholder:`请选择${t}`};return l&&(r.multiple=!0),r},setDefaultValue:(e,t,r)=>t&&"boolean"==typeof(null==r?void 0:r.multiple)?r.multiple?[l.WHOLE]:l.WHOLE:e}],[e.SELECTDYNAMIC,{component:s,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:r}=t;r&&l()}}],handlerProps(e,l={}){const{multiple:t,title:r}=l,a={...e,placeholder:`请选择${r}`};return t&&(a.multiple=!0),a},setDefaultValue:async(e,l,t)=>l&&(null==t?void 0:t._cfg)?await M(null==t?void 0:t._cfg):e}],[e.DATE,{component:i,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:D}],[e.DATE_OUT,{component:u,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?E(l,"YYYY-MM-DD"):e}],[e.DATE_RANGE_INNER,{component:c,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:D}],[e.DATE_RANGE_OUT,{component:m,props:{type:"daterange",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,t)=>l&&l!==r.CUSTOM&&(null==t?void 0:t.optSetting)?f(l,"YYYY-MM-DD",t.optSetting):e}],[e.DATE_TIME,{component:i,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:D}],[e.DATETIME_OUT,{component:u,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?E(l,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATETIME_RANGE_INNER,{component:c,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:D}],[e.DATETIME_RANGE_OUT,{component:m,props:{type:"datetimerange",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,r)=>l&&l!==t.CUSTOM&&(null==r?void 0:r.optSetting)?f(l,"YYYY-MM-DD HH:mm:ss",r.optSetting):e}],[e.CHECKBOX_GROUP,{component:d,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:l,multiple:t}={}){const r={...e,multiple:t};return Array.isArray(l)&&(r.options=l.map((({value:e,label:l})=>({value:e,label:l})))),r},setDefaultValue:D}],[e.LABEL,{component:y,props:{},handlerProps:e=>({...e}),setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}],[e.SELECTLABEL,{component:h,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},handlerProps(e,l={}){const{multiple:t,title:r}=l,a={...e,placeholder:`请选择${r}`};return t&&(a.multiple=!0),a},setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}]]);export{T as WidgetCfgMaps};
1
+ import{WidgetTypeEnums as e,WidgetValEnums as l}from"../../types/enums.js";import{DatePresetValEnums as t,DateRangeOutDefEnums as r}from"./enums.js";import{NInputNumber as a}from"naive-ui";import{InputNumberGroup as o,InputCustom as n,Select as p,SelectDynamic as s,DateInner as i,DateOut as u,DateRangeInner as c,DateRangeOut as m,CheckboxGroup as d,LabelInner as y,LabelOut as h}from"./components/index.js";import{presetValToTimestamp as E,formatDateRangeInfo as f}from"./helpers/presetValToTimestamp.js";import{setSelectDynamicValue as M}from"./helpers/setDefaultValue.js";const D=e=>null==e?null:e,T=new Map([[e.INPUT_NUMBER,{component:a,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`输入${l}`}),setDefaultValue:D}],[e.INPUTNUMBER_RANGE,{component:o,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l,filterExplicit:t}={})=>({...e,startPlaceholder:1===t?`起始${l}`:"最小值",endPlaceholder:1===t?`截止${l}`:"最大值"}),setDefaultValue:D}],[e.INPUT,{component:n,props:{clearable:!0,allowInput:e=>!e.startsWith(" ")&&!e.endsWith(" ")},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`搜索${l}`}),setDefaultValue:D}],[e.SELECT,{component:p,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:r}=t;r&&l()}}],handlerProps(e,{multiple:l,title:t}={}){const r={...e,placeholder:`请选择${t}`};return l&&(r.multiple=!0),r},setDefaultValue:(e,t,r)=>t&&"boolean"==typeof(null==r?void 0:r.multiple)?r.multiple?[l.WHOLE]:l.WHOLE:e}],[e.SELECTDYNAMIC,{component:s,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:r}=t;r&&l()}}],handlerProps(e,l={}){const{multiple:t,title:r}=l,a={...e,placeholder:`请选择${r}`};return t&&(a.multiple=!0),a},setDefaultValue:async(e,l,t)=>l&&(null==t?void 0:t._cfg)?await M(null==t?void 0:t._cfg):e}],[e.DATE,{component:i,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:D}],[e.DATE_OUT,{component:u,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?E(l,"YYYY-MM-DD"):e}],[e.DATE_RANGE_INNER,{component:c,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:D}],[e.DATE_RANGE_OUT,{component:m,props:{type:"daterange",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,t)=>l&&l!==r.CUSTOM&&(null==t?void 0:t.optSetting)?f(l,"YYYY-MM-DD",t.optSetting):e}],[e.DATE_TIME,{component:i,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:D}],[e.DATETIME_OUT,{component:u,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?E(l,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATETIME_RANGE_INNER,{component:c,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:D}],[e.DATETIME_RANGE_OUT,{component:m,props:{type:"datetimerange",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,r)=>l&&l!==t.CUSTOM&&(null==r?void 0:r.optSetting)?f(l,"YYYY-MM-DD HH:mm:ss",r.optSetting):e}],[e.CHECKBOX_GROUP,{component:d,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:l,multiple:t}={}){const r={...e,multiple:t};return Array.isArray(l)&&(r.options=l.map((({value:e,label:l})=>({value:e,label:l})))),r},setDefaultValue:D}],[e.LABEL,{component:y,props:{},handlerProps:e=>({...e}),setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}],[e.SELECTLABEL,{component:h,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},handlerProps(e,l={}){const{multiple:t,title:r}=l,a={...e,placeholder:`请选择${r}`};return t&&(a.multiple=!0),a},setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}]]);export{T as WidgetCfgMaps};
@@ -25,6 +25,7 @@ export default function useAdvanced(): {
25
25
  };
26
26
  rangeFilter: boolean | undefined;
27
27
  unit: any;
28
+ isAccurateSearchVal: boolean;
28
29
  _extendData: IExtendConfigurationType;
29
30
  title: string;
30
31
  alias: string | undefined;
@@ -34,6 +35,7 @@ export default function useAdvanced(): {
34
35
  advanceOptionSetting: string;
35
36
  placeholder: string | undefined;
36
37
  advanceColWidth: number | null | undefined;
38
+ accurateSearch: any;
37
39
  }[];
38
40
  getCacheDef: (item: ISearchType, cacheList: string[]) => string | string[];
39
41
  transformClassifyChild: (conObjList: any, searchFieldList: any[]) => {};
@@ -1 +1 @@
1
- import{WidgetOptionEnums as e,WidgetTypeEnums as i,WidgetValEnums as t}from"../types/enums.js";import{isString as n}from"lodash-es";import{formatDateRangeInfo as l,presetValToTimestamp as o}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as a}from"../components/render-widget/enums.js";const u={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function r(){return{transformData:function(t,n){return t.map((t=>{var l,o,a;const{optionInfo:r={list:[],manualMapping:!0,dynamicOptionInfo:{},showWholeOption:!1},type:E,defaultValue:s,optionType:p,filterExplicit:T,rangeFilter:d}=t,c={},m={title:(f=t).title,alias:f.customTitle,isShowSearch:f.isShowSearch?1:0,filterExplicit:f.filterExplicit?1:0,explicitRequired:f.explicitRequired?1:0,advanceOptionSetting:f.optionType?u[f.optionType]:"",placeholder:f.remark,advanceColWidth:f.width};var f;let g,v,y=E;T?(g=E===i.SELECT&&p===e.MULTIPLE?null==s?void 0:s.valueList:null==(l=null==s?void 0:s.valueList)?void 0:l[0],v=null==s?void 0:s.unit,E===i.LABEL&&(y="SELECTLABEL",g=null==s?void 0:s.valueList),E===i.DATE&&(y="DATE_OUT"),E===i.DATE_TIME&&(y="DATETIME_OUT")):E===i.SELECT&&(null==r?void 0:r.list)&&(null==r?void 0:r.list.length)<10&&(y="CHECKBOX_GROUP"),d&&(E===i.INPUT_NUMBER&&(y="INPUTNUMBER_RANGE"),E===i.DATE&&(y=T?"DATE_RANGE_OUT":"DATE_RANGE_INNER"),E===i.DATE_TIME&&(y=T?"DATETIME_RANGE_OUT":"DATETIME_RANGE_INNER")),E===i.SELECT&&!1===(null==r?void 0:r.manualMapping)&&(y=i.SELECTDYNAMIC);const L={isRender:!0,widgetType:y,originType:E,valueList:null==(o=null==r?void 0:r.list)?void 0:o.map((({name:e,value:i})=>({value:i,label:e}))),defaultValue:g,defValueUnit:v,optionSetting:p,multiple:p===e.MULTIPLE||y===i.SELECTLABEL,manualMapping:null==r?void 0:r.manualMapping,showWholeOption:null==r?void 0:r.showWholeOption,dynamicOptionInfo:null==r?void 0:r.dynamicOptionInfo,classifyStr:null==s?void 0:s.classifyStr,linkageFieldKeys:null!=(a=null==s?void 0:s.linkageFieldKeys)?a:[]};return{...m,fieldType:t.dataType,columnName:t.name,settingObj:c,setting:JSON.stringify(c),widgetCfg:L,rangeFilter:d,unit:null!=v?v:"",_extendData:null!=n?n:{}}}))},getCacheDef:function(e,t){const{widgetType:n,widgetCfg:l}=e;return[i.SELECT,i.CHECKBOX_GROUP,i.SELECTDYNAMIC].includes(n)&&l.multiple?t:t[0]},transformClassifyChild:function(e,t){const n={};return e&&e.length>0&&e.forEach((e=>{const u=e.field_key;n[u]="";const r=t.find((e=>e.name===u));if(r){const t=Array.isArray(e.value)&&r.type===i.SELECT?e.value:e.value.toString();if(n[u]=t,e.unit&&e.unit!==a.CUSTOM){let t="";r.type===i.DATE&&(t=r.rangeFilter?l(e.unit,"YYYY-MM-DD",r.optionType):o(e.unit,"YYYY-MM-DD")),r.type===i.DATE_TIME&&(t=r.rangeFilter?l(e.unit,"YYYY-MM-DD HH:mm:ss",r.optionType):o(e.unit,"YYYY-MM-DD HH:mm:ss")),n[u]=t}}})),n},transformParams:function(e){const l={},o=[i.SELECT,i.SELECTDYNAMIC,i.CHECKBOX_GROUP];return e&&e.length>0&&e.forEach((e=>{const i=e.field_key,a=o.includes(e.widgetType)||e.value&&e.value.length>1?e.value.map((e=>n(e)&&e.includes("&")?e.split("&")[1]:e)):e.value.toString();Array.isArray(a)&&a.length>0&&a.includes(t.WHOLE)||(l[i]=a)})),l}}}export{r as default};
1
+ import{WidgetOptionEnums as e,WidgetTypeEnums as t,WidgetValEnums as i}from"../types/enums.js";import{isString as n}from"lodash-es";import{formatDateRangeInfo as l,presetValToTimestamp as a}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as o}from"../components/render-widget/enums.js";const r={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function u(){return{transformData:function(i,n){return i.map((i=>{var l,a,o;const{optionInfo:u={list:[],manualMapping:!0,dynamicOptionInfo:{},showWholeOption:!1},type:E,defaultValue:s,optionType:c,filterExplicit:p,rangeFilter:T}=i,d={},m={title:(f=i).title,alias:f.customTitle,isShowSearch:f.isShowSearch?1:0,filterExplicit:f.filterExplicit?1:0,explicitRequired:f.explicitRequired?1:0,advanceOptionSetting:f.optionType?r[f.optionType]:"",placeholder:f.remark,advanceColWidth:f.width,accurateSearch:f.accurateSearch?f.accurateSearch:{}};var f;let g,v,y=E;p?(g=E===t.SELECT&&c===e.MULTIPLE?null==s?void 0:s.valueList:null==(l=null==s?void 0:s.valueList)?void 0:l[0],v=null==s?void 0:s.unit,E===t.LABEL&&(y="SELECTLABEL",g=null==s?void 0:s.valueList),E===t.DATE&&(y="DATE_OUT"),E===t.DATE_TIME&&(y="DATETIME_OUT")):E===t.SELECT&&(null==u?void 0:u.list)&&(null==u?void 0:u.list.length)<10&&(y="CHECKBOX_GROUP"),T&&(E===t.INPUT_NUMBER&&(y="INPUTNUMBER_RANGE"),E===t.DATE&&(y=p?"DATE_RANGE_OUT":"DATE_RANGE_INNER"),E===t.DATE_TIME&&(y=p?"DATETIME_RANGE_OUT":"DATETIME_RANGE_INNER")),E===t.SELECT&&!1===(null==u?void 0:u.manualMapping)&&(y=t.SELECTDYNAMIC);const A={isRender:!0,widgetType:y,originType:E,valueList:null==(a=null==u?void 0:u.list)?void 0:a.map((({name:e,value:t})=>({value:t,label:e}))),defaultValue:g,defValueUnit:v,optionSetting:c,multiple:c===e.MULTIPLE||y===t.SELECTLABEL,manualMapping:null==u?void 0:u.manualMapping,showWholeOption:null==u?void 0:u.showWholeOption,dynamicOptionInfo:null==u?void 0:u.dynamicOptionInfo,classifyStr:null==s?void 0:s.classifyStr,linkageFieldKeys:null!=(o=null==s?void 0:s.linkageFieldKeys)?o:[]};return{...m,fieldType:i.dataType,columnName:i.name,settingObj:d,setting:JSON.stringify(d),widgetCfg:A,rangeFilter:T,unit:null!=v?v:"",isAccurateSearchVal:!1,_extendData:null!=n?n:{}}}))},getCacheDef:function(e,i){const{widgetType:n,widgetCfg:l}=e;return[t.SELECT,t.CHECKBOX_GROUP,t.SELECTDYNAMIC].includes(n)&&l.multiple?i:i[0]},transformClassifyChild:function(e,i){const n={};return e&&e.length>0&&e.forEach((e=>{const r=e.field_key;n[r]="";const u=i.find((e=>e.name===r));if(u){const i=Array.isArray(e.value)&&u.type===t.SELECT?e.value:e.value.toString();if(n[r]=i,e.unit&&e.unit!==o.CUSTOM){let i="";u.type===t.DATE&&(i=u.rangeFilter?l(e.unit,"YYYY-MM-DD",u.optionType):a(e.unit,"YYYY-MM-DD")),u.type===t.DATE_TIME&&(i=u.rangeFilter?l(e.unit,"YYYY-MM-DD HH:mm:ss",u.optionType):a(e.unit,"YYYY-MM-DD HH:mm:ss")),n[r]=i}}})),n},transformParams:function(e){const l={},a=[t.SELECT,t.SELECTDYNAMIC,t.CHECKBOX_GROUP];return e&&e.length>0&&e.forEach((e=>{const t=e.field_key,o=a.includes(e.widgetType)||e.value&&e.value.length>1?e.value.map((e=>n(e)&&e.includes("&")?e.split("&")[1]:e)):e.value.toString();Array.isArray(o)&&o.length>0&&o.includes(i.WHOLE)||(e.switchEnable&&(l[e.accurateSearchKey]=e.isAccurateSearch?1:0),l[t]=o)})),l}}}export{u as default};
@@ -3,13 +3,7 @@ export default function (): {
3
3
  isRender: (cfg: ISearchType) => any;
4
4
  getDefValByRenderWidget: (cfg: ISearchType) => Promise<any>;
5
5
  initRenderWidgetCfg: (cfg: ISearchType) => Promise<any>;
6
- getRenderSearchConObj: (cfg: ISearchType) => {
7
- widgetType: any;
8
- field_key: string;
9
- con: string | undefined;
10
- value: any[] | null;
11
- unit: string;
12
- } | null;
6
+ getRenderSearchConObj: (cfg: ISearchType) => any;
13
7
  getDefValByRenderConObj: (conObj: ISearchConfigType, cfg: ISearchType) => any;
14
8
  isExistDefValByRenderWidget: (cfg: ISearchType) => boolean;
15
9
  resetRenderWidgetValue: (cfg: ISearchType) => any;
@@ -1 +1 @@
1
- import{WidgetCfgMaps as e}from"../components/render-widget/widgetCfgMaps.js";import{WidgetTypeEnums as t,WidgetOptionEnums as n}from"../types/enums.js";const i=[t.CHECKBOX_GROUP,t.DATE,t.DATE_TIME,t.DATE_RANGE_INNER,t.DATETIME_RANGE_INNER,t.LABEL];function r(){function r(e){var t;return null==(t=e.widgetCfg)?void 0:t.isRender}async function u(t){const{widgetType:i,defaultValue:r,defValueUnit:u,optionSetting:l,multiple:o}=t.widgetCfg||{},a=e.get(i);let d;if(a){const{setDefaultValue:e}=a;e&&(d=await e(r,u,{optSetting:null!=l?l:n.ALL,multiple:o,_cfg:t}))}return d}return{isRender:r,getDefValByRenderWidget:u,initRenderWidgetCfg:async function(e){const t=r(e);if(!t)return t;const{widgetType:n}=e.widgetCfg||{};return e._frontId||(e._frontId="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))),e.isRender=t,e.widgetType=n,e.con="EQ",i.includes(n)&&(e._isBlock=!0),1==e.filterExplicit&&(e.value=await u(e)),t},getRenderSearchConObj:function(e){if(!r(e))return null;const{columnName:t,con:n,value:i,widgetType:u,unit:l=""}=e,o=Array.isArray(i)?i:i?[i]:[];return{widgetType:u,field_key:t,con:n,value:o.length>0?o:null,unit:l}},getDefValByRenderConObj:function(e,n){if(!r(n))return null;const{widgetType:i,multiple:u}=n.widgetCfg||{},{value:l}=e;return i!==t.SELECT&&i!==t.CHECKBOX_GROUP||!u?Array.isArray(l)?l[0]:l:Array.isArray(l)?l:l?[l]:[]},isExistDefValByRenderWidget:function(e){const{defaultValue:t,defValueUnit:n}=e.widgetCfg||{};return!(!t&&!n)},resetRenderWidgetValue:function(e){const t=r(e);return t?(e.value=null,t):t}}}export{r as default};
1
+ import{WidgetCfgMaps as e}from"../components/render-widget/widgetCfgMaps.js";import{WidgetTypeEnums as t,WidgetOptionEnums as n}from"../types/enums.js";const r=[t.CHECKBOX_GROUP,t.DATE,t.DATE_TIME,t.DATE_RANGE_INNER,t.DATETIME_RANGE_INNER,t.LABEL];function i(){function i(e){var t;return null==(t=e.widgetCfg)?void 0:t.isRender}async function a(t){const{widgetType:r,defaultValue:i,defValueUnit:a,optionSetting:u,multiple:c}=t.widgetCfg||{},l=e.get(r);let o;if(l){const{setDefaultValue:e}=l;e&&(o=await e(i,a,{optSetting:null!=u?u:n.ALL,multiple:c,_cfg:t}))}return o}return{isRender:i,getDefValByRenderWidget:a,initRenderWidgetCfg:async function(e){const t=i(e);if(!t)return t;const{widgetType:n}=e.widgetCfg||{};return e._frontId||(e._frontId="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))),e.isRender=t,e.widgetType=n,e.con="EQ",r.includes(n)&&(e._isBlock=!0),1==e.filterExplicit&&(e.value=await a(e)),t},getRenderSearchConObj:function(e){if(!i(e))return null;const{columnName:t,con:n,value:r,widgetType:a,unit:u=""}=e,c=Array.isArray(r)?r:r?[r]:[],l={widgetType:a,field_key:t,con:n,value:c.length>0?c:null,unit:u};return e.accurateSearch.switchEnable&&(l.switchEnable=!0,l.isAccurateSearch=e.isAccurateSearchVal,l.accurateSearchKey=e.accurateSearch.searchKey),l},getDefValByRenderConObj:function(e,n){if(!i(n))return null;const{widgetType:r,multiple:a}=n.widgetCfg||{},{value:u}=e;return r!==t.SELECT&&r!==t.CHECKBOX_GROUP||!a?Array.isArray(u)?u[0]:u:Array.isArray(u)?u:u?[u]:[]},isExistDefValByRenderWidget:function(e){const{defaultValue:t,defValueUnit:n}=e.widgetCfg||{};return!(!t&&!n)},resetRenderWidgetValue:function(e){const t=i(e);return t?(e.value=null,t):t}}}export{i as default};
@@ -24,6 +24,8 @@ export declare type ISearchType = {
24
24
  value?: any;
25
25
  sid?: string;
26
26
  alias?: string;
27
+ accurateSearch?: any;
28
+ isAccurateSearchVal?: boolean;
27
29
  };
28
30
  export declare type IFilterItemType = {
29
31
  con: string;
@@ -134,6 +136,7 @@ export declare type IApiServerType = {
134
136
  rangeFilter?: boolean;
135
137
  remark?: string;
136
138
  keyword?: boolean;
139
+ accurateSearch?: any;
137
140
  };
138
141
  export declare type dynamicOptionInfoType = {
139
142
  filterKeys: string[];
@@ -194,6 +197,9 @@ export declare type ISearchParamsType = {
194
197
  con: string;
195
198
  value: string[];
196
199
  unit: 'custom' | null;
200
+ switchEnable?: boolean;
201
+ isAccurateSearch?: boolean;
202
+ accurateSearchKey?: string;
197
203
  };
198
204
  export declare type IFilterCategoryLabelItemType = {
199
205
  classifyId: string;
@@ -1,4 +1,4 @@
1
- import { Func } from '../../../../es/shared/types';
1
+ import { AnyObject, Func } from '../../../../es/shared/types';
2
2
  import { PropType } from 'vue';
3
3
  declare const _default: import("vue").DefineComponent<{
4
4
  value: {
@@ -17,6 +17,15 @@ declare const _default: import("vue").DefineComponent<{
17
17
  precision: {
18
18
  type: NumberConstructor;
19
19
  };
20
+ whiteList: {
21
+ type: PropType<string[]>;
22
+ };
23
+ inputProps: {
24
+ type: PropType<AnyObject>;
25
+ };
26
+ popperProps: {
27
+ type: PropType<AnyObject>;
28
+ };
20
29
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
21
30
  value: {
22
31
  type: (NumberConstructor | StringConstructor)[];
@@ -34,6 +43,15 @@ declare const _default: import("vue").DefineComponent<{
34
43
  precision: {
35
44
  type: NumberConstructor;
36
45
  };
46
+ whiteList: {
47
+ type: PropType<string[]>;
48
+ };
49
+ inputProps: {
50
+ type: PropType<AnyObject>;
51
+ };
52
+ popperProps: {
53
+ type: PropType<AnyObject>;
54
+ };
37
55
  }>>, {
38
56
  onChange: Func<any[], any>;
39
57
  }>;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,computed as n,watch as u,createVNode as l}from"vue";import{isNumber as a,isString as i}from"lodash-es";import{NInput as r}from"naive-ui";import"../../../components/form-render/index.js";import{createInputSlot as o}from"../../../components/form-render/src/utils/index.js";var s=e({props:{value:{type:[Number,String]},onChange:{type:Function,default:()=>({})},prefix:{type:[String,Function,Object]},suffix:{type:[String,Function,Object]},precision:{type:Number}},setup(e){const s=o(e),v=t(),p=n({get:()=>v.value,set(e){if(a(e))return v.value=e+"";i(e)&&(v.value=e.endsWith("/")?"/":e)}});function c(e=-1){const t=a(+e)&&e>=0?+e:null;return new RegExp(`^-?(0|[1-9][0-9]*)?${0===t?"":`(\\.[0-9]${a(t)?`{0,${t}}`:"*"})?`}$`)}u((()=>e.value),(e=>p.value=e),{immediate:!0});const f=c(),m=n((()=>c(e.precision)));function d(e){return!(null!=e&&""!==e&&"/"!==e&&i(e)&&!e.endsWith("/"))||m.value.test(e)&&"-."!==e&&!e.startsWith(".")}function g(){if(i(p.value)&&"-"!==p.value)if("/"===p.value)e.onChange(p.value);else if(f.test(p.value)){const t=p.value.endsWith(".")?p.value.slice(0,-1):p.value;e.onChange(p.value=t)}else p.value=e.value;else p.value=e.value}return()=>l(r,{value:p.value,"onUpdate:value":e=>p.value=e,"allow-input":d,onBlur:g},s)}});export{s as default};
1
+ import{defineComponent as e,computed as t,ref as l,watch as u,createVNode as n,mergeProps as o}from"vue";import{findAncestor as a}from"../../utils/index.js";import{isArray as i,isString as r,isNumber as s,isObject as v}from"lodash-es";import{NInput as p,NDropdown as c}from"naive-ui";import"../../../components/form-render/index.js";import{createInputSlot as f}from"../../../components/form-render/src/utils/index.js";var d=e({props:{value:{type:[Number,String]},onChange:{type:Function,default:()=>({})},prefix:{type:[String,Function,Object]},suffix:{type:[String,Function,Object]},precision:{type:Number},whiteList:{type:Array},inputProps:{type:Object},popperProps:{type:Object}},setup(e){const d=f(e),m=t((()=>i(e.whiteList)?e.whiteList.reduce(((e,t)=>(r(t)&&e.push({label:t,value:t}),e)),[]):[]));const h=l(),g=t({get:()=>h.value,set:e=>s(e)?h.value=e+"":r(e)?e.endsWith("/")?h.value="/":void(h.value=m.value.some((t=>t.label!==e&&t.label.includes(e)))?"":e):void 0});function b(e=-1){const t=s(+e)&&e>=0?+e:null;return new RegExp(`^-?(0|[1-9][0-9]*)?${0===t?"":`(\\.[0-9]${s(t)?`{0,${t}}`:"*"})?`}$`)}u((()=>e.value),(e=>g.value=e),{immediate:!0});const y=b();function j(){if(r(g.value)&&"-"!==g.value)if("/"===g.value||function(e,t=!1){return m.value.length&&m.value.some((({value:l})=>t?l.includes(e):l===e))}(g.value))e.onChange(g.value);else if(y.test(g.value)){const t=g.value.endsWith(".")?g.value.slice(0,-1):g.value;e.onChange(g.value=t)}else g.value=e.value;else g.value=e.value}const w=l(!1),x=l();function $(){w.value=!0}function C(e){var t;if(!e.target)return;const l=e.target;(null==(t=x.value)?void 0:t.$el)&&a(l,(e=>e===x.value.$el))||(w.value=!1)}function F(e,t){var l,u;v(t)&&(g.value=t.value,null==(u=null==(l=x.value)?void 0:l.focus)||u.call(l))}const O=t((()=>b(e.precision)));function P(e){return!(null!=e&&""!==e&&"/"!==e&&r(e)&&!e.endsWith("/"))||(!(!m.value.length||!m.value.some((t=>t.label.includes(e))))||O.value.test(e)&&"-."!==e&&!e.startsWith("."))}return()=>{const t=n(p,o({ref:x,value:g.value,"onUpdate:value":e=>g.value=e,"allow-input":P,onBlur:j,onClick:$,onFocus:$},e.inputProps),d.value);return m.value.length?n(c,o({onSelect:F,options:m.value,show:w.value,width:"trigger",onClickoutside:C},e.popperProps),{default:()=>t}):t}}});export{d as default};
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",s="3.1.50-release.3",i="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.50-release.3",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,i as main,e as name,n as peerDependencies,s as version};
1
+ var e="@cnhis-design-vue/shared",i="3.1.51-beta.0",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.51-beta.0",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
@@ -20,3 +20,23 @@ export declare type FormOperationalConfig = {
20
20
  operationalPrecision: string;
21
21
  operationalResult: string;
22
22
  };
23
+ export declare namespace FormLowCodeReactions {
24
+ type ConObj = {
25
+ con: LOW_CODE_VALUE_RELATION;
26
+ field_key: string;
27
+ value: unknown;
28
+ };
29
+ type Config = {
30
+ conObj: ConObj[];
31
+ } & Partial<{
32
+ sqlExpression: string;
33
+ showField: string[];
34
+ hideField: string[];
35
+ requiredField: string[];
36
+ notRequiredField: string[];
37
+ enabledField: string[];
38
+ disabledField: string[];
39
+ __oppositeBindField: Config;
40
+ __oppositeTargetField: Config;
41
+ }>;
42
+ }
@@ -1,6 +1,5 @@
1
- import { AnyObject, BindEventSettingItem, FormOperationalConfig, LOW_CODE_EVENT_TYPE, LOW_CODE_VALUE_RELATION } from '../../../es/shared/types';
1
+ import { AnyObject, BindEventSettingItem, FormLowCodeReactions, FormOperationalConfig, LOW_CODE_EVENT_TYPE, LOW_CODE_VALUE_RELATION } from '../../../es/shared/types';
2
2
  import { MaybeRef } from '@vueuse/core';
3
- import { FormLowCodeReactions } from '../../../es/components/form-render';
4
3
  export declare function isMatchLowCodeCondition(value: unknown, condition: {
5
4
  con: LOW_CODE_VALUE_RELATION;
6
5
  value: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.50-release.3",
3
+ "version": "3.1.51-beta.0",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -63,5 +63,5 @@
63
63
  "iOS 7",
64
64
  "last 3 iOS versions"
65
65
  ],
66
- "gitHead": "8665ba8ee4a46a9aa8f1e7c2d00a076fbdb5eb8d"
66
+ "gitHead": "67a7568b83e34ecfcfec408af41fdb5943348849"
67
67
  }