cnhis-design-vue 3.1.47-release.1 → 3.1.47-release.3
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.
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/utils/print.d.ts +3 -3
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/index.d.ts +2 -0
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.d.ts +4 -0
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -0
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.d.ts +4 -0
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -0
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/useCommon.d.ts +4 -1
- package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
- package/es/components/fabric-chart/src/hooks/useDraw.d.ts +12 -0
- package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +7 -0
- package/es/components/fabric-chart/src/utils/index.js +1 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +1 -0
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/htmlRendererPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/htmlRendererPlugin.js +1 -0
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/src/InfoHeader.vue2.js +1 -1
- package/es/components/info-header/style/index.css +1 -1
- package/es/components/select-person/index.d.ts +4 -0
- package/es/components/select-person/src/SelectPerson.vue.d.ts +1 -0
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/select-person/src/utils/index.d.ts +1 -1
- package/es/components/select-person/src/utils/index.js +1 -1
- package/es/components/shortcut-provider/src/hooks/useShortcuts.js +1 -1
- package/es/components/shortcut-provider/src/types/index.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +5 -2
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +5 -2
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +5 -2
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,provide as t,ref as n,computed as o,openBlock as
|
|
1
|
+
import{defineComponent as e,provide as t,ref as n,computed as o,openBlock as a,createElementBlock as i,createCommentVNode as s,renderSlot as r,createElementVNode as c,normalizeClass as f,normalizeStyle as p,unref as l,createVNode as d,withCtx as u,mergeProps as m,Fragment as h,renderList as g,createBlock as v,resolveDynamicComponent as y,h as b,nextTick as _}from"vue";import{isString as I}from"lodash-es";import $ from"./components/infoDescription/index.vue.js";import x from"./components/patientInfo/index.vue.js";import{InjectionInfoHeaderEmit as S,InjectionInfoHeaderFormRef as j}from"./constants/index.js";const z={class:"c-info-header"},w={class:"c-info-header__operation"},k={key:0,class:"c-info-header__divider"},C={class:"c-info-header__setting"},H=["onClick"];var P=e({__name:"InfoHeader",props:{compact:{type:Boolean,required:!0},patientInfo:{type:Object,default:()=>({})},patientEditable:{type:Boolean},separator:{type:String,default:":"},infoList:{type:Array,default:()=>[]},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},minColumnWidth:{type:[String,Number],default:180},rowHeight:{type:[String,Number],default:38},settingIcons:{type:Array,default:()=>["patientInfo","fieldSet","compact"]},formProps:{type:Object}},emits:["openPatientInfo","fieldSet","update:compact","formChange"],setup(e,{expose:P,emit:A}){const B=e;t(S,A);const D=n();function E(){var e;return null==(e=D.value)?void 0:e.updateColumn()}const F=o((()=>({"--row-height":B.rowHeight,"--row-num":B.compact?1:2,"--padding-tb":B.compact?9:4}))),N={patientInfo:{event:function(){A("openPatientInfo")},render:()=>[b("i",{class:"info-header--iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaobianji"})]},fieldSet:{event:function(){A("fieldSet")},render:()=>[b("i",{class:"info-header--iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaoshezhi"})]},compact:{event:async function(){A("update:compact",!B.compact),await _(),await E()},render:()=>[b("i",{class:"info-header--iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia"})]}},O=o((()=>B.settingIcons.map((e=>(I(e)?N[e]:e)||{})))),R=n();return t(j,R),P({update:E,$formRender:R}),(t,n)=>(a(),i("header",z,[s(" 顶部插槽 "),r(t.$slots,"header"),c("div",{class:f(["c-info-header__content",{"is-compact":e.compact}]),style:p(l(F))},[c("section",w,[s(" 操作区插槽 "),r(t.$slots,"operation")]),t.$slots.operation?(a(),i("div",k)):s("v-if",!0),s(" 患者信息区插槽,需要自己实现整个患者信息区时使用 "),r(t.$slots,"patientModule",{},(()=>[d(l(x),{"patient-info":e.patientInfo,"patient-editable":e.patientEditable},{avatarInfo:u((()=>[s(" 头像区补充内容插槽 (会插入头像下方) "),r(t.$slots,"avatarInfo")])),avatar:u((()=>[s(" 头像插槽 "),r(t.$slots,"avatar")])),tags:u((()=>[s(" 标签插槽 "),r(t.$slots,"tags")])),_:3},8,["patient-info","patient-editable"])])),d(l($),m({ref_key:"infoDescriptionRef",ref:D,"root-slot":t.$slots},t.$props),{info:u((()=>[s(" 信息描述区插槽 "),r(t.$slots,"info")])),_:3},16,["root-slot"]),c("section",C,[s(" 设置区插槽 "),r(t.$slots,"setting",{},(()=>[(a(!0),i(h,null,g(l(O),(e=>(a(),i("div",{key:e,class:"c-info-header__settingIcon",onClick:e.event},[(a(),v(y(e.render)))],8,H)))),128))]))])],6),s(" 底部插槽 "),r(t.$slots,"footer")]))}});export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.c-info-header{
|
|
1
|
+
.c-info-header{background:#fff;box-shadow:0 2px 4px 0 hsla(0,0%,69%,.46);padding:0 16px}@font-face{font-family:info-header-iconfont;src:url(info-header-font.ttf) format("truetype")}.c-info-header .info-header--iconfont{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:info-header-iconfont!important;font-size:16px;font-style:normal}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia:before{content:"\c1003"}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantoushang:before{content:"\c1004"}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaoshezhi:before{content:"\c1005"}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaobianji:before{content:"\c1006"}.c-info-header .info-header--icon-guanbi-yanjing:before{content:"\c1001"}.c-info-header .info-header--icon-faxian-yanjing:before{content:"\c1002"}.c-info-header__content{align-items:center;display:flex;gap:18px;height:calc((var(--row-height)*var(--row-num) + var(--padding-tb)*2)*1px);justify-content:space-between;padding:calc(var(--padding-tb)*1px) 0;transition:height .2s linear,padding .2s linear}.c-info-header__content [compact-hidden]{max-height:160px;transition:max-height .2s ease-in-out,opacity .2s linear}.c-info-header__content.is-compact [compact-hidden]{max-height:0!important;opacity:0!important}.c-info-header__content.is-compact .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia{transform:rotate(0deg)}.c-info-header__divider{align-self:stretch;background:#d5d5d566;width:1px}.c-info-header__patient{align-items:center;display:flex;flex-wrap:nowrap;gap:12px;margin-right:34px}.c-info-header__patientHeader,.c-info-header__patientHeaderWrapper{align-items:center;display:flex;gap:6px}.c-info-header__patientHeaderWrapper{border-bottom:1px solid transparent}.c-info-header__patientHeaderWrapper.in-edit{border-bottom:1px solid rgba(0,0,0,.6)}.c-info-header__patientHeader--name{font-size:20px;font-weight:700;margin-right:6px}.c-info-header__patientHeader .n-tag{border-radius:2px;height:20px}.c-info-header__patientHeader .n-tag .n-tag__content{font-size:12px}.c-info-header__info{display:flex;flex:1;flex-wrap:wrap;font-size:14px;justify-content:flex-start;width:100%}.c-info-header__infoWrapper{box-sizing:border-box;height:calc((var(--row-height)*var(--row-num))*1px);max-height:calc((var(--row-height)*var(--row-num))*1px);transition:height .2s linear,max-height .2s linear}.c-info-header__info td{text-align:left}.c-info-header__info .n-descriptions-table-content{height:calc(var(--row-height)*1px);max-width:calc(var(--column-width)*1px);overflow-y:hidden;padding:0!important;vertical-align:middle!important}.c-info-header__info .n-descriptions-table-content__label{color:rgba(0,0,0,.6);display:inline-block}.c-info-header__setting{align-self:flex-start;display:flex;gap:8px}.c-info-header__settingIcon{align-items:center;cursor:pointer;display:inline-flex}.c-info-header__setting .info-header--iconfont{color:#000;display:inline-block;font-size:20px;transition:all .2s linear}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia{transform:rotate(180deg)}.c-info-header__hidden{align-items:center;display:inline-flex;font-size:14px;gap:8px;vertical-align:middle}.c-info-header__hidden--icon{color:inherit!important;cursor:pointer;font-size:14px;text-decoration:none!important}.c-info-header__formRender .n-form-item-blank>.n-input .n-input-wrapper{border-bottom:1px solid var(--n-text-color)}.c-info-header__formRender .n-base-selection,.c-info-header__formRender .n-base-selection-label,.c-info-header__formRender .n-date-picker,.c-info-header__formRender .n-input,.c-info-header__formRender .n-input-wrapper{max-height:18px;min-height:18px;vertical-align:top}.c-info-header__formRender .n-base-selection input,.c-info-header__formRender .n-base-selection-label input,.c-info-header__formRender .n-date-picker input,.c-info-header__formRender .n-input input,.c-info-header__formRender .n-input-wrapper input{max-height:18px;min-height:18px}.c-info-header__formRender .n-select{line-height:1}
|
|
@@ -27,6 +27,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
27
27
|
parent_id_obj: string | number;
|
|
28
28
|
parent_name_obj: string | number;
|
|
29
29
|
user_count_obj?: string | number | undefined;
|
|
30
|
+
filter_key?: string | undefined;
|
|
30
31
|
}>;
|
|
31
32
|
default: () => {};
|
|
32
33
|
};
|
|
@@ -107,6 +108,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
107
108
|
parent_id_obj: string | number;
|
|
108
109
|
parent_name_obj: string | number;
|
|
109
110
|
user_count_obj?: string | number | undefined;
|
|
111
|
+
filter_key?: string | undefined;
|
|
110
112
|
}>;
|
|
111
113
|
default: () => {};
|
|
112
114
|
};
|
|
@@ -602,6 +604,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
602
604
|
parent_id_obj: string | number;
|
|
603
605
|
parent_name_obj: string | number;
|
|
604
606
|
user_count_obj?: string | number | undefined;
|
|
607
|
+
filter_key?: string | undefined;
|
|
605
608
|
}>;
|
|
606
609
|
default: () => {};
|
|
607
610
|
};
|
|
@@ -665,6 +668,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
665
668
|
parent_id_obj: string | number;
|
|
666
669
|
parent_name_obj: string | number;
|
|
667
670
|
user_count_obj?: string | number | undefined;
|
|
671
|
+
filter_key?: string | undefined;
|
|
668
672
|
};
|
|
669
673
|
wordbookChild: {
|
|
670
674
|
user_id_obj: string | number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,computed as t,watch as n,openBlock as a,createBlock as u,unref as i,withCtx as r,createVNode as c,createCommentVNode as o,withKeys as s,createTextVNode as d,toDisplayString as h,withDirectives as v,vShow as p,createElementBlock as f,Fragment as y,mergeProps as k,createElementVNode as m,renderList as g}from"vue";import{NGrid as _,NGi as b,NSpace as C,NInputGroup as
|
|
1
|
+
import{defineComponent as e,ref as l,computed as t,watch as n,openBlock as a,createBlock as u,unref as i,withCtx as r,createVNode as c,createCommentVNode as o,withKeys as s,createTextVNode as d,toDisplayString as h,withDirectives as v,vShow as p,createElementBlock as f,Fragment as y,mergeProps as k,createElementVNode as m,renderList as g}from"vue";import{NGrid as _,NGi as b,NSpace as C,NInputGroup as w,NInput as x,NIcon as L,NButton as S,NCheckbox as j,NTree as T}from"naive-ui";import{CloseCircleSharp as N}from"@vicons/ionicons5";import{searchFilterTree as I,getExpandedKeys as F}from"./utils/index.js";import{cloneDeep as O}from"lodash-es";import{SearchTypeConfig as $}from"./types/enums.js";import D from"./SearchMultiple.vue.js";import E from"./SearchOrgAndStaff.vue.js";const K={key:0},q={class:"c-select-person__scroll",style:{height:"342px"}};var A=e({__name:"SelectPerson",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([])}},emits:["check","checkWithLevel"],setup(e,{expose:A,emit:B}){const P=e,R={isOpen:!1,multiple:!1,customTitles:["联系人","部门"],itemHeight:250},U=l(""),H=l(!1),W=l([]),G=l([]),z=l([]),M=l([]),J=l([]),Q=l(!1),V=O(function e(l){return l.forEach((l=>{var t;if(null==(t=l.children)?void 0:t.length){const t=se(l.children,[]);l.innerItemsNum=t.length,l.innerLeafs=t,e(l.children)}})),de(l,"")}(P.data));let X=[];const Y=t((()=>!!P.queryLoadChildData)),Z=t((()=>{var e,l;return null!=(l=null==(e=null==P?void 0:P.treeSetting)?void 0:e.checkStrategy)?l:"child"})),ee=t((()=>(null==P?void 0:P.searchFilter)&&Object.keys(null==P?void 0:P.searchFilter).length>0)),le=t((()=>ee.value?{...O(R),...P.searchFilter}:O(R))),te=t((()=>{var e,l;return null!=(l=null==(e=null==P?void 0:P.wordbookChild)?void 0:e.user_expand_keys)?l:[]})),ne=t((()=>{let e=[];return W.value.forEach((l=>{for(let t=0;t<M.value.length;t++){const n=M.value[t];if(n.key==l){e.push(n);break}}})),e}));function ae(e){e.disabled||e.children||!e.key||X.push(e.key)}function ue(e){e.disabled||e.tempTitle||!e.key||X.push(e.key)}async function ie(e){if(P.queryLoadChildData){const l=await P.queryLoadChildData(e);return l.children&&(l.children=l.children.map((e=>({...e,tempTitle:l.tempTitle?`${l.title}/${l.tempTitle}`:l.title})))),l}return e}function re(e){var l;(null==(l=e.children)?void 0:l.every((e=>e.disabled)))&&(e.disabled=!0)}function ce({option:e}){var l,t;if((null==(l=e.children)?void 0:l.length)||Y.value&&!(null==e?void 0:e.isLeaf)){const l=P.wordbook.user_count_obj&&e[P.wordbook.user_count_obj]||"",t=l?`(${l})`:"";return c("span",null,[`${e.title}${t}`])}{const l=null!=(t=e.title_expand_strs)?t:"";return c("p",{class:"user_item"},[e.title,c("span",{class:"user_item_expand",title:l},[l])])}}function oe(e){return e[P.wordbookChild.user_name_obj]||e[P.wordbook.parent_name_obj]||e.orgName||e.title||""}function se(e,l){return e.forEach((e=>{var t;(null==(t=e.children)?void 0:t.length)?se(e.children,l):!e.disabled&&l.push(e)})),l}function de(e,l){return e&&0!==e.length?e.map((e=>{var t;const n=oe(e),a=l?`${n}/${l}`:n;return{...e,tempTitle:l,children:(null==(t=e.children)?void 0:t.length)?de(null==e?void 0:e.children,a):[]}})):[]}async function he(){var e,l;const t=null!=(l=null==(e=null==P?void 0:P.wordbook)?void 0:e.filter_key)?l:"keyword";if(Q.value=!!U.value.trim(),Y.value)z.value=await P.queryTreeSearch(U.value);else{const e=function(){const e={[$.SEARCH_ORG_STAFF]:ee.value,[$.SEARCH_ORG]:P.searchInner},l=Object.keys(e).find((l=>e[l]));return null!=l?l:""}();z.value=I(e,V,U.value,t)}G.value=z.value.length&&U.value?F(z.value):[]}function ve(e,l){var t,n;switch(null!=(n=null==(t=null==P?void 0:P.treeSetting)?void 0:t.checkStrategy)?n:"child"){case"child":!function(e,l){for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n.disabled&&(!n.children||n.isLeaf)&&(l&&!W.value.includes(n.key)&&W.value.push(n.key),!l)){const e=W.value.findIndex((e=>e===n.key));W.value.splice(e,1)}n.children&&ve(n.children,l)}}(e,l);break;case"parent":!function(e,l){W.value=[];for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n.disabled&&!n.tempTitle&&(l&&!W.value.includes(n.key)&&W.value.push(n.key),!l)){const e=W.value.findIndex((e=>e===n.key));W.value.splice(e,1)}}}(e,l)}}function pe(e){ve(z.value,e)}function fe(e){var l;for(let t=0,n=e.length;t<n;t++){const n=e[t],a=J.value.map((e=>e.key));W.value.includes(n.key)&&!a.includes(n.key)&&M.value.push({key:n.key,name:n.title,parentName:n.tempTitle,innerItemsNum:n.innerItemsNum,innerLeafs:n.innerLeafs}),(null==(l=n.children)?void 0:l.length)&&fe(n.children)}}function ye(e){W.value=e}function ke(){W.value=[]}function me(e){W.value=e}function ge(){U.value="",setTimeout((()=>{he()}))}return function e(l,t){var n,a,u,i;for(let r=0,c=l.length;r<c;r++){const c=l[r];let o=te.value.reduce(((e,l)=>e+(c[l]?`${c[l]},`:"")),"");switch(c.title_expand_strs=o.slice(0,-1),c.title=oe(c),c.label=oe(c),c.parentNode=t,c.key||(c.key=c[P.wordbookChild.user_id_obj]||c[P.wordbook.parent_id_obj]||Date.now()),(null==(n=c.children)?void 0:n.length)?(e(c.children,c),re(c)):0===(null==(a=c.children)?void 0:a.length)&&Reflect.deleteProperty(c,"children"),null!=(i=null==(u=null==P?void 0:P.treeSetting)?void 0:u.checkStrategy)?i:"child"){case"child":ae(c);break;case"parent":ue(c)}}}(V,null),z.value=V,P.defaultList.length>0&&(Y.value?(P.defaultList.forEach((e=>W.value.push(e.key))),M.value=O(P.defaultList),J.value=O(P.defaultList)):(P.defaultList.forEach((e=>W.value.push(e))),fe(V))),n((()=>W),(e=>{M.value=J.value.filter((l=>e.value.includes(l.key))),e.value.length&&fe(Y.value?z.value:V),H.value=X.every((e=>M.value.findIndex((l=>l.key===e))>-1));const l=M.value.filter((l=>e.value.includes(l.key)));B("check",e.value),B("checkWithLevel",l)}),{deep:!0}),n((()=>U.value),(e=>{e||ge()})),A({getCheckWithLevel:function(){const e=W.value,l=M.value.filter((l=>e.includes(l.key)));return null!=l?l:[]}}),(l,t)=>(a(),u(i(_),{cols:2,class:"c-select-person"},{default:r((()=>[c(i(b),null,{default:r((()=>[c(i(C),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:r((()=>[c(i(w),{style:{"margin-bottom":"12px"}},{default:r((()=>[o(" clearable "),c(i(x),{class:"search-input",value:U.value,"onUpdate:value":t[0]||(t[0]=e=>U.value=e),placeholder:e.searchPlaceholder,onKeyup:s(he,["enter"])},{suffix:r((()=>[U.value?(a(),u(i(L),{key:0,class:"search-clear",component:i(N),size:"16",onClick:ge},null,8,["component"])):o("v-if",!0)])),_:1},8,["value","placeholder","onKeyup"]),c(i(S),{type:"primary",onClick:he},{default:r((()=>[d(h(e.searchButtonText),1)])),_:1})])),_:1}),e.multiple&&!Q.value?v((a(),u(i(j),{key:0,checked:H.value,"onUpdate:checked":[t[1]||(t[1]=e=>H.value=e),pe]},{default:r((()=>[d(" 全选 ")])),_:1},8,["checked"])),[[p,i(X).length<1e3]]):o("v-if",!0),o(" 支持选人 "),e.searchInner&&e.multiple&&Q.value&&"parent"===i(Z)?(a(),u(D,{key:1,treeData:z.value,checkedKeys:W.value,onNotifyCheck:me},null,8,["treeData","checkedKeys"])):i(ee)&&e.multiple&&Q.value&&"parent"===i(Z)?(a(),f(y,{key:2},[o(" 同时兼容选人和选部门 "),c(E,{treeData:z.value,checkedKeys:W.value,searchFilter:i(le),onNotifyCheck:me,onNotifyClear:ge},null,8,["treeData","checkedKeys","searchFilter"])],2112)):(a(),u(i(T),k({key:3,"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":W.value,"expanded-keys":G.value,"onUpdate:expanded-keys":t[2]||(t[2]=e=>G.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":W.value,"onUpdate:selected-keys":t[3]||(t[3]=e=>W.value=e),data:z.value,"check-strategy":"child","render-label":ce},e.treeSetting,{"onUpdate:checkedKeys":ye,onLoad:ie}),null,16,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data"]))])),_:1})])),_:1}),c(i(b),null,{default:r((()=>[c(i(C),{vertical:"",style:{"padding-left":"12px"}},{default:r((()=>[c(i(C),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:r((()=>[e.showCount?(a(),f("span",K,"已选择:"+h(i(ne).length),1)):o("v-if",!0),e.showClear?(a(),f("span",{key:1,class:"c-select-person__clear-btn",onClick:ke},"清空")):o("v-if",!0)])),_:1}),m("div",q,[(a(!0),f(y,null,g(i(ne),(e=>(a(),f("span",{class:"c-select-person__tag-item",key:e.key},[d(h(e.name)+" "+h(e.parentName?`(${e.parentName})`:"")+" "+h(e.innerItemsNum?`(${e.innerItemsNum}人)`:"")+" ",1),c(i(L),{class:"tag-close",component:i(N),onClick:l=>function(e){W.value=W.value.filter((l=>l!==e.key))}(e)},null,8,["component","onClick"])])))),128))])])),_:1})])),_:1})])),_:1}))}});export{A as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type TreeOption } from 'naive-ui';
|
|
2
|
-
export declare function searchFilterTree(attr: string, data: TreeOption[], keyword: string): any[];
|
|
2
|
+
export declare function searchFilterTree(attr: string, data: TreeOption[], keyword: string, filterKey: string): any[];
|
|
3
3
|
export declare function getExpandedKeys(tree: TreeOption[]): (string | number)[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cloneDeep as n}from"lodash-es";import{SearchTypeConfig as i}from"../types/enums.js";function e(e,l,u){const
|
|
1
|
+
import{cloneDeep as n}from"lodash-es";import{SearchTypeConfig as i}from"../types/enums.js";function e(e,l,o,u){const s=n(l);if(o.trim()){let n=[];switch(e){case i.SEARCH_ORG_STAFF:n=function(n,i,e){return c(n,i,[],e)}(s,o,u);break;case i.SEARCH_ORG:n=function(n,i,e){return t(n,[]).filter((n=>(n[e]?n[e].split(","):[n.title]).some((n=>n.includes(i.trim())))))}(s,o,u);break;default:n=r(s,o,u)}return n}return r(s,o,u)}function r(n,i,e){return l(n,i,e),u(n)}function l(n,i,e){n.forEach((n=>{var r;const t=n[e]?n[e].split(","):[n.title];if(n.visible=t.some((n=>n.includes(i.trim()))),null==(r=n.children)?void 0:r.length)if(l(n.children,i,e),n.visible)o(n.children);else{n.children.some((n=>n.visible))&&(n.visible=!0)}}))}function t(n,i){return n.forEach((n=>{var e;(null==(e=n.children)?void 0:e.length)?t(n.children,i):i.push(n)})),i}function c(n,i,e,r){return n.forEach((n=>{var l;(n[r]?n[r].split(","):[n.title]).some((n=>n.includes(i.trim())))&&!n.disabled&&e.push(n),(null==(l=n.children)?void 0:l.length)&&c(n.children,i,e,r)})),e}function o(n){n.forEach((n=>{var i;n.visible=!0,(null==(i=n.children)?void 0:i.length)&&o(n.children)}))}function u(n){return n.filter((n=>{var i;return!!n.visible&&((null==(i=n.children)?void 0:i.length)&&(n.children=u(n.children)),!0)}))}function s(n){const i=[];return function n(e){for(let r=0,l=e.length;r<l;r++){const l=e[r];l.children&&(i.push(l.key),n(l.children))}}(n),i}export{s as getExpandedKeys,e as searchFilterTree};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{findAncestor as t}from"../../../../shared/utils/index.js";import{useEventListener as e,useDebounceFn as r}from"@vueuse/core";import{once as s,pick as a,omit as n,isFunction as u,isString as c}from"lodash-es";import{reactive as o,ref as i,unref as l,computed as h,getCurrentInstance as d,inject as p,onBeforeUnmount as g,onDeactivated as b,onActivated as v}from"vue";import{ShortcutStatus as f,InjectionShortcutManager as k}from"../constants/index.js";import{normalizeSignatureInfo as y,getKeySignature as C,getDisplaySignature as m,isInvalidSignature as S,isKeyboardEvent as w,isShortcutProvider as E,isInvalidKeyboardEvent as M}from"../utils/index.js";const K=Symbol("Glob"),j=new Map;class ${constructor(t,e=K){this.shortcutCallbackMap=o(new Map),this.shortcutCache=i({}),this.disabled=!1,this.environmentEle=t||window,j.set(e,this)}static log(t,e=!1){const r=`[ShortcutManager] ${t}`;return!e&&console.warn(r),r}get traverse(){return[...Object.values(this.shortcutCache.value)].sort(((t,e)=>(t.order||0)-(e.order||0)))}query(t){return this.shortcutCache.value[t]}async update(t,e){var r,s;const a=null==(r=this.query(t))?void 0:r.currentKeySignature;e&&u(this.shortcutCache,e);const n=this.query(t);function u(t,e){if(a!==C(e)){if(Object.values(t.value).some((t=>t.currentKeySignature===C(e))))throw`重复的快捷键=> ${m(e)}`;if(S(e))throw`非法的快捷键=>${e.key}`}}n&&(await(null==(s=n.onUpdate)?void 0:s.call(n,t,e?y(e):void 0)),u(this.shortcutCache,e),n.currentKeySignature=C(e),n.shortcutSignature=y(e),this.shortcutCallbackMap.set(n.currentKeySignature,this.shortcutCallbackMap.get(a)),this.shortcutCallbackMap.delete(a))}register(t){const e=this.query(t.key);return e?(e.status=f.ACTIVE,this.shortcutCallbackMap.set(e.currentKeySignature,t.callback),Object.assign(e,a(t,["debounce","debounceOption","label","order","key"])),r(e)):(this.shortcutCache.value[t.key]=n(t,["callback"]),this.shortcutCallbackMap.set(t.currentKeySignature,t.callback),r(this.shortcutCache.value[t.key]));function r(t){return{stop:()=>{t.status=f.INACTIVE},start:()=>{t.status=f.ACTIVE},signature:()=>t.currentKeySignature}}}start(){return this.handle?($.log(`请勿重复启动=>${this}`),this):(this.handle=async e=>{if(!w(e)||this.disabled)return;const r=t(e.target,E);if(r&&r!==l(this.environmentEle)||M(e))return;const s=C(e),a=this.shortcutCallbackMap.get(s);if(!a)return;e.preventDefault();const n=Object.values(this.shortcutCache.value).find((t=>t.currentKeySignature===s));n&&n.status===f.ACTIVE&&!n.disabled&&a()},e(this.environmentEle,"keyup",this.handle,{capture:!0}),this)}destroy(){var t;this.handle&&(null==(t=l(this.environmentEle))||t.removeEventListener("keyup",this.handle,{capture:!0})),this.handle=void 0,this.clear()}clear(){this.shortcutCallbackMap.clear(),this.shortcutCache.value={}}}const I=(new $).start(),O=s((()=>$.log("非setup语境下的shortcut将影响全局"))),A=s((()=>$.log("在非setup语境下使用register函数,组件销毁时可能需要手动调用stop函数使快捷键失活")));function T(t){const e=h((()=>{if(l(t)){const e=j.get(l(t));return e||$.log(`不存在的scope=>${t}, 将使用全局快捷键`),e||I}return d()?p(k,I):(O(),I)}));return{register:function(t){const{stop:s,signature:a,start:n}=l(e).register(function(t){return{...t,shortcutSignature:y(t.shortcutSignature),currentKeySignature:C(t.shortcutSignature),key:function(t){const e=t.key||t.label;if(!c(e))throw new Error($.log(`非法的key类型=>${e}`,!0));return e}(t),status:f.ACTIVE,callback:function(t){var e,s;if(!u(t.callback))throw new Error($.log(`非法的callback类型=>${t.callback}`,!0));return t.debounce?r(t.callback,null!=(s=null==(e=t.debounceOption)?void 0:e.duration)?s:300):t.callback}(t)}}(t));return d()?(g(s),b(s),v(n)):A(),{stop:s,signature:a}},traverse:function(){return l(e).traverse},clear:function(){l(e).clear()},update:function(t,r){return l(e).update(t,r)},updateManagerDisabled:function(t){l(e).disabled=!!t}}}export{K as GlobalShortcutProvider,$ as ShortcutManager,T as useShortcuts};
|
|
1
|
+
import{findAncestor as t}from"../../../../shared/utils/index.js";import{useEventListener as e,useDebounceFn as r}from"@vueuse/core";import{once as s,pick as a,omit as n,isFunction as u,isString as c}from"lodash-es";import{reactive as o,ref as i,unref as l,computed as h,getCurrentInstance as d,inject as p,onBeforeUnmount as g,onDeactivated as b,onActivated as v}from"vue";import{ShortcutStatus as f,InjectionShortcutManager as k}from"../constants/index.js";import{normalizeSignatureInfo as y,getKeySignature as C,getDisplaySignature as m,isInvalidSignature as S,isKeyboardEvent as w,isShortcutProvider as E,isInvalidKeyboardEvent as M}from"../utils/index.js";const K=Symbol("Glob"),j=new Map;class ${constructor(t,e=K){this.shortcutCallbackMap=o(new Map),this.shortcutCache=i({}),this.disabled=!1,this.environmentEle=t||window,j.set(e,this)}static log(t,e=!1){const r=`[ShortcutManager] ${t}`;return!e&&console.warn(r),r}get traverse(){return[...Object.values(this.shortcutCache.value)].sort(((t,e)=>(t.order||0)-(e.order||0)))}query(t){return this.shortcutCache.value[t]}async update(t,e){var r,s;const a=null==(r=this.query(t))?void 0:r.currentKeySignature;e&&u(this.shortcutCache,e);const n=this.query(t);function u(t,e){if(a!==C(e)){if(Object.values(t.value).some((t=>t.currentKeySignature===C(e))))throw`重复的快捷键=> ${m(e)}`;if(S(e))throw`非法的快捷键=>${e.key}`}}n&&(await(null==(s=n.onUpdate)?void 0:s.call(n,t,e?y(e):void 0)),u(this.shortcutCache,e),n.currentKeySignature=C(e),n.shortcutSignature=y(e),this.shortcutCallbackMap.set(n.currentKeySignature,this.shortcutCallbackMap.get(a)),this.shortcutCallbackMap.delete(a))}register(t){const e=this.query(t.key);return e?(e.status=f.ACTIVE,this.shortcutCallbackMap.set(e.currentKeySignature,t.callback),Object.assign(e,a(t,["debounce","debounceOption","label","order","key"])),r(e)):(this.shortcutCache.value[t.key]=n(t,["callback"]),this.shortcutCallbackMap.set(t.currentKeySignature,t.callback),r(this.shortcutCache.value[t.key]));function r(t){return{stop:()=>{t.status=f.INACTIVE},start:()=>{t.status=f.ACTIVE},signature:()=>t.currentKeySignature}}}start(){return this.handle?($.log(`请勿重复启动=>${this}`),this):(this.handle=async e=>{if(!w(e)||this.disabled)return;const r=t(e.target,E);if(r&&r!==l(this.environmentEle)||M(e))return;const s=C(e),a=this.shortcutCallbackMap.get(s);if(!a)return;e.preventDefault();const n=Object.values(this.shortcutCache.value).find((t=>t.currentKeySignature===s));n&&n.status===f.ACTIVE&&!n.disabled&&a(e)},e(this.environmentEle,"keyup",this.handle,{capture:!0}),this)}destroy(){var t;this.handle&&(null==(t=l(this.environmentEle))||t.removeEventListener("keyup",this.handle,{capture:!0})),this.handle=void 0,this.clear()}clear(){this.shortcutCallbackMap.clear(),this.shortcutCache.value={}}}const I=(new $).start(),O=s((()=>$.log("非setup语境下的shortcut将影响全局"))),A=s((()=>$.log("在非setup语境下使用register函数,组件销毁时可能需要手动调用stop函数使快捷键失活")));function T(t){const e=h((()=>{if(l(t)){const e=j.get(l(t));return e||$.log(`不存在的scope=>${t}, 将使用全局快捷键`),e||I}return d()?p(k,I):(O(),I)}));return{register:function(t){const{stop:s,signature:a,start:n}=l(e).register(function(t){return{...t,shortcutSignature:y(t.shortcutSignature),currentKeySignature:C(t.shortcutSignature),key:function(t){const e=t.key||t.label;if(!c(e))throw new Error($.log(`非法的key类型=>${e}`,!0));return e}(t),status:f.ACTIVE,callback:function(t){var e,s;if(!u(t.callback))throw new Error($.log(`非法的callback类型=>${t.callback}`,!0));return t.debounce?r(t.callback,null!=(s=null==(e=t.debounceOption)?void 0:e.duration)?s:300):t.callback}(t)}}(t));return d()?(g(s),b(s),v(n)):A(),{stop:s,signature:a}},traverse:function(){return l(e).traverse},clear:function(){l(e).clear()},update:function(t,r){return l(e).update(t,r)},updateManagerDisabled:function(t){l(e).disabled=!!t}}}export{K as GlobalShortcutProvider,$ as ShortcutManager,T as useShortcuts};
|
package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,computed as a,watch as l,openBlock as u,createElementBlock as
|
|
1
|
+
import{defineComponent as e,ref as t,computed as a,watch as l,openBlock as u,createElementBlock as r,unref as n,createBlock as o,createCommentVNode as i,normalizeClass as d,withCtx as p,createTextVNode as m,toDisplayString as v}from"vue";import{NButton as c}from"naive-ui";import s from"../../../../../date-picker/index.js";import f from"moment";import{isString as y}from"lodash-es";import{WidgetOptionEnums as g}from"../../../types/enums.js";import{dateDisabledCollect as b,setDateDisabled as h,setTimeDisabled as k}from"../helpers/dateDisabled.js";import C from"./DateQuickBtn/index.vue.js";const Y={class:"render-widget-date-range"};var D=e({__name:"DateInner",props:{componentCfg:{type:Object},type:{type:String,default:"date"},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},placeholder:{type:String,default:"请输入"},value:{type:String,default:""},unit:{type:String,default:""}},emits:["update:value","update:unit"],setup(e,{emit:D}){const M=e,S=t(),F=t(!1),j=a((()=>{let e="";switch(M.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e})),T=a((()=>{let e="";switch(M.type){case"date":e="选择日期";break;case"datetime":e="选择时间"}return e})),w=a((()=>M.unit)),_=a((()=>{var e;return null==(e=M.componentCfg)?void 0:e.widgetCfg.optionSetting})),x=a((()=>_.value!==g.SELECT_TIME)),B=a((()=>b.curTime));function E(){x.value&&(F.value=!F.value)}function V(e){D("update:value",e)}function H(e){D("update:unit",e)}function I(e){S.value=e;const t=e?f(e).format(j.value):e;D("update:value",t)}function O(e){return h(e,_.value)}function Q(e){return k(e,_.value)}return l((()=>M.value),(e=>{if(e&&y(e))return w.value||(F.value=!0),void(S.value=f(e).valueOf());S.value=null}),{immediate:!0}),x.value||(F.value=!0),(t,a)=>(u(),r("div",Y,[n(x)&&!F.value?(u(),o(C,{key:0,componentCfg:e.componentCfg,type:e.type,dateFormat:n(j),radioValue:n(w),onClickQuickBtn:V,onChangeRadioValue:H},null,8,["componentCfg","type","dateFormat","radioValue"])):i("v-if",!0),n(x)?(u(),o(n(c),{key:1,secondary:"",class:d(F.value?"select-date-right":"select-date-left"),onClick:E},{default:p((()=>[m(v(n(T)),1)])),_:1},8,["class"])):i("v-if",!0),!n(x)||F.value?(u(),o(n(s),{key:2,to:"body",type:e.type,clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.placeholder,value:S.value,defaultTime:n(B),"is-date-disabled":O,"is-time-disabled":Q,"onUpdate:value":I},null,8,["type","clearable","valueFormat","placeholder","value","defaultTime"])):i("v-if",!0)]))}});export{D as default};
|
package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as a,computed as t,watch as l,openBlock as u,createElementBlock as r,unref as n,createBlock as i,createCommentVNode as d,normalizeClass as o,withCtx as v,createTextVNode as c,toDisplayString as m,createVNode as s,createElementVNode as p}from"vue";import{NButton as f}from"naive-ui";import y from"../../../../../date-picker/index.js";import g from"moment";import{isString as b}from"lodash-es";import{WidgetOptionEnums as h}from"../../../types/enums.js";import{dateDisabledCollect as k,isStartDateRangeDisabled as C,isTimeStartRangeDisabled as F,isEndDateRangeDisabled as M,isTimeEndRangeDisabled as S}from"../helpers/dateDisabled.js";import T from"./DateQuickBtn/index.vue.js";const Y={class:"render-widget-date-range"},D={key:2,class:"date-detail-range"},E=p("span",{class:"divider"},null,-1);var _=e({__name:"DateRangeInner",props:{componentCfg:{type:Object},type:{type:String,default:"date"},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},value:{type:String,default:""},unit:{type:String,default:""}},emits:["update:value","update:unit"],setup(e,{emit:p}){const _=e,j=a(!1),w=a(),P=a(),I=t((()=>_.unit)),U=t((()=>{var e;return null==(e=_.componentCfg)?void 0:e.widgetCfg.optionSetting})),x=t((()=>U.value!==h.SELECT_TIME)),B=t((()=>U.value===h.PAST_TIME)),O=t((()=>U.value===h.FUTURE_TIME)),R=t((()=>{let e="";switch(_.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e})),V=t((()=>{let e="";switch(_.type){case"date":e="选择日期";break;case"datetime":e="选择时间"}return e})),H=t((()=>O.value?k.curTime:"00:00:00")),Q=t((()=>B.value?k.curTime:"23:59:59"));function $(e){p("update:value",e)}function A(e){p("update:unit",e)}function L(){x.value&&(j.value=!j.value)}function q(e,a){switch(a){case"start":w.value=e;break;case"end":P.value=e}const t=w.value?g(w.value).format(R.value):null,l=P.value?g(P.value).format(R.value):null;p("update:value",t||l?`${null!=t?t:""} ~ ${null!=l?l:""}`:"")}function z(e){return C(e,U.value,P.value)}function G(e){return F(e,U.value,P.value)}function J(e){return M(e,U.value,w.value)}function K(e){return S(e,U.value,w.value)}return l((()=>_.value),(e=>{if(e&&b(e)&&e.includes("~")){const[a,t]=e.split("~");return a.trim()&&(w.value=g(a.trim()).valueOf()),void(t.trim()&&(P.value=g(t.trim()).valueOf()))}w.value=P.value=null,p("update:unit","")}),{immediate:!0}),x.value||(j.value=!0),(a,t)=>(u(),r("div",Y,[n(x)&&!j.value?(u(),i(T,{key:0,componentCfg:e.componentCfg,type:e.type,dateFormat:n(R),radioValue:n(I),onClickQuickBtn:$,onChangeRadioValue:A},null,8,["componentCfg","type","dateFormat","radioValue"])):d("v-if",!0),n(x)?(u(),i(n(f),{key:1,secondary:"",class:o(j.value?"select-date-right":"select-date-left"),onClick:L},{default:v((()=>[c(m(n(V)),1)])),_:1},8,["class"])):d("v-if",!0),d(' default-time="23:59:59" '),!n(x)||j.value?(u(),r("div",D,[s(n(y),{type:e.type,to:"body","default-time":n(H),clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.startPlaceholder,value:w.value,"is-date-disabled":z,"is-time-disabled":G,"onUpdate:value":t[0]||(t[0]=e=>q(e,"start"))},null,8,["type","default-time","clearable","valueFormat","placeholder","value"]),E,s(n(y),{type:e.type,to:"body","default-time":n(Q),clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.endPlaceholder,value:P.value,"is-date-disabled":J,"is-time-disabled":K,"onUpdate:value":t[1]||(t[1]=e=>q(e,"end"))},null,8,["type","default-time","clearable","valueFormat","placeholder","value"])])):d("v-if",!0)]))}});export{_ as default};
|
|
1
|
+
import{defineComponent as e,ref as a,computed as t,watch as l,openBlock as u,createElementBlock as r,unref as n,createBlock as i,createCommentVNode as d,normalizeClass as o,withCtx as v,createTextVNode as c,toDisplayString as m,createVNode as s,createElementVNode as p}from"vue";import{NButton as f}from"naive-ui";import y from"../../../../../date-picker/index.js";import g from"moment";import{isString as b}from"lodash-es";import{WidgetOptionEnums as h}from"../../../types/enums.js";import{dateDisabledCollect as k,isStartDateRangeDisabled as C,isTimeStartRangeDisabled as F,isEndDateRangeDisabled as M,isTimeEndRangeDisabled as S}from"../helpers/dateDisabled.js";import T from"./DateQuickBtn/index.vue.js";const Y={class:"render-widget-date-range"},D={key:2,class:"date-detail-range"},E=p("span",{class:"divider"},null,-1);var _=e({__name:"DateRangeInner",props:{componentCfg:{type:Object},type:{type:String,default:"date"},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},value:{type:String,default:""},unit:{type:String,default:""}},emits:["update:value","update:unit"],setup(e,{emit:p}){const _=e,j=a(!1),w=a(),P=a(),I=t((()=>_.unit)),U=t((()=>{var e;return null==(e=_.componentCfg)?void 0:e.widgetCfg.optionSetting})),x=t((()=>U.value!==h.SELECT_TIME)),B=t((()=>U.value===h.PAST_TIME)),O=t((()=>U.value===h.FUTURE_TIME)),R=t((()=>{let e="";switch(_.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e})),V=t((()=>{let e="";switch(_.type){case"date":e="选择日期";break;case"datetime":e="选择时间"}return e})),H=t((()=>O.value?k.curTime:"00:00:00")),Q=t((()=>B.value?k.curTime:"23:59:59"));function $(e){p("update:value",e)}function A(e){p("update:unit",e)}function L(){x.value&&(j.value=!j.value)}function q(e,a){switch(a){case"start":w.value=e;break;case"end":P.value=e}const t=w.value?g(w.value).format(R.value):null,l=P.value?g(P.value).format(R.value):null;p("update:value",t||l?`${null!=t?t:""} ~ ${null!=l?l:""}`:"")}function z(e){return C(e,U.value,P.value)}function G(e){return F(e,U.value,P.value)}function J(e){return M(e,U.value,w.value)}function K(e){return S(e,U.value,w.value)}return l((()=>_.value),(e=>{if(e&&b(e)&&e.includes("~")){I.value||(j.value=!0);const[a,t]=e.split("~");return a.trim()&&(w.value=g(a.trim()).valueOf()),void(t.trim()&&(P.value=g(t.trim()).valueOf()))}w.value=P.value=null,p("update:unit","")}),{immediate:!0}),x.value||(j.value=!0),(a,t)=>(u(),r("div",Y,[n(x)&&!j.value?(u(),i(T,{key:0,componentCfg:e.componentCfg,type:e.type,dateFormat:n(R),radioValue:n(I),onClickQuickBtn:$,onChangeRadioValue:A},null,8,["componentCfg","type","dateFormat","radioValue"])):d("v-if",!0),n(x)?(u(),i(n(f),{key:1,secondary:"",class:o(j.value?"select-date-right":"select-date-left"),onClick:L},{default:v((()=>[c(m(n(V)),1)])),_:1},8,["class"])):d("v-if",!0),d(' default-time="23:59:59" '),!n(x)||j.value?(u(),r("div",D,[s(n(y),{type:e.type,to:"body","default-time":n(H),clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.startPlaceholder,value:w.value,"is-date-disabled":z,"is-time-disabled":G,"onUpdate:value":t[0]||(t[0]=e=>q(e,"start"))},null,8,["type","default-time","clearable","valueFormat","placeholder","value"]),E,s(n(y),{type:e.type,to:"body","default-time":n(Q),clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.endPlaceholder,value:P.value,"is-date-disabled":J,"is-time-disabled":K,"onUpdate:value":t[1]||(t[1]=e=>q(e,"end"))},null,8,["type","default-time","clearable","valueFormat","placeholder","value"])])):d("v-if",!0)]))}});export{_ as default};
|
package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts
CHANGED
|
@@ -34,11 +34,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
34
34
|
menuProps: {
|
|
35
35
|
class: string;
|
|
36
36
|
};
|
|
37
|
-
isMultiple: import("vue").ComputedRef<
|
|
37
|
+
isMultiple: import("vue").ComputedRef<any>;
|
|
38
38
|
dynamicOptionInfos: import("vue").ComputedRef<any>;
|
|
39
39
|
isShowWhole: import("vue").ComputedRef<any>;
|
|
40
40
|
isLastPage: import("vue").ComputedRef<boolean>;
|
|
41
|
-
valueCp: import("vue").ComputedRef<string | number |
|
|
41
|
+
valueCp: import("vue").ComputedRef<string | number | unknown[] | {
|
|
42
|
+
label: any;
|
|
43
|
+
value: any;
|
|
44
|
+
} | null>;
|
|
42
45
|
isForbidRequest: import("vue").ComputedRef<boolean>;
|
|
43
46
|
setOptionActive: (selectIds: string[]) => void;
|
|
44
47
|
handleUpdateSelect: (value: string[] | null) => void;
|
package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as a,ref as l,inject as t,computed as n,nextTick as u,openBlock as o,createBlock as i,unref as
|
|
1
|
+
import{defineComponent as e,useAttrs as a,ref as l,inject as t,computed as n,nextTick as u,openBlock as o,createBlock as i,unref as s,mergeProps as r,isRef as c,withCtx as v,createVNode as p,h as f}from"vue";import{useMessage as m,NSelect as d,NTag as y}from"naive-ui";import{useDebounceFn as g}from"@vueuse/core";import h from"../../../hooks/useAsyncData.js";import{judgmentVariable as w}from"../helpers/setDefaultValue.js";import{WholeSelectObj as O}from"../helpers/selectExtraMap.js";import{WidgetValEnums as S}from"../../../types/enums.js";import{InjectionFilterApiConfig as b,InjectionFilterSearchConfig as j}from"../../../constants/index.js";import C from"./SelectDynamicOption/index.vue.js";import{isEqual as N,cloneDeep as A}from"lodash-es";var L=e({__name:"SelectDynamic",props:{value:{type:[Array,String,Number]},componentCfg:{type:Object}},emits:["update:value"],setup(e,{emit:L}){const P=e,k=m(),{getDynamicSelectData:x}=h(),D=a(),J=l(!1),E=t(b),I=t(j),K=l(1),$=l(),T=l([JSON.parse(JSON.stringify(O))]),U=l([]),W=l(),M=l(0),_={class:"select-dynamic-popover"},F=n((()=>D.multiple)),H=n((()=>{const{widgetCfg:e}=P.componentCfg,{dynamicOptionInfo:a={}}=e;return a})),V=n((()=>{const{widgetCfg:e}=P.componentCfg,{showWholeOption:a=!1}=e;return a&&1===K.value})),q=n((()=>M.value>0&&K.value>=M.value)),z=n((()=>{var e;if(Array.isArray(P.value)&&P.value.length>0){const e=P.value;if(G(e),!F.value&&1==e.length){const a=T.value.find((a=>a.value===e[0]));return a?JSON.stringify(a):{label:e[0].includes("&")?e[0].split("&")[0]:e[0],value:e[0]}}const a=T.value.filter((a=>e.includes(a.value))),l=a.map((e=>e.value)),t=e.filter((e=>!l.includes(e))).map((e=>({label:e.includes("&")?e.split("&")[0]:e,value:e})));return[...a,...t]}return G([]),null!=(e=P.value)?e:null})),B=n((()=>{if(Object.keys(H.value).length>0){const{defaultParams:e=[]}=H.value;return w(e)&&!P.value}return!1}));function G(e){T.value.forEach((a=>{a.actived=!1,Array.isArray(e)&&e.includes(a.value)&&(a.actived=!0)}))}function Q(e){const{widgetCfg:a}=P.componentCfg,{linkageFieldKeys:l=[]}=a;N(P.value,e)||(l.forEach((e=>{const a=I.value.find((a=>a.columnName===e));a&&a.value&&(a.value=null)})),L("update:value",e))}async function R(e){K.value=e,await X(W.value,K.value)}async function X(e,a){try{if(Object.keys(H.value).length>0){const{autograph:l,dataSourceId:t,dataSourceType:n,filterKeys:u,defaultParams:o=[],showKeys:i,valueKey:s}=H.value;let r={wordbookId:t,autograph:l,wordbookType:n,fieldKeys:u,page:a};u.length>0&&(r[u[0]]=e),J.value=!0;if(w(o)){const e=o.map((e=>e.value)).filter((e=>e.includes("${")));e.map((e=>e.match(/\$\{(.+?)\}/)[1])).forEach((e=>{const a=I.value.find((a=>a.columnName===e));a&&a.value&&a.value!==S.WHOLE&&(r[e]=a.value)}))}let c=await x(r,E);if(c){const{fieldList:e=[],rows:a=[],total:l=0}=c.map,t=a.map((e=>({...e,label:e[i[0]],value:`${e[i[0]]}&${e[s]}`}))),n=A(t);V.value&&t.unshift(JSON.parse(JSON.stringify(O))),$.value=null!=e?e:[],T.value=null!=t?t:[],U.value=n,M.value=l}}}catch(e){k.error(`异步数据源下拉框数据请求失败:${e}`),console.log(e)}finally{J.value=!1}}const Y=g((async e=>{await async function(e){W.value=e.trim(),K.value=1,await X(W.value,K.value)}(e)}),300);async function Z(){Object.keys(H.value).length>0&&E&&await X("",K.value)}async function ee(){L("update:value",null),await Z()}function ae(e){e&&Z()}function le({option:e,handleClose:a}){if(F.value){const l=e.value;return f(y,{style:{padding:"0 8px"},closable:!0,onClose:e=>{if(e.stopPropagation(),a(),Array.isArray(P.value)&&P.value.length>0){const e=P.value,a=e.indexOf(l.value);if(a>-1){const l=e.splice(0,a);L("update:value",l.length>0?l:null)}}}},{default:()=>f("div",l.label)})}const l=e.value?JSON.parse(e.value):{label:""};return f("div",l.label)}return u((()=>{B.value||Z()})),(e,a)=>(o(),i(s(d),r(s(D),{value:s(z),"onUpdate:value":a[0]||(a[0]=e=>c(z)?z.value=e:null),remote:"",loading:J.value,"render-tag":le,"menu-props":_,onSearch:s(Y),onClear:ee,"onUpdate:show":ae}),{empty:v((()=>[p(C,r(s(D),{dynamicOptionInfo:s(H),fieldTitleList:$.value,optionList:T.value,isMultiple:s(F),curPage:K.value,isLastPage:s(q),isShowWhole:s(V),onUpdateSelect:Q,onUpdatePage:R}),null,16,["dynamicOptionInfo","fieldTitleList","optionList","isMultiple","curPage","isLastPage","isShowWhole"])])),_:1},16,["value","loading","onSearch"]))}});export{L as default};
|
|
@@ -1099,11 +1099,14 @@ declare const SelectDynamic: import("vue").DefineComponent<{
|
|
|
1099
1099
|
menuProps: {
|
|
1100
1100
|
class: string;
|
|
1101
1101
|
};
|
|
1102
|
-
isMultiple: import("vue").ComputedRef<
|
|
1102
|
+
isMultiple: import("vue").ComputedRef<any>;
|
|
1103
1103
|
dynamicOptionInfos: import("vue").ComputedRef<any>;
|
|
1104
1104
|
isShowWhole: import("vue").ComputedRef<any>;
|
|
1105
1105
|
isLastPage: import("vue").ComputedRef<boolean>;
|
|
1106
|
-
valueCp: import("vue").ComputedRef<string | number |
|
|
1106
|
+
valueCp: import("vue").ComputedRef<string | number | unknown[] | {
|
|
1107
|
+
label: any;
|
|
1108
|
+
value: any;
|
|
1109
|
+
} | null>;
|
|
1107
1110
|
isForbidRequest: import("vue").ComputedRef<boolean>;
|
|
1108
1111
|
setOptionActive: (selectIds: string[]) => void;
|
|
1109
1112
|
handleUpdateSelect: (value: string[] | null) => void;
|
|
@@ -107,11 +107,14 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
107
107
|
menuProps: {
|
|
108
108
|
class: string;
|
|
109
109
|
};
|
|
110
|
-
isMultiple: import("vue").ComputedRef<
|
|
110
|
+
isMultiple: import("vue").ComputedRef<any>;
|
|
111
111
|
dynamicOptionInfos: import("vue").ComputedRef<any>;
|
|
112
112
|
isShowWhole: import("vue").ComputedRef<any>;
|
|
113
113
|
isLastPage: import("vue").ComputedRef<boolean>;
|
|
114
|
-
valueCp: import("vue").ComputedRef<string | number |
|
|
114
|
+
valueCp: import("vue").ComputedRef<string | number | unknown[] | {
|
|
115
|
+
label: any;
|
|
116
|
+
value: any;
|
|
117
|
+
} | null>;
|
|
115
118
|
isForbidRequest: import("vue").ComputedRef<boolean>;
|
|
116
119
|
setOptionActive: (selectIds: string[]) => void;
|
|
117
120
|
handleUpdateSelect: (value: string[] | null) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WidgetOptionEnums as e,WidgetTypeEnums as i,WidgetValEnums as t}from"../types/enums.js";import{formatDateRangeInfo as n,presetValToTimestamp as l}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as o}from"../components/render-widget/enums.js";const a={[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(t,n){return t.map((t=>{var l,o,u;const{optionInfo:r={list:[],manualMapping:!0,dynamicOptionInfo:{},showWholeOption:!1},type:E,defaultValue:s,optionType:
|
|
1
|
+
import{WidgetOptionEnums as e,WidgetTypeEnums as i,WidgetValEnums as t}from"../types/enums.js";import{formatDateRangeInfo as n,presetValToTimestamp as l}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as o}from"../components/render-widget/enums.js";const a={[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(t,n){return t.map((t=>{var l,o,u;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?a[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!=(u=null==s?void 0:s.linkageFieldKeys)?u:[]};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 a={};return e&&e.length>0&&e.forEach((e=>{const u=e.field_key;a[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(a[u]=t,e.unit&&e.unit!==o.CUSTOM){let t="";r.type===i.DATE&&(t=r.rangeFilter?n(e.unit,"YYYY-MM-DD",r.optionType):l(e.unit,"YYYY-MM-DD")),r.type===i.DATE_TIME&&(t=r.rangeFilter?n(e.unit,"YYYY-MM-DD HH:mm:ss",r.optionType):l(e.unit,"YYYY-MM-DD HH:mm:ss")),a[u]=t}}})),a},transformParams:function(e){const n={},l=[i.SELECT,i.SELECTDYNAMIC];return e&&e.length>0&&e.forEach((e=>{const i=e.field_key,o=l.includes(e.widgetType)||e.value&&e.value.length>1?e.value.map((e=>e.includes("&")?e.split("&")[1]:e)):e.value.toString();Array.isArray(o)&&o.length>0&&o.includes(t.WHOLE)||(n[i]=o)})),n}}}export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",s="3.1.47-release.
|
|
1
|
+
var e="@cnhis-design-vue/shared",s="3.1.47-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.47-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};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.47-release.
|
|
3
|
+
"version": "3.1.47-release.3",
|
|
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": "
|
|
66
|
+
"gitHead": "4d15ed980f44c39af21f3231f6c6c50f8febed23"
|
|
67
67
|
}
|