cnhis-design-vue 3.2.6-release.0 → 3.2.6-release.2

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 (88) hide show
  1. package/es/components/button-print/index.d.ts +4 -0
  2. package/es/components/button-print/src/ButtonPrint.vue.d.ts +4 -0
  3. package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +4 -0
  4. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  5. package/es/components/button-print/src/utils/print.js +1 -1
  6. package/es/components/callback/src/components/render/popupMaps.d.ts +6 -2
  7. package/es/components/expand-field/index.d.ts +1109 -321
  8. package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +1109 -321
  9. package/es/components/expand-field/src/components/PersonModal.vue.d.ts +1109 -321
  10. package/es/components/expand-field/src/components/form.vue.d.ts +1109 -321
  11. package/es/components/expand-field/src/index.vue.d.ts +1109 -321
  12. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  13. package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
  14. package/es/components/form-config/index.d.ts +12 -4
  15. package/es/components/form-config/src/FormConfig.vue.d.ts +12 -4
  16. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  17. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +6 -2
  18. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +6 -2
  19. package/es/components/form-config/src/utils/index.d.ts +1 -0
  20. package/es/components/form-config/src/utils/index.js +1 -1
  21. package/es/components/form-render/index.d.ts +6 -2
  22. package/es/components/form-render/src/FormRender.vue.d.ts +5 -1
  23. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  24. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +6 -2
  25. package/es/components/form-render/src/FormRenderWrapper.vue2.js +1 -1
  26. package/es/components/form-render/src/hooks/useFormEvent.d.ts +1 -1
  27. package/es/components/form-render/src/types/index.d.ts +4 -1
  28. package/es/components/iho-chat/index.d.ts +57 -27
  29. package/es/components/iho-chat/src/Index.vue.d.ts +58 -27
  30. package/es/components/iho-chat/src/Index.vue2.js +1 -1
  31. package/es/components/iho-chat/src/api/index.js +1 -1
  32. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +1 -1
  33. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +9 -26
  34. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  35. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +2 -2
  36. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +3 -2
  37. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  38. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +1 -1
  39. package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +10 -3
  40. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
  41. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  42. package/es/components/iho-chat/src/components/Video.vue.d.ts +30 -25
  43. package/es/components/iho-chat/src/components/Video.vue.js +1 -0
  44. package/es/components/iho-chat/src/components/Video.vue2.js +1 -0
  45. package/es/components/iho-chat/src/hooks/useSession.js +1 -1
  46. package/es/components/iho-chat/src/types/index.d.ts +2 -0
  47. package/es/components/iho-chat/src/utils/index.d.ts +1 -1
  48. package/es/components/iho-chat/src/utils/index.js +1 -1
  49. package/es/components/iho-chat/style/index.css +1 -1
  50. package/es/components/iho-table/src/plugins/keyboardEventPlugin.js +1 -1
  51. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/renderer.js +1 -1
  52. package/es/components/index.css +1 -1
  53. package/es/components/info-header/index.d.ts +12 -4
  54. package/es/components/info-header/src/InfoHeader.vue.d.ts +12 -4
  55. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +6 -2
  56. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +6 -2
  57. package/es/components/recommend-search/index.d.ts +8 -8
  58. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +8 -8
  59. package/es/components/recommend-search/src/components/BaseSearch.d.ts +1 -1
  60. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +3 -3
  61. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +3 -3
  62. package/es/components/select-person/index.d.ts +1109 -321
  63. package/es/components/select-person/index.js +1 -1
  64. package/es/components/select-person/src/SelectPerson.vue.d.ts +4 -10
  65. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  66. package/es/components/select-person/src/SelectPersonType.vue.d.ts +314 -0
  67. package/es/components/select-person/src/SelectPersonType.vue.js +1 -0
  68. package/es/components/select-person/src/SelectPersonType.vue2.js +1 -0
  69. package/es/components/select-person/src/components/SearchMultiple.vue.js +1 -0
  70. package/es/components/select-person/src/components/SearchOrgAndStaff.vue.js +1 -0
  71. package/es/components/select-person/src/constants/index.d.ts +2 -0
  72. package/es/components/select-person/src/constants/index.js +1 -0
  73. package/es/components/select-person/src/index.vue.d.ts +1385 -0
  74. package/es/components/select-person/src/index.vue.js +1 -0
  75. package/es/components/select-person/src/index.vue2.js +1 -0
  76. package/es/components/shortcut-setter/index.d.ts +6 -2
  77. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +6 -2
  78. package/es/shared/hooks/useAsyncQueue/index.d.ts +3 -0
  79. package/es/shared/hooks/useAsyncQueue/index.js +1 -1
  80. package/es/shared/package.json.js +1 -1
  81. package/es/shared/utils/business.js +1 -1
  82. package/package.json +2 -2
  83. package/es/components/select-person/src/SearchMultiple.vue.js +0 -1
  84. package/es/components/select-person/src/SearchOrgAndStaff.vue.js +0 -1
  85. /package/es/components/select-person/src/{SearchMultiple.vue.d.ts → components/SearchMultiple.vue.d.ts} +0 -0
  86. /package/es/components/select-person/src/{SearchMultiple.vue2.js → components/SearchMultiple.vue2.js} +0 -0
  87. /package/es/components/select-person/src/{SearchOrgAndStaff.vue.d.ts → components/SearchOrgAndStaff.vue.d.ts} +0 -0
  88. /package/es/components/select-person/src/{SearchOrgAndStaff.vue2.js → components/SearchOrgAndStaff.vue2.js} +0 -0
