cnhis-design-vue 3.1.46-beta.27 → 3.1.46-beta.29

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 (54) hide show
  1. package/es/components/form-config/index.d.ts +6 -6
  2. package/es/components/form-config/src/FormConfig.vue.d.ts +6 -6
  3. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +3 -3
  4. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -3
  5. package/es/components/form-render/index.d.ts +3 -3
  6. package/es/components/form-render/src/FormRender.vue.d.ts +2 -2
  7. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +3 -3
  8. package/es/components/form-render/src/hooks/useOperationalForm.d.ts +1 -1
  9. package/es/components/form-render/src/hooks/useOperationalForm.js +1 -1
  10. package/es/components/form-render/src/types/index.d.ts +1 -7
  11. package/es/components/iho-table/index.d.ts +12 -0
  12. package/es/components/iho-table/src/IhoTable.vue.d.ts +12 -0
  13. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
  14. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -1
  15. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  16. package/es/components/iho-table/src/plugins/index.js +1 -1
  17. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
  18. package/es/components/iho-table/src/plugins/operationalFormPlugin/index.d.ts +1 -0
  19. package/es/components/iho-table/src/plugins/operationalFormPlugin/index.js +1 -0
  20. package/es/components/iho-table/src/types/index.d.ts +2 -1
  21. package/es/components/index.css +1 -1
  22. package/es/components/info-header/index.d.ts +10 -10
  23. package/es/components/info-header/src/InfoHeader.vue.d.ts +10 -10
  24. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +3 -3
  25. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +3 -3
  26. package/es/components/scale-view/index.d.ts +8 -8
  27. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  28. package/es/components/scale-view/src/components/formitem/r-checkbox.d.ts +4 -4
  29. package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
  30. package/es/components/scale-view/src/components/formitem/r-radio.d.ts +4 -4
  31. package/es/components/scale-view/src/components/formitem/r-radio.js +1 -1
  32. package/es/components/scale-view/src/hooks/use-component.d.ts +16 -16
  33. package/es/components/scale-view/style/index.css +1 -1
  34. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  35. package/es/components/select-person/index.d.ts +105 -3
  36. package/es/components/select-person/src/SearchOrgAndStaff.vue.d.ts +88 -0
  37. package/es/components/select-person/src/SearchOrgAndStaff.vue.js +1 -0
  38. package/es/components/select-person/src/SearchOrgAndStaff.vue2.js +1 -0
  39. package/es/components/select-person/src/SelectPerson.vue.d.ts +105 -1
  40. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  41. package/es/components/select-person/src/types/enums.d.ts +4 -0
  42. package/es/components/select-person/src/types/enums.js +1 -0
  43. package/es/components/select-person/src/utils/index.d.ts +1 -1
  44. package/es/components/select-person/src/utils/index.js +1 -1
  45. package/es/components/select-person/style/index.css +1 -1
  46. package/es/components/shortcut-setter/index.d.ts +3 -3
  47. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +3 -3
  48. package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
  49. package/es/shared/package.json.js +1 -1
  50. package/es/shared/types/business.d.ts +6 -0
  51. package/es/shared/utils/business.d.ts +6 -1
  52. package/es/shared/utils/business.js +1 -1
  53. package/es/shared/utils/index.js +1 -1
  54. package/package.json +2 -2
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,inject as t,computed as a,watch as i,openBlock as o,createBlock as s,unref as n,normalizeClass as d,isRef as r,withCtx as u,createVNode as c,normalizeStyle as m,createElementVNode as h,createTextVNode as f,renderSlot as p,toDisplayString as v,h as g}from"vue";import{useMessage as b,NModal as w,NCard as x,NButton as L,NCheckbox as y,NSelect as k,NCheckboxGroup as F,NPopover as I,NPopconfirm as A,NIcon as N}from"naive-ui";import{Trash as C}from"@vicons/ionicons5";import{InjectionExportApiConfig as _}from"../constants/index.js";import P from"../../../../shared/components/VueDraggable/src/vuedraggable.js";import S from"../hooks/useAsyncData.js";import{dragFieldCheckList as z}from"../tool.js";import{cloneDeep as E}from"lodash-es";const j={class:"svg-wrap"},H={class:"flex_right"},O=h("div",{class:"tip"},"提示:支持拖动调整字段顺序,字段导出顺序为从左到右,从上到下。",-1),U={class:"flex_between"},$=["title"];var T=e({__name:"ExportModal",props:{visible:{type:Boolean,default:!1},tableListId:{type:String,default:""},curProgram:{type:Object,default:()=>({})},programOptions:{type:Array,default:()=>[]},downLoadFieldList:{type:Array,default:()=>[]},showAllFieldList:{type:Array,default:()=>[]}},emits:["cancelModal","updateCurProgram","updateFieldCheckList","updateShowAllFieldList"],setup(e,{emit:T}){const K=e,M="default",D="860px",B="496px",V={class:"select-export-popover"},q=b(),{deleteTableListExportScheme:G,exportTableListScheme:J}=S(),Q=l(!1),R=l(D),W=l({maxHeight:B,height:B}),X=l(!1),Y=l(!0),Z=l([]),ee=t(_),le=a((()=>K.curProgram.schemeId));function te(){T("updateShowAllFieldList",K.showAllFieldList)}function ae({option:e}){return g("span",e.schemeName)}function ie(e){const l=[g(I,{trigger:"hover",duration:0},{default:()=>e.schemeName,trigger:()=>g("span",{class:"content"},e.schemeName)})],t=[g(A,{placement:"top-start",positiveText:"确认",negativeText:"取消",onPositiveClick:()=>function(e){const{schemeId:l}=K.curProgram;if(l===e.schemeId)return q.warning("当前正在使用该方案,请先切换其他方案再删除");!async function(e){if(!K.tableListId)return q.warning("请传入列表id");try{await G({id:K.tableListId,schemeId:e},ee)&&q.success("删除成功")}catch(e){q.error(`获取导出方案数据请求失败:${e}`)}}(e.schemeId)}(e)},{trigger:()=>g(N,{onclick:oe},{default:()=>g(C)}),default:()=>"确定删除该导出方案吗?"})],a=e.schemeId===M?[l]:[l,t];return g("div",{class:"flex-between"},a)}function oe(e){e.stopPropagation()}function se(e){T("updateCurProgram",e)}function ne(){!async function(){if(!K.tableListId)return q.warning("请传入列表id");if(Z.value.length<1)return q.warning("请至少勾选一个字段");try{const{schemeId:e}=K.curProgram,l=K.programOptions.find((l=>l.schemeId===e)),t={fieldKeys:z(K.showAllFieldList,Z.value),lastUsedSchemeName:l?l.schemeName:"",schemeId:l?l.schemeId:"",schemeName:l?l.schemeName:"",tableListId:K.tableListId};await J(t,ee)&&(q.success("导出成功"),re())}catch(e){q.error(`获取导出方案数据请求失败:${e}`)}}()}function de(e){var l;Y.value=!1,Z.value=e&&(null==(l=K.showAllFieldList)?void 0:l.map((e=>e.columnName)))||[]}function re(){T("cancelModal"),R.value=D,W.value={height:B,maxHeight:B},Q.value=!1}function ue(){Q.value=!Q.value;let e=document.body.clientHeight;R.value===D?(R.value="100%",W.value.maxHeight=`${e}px`,W.value.height=`${e}px`):(R.value=D,W.value.maxHeight=B,W.value.height=B)}return i((()=>Z.value),(e=>{K.showAllFieldList.length>0&&(Y.value=e.length>0&&e.length<K.showAllFieldList.length,X.value=e.length===K.showAllFieldList.length,T("updateFieldCheckList",e))}),{immediate:!0}),i((()=>K.curProgram),(e=>{e&&function(e){const l=K.programOptions.find((l=>l.schemeId===e));if(l){let t=[];const a=K.downLoadFieldList.filter((e=>e.fixedExport)).map((e=>e.columnName)),i=l.fieldKeys.filter((e=>!a.includes(e)));if(Z.value=[...i,...a],e===M){const e=E(K.downLoadFieldList);return void T("updateShowAllFieldList",e)}Z.value.forEach((e=>{const l=K.downLoadFieldList.find((l=>l.columnName===e));l&&t.push(l)}));const o=K.downLoadFieldList.filter((e=>!Z.value.includes(e.columnName))),s=[...t,...o];T("updateShowAllFieldList",s)}}(e.schemeId)}),{immediate:!0}),(l,t)=>(o(),s(n(w),{class:d(["table-export-field-modal",{"modal-screen":Q.value}]),show:e.visible,"onUpdate:show":t[3]||(t[3]=e=>r(visible)?visible.value=e:null),maskClosable:!1,width:R.value,bodyStyle:W.value,closable:!1,centered:"",onPositiveClick:ne,onNegativeClick:re},{default:u((()=>[c(n(x),{style:m({width:R.value,...W.value}),title:"选择导出字段",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":u((()=>[h("div",j,[h("i",{onClick:ue,class:d(["iconfont-table-filter",Q.value?"icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),h("i",{onClick:re,class:"iconfont-table-filter icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi"})])])),footer:u((()=>[h("div",H,[c(n(L),{onClick:re},{default:u((()=>[f("取消")])),_:1}),p(l.$slots,"add"),c(n(L),{type:"info",onClick:ne},{default:u((()=>[f("导出")])),_:1})])])),default:u((()=>[O,h("header",U,[c(n(y),{checked:X.value,"onUpdate:checked":[t[0]||(t[0]=e=>X.value=e),de],indeterminate:Y.value},{default:u((()=>[f(" 全选 ")])),_:1},8,["checked","indeterminate"]),c(n(k),{style:{width:"200px"},value:n(le),"onUpdate:value":[t[1]||(t[1]=e=>r(le)?le.value=e:null),se],filterable:"","label-field":"schemeName","value-field":"schemeId","show-checkmark":!1,"render-label":ie,"render-tag":ae,"menu-props":V,options:e.programOptions},null,8,["value","options"])]),c(n(F),{value:Z.value,"onUpdate:value":t[2]||(t[2]=e=>Z.value=e)},{default:u((()=>[c(n(P),{class:"draggable-checkbox-list",list:e.showAllFieldList,animation:"300",itemKey:"columnName",onEnd:te},{item:u((({element:e})=>{var l;return[c(n(y),{disabled:e.fixedExport,class:d(Z.value.includes(e.columnName)?"":"checkbox-disabled"),value:e.columnName,label:null!=(l=e.alias)?l:e.title},{default:u((()=>{var l,t;return[h("span",{title:null!=(l=e.alias)?l:e.title},v(null!=(t=e.alias)?t:e.title),9,$)]})),_:2},1032,["disabled","class","value","label"])]})),_:1},8,["list"])])),_:1},8,["value"])])),_:3},8,["style"])])),_:3},8,["class","show","width","bodyStyle"]))}});export{T as default};
1
+ import{defineComponent as e,ref as l,inject as t,computed as a,watch as i,openBlock as o,createBlock as s,unref as n,normalizeClass as d,isRef as r,withCtx as u,createVNode as c,normalizeStyle as m,createElementVNode as h,createTextVNode as f,renderSlot as p,toDisplayString as v,h as g}from"vue";import{useMessage as b,NModal as w,NCard as x,NButton as L,NCheckbox as y,NSelect as F,NCheckboxGroup as k,NPopover as I,NPopconfirm as A,NIcon as N}from"naive-ui";import{Trash as C}from"@vicons/ionicons5";import{InjectionExportApiConfig as _}from"../constants/index.js";import P from"../../../../shared/components/VueDraggable/src/vuedraggable.js";import S from"../hooks/useAsyncData.js";import{dragFieldCheckList as z}from"../tool.js";import{cloneDeep as E}from"lodash-es";const j={class:"svg-wrap"},H={class:"flex_right"},O=h("div",{class:"tip"},"提示:支持拖动调整字段顺序,字段导出顺序为从左到右,从上到下。",-1),U={class:"flex_between"},$=["title"];var T=e({__name:"ExportModal",props:{visible:{type:Boolean,default:!1},tableListId:{type:String,default:""},curProgram:{type:Object,default:()=>({})},programOptions:{type:Array,default:()=>[]},downLoadFieldList:{type:Array,default:()=>[]},showAllFieldList:{type:Array,default:()=>[]}},emits:["cancelModal","updateCurProgram","updateFieldCheckList","updateShowAllFieldList"],setup(e,{emit:T}){const K=e,M="default",D="860px",B="496px",V={class:"select-export-popover"},q=b(),{deleteTableListExportScheme:G,exportTableListScheme:J}=S(),Q=l(!1),R=l(D),W=l({maxHeight:B,height:B}),X=l(!1),Y=l(!0),Z=l([]),ee=t(_),le=a((()=>K.curProgram.schemeId));function te(){T("updateShowAllFieldList",K.showAllFieldList)}function ae({option:e}){return g("span",e.schemeName)}function ie(e){const l=[g(I,{trigger:"hover",duration:0},{default:()=>e.schemeName,trigger:()=>g("span",{class:"content"},e.schemeName)})],t=[g(A,{placement:"top-start",positiveText:"确认",negativeText:"取消",onPositiveClick:()=>function(e){const{schemeId:l}=K.curProgram;if(l===e.schemeId)return q.warning("当前正在使用该方案,请先切换其他方案再删除");!async function(e){if(!K.tableListId)return q.warning("请传入列表id");try{await G({id:K.tableListId,schemeId:e},ee)&&q.success("删除成功")}catch(e){q.error(`获取导出方案数据请求失败:${e}`)}}(e.schemeId)}(e)},{trigger:()=>g(N,{onclick:oe},{default:()=>g(C)}),default:()=>"确定删除该导出方案吗?"})],a=e.schemeId===M?[l]:[l,t];return g("div",{class:"flex-between"},a)}function oe(e){e.stopPropagation()}function se(e){T("updateCurProgram",e)}function ne(){!async function(){if(!K.tableListId)return q.warning("请传入列表id");if(Z.value.length<1)return q.warning("请至少勾选一个字段");try{const{schemeId:e}=K.curProgram,l=K.programOptions.find((l=>l.schemeId===e)),t={fieldKeys:z(K.showAllFieldList,Z.value),lastUsedSchemeName:l?l.schemeName:"",schemeId:l?l.schemeId:"",schemeName:l?l.schemeName:"",tableListId:K.tableListId};await J(t,ee)&&(q.success("导出成功"),re())}catch(e){q.error(`获取导出方案数据请求失败:${e}`)}}()}function de(e){var l,t,a;Y.value=!1,Z.value=e?(null==(l=K.showAllFieldList)?void 0:l.map((e=>e.columnName)))||[]:(null==(a=null==(t=K.showAllFieldList)?void 0:t.filter((e=>e.fixedExport)))?void 0:a.map((e=>e.columnName)))||[]}function re(){T("cancelModal"),R.value=D,W.value={height:B,maxHeight:B},Q.value=!1}function ue(){Q.value=!Q.value;let e=document.body.clientHeight;R.value===D?(R.value="100%",W.value.maxHeight=`${e}px`,W.value.height=`${e}px`):(R.value=D,W.value.maxHeight=B,W.value.height=B)}return i((()=>Z.value),(e=>{K.showAllFieldList.length>0&&(Y.value=e.length>0&&e.length<K.showAllFieldList.length,X.value=e.length===K.showAllFieldList.length,T("updateFieldCheckList",e))}),{immediate:!0}),i((()=>K.curProgram),(e=>{e&&function(e){const l=K.programOptions.find((l=>l.schemeId===e));if(l){let t=[];const a=K.downLoadFieldList.filter((e=>e.fixedExport)).map((e=>e.columnName)),i=l.fieldKeys.filter((e=>!a.includes(e)));if(Z.value=[...i,...a],e===M){const e=E(K.downLoadFieldList);return void T("updateShowAllFieldList",e)}Z.value.forEach((e=>{const l=K.downLoadFieldList.find((l=>l.columnName===e));l&&t.push(l)}));const o=K.downLoadFieldList.filter((e=>!Z.value.includes(e.columnName))),s=[...t,...o];T("updateShowAllFieldList",s)}}(e.schemeId)}),{immediate:!0}),(l,t)=>(o(),s(n(w),{class:d(["table-export-field-modal",{"modal-screen":Q.value}]),show:e.visible,"onUpdate:show":t[3]||(t[3]=e=>r(visible)?visible.value=e:null),maskClosable:!1,width:R.value,bodyStyle:W.value,closable:!1,centered:"",onPositiveClick:ne,onNegativeClick:re},{default:u((()=>[c(n(x),{style:m({width:R.value,...W.value}),title:"选择导出字段",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":u((()=>[h("div",j,[h("i",{onClick:ue,class:d(["iconfont-table-filter",Q.value?"icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),h("i",{onClick:re,class:"iconfont-table-filter icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi"})])])),footer:u((()=>[h("div",H,[c(n(L),{onClick:re},{default:u((()=>[f("取消")])),_:1}),p(l.$slots,"add"),c(n(L),{type:"info",onClick:ne},{default:u((()=>[f("导出")])),_:1})])])),default:u((()=>[O,h("header",U,[c(n(y),{checked:X.value,"onUpdate:checked":[t[0]||(t[0]=e=>X.value=e),de],indeterminate:Y.value},{default:u((()=>[f(" 全选 ")])),_:1},8,["checked","indeterminate"]),c(n(F),{style:{width:"200px"},value:n(le),"onUpdate:value":[t[1]||(t[1]=e=>r(le)?le.value=e:null),se],filterable:"","label-field":"schemeName","value-field":"schemeId","show-checkmark":!1,"render-label":ie,"render-tag":ae,"menu-props":V,options:e.programOptions},null,8,["value","options"])]),c(n(k),{value:Z.value,"onUpdate:value":t[2]||(t[2]=e=>Z.value=e)},{default:u((()=>[c(n(P),{class:"draggable-checkbox-list",list:e.showAllFieldList,animation:"300",itemKey:"columnName",onEnd:te},{item:u((({element:e})=>{var l;return[c(n(y),{disabled:e.fixedExport,class:d(Z.value.includes(e.columnName)?"":"checkbox-disabled"),value:e.columnName,label:null!=(l=e.alias)?l:e.title},{default:u((()=>{var l,t;return[h("span",{title:null!=(l=e.alias)?l:e.title},v(null!=(t=e.alias)?t:e.title),9,$)]})),_:2},1032,["disabled","class","value","label"])]})),_:1},8,["list"])])),_:1},8,["value"])])),_:3},8,["style"])])),_:3},8,["class","show","width","bodyStyle"]))}});export{T as default};
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.1.46-beta.27",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.46-beta.27",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};
1
+ var e="@cnhis-design-vue/shared",i="3.1.46-beta.29",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.46-beta.29",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};
@@ -14,3 +14,9 @@ export declare type BindEventSettingItem = {
14
14
  }[];
