cnhis-design-vue 3.1.41-beta.2 → 3.1.41-beta.4
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/form-config/index.d.ts +5 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +5 -0
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -0
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
- package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -1
- package/es/components/form-config/src/types/index.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/select.d.ts +3 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +4 -0
- package/es/components/index.css +1 -1
- package/es/components/info-header/src/InfoHeader.vue.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +1 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -0
- package/es/components/table-filter/index.d.ts +35 -2
- package/es/components/table-filter/src/classification/Classification-com.vue.d.ts +38 -2
- package/es/components/table-filter/src/classification/Classification-com.vue.js +1 -1
- package/es/components/table-filter/src/classification/search-class-name.vue.d.ts +19 -0
- package/es/components/table-filter/src/classification/search-class-name.vue.js +1 -1
- package/es/components/table-filter/src/classification/search-professional-model.vue.d.ts +38 -2
- package/es/components/table-filter/src/classification/search-professional-model.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
- package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/components/table-filter/style/index.css +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,ref as n,nextTick as i,onMounted as o,watch as a,onBeforeUnmount as l,onDeactivated as r,onActivated as s,openBlock as c,createElementBlock as d,normalizeClass as f,normalizeStyle as u,createElementVNode as p,createCommentVNode as h,renderSlot as v,Fragment as m,createVNode as y,unref as g,withCtx as _,mergeProps as I,toDisplayString as w,renderList as b,createBlock as k,resolveDynamicComponent as x,createTextVNode as S,h as $}from"vue";import{isString as z,isArray as H}from"lodash-es";import{NPopover as W,NImage as F,NTag as j,NEllipsis as C,NScrollbar as L,NDescriptions as P,NDescriptionsItem as M}from"naive-ui";import{useThrottleFn as A,useEventListener as q}from"@vueuse/core";import R from"../../../shared/components/SlotRender/SlotRender.js";import N from"./InfoEllipsis.vue.js";import B from"./HiddenContent.vue.js";import E from"../../../_virtual/plugin-vue_export-helper.js";const O={class:"c-info-header__operation"},U={key:0,class:"c-info-header__divider"},D={class:"c-info-header__patient"},G={class:"c-info-header__patientHeader"},J={key:0,class:"c-info-header__patientHeader--name"},K={key:1,class:"c-info-header__patientHeader--sex"},Q={key:2,class:"c-info-header__patientHeader--age"},T=p("section",{style:{height:"10px"}},null,-1),V=p("section",{style:{height:"12px"}},null,-1),X={class:"c-info-header__setting"},Y=["onClick"];var Z=E(e({__name:"InfoHeader",props:{compact:{type:Boolean,required:!0},separator:{type:String,default:":"},patientInfo:{type:Object,default:()=>({})},infoList:{type:Array,required:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},minColumnWidth:{type:[String,Number],default:180},rowHeight:{type:[String,Number],default:32},settingIcons:{type:Array,default:()=>["patientInfo","fieldSet","compact"]}},emits:["openPatientInfo","fieldSet","update:compact"],setup(e,{expose:E,emit:Z}){const ee=e;const te={patientInfo:{event:function(){Z("openPatientInfo")},render:()=>[$("i",{class:"iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaobianji"})]},fieldSet:{event:function(){Z("fieldSet")},render:()=>[$("i",{class:"iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaoshezhi"})]},compact:{event:async function(){Z("update:compact",!ee.compact),await i(),await ue()},render:()=>[$("i",{class:"iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia"})]}},ne=t((()=>ee.settingIcons.map((e=>(z(e)?te[e]:e)||{}))));function ie({type:e="warning"}){return{color:{warning:"#fcc200",info:"rgba(45, 122, 255, 0.1)"}[e],textColor:{warning:"#fff",info:"#2563F4"}[e]}}const oe=t((()=>ee.patientInfo&&H(ee.patientInfo.tagList)?ee.patientInfo.tagList.filter((e=>e.render||z(e.content)&&e.content)):[]));function ae({bold:e=!0,contentStyle:t={}}={}){return{fontWeight:e?700:500,...t}}function le(e,{bold:t=!0,contentStyle:n={}}={}){const i=fe.value[e]+"px";return{width:i,maxWidth:i,fontWeight:t?700:500,...n}}function re(e){return["电话","身份证"].some((t=>{var n,i;return null==(i=null==(n=e[ee.labelField])?void 0:n.includes)?void 0:i.call(n,t)}))}const se=n(),ce=n(3),de=n(0),fe=n([]),ue=A((async function(){await i();const e=se.value;if(!e)return;const{clientWidth:t}=e;ce.value=Math.floor(t/+ee.minColumnWidth),de.value=Math.floor(t/ce.value),await i();const n=e.querySelectorAll(".n-descriptions-table-content__label");n&&(fe.value=Array.from(n).map((e=>de.value-e.clientWidth-8)))}),200,!0,!1);let pe;function he(){clearInterval(pe)}function ve(){he(),pe=setInterval(ue,700)}return o(ue),a([()=>ee.minColumnWidth,()=>ee.infoList],ue,{flush:"post",deep:!0}),E({update:ue}),q(window,"resize",ue),l(he),r(he),s(ve),o(ve),(t,n)=>(c(),d("div",{class:f(["c-info-header",{"is-compact":e.compact}]),style:u({"--row-height":e.rowHeight,"--column-width":de.value})},[p("section",O,[h(" 操作区插槽 "),v(t.$slots,"operation")]),t.$slots.operation?(c(),d("div",U)):h("v-if",!0),p("section",D,[h(" 患者信息区插槽 "),v(t.$slots,"patientModule"),h(" 头像区插槽 "),v(t.$slots,"avatarModule",{},(()=>[t.$slots.avatarModule?h("v-if",!0):(c(),d(m,{key:0},[h(" 头像插槽 "),v(t.$slots,"avatar",{},(()=>[y(g(W),null,{trigger:_((()=>[y(g(F),I({style:{"border-radius":"50%"},width:40,height:40,"preview-disabled":"",src:e.patientInfo.avatar},e.patientInfo.avatarProps),null,16,["src"])])),default:_((()=>[y(g(F),I({width:200,"preview-disabled":"",src:e.patientInfo.avatarPreview||e.patientInfo.avatar},e.patientInfo.avatarPreviewProps),null,16,["src"])])),_:1})])),p("section",null,[p("header",G,[e.patientInfo.name?(c(),d("div",J,w(e.patientInfo.name),1)):h("v-if",!0),e.patientInfo.sex?(c(),d("div",K,"/ "+w(e.patientInfo.sex),1)):h("v-if",!0),e.patientInfo.age?(c(),d("div",Q," / "+w(e.patientInfo.age)+w(e.patientInfo.ageUnit||"岁"),1)):h("v-if",!0),h(" tag区插槽 "),v(t.$slots,"tags",{tagList:g(oe)},(()=>[(c(!0),d(m,null,b(e.patientInfo.tagList||[],(e=>(c(),k(g(j),I({key:e.content,size:"medium",bordered:!1,color:ie(e)},e),{default:_((()=>[e.render?(c(),k(x(e.render),{key:0})):(c(),k(g(C),{key:1,style:{"max-width":"96px"}},{default:_((()=>[S(w(e.content),1)])),_:2},1024))])),_:2},1040,["color"])))),128))]))]),h(" 头像信息区插槽 "),v(t.$slots,"avatarInfo")])],64))]))]),p("section",{class:"c-info-header__info",ref_key:"infoRef",ref:se},[y(g(L),{class:"c-info-header__infoWrapper",style:u({"--row-num":e.compact?1:2})},{default:_((()=>[h(" 描述信息区插槽 "),v(t.$slots,"info",{},(()=>[T,y(g(P),{"label-align":"right",style:{width:"100%"},"label-placement":"left",separator:":",column:ce.value},{default:_((()=>[(c(!0),d(m,null,b(e.infoList,((n,i)=>(c(),k(g(M),{key:n[e.labelField],label:n[e.labelField]},{default:_((()=>[n.slot?(c(),k(g(R),{key:0,renderer:n.slot,"root-slots":t.$slots,item:n,style:u(ae(n)),width:fe.value[i]},null,8,["renderer","root-slots","item","style","width"])):re(n)?(c(),k(B,{key:1,content:n[e.valueField],tip:n.tip,"content-style":ae(n),width:fe.value[i]},null,8,["content","tip","content-style","width"])):(c(),k(N,{key:2,"content-style":le(i,n),content:n[e.valueField],tip:n.tip},null,8,["content-style","content","tip"]))])),_:2},1032,["label"])))),128))])),_:1},8,["column"]),V]))])),_:3},8,["style"])],512),p("section",X,[h(" 设置区插槽 "),v(t.$slots,"setting"),t.$slots.setting?h("v-if",!0):(c(!0),d(m,{key:0},b(g(ne),(e=>(c(),d("div",{key:e,class:"c-info-header__settingIcon",onClick:e.event},[(c(),k(x(e.render)))],8,Y)))),128))])],6))}}),[["__file","InfoHeader.vue"]]);export{Z as default};
|
|
1
|
+
import{defineComponent as e,computed as t,ref as n,nextTick as i,onMounted as o,watch as a,onBeforeUnmount as l,onDeactivated as r,onActivated as s,openBlock as c,createElementBlock as d,normalizeClass as f,normalizeStyle as u,createElementVNode as p,createCommentVNode as h,renderSlot as v,Fragment as m,createVNode as y,unref as g,withCtx as _,mergeProps as I,toDisplayString as w,renderList as b,createBlock as k,resolveDynamicComponent as x,createTextVNode as S,h as $}from"vue";import{isString as z,isArray as H}from"lodash-es";import{NPopover as W,NImage as F,NTag as j,NEllipsis as C,NScrollbar as L,NDescriptions as P,NDescriptionsItem as M}from"naive-ui";import{useThrottleFn as A,useEventListener as q}from"@vueuse/core";import R from"../../../shared/components/SlotRender/SlotRender.js";import N from"./InfoEllipsis.vue.js";import B from"./HiddenContent.vue.js";import E from"../../../_virtual/plugin-vue_export-helper.js";const O={class:"c-info-header__operation"},U={key:0,class:"c-info-header__divider"},D={class:"c-info-header__patient"},G={class:"c-info-header__patientHeader"},J={key:0,class:"c-info-header__patientHeader--name"},K={key:1,class:"c-info-header__patientHeader--sex"},Q={key:2,class:"c-info-header__patientHeader--age"},T=p("section",{style:{height:"10px"}},null,-1),V=p("section",{style:{height:"12px"}},null,-1),X={class:"c-info-header__setting"},Y=["onClick"];var Z=E(e({__name:"InfoHeader",props:{compact:{type:Boolean,required:!0},separator:{type:String,default:":"},patientInfo:{type:Object,default:()=>({})},infoList:{type:Array,required:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},minColumnWidth:{type:[String,Number],default:180},rowHeight:{type:[String,Number],default:32},settingIcons:{type:Array,default:()=>["patientInfo","fieldSet","compact"]}},emits:["openPatientInfo","fieldSet","update:compact"],setup(e,{expose:E,emit:Z}){const ee=e;const te={patientInfo:{event:function(){Z("openPatientInfo")},render:()=>[$("i",{class:"iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaobianji"})]},fieldSet:{event:function(){Z("fieldSet")},render:()=>[$("i",{class:"iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaoshezhi"})]},compact:{event:async function(){Z("update:compact",!ee.compact),await i(),await ue()},render:()=>[$("i",{class:"iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia"})]}},ne=t((()=>ee.settingIcons.map((e=>(z(e)?te[e]:e)||{}))));function ie({type:e="warning"}){return{color:{warning:"#fcc200",info:"rgba(45, 122, 255, 0.1)"}[e],textColor:{warning:"#fff",info:"#2563F4"}[e]}}const oe=t((()=>ee.patientInfo&&H(ee.patientInfo.tagList)?ee.patientInfo.tagList.filter((e=>e.render||z(e.content)&&e.content)):[]));function ae({bold:e=!0,contentStyle:t={}}={}){return{fontWeight:e?700:500,...t}}function le(e,{bold:t=!0,contentStyle:n={}}={}){const i=fe.value[e]+"px";return{width:i,maxWidth:i,fontWeight:t?700:500,...n}}function re(e){return["电话","身份证"].some((t=>{var n,i;return null==(i=null==(n=e[ee.labelField])?void 0:n.includes)?void 0:i.call(n,t)}))}const se=n(),ce=n(3),de=n(0),fe=n([]),ue=A((async function(){await i();const e=se.value;if(!e)return;const{clientWidth:t}=e;ce.value=Math.floor(t/+ee.minColumnWidth),de.value=Math.floor(t/ce.value),await i();const n=e.querySelectorAll(".n-descriptions-table-content__label");n&&(fe.value=Array.from(n).map((e=>de.value-e.clientWidth-8)))}),200,!0,!1);let pe;function he(){clearInterval(pe)}function ve(){he(),pe=setInterval(ue,700)}return o(ue),a([()=>ee.minColumnWidth,()=>ee.infoList],ue,{flush:"post",deep:!0}),E({update:ue}),q(window,"resize",ue),l(he),r(he),s(ve),o(ve),(t,n)=>(c(),d("div",{class:f(["c-info-header",{"is-compact":e.compact}]),style:u({"--row-height":e.rowHeight,"--column-width":de.value})},[p("section",O,[h(" 操作区插槽 "),v(t.$slots,"operation")]),t.$slots.operation?(c(),d("div",U)):h("v-if",!0),p("section",D,[h(" 患者信息区插槽 "),v(t.$slots,"patientModule"),h(" 头像区插槽 "),v(t.$slots,"avatarModule",{},(()=>[t.$slots.avatarModule?h("v-if",!0):(c(),d(m,{key:0},[h(" 头像插槽 "),v(t.$slots,"avatar",{},(()=>[y(g(W),null,{trigger:_((()=>[y(g(F),I({style:{"border-radius":"50%"},width:40,height:40,"preview-disabled":"",src:e.patientInfo.avatar},e.patientInfo.avatarProps),null,16,["src"])])),default:_((()=>[y(g(F),I({width:200,"preview-disabled":"",src:e.patientInfo.avatarPreview||e.patientInfo.avatar},e.patientInfo.avatarPreviewProps),null,16,["src"])])),_:1})])),p("section",null,[p("header",G,[e.patientInfo.name?(c(),d("div",J,w(e.patientInfo.name),1)):h("v-if",!0),e.patientInfo.sex?(c(),d("div",K,"/ "+w(e.patientInfo.sex),1)):h("v-if",!0),null!=e.patientInfo.age?(c(),d("div",Q," / "+w(e.patientInfo.age)+w(e.patientInfo.ageUnit||"岁"),1)):h("v-if",!0),h(" tag区插槽 "),v(t.$slots,"tags",{tagList:g(oe)},(()=>[(c(!0),d(m,null,b(e.patientInfo.tagList||[],(e=>(c(),k(g(j),I({key:e.content,size:"medium",bordered:!1,color:ie(e)},e),{default:_((()=>[e.render?(c(),k(x(e.render),{key:0})):(c(),k(g(C),{key:1,style:{"max-width":"96px"}},{default:_((()=>[S(w(e.content),1)])),_:2},1024))])),_:2},1040,["color"])))),128))]))]),h(" 头像信息区插槽 "),v(t.$slots,"avatarInfo")])],64))]))]),p("section",{class:"c-info-header__info",ref_key:"infoRef",ref:se},[y(g(L),{class:"c-info-header__infoWrapper",style:u({"--row-num":e.compact?1:2})},{default:_((()=>[h(" 描述信息区插槽 "),v(t.$slots,"info",{},(()=>[T,y(g(P),{"label-align":"right",style:{width:"100%"},"label-placement":"left",separator:":",column:ce.value},{default:_((()=>[(c(!0),d(m,null,b(e.infoList,((n,i)=>(c(),k(g(M),{key:n[e.labelField],label:n[e.labelField]},{default:_((()=>[n.slot?(c(),k(g(R),{key:0,renderer:n.slot,"root-slots":t.$slots,item:n,style:u(ae(n)),width:fe.value[i]},null,8,["renderer","root-slots","item","style","width"])):re(n)?(c(),k(B,{key:1,content:n[e.valueField],tip:n.tip,"content-style":ae(n),width:fe.value[i]},null,8,["content","tip","content-style","width"])):(c(),k(N,{key:2,"content-style":le(i,n),content:n[e.valueField],tip:n.tip},null,8,["content-style","content","tip"]))])),_:2},1032,["label"])))),128))])),_:1},8,["column"]),V]))])),_:3},8,["style"])],512),p("section",X,[h(" 设置区插槽 "),v(t.$slots,"setting"),t.$slots.setting?h("v-if",!0):(c(!0),d(m,{key:0},b(g(ne),(e=>(c(),d("div",{key:e,class:"c-info-header__settingIcon",onClick:e.event},[(c(),k(x(e.render)))],8,Y)))),128))])],6))}}),[["__file","InfoHeader.vue"]]);export{Z as default};
|
|
@@ -139,6 +139,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
139
139
|
extendKey?: string | undefined;
|
|
140
140
|
is_not_fold?: string | undefined;
|
|
141
141
|
remark?: string | undefined;
|
|
142
|
+
free_entry?: import("..").FormCommonState | undefined;
|
|
142
143
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
143
144
|
content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
|
|
144
145
|
lazyRequest?: boolean | undefined;
|
|
@@ -141,6 +141,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
141
141
|
extendKey?: string | undefined;
|
|
142
142
|
is_not_fold?: string | undefined;
|
|
143
143
|
remark?: string | undefined;
|
|
144
|
+
free_entry?: import("../../../../es/components/form-render").FormCommonState | undefined;
|
|
144
145
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
145
146
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
146
147
|
lazyRequest?: boolean | undefined;
|
|
@@ -5861,8 +5861,13 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
5861
5861
|
type: import("vue").PropType<import("./src/types").ITreeDataType[]>;
|
|
5862
5862
|
default: () => never[];
|
|
5863
5863
|
};
|
|
5864
|
+
filterApiConfig: {
|
|
5865
|
+
type: ObjectConstructor;
|
|
5866
|
+
default: () => {};
|
|
5867
|
+
};
|
|
5864
5868
|
}, {
|
|
5865
5869
|
validConObj: (conObj: any, fieldList: import("./src/types").ISearchType[], fieldSearchLimit: any) => any;
|
|
5870
|
+
handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
|
|
5866
5871
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
5867
5872
|
tableDataType: {
|
|
5868
5873
|
type: StringConstructor;
|
|
@@ -5884,6 +5889,10 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
5884
5889
|
type: import("vue").PropType<import("./src/types").ITreeDataType[]>;
|
|
5885
5890
|
default: () => never[];
|
|
5886
5891
|
};
|
|
5892
|
+
filterApiConfig: {
|
|
5893
|
+
type: ObjectConstructor;
|
|
5894
|
+
default: () => {};
|
|
5895
|
+
};
|
|
5887
5896
|
}>> & {
|
|
5888
5897
|
onChangeSearch?: ((...args: any[]) => any) | undefined;
|
|
5889
5898
|
onChangeShowName?: ((...args: any[]) => any) | undefined;
|
|
@@ -5897,7 +5906,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
5897
5906
|
comWrap: any;
|
|
5898
5907
|
conditionApiRef: any;
|
|
5899
5908
|
conditionSqlRef: any;
|
|
5900
|
-
|
|
5909
|
+
searchClsName: any;
|
|
5901
5910
|
actionList_prop: import("vue").Ref<import("./src/types").IClassifyListType | undefined>;
|
|
5902
5911
|
conOjbConfig: import("vue").Ref<import("./src/types").IClassifyListType | undefined>;
|
|
5903
5912
|
showInnerModal: import("vue").Ref<boolean>;
|
|
@@ -5933,7 +5942,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
5933
5942
|
handleFiltrationCancel: () => void;
|
|
5934
5943
|
handleConditionFiltration: () => void;
|
|
5935
5944
|
onSearch: () => void;
|
|
5936
|
-
handleSaveAdd: (params: import("./src/types").ISaveType) => void
|
|
5945
|
+
handleSaveAdd: (params: import("./src/types").ISaveType) => Promise<void>;
|
|
5937
5946
|
NIcon: any;
|
|
5938
5947
|
NButton: any;
|
|
5939
5948
|
NInputGroup: import("vue").DefineComponent<{
|
|
@@ -7184,6 +7193,10 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7184
7193
|
type: ObjectConstructor;
|
|
7185
7194
|
default: () => {};
|
|
7186
7195
|
};
|
|
7196
|
+
conditionList: {
|
|
7197
|
+
type: ArrayConstructor;
|
|
7198
|
+
default: () => never[];
|
|
7199
|
+
};
|
|
7187
7200
|
}, {
|
|
7188
7201
|
attrs: any;
|
|
7189
7202
|
$message: import("naive-ui").MessageApi;
|
|
@@ -7200,6 +7213,10 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7200
7213
|
type: ObjectConstructor;
|
|
7201
7214
|
default: () => {};
|
|
7202
7215
|
};
|
|
7216
|
+
conditionList: {
|
|
7217
|
+
type: ArrayConstructor;
|
|
7218
|
+
default: () => never[];
|
|
7219
|
+
};
|
|
7203
7220
|
}>> & {}>>;
|
|
7204
7221
|
showAdd: import("vue").Ref<boolean>;
|
|
7205
7222
|
className: import("vue").Ref<string>;
|
|
@@ -7219,9 +7236,15 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7219
7236
|
handleParentNameSelect: (item: import("./src/types").IParentNamesType, index: number) => void;
|
|
7220
7237
|
handleParentNamesRemove: (index: number, item: import("./src/types").IParentNamesType) => void;
|
|
7221
7238
|
handleParent: (index: number, item: import("./src/types").IParentNamesType) => void;
|
|
7239
|
+
handleGetParams: () => {
|
|
7240
|
+
displayCategory: string;
|
|
7241
|
+
name: string;
|
|
7242
|
+
} | undefined;
|
|
7243
|
+
NIcon: any;
|
|
7222
7244
|
NButton: any;
|
|
7223
7245
|
NInput: any;
|
|
7224
7246
|
CloseOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
7247
|
+
AddOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
7225
7248
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7226
7249
|
showItemName: {
|
|
7227
7250
|
type: BooleanConstructor;
|
|
@@ -7235,10 +7258,15 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7235
7258
|
type: ObjectConstructor;
|
|
7236
7259
|
default: () => {};
|
|
7237
7260
|
};
|
|
7261
|
+
conditionList: {
|
|
7262
|
+
type: ArrayConstructor;
|
|
7263
|
+
default: () => never[];
|
|
7264
|
+
};
|
|
7238
7265
|
}>>, {
|
|
7239
7266
|
tableId: string;
|
|
7240
7267
|
actionList_prop: Record<string, any>;
|
|
7241
7268
|
showItemName: boolean;
|
|
7269
|
+
conditionList: unknown[];
|
|
7242
7270
|
}>;
|
|
7243
7271
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("changeSearch" | "changeShowName" | "handleItemClick" | "reloadClassification")[], "changeSearch" | "changeShowName" | "handleItemClick" | "reloadClassification", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7244
7272
|
tableDataType: {
|
|
@@ -7261,6 +7289,10 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7261
7289
|
type: import("vue").PropType<import("./src/types").ITreeDataType[]>;
|
|
7262
7290
|
default: () => never[];
|
|
7263
7291
|
};
|
|
7292
|
+
filterApiConfig: {
|
|
7293
|
+
type: ObjectConstructor;
|
|
7294
|
+
default: () => {};
|
|
7295
|
+
};
|
|
7264
7296
|
}>> & {
|
|
7265
7297
|
onChangeSearch?: ((...args: any[]) => any) | undefined;
|
|
7266
7298
|
onChangeShowName?: ((...args: any[]) => any) | undefined;
|
|
@@ -7269,6 +7301,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7269
7301
|
}, {
|
|
7270
7302
|
searchFieldList: import("./src/types").ISearchType[];
|
|
7271
7303
|
searchFieldLimit: Record<string, any>;
|
|
7304
|
+
filterApiConfig: Record<string, any>;
|
|
7272
7305
|
originConditionList: import("./src/types").IClassifyListType[];
|
|
7273
7306
|
tableDataType: string;
|
|
7274
7307
|
treeData: import("./src/types").ITreeDataType[];
|
|
@@ -340,8 +340,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
340
340
|
type: PropType<ITreeDataType[]>;
|
|
341
341
|
default: () => never[];
|
|
342
342
|
};
|
|
343
|
+
filterApiConfig: {
|
|
344
|
+
type: ObjectConstructor;
|
|
345
|
+
default: () => {};
|
|
346
|
+
};
|
|
343
347
|
}, {
|
|
344
348
|
validConObj: (conObj: any, fieldList: ISearchType[], fieldSearchLimit: any) => any;
|
|
349
|
+
handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
|
|
345
350
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
346
351
|
tableDataType: {
|
|
347
352
|
type: StringConstructor;
|
|
@@ -363,6 +368,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
363
368
|
type: PropType<ITreeDataType[]>;
|
|
364
369
|
default: () => never[];
|
|
365
370
|
};
|
|
371
|
+
filterApiConfig: {
|
|
372
|
+
type: ObjectConstructor;
|
|
373
|
+
default: () => {};
|
|
374
|
+
};
|
|
366
375
|
}>> & {
|
|
367
376
|
onChangeSearch?: ((...args: any[]) => any) | undefined;
|
|
368
377
|
onChangeShowName?: ((...args: any[]) => any) | undefined;
|
|
@@ -376,7 +385,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
376
385
|
comWrap: any;
|
|
377
386
|
conditionApiRef: any;
|
|
378
387
|
conditionSqlRef: any;
|
|
379
|
-
|
|
388
|
+
searchClsName: any;
|
|
380
389
|
actionList_prop: import("vue").Ref<IClassifyListType | undefined>;
|
|
381
390
|
conOjbConfig: import("vue").Ref<IClassifyListType | undefined>;
|
|
382
391
|
showInnerModal: import("vue").Ref<boolean>;
|
|
@@ -403,6 +412,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
403
412
|
handleRequestSearch: (config: import("../../../../../es/components/table-filter/src/types").ISaveType) => void;
|
|
404
413
|
handleChecked: (item: IClassifyListType) => void;
|
|
405
414
|
handleListItemEdit: (item: IClassifyListType) => void;
|
|
415
|
+
/**
|
|
416
|
+
* 处理检索分类的统计
|
|
417
|
+
*/
|
|
406
418
|
handleListItemCopy: (item: IClassifyListType) => void;
|
|
407
419
|
transformData: (oldData: Record<string, any>) => string;
|
|
408
420
|
handleListItemDel: (checkedItem: IClassifyListType, j: number) => void;
|
|
@@ -412,7 +424,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
412
424
|
handleFiltrationCancel: () => void;
|
|
413
425
|
handleConditionFiltration: () => void;
|
|
414
426
|
onSearch: () => void;
|
|
415
|
-
handleSaveAdd: (params: import("../../../../../es/components/table-filter/src/types").ISaveType) => void
|
|
427
|
+
handleSaveAdd: (params: import("../../../../../es/components/table-filter/src/types").ISaveType) => Promise<void>;
|
|
416
428
|
NIcon: any;
|
|
417
429
|
NButton: any;
|
|
418
430
|
NInputGroup: import("vue").DefineComponent<{
|
|
@@ -1663,6 +1675,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1663
1675
|
type: ObjectConstructor;
|
|
1664
1676
|
default: () => {};
|
|
1665
1677
|
};
|
|
1678
|
+
conditionList: {
|
|
1679
|
+
type: ArrayConstructor;
|
|
1680
|
+
default: () => never[];
|
|
1681
|
+
};
|
|
1666
1682
|
}, {
|
|
1667
1683
|
attrs: any;
|
|
1668
1684
|
$message: import("naive-ui").MessageApi;
|
|
@@ -1679,6 +1695,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1679
1695
|
type: ObjectConstructor;
|
|
1680
1696
|
default: () => {};
|
|
1681
1697
|
};
|
|
1698
|
+
conditionList: {
|
|
1699
|
+
type: ArrayConstructor;
|
|
1700
|
+
default: () => never[];
|
|
1701
|
+
};
|
|
1682
1702
|
}>> & {}>>;
|
|
1683
1703
|
showAdd: import("vue").Ref<boolean>;
|
|
1684
1704
|
className: import("vue").Ref<string>;
|
|
@@ -1698,9 +1718,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1698
1718
|
handleParentNameSelect: (item: import("../../../../../es/components/table-filter/src/types").IParentNamesType, index: number) => void;
|
|
1699
1719
|
handleParentNamesRemove: (index: number, item: import("../../../../../es/components/table-filter/src/types").IParentNamesType) => void;
|
|
1700
1720
|
handleParent: (index: number, item: import("../../../../../es/components/table-filter/src/types").IParentNamesType) => void;
|
|
1721
|
+
handleGetParams: () => {
|
|
1722
|
+
displayCategory: string;
|
|
1723
|
+
name: string;
|
|
1724
|
+
} | undefined;
|
|
1725
|
+
NIcon: any;
|
|
1701
1726
|
NButton: any;
|
|
1702
1727
|
NInput: any;
|
|
1703
1728
|
CloseOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
1729
|
+
AddOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
1704
1730
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1705
1731
|
showItemName: {
|
|
1706
1732
|
type: BooleanConstructor;
|
|
@@ -1714,10 +1740,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1714
1740
|
type: ObjectConstructor;
|
|
1715
1741
|
default: () => {};
|
|
1716
1742
|
};
|
|
1743
|
+
conditionList: {
|
|
1744
|
+
type: ArrayConstructor;
|
|
1745
|
+
default: () => never[];
|
|
1746
|
+
};
|
|
1717
1747
|
}>>, {
|
|
1718
1748
|
tableId: string;
|
|
1719
1749
|
actionList_prop: Record<string, any>;
|
|
1720
1750
|
showItemName: boolean;
|
|
1751
|
+
conditionList: unknown[];
|
|
1721
1752
|
}>;
|
|
1722
1753
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("changeSearch" | "changeShowName" | "handleItemClick" | "reloadClassification")[], "changeSearch" | "changeShowName" | "handleItemClick" | "reloadClassification", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1723
1754
|
tableDataType: {
|
|
@@ -1740,6 +1771,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1740
1771
|
type: PropType<ITreeDataType[]>;
|
|
1741
1772
|
default: () => never[];
|
|
1742
1773
|
};
|
|
1774
|
+
filterApiConfig: {
|
|
1775
|
+
type: ObjectConstructor;
|
|
1776
|
+
default: () => {};
|
|
1777
|
+
};
|
|
1743
1778
|
}>> & {
|
|
1744
1779
|
onChangeSearch?: ((...args: any[]) => any) | undefined;
|
|
1745
1780
|
onChangeShowName?: ((...args: any[]) => any) | undefined;
|
|
@@ -1748,6 +1783,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1748
1783
|
}, {
|
|
1749
1784
|
searchFieldList: ISearchType[];
|
|
1750
1785
|
searchFieldLimit: Record<string, any>;
|
|
1786
|
+
filterApiConfig: Record<string, any>;
|
|
1751
1787
|
originConditionList: IClassifyListType[];
|
|
1752
1788
|
tableDataType: string;
|
|
1753
1789
|
treeData: ITreeDataType[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as i,ref as e,useAttrs as n,provide as t,computed as l,onMounted as a,nextTick as o,onActivated as d,onBeforeMount as s,watch as c,openBlock as r,createElementBlock as h,normalizeClass as u,unref as p,normalizeStyle as g,withDirectives as f,createVNode as m,createTextVNode as y,toDisplayString as v,createCommentVNode as C,createElementVNode as k,Fragment as b,renderList as S,createBlock as x,withCtx as O,isRef as _,mergeProps as I,renderSlot as w}from"vue";import{NIcon as L,NTooltip as T,NSelect as j}from"naive-ui";import{Repeat as N,SettingsOutline as B,ChevronDown as P,ChevronForward as z,Checkmark as A,Close as M,ChevronUp as D}from"@vicons/ionicons5";import J from"./search-professional-model.vue.js";import E from"../components/search-modal/set-classification.vue.js";import F from"../directive/flexibleResize.js";import{root_isShowResetButton as R}from"../const/index.js";import{DataTypeEnums as $}from"../types/enums.js";import V from"../hooks/useMixins.js";import q from"../../../../shared/components/SvgIcon/SvgIcon.vue.js";import G from"../../../../_virtual/plugin-vue_export-helper.js";const K={key:0,class:"header"},W={class:"tree"},Q=["onClick"],U={key:0,class:"digital-span"},H=["onClick"],X={key:0,class:"digital-span"},Y=["onClick"],Z={class:"child-item-name"},ii={key:0,class:"digital-span"},ei={key:1,class:"tree-type-footer"},ni={class:"selected-num"},ti={key:0,class:"tile-type classify-1"},li={key:0,class:"header"},ai={class:"right-setting"},oi=["onClick"],di={key:0,class:"digital-span"},si={class:"parent ellips"},ci={class:"children"},ri=["onClick"],hi={key:0,class:"digital-span"},ui={key:1,class:"selected-list"},pi={class:"selected-num"},gi={key:0,class:"digital-span"},fi={key:0,class:"digital-span"},mi={key:0,class:"main-wrapper"},yi=["onClick"],vi={key:0,class:"digital-span"},Ci={class:"tree-footer"},ki=["onClick"],bi=["onClick"],Si={key:0,class:"digital-span"},xi={key:0,class:"select-type-footer"},Oi={class:"selected-num"},_i={key:0,class:"group-type classify-3"},Ii={key:0,class:"header"},wi={class:"right-setting"},Li=["onClick"],Ti={key:0,class:"digital-span"},ji={key:1,class:"selected-list"},Ni={class:"selected-num"},Bi={key:0,class:"digital-span"},Pi={key:0,class:"digital-span"},zi={key:0,class:"group-type classify-3 classify-4"},Ai={key:0,class:"header"},Mi={class:"right-setting"};var Di=G(i({__name:"Classification-com",props:{tableId:{type:String},conditionSid:{type:Array,default:()=>[]},localObj:{type:Object,default:()=>({})},curClassificationIndex:{type:Number},curClassificationWidth:{type:Number},curConditionList:{type:Array},tableName:{type:String},showRelatedTreeBtn:{type:Boolean},conditionType:{type:String},hideConditionChangeBtn:{type:Number},hideConditionChangeSetting:{type:Number},hideClearConditionChange:{type:Number},countCondition:{type:Number},countTabCondition:{type:Number,default:0},keyword:{type:String},isShowResetButton:{type:Boolean,default:!0},fieldKeys:{type:Array,default:()=>[]},tabConditionId:{type:String},conditionMap:{type:Object,default:()=>{}},filterApiConfig:{type:Object,default:()=>({})},searchFieldList:{type:Array,default:()=>[]}},emits:["changeSearch","setCurTreeData","setClassificationIndex","setTabConditionNumObj","getClassification","reloadList","getQuickSearchListObj","setConditionMap"],setup(i,{emit:G}){const Di=i,{handleGetConfigApi:Ji}=V(),Ei=e(null),Fi=e(null);let Ri=e(150),$i=e(!1),Vi=e([]),qi=e([]),Gi=e([]);e({});let Ki=e(2),Wi=e("");e(!1);let Qi=e({name:"全部数据",sid:"all_data"}),Ui=e([]),Hi=e([]),Xi=e(""),Yi=e(""),Zi=e(!1),ie=e("全部数据"),ee=e(!1);const ne=n();t(R,e(Di.isShowResetButton));let te=l((()=>0===Ki.value?{marginRight:"8px"}:2===Ki.value?{display:"inline-block"}:{})),le=l((()=>{let i=qi.value.filter((i=>-1!==Di.conditionSid.indexOf(i.sid)));if(-1!==Di.conditionSid.indexOf("all_data"))return"全部数据";{let e=[];return i.map((i=>{e.push(i.name)})),e.join(",")}})),ae=l((()=>function(i){let e=0===i.digital?"(0)":i.digital?`(${i.digital})`:"";const{name:n,isPublic:t}=i;return Ne(n,t)+e}));l((()=>{if(!Vi.value||!Vi.value.length)return;let i=Vi.value[0];return"all_data"===i.sid&&"digital"in i?i.digital||0:void 0}));let oe=l((()=>1===Di.countCondition||1===Di.countTabCondition)),de=l((()=>1!=Di.hideConditionChangeBtn||1!=Di.hideConditionChangeSetting)),se=l((()=>Gi.value.filter((i=>i.isShow)).length>0));function ce(i){let e=[{labelName:i.name+(1!=Di.countCondition||!i.digital&&0!==i.digital?"":" ("+(i.digital||0)+")"),itemValue:0}];if(i.children){const n=i.children.filter((i=>i.isShow)).map((i=>({...i,labelName:i.name+(1==Di.countCondition&&Te(i)?" ("+(i.digital||0)+")":""),itemValue:i.sid})));e.push(...n)}return e}function re(i){let e=Vi.value.slice(1);if(e[i].children){const n=e[i].children.findIndex((i=>i.selected));return-1!==n?e[i].children[n].sid:0}return 0}function he(i){i.open?i.open=!1:i.open=!0}function ue(i,e,n){if(ie.value=i.name,!i.digital&&1===Di.countCondition)return!1;let t=function(i,e,n){let t=JSON.parse(JSON.stringify(e));if("all_data"===i)t=["all_data"];else if("keyword"===Di.conditionType){let e=t.findIndex((i=>"all_data"===i));-1!==e&&t.splice(e,1);let l=t.findIndex((e=>e===i));-1!==l?(t.splice(l,1),0===t.length&&(t=["all_data"])):(n.children&&n.children.length>0&&(l=t.findIndex((i=>-1!==n.children.findIndex((e=>e.sid===i))))),-1!==l&&t.splice(l,1),t.push(i))}else t=-1!==t.indexOf(i)?["all_data"]:[i];return t}(i.sid,Di.conditionSid,n),l=function(i){let e=[];return Vi.value.forEach((n=>{n.children?n.children.forEach((n=>{-1!==i.indexOf(n.sid)?(n.selected=!0,e.push(n)):n.selected=!1})):-1!==i.indexOf(n.sid)?(n.selected=!0,e.push(n)):n.selected=!1})),e}(t);ye(!1),G("changeSearch","all_data"===i.sid?"all":"",i,n,l)}function pe(){G("setCurTreeData",Vi.value);let i="";if(4===Ki.value)i=0;else{let e=Ki.value;i=++e}Ri.value=150,ge(i)}async function ge(i,e){let n={tableId:Di.tableId,setting:JSON.stringify({classificationIndex:i,classificationWidth:e})};try{await Ji(n,"requestSaveListPersonaSetting",{},Di.filterApiConfig)&&G("setClassificationIndex",i)}catch(i){console.log(i)}}function fe(){Zi.value=!0,ye(!1)}function me(i){Zi.value=i}function ye(i){$i.value=void 0===i?!$i.value:i}function ve(i){var e;if((void 0!==i&&"delete"===i.type&&-1!==Di.conditionSid.indexOf(i.item.sid)&&G("changeSearch","all",{name:"全部数据",sid:"all_data"}),Di.tableId)&&Object.keys(Di.conditionMap).length>0){Vi.value=[];let{displayCategoryList:i=[],conditionList:n=[]}=Di.conditionMap;Gi.value=JSON.parse(JSON.stringify(n)),Hi.value=i||[],qi.value=JSON.parse(JSON.stringify(n));const t={name:"全部数据",sid:"all_data"};qi.value.unshift(t);let l=[];0===i.length&&(i=["未分类"]),i.forEach((i=>{let e={name:i,children:[]};n.forEach((n=>{(n.displayCategory===i||!n.displayCategory&&"未分类"===i&&"all_data"!==n.sid)&&(-1!==Di.conditionSid.indexOf(n.sid)&&(n.selected=!0,e.open=!0),n.isShow&&e.children.push(n))})),e.children.length>0&&l.push(e)})),l.unshift({name:"全部数据",sid:"all_data"}),Vi.value=l,0===Ki.value&&(e=!0,Vi.value.forEach((i=>{i.children&&i.children.length&&(i.open=e)})))}}async function Ce(i=!1,e="",n=[],t="",l){try{if(!Di.countCondition&&!Di.countTabCondition)return Qi.value.digital="",Promise.resolve();if(!Di.tableId)return Promise.resolve();let i={tableId:Di.tableId,countCondition:Di.countCondition};e&&(i.keyword=e),t&&(i.tabConditionId=t),l&&(i.countTabCondition=l),n.length>0&&(i.fieldKeys=JSON.stringify(n)),Object.assign(i,function(){var i;if(!Di.localObj&&0===Object.keys(Di.localObj).length)return{};let e={};Array.isArray(Di.localObj.params)&&Di.localObj.params.map((i=>{e[i.p_name]=i.p_value}));Object.keys((null==(i=Di.localObj)?void 0:i.extendParams)||{}).length&&(Object.assign(e,Di.localObj.extendParams),e.extraParams=JSON.stringify(Di.localObj.extendParams));return e}());let a=await Ji(i,"requestTableCondiTionDigital",{},Di.filterApiConfig);return function(i){1==Di.countTabCondition&&G("setTabConditionNumObj",i);if(!i||0===Object.keys(i).length)return;let e=[];!function(i,e){i.length&&i.forEach((i=>{var n;(null==(n=i.children)?void 0:n.length)?i.children.forEach((i=>{e.push(i)})):e.push(i)}))}(Vi.value,e);for(let n in i){let t="ALL"===n?"all_data":n,l=e.find((i=>i.sid==t));l&&("all_data"==l.sid&&1==Di.countCondition&&(Qi.value.digital=i[n]||0),l.digital=i[n]||0)}let n=-1!==Di.conditionSid.indexOf("all_data")?["ALL"]:Di.conditionSid,t=0;if("keyword"===Di.conditionType){let e=0;n.map((n=>e+=parseInt(i[n]))),t=e}else t=i[n[0]]}(a),Promise.resolve(a)}catch(i){console.log(i,"getTableCondiTionDigital")}}async function ke(i){try{await ve(i),1!==Di.countCondition&&1!==Di.countTabCondition||await Ce(!1,Di.keyword,Di.fieldKeys,Di.tabConditionId,Di.countTabCondition)}catch(i){console.log(i)}}function be({distance:i}){const e=Ri.value+i;Ri.value=Math.min(Math.max(e,50),650)}function Se(){ge(Ki.value,Ri.value)}async function xe(){await Le(Di.tableId),Ie()}async function Oe(i){await Le(Di.tableId),we(),G("getClassification",i)}function _e(i,e){Yi.value="all"==i?"全部数据":e.name,G("changeSearch",i,e)}function Ie(i){we(i).then((i=>{G("reloadList",i)}))}function we(i,e={}){if(!Di.tableId)return new Promise((i=>i(!1)));let n=Object.keys(e).length>0?e:Di.conditionMap;return new Promise(((e,t)=>{var l,a,o,d,s,c;if(Object.keys(n).length>0){Ui.value=n.conditionList||[],Hi.value=n.displayCategoryList||[];let t={conditionList:Ui.value,displayCategoryList:Hi.value};G("getQuickSearchListObj",t),Xi.value=n.settingId;const r=Ui.value.find((i=>i.isDefault))||{name:"全部数据",sid:"all_data"};Yi.value=r.name,(null==(a=null==(l=ne.tableOptions)?void 0:l.filterCondition)?void 0:a.displayCategory)&&i&&e({name:null==(d=null==(o=ne.tableOptions)?void 0:o.filterCondition)?void 0:d.name,sid:null==(c=null==(s=ne.tableOptions)?void 0:s.filterCondition)?void 0:c.displayCategory}),e(r)}else e({})}))}async function Le(i){try{if(!i)return new Promise((i=>i(!1)));let e={tableId:i},n=await Ji(e,"requestTableCondiTionList",{},Di.filterApiConfig);return G("setConditionMap",n),Promise.resolve(n)}catch(i){return Promise.resolve(!1)}}function Te(i){return 1===Di.countCondition&&(i.digital||0===i.digital)}function je(i){ie.value=i}function Ne(i,e){return i&&"1"===e?i.replace(/\(公共\)$/,""):i}return a((()=>{document.addEventListener("click",(i=>{o((()=>{let e=i.composedPath&&i.composedPath();Ei&&e.includes(Ei.value)||ye(!1)}))}))})),d((()=>{ke({})})),s((()=>{ke({})})),c((()=>Di.tableId),(i=>{i&&(Ie(!0),Wi.value!==i&&(Wi.value=i))}),{immediate:!0,deep:!0}),c((()=>Di.curClassificationIndex),(i=>{void 0!==i&&(Ki.value=i)}),{immediate:!0,deep:!0}),c((()=>Di.curClassificationWidth),(i=>{i&&(Ri.value=Number(i)||150)}),{immediate:!0}),c((()=>Di.curConditionList),(i=>{i&&i.length&&Vi.value!==i&&(Vi.value=JSON.parse(JSON.stringify(i)))}),{immediate:!0,deep:!0}),(e,n)=>(r(),h("div",{class:u(["classification-block","classificationIndex-"+p(Ki),p(ee)?"upack-up-wrap":""]),style:g(p(te))},[0===p(Ki)?f((r(),h("div",{key:0,class:"tree-type classify-0",style:g({width:p(Ri)+"px",paddingBottom:"keyword"===i.conditionType?"80px":0,position:"relative"})},[1!=i.hideConditionChangeBtn||1!=i.hideConditionChangeSetting?(r(),h("div",K,[1!=i.hideConditionChangeBtn?(r(),h("span",{key:0,class:"header-1",onClick:pe},[m(p(L),{component:p(N),size:"16"},null,8,["component"]),y(" "+v("切换"))])):C("v-if",!0),1!=i.hideConditionChangeSetting?(r(),h("span",{key:1,class:"header-1",onClick:fe},[m(p(L),{component:p(B),size:"16"},null,8,["component"]),y(" "+v("设置"))])):C("v-if",!0)])):C("v-if",!0),k("ul",W,[(r(!0),h(b,null,S(p(Vi),((e,n)=>(r(),h(b,null,[0===n||!e.children||0===e.children.length||e.children&&0!==e.children.filter((i=>i.isShow)).length?(r(),h("li",{key:n,class:u(["tree-item",{"tree-header":0===n||!e.children||0===e.children.length}])},[0!==n&&e.children&&0!==e.children.length?(r(),h(b,{key:1},[k("span",{class:u(["parent",{open:e.open}]),onClick:i=>he(e)},[k("span",null,[y(v(e.name)+" ",1),Te(e)?(r(),h("span",X," ("+v(e.digital||0)+") ",1)):C("v-if",!0)]),m(p(L),{component:e.open?p(P):p(z)},null,8,["component"])],10,H),e.open?(r(!0),h(b,{key:0},S(e.children.filter((i=>i.isShow)),((i,n)=>(r(),h("div",{class:"children",key:n},[i.isShow?(r(),x(p(T),{key:0,trigger:"hover",placement:"right"},{trigger:O((()=>[k("span",{class:u(["child-item",{selected:i.selected,disabled:!i.digital&&p(oe)}]),onClick:n=>ue(i,0,e)},[k("span",Z,v(i.name||Ne(i.isPublic)),1),Te(i)?(r(),h("span",ii," ("+v(i.digital||0)+") ",1)):C("v-if",!0),i.selected?(r(),x(p(L),{key:1,component:p(A),size:"20"},null,8,["component"])):C("v-if",!0)],10,Y)])),default:O((()=>[k("span",null,v(p(ae)(i)),1)])),_:2},1024)):C("v-if",!0)])))),128)):C("v-if",!0)],64)):(r(),h("span",{key:0,class:u(["child-item header-item",{selected:e.selected||-1!==i.conditionSid.indexOf("all_data")}]),onClick:i=>ue(e)},[y(v(e.name)+" ",1),Te(e)?(r(),h("span",U," ("+v(e.digital||0)+") ",1)):C("v-if",!0)],10,Q))],2)):C("v-if",!0)],64)))),256))]),"keyword"===i.conditionType&&1!=i.hideClearConditionChange?(r(),h("div",ei,[k("div",ni,"已选择"+v(i.conditionSid.filter((i=>"all_data"!==i)).length)+"项",1),k("div",{class:"selected-item-del",onClick:n[0]||(n[0]=i=>ue({sid:"all_data",name:"全部数据",digital:p(Qi).digital}))},[m(p(q),{"class-name":"svg-icon-btn","icon-class":"xitongtubiaoliebiaocaozuoanniushanchu"}),y(" 清空筛选 ")])])):C("v-if",!0)],4)),[[p(F),{mode:"VR",onMove:be,onEnd:Se}]]):C("v-if",!0),1===p(Ki)?(r(),h(b,{key:1},[1!=i.hideConditionChangeBtn||1!=i.hideConditionChangeSetting||1!=i.hideConditionChangeSetting||p(Gi).filter((i=>i.isShow)).length>0?(r(),h("div",ti,[1!=i.hideConditionChangeBtn||1!=i.hideConditionChangeSetting?(r(),h("div",li,[k("span",{class:u(["all-data",{selected:-1!==i.conditionSid.indexOf("all_data")}]),onClick:n[1]||(n[1]=i=>ue({sid:"all_data",name:"全部数据",digital:p(Qi).digital}))},[y(" 全部数据 "),p(Qi).digital||0===p(Qi).digital?(r(),h(b,{key:0},[y(" ("+v(p(Qi).digital||0)+") ",1)],64)):C("v-if",!0)],2),k("div",ai,[1!=i.hideConditionChangeBtn?(r(),h("span",{key:0,class:"setting-1",onClick:pe,style:{"margin-right":"30px"}},[m(p(L),{component:p(N),size:"16"},null,8,["component"]),y(" "+v("切换"))])):C("v-if",!0),1!=i.hideConditionChangeSetting?(r(),h("span",{key:1,class:"setting-1",onClick:fe},[m(p(L),{component:p(B),size:"16"},null,8,["component"]),y(" "+v("设置"))])):C("v-if",!0)])])):C("v-if",!0),k("ul",{class:"tile",style:g({borderBottom:"keyword"===i.conditionType&&1!=i.hideClearConditionChange?"1px solid #d5d5d5":0})},[(r(!0),h(b,null,S(p(Vi).slice(1),((i,e)=>(r(),h(b,null,[i.children&&i.children.length>0?(r(),h("li",{class:"tile-item",key:e},[i.children&&0!==i.children.length?(r(),h(b,{key:1},[k("span",si,v(i.name),1),k("div",ci,[(r(!0),h(b,null,S(i.children,((e,n)=>(r(),h(b,null,[e.isShow?(r(),h("span",{key:n,class:u(["child-item",{selected:e.selected,disabled:!e.digital&&p(oe)}]),onClick:n=>ue(e,0,i)},[y(v(e.name||Ne(e.isPublic))+" ",1),Te(e)?(r(),h("span",hi," ("+v(e.digital||0)+") ",1)):C("v-if",!0)],10,ri)):C("v-if",!0)],64)))),256))])],64)):(r(),h("span",{key:0,class:u(["child-item",{selected:i.selected}]),style:{"padding-left":"17px"},onClick:e=>ue(i)},[y(v(i.name)+" "+v(i.digital)+" ",1),Te(i)?(r(),h("span",di," ("+v(i.digital||0)+") ",1)):C("v-if",!0)],10,oi))])):C("v-if",!0)],64)))),256))],4),"keyword"===i.conditionType&&1!=i.hideClearConditionChange?(r(),h("div",ui,[k("div",pi,"已选择"+v(i.conditionSid.filter((i=>"all_data"!==i)).length)+"项",1),(r(!0),h(b,null,S(p(Vi).slice(1),((i,e)=>(r(),h(b,null,[i.children&&0!==i.children.length?(r(!0),h(b,{key:1},S(i.children,((e,n)=>(r(),h(b,null,[e.selected?(r(),h("div",{class:"selected-item",key:e.sid},[y(v(e.name)+" ",1),Te(e)?(r(),h("span",fi," ("+v(e.digital||0)+") ",1)):C("v-if",!0),m(p(L),{component:p(M),onClick:n=>ue(e,0,i)},null,8,["component","onClick"])])):C("v-if",!0)],64)))),256)):(r(),h("div",{class:"selected-item",key:i.sid},[y(v(i.name)+" ",1),Te(i)?(r(),h("span",gi," ("+v(i.digital||0)+") ",1)):C("v-if",!0),m(p(L),{component:p(M),onClick:e=>ue(i)},null,8,["component","onClick"])]))],64)))),256)),k("div",{class:"selected-item-del",onClick:n[2]||(n[2]=i=>ue({sid:"all_data",name:"全部数据",digital:p(Qi).digital}))},[m(p(q),{"class-name":"svg-icon-btn","icon-class":"xitongtubiaoliebiaocaozuoanniushanchu"}),y(" 清空筛选 ")])])):C("v-if",!0)])):C("v-if",!0)],64)):C("v-if",!0),2===p(Ki)?(r(),h("div",{key:2,class:"select-type classify-2",ref_key:"selectType",ref:Ei},[k("span",{class:"title",onClick:n[3]||(n[3]=()=>ye())},[m(p(T),{trigger:"hover",placement:"top"},{trigger:O((()=>[k("span",null,v(p(le)),1)])),default:O((()=>[k("span",null,v(p(le)),1)])),_:1}),m(p(L),{component:p($i)?p(D):p(P)},null,8,["component"])]),p($i)?(r(),h("div",mi,[k("ul",{class:"tree",style:g({padding:"keyword"===i.conditionType?"40px 0":"40px 0 0"})},[(r(!0),h(b,null,S(p(Vi),((e,n)=>(r(),h(b,null,[0===n||!e.children||0===e.children.length||e.children&&0!==e.children.filter((i=>i.isShow)).length?(r(),h("li",{key:n,class:u(["tree-item",{"tree-header":0===n||!e.children||0===e.children.length}])},[0!==n&&e.children&&0!==e.children.length?(r(),h(b,{key:1},[0!==e.children.filter((i=>i.isShow)).length?(r(),h("span",{key:0,class:u(["parent",{open:e.open}]),onClick:i=>he(e)},[y(v(e.name)+v(e.digital||0===e.digital?"("+e.digital+")":"")+" ",1),m(p(L),{component:e.open?p(P):p(z)},null,8,["component"])],10,ki)):C("v-if",!0),e.open?(r(!0),h(b,{key:1},S(e.children.filter((i=>i.isShow)),((i,n)=>(r(),h("div",{class:"children",key:n},[i.isShow?(r(),x(p(T),{key:0,placement:"right",trigger:"hover"},{trigger:O((()=>[k("span",{class:u(["child-item",{selected:i.selected,disabled:!i.digital&&p(oe)}]),onClick:n=>ue(i,0,e)},[k("span",null,[y(v(i.name||Ne(null==i?void 0:i.isPublic))+" ",1),Te(i)?(r(),h("span",Si," ("+v(i.digital||0)+") ",1)):C("v-if",!0)]),i.selected?(r(),x(p(L),{key:0,component:p(A),size:"20"},null,8,["component"])):C("v-if",!0)],10,bi)])),default:O((()=>[k("span",null,v(p(ae)(i)),1)])),_:2},1024)):C("v-if",!0)])))),128)):C("v-if",!0)],64)):(r(),h(b,{key:0},[k("span",{class:u(["child-item child-header header-item",{selected:e.selected||-1!==i.conditionSid.indexOf("all_data")}]),onClick:i=>ue(e)},[y(v(e.name)+" ",1),Te(e)?(r(),h("span",vi," ("+v(e.digital||0)+") ",1)):C("v-if",!0)],10,yi),k("div",Ci,[1!=i.hideConditionChangeBtn?(r(),h("span",{key:0,onClick:pe},[m(p(L),{component:p(N),size:"16"},null,8,["component"]),y(" "+v("切换"))])):C("v-if",!0),1!=i.hideConditionChangeSetting?(r(),h("span",{key:1,onClick:fe},[m(p(L),{component:p(B),size:"16"},null,8,["component"]),y(" "+v("设置"))])):C("v-if",!0)])],64))],2)):C("v-if",!0)],64)))),256))],4),"keyword"===i.conditionType&&1!=i.hideClearConditionChange?(r(),h("div",xi,[k("div",Oi,"已选择"+v(i.conditionSid.filter((i=>"all_data"!==i)).length)+"项",1),k("div",{class:"selected-item-del",onClick:n[4]||(n[4]=i=>ue({sid:"all_data",name:"全部数据",digital:p(Qi).digital}))},[m(p(q),{"class-name":"svg-icon-btn","icon-class":"xitongtubiaoliebiaocaozuoanniushanchu"}),y(" 清空筛选 ")])])):C("v-if",!0)])):C("v-if",!0)],512)):C("v-if",!0),3===p(Ki)?(r(),h(b,{key:3},[1!=i.hideConditionChangeBtn||1!=i.hideConditionChangeSetting||1!=i.hideConditionChangeSetting||p(Gi).filter((i=>i.isShow)).length>0?(r(),h("div",_i,[1!=i.hideConditionChangeBtn||1!=i.hideConditionChangeSetting?(r(),h("div",Ii,[k("span",{class:u(["all-data",{selected:-1!==i.conditionSid.indexOf("all_data")}]),onClick:n[5]||(n[5]=i=>ue({sid:"all_data",name:"全部数据",digital:p(Qi).digital}))},[y(" 全部数据 "),p(Qi).digital||0===p(Qi).digital?(r(),h(b,{key:0},[y(" ("+v(p(Qi).digital||0)+") ",1)],64)):C("v-if",!0)],2),k("div",wi,[1!=i.hideConditionChangeBtn?(r(),h("span",{key:0,onClick:pe,style:{"margin-right":"30px"}},[m(p(L),{component:p(N),size:"20"},null,8,["component"]),y(" "+v("切换"))])):C("v-if",!0),1!=i.hideConditionChangeSetting?(r(),h("span",{key:1,onClick:fe},[m(p(L),{component:p(B),size:"20"},null,8,["component"]),y(" "+v("设置"))])):C("v-if",!0)])])):C("v-if",!0),k("div",{class:"group",style:g({borderBottom:"keyword"===i.conditionType&&1!=i.hideClearConditionChange?"1px solid #d5d5d5":0})},[(r(!0),h(b,null,S(p(Vi).slice(1),((e,n)=>(r(),h(b,null,[e.children&&0!==e.children.length?(r(),h(b,{key:1},[C(" 后面需要进一步放开测试 "),0!==e.children.filter((i=>i.isShow)).length?(r(),x(p(j),{key:0,class:"classificationSelect3",to:!1,placeholder:e.name+(1!=i.countCondition||!e.digital&&0!==e.digital?"":" ("+(e.digital||0)+")"),value:re(n),clearable:"",options:ce(e),"label-field":"labelName","value-field":"itemValue","onUpdate:value":(i,n)=>function(i,e,n,t){if(i)ue(e,n.children.findIndex((e=>e.sid==i)),n);else{let i=n.children.findIndex((i=>-1!==Di.conditionSid.indexOf(i.sid)));-1!==i&&ue(n.children[i],0,n)}}(i,n,e)},null,8,["placeholder","value","options","onUpdate:value"])):C("v-if",!0)],64)):(r(),h("span",{key:e.sid,class:u(["child-item",{selected:e.selected}]),style:{"padding-left":"17px"},onClick:i=>ue(e)},[y(v(e.name)+" "+v(e.digital)+" ",1),Te(e)?(r(),h("span",Ti," ("+v(e.digital||0)+") ",1)):C("v-if",!0)],10,Li))],64)))),256))],4),"keyword"===i.conditionType&&1!=i.hideClearConditionChange?(r(),h("div",ji,[k("div",Ni,"已选择"+v(i.conditionSid.filter((i=>"all_data"!==i)).length)+"项",1),(r(!0),h(b,null,S(p(Vi).slice(1),((i,e)=>(r(),h(b,null,[i.children&&0!==i.children.length?(r(!0),h(b,{key:1},S(i.children,((e,n)=>(r(),h(b,null,[e.selected?(r(),h("div",{class:"selected-item",key:e.sid},[y(v(e.name)+" ",1),Te(e)?(r(),h("span",Pi," ("+v(e.digital||0)+") ",1)):C("v-if",!0),m(p(L),{component:p(M),onClick:n=>ue(e,0,i)},null,8,["component","onClick"])])):C("v-if",!0)],64)))),256)):(r(),h("div",{class:"selected-item",key:i.sid},[y(v(i.name)+" ",1),Te(i)?(r(),h("span",Bi," ("+v(i.digital||0)+") ",1)):C("v-if",!0),m(p(L),{component:p(M),onClick:e=>ue(i)},null,8,["component","onClick"])]))],64)))),256)),k("div",{class:"selected-item-del",onClick:n[6]||(n[6]=i=>ue({sid:"all_data",name:"全部数据",digital:p(Qi).digital}))},[m(p(q),{"class-name":"svg-icon-btn","icon-class":"xitongtubiaoliebiaocaozuoanniushanchu"}),y(" 清空筛选 ")])])):C("v-if",!0)])):C("v-if",!0)],64)):C("v-if",!0),4===p(Ki)?(r(),h(b,{key:4},[p(de)||p(se)?(r(),h("div",zi,[p(de)?(r(),h("div",Ai,[C(" @click=\"handleItemClick({ sid: 'all_data', name: '全部数据', digital: allObj.digital })\" "),k("span",{class:u(["all-data",{selected:-1!==i.conditionSid.indexOf("all_data")}])},[y(v(p(ie))+" ",1),p(Qi).digital||0===p(Qi).digital?(r(),h(b,{key:0},[y(" ("+v(p(Qi).digital||0)+") ",1)],64)):C("v-if",!0)],2),k("div",Mi,[k("span",{style:{"margin-right":"30px"},class:"upack-up-btn",onClick:n[7]||(n[7]=i=>_(ee)?ee.value=!p(ee):ee=!p(ee))},[y(v(p(ee)?"展开":"收起")+" ",1),m(p(L),{component:p(ee)?p(P):p(D),style:{color:"#2d7aff"}},null,8,["component"])]),1!=i.hideConditionChangeBtn?(r(),h("span",{key:0,onClick:pe,style:{"margin-right":"30px"}},[m(p(L),{component:p(N),size:"20"},null,8,["component"]),C(' {{ $t("1.1.5.2") }} '),y(" 切换 ")])):C("v-if",!0),1!=i.hideConditionChangeSetting?(r(),h("span",{key:1,onClick:fe},[m(p(L),{component:p(B),size:"20"},null,8,["component"]),C(' {{ $t("1.1.5.3") }} '),y(" 设置 ")])):C("v-if",!0)])])):C("v-if",!0)])):C("v-if",!0),k("div",{class:"classify-4-container",style:g({height:p(ee)?0:"auto"})},[m(J,I({ref_key:"professional",ref:Fi},e.$attrs,{tableDataType:p($).API,originConditionList:p(Gi),displayCategoryList:p(Hi),treeData:p(Vi),tableId:i.tableId,searchFieldList:i.searchFieldList,onHandleItemClick:ue,onChangeShowName:je}),null,16,["tableDataType","originConditionList","displayCategoryList","treeData","tableId","searchFieldList"])],4)],64)):C("v-if",!0),C(" searchFieldList: props "),C(" saveGetTableCondiTionList 新增,删除 "),C(" CondiTionListInit 修改? "),m(E,{ref:"search",onChangeSearch:_e,onSaveGetTableCondiTionList:Oe,onCondiTionListInit:xe,onSetClassifyModal:me,searchFieldList:i.searchFieldList,conditionList:p(Ui),displayCategoryList:p(Hi),settingId:p(Xi),searchDefName:p(Yi),tableId:i.tableId,classifyModal:p(Zi),filterApiConfig:i.filterApiConfig},{searchCondition:O((({...i})=>[w(e.$slots,"searchCondition",{attrs:i})])),_:3},8,["searchFieldList","conditionList","displayCategoryList","settingId","searchDefName","tableId","classifyModal","filterApiConfig"])],6))}}),[["__file","Classification-com.vue"]]);export{Di as default};
|
|
1
|
+
import{defineComponent as i,ref as e,useAttrs as n,provide as t,computed as l,onMounted as a,nextTick as o,onActivated as d,onBeforeMount as s,watch as c,openBlock as r,createElementBlock as h,normalizeClass as u,unref as p,normalizeStyle as g,withDirectives as f,createVNode as m,createTextVNode as y,toDisplayString as C,createCommentVNode as v,createElementVNode as k,Fragment as b,renderList as S,createBlock as x,withCtx as O,isRef as _,mergeProps as I,renderSlot as w}from"vue";import{NIcon as L,NTooltip as T,NSelect as j}from"naive-ui";import{Repeat as N,SettingsOutline as A,ChevronDown as B,ChevronForward as P,Checkmark as z,Close as M,ChevronUp as D}from"@vicons/ionicons5";import J from"./search-professional-model.vue.js";import E from"../components/search-modal/set-classification.vue.js";import F from"../directive/flexibleResize.js";import{root_isShowResetButton as R}from"../const/index.js";import{DataTypeEnums as $}from"../types/enums.js";import V from"../hooks/useMixins.js";import q from"../../../../shared/components/SvgIcon/SvgIcon.vue.js";import G from"../../../../_virtual/plugin-vue_export-helper.js";const K={key:0,class:"header"},W={class:"tree"},Q=["onClick"],U={key:0,class:"digital-span"},H=["onClick"],X={key:0,class:"digital-span"},Y=["onClick"],Z={class:"child-item-name"},ii={key:0,class:"digital-span"},ei={key:1,class:"tree-type-footer"},ni={class:"selected-num"},ti={key:0,class:"tile-type classify-1"},li={key:0,class:"header"},ai={class:"right-setting"},oi=["onClick"],di={key:0,class:"digital-span"},si={class:"parent ellips"},ci={class:"children"},ri=["onClick"],hi={key:0,class:"digital-span"},ui={key:1,class:"selected-list"},pi={class:"selected-num"},gi={key:0,class:"digital-span"},fi={key:0,class:"digital-span"},mi={key:0,class:"main-wrapper"},yi=["onClick"],Ci={key:0,class:"digital-span"},vi={class:"tree-footer"},ki=["onClick"],bi=["onClick"],Si={key:0,class:"digital-span"},xi={key:0,class:"select-type-footer"},Oi={class:"selected-num"},_i={key:0,class:"group-type classify-3"},Ii={key:0,class:"header"},wi={class:"right-setting"},Li=["onClick"],Ti={key:0,class:"digital-span"},ji={key:1,class:"selected-list"},Ni={class:"selected-num"},Ai={key:0,class:"digital-span"},Bi={key:0,class:"digital-span"},Pi={key:0,class:"group-type classify-3 classify-4"},zi={key:0,class:"header"},Mi={class:"right-setting"};var Di=G(i({__name:"Classification-com",props:{tableId:{type:String},conditionSid:{type:Array,default:()=>[]},localObj:{type:Object,default:()=>({})},curClassificationIndex:{type:Number},curClassificationWidth:{type:Number},curConditionList:{type:Array},tableName:{type:String},showRelatedTreeBtn:{type:Boolean},conditionType:{type:String},hideConditionChangeBtn:{type:Number},hideConditionChangeSetting:{type:Number},hideClearConditionChange:{type:Number},countCondition:{type:Number},countTabCondition:{type:Number,default:0},keyword:{type:String},isShowResetButton:{type:Boolean,default:!0},fieldKeys:{type:Array,default:()=>[]},tabConditionId:{type:String},conditionMap:{type:Object,default:()=>{}},filterApiConfig:{type:Object,default:()=>({})},searchFieldList:{type:Array,default:()=>[]}},emits:["changeSearch","setCurTreeData","setClassificationIndex","setTabConditionNumObj","getClassification","reloadList","getQuickSearchListObj","setConditionMap"],setup(i,{emit:G}){const Di=i,{handleGetConfigApi:Ji}=V(),Ei=e(null),Fi=e(null);let Ri=e(150),$i=e(!1),Vi=e([]),qi=e([]),Gi=e([]);e({});let Ki=e(2),Wi=e("");e(!1);let Qi=e({name:"全部数据",sid:"all_data"}),Ui=e([]),Hi=e([]),Xi=e(""),Yi=e(""),Zi=e(!1),ie=e("全部数据"),ee=e(!1);const ne=n();t(R,e(Di.isShowResetButton));let te=l((()=>0===Ki.value?{marginRight:"8px"}:2===Ki.value?{display:"inline-block"}:{})),le=l((()=>{let i=qi.value.filter((i=>-1!==Di.conditionSid.indexOf(i.sid)));if(-1!==Di.conditionSid.indexOf("all_data"))return"全部数据";{let e=[];return i.map((i=>{e.push(i.name)})),e.join(",")}})),ae=l((()=>function(i){let e=0===i.digital?"(0)":i.digital?`(${i.digital})`:"";const{name:n,isPublic:t}=i;return Ne(n,t)+e}));l((()=>{if(!Vi.value||!Vi.value.length)return;let i=Vi.value[0];return"all_data"===i.sid&&"digital"in i?i.digital||0:void 0}));let oe=l((()=>1===Di.countCondition||1===Di.countTabCondition)),de=l((()=>1!=Di.hideConditionChangeBtn||1!=Di.hideConditionChangeSetting)),se=l((()=>Gi.value.filter((i=>i.isShow)).length>0));function ce(i){let e=[{labelName:i.name+(1!=Di.countCondition||!i.digital&&0!==i.digital?"":" ("+(i.digital||0)+")"),itemValue:0}];if(i.children){const n=i.children.filter((i=>i.isShow)).map((i=>({...i,labelName:i.name+(1==Di.countCondition&&Te(i)?" ("+(i.digital||0)+")":""),itemValue:i.sid})));e.push(...n)}return e}function re(i){let e=Vi.value.slice(1);if(e[i].children){const n=e[i].children.findIndex((i=>i.selected));return-1!==n?e[i].children[n].sid:0}return 0}function he(i){i.open?i.open=!1:i.open=!0}function ue(i,e,n){if(ie.value=i.name,!i.digital&&1===Di.countCondition)return!1;let t=function(i,e,n){let t=JSON.parse(JSON.stringify(e));if("all_data"===i)t=["all_data"];else if("keyword"===Di.conditionType){let e=t.findIndex((i=>"all_data"===i));-1!==e&&t.splice(e,1);let l=t.findIndex((e=>e===i));-1!==l?(t.splice(l,1),0===t.length&&(t=["all_data"])):(n.children&&n.children.length>0&&(l=t.findIndex((i=>-1!==n.children.findIndex((e=>e.sid===i))))),-1!==l&&t.splice(l,1),t.push(i))}else t=-1!==t.indexOf(i)?["all_data"]:[i];return t}(i.sid,Di.conditionSid,n),l=function(i){let e=[];return Vi.value.forEach((n=>{n.children?n.children.forEach((n=>{-1!==i.indexOf(n.sid)?(n.selected=!0,e.push(n)):n.selected=!1})):-1!==i.indexOf(n.sid)?(n.selected=!0,e.push(n)):n.selected=!1})),e}(t);ye(!1),G("changeSearch","all_data"===i.sid?"all":"",i,n,l)}function pe(){G("setCurTreeData",Vi.value);let i="";if(4===Ki.value)i=0;else{let e=Ki.value;i=++e}Ri.value=150,ge(i)}async function ge(i,e){let n={tableId:Di.tableId,setting:JSON.stringify({classificationIndex:i,classificationWidth:e})};try{await Ji(n,"requestSaveListPersonaSetting",{},Di.filterApiConfig)&&G("setClassificationIndex",i)}catch(i){console.log(i)}}function fe(){Zi.value=!0,ye(!1)}function me(i){Zi.value=i}function ye(i){$i.value=void 0===i?!$i.value:i}function Ce(i){var e;if((void 0!==i&&"delete"===i.type&&-1!==Di.conditionSid.indexOf(i.item.sid)&&G("changeSearch","all",{name:"全部数据",sid:"all_data"}),Di.tableId)&&Object.keys(Di.conditionMap).length>0){Vi.value=[];let{displayCategoryList:i=[],conditionList:n=[]}=Di.conditionMap;Gi.value=JSON.parse(JSON.stringify(n)),Hi.value=i||[],qi.value=JSON.parse(JSON.stringify(n));const t={name:"全部数据",sid:"all_data"};qi.value.unshift(t);let l=[];0===i.length&&(i=["未分类"]),i.forEach((i=>{let e={name:i,children:[]};n.forEach((n=>{(n.displayCategory===i||!n.displayCategory&&"未分类"===i&&"all_data"!==n.sid)&&(-1!==Di.conditionSid.indexOf(n.sid)&&(n.selected=!0,e.open=!0),n.isShow&&e.children.push(n))})),e.children.length>0&&l.push(e)})),l.unshift({name:"全部数据",sid:"all_data"}),Vi.value=l,0===Ki.value&&(e=!0,Vi.value.forEach((i=>{i.children&&i.children.length&&(i.open=e)})))}}async function ve(i=!1,e="",n=[],t="",l){try{if(!Di.countCondition&&!Di.countTabCondition)return Qi.value.digital="",Promise.resolve();if(!Di.tableId)return Promise.resolve();let i={tableId:Di.tableId,countCondition:Di.countCondition};e&&(i.keyword=e),t&&(i.tabConditionId=t),l&&(i.countTabCondition=l),n.length>0&&(i.fieldKeys=JSON.stringify(n)),Object.assign(i,function(){var i;if(!Di.localObj&&0===Object.keys(Di.localObj).length)return{};let e={};Array.isArray(Di.localObj.params)&&Di.localObj.params.map((i=>{e[i.p_name]=i.p_value}));Object.keys((null==(i=Di.localObj)?void 0:i.extendParams)||{}).length&&(Object.assign(e,Di.localObj.extendParams),e.extraParams=JSON.stringify(Di.localObj.extendParams));return e}());let a=await Ji(i,"requestTableCondiTionDigital",{},Di.filterApiConfig);return function(i){1==Di.countTabCondition&&G("setTabConditionNumObj",i);if(!i||0===Object.keys(i).length)return;let e=[];!function(i,e){i.length&&i.forEach((i=>{var n;(null==(n=i.children)?void 0:n.length)?i.children.forEach((i=>{e.push(i)})):e.push(i)}))}(Vi.value,e);for(let n in i){let t="ALL"===n?"all_data":n,l=e.find((i=>i.sid==t));l&&("all_data"==l.sid&&1==Di.countCondition&&(Qi.value.digital=i[n]||0),l.digital=i[n]||0)}let n=-1!==Di.conditionSid.indexOf("all_data")?["ALL"]:Di.conditionSid,t=0;if("keyword"===Di.conditionType){let e=0;n.map((n=>e+=parseInt(i[n]))),t=e}else t=i[n[0]]}(a),Promise.resolve(a)}catch(i){console.log(i,"getTableCondiTionDigital")}}async function ke(i){try{await Ce(i),1!==Di.countCondition&&1!==Di.countTabCondition||await ve(!1,Di.keyword,Di.fieldKeys,Di.tabConditionId,Di.countTabCondition)}catch(i){console.log(i)}}function be({distance:i}){const e=Ri.value+i;Ri.value=Math.min(Math.max(e,50),650)}function Se(){ge(Ki.value,Ri.value)}async function xe(){await Le(Di.tableId),Ie()}async function Oe(i){await Le(Di.tableId),we(),G("getClassification",i)}function _e(i,e){Yi.value="all"==i?"全部数据":e.name,G("changeSearch",i,e)}function Ie(i){we(i).then((i=>{G("reloadList",i)}))}function we(i,e={}){if(!Di.tableId)return new Promise((i=>i(!1)));let n=Object.keys(e).length>0?e:Di.conditionMap;return new Promise(((e,t)=>{var l,a,o,d,s,c;if(Object.keys(n).length>0){Ui.value=n.conditionList||[],Hi.value=n.displayCategoryList||[];let t={conditionList:Ui.value,displayCategoryList:Hi.value};G("getQuickSearchListObj",t),Xi.value=n.settingId;const r=Ui.value.find((i=>i.isDefault))||{name:"全部数据",sid:"all_data"};Yi.value=r.name,(null==(a=null==(l=ne.tableOptions)?void 0:l.filterCondition)?void 0:a.displayCategory)&&i&&e({name:null==(d=null==(o=ne.tableOptions)?void 0:o.filterCondition)?void 0:d.name,sid:null==(c=null==(s=ne.tableOptions)?void 0:s.filterCondition)?void 0:c.displayCategory}),e(r)}else e({})}))}async function Le(i){try{if(!i)return new Promise((i=>i(!1)));let e={tableId:i},n=await Ji(e,"requestTableCondiTionList",{},Di.filterApiConfig);return G("setConditionMap",n),Promise.resolve(n)}catch(i){return Promise.resolve(!1)}}function Te(i){return 1===Di.countCondition&&(i.digital||0===i.digital)}function je(i){ie.value=i}function Ne(i,e){return i&&"1"===e?i.replace(/\(公共\)$/,""):i}return a((()=>{document.addEventListener("click",(i=>{o((()=>{let e=i.composedPath&&i.composedPath();Ei&&e.includes(Ei.value)||ye(!1)}))}))})),d((()=>{ke({})})),s((()=>{ke({})})),c((()=>Di.tableId),(i=>{i&&(Ie(!0),Wi.value!==i&&(Wi.value=i))}),{immediate:!0,deep:!0}),c((()=>Di.curClassificationIndex),(i=>{void 0!==i&&(Ki.value=i)}),{immediate:!0,deep:!0}),c((()=>Di.curClassificationWidth),(i=>{i&&(Ri.value=Number(i)||150)}),{immediate:!0}),c((()=>Di.curConditionList),(i=>{i&&i.length&&Vi.value!==i&&(Vi.value=JSON.parse(JSON.stringify(i)))}),{immediate:!0,deep:!0}),(e,n)=>(r(),h("div",{class:u(["classification-block","classificationIndex-"+p(Ki),p(ee)?"upack-up-wrap":""]),style:g(p(te))},[0===p(Ki)?f((r(),h("div",{key:0,class:"tree-type classify-0",style:g({width:p(Ri)+"px",paddingBottom:"keyword"===i.conditionType?"80px":0,position:"relative"})},[1!=i.hideConditionChangeBtn||1!=i.hideConditionChangeSetting?(r(),h("div",K,[1!=i.hideConditionChangeBtn?(r(),h("span",{key:0,class:"header-1",onClick:pe},[m(p(L),{component:p(N),size:"16"},null,8,["component"]),y(" "+C("切换"))])):v("v-if",!0),1!=i.hideConditionChangeSetting?(r(),h("span",{key:1,class:"header-1",onClick:fe},[m(p(L),{component:p(A),size:"16"},null,8,["component"]),y(" "+C("设置"))])):v("v-if",!0)])):v("v-if",!0),k("ul",W,[(r(!0),h(b,null,S(p(Vi),((e,n)=>(r(),h(b,null,[0===n||!e.children||0===e.children.length||e.children&&0!==e.children.filter((i=>i.isShow)).length?(r(),h("li",{key:n,class:u(["tree-item",{"tree-header":0===n||!e.children||0===e.children.length}])},[0!==n&&e.children&&0!==e.children.length?(r(),h(b,{key:1},[k("span",{class:u(["parent",{open:e.open}]),onClick:i=>he(e)},[k("span",null,[y(C(e.name)+" ",1),Te(e)?(r(),h("span",X," ("+C(e.digital||0)+") ",1)):v("v-if",!0)]),m(p(L),{component:e.open?p(B):p(P)},null,8,["component"])],10,H),e.open?(r(!0),h(b,{key:0},S(e.children.filter((i=>i.isShow)),((i,n)=>(r(),h("div",{class:"children",key:n},[i.isShow?(r(),x(p(T),{key:0,trigger:"hover",placement:"right"},{trigger:O((()=>[k("span",{class:u(["child-item",{selected:i.selected,disabled:!i.digital&&p(oe)}]),onClick:n=>ue(i,0,e)},[k("span",Z,C(i.name||Ne(i.isPublic)),1),Te(i)?(r(),h("span",ii," ("+C(i.digital||0)+") ",1)):v("v-if",!0),i.selected?(r(),x(p(L),{key:1,component:p(z),size:"20"},null,8,["component"])):v("v-if",!0)],10,Y)])),default:O((()=>[k("span",null,C(p(ae)(i)),1)])),_:2},1024)):v("v-if",!0)])))),128)):v("v-if",!0)],64)):(r(),h("span",{key:0,class:u(["child-item header-item",{selected:e.selected||-1!==i.conditionSid.indexOf("all_data")}]),onClick:i=>ue(e)},[y(C(e.name)+" ",1),Te(e)?(r(),h("span",U," ("+C(e.digital||0)+") ",1)):v("v-if",!0)],10,Q))],2)):v("v-if",!0)],64)))),256))]),"keyword"===i.conditionType&&1!=i.hideClearConditionChange?(r(),h("div",ei,[k("div",ni,"已选择"+C(i.conditionSid.filter((i=>"all_data"!==i)).length)+"项",1),k("div",{class:"selected-item-del",onClick:n[0]||(n[0]=i=>ue({sid:"all_data",name:"全部数据",digital:p(Qi).digital}))},[m(p(q),{"class-name":"svg-icon-btn","icon-class":"xitongtubiaoliebiaocaozuoanniushanchu"}),y(" 清空筛选 ")])])):v("v-if",!0)],4)),[[p(F),{mode:"VR",onMove:be,onEnd:Se}]]):v("v-if",!0),1===p(Ki)?(r(),h(b,{key:1},[1!=i.hideConditionChangeBtn||1!=i.hideConditionChangeSetting||1!=i.hideConditionChangeSetting||p(Gi).filter((i=>i.isShow)).length>0?(r(),h("div",ti,[1!=i.hideConditionChangeBtn||1!=i.hideConditionChangeSetting?(r(),h("div",li,[k("span",{class:u(["all-data",{selected:-1!==i.conditionSid.indexOf("all_data")}]),onClick:n[1]||(n[1]=i=>ue({sid:"all_data",name:"全部数据",digital:p(Qi).digital}))},[y(" 全部数据 "),p(Qi).digital||0===p(Qi).digital?(r(),h(b,{key:0},[y(" ("+C(p(Qi).digital||0)+") ",1)],64)):v("v-if",!0)],2),k("div",ai,[1!=i.hideConditionChangeBtn?(r(),h("span",{key:0,class:"setting-1",onClick:pe,style:{"margin-right":"30px"}},[m(p(L),{component:p(N),size:"16"},null,8,["component"]),y(" "+C("切换"))])):v("v-if",!0),1!=i.hideConditionChangeSetting?(r(),h("span",{key:1,class:"setting-1",onClick:fe},[m(p(L),{component:p(A),size:"16"},null,8,["component"]),y(" "+C("设置"))])):v("v-if",!0)])])):v("v-if",!0),k("ul",{class:"tile",style:g({borderBottom:"keyword"===i.conditionType&&1!=i.hideClearConditionChange?"1px solid #d5d5d5":0})},[(r(!0),h(b,null,S(p(Vi).slice(1),((i,e)=>(r(),h(b,null,[i.children&&i.children.length>0?(r(),h("li",{class:"tile-item",key:e},[i.children&&0!==i.children.length?(r(),h(b,{key:1},[k("span",si,C(i.name),1),k("div",ci,[(r(!0),h(b,null,S(i.children,((e,n)=>(r(),h(b,null,[e.isShow?(r(),h("span",{key:n,class:u(["child-item",{selected:e.selected,disabled:!e.digital&&p(oe)}]),onClick:n=>ue(e,0,i)},[y(C(e.name||Ne(e.isPublic))+" ",1),Te(e)?(r(),h("span",hi," ("+C(e.digital||0)+") ",1)):v("v-if",!0)],10,ri)):v("v-if",!0)],64)))),256))])],64)):(r(),h("span",{key:0,class:u(["child-item",{selected:i.selected}]),style:{"padding-left":"17px"},onClick:e=>ue(i)},[y(C(i.name)+" "+C(i.digital)+" ",1),Te(i)?(r(),h("span",di," ("+C(i.digital||0)+") ",1)):v("v-if",!0)],10,oi))])):v("v-if",!0)],64)))),256))],4),"keyword"===i.conditionType&&1!=i.hideClearConditionChange?(r(),h("div",ui,[k("div",pi,"已选择"+C(i.conditionSid.filter((i=>"all_data"!==i)).length)+"项",1),(r(!0),h(b,null,S(p(Vi).slice(1),((i,e)=>(r(),h(b,null,[i.children&&0!==i.children.length?(r(!0),h(b,{key:1},S(i.children,((e,n)=>(r(),h(b,null,[e.selected?(r(),h("div",{class:"selected-item",key:e.sid},[y(C(e.name)+" ",1),Te(e)?(r(),h("span",fi," ("+C(e.digital||0)+") ",1)):v("v-if",!0),m(p(L),{component:p(M),onClick:n=>ue(e,0,i)},null,8,["component","onClick"])])):v("v-if",!0)],64)))),256)):(r(),h("div",{class:"selected-item",key:i.sid},[y(C(i.name)+" ",1),Te(i)?(r(),h("span",gi," ("+C(i.digital||0)+") ",1)):v("v-if",!0),m(p(L),{component:p(M),onClick:e=>ue(i)},null,8,["component","onClick"])]))],64)))),256)),k("div",{class:"selected-item-del",onClick:n[2]||(n[2]=i=>ue({sid:"all_data",name:"全部数据",digital:p(Qi).digital}))},[m(p(q),{"class-name":"svg-icon-btn","icon-class":"xitongtubiaoliebiaocaozuoanniushanchu"}),y(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],64)):v("v-if",!0),2===p(Ki)?(r(),h("div",{key:2,class:"select-type classify-2",ref_key:"selectType",ref:Ei},[k("span",{class:"title",onClick:n[3]||(n[3]=()=>ye())},[m(p(T),{trigger:"hover",placement:"top"},{trigger:O((()=>[k("span",null,C(p(le)),1)])),default:O((()=>[k("span",null,C(p(le)),1)])),_:1}),m(p(L),{component:p($i)?p(D):p(B)},null,8,["component"])]),p($i)?(r(),h("div",mi,[k("ul",{class:"tree",style:g({padding:"keyword"===i.conditionType?"40px 0":"40px 0 0"})},[(r(!0),h(b,null,S(p(Vi),((e,n)=>(r(),h(b,null,[0===n||!e.children||0===e.children.length||e.children&&0!==e.children.filter((i=>i.isShow)).length?(r(),h("li",{key:n,class:u(["tree-item",{"tree-header":0===n||!e.children||0===e.children.length}])},[0!==n&&e.children&&0!==e.children.length?(r(),h(b,{key:1},[0!==e.children.filter((i=>i.isShow)).length?(r(),h("span",{key:0,class:u(["parent",{open:e.open}]),onClick:i=>he(e)},[y(C(e.name)+C(e.digital||0===e.digital?"("+e.digital+")":"")+" ",1),m(p(L),{component:e.open?p(B):p(P)},null,8,["component"])],10,ki)):v("v-if",!0),e.open?(r(!0),h(b,{key:1},S(e.children.filter((i=>i.isShow)),((i,n)=>(r(),h("div",{class:"children",key:n},[i.isShow?(r(),x(p(T),{key:0,placement:"right",trigger:"hover"},{trigger:O((()=>[k("span",{class:u(["child-item",{selected:i.selected,disabled:!i.digital&&p(oe)}]),onClick:n=>ue(i,0,e)},[k("span",null,[y(C(i.name||Ne(null==i?void 0:i.isPublic))+" ",1),Te(i)?(r(),h("span",Si," ("+C(i.digital||0)+") ",1)):v("v-if",!0)]),i.selected?(r(),x(p(L),{key:0,component:p(z),size:"20"},null,8,["component"])):v("v-if",!0)],10,bi)])),default:O((()=>[k("span",null,C(p(ae)(i)),1)])),_:2},1024)):v("v-if",!0)])))),128)):v("v-if",!0)],64)):(r(),h(b,{key:0},[k("span",{class:u(["child-item child-header header-item",{selected:e.selected||-1!==i.conditionSid.indexOf("all_data")}]),onClick:i=>ue(e)},[y(C(e.name)+" ",1),Te(e)?(r(),h("span",Ci," ("+C(e.digital||0)+") ",1)):v("v-if",!0)],10,yi),k("div",vi,[1!=i.hideConditionChangeBtn?(r(),h("span",{key:0,onClick:pe},[m(p(L),{component:p(N),size:"16"},null,8,["component"]),y(" "+C("切换"))])):v("v-if",!0),1!=i.hideConditionChangeSetting?(r(),h("span",{key:1,onClick:fe},[m(p(L),{component:p(A),size:"16"},null,8,["component"]),y(" "+C("设置"))])):v("v-if",!0)])],64))],2)):v("v-if",!0)],64)))),256))],4),"keyword"===i.conditionType&&1!=i.hideClearConditionChange?(r(),h("div",xi,[k("div",Oi,"已选择"+C(i.conditionSid.filter((i=>"all_data"!==i)).length)+"项",1),k("div",{class:"selected-item-del",onClick:n[4]||(n[4]=i=>ue({sid:"all_data",name:"全部数据",digital:p(Qi).digital}))},[m(p(q),{"class-name":"svg-icon-btn","icon-class":"xitongtubiaoliebiaocaozuoanniushanchu"}),y(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],512)):v("v-if",!0),3===p(Ki)?(r(),h(b,{key:3},[1!=i.hideConditionChangeBtn||1!=i.hideConditionChangeSetting||1!=i.hideConditionChangeSetting||p(Gi).filter((i=>i.isShow)).length>0?(r(),h("div",_i,[1!=i.hideConditionChangeBtn||1!=i.hideConditionChangeSetting?(r(),h("div",Ii,[k("span",{class:u(["all-data",{selected:-1!==i.conditionSid.indexOf("all_data")}]),onClick:n[5]||(n[5]=i=>ue({sid:"all_data",name:"全部数据",digital:p(Qi).digital}))},[y(" 全部数据 "),p(Qi).digital||0===p(Qi).digital?(r(),h(b,{key:0},[y(" ("+C(p(Qi).digital||0)+") ",1)],64)):v("v-if",!0)],2),k("div",wi,[1!=i.hideConditionChangeBtn?(r(),h("span",{key:0,onClick:pe,style:{"margin-right":"30px"}},[m(p(L),{component:p(N),size:"20"},null,8,["component"]),y(" "+C("切换"))])):v("v-if",!0),1!=i.hideConditionChangeSetting?(r(),h("span",{key:1,onClick:fe},[m(p(L),{component:p(A),size:"20"},null,8,["component"]),y(" "+C("设置"))])):v("v-if",!0)])])):v("v-if",!0),k("div",{class:"group",style:g({borderBottom:"keyword"===i.conditionType&&1!=i.hideClearConditionChange?"1px solid #d5d5d5":0})},[(r(!0),h(b,null,S(p(Vi).slice(1),((e,n)=>(r(),h(b,null,[e.children&&0!==e.children.length?(r(),h(b,{key:1},[v(" 后面需要进一步放开测试 "),0!==e.children.filter((i=>i.isShow)).length?(r(),x(p(j),{key:0,class:"classificationSelect3",to:!1,placeholder:e.name+(1!=i.countCondition||!e.digital&&0!==e.digital?"":" ("+(e.digital||0)+")"),value:re(n),clearable:"",options:ce(e),"label-field":"labelName","value-field":"itemValue","onUpdate:value":(i,n)=>function(i,e,n,t){if(i)ue(e,n.children.findIndex((e=>e.sid==i)),n);else{let i=n.children.findIndex((i=>-1!==Di.conditionSid.indexOf(i.sid)));-1!==i&&ue(n.children[i],0,n)}}(i,n,e)},null,8,["placeholder","value","options","onUpdate:value"])):v("v-if",!0)],64)):(r(),h("span",{key:e.sid,class:u(["child-item",{selected:e.selected}]),style:{"padding-left":"17px"},onClick:i=>ue(e)},[y(C(e.name)+" "+C(e.digital)+" ",1),Te(e)?(r(),h("span",Ti," ("+C(e.digital||0)+") ",1)):v("v-if",!0)],10,Li))],64)))),256))],4),"keyword"===i.conditionType&&1!=i.hideClearConditionChange?(r(),h("div",ji,[k("div",Ni,"已选择"+C(i.conditionSid.filter((i=>"all_data"!==i)).length)+"项",1),(r(!0),h(b,null,S(p(Vi).slice(1),((i,e)=>(r(),h(b,null,[i.children&&0!==i.children.length?(r(!0),h(b,{key:1},S(i.children,((e,n)=>(r(),h(b,null,[e.selected?(r(),h("div",{class:"selected-item",key:e.sid},[y(C(e.name)+" ",1),Te(e)?(r(),h("span",Bi," ("+C(e.digital||0)+") ",1)):v("v-if",!0),m(p(L),{component:p(M),onClick:n=>ue(e,0,i)},null,8,["component","onClick"])])):v("v-if",!0)],64)))),256)):(r(),h("div",{class:"selected-item",key:i.sid},[y(C(i.name)+" ",1),Te(i)?(r(),h("span",Ai," ("+C(i.digital||0)+") ",1)):v("v-if",!0),m(p(L),{component:p(M),onClick:e=>ue(i)},null,8,["component","onClick"])]))],64)))),256)),k("div",{class:"selected-item-del",onClick:n[6]||(n[6]=i=>ue({sid:"all_data",name:"全部数据",digital:p(Qi).digital}))},[m(p(q),{"class-name":"svg-icon-btn","icon-class":"xitongtubiaoliebiaocaozuoanniushanchu"}),y(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],64)):v("v-if",!0),4===p(Ki)?(r(),h(b,{key:4},[p(de)||p(se)?(r(),h("div",Pi,[p(de)?(r(),h("div",zi,[v(" @click=\"handleItemClick({ sid: 'all_data', name: '全部数据', digital: allObj.digital })\" "),k("span",{class:u(["all-data",{selected:-1!==i.conditionSid.indexOf("all_data")}])},[y(C(p(ie))+" ",1),p(Qi).digital||0===p(Qi).digital?(r(),h(b,{key:0},[y(" ("+C(p(Qi).digital||0)+") ",1)],64)):v("v-if",!0)],2),k("div",Mi,[k("span",{style:{"margin-right":"30px"},class:"upack-up-btn",onClick:n[7]||(n[7]=i=>_(ee)?ee.value=!p(ee):ee=!p(ee))},[y(C(p(ee)?"展开":"收起")+" ",1),m(p(L),{component:p(ee)?p(B):p(D),style:{color:"#2d7aff"}},null,8,["component"])]),1!=i.hideConditionChangeBtn?(r(),h("span",{key:0,onClick:pe,style:{"margin-right":"30px"}},[m(p(L),{component:p(N),size:"20"},null,8,["component"]),v(' {{ $t("1.1.5.2") }} '),y(" 切换 ")])):v("v-if",!0),1!=i.hideConditionChangeSetting?(r(),h("span",{key:1,onClick:fe},[m(p(L),{component:p(A),size:"20"},null,8,["component"]),v(' {{ $t("1.1.5.3") }} '),y(" 设置 ")])):v("v-if",!0)])])):v("v-if",!0)])):v("v-if",!0),k("div",{class:"classify-4-container",style:g({height:p(ee)?0:"auto"})},[m(J,I({ref_key:"professional",ref:Fi},e.$attrs,{tableDataType:p($).API,originConditionList:p(Gi),displayCategoryList:p(Hi),treeData:p(Vi),tableId:i.tableId,searchFieldList:i.searchFieldList,filterApiConfig:i.filterApiConfig,onHandleItemClick:ue,onChangeSearch:_e,onChangeShowName:je}),null,16,["tableDataType","originConditionList","displayCategoryList","treeData","tableId","searchFieldList","filterApiConfig"])],4)],64)):v("v-if",!0),v(" searchFieldList: props "),v(" saveGetTableCondiTionList 新增,删除 "),v(" CondiTionListInit 修改? "),m(E,{ref:"search",onChangeSearch:_e,onSaveGetTableCondiTionList:Oe,onCondiTionListInit:xe,onSetClassifyModal:me,searchFieldList:i.searchFieldList,conditionList:p(Ui),displayCategoryList:p(Hi),settingId:p(Xi),searchDefName:p(Yi),tableId:i.tableId,classifyModal:p(Zi),filterApiConfig:i.filterApiConfig},{searchCondition:O((({...i})=>[w(e.$slots,"searchCondition",{attrs:i})])),_:3},8,["searchFieldList","conditionList","displayCategoryList","settingId","searchDefName","tableId","classifyModal","filterApiConfig"])],6))}}),[["__file","Classification-com.vue"]]);export{Di as default};
|
|
@@ -12,6 +12,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12
12
|
type: ObjectConstructor;
|
|
13
13
|
default: () => {};
|
|
14
14
|
};
|
|
15
|
+
conditionList: {
|
|
16
|
+
type: ArrayConstructor;
|
|
17
|
+
default: () => never[];
|
|
18
|
+
};
|
|
15
19
|
}, {
|
|
16
20
|
attrs: any;
|
|
17
21
|
$message: import("naive-ui").MessageApi;
|
|
@@ -28,6 +32,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
28
32
|
type: ObjectConstructor;
|
|
29
33
|
default: () => {};
|
|
30
34
|
};
|
|
35
|
+
conditionList: {
|
|
36
|
+
type: ArrayConstructor;
|
|
37
|
+
default: () => never[];
|
|
38
|
+
};
|
|
31
39
|
}>> & {}>>;
|
|
32
40
|
showAdd: import("vue").Ref<boolean>;
|
|
33
41
|
className: import("vue").Ref<string>;
|
|
@@ -47,9 +55,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
47
55
|
handleParentNameSelect: (item: IParentNamesType, index: number) => void;
|
|
48
56
|
handleParentNamesRemove: (index: number, item: IParentNamesType) => void;
|
|
49
57
|
handleParent: (index: number, item: IParentNamesType) => void;
|
|
58
|
+
handleGetParams: () => {
|
|
59
|
+
displayCategory: string;
|
|
60
|
+
name: string;
|
|
61
|
+
} | undefined;
|
|
62
|
+
NIcon: any;
|
|
50
63
|
NButton: any;
|
|
51
64
|
NInput: any;
|
|
52
65
|
CloseOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
66
|
+
AddOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
53
67
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
54
68
|
showItemName: {
|
|
55
69
|
type: BooleanConstructor;
|
|
@@ -63,9 +77,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
63
77
|
type: ObjectConstructor;
|
|
64
78
|
default: () => {};
|
|
65
79
|
};
|
|
80
|
+
conditionList: {
|
|
81
|
+
type: ArrayConstructor;
|
|
82
|
+
default: () => never[];
|
|
83
|
+
};
|
|
66
84
|
}>>, {
|
|
67
85
|
tableId: string;
|
|
68
86
|
actionList_prop: Record<string, any>;
|
|
69
87
|
showItemName: boolean;
|
|
88
|
+
conditionList: unknown[];
|
|
70
89
|
}>;
|
|
71
90
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as l,ref as a,computed as t,onMounted as
|
|
1
|
+
import{defineComponent as e,useAttrs as l,ref as a,computed as t,onMounted as n,openBlock as i,createElementBlock as s,createVNode as o,unref as u,createCommentVNode as d,Fragment as c,renderList as v,normalizeClass as r,createElementVNode as p,toDisplayString as m,createBlock as f,withDirectives as h,withCtx as y,createTextVNode as b,vShow as g}from"vue";import{useMessage as k,NInput as w,NIcon as x,NButton as _}from"naive-ui";import{CloseOutline as C,AddOutline as L}from"@vicons/ionicons5";import I from"../../../../_virtual/plugin-vue_export-helper.js";const N={class:"search-class-name-block"},B={key:0,class:"item-name"},E=p("span",{class:"label"},"筛选分类名称:",-1),U={key:1,class:"parent-names"},A=p("span",{class:"label"},"父类名称:",-1),j=["onDblclick","onClick"],z={key:0,class:"s-content"};var D=I(e({__name:"search-class-name",props:{showItemName:{type:Boolean,default:!0},tableId:{type:String,default:""},actionList_prop:{type:Object,default:()=>({})},conditionList:{type:Array,default:()=>[]}},setup(e,{expose:I}){const D=e,S=l(),T=k(),G=a(!1),M=a(""),O=a(""),P=a([]),q=t((()=>P.value.some((e=>e.isAdd))));function F(){D.showItemName&&function(){let e=[];S.displayCategoryList.forEach((l=>{"未分类"!==l&&e.push({disabled:!0,selected:l===D.actionList_prop.displayCategory,value:l})})),P.value=e}(),M.value=D.actionList_prop.name}function H(e){var l;const a=null==(l=null==e?void 0:e.target)?void 0:l.nextElementSibling;setTimeout((()=>{a&&a.focus()})),G.value=!0}function J(){G.value=!1,O.value&&(P.value.forEach((e=>e.selected=!1)),P.value.push({disabled:!0,value:O.value,selected:!0,isAdd:!0}),O.value="")}function K(e,l){!function(e,l){let{conditionList:a}=D;if(!a||!a.length)return void P.value.splice(e,1);let t=a.filter((e=>e.displayCategory===l.value));if(!t||!t.length)return void P.value.splice(e,1);T.error("该分类下有已有数据,请删除该分类下的筛选集后重试!")}(e,l)}return n((()=>{F()})),I({init:F,handleGetParams:function(){var e;if(!M.value&&D.showItemName)return void T.warning("请输入搜索分类名称");let l=null==(e=P.value.find((e=>e.selected)))?void 0:e.value;if(l)return{displayCategory:l,name:M.value};T.warning("请至少添加一个条件")}}),(l,a)=>(i(),s("div",N,[e.showItemName?(i(),s("div",B,[E,o(u(w),{value:M.value,"onUpdate:value":a[0]||(a[0]=e=>M.value=e),placeholder:"请输入分类名称",style:{width:"250px"},maxLength:10},null,8,["value"])])):d("v-if",!0),e.showItemName?(i(),s("div",U,[A,(i(!0),s(c,null,v(P.value,((e,l)=>(i(),s("div",{class:r(["edit-tag",{"edit-tag-select":e.selected&&e.disabled}]),key:l,onDblclick:l=>function(e,l){l.disabled=!1,setTimeout((()=>{e.target.focus()}),0)}(l,e),onClick:a=>function(e,l){e.disabled&&(P.value.forEach(((e,a)=>{a!==l&&(e.selected=!1)})),e.selected=!e.selected)}(e,l)},[e.disabled?(i(),s("div",z,[p("span",null,m(e.value),1)])):(i(),f(u(w),{key:1,style:{width:"100px"},value:e.value,"onUpdate:value":l=>e.value=l,disabled:e.disabled,onBlur:()=>e.disabled=!0,maxLength:10},null,8,["value","onUpdate:value","disabled","onBlur"])),o(u(x),{component:u(C),class:"anticon-close",size:"20",onClick:a=>K(l,e)},null,8,["component","onClick"])],42,j)))),128)),u(q)?d("v-if",!0):(i(),s(c,{key:0},[h(o(u(_),{class:"ant-btn",icon:"plus",dashed:"",onClick:H},{default:y((()=>[o(u(x),{component:u(L),size:"20"},null,8,["component"]),b(" "+m("添加父类"))])),_:1},512),[[g,!G.value]]),h(o(u(w),{class:"edit-tag",value:O.value,"onUpdate:value":a[1]||(a[1]=e=>O.value=e),valueModifiers:{trim:!0},style:{width:"100px"},onBlur:J,maxLength:10},null,8,["value"]),[[g,G.value]])],64))])):d("v-if",!0)]))}}),[["__file","search-class-name.vue"]]);export{D as default};
|