@@ -0,0 +1 @@
1
+ import e from"./index.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var i=r(e,[["__file","index.vue"]]);export{i as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,useAttrs as t,ref as a,computed as r,provide as l,openBlock as o,createBlock as u,resolveDynamicComponent as d,unref as p,mergeProps as n,withCtx as s,createCommentVNode as c,renderSlot as i,normalizeProps as y,guardReactiveProps as f}from"vue";import{InjectionSelectPersonEmits as h}from"./constants/index.js";import m from"./SelectPersonType.vue.js";import v from"./SelectPerson.vue.js";var b=e({__name:"index",props:{defaultList:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},searchPlaceholder:{type:String,default:"输入关键字搜索"},searchButtonText:{type:String,default:"搜索"},wordbook:{type:Object,default:()=>({})},wordbookChild:{type:Object,default:()=>({})},showCount:{type:Boolean,default:!0},showClear:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},searchInner:{type:Boolean,default:!1},searchFilter:{type:Object,default:()=>({})},treeSetting:{type:Object,default:()=>({})},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])},showSelectType:{type:Boolean,default:!1},roleData:{type:Array,default:()=>[]},roleFields:{type:Object,default:()=>({label:"name",key:"id",children:"children"})},switchTypeProps:{type:Array,default:()=>[]},switchTypeData:{type:Object,default:()=>({})},tagProps:{type:Object,default:()=>({})}},emits:["check","checkWithLevel"],setup(e,{expose:b,emit:j}){const g=e,k=t(),w=a(),O=r((()=>{var e;return(null==(e=g.switchTypeProps)?void 0:e.length)>0?m:v})),P=r((()=>Object.assign({},g,k)));l(h,(function(e,...t){j(e,...t)}));return b({getCheckWithLevel:()=>{var e;return null==(e=w.value)?void 0:e.getCheckWithLevel()}}),(e,t)=>(o(),u(d(p(O)),n({ref_key:"selectPersonRef",ref:w},p(P)),{tag:s((t=>[c(" 标签插槽 "),i(e.$slots,"tag",y(f(t)))])),_:3},16))}});export{b as default};
@@ -263,7 +263,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
263
263
  formRenderRef: import("vue").Ref<import("..").FormRenderExpose | undefined>;
264
264
  key: import("vue").Ref<number>;
265
265
  reload: () => Promise<void>;
266
- formRenderExposeKeyList: readonly ["validate", "getFormValues", "setFormValues", "setFieldState", "resetFields", "queryWidget", "getFieldList", "applySelectedSetting", "getTextFormValues"];
266
+ formRenderExposeKeyList: readonly ["validate", "getFormValues", "setFormValues", "setFieldState", "resetFields", "queryWidget", "getFieldList", "applySelectedSetting", "getTextFormValues", "optionInited"];
267
267
  exposed: Partial<import("..").FormRenderExpose>;