15
15
  [K: string]: unknown;
16
16
  };
17
+ export declare type FormOperationalConfig = {
18
+ operationFormParam: string[];
19
+ operationalRule: string;
20
+ operationalPrecision: string;
21
+ operationalResult: string;
22
+ };
@@ -1,4 +1,5 @@
1
- import { BindEventSettingItem, LOW_CODE_EVENT_TYPE, LOW_CODE_VALUE_RELATION } from '../../../es/shared/types';
1
+ import { BindEventSettingItem, FormOperationalConfig, LOW_CODE_EVENT_TYPE, LOW_CODE_VALUE_RELATION } from '../../../es/shared/types';
2
+ import { MaybeRef } from '@vueuse/core';
2
3
  export declare function isMatchLowCodeCondition(value: unknown, condition: {
3
4
  con: LOW_CODE_VALUE_RELATION;
4
5
  value: unknown;
@@ -8,4 +9,8 @@ declare function handleFieldTriggerSetValue(bindEventSetting: BindEventSettingIt
8
9
  getter: (key: string) => unknown;
9
10
  }): void;
10
11
  export declare function getBindEventSettingTrigger(key: LOW_CODE_EVENT_TYPE): typeof handleFieldTriggerSetValue;
12
+ export declare function getOperationalFormHandler(operationalForm: MaybeRef<FormOperationalConfig[] | undefined>, getter: (field: string) => unknown, setter: (field: string, value: unknown) => void): {
13
+ operationalFormHandler: (field: string) => void;
14
+ triggerAllOperationalFormHandler: () => void;
15
+ };
11
16
  export {};
@@ -1 +1 @@
1
- import{isArray as e,isString as t,includes as n,isEmpty as r,negate as E,gt as o,gte as u,lt as a,lte as c,noop as L,isObject as _}from"lodash-es";const s={EQ:(e,t)=>`${e}`===t,NEQ:(e,t)=>`${e}`!==t,CL:(r,E)=>!(!e(r)&&!t(r))&&n(r,E),NC:(r,E)=>!e(r)&&!t(r)||!n(r,E),NULL:r,NOT_NULL:E(r),BIG:o,BIGEQ:u,LESS:a,LESSEQ:c};function p(e,t){return(s[t.con]||(()=>!1))(e,`${t.value}`)}const S=Object.freeze({SET_VALUE:function(e,{getter:t,setter:n}){if(!_(e))return;const{results:r=[],params:E=[]}=e;if(!r.length)return;E.every((e=>e&&e.p_name&&p(t(e.p_name),{con:e.p_select,value:e.p_value})))&&r.forEach((e=>n(e.p_name,e.p_value)))},REPEAT_VALIDATE:L,IS_SHOW_FIELD:L,SQLSAVE:L,API:L});function f(e){return S[e]||L}export{f as getBindEventSettingTrigger,p as isMatchLowCodeCondition};
1
+ import{isArray as e,isString as n,includes as r,isEmpty as t,negate as o,gt as a,gte as l,lt as i,lte as u,noop as c,isObject as p,isNumber as f}from"lodash-es";import{unref as s}from"vue";const E={EQ:(e,n)=>`${e}`===n,NEQ:(e,n)=>`${e}`!==n,CL:(t,o)=>!(!e(t)&&!n(t))&&r(t,o),NC:(t,o)=>!e(t)&&!n(t)||!r(t,o),NULL:t,NOT_NULL:o(t),BIG:a,BIGEQ:l,LESS:i,LESSEQ:u};function m(e,n){return(E[n.con]||(()=>!1))(e,`${n.value}`)}const L=Object.freeze({SET_VALUE:function(e,{getter:n,setter:r}){if(!p(e))return;const{results:t=[],params:o=[]}=e;if(!t.length)return;o.every((e=>e&&e.p_name&&m(n(e.p_name),{con:e.p_select,value:e.p_value})))&&t.forEach((e=>r(e.p_name,e.p_value)))},REPEAT_VALIDATE:c,IS_SHOW_FIELD:c,SQLSAVE:c,API:c});function _(e){return L[e]||c}function S(r,t,o){function a(n){return e(n)&&!!n.length}function l(e,r=!0){e.forEach((e=>{const a=e.operationFormParam.reduce(((e,n)=>(e[n=n.replace(/^table\./,"")]=+t(n),e)),{}),l=e.operationalRule.replace(/\${(.+?)}/g,"$1");let i=new Function("table",`return ${l}`)(a);n(i)&&(i=+i),i=f(i)?isNaN(i)?"":i.toFixed(+e.operationalPrecision):"",(r||null==t(e.operationalResult))&&o(e.operationalResult,i)}))}return{operationalFormHandler:function(e){if(!a(s(r)))return;const n=s(r).filter((n=>n.operationFormParam.includes(`table.${e}`)));n.length&&l(n)},triggerAllOperationalFormHandler:function(){a(s(r))&&l(s(r),!1)}}}export{_ as getBindEventSettingTrigger,S as getOperationalFormHandler,m as isMatchLowCodeCondition};
@@ -1 +1 @@
1
- import{useMemoize as t}from"@vueuse/core";import{isObject as e,isString as n,isNumber as r,isArray as o,isFunction as i}from"lodash-es";import{getCurrentInstance as c}from"vue";import u from"../package.json.js";export{getBindEventSettingTrigger,isMatchLowCodeCondition}from"./business.js";function s(t,e,n="children",r){let o=!1;function i(){o=!0}!function t(e,n,r="children",c){r=x(r),e=x(e);for(let u=0;u<e.length;u++){if(n(e[u],i,c),o)return;for(let i=0;i<r.length;i++){const c=e[u][r[i]];if(Array.isArray(c)&&t(c,n,r,e[u]),o)return}}}(t,e,n,r)}function f(t,n,r=n.name,o){if(!r)throw new Error(`[CUI]: invalid component name for ${n}`);const{components:i={}}=t._context;i[r]||(!Reflect.get(t,"__cnhis_version")&&e(u)&&Reflect.set(t,"__cnhis_version",u.version),o?o():t.component(r,n))}function a(t){if(!n(t))return;const e=t.match(/[Hms:]+/);return e?e[0]:void 0}function x(t){return Array.isArray(t)?t:[t]}function d(){if(window.isSecureContext&&window.crypto)return`key${window.crypto.randomUUID()}`;return`key${"xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}`}const l=t((function(t){return t?[...t].reduce(((t,e)=>/[a-z]/.test(e)?t+8:/[A-Z]/.test(e)?t+12:/\d/.test(e)?t+9:/\./.test(e)?t+4:/[\u4e00-\u9fa5]/.test(e)?t+15:/-/.test(e)?t+4:/[()]/.test(e)?t+14:/[)(]/.test(e)?t+5:/-/.test(e)?t+10:/%/.test(e)?t+14:/‰/.test(e)?t+16:t+6),0):0})),m=Object.seal(Object.create(null));function p(t,n){return function t(n,r){return e(n)?o(n)?n.map((e=>t(e,r))):Object.entries(n).reduce(((n,[o,c])=>(r.includes(o)||(e(c)&&!i(c)?n[o]=t(c,r):n[o]=c),n)),{}):n}(t,n)}function h(t){return Object.values(t).reduce(((t,e)=>Object.assign(t,e)),{})}function g(t,e){if(!t)return t;if(e(t))return t;let n=t.parentElement;for(;n&&!e(n);)n=n.parentElement;return n}function w(t,e="px"){if(r(t))return`${t}${e}`;if(n(t))return t.endsWith(e)?t:`${t}${e}`;throw new Error(`invalid width value ${t}, it need to be a string or number!`)}function y(t,e){return t.some((t=>e.includes(t)))}const v=t((t=>{try{return JSON.parse(t)}catch(t){return{}}}),{getKey:t=>t});function $(t,n){if(!e(t))return t;const r={...t};for(let t=0;t<n.length;t++)Reflect.deleteProperty(r,n[t]);return r}function b(t){if(!c())throw new Error(t||"can't use this hook out of setup environment")}function j(t,e=1){const[n,o,i,c,u]=t.match(/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i)||[];if(!n)return[255,255,255,e];const s=u&&parseInt(u,16)/255;return[parseInt(o,16),parseInt(i,16),parseInt(c,16),+(r(s)?s.toFixed(2):e)]}export{m as DMZ,x as arrayed,b as checkInSetupEnv,p as deepOmit,g as findAncestor,a as generateTimeFormat,l as getStringWidth,j as hex2rgba,v as jsonParse,f as safeComponentRegister,h as separateMetaModule,$ as shallowOmit,y as targetStringIncludes,s as traverse,d as uuidGenerator,w as widthAppend};
1
+ import{useMemoize as t}from"@vueuse/core";import{isObject as e,isString as n,isNumber as r,isArray as o,isFunction as i}from"lodash-es";import{getCurrentInstance as c}from"vue";import u from"../package.json.js";export{getBindEventSettingTrigger,getOperationalFormHandler,isMatchLowCodeCondition}from"./business.js";function s(t,e,n="children",r){let o=!1;function i(){o=!0}!function t(e,n,r="children",c){r=d(r),e=d(e);for(let u=0;u<e.length;u++){if(n(e[u],i,c),o)return;for(let i=0;i<r.length;i++){const c=e[u][r[i]];if(Array.isArray(c)&&t(c,n,r,e[u]),o)return}}}(t,e,n,r)}function f(t,n,r=n.name,o){if(!r)throw new Error(`[CUI]: invalid component name for ${n}`);const{components:i={}}=t._context;i[r]||(!Reflect.get(t,"__cnhis_version")&&e(u)&&Reflect.set(t,"__cnhis_version",u.version),o?o():t.component(r,n))}function a(t){if(!n(t))return;const e=t.match(/[Hms:]+/);return e?e[0]:void 0}function d(t){return Array.isArray(t)?t:[t]}function x(){if(window.isSecureContext&&window.crypto)return`key${window.crypto.randomUUID()}`;return`key${"xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}`}const l=t((function(t){return t?[...t].reduce(((t,e)=>/[a-z]/.test(e)?t+8:/[A-Z]/.test(e)?t+12:/\d/.test(e)?t+9:/\./.test(e)?t+4:/[\u4e00-\u9fa5]/.test(e)?t+15:/-/.test(e)?t+4:/[()]/.test(e)?t+14:/[)(]/.test(e)?t+5:/-/.test(e)?t+10:/%/.test(e)?t+14:/‰/.test(e)?t+16:t+6),0):0})),m=Object.seal(Object.create(null));function p(t,n){return function t(n,r){return e(n)?o(n)?n.map((e=>t(e,r))):Object.entries(n).reduce(((n,[o,c])=>(r.includes(o)||(e(c)&&!i(c)?n[o]=t(c,r):n[o]=c),n)),{}):n}(t,n)}function h(t){return Object.values(t).reduce(((t,e)=>Object.assign(t,e)),{})}function g(t,e){if(!t)return t;if(e(t))return t;let n=t.parentElement;for(;n&&!e(n);)n=n.parentElement;return n}function w(t,e="px"){if(r(t))return`${t}${e}`;if(n(t))return t.endsWith(e)?t:`${t}${e}`;throw new Error(`invalid width value ${t}, it need to be a string or number!`)}function y(t,e){return t.some((t=>e.includes(t)))}const v=t((t=>{try{return JSON.parse(t)}catch(t){return{}}}),{getKey:t=>t});function $(t,n){if(!e(t))return t;const r={...t};for(let t=0;t<n.length;t++)Reflect.deleteProperty(r,n[t]);return r}function b(t){if(!c())throw new Error(t||"can't use this hook out of setup environment")}function j(t,e=1){const[n,o,i,c,u]=t.match(/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i)||[];if(!n)return[255,255,255,e];const s=u&&parseInt(u,16)/255;return[parseInt(o,16),parseInt(i,16),parseInt(c,16),+(r(s)?s.toFixed(2):e)]}export{m as DMZ,d as arrayed,b as checkInSetupEnv,p as deepOmit,g as findAncestor,a as generateTimeFormat,l as getStringWidth,j as hex2rgba,v as jsonParse,f as safeComponentRegister,h as separateMetaModule,$ as shallowOmit,y as targetStringIncludes,s as traverse,x as uuidGenerator,w as widthAppend};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.46-beta.27",
3
+ "version": "3.1.46-beta.29",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -61,5 +61,5 @@
61
61
  "iOS 7",
62
62
  "last 3 iOS versions"
63
63
  ],
64
- "gitHead": "9db83b122ccc8e3fff38c707966f5aabe64e720e"
64
+ "gitHead": "d3d24411ebc8bf6b46bf234ccd7497d8105ca038"
65
65
  }