268
268
  FormRender: import("vue").DefineComponent<{
269
269
  fieldList: {
@@ -672,6 +672,10 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
672
672
  businessCollector: import("..").BusinessCollector;
673
673
  formItemDepsCollector: import("..").FormItemDepsCollector;
674
674
  changeContextCollector: import("..").ContextCollector;
675
+ asyncQueue: import("../../shared/hooks").AsyncQueue<import("../../shared/hooks").FormRequestDefine.AsyncQueueItem, any, {
676
+ label: string;
677
+ value: unknown;
678
+ }[]>;
675
679
  formUUID: string;
676
680
  anchorBarRef: import("vue").Ref<{
677
681
  syncBarPosition: import("../../shared/types").AnyFn;
@@ -997,7 +1001,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
997
1001
  startIncrementalRender: () => void;
998
1002
  onKeydown: (event: KeyboardEvent) => Promise<void>;
999
1003
  clearSpan: (uuid: string) => void;
1000
- exposeEvent: Omit<import("..").FormRenderExpose, "getFieldList" | "formModel" | "reload">;
1004
+ exposeEvent: Omit<import("..").FormRenderExpose, "getFieldList" | "optionInited" | "formModel" | "reload">;
1001
1005
  useVersion: typeof import("../../shared/hooks").useVersion;
1002
1006
  FormConsumer: import("vue").DefineComponent<{}, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1003
1007
  FormProvider: import("vue").DefineComponent<Record<"form", any>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Record<"form", any>>>, {
@@ -266,7 +266,7 @@ declare const _default: import("vue").DefineComponent<{
266
266
  formRenderRef: import("vue").Ref<import("../../../components/form-render").FormRenderExpose | undefined>;
267
267
  key: import("vue").Ref<number>;
268
268
  reload: () => Promise<void>;
269
- formRenderExposeKeyList: readonly ["validate", "getFormValues", "setFormValues", "setFieldState", "resetFields", "queryWidget", "getFieldList", "applySelectedSetting", "getTextFormValues"];
269
+ formRenderExposeKeyList: readonly ["validate", "getFormValues", "setFormValues", "setFieldState", "resetFields", "queryWidget", "getFieldList", "applySelectedSetting", "getTextFormValues", "optionInited"];
270
270
  exposed: Partial<import("../../../components/form-render").FormRenderExpose>;
271
271
  FormRender: import("vue").DefineComponent<{
272
272
  fieldList: {
@@ -675,6 +675,10 @@ declare const _default: import("vue").DefineComponent<{
675
675
  businessCollector: import("../../../components/form-render").BusinessCollector;
676
676
  formItemDepsCollector: import("../../../components/form-render").FormItemDepsCollector;
677
677
  changeContextCollector: import("../../../components/form-render").ContextCollector;
678
+ asyncQueue: import("../../../shared/hooks").AsyncQueue<import("../../../shared/hooks").FormRequestDefine.AsyncQueueItem, any, {
679
+ label: string;
680
+ value: unknown;
681
+ }[]>;
678
682
  formUUID: string;
679
683
  anchorBarRef: import("vue").Ref<{
680
684
  syncBarPosition: AnyFn;
@@ -1000,7 +1004,7 @@ declare const _default: import("vue").DefineComponent<{
1000
1004
  startIncrementalRender: () => void;
1001
1005
  onKeydown: (event: KeyboardEvent) => Promise<void>;
1002
1006
  clearSpan: (uuid: string) => void;
1003
- exposeEvent: Omit<import("../../../components/form-render").FormRenderExpose, "getFieldList" | "formModel" | "reload">;
1007
+ exposeEvent: Omit<import("../../../components/form-render").FormRenderExpose, "getFieldList" | "optionInited" | "formModel" | "reload">;
1004
1008
  useVersion: typeof useVersion;
1005
1009
  FormConsumer: import("vue").DefineComponent<{}, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1006
1010
  FormProvider: import("vue").DefineComponent<Record<"form", any>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Record<"form", any>>>, {
@@ -1,3 +1,4 @@
1
+ import { AnyFn } from '../../../shared/types';
1
2
  import { AsyncQueueDefine } from './types';
2
3
  export * from './types';
3
4
  export declare enum ENTRY_STATE {
@@ -24,4 +25,6 @@ export declare class AsyncQueue<T = any, K = any, R = any> {
24
25
  private _ensureProcessing;
25
26
  private _startProcess;
26
27
  private _handlerResult;
28
+ get activeTasks(): number;
29
+ onActiveTaskChange: null | AnyFn;
27
30
  }
@@ -1 +1 @@
1
- import{cloneDeep as s}from"lodash-es";var e=(s=>(s[s.PENDING=0]="PENDING",s[s.DONE=1]="DONE",s))(e||{});class t{constructor(s,e,t){this.item=s,this.key=e,this.state=0,this.callback=t}}class i{constructor(s){this._list=s?Array.from(s):[]}enqueue(s){this._list.push(s)}dequeue(){return this._list.shift()}}class r{constructor({name:s,processor:e,getKey:t,parallelism:r,uniqueData:a}){this._queued=new i,this._entries=new Map,this._activeTasks=0,this._processingLock=!1,this._stopped=!1,this.uniqueData=!0,this.name=s,this.processor=e,this.getKey=t,this.parallelism=r||100,this.uniqueData=!!a}add(e,i){if(this._stopped)return i(new Error("Queue was stopped"));const r=this.getKey(e);if(this._entries.has(r)){const e=this._entries.get(r);return void(1===e.state?setTimeout((()=>{i&&i(this.uniqueData?s(e.error):e.error,this.uniqueData?s(e.result):e.result)})):e.callbacks?e.callbacks.push(i):e.callbacks=[i])}const a=new t(e,r,i);this._entries.set(r,a),this._queued.enqueue(a),this._processingLock||(this._processingLock=!0,Promise.resolve().then(this._ensureProcessing.bind(this)))}addAsync(s){return new Promise(((e,t)=>{this.add(s,((s,i)=>{s&&t(s),e(i)}))}))}_ensureProcessing(){for(;this._activeTasks<this.parallelism;){const s=this._queued.dequeue();if(!s)break;this._activeTasks++,s.state=0,this._startProcess(s)}this._processingLock=!1}_startProcess(s){this.processor(s.item,((e,t)=>{e?this._handlerResult(s,e):this._handlerResult(s,e,t)}),(()=>this._entries.delete(s.key)))}_handlerResult(e,t,i){const r=e.callback;e.state=1,e.callback=void 0,e.result=this.uniqueData?s(i):i,e.error=this.uniqueData?s(t):t,this._activeTasks--,r&&r(t,i),e.callbacks&&e.callbacks.forEach((s=>s(t,i))),this._processingLock||(this._processingLock=!0,Promise.resolve().then(this._ensureProcessing.bind(this)))}}export{r as AsyncQueue,e as ENTRY_STATE};
1
+ import{cloneDeep as s}from"lodash-es";var e=(s=>(s[s.PENDING=0]="PENDING",s[s.DONE=1]="DONE",s))(e||{});class t{constructor(s,e,t){this.item=s,this.key=e,this.state=0,this.callback=t}}class i{constructor(s){this._list=s?Array.from(s):[]}enqueue(s){this._list.push(s)}dequeue(){return this._list.shift()}}class a{constructor({name:s,processor:e,getKey:t,parallelism:a,uniqueData:r}){this._queued=new i,this._entries=new Map,this._activeTasks=0,this._processingLock=!1,this._stopped=!1,this.uniqueData=!0,this.onActiveTaskChange=null,this.name=s,this.processor=e,this.getKey=t,this.parallelism=a||100,this.uniqueData=!!r}add(e,i){if(this._stopped)return i(new Error("Queue was stopped"));const a=this.getKey(e);if(this._entries.has(a)){const e=this._entries.get(a);return void(1===e.state?setTimeout((()=>{i&&i(this.uniqueData?s(e.error):e.error,this.uniqueData?s(e.result):e.result)})):e.callbacks?e.callbacks.push(i):e.callbacks=[i])}const r=new t(e,a,i);this._entries.set(a,r),this._queued.enqueue(r),this._processingLock||(this._processingLock=!0,Promise.resolve().then(this._ensureProcessing.bind(this)))}addAsync(s){return new Promise(((e,t)=>{this.add(s,((s,i)=>{s&&t(s),e(i)}))}))}_ensureProcessing(){for(var s;this._activeTasks<this.parallelism;){const e=this._queued.dequeue();if(!e)break;this._activeTasks++,null==(s=this.onActiveTaskChange)||s.call(this),e.state=0,this._startProcess(e)}this._processingLock=!1}_startProcess(s){this.processor(s.item,((e,t)=>{e?this._handlerResult(s,e):this._handlerResult(s,e,t)}),(()=>this._entries.delete(s.key)))}_handlerResult(e,t,i){var a;const r=e.callback;e.state=1,e.callback=void 0,e.result=this.uniqueData?s(i):i,e.error=this.uniqueData?s(t):t,this._activeTasks--,null==(a=this.onActiveTaskChange)||a.call(this),r&&r(t,i),e.callbacks&&e.callbacks.forEach((s=>s(t,i))),this._processingLock||(this._processingLock=!0,Promise.resolve().then(this._ensureProcessing.bind(this)))}get activeTasks(){return this._activeTasks}}export{a as AsyncQueue,e as ENTRY_STATE};
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",s="3.2.6-release.0",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.2.6-release.0",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",s="3.2.6-release.2",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.2.6-release.2",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 +1 @@
1
- import{Path as e}from"@formily/path";import{isArray as n,isString as t,includes as r,negate as a,isNumber as o,gt as i,gte as l,lt as u,lte as c,identity as f,noop as s,isObject as p}from"lodash-es";import{unref as d}from"vue";import{add as m,differenceInMilliseconds as F}from"date-fns";function D(e){return null==e||""==e}function N(e){return(n,r)=>(t(n)&&(n=+n),t(r)&&(r=+r),!(!o(n)||Number.isNaN(n)||!o(r)||Number.isNaN(r))&&e(n,r))}const g={EQ:(e,n)=>`${e}`===n,NEQ:(e,n)=>`${e}`!==n,CL:(e,a)=>!(!n(e)&&!t(e))&&r(e,a),NC:(e,a)=>!n(e)&&!t(e)||!r(e,a),NULL:D,NOT_NULL:a(D),BIG:N(i),BIGEQ:N(l),LESS:N(u),LESSEQ:N(c)};function E(e,n,t={}){return(t[n.con]||g[n.con]||(()=>!1))(e,`${n.value}`)}function h(e,n){if(!n||!t(n))return e.every(f);try{return new Function("return "+n.replace(/OR/g,"||").replace(/AND/g,"&&").replace(/[a-zA-Z]/g,"").replace(/\d+/g,(n=>e[+n-1]?"true":"false")))()}catch(e){return console.error("表达式错误=>",n),!1}}function v(t,r){if(!n(r.conObj))return!1;return h(r.conObj.map((n=>E(e.getIn(t,n.field_key),n,r.compareMap))),r.sqlExpression)}function A(t,r){if(!n(r.conditions))return!1;return h(r.conditions.map((n=>{const a=e.getIn(t,n.field);return"field"===n.valueType?E(a,{con:n.type,value:e.getIn(t,n.value)},r.compareMap):E(a,{con:n.type,value:n.value},r.compareMap)})),r.sqlExpression)}const b=Object.freeze({SET_VALUE:function(e,{getter:n,setter:r}){if(!p(e))return;const{results:a=[],params:o=[],compareMap:i={}}=e;if(!a.length)return;function l(e){var r;if(!t(e))return e;const a=e.trim().match(/^\$\{([a-zA-Z\d\s]+)}$/);return a?n(null==(r=a[1])?void 0:r.trim()):e}o.every((e=>e&&e.p_name&&E(n(e.p_name),{con:e.p_select,value:l(e.p_value)},i)))&&a.forEach((e=>r(e.p_name,l(e.p_value))))},REPEAT_VALIDATE:s,IS_SHOW_FIELD:s,SQLSAVE:s,API:s});function I(e){return b[e]||s}function L(e,r,a){function i(e){return n(e)&&!!e.length}function l(e,n=!0){e.forEach((e=>{if(!e.operationalResult||!n&&null!=r(e.operationalResult))return;const i=e.operationFormParam.reduce(((e,n)=>(e[n=n.replace(/^table\./,"")]=+r(n),e)),{}),l=e.operationalRule.replace(/\${(.+?)}/g,"$1");let u=new Function("table",`return ${l}`)(i);t(u)&&(u=+u),u=o(u)?isNaN(u)?"":u.toFixed(+e.operationalPrecision):"",a(e.operationalResult,u)}))}return{operationalFormHandler:function(n){if(!i(d(e)))return;const t=d(e).filter((e=>e.operationFormParam.includes(`table.${n}`)));t.length&&l(t)},triggerAllOperationalFormHandler:function(){i(d(e))&&l(d(e),!1)}}}function V(e,t,r){function a(e){return n(e)&&!!e.length}function i(e,n=!0){e.forEach((e=>{e.diffValField&&e.diffValUnit&&e.scene&&(n||null==t(e.diffValField))&&("DIFF"===e.scene?function({startDateField:e,endDateField:n,diffValField:a,diffValUnit:o,precision:i="0"}){const l=t(e),u=t(n);if(l&&u){const e=F(new Date(u),new Date(l))/1e3/60,n=e/60,t=n/24;let c="";switch(o){case"DAY":c=t.toFixed(+i);break;case"HOUR":c=n.toFixed(+i);break;case"MIN":c=e.toFixed(+i);break;case"DHM":c=`${Math.floor(t)}天${Math.floor(n%24)}小时${Math.floor(e%60)}分钟`;break}r(a,c)}else r(a,null)}(e):"CALC"===e.scene&&function(e){const n=+e.diffValField;if(!o(n)||Number.isNaN(n))return;const a=t(e.endDateField);if(a){const t=m(new Date(a),{days:"DAY"===e.diffValUnit?n:0,hours:"HOUR"===e.diffValUnit?n:0,minutes:"MIN"===e.diffValUnit?n:0});r(e.startDateField,t)}else r(e.startDateField,null)}(e))}))}return{dateOperationalFormHandler:function(n){if(!a(d(e)))return;const t=d(e).filter((e=>"DIFF"===e.scene&&e.startDateField===n||e.endDateField===n));t.length&&i(t)},triggerAllDateOperationalFormHandler:function(){a(d(e))&&i(d(e),!1)}}}export{I as getBindEventSettingTrigger,V as getDateOperationalFormHandler,L as getOperationalFormHandler,h as isConditionsMatchSqlExpression,E as isMatchLowCodeCondition,v as isMatchLowCodeConditionsWithSqlExpression,A as isMatchNewLowCodeConditionsWithSqlExpression};
1
+ import{Path as e}from"@formily/path";import{isArray as n,isString as t,includes as r,negate as a,isNumber as i,gt as o,gte as l,lt as u,lte as c,identity as f,noop as s,isObject as p}from"lodash-es";import{unref as d}from"vue";import{add as m,differenceInMilliseconds as F}from"date-fns";function D(e){return null==e||""==e}function N(e){return(n,r)=>(t(n)&&(n=+n),t(r)&&(r=+r),!(!i(n)||Number.isNaN(n)||!i(r)||Number.isNaN(r))&&e(n,r))}const g={EQ:(e,n)=>`${e}`===n,NEQ:(e,n)=>`${e}`!==n,CL:(e,a)=>!(!n(e)&&!t(e))&&r(e,a),NC:(e,a)=>!n(e)&&!t(e)||!r(e,a),NULL:D,NOT_NULL:a(D),BIG:N(o),BIGEQ:N(l),LESS:N(u),LESSEQ:N(c)};function E(e,n,t={}){return(t[n.con]||g[n.con]||(()=>!1))(e,`${n.value}`)}function h(e,n){if(!n||!t(n))return e.every(f);try{return new Function("return "+n.replace(/OR/gi,"||").replace(/AND/gi,"&&").replace(/[a-z]/gi,"").replace(/\d+/g,(n=>e[+n-1]?"true":"false")))()}catch(e){return console.error("表达式错误=>",n),!1}}function v(t,r){if(!n(r.conObj))return!1;return h(r.conObj.map((n=>E(e.getIn(t,n.field_key),n,r.compareMap))),r.sqlExpression)}function b(t,r){if(!n(r.conditions))return!1;return h(r.conditions.map((n=>{const a=e.getIn(t,n.field);return"field"===n.valueType?E(a,{con:n.type,value:e.getIn(t,n.value)},r.compareMap):E(a,{con:n.type,value:n.value},r.compareMap)})),r.sqlExpression)}const A=Object.freeze({SET_VALUE:function(e,{getter:n,setter:r}){if(!p(e))return;const{results:a=[],params:i=[],compareMap:o={}}=e;if(!a.length)return;function l(e){var r;if(!t(e))return e;const a=e.trim().match(/^\$\{([a-zA-Z\d\s]+)}$/);return a?n(null==(r=a[1])?void 0:r.trim()):e}i.every((e=>e&&e.p_name&&E(n(e.p_name),{con:e.p_select,value:l(e.p_value)},o)))&&a.forEach((e=>r(e.p_name,l(e.p_value))))},REPEAT_VALIDATE:s,IS_SHOW_FIELD:s,SQLSAVE:s,API:s});function I(e){return A[e]||s}function L(e,r,a){function o(e){return n(e)&&!!e.length}function l(e,n=!0){e.forEach((e=>{if(!e.operationalResult||!n&&null!=r(e.operationalResult))return;const o=e.operationFormParam.reduce(((e,n)=>(e[n=n.replace(/^table\./,"")]=+r(n),e)),{}),l=e.operationalRule.replace(/\${(.+?)}/g,"$1");let u=new Function("table",`return ${l}`)(o);t(u)&&(u=+u),u=i(u)?isNaN(u)?"":u.toFixed(+e.operationalPrecision):"",a(e.operationalResult,u)}))}return{operationalFormHandler:function(n){if(!o(d(e)))return;const t=d(e).filter((e=>e.operationFormParam.includes(`table.${n}`)));t.length&&l(t)},triggerAllOperationalFormHandler:function(){o(d(e))&&l(d(e),!1)}}}function V(e,t,r){function a(e){return n(e)&&!!e.length}function o(e,n=!0){e.forEach((e=>{e.diffValField&&e.diffValUnit&&e.scene&&(n||null==t(e.diffValField))&&("DIFF"===e.scene?function({startDateField:e,endDateField:n,diffValField:a,diffValUnit:i,precision:o="0"}){const l=t(e),u=t(n);if(l&&u){const e=F(new Date(u),new Date(l))/1e3/60,n=e/60,t=n/24;let c="";switch(i){case"DAY":c=t.toFixed(+o);break;case"HOUR":c=n.toFixed(+o);break;case"MIN":c=e.toFixed(+o);break;case"DHM":c=`${Math.floor(t)}天${Math.floor(n%24)}小时${Math.floor(e%60)}分钟`;break}r(a,c)}else r(a,null)}(e):"CALC"===e.scene&&function(e){const n=+e.diffValField;if(!i(n)||Number.isNaN(n))return;const a=t(e.endDateField);if(a){const t=m(new Date(a),{days:"DAY"===e.diffValUnit?n:0,hours:"HOUR"===e.diffValUnit?n:0,minutes:"MIN"===e.diffValUnit?n:0});r(e.startDateField,t)}else r(e.startDateField,null)}(e))}))}return{dateOperationalFormHandler:function(n){if(!a(d(e)))return;const t=d(e).filter((e=>"DIFF"===e.scene&&e.startDateField===n||e.endDateField===n));t.length&&o(t)},triggerAllDateOperationalFormHandler:function(){a(d(e))&&o(d(e),!1)}}}export{I as getBindEventSettingTrigger,V as getDateOperationalFormHandler,L as getOperationalFormHandler,h as isConditionsMatchSqlExpression,E as isMatchLowCodeCondition,v as isMatchLowCodeConditionsWithSqlExpression,b as isMatchNewLowCodeConditionsWithSqlExpression};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.2.6-release.0",
3
+ "version": "3.2.6-release.2",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -72,5 +72,5 @@
72
72
  "iOS 7",
73
73
  "last 3 iOS versions"
74
74
  ],
75
- "gitHead": "88c3064c4f7fa34fc2c10c21e8e6e516406999f2"
75
+ "gitHead": "81a60383bd1a2cfff3a227552fcc9ebbf383dfba"
76
76
  }
@@ -1 +0,0 @@
1
- import e from"./SearchMultiple.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var l=r(e,[["__file","SearchMultiple.vue"]]);export{l as default};
@@ -1 +0,0 @@
1
- import r from"./SearchOrgAndStaff.vue2.js";import e from"../../../_virtual/_plugin-vue_export-helper.js";var a=e(r,[["__file","SearchOrgAndStaff.vue"]]);export{a as default};